openapi.json 519 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073
  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. "repo_clone": {
  11635. "$ref": "#/components/schemas/PermissionRuleConfig"
  11636. },
  11637. "repo_overview": {
  11638. "$ref": "#/components/schemas/PermissionRuleConfig"
  11639. },
  11640. "lsp": {
  11641. "$ref": "#/components/schemas/PermissionRuleConfig"
  11642. },
  11643. "doom_loop": {
  11644. "$ref": "#/components/schemas/PermissionActionConfig"
  11645. },
  11646. "skill": {
  11647. "$ref": "#/components/schemas/PermissionRuleConfig"
  11648. }
  11649. },
  11650. "additionalProperties": {
  11651. "$ref": "#/components/schemas/PermissionRuleConfig"
  11652. }
  11653. }
  11654. ]
  11655. },
  11656. "AgentConfig": {
  11657. "type": "object",
  11658. "properties": {
  11659. "model": {
  11660. "type": "string"
  11661. },
  11662. "variant": {
  11663. "type": "string"
  11664. },
  11665. "temperature": {
  11666. "type": "number"
  11667. },
  11668. "top_p": {
  11669. "type": "number"
  11670. },
  11671. "prompt": {
  11672. "type": "string"
  11673. },
  11674. "tools": {
  11675. "type": "object",
  11676. "additionalProperties": {
  11677. "type": "boolean"
  11678. }
  11679. },
  11680. "disable": {
  11681. "type": "boolean"
  11682. },
  11683. "description": {
  11684. "type": "string"
  11685. },
  11686. "mode": {
  11687. "type": "string",
  11688. "enum": ["subagent", "primary", "all"]
  11689. },
  11690. "hidden": {
  11691. "type": "boolean"
  11692. },
  11693. "options": {
  11694. "type": "object"
  11695. },
  11696. "color": {
  11697. "anyOf": [
  11698. {
  11699. "type": "string",
  11700. "pattern": "^#[0-9a-fA-F]{6}$"
  11701. },
  11702. {
  11703. "type": "string",
  11704. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11705. }
  11706. ],
  11707. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11708. },
  11709. "steps": {
  11710. "type": "integer",
  11711. "exclusiveMinimum": 0
  11712. },
  11713. "maxSteps": {
  11714. "type": "integer",
  11715. "exclusiveMinimum": 0
  11716. },
  11717. "permission": {
  11718. "$ref": "#/components/schemas/PermissionConfig"
  11719. }
  11720. },
  11721. "additionalProperties": {}
  11722. },
  11723. "ProviderConfig": {
  11724. "type": "object",
  11725. "properties": {
  11726. "api": {
  11727. "type": "string"
  11728. },
  11729. "name": {
  11730. "type": "string"
  11731. },
  11732. "env": {
  11733. "type": "array",
  11734. "items": {
  11735. "type": "string"
  11736. }
  11737. },
  11738. "id": {
  11739. "type": "string"
  11740. },
  11741. "npm": {
  11742. "type": "string"
  11743. },
  11744. "whitelist": {
  11745. "type": "array",
  11746. "items": {
  11747. "type": "string"
  11748. }
  11749. },
  11750. "blacklist": {
  11751. "type": "array",
  11752. "items": {
  11753. "type": "string"
  11754. }
  11755. },
  11756. "options": {
  11757. "type": "object",
  11758. "properties": {
  11759. "apiKey": {
  11760. "type": "string"
  11761. },
  11762. "baseURL": {
  11763. "type": "string"
  11764. },
  11765. "enterpriseUrl": {
  11766. "type": "string"
  11767. },
  11768. "setCacheKey": {
  11769. "type": "boolean"
  11770. },
  11771. "timeout": {
  11772. "anyOf": [
  11773. {
  11774. "type": "integer",
  11775. "exclusiveMinimum": 0
  11776. },
  11777. {
  11778. "type": "boolean",
  11779. "enum": [false]
  11780. }
  11781. ],
  11782. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11783. },
  11784. "chunkTimeout": {
  11785. "type": "integer",
  11786. "exclusiveMinimum": 0
  11787. }
  11788. },
  11789. "additionalProperties": {}
  11790. },
  11791. "models": {
  11792. "type": "object",
  11793. "additionalProperties": {
  11794. "type": "object",
  11795. "properties": {
  11796. "id": {
  11797. "type": "string"
  11798. },
  11799. "name": {
  11800. "type": "string"
  11801. },
  11802. "family": {
  11803. "type": "string"
  11804. },
  11805. "release_date": {
  11806. "type": "string"
  11807. },
  11808. "attachment": {
  11809. "type": "boolean"
  11810. },
  11811. "reasoning": {
  11812. "type": "boolean"
  11813. },
  11814. "temperature": {
  11815. "type": "boolean"
  11816. },
  11817. "tool_call": {
  11818. "type": "boolean"
  11819. },
  11820. "interleaved": {
  11821. "anyOf": [
  11822. {
  11823. "type": "boolean",
  11824. "enum": [true]
  11825. },
  11826. {
  11827. "type": "object",
  11828. "properties": {
  11829. "field": {
  11830. "type": "string",
  11831. "enum": ["reasoning_content", "reasoning_details"]
  11832. }
  11833. },
  11834. "required": ["field"],
  11835. "additionalProperties": false
  11836. }
  11837. ]
  11838. },
  11839. "cost": {
  11840. "type": "object",
  11841. "properties": {
  11842. "input": {
  11843. "type": "number"
  11844. },
  11845. "output": {
  11846. "type": "number"
  11847. },
  11848. "cache_read": {
  11849. "type": "number"
  11850. },
  11851. "cache_write": {
  11852. "type": "number"
  11853. },
  11854. "context_over_200k": {
  11855. "type": "object",
  11856. "properties": {
  11857. "input": {
  11858. "type": "number"
  11859. },
  11860. "output": {
  11861. "type": "number"
  11862. },
  11863. "cache_read": {
  11864. "type": "number"
  11865. },
  11866. "cache_write": {
  11867. "type": "number"
  11868. }
  11869. },
  11870. "required": ["input", "output"],
  11871. "additionalProperties": false
  11872. }
  11873. },
  11874. "required": ["input", "output"],
  11875. "additionalProperties": false
  11876. },
  11877. "limit": {
  11878. "type": "object",
  11879. "properties": {
  11880. "context": {
  11881. "type": "number"
  11882. },
  11883. "input": {
  11884. "type": "number"
  11885. },
  11886. "output": {
  11887. "type": "number"
  11888. }
  11889. },
  11890. "required": ["context", "output"],
  11891. "additionalProperties": false
  11892. },
  11893. "modalities": {
  11894. "type": "object",
  11895. "properties": {
  11896. "input": {
  11897. "type": "array",
  11898. "items": {
  11899. "type": "string",
  11900. "enum": ["text", "audio", "image", "video", "pdf"]
  11901. }
  11902. },
  11903. "output": {
  11904. "type": "array",
  11905. "items": {
  11906. "type": "string",
  11907. "enum": ["text", "audio", "image", "video", "pdf"]
  11908. }
  11909. }
  11910. },
  11911. "required": ["input", "output"],
  11912. "additionalProperties": false
  11913. },
  11914. "experimental": {
  11915. "type": "boolean"
  11916. },
  11917. "status": {
  11918. "type": "string",
  11919. "enum": ["alpha", "beta", "deprecated", "active"]
  11920. },
  11921. "provider": {
  11922. "type": "object",
  11923. "properties": {
  11924. "npm": {
  11925. "type": "string"
  11926. },
  11927. "api": {
  11928. "type": "string"
  11929. }
  11930. },
  11931. "additionalProperties": false
  11932. },
  11933. "options": {
  11934. "type": "object"
  11935. },
  11936. "headers": {
  11937. "type": "object",
  11938. "additionalProperties": {
  11939. "type": "string"
  11940. }
  11941. },
  11942. "variants": {
  11943. "type": "object",
  11944. "additionalProperties": {
  11945. "type": "object",
  11946. "properties": {
  11947. "disabled": {
  11948. "type": "boolean"
  11949. }
  11950. },
  11951. "additionalProperties": {}
  11952. },
  11953. "description": "Variant-specific configuration"
  11954. }
  11955. },
  11956. "additionalProperties": false
  11957. }
  11958. }
  11959. },
  11960. "additionalProperties": false
  11961. },
  11962. "McpLocalConfig": {
  11963. "type": "object",
  11964. "properties": {
  11965. "type": {
  11966. "type": "string",
  11967. "enum": ["local"],
  11968. "description": "Type of MCP server connection"
  11969. },
  11970. "command": {
  11971. "type": "array",
  11972. "items": {
  11973. "type": "string"
  11974. },
  11975. "description": "Command and arguments to run the MCP server"
  11976. },
  11977. "environment": {
  11978. "type": "object",
  11979. "additionalProperties": {
  11980. "type": "string"
  11981. }
  11982. },
  11983. "enabled": {
  11984. "type": "boolean"
  11985. },
  11986. "timeout": {
  11987. "type": "integer",
  11988. "exclusiveMinimum": 0
  11989. }
  11990. },
  11991. "required": ["type", "command"],
  11992. "additionalProperties": false
  11993. },
  11994. "McpOAuthConfig": {
  11995. "type": "object",
  11996. "properties": {
  11997. "clientId": {
  11998. "type": "string"
  11999. },
  12000. "clientSecret": {
  12001. "type": "string"
  12002. },
  12003. "scope": {
  12004. "type": "string"
  12005. },
  12006. "redirectUri": {
  12007. "type": "string"
  12008. }
  12009. },
  12010. "additionalProperties": false
  12011. },
  12012. "McpRemoteConfig": {
  12013. "type": "object",
  12014. "properties": {
  12015. "type": {
  12016. "type": "string",
  12017. "enum": ["remote"],
  12018. "description": "Type of MCP server connection"
  12019. },
  12020. "url": {
  12021. "type": "string",
  12022. "description": "URL of the remote MCP server"
  12023. },
  12024. "enabled": {
  12025. "type": "boolean"
  12026. },
  12027. "headers": {
  12028. "type": "object",
  12029. "additionalProperties": {
  12030. "type": "string"
  12031. }
  12032. },
  12033. "oauth": {
  12034. "anyOf": [
  12035. {
  12036. "$ref": "#/components/schemas/McpOAuthConfig"
  12037. },
  12038. {
  12039. "type": "boolean",
  12040. "enum": [false]
  12041. }
  12042. ],
  12043. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  12044. },
  12045. "timeout": {
  12046. "type": "integer",
  12047. "exclusiveMinimum": 0
  12048. }
  12049. },
  12050. "required": ["type", "url"],
  12051. "additionalProperties": false
  12052. },
  12053. "LayoutConfig": {
  12054. "type": "string",
  12055. "enum": ["auto", "stretch"],
  12056. "description": "@deprecated Always uses stretch layout."
  12057. },
  12058. "ImageAttachmentConfig": {
  12059. "type": "object",
  12060. "properties": {
  12061. "auto_resize": {
  12062. "type": "boolean"
  12063. },
  12064. "max_width": {
  12065. "type": "integer",
  12066. "exclusiveMinimum": 0
  12067. },
  12068. "max_height": {
  12069. "type": "integer",
  12070. "exclusiveMinimum": 0
  12071. },
  12072. "max_base64_bytes": {
  12073. "type": "integer",
  12074. "exclusiveMinimum": 0
  12075. }
  12076. },
  12077. "additionalProperties": false
  12078. },
  12079. "AttachmentConfig": {
  12080. "type": "object",
  12081. "properties": {
  12082. "image": {
  12083. "$ref": "#/components/schemas/ImageAttachmentConfig"
  12084. }
  12085. },
  12086. "additionalProperties": false
  12087. },
  12088. "Config": {
  12089. "type": "object",
  12090. "properties": {
  12091. "$schema": {
  12092. "type": "string"
  12093. },
  12094. "shell": {
  12095. "type": "string"
  12096. },
  12097. "logLevel": {
  12098. "$ref": "#/components/schemas/LogLevel"
  12099. },
  12100. "server": {
  12101. "$ref": "#/components/schemas/ServerConfig"
  12102. },
  12103. "command": {
  12104. "type": "object",
  12105. "additionalProperties": {
  12106. "type": "object",
  12107. "properties": {
  12108. "template": {
  12109. "type": "string"
  12110. },
  12111. "description": {
  12112. "type": "string"
  12113. },
  12114. "agent": {
  12115. "type": "string"
  12116. },
  12117. "model": {
  12118. "type": "string"
  12119. },
  12120. "subtask": {
  12121. "type": "boolean"
  12122. }
  12123. },
  12124. "required": ["template"],
  12125. "additionalProperties": false
  12126. }
  12127. },
  12128. "skills": {
  12129. "type": "object",
  12130. "properties": {
  12131. "paths": {
  12132. "type": "array",
  12133. "items": {
  12134. "type": "string"
  12135. }
  12136. },
  12137. "urls": {
  12138. "type": "array",
  12139. "items": {
  12140. "type": "string"
  12141. }
  12142. }
  12143. },
  12144. "additionalProperties": false
  12145. },
  12146. "reference": {
  12147. "$ref": "#/components/schemas/ReferenceConfig"
  12148. },
  12149. "watcher": {
  12150. "type": "object",
  12151. "properties": {
  12152. "ignore": {
  12153. "type": "array",
  12154. "items": {
  12155. "type": "string"
  12156. }
  12157. }
  12158. },
  12159. "additionalProperties": false
  12160. },
  12161. "snapshot": {
  12162. "type": "boolean"
  12163. },
  12164. "plugin": {
  12165. "type": "array",
  12166. "items": {
  12167. "anyOf": [
  12168. {
  12169. "type": "string"
  12170. },
  12171. {
  12172. "type": "array",
  12173. "prefixItems": [
  12174. {
  12175. "type": "string"
  12176. },
  12177. {
  12178. "type": "object"
  12179. }
  12180. ],
  12181. "maxItems": 2,
  12182. "minItems": 2
  12183. }
  12184. ]
  12185. }
  12186. },
  12187. "share": {
  12188. "type": "string",
  12189. "enum": ["manual", "auto", "disabled"]
  12190. },
  12191. "autoshare": {
  12192. "type": "boolean"
  12193. },
  12194. "autoupdate": {
  12195. "anyOf": [
  12196. {
  12197. "type": "boolean"
  12198. },
  12199. {
  12200. "type": "string",
  12201. "enum": ["notify"]
  12202. }
  12203. ],
  12204. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12205. },
  12206. "disabled_providers": {
  12207. "type": "array",
  12208. "items": {
  12209. "type": "string"
  12210. }
  12211. },
  12212. "enabled_providers": {
  12213. "type": "array",
  12214. "items": {
  12215. "type": "string"
  12216. }
  12217. },
  12218. "model": {
  12219. "type": "string"
  12220. },
  12221. "small_model": {
  12222. "type": "string"
  12223. },
  12224. "default_agent": {
  12225. "type": "string"
  12226. },
  12227. "username": {
  12228. "type": "string"
  12229. },
  12230. "mode": {
  12231. "type": "object",
  12232. "properties": {
  12233. "build": {
  12234. "$ref": "#/components/schemas/AgentConfig"
  12235. },
  12236. "plan": {
  12237. "$ref": "#/components/schemas/AgentConfig"
  12238. }
  12239. },
  12240. "additionalProperties": {
  12241. "$ref": "#/components/schemas/AgentConfig"
  12242. }
  12243. },
  12244. "agent": {
  12245. "type": "object",
  12246. "properties": {
  12247. "plan": {
  12248. "$ref": "#/components/schemas/AgentConfig"
  12249. },
  12250. "build": {
  12251. "$ref": "#/components/schemas/AgentConfig"
  12252. },
  12253. "general": {
  12254. "$ref": "#/components/schemas/AgentConfig"
  12255. },
  12256. "explore": {
  12257. "$ref": "#/components/schemas/AgentConfig"
  12258. },
  12259. "scout": {
  12260. "$ref": "#/components/schemas/AgentConfig"
  12261. },
  12262. "title": {
  12263. "$ref": "#/components/schemas/AgentConfig"
  12264. },
  12265. "summary": {
  12266. "$ref": "#/components/schemas/AgentConfig"
  12267. },
  12268. "compaction": {
  12269. "$ref": "#/components/schemas/AgentConfig"
  12270. }
  12271. },
  12272. "additionalProperties": {
  12273. "$ref": "#/components/schemas/AgentConfig"
  12274. }
  12275. },
  12276. "provider": {
  12277. "type": "object",
  12278. "additionalProperties": {
  12279. "$ref": "#/components/schemas/ProviderConfig"
  12280. }
  12281. },
  12282. "mcp": {
  12283. "type": "object",
  12284. "additionalProperties": {
  12285. "anyOf": [
  12286. {
  12287. "$ref": "#/components/schemas/McpLocalConfig"
  12288. },
  12289. {
  12290. "$ref": "#/components/schemas/McpRemoteConfig"
  12291. },
  12292. {
  12293. "type": "object",
  12294. "properties": {
  12295. "enabled": {
  12296. "type": "boolean"
  12297. }
  12298. },
  12299. "required": ["enabled"],
  12300. "additionalProperties": false
  12301. }
  12302. ]
  12303. }
  12304. },
  12305. "formatter": {
  12306. "anyOf": [
  12307. {
  12308. "type": "boolean"
  12309. },
  12310. {
  12311. "type": "object",
  12312. "additionalProperties": {
  12313. "type": "object",
  12314. "properties": {
  12315. "disabled": {
  12316. "type": "boolean"
  12317. },
  12318. "command": {
  12319. "type": "array",
  12320. "items": {
  12321. "type": "string"
  12322. }
  12323. },
  12324. "environment": {
  12325. "type": "object",
  12326. "additionalProperties": {
  12327. "type": "string"
  12328. }
  12329. },
  12330. "extensions": {
  12331. "type": "array",
  12332. "items": {
  12333. "type": "string"
  12334. }
  12335. }
  12336. },
  12337. "additionalProperties": false
  12338. }
  12339. }
  12340. ],
  12341. "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."
  12342. },
  12343. "lsp": {
  12344. "anyOf": [
  12345. {
  12346. "type": "boolean"
  12347. },
  12348. {
  12349. "type": "object",
  12350. "additionalProperties": {
  12351. "anyOf": [
  12352. {
  12353. "type": "object",
  12354. "properties": {
  12355. "disabled": {
  12356. "type": "boolean",
  12357. "enum": [true]
  12358. }
  12359. },
  12360. "required": ["disabled"],
  12361. "additionalProperties": false
  12362. },
  12363. {
  12364. "type": "object",
  12365. "properties": {
  12366. "command": {
  12367. "type": "array",
  12368. "items": {
  12369. "type": "string"
  12370. }
  12371. },
  12372. "extensions": {
  12373. "type": "array",
  12374. "items": {
  12375. "type": "string"
  12376. }
  12377. },
  12378. "disabled": {
  12379. "type": "boolean"
  12380. },
  12381. "env": {
  12382. "type": "object",
  12383. "additionalProperties": {
  12384. "type": "string"
  12385. }
  12386. },
  12387. "initialization": {
  12388. "type": "object"
  12389. }
  12390. },
  12391. "required": ["command"],
  12392. "additionalProperties": false
  12393. }
  12394. ]
  12395. }
  12396. }
  12397. ],
  12398. "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."
  12399. },
  12400. "instructions": {
  12401. "type": "array",
  12402. "items": {
  12403. "type": "string"
  12404. }
  12405. },
  12406. "layout": {
  12407. "$ref": "#/components/schemas/LayoutConfig"
  12408. },
  12409. "permission": {
  12410. "$ref": "#/components/schemas/PermissionConfig"
  12411. },
  12412. "tools": {
  12413. "type": "object",
  12414. "additionalProperties": {
  12415. "type": "boolean"
  12416. }
  12417. },
  12418. "attachment": {
  12419. "$ref": "#/components/schemas/AttachmentConfig"
  12420. },
  12421. "enterprise": {
  12422. "type": "object",
  12423. "properties": {
  12424. "url": {
  12425. "type": "string"
  12426. }
  12427. },
  12428. "additionalProperties": false
  12429. },
  12430. "tool_output": {
  12431. "type": "object",
  12432. "properties": {
  12433. "max_lines": {
  12434. "type": "integer",
  12435. "exclusiveMinimum": 0
  12436. },
  12437. "max_bytes": {
  12438. "type": "integer",
  12439. "exclusiveMinimum": 0
  12440. }
  12441. },
  12442. "additionalProperties": false
  12443. },
  12444. "compaction": {
  12445. "type": "object",
  12446. "properties": {
  12447. "auto": {
  12448. "type": "boolean"
  12449. },
  12450. "prune": {
  12451. "type": "boolean"
  12452. },
  12453. "tail_turns": {
  12454. "type": "integer",
  12455. "minimum": 0
  12456. },
  12457. "preserve_recent_tokens": {
  12458. "type": "integer",
  12459. "minimum": 0
  12460. },
  12461. "reserved": {
  12462. "type": "integer",
  12463. "minimum": 0
  12464. }
  12465. },
  12466. "additionalProperties": false
  12467. },
  12468. "experimental": {
  12469. "type": "object",
  12470. "properties": {
  12471. "disable_paste_summary": {
  12472. "type": "boolean"
  12473. },
  12474. "batch_tool": {
  12475. "type": "boolean"
  12476. },
  12477. "openTelemetry": {
  12478. "type": "boolean"
  12479. },
  12480. "primary_tools": {
  12481. "type": "array",
  12482. "items": {
  12483. "type": "string"
  12484. }
  12485. },
  12486. "continue_loop_on_deny": {
  12487. "type": "boolean"
  12488. },
  12489. "mcp_timeout": {
  12490. "type": "integer",
  12491. "exclusiveMinimum": 0
  12492. }
  12493. },
  12494. "additionalProperties": false
  12495. }
  12496. },
  12497. "additionalProperties": false
  12498. },
  12499. "Model": {
  12500. "type": "object",
  12501. "properties": {
  12502. "id": {
  12503. "type": "string"
  12504. },
  12505. "providerID": {
  12506. "type": "string"
  12507. },
  12508. "api": {
  12509. "type": "object",
  12510. "properties": {
  12511. "id": {
  12512. "type": "string"
  12513. },
  12514. "url": {
  12515. "type": "string"
  12516. },
  12517. "npm": {
  12518. "type": "string"
  12519. }
  12520. },
  12521. "required": ["id", "url", "npm"],
  12522. "additionalProperties": false
  12523. },
  12524. "name": {
  12525. "type": "string"
  12526. },
  12527. "family": {
  12528. "type": "string"
  12529. },
  12530. "capabilities": {
  12531. "type": "object",
  12532. "properties": {
  12533. "temperature": {
  12534. "type": "boolean"
  12535. },
  12536. "reasoning": {
  12537. "type": "boolean"
  12538. },
  12539. "attachment": {
  12540. "type": "boolean"
  12541. },
  12542. "toolcall": {
  12543. "type": "boolean"
  12544. },
  12545. "input": {
  12546. "type": "object",
  12547. "properties": {
  12548. "text": {
  12549. "type": "boolean"
  12550. },
  12551. "audio": {
  12552. "type": "boolean"
  12553. },
  12554. "image": {
  12555. "type": "boolean"
  12556. },
  12557. "video": {
  12558. "type": "boolean"
  12559. },
  12560. "pdf": {
  12561. "type": "boolean"
  12562. }
  12563. },
  12564. "required": ["text", "audio", "image", "video", "pdf"],
  12565. "additionalProperties": false
  12566. },
  12567. "output": {
  12568. "type": "object",
  12569. "properties": {
  12570. "text": {
  12571. "type": "boolean"
  12572. },
  12573. "audio": {
  12574. "type": "boolean"
  12575. },
  12576. "image": {
  12577. "type": "boolean"
  12578. },
  12579. "video": {
  12580. "type": "boolean"
  12581. },
  12582. "pdf": {
  12583. "type": "boolean"
  12584. }
  12585. },
  12586. "required": ["text", "audio", "image", "video", "pdf"],
  12587. "additionalProperties": false
  12588. },
  12589. "interleaved": {
  12590. "anyOf": [
  12591. {
  12592. "type": "boolean"
  12593. },
  12594. {
  12595. "type": "object",
  12596. "properties": {
  12597. "field": {
  12598. "type": "string",
  12599. "enum": ["reasoning_content", "reasoning_details"]
  12600. }
  12601. },
  12602. "required": ["field"],
  12603. "additionalProperties": false
  12604. }
  12605. ]
  12606. }
  12607. },
  12608. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12609. "additionalProperties": false
  12610. },
  12611. "cost": {
  12612. "type": "object",
  12613. "properties": {
  12614. "input": {
  12615. "type": "number"
  12616. },
  12617. "output": {
  12618. "type": "number"
  12619. },
  12620. "cache": {
  12621. "type": "object",
  12622. "properties": {
  12623. "read": {
  12624. "type": "number"
  12625. },
  12626. "write": {
  12627. "type": "number"
  12628. }
  12629. },
  12630. "required": ["read", "write"],
  12631. "additionalProperties": false
  12632. },
  12633. "tiers": {
  12634. "type": "array",
  12635. "items": {
  12636. "type": "object",
  12637. "properties": {
  12638. "input": {
  12639. "type": "number"
  12640. },
  12641. "output": {
  12642. "type": "number"
  12643. },
  12644. "cache": {
  12645. "type": "object",
  12646. "properties": {
  12647. "read": {
  12648. "type": "number"
  12649. },
  12650. "write": {
  12651. "type": "number"
  12652. }
  12653. },
  12654. "required": ["read", "write"],
  12655. "additionalProperties": false
  12656. },
  12657. "tier": {
  12658. "type": "object",
  12659. "properties": {
  12660. "type": {
  12661. "type": "string",
  12662. "enum": ["context"]
  12663. },
  12664. "size": {
  12665. "type": "number"
  12666. }
  12667. },
  12668. "required": ["type", "size"],
  12669. "additionalProperties": false
  12670. }
  12671. },
  12672. "required": ["input", "output", "cache", "tier"],
  12673. "additionalProperties": false
  12674. }
  12675. },
  12676. "experimentalOver200K": {
  12677. "type": "object",
  12678. "properties": {
  12679. "input": {
  12680. "type": "number"
  12681. },
  12682. "output": {
  12683. "type": "number"
  12684. },
  12685. "cache": {
  12686. "type": "object",
  12687. "properties": {
  12688. "read": {
  12689. "type": "number"
  12690. },
  12691. "write": {
  12692. "type": "number"
  12693. }
  12694. },
  12695. "required": ["read", "write"],
  12696. "additionalProperties": false
  12697. }
  12698. },
  12699. "required": ["input", "output", "cache"],
  12700. "additionalProperties": false
  12701. }
  12702. },
  12703. "required": ["input", "output", "cache"],
  12704. "additionalProperties": false
  12705. },
  12706. "limit": {
  12707. "type": "object",
  12708. "properties": {
  12709. "context": {
  12710. "type": "number"
  12711. },
  12712. "input": {
  12713. "type": "number"
  12714. },
  12715. "output": {
  12716. "type": "number"
  12717. }
  12718. },
  12719. "required": ["context", "output"],
  12720. "additionalProperties": false
  12721. },
  12722. "status": {
  12723. "type": "string",
  12724. "enum": ["alpha", "beta", "deprecated", "active"]
  12725. },
  12726. "options": {
  12727. "type": "object"
  12728. },
  12729. "headers": {
  12730. "type": "object",
  12731. "additionalProperties": {
  12732. "type": "string"
  12733. }
  12734. },
  12735. "release_date": {
  12736. "type": "string"
  12737. },
  12738. "variants": {
  12739. "type": "object",
  12740. "additionalProperties": {
  12741. "type": "object"
  12742. }
  12743. }
  12744. },
  12745. "required": [
  12746. "id",
  12747. "providerID",
  12748. "api",
  12749. "name",
  12750. "capabilities",
  12751. "cost",
  12752. "limit",
  12753. "status",
  12754. "options",
  12755. "headers",
  12756. "release_date"
  12757. ],
  12758. "additionalProperties": false
  12759. },
  12760. "Provider": {
  12761. "type": "object",
  12762. "properties": {
  12763. "id": {
  12764. "type": "string"
  12765. },
  12766. "name": {
  12767. "type": "string"
  12768. },
  12769. "source": {
  12770. "type": "string",
  12771. "enum": ["env", "config", "custom", "api"]
  12772. },
  12773. "env": {
  12774. "type": "array",
  12775. "items": {
  12776. "type": "string"
  12777. }
  12778. },
  12779. "key": {
  12780. "type": "string"
  12781. },
  12782. "options": {
  12783. "type": "object"
  12784. },
  12785. "models": {
  12786. "type": "object",
  12787. "additionalProperties": {
  12788. "$ref": "#/components/schemas/Model"
  12789. }
  12790. }
  12791. },
  12792. "required": ["id", "name", "source", "env", "options", "models"],
  12793. "additionalProperties": false
  12794. },
  12795. "ConsoleState": {
  12796. "type": "object",
  12797. "properties": {
  12798. "consoleManagedProviders": {
  12799. "type": "array",
  12800. "items": {
  12801. "type": "string"
  12802. }
  12803. },
  12804. "activeOrgName": {
  12805. "type": "string"
  12806. },
  12807. "switchableOrgCount": {
  12808. "type": "integer",
  12809. "minimum": 0
  12810. }
  12811. },
  12812. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12813. "additionalProperties": false
  12814. },
  12815. "effect_HttpApiError_InternalServerError": {
  12816. "type": "object",
  12817. "properties": {
  12818. "_tag": {
  12819. "type": "string",
  12820. "enum": ["InternalServerError"]
  12821. }
  12822. },
  12823. "required": ["_tag"],
  12824. "additionalProperties": false
  12825. },
  12826. "ToolListItem": {
  12827. "type": "object",
  12828. "properties": {
  12829. "id": {
  12830. "type": "string"
  12831. },
  12832. "description": {
  12833. "type": "string"
  12834. },
  12835. "parameters": {}
  12836. },
  12837. "required": ["id", "description", "parameters"],
  12838. "additionalProperties": false
  12839. },
  12840. "ToolList": {
  12841. "type": "array",
  12842. "items": {
  12843. "$ref": "#/components/schemas/ToolListItem"
  12844. }
  12845. },
  12846. "ToolIDs": {
  12847. "type": "array",
  12848. "items": {
  12849. "type": "string"
  12850. }
  12851. },
  12852. "WorktreeCreateInput": {
  12853. "type": "object",
  12854. "properties": {
  12855. "name": {
  12856. "type": "string"
  12857. },
  12858. "startCommand": {
  12859. "type": "string",
  12860. "description": "Additional startup script to run after the project's start command"
  12861. }
  12862. },
  12863. "additionalProperties": false
  12864. },
  12865. "Worktree": {
  12866. "type": "object",
  12867. "properties": {
  12868. "name": {
  12869. "type": "string"
  12870. },
  12871. "branch": {
  12872. "type": "string"
  12873. },
  12874. "directory": {
  12875. "type": "string"
  12876. }
  12877. },
  12878. "required": ["name", "directory"],
  12879. "additionalProperties": false
  12880. },
  12881. "WorktreeRemoveInput": {
  12882. "type": "object",
  12883. "properties": {
  12884. "directory": {
  12885. "type": "string"
  12886. }
  12887. },
  12888. "required": ["directory"],
  12889. "additionalProperties": false
  12890. },
  12891. "WorktreeResetInput": {
  12892. "type": "object",
  12893. "properties": {
  12894. "directory": {
  12895. "type": "string"
  12896. }
  12897. },
  12898. "required": ["directory"],
  12899. "additionalProperties": false
  12900. },
  12901. "ProjectSummary": {
  12902. "type": "object",
  12903. "properties": {
  12904. "id": {
  12905. "type": "string"
  12906. },
  12907. "name": {
  12908. "type": "string"
  12909. },
  12910. "worktree": {
  12911. "type": "string"
  12912. }
  12913. },
  12914. "required": ["id", "worktree"],
  12915. "additionalProperties": false
  12916. },
  12917. "GlobalSession": {
  12918. "type": "object",
  12919. "properties": {
  12920. "id": {
  12921. "type": "string",
  12922. "pattern": "^ses"
  12923. },
  12924. "slug": {
  12925. "type": "string"
  12926. },
  12927. "projectID": {
  12928. "type": "string"
  12929. },
  12930. "workspaceID": {
  12931. "type": "string",
  12932. "pattern": "^wrk"
  12933. },
  12934. "directory": {
  12935. "type": "string"
  12936. },
  12937. "path": {
  12938. "type": "string"
  12939. },
  12940. "parentID": {
  12941. "type": "string",
  12942. "pattern": "^ses"
  12943. },
  12944. "summary": {
  12945. "type": "object",
  12946. "properties": {
  12947. "additions": {
  12948. "type": "number"
  12949. },
  12950. "deletions": {
  12951. "type": "number"
  12952. },
  12953. "files": {
  12954. "type": "number"
  12955. },
  12956. "diffs": {
  12957. "type": "array",
  12958. "items": {
  12959. "$ref": "#/components/schemas/SnapshotFileDiff"
  12960. }
  12961. }
  12962. },
  12963. "required": ["additions", "deletions", "files"],
  12964. "additionalProperties": false
  12965. },
  12966. "cost": {
  12967. "type": "number"
  12968. },
  12969. "tokens": {
  12970. "type": "object",
  12971. "properties": {
  12972. "input": {
  12973. "type": "number"
  12974. },
  12975. "output": {
  12976. "type": "number"
  12977. },
  12978. "reasoning": {
  12979. "type": "number"
  12980. },
  12981. "cache": {
  12982. "type": "object",
  12983. "properties": {
  12984. "read": {
  12985. "type": "number"
  12986. },
  12987. "write": {
  12988. "type": "number"
  12989. }
  12990. },
  12991. "required": ["read", "write"],
  12992. "additionalProperties": false
  12993. }
  12994. },
  12995. "required": ["input", "output", "reasoning", "cache"],
  12996. "additionalProperties": false
  12997. },
  12998. "share": {
  12999. "type": "object",
  13000. "properties": {
  13001. "url": {
  13002. "type": "string"
  13003. }
  13004. },
  13005. "required": ["url"],
  13006. "additionalProperties": false
  13007. },
  13008. "title": {
  13009. "type": "string"
  13010. },
  13011. "agent": {
  13012. "type": "string"
  13013. },
  13014. "model": {
  13015. "type": "object",
  13016. "properties": {
  13017. "id": {
  13018. "type": "string"
  13019. },
  13020. "providerID": {
  13021. "type": "string"
  13022. },
  13023. "variant": {
  13024. "type": "string"
  13025. }
  13026. },
  13027. "required": ["id", "providerID"],
  13028. "additionalProperties": false
  13029. },
  13030. "version": {
  13031. "type": "string"
  13032. },
  13033. "time": {
  13034. "type": "object",
  13035. "properties": {
  13036. "created": {
  13037. "type": "integer",
  13038. "minimum": 0
  13039. },
  13040. "updated": {
  13041. "type": "integer",
  13042. "minimum": 0
  13043. },
  13044. "compacting": {
  13045. "type": "integer",
  13046. "minimum": 0
  13047. },
  13048. "archived": {
  13049. "type": "number"
  13050. }
  13051. },
  13052. "required": ["created", "updated"],
  13053. "additionalProperties": false
  13054. },
  13055. "permission": {
  13056. "$ref": "#/components/schemas/PermissionRuleset"
  13057. },
  13058. "revert": {
  13059. "type": "object",
  13060. "properties": {
  13061. "messageID": {
  13062. "type": "string",
  13063. "pattern": "^msg"
  13064. },
  13065. "partID": {
  13066. "type": "string",
  13067. "pattern": "^prt"
  13068. },
  13069. "snapshot": {
  13070. "type": "string"
  13071. },
  13072. "diff": {
  13073. "type": "string"
  13074. }
  13075. },
  13076. "required": ["messageID"],
  13077. "additionalProperties": false
  13078. },
  13079. "project": {
  13080. "anyOf": [
  13081. {
  13082. "$ref": "#/components/schemas/ProjectSummary"
  13083. },
  13084. {
  13085. "type": "null"
  13086. }
  13087. ]
  13088. }
  13089. },
  13090. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  13091. "additionalProperties": false
  13092. },
  13093. "McpResource": {
  13094. "type": "object",
  13095. "properties": {
  13096. "name": {
  13097. "type": "string"
  13098. },
  13099. "uri": {
  13100. "type": "string"
  13101. },
  13102. "description": {
  13103. "type": "string"
  13104. },
  13105. "mimeType": {
  13106. "type": "string"
  13107. },
  13108. "client": {
  13109. "type": "string"
  13110. }
  13111. },
  13112. "required": ["name", "uri", "client"],
  13113. "additionalProperties": false
  13114. },
  13115. "Symbol": {
  13116. "type": "object",
  13117. "properties": {
  13118. "name": {
  13119. "type": "string"
  13120. },
  13121. "kind": {
  13122. "type": "integer",
  13123. "minimum": 0
  13124. },
  13125. "location": {
  13126. "type": "object",
  13127. "properties": {
  13128. "uri": {
  13129. "type": "string"
  13130. },
  13131. "range": {
  13132. "$ref": "#/components/schemas/Range"
  13133. }
  13134. },
  13135. "required": ["uri", "range"],
  13136. "additionalProperties": false
  13137. }
  13138. },
  13139. "required": ["name", "kind", "location"],
  13140. "additionalProperties": false
  13141. },
  13142. "FileNode": {
  13143. "type": "object",
  13144. "properties": {
  13145. "name": {
  13146. "type": "string"
  13147. },
  13148. "path": {
  13149. "type": "string"
  13150. },
  13151. "absolute": {
  13152. "type": "string"
  13153. },
  13154. "type": {
  13155. "type": "string",
  13156. "enum": ["file", "directory"]
  13157. },
  13158. "ignored": {
  13159. "type": "boolean"
  13160. }
  13161. },
  13162. "required": ["name", "path", "absolute", "type", "ignored"],
  13163. "additionalProperties": false
  13164. },
  13165. "FileContent": {
  13166. "type": "object",
  13167. "properties": {
  13168. "type": {
  13169. "type": "string",
  13170. "enum": ["text", "binary"]
  13171. },
  13172. "content": {
  13173. "type": "string"
  13174. },
  13175. "diff": {
  13176. "type": "string"
  13177. },
  13178. "patch": {
  13179. "type": "object",
  13180. "properties": {
  13181. "oldFileName": {
  13182. "type": "string"
  13183. },
  13184. "newFileName": {
  13185. "type": "string"
  13186. },
  13187. "oldHeader": {
  13188. "type": "string"
  13189. },
  13190. "newHeader": {
  13191. "type": "string"
  13192. },
  13193. "hunks": {
  13194. "type": "array",
  13195. "items": {
  13196. "type": "object",
  13197. "properties": {
  13198. "oldStart": {
  13199. "type": "integer",
  13200. "minimum": 0
  13201. },
  13202. "oldLines": {
  13203. "type": "integer",
  13204. "minimum": 0
  13205. },
  13206. "newStart": {
  13207. "type": "integer",
  13208. "minimum": 0
  13209. },
  13210. "newLines": {
  13211. "type": "integer",
  13212. "minimum": 0
  13213. },
  13214. "lines": {
  13215. "type": "array",
  13216. "items": {
  13217. "type": "string"
  13218. }
  13219. }
  13220. },
  13221. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13222. "additionalProperties": false
  13223. }
  13224. },
  13225. "index": {
  13226. "type": "string"
  13227. }
  13228. },
  13229. "required": ["oldFileName", "newFileName", "hunks"],
  13230. "additionalProperties": false
  13231. },
  13232. "encoding": {
  13233. "type": "string",
  13234. "enum": ["base64"]
  13235. },
  13236. "mimeType": {
  13237. "type": "string"
  13238. }
  13239. },
  13240. "required": ["type", "content"],
  13241. "additionalProperties": false
  13242. },
  13243. "File": {
  13244. "type": "object",
  13245. "properties": {
  13246. "path": {
  13247. "type": "string"
  13248. },
  13249. "added": {
  13250. "type": "integer",
  13251. "minimum": 0
  13252. },
  13253. "removed": {
  13254. "type": "integer",
  13255. "minimum": 0
  13256. },
  13257. "status": {
  13258. "type": "string",
  13259. "enum": ["added", "deleted", "modified"]
  13260. }
  13261. },
  13262. "required": ["path", "added", "removed", "status"],
  13263. "additionalProperties": false
  13264. },
  13265. "Path": {
  13266. "type": "object",
  13267. "properties": {
  13268. "home": {
  13269. "type": "string"
  13270. },
  13271. "state": {
  13272. "type": "string"
  13273. },
  13274. "config": {
  13275. "type": "string"
  13276. },
  13277. "worktree": {
  13278. "type": "string"
  13279. },
  13280. "directory": {
  13281. "type": "string"
  13282. }
  13283. },
  13284. "required": ["home", "state", "config", "worktree", "directory"],
  13285. "additionalProperties": false
  13286. },
  13287. "VcsInfo": {
  13288. "type": "object",
  13289. "properties": {
  13290. "branch": {
  13291. "type": "string"
  13292. },
  13293. "default_branch": {
  13294. "type": "string"
  13295. }
  13296. },
  13297. "additionalProperties": false
  13298. },
  13299. "VcsFileStatus": {
  13300. "type": "object",
  13301. "properties": {
  13302. "file": {
  13303. "type": "string"
  13304. },
  13305. "additions": {
  13306. "type": "number"
  13307. },
  13308. "deletions": {
  13309. "type": "number"
  13310. },
  13311. "status": {
  13312. "type": "string",
  13313. "enum": ["added", "deleted", "modified"]
  13314. }
  13315. },
  13316. "required": ["file", "additions", "deletions", "status"],
  13317. "additionalProperties": false
  13318. },
  13319. "VcsFileDiff": {
  13320. "type": "object",
  13321. "properties": {
  13322. "file": {
  13323. "type": "string"
  13324. },
  13325. "patch": {
  13326. "type": "string"
  13327. },
  13328. "additions": {
  13329. "type": "number"
  13330. },
  13331. "deletions": {
  13332. "type": "number"
  13333. },
  13334. "status": {
  13335. "type": "string",
  13336. "enum": ["added", "deleted", "modified"]
  13337. }
  13338. },
  13339. "required": ["file", "additions", "deletions"],
  13340. "additionalProperties": false
  13341. },
  13342. "VcsApplyError": {
  13343. "type": "object",
  13344. "properties": {
  13345. "name": {
  13346. "type": "string",
  13347. "enum": ["VcsApplyError"]
  13348. },
  13349. "data": {
  13350. "type": "object",
  13351. "properties": {
  13352. "message": {
  13353. "type": "string"
  13354. },
  13355. "reason": {
  13356. "type": "string",
  13357. "enum": ["non-git", "not-clean"]
  13358. }
  13359. },
  13360. "required": ["message", "reason"],
  13361. "additionalProperties": false
  13362. }
  13363. },
  13364. "required": ["name", "data"],
  13365. "additionalProperties": false
  13366. },
  13367. "Command": {
  13368. "type": "object",
  13369. "properties": {
  13370. "name": {
  13371. "type": "string"
  13372. },
  13373. "description": {
  13374. "type": "string"
  13375. },
  13376. "agent": {
  13377. "type": "string"
  13378. },
  13379. "model": {
  13380. "type": "string"
  13381. },
  13382. "source": {
  13383. "type": "string",
  13384. "enum": ["command", "mcp", "skill"]
  13385. },
  13386. "template": {
  13387. "type": "string"
  13388. },
  13389. "subtask": {
  13390. "type": "boolean"
  13391. },
  13392. "hints": {
  13393. "type": "array",
  13394. "items": {
  13395. "type": "string"
  13396. }
  13397. }
  13398. },
  13399. "required": ["name", "template", "hints"],
  13400. "additionalProperties": false
  13401. },
  13402. "Agent": {
  13403. "type": "object",
  13404. "properties": {
  13405. "name": {
  13406. "type": "string"
  13407. },
  13408. "description": {
  13409. "type": "string"
  13410. },
  13411. "mode": {
  13412. "type": "string",
  13413. "enum": ["subagent", "primary", "all"]
  13414. },
  13415. "native": {
  13416. "type": "boolean"
  13417. },
  13418. "hidden": {
  13419. "type": "boolean"
  13420. },
  13421. "topP": {
  13422. "type": "number"
  13423. },
  13424. "temperature": {
  13425. "type": "number"
  13426. },
  13427. "color": {
  13428. "type": "string"
  13429. },
  13430. "permission": {
  13431. "$ref": "#/components/schemas/PermissionRuleset"
  13432. },
  13433. "model": {
  13434. "type": "object",
  13435. "properties": {
  13436. "modelID": {
  13437. "type": "string"
  13438. },
  13439. "providerID": {
  13440. "type": "string"
  13441. }
  13442. },
  13443. "required": ["modelID", "providerID"],
  13444. "additionalProperties": false
  13445. },
  13446. "variant": {
  13447. "type": "string"
  13448. },
  13449. "prompt": {
  13450. "type": "string"
  13451. },
  13452. "options": {
  13453. "type": "object"
  13454. },
  13455. "steps": {
  13456. "type": "number"
  13457. }
  13458. },
  13459. "required": ["name", "mode", "permission", "options"],
  13460. "additionalProperties": false
  13461. },
  13462. "LSPStatus": {
  13463. "type": "object",
  13464. "properties": {
  13465. "id": {
  13466. "type": "string"
  13467. },
  13468. "name": {
  13469. "type": "string"
  13470. },
  13471. "root": {
  13472. "type": "string"
  13473. },
  13474. "status": {
  13475. "type": "string",
  13476. "enum": ["connected", "error"]
  13477. }
  13478. },
  13479. "required": ["id", "name", "root", "status"],
  13480. "additionalProperties": false
  13481. },
  13482. "FormatterStatus": {
  13483. "type": "object",
  13484. "properties": {
  13485. "name": {
  13486. "type": "string"
  13487. },
  13488. "extensions": {
  13489. "type": "array",
  13490. "items": {
  13491. "type": "string"
  13492. }
  13493. },
  13494. "enabled": {
  13495. "type": "boolean"
  13496. }
  13497. },
  13498. "required": ["name", "extensions", "enabled"],
  13499. "additionalProperties": false
  13500. },
  13501. "MCPStatusConnected": {
  13502. "type": "object",
  13503. "properties": {
  13504. "status": {
  13505. "type": "string",
  13506. "enum": ["connected"]
  13507. }
  13508. },
  13509. "required": ["status"],
  13510. "additionalProperties": false
  13511. },
  13512. "MCPStatusDisabled": {
  13513. "type": "object",
  13514. "properties": {
  13515. "status": {
  13516. "type": "string",
  13517. "enum": ["disabled"]
  13518. }
  13519. },
  13520. "required": ["status"],
  13521. "additionalProperties": false
  13522. },
  13523. "MCPStatusFailed": {
  13524. "type": "object",
  13525. "properties": {
  13526. "status": {
  13527. "type": "string",
  13528. "enum": ["failed"]
  13529. },
  13530. "error": {
  13531. "type": "string"
  13532. }
  13533. },
  13534. "required": ["status", "error"],
  13535. "additionalProperties": false
  13536. },
  13537. "MCPStatusNeedsAuth": {
  13538. "type": "object",
  13539. "properties": {
  13540. "status": {
  13541. "type": "string",
  13542. "enum": ["needs_auth"]
  13543. }
  13544. },
  13545. "required": ["status"],
  13546. "additionalProperties": false
  13547. },
  13548. "MCPStatusNeedsClientRegistration": {
  13549. "type": "object",
  13550. "properties": {
  13551. "status": {
  13552. "type": "string",
  13553. "enum": ["needs_client_registration"]
  13554. },
  13555. "error": {
  13556. "type": "string"
  13557. }
  13558. },
  13559. "required": ["status", "error"],
  13560. "additionalProperties": false
  13561. },
  13562. "MCPStatus": {
  13563. "anyOf": [
  13564. {
  13565. "$ref": "#/components/schemas/MCPStatusConnected"
  13566. },
  13567. {
  13568. "$ref": "#/components/schemas/MCPStatusDisabled"
  13569. },
  13570. {
  13571. "$ref": "#/components/schemas/MCPStatusFailed"
  13572. },
  13573. {
  13574. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13575. },
  13576. {
  13577. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13578. }
  13579. ]
  13580. },
  13581. "McpUnsupportedOAuthError": {
  13582. "type": "object",
  13583. "properties": {
  13584. "error": {
  13585. "type": "string"
  13586. }
  13587. },
  13588. "required": ["error"],
  13589. "additionalProperties": false
  13590. },
  13591. "NotFoundError": {
  13592. "type": "object",
  13593. "required": ["name", "data"],
  13594. "properties": {
  13595. "name": {
  13596. "type": "string",
  13597. "enum": ["NotFoundError"]
  13598. },
  13599. "data": {
  13600. "type": "object",
  13601. "required": ["message"],
  13602. "properties": {
  13603. "message": {
  13604. "type": "string"
  13605. }
  13606. }
  13607. }
  13608. }
  13609. },
  13610. "effect_HttpApiError_Forbidden": {
  13611. "type": "object",
  13612. "properties": {
  13613. "_tag": {
  13614. "type": "string",
  13615. "enum": ["Forbidden"]
  13616. }
  13617. },
  13618. "required": ["_tag"],
  13619. "additionalProperties": false
  13620. },
  13621. "ProviderAuthMethod": {
  13622. "type": "object",
  13623. "properties": {
  13624. "type": {
  13625. "type": "string",
  13626. "enum": ["oauth", "api"]
  13627. },
  13628. "label": {
  13629. "type": "string"
  13630. },
  13631. "prompts": {
  13632. "type": "array",
  13633. "items": {
  13634. "anyOf": [
  13635. {
  13636. "type": "object",
  13637. "properties": {
  13638. "type": {
  13639. "type": "string",
  13640. "enum": ["text"]
  13641. },
  13642. "key": {
  13643. "type": "string"
  13644. },
  13645. "message": {
  13646. "type": "string"
  13647. },
  13648. "placeholder": {
  13649. "type": "string"
  13650. },
  13651. "when": {
  13652. "type": "object",
  13653. "properties": {
  13654. "key": {
  13655. "type": "string"
  13656. },
  13657. "op": {
  13658. "type": "string",
  13659. "enum": ["eq", "neq"]
  13660. },
  13661. "value": {
  13662. "type": "string"
  13663. }
  13664. },
  13665. "required": ["key", "op", "value"],
  13666. "additionalProperties": false
  13667. }
  13668. },
  13669. "required": ["type", "key", "message"],
  13670. "additionalProperties": false
  13671. },
  13672. {
  13673. "type": "object",
  13674. "properties": {
  13675. "type": {
  13676. "type": "string",
  13677. "enum": ["select"]
  13678. },
  13679. "key": {
  13680. "type": "string"
  13681. },
  13682. "message": {
  13683. "type": "string"
  13684. },
  13685. "options": {
  13686. "type": "array",
  13687. "items": {
  13688. "type": "object",
  13689. "properties": {
  13690. "label": {
  13691. "type": "string"
  13692. },
  13693. "value": {
  13694. "type": "string"
  13695. },
  13696. "hint": {
  13697. "type": "string"
  13698. }
  13699. },
  13700. "required": ["label", "value"],
  13701. "additionalProperties": false
  13702. }
  13703. },
  13704. "when": {
  13705. "type": "object",
  13706. "properties": {
  13707. "key": {
  13708. "type": "string"
  13709. },
  13710. "op": {
  13711. "type": "string",
  13712. "enum": ["eq", "neq"]
  13713. },
  13714. "value": {
  13715. "type": "string"
  13716. }
  13717. },
  13718. "required": ["key", "op", "value"],
  13719. "additionalProperties": false
  13720. }
  13721. },
  13722. "required": ["type", "key", "message", "options"],
  13723. "additionalProperties": false
  13724. }
  13725. ]
  13726. }
  13727. }
  13728. },
  13729. "required": ["type", "label"],
  13730. "additionalProperties": false
  13731. },
  13732. "ProviderAuthAuthorization": {
  13733. "type": "object",
  13734. "properties": {
  13735. "url": {
  13736. "type": "string"
  13737. },
  13738. "method": {
  13739. "type": "string",
  13740. "enum": ["auto", "code"]
  13741. },
  13742. "instructions": {
  13743. "type": "string"
  13744. }
  13745. },
  13746. "required": ["url", "method", "instructions"],
  13747. "additionalProperties": false
  13748. },
  13749. "TextPartInput": {
  13750. "type": "object",
  13751. "properties": {
  13752. "id": {
  13753. "type": "string",
  13754. "pattern": "^prt"
  13755. },
  13756. "type": {
  13757. "type": "string",
  13758. "enum": ["text"]
  13759. },
  13760. "text": {
  13761. "type": "string"
  13762. },
  13763. "synthetic": {
  13764. "type": "boolean"
  13765. },
  13766. "ignored": {
  13767. "type": "boolean"
  13768. },
  13769. "time": {
  13770. "type": "object",
  13771. "properties": {
  13772. "start": {
  13773. "type": "integer",
  13774. "minimum": 0
  13775. },
  13776. "end": {
  13777. "type": "integer",
  13778. "minimum": 0
  13779. }
  13780. },
  13781. "required": ["start"],
  13782. "additionalProperties": false
  13783. },
  13784. "metadata": {
  13785. "type": "object"
  13786. }
  13787. },
  13788. "required": ["type", "text"],
  13789. "additionalProperties": false
  13790. },
  13791. "FilePartInput": {
  13792. "type": "object",
  13793. "properties": {
  13794. "id": {
  13795. "type": "string",
  13796. "pattern": "^prt"
  13797. },
  13798. "type": {
  13799. "type": "string",
  13800. "enum": ["file"]
  13801. },
  13802. "mime": {
  13803. "type": "string"
  13804. },
  13805. "filename": {
  13806. "type": "string"
  13807. },
  13808. "url": {
  13809. "type": "string"
  13810. },
  13811. "source": {
  13812. "$ref": "#/components/schemas/FilePartSource"
  13813. }
  13814. },
  13815. "required": ["type", "mime", "url"],
  13816. "additionalProperties": false
  13817. },
  13818. "AgentPartInput": {
  13819. "type": "object",
  13820. "properties": {
  13821. "id": {
  13822. "type": "string",
  13823. "pattern": "^prt"
  13824. },
  13825. "type": {
  13826. "type": "string",
  13827. "enum": ["agent"]
  13828. },
  13829. "name": {
  13830. "type": "string"
  13831. },
  13832. "source": {
  13833. "type": "object",
  13834. "properties": {
  13835. "value": {
  13836. "type": "string"
  13837. },
  13838. "start": {
  13839. "type": "integer",
  13840. "minimum": 0
  13841. },
  13842. "end": {
  13843. "type": "integer",
  13844. "minimum": 0
  13845. }
  13846. },
  13847. "required": ["value", "start", "end"],
  13848. "additionalProperties": false
  13849. }
  13850. },
  13851. "required": ["type", "name"],
  13852. "additionalProperties": false
  13853. },
  13854. "SubtaskPartInput": {
  13855. "type": "object",
  13856. "properties": {
  13857. "id": {
  13858. "type": "string",
  13859. "pattern": "^prt"
  13860. },
  13861. "type": {
  13862. "type": "string",
  13863. "enum": ["subtask"]
  13864. },
  13865. "prompt": {
  13866. "type": "string"
  13867. },
  13868. "description": {
  13869. "type": "string"
  13870. },
  13871. "agent": {
  13872. "type": "string"
  13873. },
  13874. "model": {
  13875. "type": "object",
  13876. "properties": {
  13877. "providerID": {
  13878. "type": "string"
  13879. },
  13880. "modelID": {
  13881. "type": "string"
  13882. }
  13883. },
  13884. "required": ["providerID", "modelID"],
  13885. "additionalProperties": false
  13886. },
  13887. "command": {
  13888. "type": "string"
  13889. }
  13890. },
  13891. "required": ["type", "prompt", "description", "agent"],
  13892. "additionalProperties": false
  13893. },
  13894. "V2SessionsResponse": {
  13895. "type": "object",
  13896. "properties": {
  13897. "items": {
  13898. "type": "array",
  13899. "items": {
  13900. "$ref": "#/components/schemas/SessionInfo"
  13901. }
  13902. },
  13903. "cursor": {
  13904. "type": "object",
  13905. "properties": {
  13906. "previous": {
  13907. "type": "string"
  13908. },
  13909. "next": {
  13910. "type": "string"
  13911. }
  13912. },
  13913. "additionalProperties": false
  13914. }
  13915. },
  13916. "required": ["items", "cursor"],
  13917. "additionalProperties": false
  13918. },
  13919. "V2SessionMessagesResponse": {
  13920. "type": "object",
  13921. "properties": {
  13922. "items": {
  13923. "type": "array",
  13924. "items": {
  13925. "$ref": "#/components/schemas/SessionMessage"
  13926. }
  13927. },
  13928. "cursor": {
  13929. "type": "object",
  13930. "properties": {
  13931. "previous": {
  13932. "type": "string"
  13933. },
  13934. "next": {
  13935. "type": "string"
  13936. }
  13937. },
  13938. "additionalProperties": false
  13939. }
  13940. },
  13941. "required": ["items", "cursor"],
  13942. "additionalProperties": false
  13943. },
  13944. "EventTuiPromptAppend": {
  13945. "type": "object",
  13946. "properties": {
  13947. "type": {
  13948. "type": "string",
  13949. "enum": ["tui.prompt.append"]
  13950. },
  13951. "properties": {
  13952. "type": "object",
  13953. "properties": {
  13954. "text": {
  13955. "type": "string"
  13956. }
  13957. },
  13958. "required": ["text"],
  13959. "additionalProperties": false
  13960. }
  13961. },
  13962. "required": ["type", "properties"],
  13963. "additionalProperties": false
  13964. },
  13965. "EventTuiCommandExecute": {
  13966. "type": "object",
  13967. "properties": {
  13968. "type": {
  13969. "type": "string",
  13970. "enum": ["tui.command.execute"]
  13971. },
  13972. "properties": {
  13973. "type": "object",
  13974. "properties": {
  13975. "command": {
  13976. "anyOf": [
  13977. {
  13978. "type": "string",
  13979. "enum": [
  13980. "session.list",
  13981. "session.new",
  13982. "session.share",
  13983. "session.interrupt",
  13984. "session.compact",
  13985. "session.page.up",
  13986. "session.page.down",
  13987. "session.line.up",
  13988. "session.line.down",
  13989. "session.half.page.up",
  13990. "session.half.page.down",
  13991. "session.first",
  13992. "session.last",
  13993. "prompt.clear",
  13994. "prompt.submit",
  13995. "agent.cycle"
  13996. ]
  13997. },
  13998. {
  13999. "type": "string"
  14000. }
  14001. ]
  14002. }
  14003. },
  14004. "required": ["command"],
  14005. "additionalProperties": false
  14006. }
  14007. },
  14008. "required": ["type", "properties"],
  14009. "additionalProperties": false
  14010. },
  14011. "EventTuiToastShow": {
  14012. "type": "object",
  14013. "properties": {
  14014. "type": {
  14015. "type": "string",
  14016. "enum": ["tui.toast.show"]
  14017. },
  14018. "properties": {
  14019. "type": "object",
  14020. "properties": {
  14021. "title": {
  14022. "type": "string"
  14023. },
  14024. "message": {
  14025. "type": "string"
  14026. },
  14027. "variant": {
  14028. "type": "string",
  14029. "enum": ["info", "success", "warning", "error"]
  14030. },
  14031. "duration": {
  14032. "type": "integer",
  14033. "exclusiveMinimum": 0
  14034. }
  14035. },
  14036. "required": ["message", "variant"],
  14037. "additionalProperties": false
  14038. }
  14039. },
  14040. "required": ["type", "properties"],
  14041. "additionalProperties": false
  14042. },
  14043. "EventTuiSessionSelect": {
  14044. "type": "object",
  14045. "properties": {
  14046. "type": {
  14047. "type": "string",
  14048. "enum": ["tui.session.select"]
  14049. },
  14050. "properties": {
  14051. "type": "object",
  14052. "properties": {
  14053. "sessionID": {
  14054. "type": "string",
  14055. "pattern": "^ses",
  14056. "description": "Session ID to navigate to"
  14057. }
  14058. },
  14059. "required": ["sessionID"],
  14060. "additionalProperties": false
  14061. }
  14062. },
  14063. "required": ["type", "properties"],
  14064. "additionalProperties": false
  14065. },
  14066. "Workspace": {
  14067. "type": "object",
  14068. "properties": {
  14069. "id": {
  14070. "type": "string",
  14071. "pattern": "^wrk"
  14072. },
  14073. "type": {
  14074. "type": "string"
  14075. },
  14076. "name": {
  14077. "type": "string"
  14078. },
  14079. "branch": {
  14080. "anyOf": [
  14081. {
  14082. "type": "string"
  14083. },
  14084. {
  14085. "type": "null"
  14086. }
  14087. ]
  14088. },
  14089. "directory": {
  14090. "anyOf": [
  14091. {
  14092. "type": "string"
  14093. },
  14094. {
  14095. "type": "null"
  14096. }
  14097. ]
  14098. },
  14099. "extra": {
  14100. "anyOf": [
  14101. {},
  14102. {
  14103. "type": "null"
  14104. }
  14105. ]
  14106. },
  14107. "projectID": {
  14108. "type": "string"
  14109. },
  14110. "timeUsed": {
  14111. "anyOf": [
  14112. {
  14113. "type": "number"
  14114. },
  14115. {
  14116. "type": "string",
  14117. "enum": ["NaN"]
  14118. },
  14119. {
  14120. "type": "string",
  14121. "enum": ["Infinity"]
  14122. },
  14123. {
  14124. "type": "string",
  14125. "enum": ["-Infinity"]
  14126. },
  14127. {
  14128. "type": "string",
  14129. "enum": ["Infinity", "-Infinity", "NaN"]
  14130. }
  14131. ]
  14132. }
  14133. },
  14134. "required": ["id", "type", "name", "projectID", "timeUsed"],
  14135. "additionalProperties": false
  14136. },
  14137. "WorkspaceWarpError": {
  14138. "type": "object",
  14139. "properties": {
  14140. "name": {
  14141. "type": "string",
  14142. "enum": ["WorkspaceWarpError"]
  14143. },
  14144. "data": {
  14145. "type": "object",
  14146. "properties": {
  14147. "message": {
  14148. "type": "string"
  14149. }
  14150. },
  14151. "required": ["message"],
  14152. "additionalProperties": false
  14153. }
  14154. },
  14155. "required": ["name", "data"],
  14156. "additionalProperties": false
  14157. },
  14158. "SyncEventMessageUpdated": {
  14159. "type": "object",
  14160. "properties": {
  14161. "type": {
  14162. "type": "string",
  14163. "enum": ["sync"]
  14164. },
  14165. "name": {
  14166. "type": "string",
  14167. "enum": ["message.updated.1"]
  14168. },
  14169. "id": {
  14170. "type": "string"
  14171. },
  14172. "seq": {
  14173. "type": "number"
  14174. },
  14175. "aggregateID": {
  14176. "type": "string",
  14177. "enum": ["sessionID"]
  14178. },
  14179. "data": {
  14180. "type": "object",
  14181. "properties": {
  14182. "sessionID": {
  14183. "type": "string",
  14184. "pattern": "^ses"
  14185. },
  14186. "info": {
  14187. "$ref": "#/components/schemas/Message"
  14188. }
  14189. },
  14190. "required": ["sessionID", "info"],
  14191. "additionalProperties": false
  14192. }
  14193. },
  14194. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14195. "additionalProperties": false
  14196. },
  14197. "SyncEventMessageRemoved": {
  14198. "type": "object",
  14199. "properties": {
  14200. "type": {
  14201. "type": "string",
  14202. "enum": ["sync"]
  14203. },
  14204. "name": {
  14205. "type": "string",
  14206. "enum": ["message.removed.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. "messageID": {
  14226. "type": "string",
  14227. "pattern": "^msg"
  14228. }
  14229. },
  14230. "required": ["sessionID", "messageID"],
  14231. "additionalProperties": false
  14232. }
  14233. },
  14234. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14235. "additionalProperties": false
  14236. },
  14237. "SyncEventMessagePartUpdated": {
  14238. "type": "object",
  14239. "properties": {
  14240. "type": {
  14241. "type": "string",
  14242. "enum": ["sync"]
  14243. },
  14244. "name": {
  14245. "type": "string",
  14246. "enum": ["message.part.updated.1"]
  14247. },
  14248. "id": {
  14249. "type": "string"
  14250. },
  14251. "seq": {
  14252. "type": "number"
  14253. },
  14254. "aggregateID": {
  14255. "type": "string",
  14256. "enum": ["sessionID"]
  14257. },
  14258. "data": {
  14259. "type": "object",
  14260. "properties": {
  14261. "sessionID": {
  14262. "type": "string",
  14263. "pattern": "^ses"
  14264. },
  14265. "part": {
  14266. "$ref": "#/components/schemas/Part"
  14267. },
  14268. "time": {
  14269. "type": "integer",
  14270. "minimum": 0
  14271. }
  14272. },
  14273. "required": ["sessionID", "part", "time"],
  14274. "additionalProperties": false
  14275. }
  14276. },
  14277. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14278. "additionalProperties": false
  14279. },
  14280. "SyncEventMessagePartRemoved": {
  14281. "type": "object",
  14282. "properties": {
  14283. "type": {
  14284. "type": "string",
  14285. "enum": ["sync"]
  14286. },
  14287. "name": {
  14288. "type": "string",
  14289. "enum": ["message.part.removed.1"]
  14290. },
  14291. "id": {
  14292. "type": "string"
  14293. },
  14294. "seq": {
  14295. "type": "number"
  14296. },
  14297. "aggregateID": {
  14298. "type": "string",
  14299. "enum": ["sessionID"]
  14300. },
  14301. "data": {
  14302. "type": "object",
  14303. "properties": {
  14304. "sessionID": {
  14305. "type": "string",
  14306. "pattern": "^ses"
  14307. },
  14308. "messageID": {
  14309. "type": "string",
  14310. "pattern": "^msg"
  14311. },
  14312. "partID": {
  14313. "type": "string",
  14314. "pattern": "^prt"
  14315. }
  14316. },
  14317. "required": ["sessionID", "messageID", "partID"],
  14318. "additionalProperties": false
  14319. }
  14320. },
  14321. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14322. "additionalProperties": false
  14323. },
  14324. "SyncEventSessionCreated": {
  14325. "type": "object",
  14326. "properties": {
  14327. "type": {
  14328. "type": "string",
  14329. "enum": ["sync"]
  14330. },
  14331. "name": {
  14332. "type": "string",
  14333. "enum": ["session.created.1"]
  14334. },
  14335. "id": {
  14336. "type": "string"
  14337. },
  14338. "seq": {
  14339. "type": "number"
  14340. },
  14341. "aggregateID": {
  14342. "type": "string",
  14343. "enum": ["sessionID"]
  14344. },
  14345. "data": {
  14346. "type": "object",
  14347. "properties": {
  14348. "sessionID": {
  14349. "type": "string",
  14350. "pattern": "^ses"
  14351. },
  14352. "info": {
  14353. "$ref": "#/components/schemas/Session"
  14354. }
  14355. },
  14356. "required": ["sessionID", "info"],
  14357. "additionalProperties": false
  14358. }
  14359. },
  14360. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14361. "additionalProperties": false
  14362. },
  14363. "SyncEventSessionUpdated": {
  14364. "type": "object",
  14365. "properties": {
  14366. "type": {
  14367. "type": "string",
  14368. "enum": ["sync"]
  14369. },
  14370. "name": {
  14371. "type": "string",
  14372. "enum": ["session.updated.1"]
  14373. },
  14374. "id": {
  14375. "type": "string"
  14376. },
  14377. "seq": {
  14378. "type": "number"
  14379. },
  14380. "aggregateID": {
  14381. "type": "string",
  14382. "enum": ["sessionID"]
  14383. },
  14384. "data": {
  14385. "type": "object",
  14386. "properties": {
  14387. "sessionID": {
  14388. "type": "string",
  14389. "pattern": "^ses"
  14390. },
  14391. "info": {
  14392. "type": "object",
  14393. "properties": {
  14394. "id": {
  14395. "anyOf": [
  14396. {
  14397. "type": "string",
  14398. "pattern": "^ses"
  14399. },
  14400. {
  14401. "type": "null"
  14402. }
  14403. ]
  14404. },
  14405. "slug": {
  14406. "anyOf": [
  14407. {
  14408. "type": "string"
  14409. },
  14410. {
  14411. "type": "null"
  14412. }
  14413. ]
  14414. },
  14415. "projectID": {
  14416. "anyOf": [
  14417. {
  14418. "type": "string"
  14419. },
  14420. {
  14421. "type": "null"
  14422. }
  14423. ]
  14424. },
  14425. "workspaceID": {
  14426. "anyOf": [
  14427. {
  14428. "type": "string",
  14429. "pattern": "^wrk"
  14430. },
  14431. {
  14432. "type": "null"
  14433. }
  14434. ]
  14435. },
  14436. "directory": {
  14437. "anyOf": [
  14438. {
  14439. "type": "string"
  14440. },
  14441. {
  14442. "type": "null"
  14443. }
  14444. ]
  14445. },
  14446. "path": {
  14447. "anyOf": [
  14448. {
  14449. "type": "string"
  14450. },
  14451. {
  14452. "type": "null"
  14453. }
  14454. ]
  14455. },
  14456. "parentID": {
  14457. "anyOf": [
  14458. {
  14459. "type": "string",
  14460. "pattern": "^ses"
  14461. },
  14462. {
  14463. "type": "null"
  14464. }
  14465. ]
  14466. },
  14467. "summary": {
  14468. "anyOf": [
  14469. {
  14470. "type": "object",
  14471. "properties": {
  14472. "additions": {
  14473. "type": "number"
  14474. },
  14475. "deletions": {
  14476. "type": "number"
  14477. },
  14478. "files": {
  14479. "type": "number"
  14480. },
  14481. "diffs": {
  14482. "type": "array",
  14483. "items": {
  14484. "$ref": "#/components/schemas/SnapshotFileDiff"
  14485. }
  14486. }
  14487. },
  14488. "required": ["additions", "deletions", "files"],
  14489. "additionalProperties": false
  14490. },
  14491. {
  14492. "type": "null"
  14493. }
  14494. ]
  14495. },
  14496. "cost": {
  14497. "anyOf": [
  14498. {
  14499. "type": "number"
  14500. },
  14501. {
  14502. "type": "null"
  14503. }
  14504. ]
  14505. },
  14506. "tokens": {
  14507. "anyOf": [
  14508. {
  14509. "type": "object",
  14510. "properties": {
  14511. "input": {
  14512. "type": "number"
  14513. },
  14514. "output": {
  14515. "type": "number"
  14516. },
  14517. "reasoning": {
  14518. "type": "number"
  14519. },
  14520. "cache": {
  14521. "type": "object",
  14522. "properties": {
  14523. "read": {
  14524. "type": "number"
  14525. },
  14526. "write": {
  14527. "type": "number"
  14528. }
  14529. },
  14530. "required": ["read", "write"],
  14531. "additionalProperties": false
  14532. }
  14533. },
  14534. "required": ["input", "output", "reasoning", "cache"],
  14535. "additionalProperties": false
  14536. },
  14537. {
  14538. "type": "null"
  14539. }
  14540. ]
  14541. },
  14542. "share": {
  14543. "type": "object",
  14544. "properties": {
  14545. "url": {
  14546. "anyOf": [
  14547. {
  14548. "type": "string"
  14549. },
  14550. {
  14551. "type": "null"
  14552. }
  14553. ]
  14554. }
  14555. },
  14556. "additionalProperties": false
  14557. },
  14558. "title": {
  14559. "anyOf": [
  14560. {
  14561. "type": "string"
  14562. },
  14563. {
  14564. "type": "null"
  14565. }
  14566. ]
  14567. },
  14568. "agent": {
  14569. "anyOf": [
  14570. {
  14571. "type": "string"
  14572. },
  14573. {
  14574. "type": "null"
  14575. }
  14576. ]
  14577. },
  14578. "model": {
  14579. "anyOf": [
  14580. {
  14581. "type": "object",
  14582. "properties": {
  14583. "id": {
  14584. "type": "string"
  14585. },
  14586. "providerID": {
  14587. "type": "string"
  14588. },
  14589. "variant": {
  14590. "type": "string"
  14591. }
  14592. },
  14593. "required": ["id", "providerID"],
  14594. "additionalProperties": false
  14595. },
  14596. {
  14597. "type": "null"
  14598. }
  14599. ]
  14600. },
  14601. "version": {
  14602. "anyOf": [
  14603. {
  14604. "type": "string"
  14605. },
  14606. {
  14607. "type": "null"
  14608. }
  14609. ]
  14610. },
  14611. "time": {
  14612. "type": "object",
  14613. "properties": {
  14614. "created": {
  14615. "anyOf": [
  14616. {
  14617. "type": "integer",
  14618. "minimum": 0
  14619. },
  14620. {
  14621. "type": "null"
  14622. }
  14623. ]
  14624. },
  14625. "updated": {
  14626. "anyOf": [
  14627. {
  14628. "type": "integer",
  14629. "minimum": 0
  14630. },
  14631. {
  14632. "type": "null"
  14633. }
  14634. ]
  14635. },
  14636. "compacting": {
  14637. "anyOf": [
  14638. {
  14639. "type": "integer",
  14640. "minimum": 0
  14641. },
  14642. {
  14643. "type": "null"
  14644. }
  14645. ]
  14646. },
  14647. "archived": {
  14648. "anyOf": [
  14649. {
  14650. "type": "number"
  14651. },
  14652. {
  14653. "type": "null"
  14654. }
  14655. ]
  14656. }
  14657. },
  14658. "additionalProperties": false
  14659. },
  14660. "permission": {
  14661. "anyOf": [
  14662. {
  14663. "$ref": "#/components/schemas/PermissionRuleset"
  14664. },
  14665. {
  14666. "type": "null"
  14667. }
  14668. ]
  14669. },
  14670. "revert": {
  14671. "anyOf": [
  14672. {
  14673. "type": "object",
  14674. "properties": {
  14675. "messageID": {
  14676. "type": "string",
  14677. "pattern": "^msg"
  14678. },
  14679. "partID": {
  14680. "type": "string",
  14681. "pattern": "^prt"
  14682. },
  14683. "snapshot": {
  14684. "type": "string"
  14685. },
  14686. "diff": {
  14687. "type": "string"
  14688. }
  14689. },
  14690. "required": ["messageID"],
  14691. "additionalProperties": false
  14692. },
  14693. {
  14694. "type": "null"
  14695. }
  14696. ]
  14697. }
  14698. },
  14699. "additionalProperties": false
  14700. }
  14701. },
  14702. "required": ["sessionID", "info"],
  14703. "additionalProperties": false
  14704. }
  14705. },
  14706. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14707. "additionalProperties": false
  14708. },
  14709. "SyncEventSessionDeleted": {
  14710. "type": "object",
  14711. "properties": {
  14712. "type": {
  14713. "type": "string",
  14714. "enum": ["sync"]
  14715. },
  14716. "name": {
  14717. "type": "string",
  14718. "enum": ["session.deleted.1"]
  14719. },
  14720. "id": {
  14721. "type": "string"
  14722. },
  14723. "seq": {
  14724. "type": "number"
  14725. },
  14726. "aggregateID": {
  14727. "type": "string",
  14728. "enum": ["sessionID"]
  14729. },
  14730. "data": {
  14731. "type": "object",
  14732. "properties": {
  14733. "sessionID": {
  14734. "type": "string",
  14735. "pattern": "^ses"
  14736. },
  14737. "info": {
  14738. "$ref": "#/components/schemas/Session"
  14739. }
  14740. },
  14741. "required": ["sessionID", "info"],
  14742. "additionalProperties": false
  14743. }
  14744. },
  14745. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14746. "additionalProperties": false
  14747. },
  14748. "SyncEventSessionNextAgentSwitched": {
  14749. "type": "object",
  14750. "properties": {
  14751. "type": {
  14752. "type": "string",
  14753. "enum": ["sync"]
  14754. },
  14755. "name": {
  14756. "type": "string",
  14757. "enum": ["session.next.agent.switched.1"]
  14758. },
  14759. "id": {
  14760. "type": "string"
  14761. },
  14762. "seq": {
  14763. "type": "number"
  14764. },
  14765. "aggregateID": {
  14766. "type": "string",
  14767. "enum": ["sessionID"]
  14768. },
  14769. "data": {
  14770. "type": "object",
  14771. "properties": {
  14772. "timestamp": {
  14773. "type": "number"
  14774. },
  14775. "sessionID": {
  14776. "type": "string",
  14777. "pattern": "^ses"
  14778. },
  14779. "agent": {
  14780. "type": "string"
  14781. }
  14782. },
  14783. "required": ["timestamp", "sessionID", "agent"],
  14784. "additionalProperties": false
  14785. }
  14786. },
  14787. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14788. "additionalProperties": false
  14789. },
  14790. "SyncEventSessionNextModelSwitched": {
  14791. "type": "object",
  14792. "properties": {
  14793. "type": {
  14794. "type": "string",
  14795. "enum": ["sync"]
  14796. },
  14797. "name": {
  14798. "type": "string",
  14799. "enum": ["session.next.model.switched.1"]
  14800. },
  14801. "id": {
  14802. "type": "string"
  14803. },
  14804. "seq": {
  14805. "type": "number"
  14806. },
  14807. "aggregateID": {
  14808. "type": "string",
  14809. "enum": ["sessionID"]
  14810. },
  14811. "data": {
  14812. "type": "object",
  14813. "properties": {
  14814. "timestamp": {
  14815. "type": "number"
  14816. },
  14817. "sessionID": {
  14818. "type": "string",
  14819. "pattern": "^ses"
  14820. },
  14821. "model": {
  14822. "type": "object",
  14823. "properties": {
  14824. "id": {
  14825. "type": "string"
  14826. },
  14827. "providerID": {
  14828. "type": "string"
  14829. },
  14830. "variant": {
  14831. "type": "string"
  14832. }
  14833. },
  14834. "required": ["id", "providerID", "variant"],
  14835. "additionalProperties": false
  14836. }
  14837. },
  14838. "required": ["timestamp", "sessionID", "model"],
  14839. "additionalProperties": false
  14840. }
  14841. },
  14842. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14843. "additionalProperties": false
  14844. },
  14845. "SyncEventSessionNextPrompted": {
  14846. "type": "object",
  14847. "properties": {
  14848. "type": {
  14849. "type": "string",
  14850. "enum": ["sync"]
  14851. },
  14852. "name": {
  14853. "type": "string",
  14854. "enum": ["session.next.prompted.1"]
  14855. },
  14856. "id": {
  14857. "type": "string"
  14858. },
  14859. "seq": {
  14860. "type": "number"
  14861. },
  14862. "aggregateID": {
  14863. "type": "string",
  14864. "enum": ["sessionID"]
  14865. },
  14866. "data": {
  14867. "type": "object",
  14868. "properties": {
  14869. "timestamp": {
  14870. "type": "number"
  14871. },
  14872. "sessionID": {
  14873. "type": "string",
  14874. "pattern": "^ses"
  14875. },
  14876. "prompt": {
  14877. "$ref": "#/components/schemas/Prompt"
  14878. }
  14879. },
  14880. "required": ["timestamp", "sessionID", "prompt"],
  14881. "additionalProperties": false
  14882. }
  14883. },
  14884. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14885. "additionalProperties": false
  14886. },
  14887. "SyncEventSessionNextSynthetic": {
  14888. "type": "object",
  14889. "properties": {
  14890. "type": {
  14891. "type": "string",
  14892. "enum": ["sync"]
  14893. },
  14894. "name": {
  14895. "type": "string",
  14896. "enum": ["session.next.synthetic.1"]
  14897. },
  14898. "id": {
  14899. "type": "string"
  14900. },
  14901. "seq": {
  14902. "type": "number"
  14903. },
  14904. "aggregateID": {
  14905. "type": "string",
  14906. "enum": ["sessionID"]
  14907. },
  14908. "data": {
  14909. "type": "object",
  14910. "properties": {
  14911. "timestamp": {
  14912. "type": "number"
  14913. },
  14914. "sessionID": {
  14915. "type": "string",
  14916. "pattern": "^ses"
  14917. },
  14918. "text": {
  14919. "type": "string"
  14920. }
  14921. },
  14922. "required": ["timestamp", "sessionID", "text"],
  14923. "additionalProperties": false
  14924. }
  14925. },
  14926. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14927. "additionalProperties": false
  14928. },
  14929. "SyncEventSessionNextShellStarted": {
  14930. "type": "object",
  14931. "properties": {
  14932. "type": {
  14933. "type": "string",
  14934. "enum": ["sync"]
  14935. },
  14936. "name": {
  14937. "type": "string",
  14938. "enum": ["session.next.shell.started.1"]
  14939. },
  14940. "id": {
  14941. "type": "string"
  14942. },
  14943. "seq": {
  14944. "type": "number"
  14945. },
  14946. "aggregateID": {
  14947. "type": "string",
  14948. "enum": ["sessionID"]
  14949. },
  14950. "data": {
  14951. "type": "object",
  14952. "properties": {
  14953. "timestamp": {
  14954. "type": "number"
  14955. },
  14956. "sessionID": {
  14957. "type": "string",
  14958. "pattern": "^ses"
  14959. },
  14960. "callID": {
  14961. "type": "string"
  14962. },
  14963. "command": {
  14964. "type": "string"
  14965. }
  14966. },
  14967. "required": ["timestamp", "sessionID", "callID", "command"],
  14968. "additionalProperties": false
  14969. }
  14970. },
  14971. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14972. "additionalProperties": false
  14973. },
  14974. "SyncEventSessionNextShellEnded": {
  14975. "type": "object",
  14976. "properties": {
  14977. "type": {
  14978. "type": "string",
  14979. "enum": ["sync"]
  14980. },
  14981. "name": {
  14982. "type": "string",
  14983. "enum": ["session.next.shell.ended.1"]
  14984. },
  14985. "id": {
  14986. "type": "string"
  14987. },
  14988. "seq": {
  14989. "type": "number"
  14990. },
  14991. "aggregateID": {
  14992. "type": "string",
  14993. "enum": ["sessionID"]
  14994. },
  14995. "data": {
  14996. "type": "object",
  14997. "properties": {
  14998. "timestamp": {
  14999. "type": "number"
  15000. },
  15001. "sessionID": {
  15002. "type": "string",
  15003. "pattern": "^ses"
  15004. },
  15005. "callID": {
  15006. "type": "string"
  15007. },
  15008. "output": {
  15009. "type": "string"
  15010. }
  15011. },
  15012. "required": ["timestamp", "sessionID", "callID", "output"],
  15013. "additionalProperties": false
  15014. }
  15015. },
  15016. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15017. "additionalProperties": false
  15018. },
  15019. "SyncEventSessionNextStepStarted": {
  15020. "type": "object",
  15021. "properties": {
  15022. "type": {
  15023. "type": "string",
  15024. "enum": ["sync"]
  15025. },
  15026. "name": {
  15027. "type": "string",
  15028. "enum": ["session.next.step.started.1"]
  15029. },
  15030. "id": {
  15031. "type": "string"
  15032. },
  15033. "seq": {
  15034. "type": "number"
  15035. },
  15036. "aggregateID": {
  15037. "type": "string",
  15038. "enum": ["sessionID"]
  15039. },
  15040. "data": {
  15041. "type": "object",
  15042. "properties": {
  15043. "timestamp": {
  15044. "type": "number"
  15045. },
  15046. "sessionID": {
  15047. "type": "string",
  15048. "pattern": "^ses"
  15049. },
  15050. "agent": {
  15051. "type": "string"
  15052. },
  15053. "model": {
  15054. "type": "object",
  15055. "properties": {
  15056. "id": {
  15057. "type": "string"
  15058. },
  15059. "providerID": {
  15060. "type": "string"
  15061. },
  15062. "variant": {
  15063. "type": "string"
  15064. }
  15065. },
  15066. "required": ["id", "providerID", "variant"],
  15067. "additionalProperties": false
  15068. },
  15069. "snapshot": {
  15070. "type": "string"
  15071. }
  15072. },
  15073. "required": ["timestamp", "sessionID", "agent", "model"],
  15074. "additionalProperties": false
  15075. }
  15076. },
  15077. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15078. "additionalProperties": false
  15079. },
  15080. "SyncEventSessionNextStepEnded": {
  15081. "type": "object",
  15082. "properties": {
  15083. "type": {
  15084. "type": "string",
  15085. "enum": ["sync"]
  15086. },
  15087. "name": {
  15088. "type": "string",
  15089. "enum": ["session.next.step.ended.1"]
  15090. },
  15091. "id": {
  15092. "type": "string"
  15093. },
  15094. "seq": {
  15095. "type": "number"
  15096. },
  15097. "aggregateID": {
  15098. "type": "string",
  15099. "enum": ["sessionID"]
  15100. },
  15101. "data": {
  15102. "type": "object",
  15103. "properties": {
  15104. "timestamp": {
  15105. "type": "number"
  15106. },
  15107. "sessionID": {
  15108. "type": "string",
  15109. "pattern": "^ses"
  15110. },
  15111. "finish": {
  15112. "type": "string"
  15113. },
  15114. "cost": {
  15115. "type": "number"
  15116. },
  15117. "tokens": {
  15118. "type": "object",
  15119. "properties": {
  15120. "input": {
  15121. "type": "number"
  15122. },
  15123. "output": {
  15124. "type": "number"
  15125. },
  15126. "reasoning": {
  15127. "type": "number"
  15128. },
  15129. "cache": {
  15130. "type": "object",
  15131. "properties": {
  15132. "read": {
  15133. "type": "number"
  15134. },
  15135. "write": {
  15136. "type": "number"
  15137. }
  15138. },
  15139. "required": ["read", "write"],
  15140. "additionalProperties": false
  15141. }
  15142. },
  15143. "required": ["input", "output", "reasoning", "cache"],
  15144. "additionalProperties": false
  15145. },
  15146. "snapshot": {
  15147. "type": "string"
  15148. }
  15149. },
  15150. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  15151. "additionalProperties": false
  15152. }
  15153. },
  15154. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15155. "additionalProperties": false
  15156. },
  15157. "SyncEventSessionNextStepFailed": {
  15158. "type": "object",
  15159. "properties": {
  15160. "type": {
  15161. "type": "string",
  15162. "enum": ["sync"]
  15163. },
  15164. "name": {
  15165. "type": "string",
  15166. "enum": ["session.next.step.failed.1"]
  15167. },
  15168. "id": {
  15169. "type": "string"
  15170. },
  15171. "seq": {
  15172. "type": "number"
  15173. },
  15174. "aggregateID": {
  15175. "type": "string",
  15176. "enum": ["sessionID"]
  15177. },
  15178. "data": {
  15179. "type": "object",
  15180. "properties": {
  15181. "timestamp": {
  15182. "type": "number"
  15183. },
  15184. "sessionID": {
  15185. "type": "string",
  15186. "pattern": "^ses"
  15187. },
  15188. "error": {
  15189. "$ref": "#/components/schemas/SessionErrorUnknown"
  15190. }
  15191. },
  15192. "required": ["timestamp", "sessionID", "error"],
  15193. "additionalProperties": false
  15194. }
  15195. },
  15196. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15197. "additionalProperties": false
  15198. },
  15199. "SyncEventSessionNextTextStarted": {
  15200. "type": "object",
  15201. "properties": {
  15202. "type": {
  15203. "type": "string",
  15204. "enum": ["sync"]
  15205. },
  15206. "name": {
  15207. "type": "string",
  15208. "enum": ["session.next.text.started.1"]
  15209. },
  15210. "id": {
  15211. "type": "string"
  15212. },
  15213. "seq": {
  15214. "type": "number"
  15215. },
  15216. "aggregateID": {
  15217. "type": "string",
  15218. "enum": ["sessionID"]
  15219. },
  15220. "data": {
  15221. "type": "object",
  15222. "properties": {
  15223. "timestamp": {
  15224. "type": "number"
  15225. },
  15226. "sessionID": {
  15227. "type": "string",
  15228. "pattern": "^ses"
  15229. }
  15230. },
  15231. "required": ["timestamp", "sessionID"],
  15232. "additionalProperties": false
  15233. }
  15234. },
  15235. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15236. "additionalProperties": false
  15237. },
  15238. "SyncEventSessionNextTextDelta": {
  15239. "type": "object",
  15240. "properties": {
  15241. "type": {
  15242. "type": "string",
  15243. "enum": ["sync"]
  15244. },
  15245. "name": {
  15246. "type": "string",
  15247. "enum": ["session.next.text.delta.1"]
  15248. },
  15249. "id": {
  15250. "type": "string"
  15251. },
  15252. "seq": {
  15253. "type": "number"
  15254. },
  15255. "aggregateID": {
  15256. "type": "string",
  15257. "enum": ["sessionID"]
  15258. },
  15259. "data": {
  15260. "type": "object",
  15261. "properties": {
  15262. "timestamp": {
  15263. "type": "number"
  15264. },
  15265. "sessionID": {
  15266. "type": "string",
  15267. "pattern": "^ses"
  15268. },
  15269. "delta": {
  15270. "type": "string"
  15271. }
  15272. },
  15273. "required": ["timestamp", "sessionID", "delta"],
  15274. "additionalProperties": false
  15275. }
  15276. },
  15277. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15278. "additionalProperties": false
  15279. },
  15280. "SyncEventSessionNextTextEnded": {
  15281. "type": "object",
  15282. "properties": {
  15283. "type": {
  15284. "type": "string",
  15285. "enum": ["sync"]
  15286. },
  15287. "name": {
  15288. "type": "string",
  15289. "enum": ["session.next.text.ended.1"]
  15290. },
  15291. "id": {
  15292. "type": "string"
  15293. },
  15294. "seq": {
  15295. "type": "number"
  15296. },
  15297. "aggregateID": {
  15298. "type": "string",
  15299. "enum": ["sessionID"]
  15300. },
  15301. "data": {
  15302. "type": "object",
  15303. "properties": {
  15304. "timestamp": {
  15305. "type": "number"
  15306. },
  15307. "sessionID": {
  15308. "type": "string",
  15309. "pattern": "^ses"
  15310. },
  15311. "text": {
  15312. "type": "string"
  15313. }
  15314. },
  15315. "required": ["timestamp", "sessionID", "text"],
  15316. "additionalProperties": false
  15317. }
  15318. },
  15319. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15320. "additionalProperties": false
  15321. },
  15322. "SyncEventSessionNextReasoningStarted": {
  15323. "type": "object",
  15324. "properties": {
  15325. "type": {
  15326. "type": "string",
  15327. "enum": ["sync"]
  15328. },
  15329. "name": {
  15330. "type": "string",
  15331. "enum": ["session.next.reasoning.started.1"]
  15332. },
  15333. "id": {
  15334. "type": "string"
  15335. },
  15336. "seq": {
  15337. "type": "number"
  15338. },
  15339. "aggregateID": {
  15340. "type": "string",
  15341. "enum": ["sessionID"]
  15342. },
  15343. "data": {
  15344. "type": "object",
  15345. "properties": {
  15346. "timestamp": {
  15347. "type": "number"
  15348. },
  15349. "sessionID": {
  15350. "type": "string",
  15351. "pattern": "^ses"
  15352. },
  15353. "reasoningID": {
  15354. "type": "string"
  15355. }
  15356. },
  15357. "required": ["timestamp", "sessionID", "reasoningID"],
  15358. "additionalProperties": false
  15359. }
  15360. },
  15361. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15362. "additionalProperties": false
  15363. },
  15364. "SyncEventSessionNextReasoningDelta": {
  15365. "type": "object",
  15366. "properties": {
  15367. "type": {
  15368. "type": "string",
  15369. "enum": ["sync"]
  15370. },
  15371. "name": {
  15372. "type": "string",
  15373. "enum": ["session.next.reasoning.delta.1"]
  15374. },
  15375. "id": {
  15376. "type": "string"
  15377. },
  15378. "seq": {
  15379. "type": "number"
  15380. },
  15381. "aggregateID": {
  15382. "type": "string",
  15383. "enum": ["sessionID"]
  15384. },
  15385. "data": {
  15386. "type": "object",
  15387. "properties": {
  15388. "timestamp": {
  15389. "type": "number"
  15390. },
  15391. "sessionID": {
  15392. "type": "string",
  15393. "pattern": "^ses"
  15394. },
  15395. "reasoningID": {
  15396. "type": "string"
  15397. },
  15398. "delta": {
  15399. "type": "string"
  15400. }
  15401. },
  15402. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15403. "additionalProperties": false
  15404. }
  15405. },
  15406. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15407. "additionalProperties": false
  15408. },
  15409. "SyncEventSessionNextReasoningEnded": {
  15410. "type": "object",
  15411. "properties": {
  15412. "type": {
  15413. "type": "string",
  15414. "enum": ["sync"]
  15415. },
  15416. "name": {
  15417. "type": "string",
  15418. "enum": ["session.next.reasoning.ended.1"]
  15419. },
  15420. "id": {
  15421. "type": "string"
  15422. },
  15423. "seq": {
  15424. "type": "number"
  15425. },
  15426. "aggregateID": {
  15427. "type": "string",
  15428. "enum": ["sessionID"]
  15429. },
  15430. "data": {
  15431. "type": "object",
  15432. "properties": {
  15433. "timestamp": {
  15434. "type": "number"
  15435. },
  15436. "sessionID": {
  15437. "type": "string",
  15438. "pattern": "^ses"
  15439. },
  15440. "reasoningID": {
  15441. "type": "string"
  15442. },
  15443. "text": {
  15444. "type": "string"
  15445. }
  15446. },
  15447. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15448. "additionalProperties": false
  15449. }
  15450. },
  15451. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15452. "additionalProperties": false
  15453. },
  15454. "SyncEventSessionNextToolInputStarted": {
  15455. "type": "object",
  15456. "properties": {
  15457. "type": {
  15458. "type": "string",
  15459. "enum": ["sync"]
  15460. },
  15461. "name": {
  15462. "type": "string",
  15463. "enum": ["session.next.tool.input.started.1"]
  15464. },
  15465. "id": {
  15466. "type": "string"
  15467. },
  15468. "seq": {
  15469. "type": "number"
  15470. },
  15471. "aggregateID": {
  15472. "type": "string",
  15473. "enum": ["sessionID"]
  15474. },
  15475. "data": {
  15476. "type": "object",
  15477. "properties": {
  15478. "timestamp": {
  15479. "type": "number"
  15480. },
  15481. "sessionID": {
  15482. "type": "string",
  15483. "pattern": "^ses"
  15484. },
  15485. "callID": {
  15486. "type": "string"
  15487. },
  15488. "name": {
  15489. "type": "string"
  15490. }
  15491. },
  15492. "required": ["timestamp", "sessionID", "callID", "name"],
  15493. "additionalProperties": false
  15494. }
  15495. },
  15496. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15497. "additionalProperties": false
  15498. },
  15499. "SyncEventSessionNextToolInputDelta": {
  15500. "type": "object",
  15501. "properties": {
  15502. "type": {
  15503. "type": "string",
  15504. "enum": ["sync"]
  15505. },
  15506. "name": {
  15507. "type": "string",
  15508. "enum": ["session.next.tool.input.delta.1"]
  15509. },
  15510. "id": {
  15511. "type": "string"
  15512. },
  15513. "seq": {
  15514. "type": "number"
  15515. },
  15516. "aggregateID": {
  15517. "type": "string",
  15518. "enum": ["sessionID"]
  15519. },
  15520. "data": {
  15521. "type": "object",
  15522. "properties": {
  15523. "timestamp": {
  15524. "type": "number"
  15525. },
  15526. "sessionID": {
  15527. "type": "string",
  15528. "pattern": "^ses"
  15529. },
  15530. "callID": {
  15531. "type": "string"
  15532. },
  15533. "delta": {
  15534. "type": "string"
  15535. }
  15536. },
  15537. "required": ["timestamp", "sessionID", "callID", "delta"],
  15538. "additionalProperties": false
  15539. }
  15540. },
  15541. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15542. "additionalProperties": false
  15543. },
  15544. "SyncEventSessionNextToolInputEnded": {
  15545. "type": "object",
  15546. "properties": {
  15547. "type": {
  15548. "type": "string",
  15549. "enum": ["sync"]
  15550. },
  15551. "name": {
  15552. "type": "string",
  15553. "enum": ["session.next.tool.input.ended.1"]
  15554. },
  15555. "id": {
  15556. "type": "string"
  15557. },
  15558. "seq": {
  15559. "type": "number"
  15560. },
  15561. "aggregateID": {
  15562. "type": "string",
  15563. "enum": ["sessionID"]
  15564. },
  15565. "data": {
  15566. "type": "object",
  15567. "properties": {
  15568. "timestamp": {
  15569. "type": "number"
  15570. },
  15571. "sessionID": {
  15572. "type": "string",
  15573. "pattern": "^ses"
  15574. },
  15575. "callID": {
  15576. "type": "string"
  15577. },
  15578. "text": {
  15579. "type": "string"
  15580. }
  15581. },
  15582. "required": ["timestamp", "sessionID", "callID", "text"],
  15583. "additionalProperties": false
  15584. }
  15585. },
  15586. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15587. "additionalProperties": false
  15588. },
  15589. "SyncEventSessionNextToolCalled": {
  15590. "type": "object",
  15591. "properties": {
  15592. "type": {
  15593. "type": "string",
  15594. "enum": ["sync"]
  15595. },
  15596. "name": {
  15597. "type": "string",
  15598. "enum": ["session.next.tool.called.1"]
  15599. },
  15600. "id": {
  15601. "type": "string"
  15602. },
  15603. "seq": {
  15604. "type": "number"
  15605. },
  15606. "aggregateID": {
  15607. "type": "string",
  15608. "enum": ["sessionID"]
  15609. },
  15610. "data": {
  15611. "type": "object",
  15612. "properties": {
  15613. "timestamp": {
  15614. "type": "number"
  15615. },
  15616. "sessionID": {
  15617. "type": "string",
  15618. "pattern": "^ses"
  15619. },
  15620. "callID": {
  15621. "type": "string"
  15622. },
  15623. "tool": {
  15624. "type": "string"
  15625. },
  15626. "input": {
  15627. "type": "object"
  15628. },
  15629. "provider": {
  15630. "type": "object",
  15631. "properties": {
  15632. "executed": {
  15633. "type": "boolean"
  15634. },
  15635. "metadata": {
  15636. "type": "object"
  15637. }
  15638. },
  15639. "required": ["executed"],
  15640. "additionalProperties": false
  15641. }
  15642. },
  15643. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15644. "additionalProperties": false
  15645. }
  15646. },
  15647. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15648. "additionalProperties": false
  15649. },
  15650. "SyncEventSessionNextToolProgress": {
  15651. "type": "object",
  15652. "properties": {
  15653. "type": {
  15654. "type": "string",
  15655. "enum": ["sync"]
  15656. },
  15657. "name": {
  15658. "type": "string",
  15659. "enum": ["session.next.tool.progress.1"]
  15660. },
  15661. "id": {
  15662. "type": "string"
  15663. },
  15664. "seq": {
  15665. "type": "number"
  15666. },
  15667. "aggregateID": {
  15668. "type": "string",
  15669. "enum": ["sessionID"]
  15670. },
  15671. "data": {
  15672. "type": "object",
  15673. "properties": {
  15674. "timestamp": {
  15675. "type": "number"
  15676. },
  15677. "sessionID": {
  15678. "type": "string",
  15679. "pattern": "^ses"
  15680. },
  15681. "callID": {
  15682. "type": "string"
  15683. },
  15684. "structured": {
  15685. "type": "object"
  15686. },
  15687. "content": {
  15688. "type": "array",
  15689. "items": {
  15690. "anyOf": [
  15691. {
  15692. "$ref": "#/components/schemas/ToolTextContent"
  15693. },
  15694. {
  15695. "$ref": "#/components/schemas/ToolFileContent"
  15696. }
  15697. ]
  15698. }
  15699. }
  15700. },
  15701. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15702. "additionalProperties": false
  15703. }
  15704. },
  15705. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15706. "additionalProperties": false
  15707. },
  15708. "SyncEventSessionNextToolSuccess": {
  15709. "type": "object",
  15710. "properties": {
  15711. "type": {
  15712. "type": "string",
  15713. "enum": ["sync"]
  15714. },
  15715. "name": {
  15716. "type": "string",
  15717. "enum": ["session.next.tool.success.1"]
  15718. },
  15719. "id": {
  15720. "type": "string"
  15721. },
  15722. "seq": {
  15723. "type": "number"
  15724. },
  15725. "aggregateID": {
  15726. "type": "string",
  15727. "enum": ["sessionID"]
  15728. },
  15729. "data": {
  15730. "type": "object",
  15731. "properties": {
  15732. "timestamp": {
  15733. "type": "number"
  15734. },
  15735. "sessionID": {
  15736. "type": "string",
  15737. "pattern": "^ses"
  15738. },
  15739. "callID": {
  15740. "type": "string"
  15741. },
  15742. "structured": {
  15743. "type": "object"
  15744. },
  15745. "content": {
  15746. "type": "array",
  15747. "items": {
  15748. "anyOf": [
  15749. {
  15750. "$ref": "#/components/schemas/ToolTextContent"
  15751. },
  15752. {
  15753. "$ref": "#/components/schemas/ToolFileContent"
  15754. }
  15755. ]
  15756. }
  15757. },
  15758. "provider": {
  15759. "type": "object",
  15760. "properties": {
  15761. "executed": {
  15762. "type": "boolean"
  15763. },
  15764. "metadata": {
  15765. "type": "object"
  15766. }
  15767. },
  15768. "required": ["executed"],
  15769. "additionalProperties": false
  15770. }
  15771. },
  15772. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15773. "additionalProperties": false
  15774. }
  15775. },
  15776. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15777. "additionalProperties": false
  15778. },
  15779. "SyncEventSessionNextToolFailed": {
  15780. "type": "object",
  15781. "properties": {
  15782. "type": {
  15783. "type": "string",
  15784. "enum": ["sync"]
  15785. },
  15786. "name": {
  15787. "type": "string",
  15788. "enum": ["session.next.tool.failed.1"]
  15789. },
  15790. "id": {
  15791. "type": "string"
  15792. },
  15793. "seq": {
  15794. "type": "number"
  15795. },
  15796. "aggregateID": {
  15797. "type": "string",
  15798. "enum": ["sessionID"]
  15799. },
  15800. "data": {
  15801. "type": "object",
  15802. "properties": {
  15803. "timestamp": {
  15804. "type": "number"
  15805. },
  15806. "sessionID": {
  15807. "type": "string",
  15808. "pattern": "^ses"
  15809. },
  15810. "callID": {
  15811. "type": "string"
  15812. },
  15813. "error": {
  15814. "$ref": "#/components/schemas/SessionErrorUnknown"
  15815. },
  15816. "provider": {
  15817. "type": "object",
  15818. "properties": {
  15819. "executed": {
  15820. "type": "boolean"
  15821. },
  15822. "metadata": {
  15823. "type": "object"
  15824. }
  15825. },
  15826. "required": ["executed"],
  15827. "additionalProperties": false
  15828. }
  15829. },
  15830. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15831. "additionalProperties": false
  15832. }
  15833. },
  15834. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15835. "additionalProperties": false
  15836. },
  15837. "SyncEventSessionNextRetried": {
  15838. "type": "object",
  15839. "properties": {
  15840. "type": {
  15841. "type": "string",
  15842. "enum": ["sync"]
  15843. },
  15844. "name": {
  15845. "type": "string",
  15846. "enum": ["session.next.retried.1"]
  15847. },
  15848. "id": {
  15849. "type": "string"
  15850. },
  15851. "seq": {
  15852. "type": "number"
  15853. },
  15854. "aggregateID": {
  15855. "type": "string",
  15856. "enum": ["sessionID"]
  15857. },
  15858. "data": {
  15859. "type": "object",
  15860. "properties": {
  15861. "timestamp": {
  15862. "type": "number"
  15863. },
  15864. "sessionID": {
  15865. "type": "string",
  15866. "pattern": "^ses"
  15867. },
  15868. "attempt": {
  15869. "type": "number"
  15870. },
  15871. "error": {
  15872. "$ref": "#/components/schemas/SessionNextRetry_error"
  15873. }
  15874. },
  15875. "required": ["timestamp", "sessionID", "attempt", "error"],
  15876. "additionalProperties": false
  15877. }
  15878. },
  15879. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15880. "additionalProperties": false
  15881. },
  15882. "SyncEventSessionNextCompactionStarted": {
  15883. "type": "object",
  15884. "properties": {
  15885. "type": {
  15886. "type": "string",
  15887. "enum": ["sync"]
  15888. },
  15889. "name": {
  15890. "type": "string",
  15891. "enum": ["session.next.compaction.started.1"]
  15892. },
  15893. "id": {
  15894. "type": "string"
  15895. },
  15896. "seq": {
  15897. "type": "number"
  15898. },
  15899. "aggregateID": {
  15900. "type": "string",
  15901. "enum": ["sessionID"]
  15902. },
  15903. "data": {
  15904. "type": "object",
  15905. "properties": {
  15906. "timestamp": {
  15907. "type": "number"
  15908. },
  15909. "sessionID": {
  15910. "type": "string",
  15911. "pattern": "^ses"
  15912. },
  15913. "reason": {
  15914. "type": "string",
  15915. "enum": ["auto", "manual"]
  15916. }
  15917. },
  15918. "required": ["timestamp", "sessionID", "reason"],
  15919. "additionalProperties": false
  15920. }
  15921. },
  15922. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15923. "additionalProperties": false
  15924. },
  15925. "SyncEventSessionNextCompactionDelta": {
  15926. "type": "object",
  15927. "properties": {
  15928. "type": {
  15929. "type": "string",
  15930. "enum": ["sync"]
  15931. },
  15932. "name": {
  15933. "type": "string",
  15934. "enum": ["session.next.compaction.delta.1"]
  15935. },
  15936. "id": {
  15937. "type": "string"
  15938. },
  15939. "seq": {
  15940. "type": "number"
  15941. },
  15942. "aggregateID": {
  15943. "type": "string",
  15944. "enum": ["sessionID"]
  15945. },
  15946. "data": {
  15947. "type": "object",
  15948. "properties": {
  15949. "timestamp": {
  15950. "type": "number"
  15951. },
  15952. "sessionID": {
  15953. "type": "string",
  15954. "pattern": "^ses"
  15955. },
  15956. "text": {
  15957. "type": "string"
  15958. }
  15959. },
  15960. "required": ["timestamp", "sessionID", "text"],
  15961. "additionalProperties": false
  15962. }
  15963. },
  15964. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15965. "additionalProperties": false
  15966. },
  15967. "SyncEventSessionNextCompactionEnded": {
  15968. "type": "object",
  15969. "properties": {
  15970. "type": {
  15971. "type": "string",
  15972. "enum": ["sync"]
  15973. },
  15974. "name": {
  15975. "type": "string",
  15976. "enum": ["session.next.compaction.ended.1"]
  15977. },
  15978. "id": {
  15979. "type": "string"
  15980. },
  15981. "seq": {
  15982. "type": "number"
  15983. },
  15984. "aggregateID": {
  15985. "type": "string",
  15986. "enum": ["sessionID"]
  15987. },
  15988. "data": {
  15989. "type": "object",
  15990. "properties": {
  15991. "timestamp": {
  15992. "type": "number"
  15993. },
  15994. "sessionID": {
  15995. "type": "string",
  15996. "pattern": "^ses"
  15997. },
  15998. "text": {
  15999. "type": "string"
  16000. },
  16001. "include": {
  16002. "type": "string"
  16003. }
  16004. },
  16005. "required": ["timestamp", "sessionID", "text"],
  16006. "additionalProperties": false
  16007. }
  16008. },
  16009. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16010. "additionalProperties": false
  16011. },
  16012. "EventServerInstanceDisposed": {
  16013. "type": "object",
  16014. "properties": {
  16015. "id": {
  16016. "type": "string"
  16017. },
  16018. "type": {
  16019. "type": "string",
  16020. "enum": ["server.instance.disposed"]
  16021. },
  16022. "properties": {
  16023. "type": "object",
  16024. "properties": {
  16025. "directory": {
  16026. "type": "string"
  16027. }
  16028. },
  16029. "required": ["directory"],
  16030. "additionalProperties": false
  16031. }
  16032. },
  16033. "required": ["id", "type", "properties"],
  16034. "additionalProperties": false
  16035. },
  16036. "EventFileEdited": {
  16037. "type": "object",
  16038. "properties": {
  16039. "id": {
  16040. "type": "string"
  16041. },
  16042. "type": {
  16043. "type": "string",
  16044. "enum": ["file.edited"]
  16045. },
  16046. "properties": {
  16047. "type": "object",
  16048. "properties": {
  16049. "file": {
  16050. "type": "string"
  16051. }
  16052. },
  16053. "required": ["file"],
  16054. "additionalProperties": false
  16055. }
  16056. },
  16057. "required": ["id", "type", "properties"],
  16058. "additionalProperties": false
  16059. },
  16060. "EventFileWatcherUpdated": {
  16061. "type": "object",
  16062. "properties": {
  16063. "id": {
  16064. "type": "string"
  16065. },
  16066. "type": {
  16067. "type": "string",
  16068. "enum": ["file.watcher.updated"]
  16069. },
  16070. "properties": {
  16071. "type": "object",
  16072. "properties": {
  16073. "file": {
  16074. "type": "string"
  16075. },
  16076. "event": {
  16077. "type": "string",
  16078. "enum": ["add", "change", "unlink"]
  16079. }
  16080. },
  16081. "required": ["file", "event"],
  16082. "additionalProperties": false
  16083. }
  16084. },
  16085. "required": ["id", "type", "properties"],
  16086. "additionalProperties": false
  16087. },
  16088. "EventLspClientDiagnostics": {
  16089. "type": "object",
  16090. "properties": {
  16091. "id": {
  16092. "type": "string"
  16093. },
  16094. "type": {
  16095. "type": "string",
  16096. "enum": ["lsp.client.diagnostics"]
  16097. },
  16098. "properties": {
  16099. "type": "object",
  16100. "properties": {
  16101. "serverID": {
  16102. "type": "string"
  16103. },
  16104. "path": {
  16105. "type": "string"
  16106. }
  16107. },
  16108. "required": ["serverID", "path"],
  16109. "additionalProperties": false
  16110. }
  16111. },
  16112. "required": ["id", "type", "properties"],
  16113. "additionalProperties": false
  16114. },
  16115. "EventLspUpdated": {
  16116. "type": "object",
  16117. "properties": {
  16118. "id": {
  16119. "type": "string"
  16120. },
  16121. "type": {
  16122. "type": "string",
  16123. "enum": ["lsp.updated"]
  16124. },
  16125. "properties": {
  16126. "type": "object",
  16127. "properties": {}
  16128. }
  16129. },
  16130. "required": ["id", "type", "properties"],
  16131. "additionalProperties": false
  16132. },
  16133. "EventMessagePartDelta": {
  16134. "type": "object",
  16135. "properties": {
  16136. "id": {
  16137. "type": "string"
  16138. },
  16139. "type": {
  16140. "type": "string",
  16141. "enum": ["message.part.delta"]
  16142. },
  16143. "properties": {
  16144. "type": "object",
  16145. "properties": {
  16146. "sessionID": {
  16147. "type": "string",
  16148. "pattern": "^ses"
  16149. },
  16150. "messageID": {
  16151. "type": "string",
  16152. "pattern": "^msg"
  16153. },
  16154. "partID": {
  16155. "type": "string",
  16156. "pattern": "^prt"
  16157. },
  16158. "field": {
  16159. "type": "string"
  16160. },
  16161. "delta": {
  16162. "type": "string"
  16163. }
  16164. },
  16165. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16166. "additionalProperties": false
  16167. }
  16168. },
  16169. "required": ["id", "type", "properties"],
  16170. "additionalProperties": false
  16171. },
  16172. "EventPermissionAsked": {
  16173. "type": "object",
  16174. "properties": {
  16175. "id": {
  16176. "type": "string"
  16177. },
  16178. "type": {
  16179. "type": "string",
  16180. "enum": ["permission.asked"]
  16181. },
  16182. "properties": {
  16183. "$ref": "#/components/schemas/PermissionRequest"
  16184. }
  16185. },
  16186. "required": ["id", "type", "properties"],
  16187. "additionalProperties": false
  16188. },
  16189. "EventPermissionReplied": {
  16190. "type": "object",
  16191. "properties": {
  16192. "id": {
  16193. "type": "string"
  16194. },
  16195. "type": {
  16196. "type": "string",
  16197. "enum": ["permission.replied"]
  16198. },
  16199. "properties": {
  16200. "type": "object",
  16201. "properties": {
  16202. "sessionID": {
  16203. "type": "string",
  16204. "pattern": "^ses"
  16205. },
  16206. "requestID": {
  16207. "type": "string",
  16208. "pattern": "^per"
  16209. },
  16210. "reply": {
  16211. "type": "string",
  16212. "enum": ["once", "always", "reject"]
  16213. }
  16214. },
  16215. "required": ["sessionID", "requestID", "reply"],
  16216. "additionalProperties": false
  16217. }
  16218. },
  16219. "required": ["id", "type", "properties"],
  16220. "additionalProperties": false
  16221. },
  16222. "EventSessionDiff": {
  16223. "type": "object",
  16224. "properties": {
  16225. "id": {
  16226. "type": "string"
  16227. },
  16228. "type": {
  16229. "type": "string",
  16230. "enum": ["session.diff"]
  16231. },
  16232. "properties": {
  16233. "type": "object",
  16234. "properties": {
  16235. "sessionID": {
  16236. "type": "string",
  16237. "pattern": "^ses"
  16238. },
  16239. "diff": {
  16240. "type": "array",
  16241. "items": {
  16242. "$ref": "#/components/schemas/SnapshotFileDiff"
  16243. }
  16244. }
  16245. },
  16246. "required": ["sessionID", "diff"],
  16247. "additionalProperties": false
  16248. }
  16249. },
  16250. "required": ["id", "type", "properties"],
  16251. "additionalProperties": false
  16252. },
  16253. "EventSessionError": {
  16254. "type": "object",
  16255. "properties": {
  16256. "id": {
  16257. "type": "string"
  16258. },
  16259. "type": {
  16260. "type": "string",
  16261. "enum": ["session.error"]
  16262. },
  16263. "properties": {
  16264. "type": "object",
  16265. "properties": {
  16266. "sessionID": {
  16267. "type": "string",
  16268. "pattern": "^ses"
  16269. },
  16270. "error": {
  16271. "anyOf": [
  16272. {
  16273. "$ref": "#/components/schemas/ProviderAuthError"
  16274. },
  16275. {
  16276. "$ref": "#/components/schemas/UnknownError"
  16277. },
  16278. {
  16279. "$ref": "#/components/schemas/MessageOutputLengthError"
  16280. },
  16281. {
  16282. "$ref": "#/components/schemas/MessageAbortedError"
  16283. },
  16284. {
  16285. "$ref": "#/components/schemas/StructuredOutputError"
  16286. },
  16287. {
  16288. "$ref": "#/components/schemas/ContextOverflowError"
  16289. },
  16290. {
  16291. "$ref": "#/components/schemas/APIError"
  16292. }
  16293. ]
  16294. }
  16295. },
  16296. "additionalProperties": false
  16297. }
  16298. },
  16299. "required": ["id", "type", "properties"],
  16300. "additionalProperties": false
  16301. },
  16302. "EventInstallationUpdated": {
  16303. "type": "object",
  16304. "properties": {
  16305. "id": {
  16306. "type": "string"
  16307. },
  16308. "type": {
  16309. "type": "string",
  16310. "enum": ["installation.updated"]
  16311. },
  16312. "properties": {
  16313. "type": "object",
  16314. "properties": {
  16315. "version": {
  16316. "type": "string"
  16317. }
  16318. },
  16319. "required": ["version"],
  16320. "additionalProperties": false
  16321. }
  16322. },
  16323. "required": ["id", "type", "properties"],
  16324. "additionalProperties": false
  16325. },
  16326. "EventInstallationUpdate-available": {
  16327. "type": "object",
  16328. "properties": {
  16329. "id": {
  16330. "type": "string"
  16331. },
  16332. "type": {
  16333. "type": "string",
  16334. "enum": ["installation.update-available"]
  16335. },
  16336. "properties": {
  16337. "type": "object",
  16338. "properties": {
  16339. "version": {
  16340. "type": "string"
  16341. }
  16342. },
  16343. "required": ["version"],
  16344. "additionalProperties": false
  16345. }
  16346. },
  16347. "required": ["id", "type", "properties"],
  16348. "additionalProperties": false
  16349. },
  16350. "EventQuestionAsked": {
  16351. "type": "object",
  16352. "properties": {
  16353. "id": {
  16354. "type": "string"
  16355. },
  16356. "type": {
  16357. "type": "string",
  16358. "enum": ["question.asked"]
  16359. },
  16360. "properties": {
  16361. "$ref": "#/components/schemas/QuestionRequest"
  16362. }
  16363. },
  16364. "required": ["id", "type", "properties"],
  16365. "additionalProperties": false
  16366. },
  16367. "EventQuestionReplied": {
  16368. "type": "object",
  16369. "properties": {
  16370. "id": {
  16371. "type": "string"
  16372. },
  16373. "type": {
  16374. "type": "string",
  16375. "enum": ["question.replied"]
  16376. },
  16377. "properties": {
  16378. "$ref": "#/components/schemas/QuestionReplied"
  16379. }
  16380. },
  16381. "required": ["id", "type", "properties"],
  16382. "additionalProperties": false
  16383. },
  16384. "EventQuestionRejected": {
  16385. "type": "object",
  16386. "properties": {
  16387. "id": {
  16388. "type": "string"
  16389. },
  16390. "type": {
  16391. "type": "string",
  16392. "enum": ["question.rejected"]
  16393. },
  16394. "properties": {
  16395. "$ref": "#/components/schemas/QuestionRejected"
  16396. }
  16397. },
  16398. "required": ["id", "type", "properties"],
  16399. "additionalProperties": false
  16400. },
  16401. "EventTodoUpdated": {
  16402. "type": "object",
  16403. "properties": {
  16404. "id": {
  16405. "type": "string"
  16406. },
  16407. "type": {
  16408. "type": "string",
  16409. "enum": ["todo.updated"]
  16410. },
  16411. "properties": {
  16412. "type": "object",
  16413. "properties": {
  16414. "sessionID": {
  16415. "type": "string",
  16416. "pattern": "^ses"
  16417. },
  16418. "todos": {
  16419. "type": "array",
  16420. "items": {
  16421. "$ref": "#/components/schemas/Todo"
  16422. }
  16423. }
  16424. },
  16425. "required": ["sessionID", "todos"],
  16426. "additionalProperties": false
  16427. }
  16428. },
  16429. "required": ["id", "type", "properties"],
  16430. "additionalProperties": false
  16431. },
  16432. "EventSessionStatus": {
  16433. "type": "object",
  16434. "properties": {
  16435. "id": {
  16436. "type": "string"
  16437. },
  16438. "type": {
  16439. "type": "string",
  16440. "enum": ["session.status"]
  16441. },
  16442. "properties": {
  16443. "type": "object",
  16444. "properties": {
  16445. "sessionID": {
  16446. "type": "string",
  16447. "pattern": "^ses"
  16448. },
  16449. "status": {
  16450. "$ref": "#/components/schemas/SessionStatus"
  16451. }
  16452. },
  16453. "required": ["sessionID", "status"],
  16454. "additionalProperties": false
  16455. }
  16456. },
  16457. "required": ["id", "type", "properties"],
  16458. "additionalProperties": false
  16459. },
  16460. "EventSessionIdle": {
  16461. "type": "object",
  16462. "properties": {
  16463. "id": {
  16464. "type": "string"
  16465. },
  16466. "type": {
  16467. "type": "string",
  16468. "enum": ["session.idle"]
  16469. },
  16470. "properties": {
  16471. "type": "object",
  16472. "properties": {
  16473. "sessionID": {
  16474. "type": "string",
  16475. "pattern": "^ses"
  16476. }
  16477. },
  16478. "required": ["sessionID"],
  16479. "additionalProperties": false
  16480. }
  16481. },
  16482. "required": ["id", "type", "properties"],
  16483. "additionalProperties": false
  16484. },
  16485. "EventSessionCompacted": {
  16486. "type": "object",
  16487. "properties": {
  16488. "id": {
  16489. "type": "string"
  16490. },
  16491. "type": {
  16492. "type": "string",
  16493. "enum": ["session.compacted"]
  16494. },
  16495. "properties": {
  16496. "type": "object",
  16497. "properties": {
  16498. "sessionID": {
  16499. "type": "string",
  16500. "pattern": "^ses"
  16501. }
  16502. },
  16503. "required": ["sessionID"],
  16504. "additionalProperties": false
  16505. }
  16506. },
  16507. "required": ["id", "type", "properties"],
  16508. "additionalProperties": false
  16509. },
  16510. "EventMcpToolsChanged": {
  16511. "type": "object",
  16512. "properties": {
  16513. "id": {
  16514. "type": "string"
  16515. },
  16516. "type": {
  16517. "type": "string",
  16518. "enum": ["mcp.tools.changed"]
  16519. },
  16520. "properties": {
  16521. "type": "object",
  16522. "properties": {
  16523. "server": {
  16524. "type": "string"
  16525. }
  16526. },
  16527. "required": ["server"],
  16528. "additionalProperties": false
  16529. }
  16530. },
  16531. "required": ["id", "type", "properties"],
  16532. "additionalProperties": false
  16533. },
  16534. "EventMcpBrowserOpenFailed": {
  16535. "type": "object",
  16536. "properties": {
  16537. "id": {
  16538. "type": "string"
  16539. },
  16540. "type": {
  16541. "type": "string",
  16542. "enum": ["mcp.browser.open.failed"]
  16543. },
  16544. "properties": {
  16545. "type": "object",
  16546. "properties": {
  16547. "mcpName": {
  16548. "type": "string"
  16549. },
  16550. "url": {
  16551. "type": "string"
  16552. }
  16553. },
  16554. "required": ["mcpName", "url"],
  16555. "additionalProperties": false
  16556. }
  16557. },
  16558. "required": ["id", "type", "properties"],
  16559. "additionalProperties": false
  16560. },
  16561. "EventCommandExecuted": {
  16562. "type": "object",
  16563. "properties": {
  16564. "id": {
  16565. "type": "string"
  16566. },
  16567. "type": {
  16568. "type": "string",
  16569. "enum": ["command.executed"]
  16570. },
  16571. "properties": {
  16572. "type": "object",
  16573. "properties": {
  16574. "name": {
  16575. "type": "string"
  16576. },
  16577. "sessionID": {
  16578. "type": "string",
  16579. "pattern": "^ses"
  16580. },
  16581. "arguments": {
  16582. "type": "string"
  16583. },
  16584. "messageID": {
  16585. "type": "string",
  16586. "pattern": "^msg"
  16587. }
  16588. },
  16589. "required": ["name", "sessionID", "arguments", "messageID"],
  16590. "additionalProperties": false
  16591. }
  16592. },
  16593. "required": ["id", "type", "properties"],
  16594. "additionalProperties": false
  16595. },
  16596. "EventProjectUpdated": {
  16597. "type": "object",
  16598. "properties": {
  16599. "id": {
  16600. "type": "string"
  16601. },
  16602. "type": {
  16603. "type": "string",
  16604. "enum": ["project.updated"]
  16605. },
  16606. "properties": {
  16607. "$ref": "#/components/schemas/Project"
  16608. }
  16609. },
  16610. "required": ["id", "type", "properties"],
  16611. "additionalProperties": false
  16612. },
  16613. "EventVcsBranchUpdated": {
  16614. "type": "object",
  16615. "properties": {
  16616. "id": {
  16617. "type": "string"
  16618. },
  16619. "type": {
  16620. "type": "string",
  16621. "enum": ["vcs.branch.updated"]
  16622. },
  16623. "properties": {
  16624. "type": "object",
  16625. "properties": {
  16626. "branch": {
  16627. "type": "string"
  16628. }
  16629. },
  16630. "additionalProperties": false
  16631. }
  16632. },
  16633. "required": ["id", "type", "properties"],
  16634. "additionalProperties": false
  16635. },
  16636. "EventWorkspaceReady": {
  16637. "type": "object",
  16638. "properties": {
  16639. "id": {
  16640. "type": "string"
  16641. },
  16642. "type": {
  16643. "type": "string",
  16644. "enum": ["workspace.ready"]
  16645. },
  16646. "properties": {
  16647. "type": "object",
  16648. "properties": {
  16649. "name": {
  16650. "type": "string"
  16651. }
  16652. },
  16653. "required": ["name"],
  16654. "additionalProperties": false
  16655. }
  16656. },
  16657. "required": ["id", "type", "properties"],
  16658. "additionalProperties": false
  16659. },
  16660. "EventWorkspaceFailed": {
  16661. "type": "object",
  16662. "properties": {
  16663. "id": {
  16664. "type": "string"
  16665. },
  16666. "type": {
  16667. "type": "string",
  16668. "enum": ["workspace.failed"]
  16669. },
  16670. "properties": {
  16671. "type": "object",
  16672. "properties": {
  16673. "message": {
  16674. "type": "string"
  16675. }
  16676. },
  16677. "required": ["message"],
  16678. "additionalProperties": false
  16679. }
  16680. },
  16681. "required": ["id", "type", "properties"],
  16682. "additionalProperties": false
  16683. },
  16684. "EventWorkspaceStatus": {
  16685. "type": "object",
  16686. "properties": {
  16687. "id": {
  16688. "type": "string"
  16689. },
  16690. "type": {
  16691. "type": "string",
  16692. "enum": ["workspace.status"]
  16693. },
  16694. "properties": {
  16695. "type": "object",
  16696. "properties": {
  16697. "workspaceID": {
  16698. "type": "string",
  16699. "pattern": "^wrk"
  16700. },
  16701. "status": {
  16702. "type": "string",
  16703. "enum": ["connected", "connecting", "disconnected", "error"]
  16704. }
  16705. },
  16706. "required": ["workspaceID", "status"],
  16707. "additionalProperties": false
  16708. }
  16709. },
  16710. "required": ["id", "type", "properties"],
  16711. "additionalProperties": false
  16712. },
  16713. "EventWorktreeReady": {
  16714. "type": "object",
  16715. "properties": {
  16716. "id": {
  16717. "type": "string"
  16718. },
  16719. "type": {
  16720. "type": "string",
  16721. "enum": ["worktree.ready"]
  16722. },
  16723. "properties": {
  16724. "type": "object",
  16725. "properties": {
  16726. "name": {
  16727. "type": "string"
  16728. },
  16729. "branch": {
  16730. "type": "string"
  16731. }
  16732. },
  16733. "required": ["name"],
  16734. "additionalProperties": false
  16735. }
  16736. },
  16737. "required": ["id", "type", "properties"],
  16738. "additionalProperties": false
  16739. },
  16740. "EventWorktreeFailed": {
  16741. "type": "object",
  16742. "properties": {
  16743. "id": {
  16744. "type": "string"
  16745. },
  16746. "type": {
  16747. "type": "string",
  16748. "enum": ["worktree.failed"]
  16749. },
  16750. "properties": {
  16751. "type": "object",
  16752. "properties": {
  16753. "message": {
  16754. "type": "string"
  16755. }
  16756. },
  16757. "required": ["message"],
  16758. "additionalProperties": false
  16759. }
  16760. },
  16761. "required": ["id", "type", "properties"],
  16762. "additionalProperties": false
  16763. },
  16764. "EventPtyCreated": {
  16765. "type": "object",
  16766. "properties": {
  16767. "id": {
  16768. "type": "string"
  16769. },
  16770. "type": {
  16771. "type": "string",
  16772. "enum": ["pty.created"]
  16773. },
  16774. "properties": {
  16775. "type": "object",
  16776. "properties": {
  16777. "info": {
  16778. "$ref": "#/components/schemas/Pty"
  16779. }
  16780. },
  16781. "required": ["info"],
  16782. "additionalProperties": false
  16783. }
  16784. },
  16785. "required": ["id", "type", "properties"],
  16786. "additionalProperties": false
  16787. },
  16788. "EventPtyUpdated": {
  16789. "type": "object",
  16790. "properties": {
  16791. "id": {
  16792. "type": "string"
  16793. },
  16794. "type": {
  16795. "type": "string",
  16796. "enum": ["pty.updated"]
  16797. },
  16798. "properties": {
  16799. "type": "object",
  16800. "properties": {
  16801. "info": {
  16802. "$ref": "#/components/schemas/Pty"
  16803. }
  16804. },
  16805. "required": ["info"],
  16806. "additionalProperties": false
  16807. }
  16808. },
  16809. "required": ["id", "type", "properties"],
  16810. "additionalProperties": false
  16811. },
  16812. "EventPtyExited": {
  16813. "type": "object",
  16814. "properties": {
  16815. "id": {
  16816. "type": "string"
  16817. },
  16818. "type": {
  16819. "type": "string",
  16820. "enum": ["pty.exited"]
  16821. },
  16822. "properties": {
  16823. "type": "object",
  16824. "properties": {
  16825. "id": {
  16826. "type": "string",
  16827. "pattern": "^pty"
  16828. },
  16829. "exitCode": {
  16830. "type": "integer",
  16831. "minimum": 0
  16832. }
  16833. },
  16834. "required": ["id", "exitCode"],
  16835. "additionalProperties": false
  16836. }
  16837. },
  16838. "required": ["id", "type", "properties"],
  16839. "additionalProperties": false
  16840. },
  16841. "EventPtyDeleted": {
  16842. "type": "object",
  16843. "properties": {
  16844. "id": {
  16845. "type": "string"
  16846. },
  16847. "type": {
  16848. "type": "string",
  16849. "enum": ["pty.deleted"]
  16850. },
  16851. "properties": {
  16852. "type": "object",
  16853. "properties": {
  16854. "id": {
  16855. "type": "string",
  16856. "pattern": "^pty"
  16857. }
  16858. },
  16859. "required": ["id"],
  16860. "additionalProperties": false
  16861. }
  16862. },
  16863. "required": ["id", "type", "properties"],
  16864. "additionalProperties": false
  16865. },
  16866. "EventMessageUpdated": {
  16867. "type": "object",
  16868. "properties": {
  16869. "id": {
  16870. "type": "string"
  16871. },
  16872. "type": {
  16873. "type": "string",
  16874. "enum": ["message.updated"]
  16875. },
  16876. "properties": {
  16877. "type": "object",
  16878. "properties": {
  16879. "sessionID": {
  16880. "type": "string",
  16881. "pattern": "^ses"
  16882. },
  16883. "info": {
  16884. "$ref": "#/components/schemas/Message"
  16885. }
  16886. },
  16887. "required": ["sessionID", "info"],
  16888. "additionalProperties": false
  16889. }
  16890. },
  16891. "required": ["id", "type", "properties"],
  16892. "additionalProperties": false
  16893. },
  16894. "EventMessageRemoved": {
  16895. "type": "object",
  16896. "properties": {
  16897. "id": {
  16898. "type": "string"
  16899. },
  16900. "type": {
  16901. "type": "string",
  16902. "enum": ["message.removed"]
  16903. },
  16904. "properties": {
  16905. "type": "object",
  16906. "properties": {
  16907. "sessionID": {
  16908. "type": "string",
  16909. "pattern": "^ses"
  16910. },
  16911. "messageID": {
  16912. "type": "string",
  16913. "pattern": "^msg"
  16914. }
  16915. },
  16916. "required": ["sessionID", "messageID"],
  16917. "additionalProperties": false
  16918. }
  16919. },
  16920. "required": ["id", "type", "properties"],
  16921. "additionalProperties": false
  16922. },
  16923. "EventMessagePartUpdated": {
  16924. "type": "object",
  16925. "properties": {
  16926. "id": {
  16927. "type": "string"
  16928. },
  16929. "type": {
  16930. "type": "string",
  16931. "enum": ["message.part.updated"]
  16932. },
  16933. "properties": {
  16934. "type": "object",
  16935. "properties": {
  16936. "sessionID": {
  16937. "type": "string",
  16938. "pattern": "^ses"
  16939. },
  16940. "part": {
  16941. "$ref": "#/components/schemas/Part"
  16942. },
  16943. "time": {
  16944. "type": "integer",
  16945. "minimum": 0
  16946. }
  16947. },
  16948. "required": ["sessionID", "part", "time"],
  16949. "additionalProperties": false
  16950. }
  16951. },
  16952. "required": ["id", "type", "properties"],
  16953. "additionalProperties": false
  16954. },
  16955. "EventMessagePartRemoved": {
  16956. "type": "object",
  16957. "properties": {
  16958. "id": {
  16959. "type": "string"
  16960. },
  16961. "type": {
  16962. "type": "string",
  16963. "enum": ["message.part.removed"]
  16964. },
  16965. "properties": {
  16966. "type": "object",
  16967. "properties": {
  16968. "sessionID": {
  16969. "type": "string",
  16970. "pattern": "^ses"
  16971. },
  16972. "messageID": {
  16973. "type": "string",
  16974. "pattern": "^msg"
  16975. },
  16976. "partID": {
  16977. "type": "string",
  16978. "pattern": "^prt"
  16979. }
  16980. },
  16981. "required": ["sessionID", "messageID", "partID"],
  16982. "additionalProperties": false
  16983. }
  16984. },
  16985. "required": ["id", "type", "properties"],
  16986. "additionalProperties": false
  16987. },
  16988. "EventSessionCreated": {
  16989. "type": "object",
  16990. "properties": {
  16991. "id": {
  16992. "type": "string"
  16993. },
  16994. "type": {
  16995. "type": "string",
  16996. "enum": ["session.created"]
  16997. },
  16998. "properties": {
  16999. "type": "object",
  17000. "properties": {
  17001. "sessionID": {
  17002. "type": "string",
  17003. "pattern": "^ses"
  17004. },
  17005. "info": {
  17006. "$ref": "#/components/schemas/Session"
  17007. }
  17008. },
  17009. "required": ["sessionID", "info"],
  17010. "additionalProperties": false
  17011. }
  17012. },
  17013. "required": ["id", "type", "properties"],
  17014. "additionalProperties": false
  17015. },
  17016. "EventSessionUpdated": {
  17017. "type": "object",
  17018. "properties": {
  17019. "id": {
  17020. "type": "string"
  17021. },
  17022. "type": {
  17023. "type": "string",
  17024. "enum": ["session.updated"]
  17025. },
  17026. "properties": {
  17027. "type": "object",
  17028. "properties": {
  17029. "sessionID": {
  17030. "type": "string",
  17031. "pattern": "^ses"
  17032. },
  17033. "info": {
  17034. "$ref": "#/components/schemas/Session"
  17035. }
  17036. },
  17037. "required": ["sessionID", "info"],
  17038. "additionalProperties": false
  17039. }
  17040. },
  17041. "required": ["id", "type", "properties"],
  17042. "additionalProperties": false
  17043. },
  17044. "EventSessionDeleted": {
  17045. "type": "object",
  17046. "properties": {
  17047. "id": {
  17048. "type": "string"
  17049. },
  17050. "type": {
  17051. "type": "string",
  17052. "enum": ["session.deleted"]
  17053. },
  17054. "properties": {
  17055. "type": "object",
  17056. "properties": {
  17057. "sessionID": {
  17058. "type": "string",
  17059. "pattern": "^ses"
  17060. },
  17061. "info": {
  17062. "$ref": "#/components/schemas/Session"
  17063. }
  17064. },
  17065. "required": ["sessionID", "info"],
  17066. "additionalProperties": false
  17067. }
  17068. },
  17069. "required": ["id", "type", "properties"],
  17070. "additionalProperties": false
  17071. },
  17072. "EventSessionNextAgentSwitched": {
  17073. "type": "object",
  17074. "properties": {
  17075. "id": {
  17076. "type": "string"
  17077. },
  17078. "type": {
  17079. "type": "string",
  17080. "enum": ["session.next.agent.switched"]
  17081. },
  17082. "properties": {
  17083. "type": "object",
  17084. "properties": {
  17085. "timestamp": {
  17086. "type": "number"
  17087. },
  17088. "sessionID": {
  17089. "type": "string",
  17090. "pattern": "^ses"
  17091. },
  17092. "agent": {
  17093. "type": "string"
  17094. }
  17095. },
  17096. "required": ["timestamp", "sessionID", "agent"],
  17097. "additionalProperties": false
  17098. }
  17099. },
  17100. "required": ["id", "type", "properties"],
  17101. "additionalProperties": false
  17102. },
  17103. "EventSessionNextModelSwitched": {
  17104. "type": "object",
  17105. "properties": {
  17106. "id": {
  17107. "type": "string"
  17108. },
  17109. "type": {
  17110. "type": "string",
  17111. "enum": ["session.next.model.switched"]
  17112. },
  17113. "properties": {
  17114. "type": "object",
  17115. "properties": {
  17116. "timestamp": {
  17117. "type": "number"
  17118. },
  17119. "sessionID": {
  17120. "type": "string",
  17121. "pattern": "^ses"
  17122. },
  17123. "model": {
  17124. "type": "object",
  17125. "properties": {
  17126. "id": {
  17127. "type": "string"
  17128. },
  17129. "providerID": {
  17130. "type": "string"
  17131. },
  17132. "variant": {
  17133. "type": "string"
  17134. }
  17135. },
  17136. "required": ["id", "providerID", "variant"],
  17137. "additionalProperties": false
  17138. }
  17139. },
  17140. "required": ["timestamp", "sessionID", "model"],
  17141. "additionalProperties": false
  17142. }
  17143. },
  17144. "required": ["id", "type", "properties"],
  17145. "additionalProperties": false
  17146. },
  17147. "PromptSource": {
  17148. "type": "object",
  17149. "properties": {
  17150. "start": {
  17151. "type": "number"
  17152. },
  17153. "end": {
  17154. "type": "number"
  17155. },
  17156. "text": {
  17157. "type": "string"
  17158. }
  17159. },
  17160. "required": ["start", "end", "text"],
  17161. "additionalProperties": false
  17162. },
  17163. "PromptFileAttachment": {
  17164. "type": "object",
  17165. "properties": {
  17166. "uri": {
  17167. "type": "string"
  17168. },
  17169. "mime": {
  17170. "type": "string"
  17171. },
  17172. "name": {
  17173. "type": "string"
  17174. },
  17175. "description": {
  17176. "type": "string"
  17177. },
  17178. "source": {
  17179. "$ref": "#/components/schemas/PromptSource"
  17180. }
  17181. },
  17182. "required": ["uri", "mime"],
  17183. "additionalProperties": false
  17184. },
  17185. "PromptAgentAttachment": {
  17186. "type": "object",
  17187. "properties": {
  17188. "name": {
  17189. "type": "string"
  17190. },
  17191. "source": {
  17192. "$ref": "#/components/schemas/PromptSource"
  17193. }
  17194. },
  17195. "required": ["name"],
  17196. "additionalProperties": false
  17197. },
  17198. "PromptReferenceAttachment": {
  17199. "type": "object",
  17200. "properties": {
  17201. "name": {
  17202. "type": "string"
  17203. },
  17204. "kind": {
  17205. "type": "string",
  17206. "enum": ["local", "git", "invalid"]
  17207. },
  17208. "uri": {
  17209. "type": "string"
  17210. },
  17211. "repository": {
  17212. "type": "string"
  17213. },
  17214. "branch": {
  17215. "type": "string"
  17216. },
  17217. "target": {
  17218. "type": "string"
  17219. },
  17220. "targetUri": {
  17221. "type": "string"
  17222. },
  17223. "problem": {
  17224. "type": "string"
  17225. },
  17226. "source": {
  17227. "$ref": "#/components/schemas/PromptSource"
  17228. }
  17229. },
  17230. "required": ["name", "kind"],
  17231. "additionalProperties": false
  17232. },
  17233. "EventSessionNextPrompted": {
  17234. "type": "object",
  17235. "properties": {
  17236. "id": {
  17237. "type": "string"
  17238. },
  17239. "type": {
  17240. "type": "string",
  17241. "enum": ["session.next.prompted"]
  17242. },
  17243. "properties": {
  17244. "type": "object",
  17245. "properties": {
  17246. "timestamp": {
  17247. "type": "number"
  17248. },
  17249. "sessionID": {
  17250. "type": "string",
  17251. "pattern": "^ses"
  17252. },
  17253. "prompt": {
  17254. "$ref": "#/components/schemas/Prompt"
  17255. }
  17256. },
  17257. "required": ["timestamp", "sessionID", "prompt"],
  17258. "additionalProperties": false
  17259. }
  17260. },
  17261. "required": ["id", "type", "properties"],
  17262. "additionalProperties": false
  17263. },
  17264. "EventSessionNextSynthetic": {
  17265. "type": "object",
  17266. "properties": {
  17267. "id": {
  17268. "type": "string"
  17269. },
  17270. "type": {
  17271. "type": "string",
  17272. "enum": ["session.next.synthetic"]
  17273. },
  17274. "properties": {
  17275. "type": "object",
  17276. "properties": {
  17277. "timestamp": {
  17278. "type": "number"
  17279. },
  17280. "sessionID": {
  17281. "type": "string",
  17282. "pattern": "^ses"
  17283. },
  17284. "text": {
  17285. "type": "string"
  17286. }
  17287. },
  17288. "required": ["timestamp", "sessionID", "text"],
  17289. "additionalProperties": false
  17290. }
  17291. },
  17292. "required": ["id", "type", "properties"],
  17293. "additionalProperties": false
  17294. },
  17295. "EventSessionNextShellStarted": {
  17296. "type": "object",
  17297. "properties": {
  17298. "id": {
  17299. "type": "string"
  17300. },
  17301. "type": {
  17302. "type": "string",
  17303. "enum": ["session.next.shell.started"]
  17304. },
  17305. "properties": {
  17306. "type": "object",
  17307. "properties": {
  17308. "timestamp": {
  17309. "type": "number"
  17310. },
  17311. "sessionID": {
  17312. "type": "string",
  17313. "pattern": "^ses"
  17314. },
  17315. "callID": {
  17316. "type": "string"
  17317. },
  17318. "command": {
  17319. "type": "string"
  17320. }
  17321. },
  17322. "required": ["timestamp", "sessionID", "callID", "command"],
  17323. "additionalProperties": false
  17324. }
  17325. },
  17326. "required": ["id", "type", "properties"],
  17327. "additionalProperties": false
  17328. },
  17329. "EventSessionNextShellEnded": {
  17330. "type": "object",
  17331. "properties": {
  17332. "id": {
  17333. "type": "string"
  17334. },
  17335. "type": {
  17336. "type": "string",
  17337. "enum": ["session.next.shell.ended"]
  17338. },
  17339. "properties": {
  17340. "type": "object",
  17341. "properties": {
  17342. "timestamp": {
  17343. "type": "number"
  17344. },
  17345. "sessionID": {
  17346. "type": "string",
  17347. "pattern": "^ses"
  17348. },
  17349. "callID": {
  17350. "type": "string"
  17351. },
  17352. "output": {
  17353. "type": "string"
  17354. }
  17355. },
  17356. "required": ["timestamp", "sessionID", "callID", "output"],
  17357. "additionalProperties": false
  17358. }
  17359. },
  17360. "required": ["id", "type", "properties"],
  17361. "additionalProperties": false
  17362. },
  17363. "EventSessionNextStepStarted": {
  17364. "type": "object",
  17365. "properties": {
  17366. "id": {
  17367. "type": "string"
  17368. },
  17369. "type": {
  17370. "type": "string",
  17371. "enum": ["session.next.step.started"]
  17372. },
  17373. "properties": {
  17374. "type": "object",
  17375. "properties": {
  17376. "timestamp": {
  17377. "type": "number"
  17378. },
  17379. "sessionID": {
  17380. "type": "string",
  17381. "pattern": "^ses"
  17382. },
  17383. "agent": {
  17384. "type": "string"
  17385. },
  17386. "model": {
  17387. "type": "object",
  17388. "properties": {
  17389. "id": {
  17390. "type": "string"
  17391. },
  17392. "providerID": {
  17393. "type": "string"
  17394. },
  17395. "variant": {
  17396. "type": "string"
  17397. }
  17398. },
  17399. "required": ["id", "providerID", "variant"],
  17400. "additionalProperties": false
  17401. },
  17402. "snapshot": {
  17403. "type": "string"
  17404. }
  17405. },
  17406. "required": ["timestamp", "sessionID", "agent", "model"],
  17407. "additionalProperties": false
  17408. }
  17409. },
  17410. "required": ["id", "type", "properties"],
  17411. "additionalProperties": false
  17412. },
  17413. "EventSessionNextStepEnded": {
  17414. "type": "object",
  17415. "properties": {
  17416. "id": {
  17417. "type": "string"
  17418. },
  17419. "type": {
  17420. "type": "string",
  17421. "enum": ["session.next.step.ended"]
  17422. },
  17423. "properties": {
  17424. "type": "object",
  17425. "properties": {
  17426. "timestamp": {
  17427. "type": "number"
  17428. },
  17429. "sessionID": {
  17430. "type": "string",
  17431. "pattern": "^ses"
  17432. },
  17433. "finish": {
  17434. "type": "string"
  17435. },
  17436. "cost": {
  17437. "type": "number"
  17438. },
  17439. "tokens": {
  17440. "type": "object",
  17441. "properties": {
  17442. "input": {
  17443. "type": "number"
  17444. },
  17445. "output": {
  17446. "type": "number"
  17447. },
  17448. "reasoning": {
  17449. "type": "number"
  17450. },
  17451. "cache": {
  17452. "type": "object",
  17453. "properties": {
  17454. "read": {
  17455. "type": "number"
  17456. },
  17457. "write": {
  17458. "type": "number"
  17459. }
  17460. },
  17461. "required": ["read", "write"],
  17462. "additionalProperties": false
  17463. }
  17464. },
  17465. "required": ["input", "output", "reasoning", "cache"],
  17466. "additionalProperties": false
  17467. },
  17468. "snapshot": {
  17469. "type": "string"
  17470. }
  17471. },
  17472. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17473. "additionalProperties": false
  17474. }
  17475. },
  17476. "required": ["id", "type", "properties"],
  17477. "additionalProperties": false
  17478. },
  17479. "SessionErrorUnknown": {
  17480. "type": "object",
  17481. "properties": {
  17482. "type": {
  17483. "type": "string",
  17484. "enum": ["unknown"]
  17485. },
  17486. "message": {
  17487. "type": "string"
  17488. }
  17489. },
  17490. "required": ["type", "message"],
  17491. "additionalProperties": false
  17492. },
  17493. "EventSessionNextStepFailed": {
  17494. "type": "object",
  17495. "properties": {
  17496. "id": {
  17497. "type": "string"
  17498. },
  17499. "type": {
  17500. "type": "string",
  17501. "enum": ["session.next.step.failed"]
  17502. },
  17503. "properties": {
  17504. "type": "object",
  17505. "properties": {
  17506. "timestamp": {
  17507. "type": "number"
  17508. },
  17509. "sessionID": {
  17510. "type": "string",
  17511. "pattern": "^ses"
  17512. },
  17513. "error": {
  17514. "$ref": "#/components/schemas/SessionErrorUnknown"
  17515. }
  17516. },
  17517. "required": ["timestamp", "sessionID", "error"],
  17518. "additionalProperties": false
  17519. }
  17520. },
  17521. "required": ["id", "type", "properties"],
  17522. "additionalProperties": false
  17523. },
  17524. "EventSessionNextTextStarted": {
  17525. "type": "object",
  17526. "properties": {
  17527. "id": {
  17528. "type": "string"
  17529. },
  17530. "type": {
  17531. "type": "string",
  17532. "enum": ["session.next.text.started"]
  17533. },
  17534. "properties": {
  17535. "type": "object",
  17536. "properties": {
  17537. "timestamp": {
  17538. "type": "number"
  17539. },
  17540. "sessionID": {
  17541. "type": "string",
  17542. "pattern": "^ses"
  17543. }
  17544. },
  17545. "required": ["timestamp", "sessionID"],
  17546. "additionalProperties": false
  17547. }
  17548. },
  17549. "required": ["id", "type", "properties"],
  17550. "additionalProperties": false
  17551. },
  17552. "EventSessionNextTextDelta": {
  17553. "type": "object",
  17554. "properties": {
  17555. "id": {
  17556. "type": "string"
  17557. },
  17558. "type": {
  17559. "type": "string",
  17560. "enum": ["session.next.text.delta"]
  17561. },
  17562. "properties": {
  17563. "type": "object",
  17564. "properties": {
  17565. "timestamp": {
  17566. "type": "number"
  17567. },
  17568. "sessionID": {
  17569. "type": "string",
  17570. "pattern": "^ses"
  17571. },
  17572. "delta": {
  17573. "type": "string"
  17574. }
  17575. },
  17576. "required": ["timestamp", "sessionID", "delta"],
  17577. "additionalProperties": false
  17578. }
  17579. },
  17580. "required": ["id", "type", "properties"],
  17581. "additionalProperties": false
  17582. },
  17583. "EventSessionNextTextEnded": {
  17584. "type": "object",
  17585. "properties": {
  17586. "id": {
  17587. "type": "string"
  17588. },
  17589. "type": {
  17590. "type": "string",
  17591. "enum": ["session.next.text.ended"]
  17592. },
  17593. "properties": {
  17594. "type": "object",
  17595. "properties": {
  17596. "timestamp": {
  17597. "type": "number"
  17598. },
  17599. "sessionID": {
  17600. "type": "string",
  17601. "pattern": "^ses"
  17602. },
  17603. "text": {
  17604. "type": "string"
  17605. }
  17606. },
  17607. "required": ["timestamp", "sessionID", "text"],
  17608. "additionalProperties": false
  17609. }
  17610. },
  17611. "required": ["id", "type", "properties"],
  17612. "additionalProperties": false
  17613. },
  17614. "EventSessionNextReasoningStarted": {
  17615. "type": "object",
  17616. "properties": {
  17617. "id": {
  17618. "type": "string"
  17619. },
  17620. "type": {
  17621. "type": "string",
  17622. "enum": ["session.next.reasoning.started"]
  17623. },
  17624. "properties": {
  17625. "type": "object",
  17626. "properties": {
  17627. "timestamp": {
  17628. "type": "number"
  17629. },
  17630. "sessionID": {
  17631. "type": "string",
  17632. "pattern": "^ses"
  17633. },
  17634. "reasoningID": {
  17635. "type": "string"
  17636. }
  17637. },
  17638. "required": ["timestamp", "sessionID", "reasoningID"],
  17639. "additionalProperties": false
  17640. }
  17641. },
  17642. "required": ["id", "type", "properties"],
  17643. "additionalProperties": false
  17644. },
  17645. "EventSessionNextReasoningDelta": {
  17646. "type": "object",
  17647. "properties": {
  17648. "id": {
  17649. "type": "string"
  17650. },
  17651. "type": {
  17652. "type": "string",
  17653. "enum": ["session.next.reasoning.delta"]
  17654. },
  17655. "properties": {
  17656. "type": "object",
  17657. "properties": {
  17658. "timestamp": {
  17659. "type": "number"
  17660. },
  17661. "sessionID": {
  17662. "type": "string",
  17663. "pattern": "^ses"
  17664. },
  17665. "reasoningID": {
  17666. "type": "string"
  17667. },
  17668. "delta": {
  17669. "type": "string"
  17670. }
  17671. },
  17672. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17673. "additionalProperties": false
  17674. }
  17675. },
  17676. "required": ["id", "type", "properties"],
  17677. "additionalProperties": false
  17678. },
  17679. "EventSessionNextReasoningEnded": {
  17680. "type": "object",
  17681. "properties": {
  17682. "id": {
  17683. "type": "string"
  17684. },
  17685. "type": {
  17686. "type": "string",
  17687. "enum": ["session.next.reasoning.ended"]
  17688. },
  17689. "properties": {
  17690. "type": "object",
  17691. "properties": {
  17692. "timestamp": {
  17693. "type": "number"
  17694. },
  17695. "sessionID": {
  17696. "type": "string",
  17697. "pattern": "^ses"
  17698. },
  17699. "reasoningID": {
  17700. "type": "string"
  17701. },
  17702. "text": {
  17703. "type": "string"
  17704. }
  17705. },
  17706. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17707. "additionalProperties": false
  17708. }
  17709. },
  17710. "required": ["id", "type", "properties"],
  17711. "additionalProperties": false
  17712. },
  17713. "EventSessionNextToolInputStarted": {
  17714. "type": "object",
  17715. "properties": {
  17716. "id": {
  17717. "type": "string"
  17718. },
  17719. "type": {
  17720. "type": "string",
  17721. "enum": ["session.next.tool.input.started"]
  17722. },
  17723. "properties": {
  17724. "type": "object",
  17725. "properties": {
  17726. "timestamp": {
  17727. "type": "number"
  17728. },
  17729. "sessionID": {
  17730. "type": "string",
  17731. "pattern": "^ses"
  17732. },
  17733. "callID": {
  17734. "type": "string"
  17735. },
  17736. "name": {
  17737. "type": "string"
  17738. }
  17739. },
  17740. "required": ["timestamp", "sessionID", "callID", "name"],
  17741. "additionalProperties": false
  17742. }
  17743. },
  17744. "required": ["id", "type", "properties"],
  17745. "additionalProperties": false
  17746. },
  17747. "EventSessionNextToolInputDelta": {
  17748. "type": "object",
  17749. "properties": {
  17750. "id": {
  17751. "type": "string"
  17752. },
  17753. "type": {
  17754. "type": "string",
  17755. "enum": ["session.next.tool.input.delta"]
  17756. },
  17757. "properties": {
  17758. "type": "object",
  17759. "properties": {
  17760. "timestamp": {
  17761. "type": "number"
  17762. },
  17763. "sessionID": {
  17764. "type": "string",
  17765. "pattern": "^ses"
  17766. },
  17767. "callID": {
  17768. "type": "string"
  17769. },
  17770. "delta": {
  17771. "type": "string"
  17772. }
  17773. },
  17774. "required": ["timestamp", "sessionID", "callID", "delta"],
  17775. "additionalProperties": false
  17776. }
  17777. },
  17778. "required": ["id", "type", "properties"],
  17779. "additionalProperties": false
  17780. },
  17781. "EventSessionNextToolInputEnded": {
  17782. "type": "object",
  17783. "properties": {
  17784. "id": {
  17785. "type": "string"
  17786. },
  17787. "type": {
  17788. "type": "string",
  17789. "enum": ["session.next.tool.input.ended"]
  17790. },
  17791. "properties": {
  17792. "type": "object",
  17793. "properties": {
  17794. "timestamp": {
  17795. "type": "number"
  17796. },
  17797. "sessionID": {
  17798. "type": "string",
  17799. "pattern": "^ses"
  17800. },
  17801. "callID": {
  17802. "type": "string"
  17803. },
  17804. "text": {
  17805. "type": "string"
  17806. }
  17807. },
  17808. "required": ["timestamp", "sessionID", "callID", "text"],
  17809. "additionalProperties": false
  17810. }
  17811. },
  17812. "required": ["id", "type", "properties"],
  17813. "additionalProperties": false
  17814. },
  17815. "EventSessionNextToolCalled": {
  17816. "type": "object",
  17817. "properties": {
  17818. "id": {
  17819. "type": "string"
  17820. },
  17821. "type": {
  17822. "type": "string",
  17823. "enum": ["session.next.tool.called"]
  17824. },
  17825. "properties": {
  17826. "type": "object",
  17827. "properties": {
  17828. "timestamp": {
  17829. "type": "number"
  17830. },
  17831. "sessionID": {
  17832. "type": "string",
  17833. "pattern": "^ses"
  17834. },
  17835. "callID": {
  17836. "type": "string"
  17837. },
  17838. "tool": {
  17839. "type": "string"
  17840. },
  17841. "input": {
  17842. "type": "object"
  17843. },
  17844. "provider": {
  17845. "type": "object",
  17846. "properties": {
  17847. "executed": {
  17848. "type": "boolean"
  17849. },
  17850. "metadata": {
  17851. "type": "object"
  17852. }
  17853. },
  17854. "required": ["executed"],
  17855. "additionalProperties": false
  17856. }
  17857. },
  17858. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17859. "additionalProperties": false
  17860. }
  17861. },
  17862. "required": ["id", "type", "properties"],
  17863. "additionalProperties": false
  17864. },
  17865. "ToolTextContent": {
  17866. "type": "object",
  17867. "properties": {
  17868. "type": {
  17869. "type": "string",
  17870. "enum": ["text"]
  17871. },
  17872. "text": {
  17873. "type": "string"
  17874. }
  17875. },
  17876. "required": ["type", "text"],
  17877. "additionalProperties": false
  17878. },
  17879. "ToolFileContent": {
  17880. "type": "object",
  17881. "properties": {
  17882. "type": {
  17883. "type": "string",
  17884. "enum": ["file"]
  17885. },
  17886. "uri": {
  17887. "type": "string"
  17888. },
  17889. "mime": {
  17890. "type": "string"
  17891. },
  17892. "name": {
  17893. "type": "string"
  17894. }
  17895. },
  17896. "required": ["type", "uri", "mime"],
  17897. "additionalProperties": false
  17898. },
  17899. "EventSessionNextToolProgress": {
  17900. "type": "object",
  17901. "properties": {
  17902. "id": {
  17903. "type": "string"
  17904. },
  17905. "type": {
  17906. "type": "string",
  17907. "enum": ["session.next.tool.progress"]
  17908. },
  17909. "properties": {
  17910. "type": "object",
  17911. "properties": {
  17912. "timestamp": {
  17913. "type": "number"
  17914. },
  17915. "sessionID": {
  17916. "type": "string",
  17917. "pattern": "^ses"
  17918. },
  17919. "callID": {
  17920. "type": "string"
  17921. },
  17922. "structured": {
  17923. "type": "object"
  17924. },
  17925. "content": {
  17926. "type": "array",
  17927. "items": {
  17928. "anyOf": [
  17929. {
  17930. "$ref": "#/components/schemas/ToolTextContent"
  17931. },
  17932. {
  17933. "$ref": "#/components/schemas/ToolFileContent"
  17934. }
  17935. ]
  17936. }
  17937. }
  17938. },
  17939. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17940. "additionalProperties": false
  17941. }
  17942. },
  17943. "required": ["id", "type", "properties"],
  17944. "additionalProperties": false
  17945. },
  17946. "EventSessionNextToolSuccess": {
  17947. "type": "object",
  17948. "properties": {
  17949. "id": {
  17950. "type": "string"
  17951. },
  17952. "type": {
  17953. "type": "string",
  17954. "enum": ["session.next.tool.success"]
  17955. },
  17956. "properties": {
  17957. "type": "object",
  17958. "properties": {
  17959. "timestamp": {
  17960. "type": "number"
  17961. },
  17962. "sessionID": {
  17963. "type": "string",
  17964. "pattern": "^ses"
  17965. },
  17966. "callID": {
  17967. "type": "string"
  17968. },
  17969. "structured": {
  17970. "type": "object"
  17971. },
  17972. "content": {
  17973. "type": "array",
  17974. "items": {
  17975. "anyOf": [
  17976. {
  17977. "$ref": "#/components/schemas/ToolTextContent"
  17978. },
  17979. {
  17980. "$ref": "#/components/schemas/ToolFileContent"
  17981. }
  17982. ]
  17983. }
  17984. },
  17985. "provider": {
  17986. "type": "object",
  17987. "properties": {
  17988. "executed": {
  17989. "type": "boolean"
  17990. },
  17991. "metadata": {
  17992. "type": "object"
  17993. }
  17994. },
  17995. "required": ["executed"],
  17996. "additionalProperties": false
  17997. }
  17998. },
  17999. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  18000. "additionalProperties": false
  18001. }
  18002. },
  18003. "required": ["id", "type", "properties"],
  18004. "additionalProperties": false
  18005. },
  18006. "EventSessionNextToolFailed": {
  18007. "type": "object",
  18008. "properties": {
  18009. "id": {
  18010. "type": "string"
  18011. },
  18012. "type": {
  18013. "type": "string",
  18014. "enum": ["session.next.tool.failed"]
  18015. },
  18016. "properties": {
  18017. "type": "object",
  18018. "properties": {
  18019. "timestamp": {
  18020. "type": "number"
  18021. },
  18022. "sessionID": {
  18023. "type": "string",
  18024. "pattern": "^ses"
  18025. },
  18026. "callID": {
  18027. "type": "string"
  18028. },
  18029. "error": {
  18030. "$ref": "#/components/schemas/SessionErrorUnknown"
  18031. },
  18032. "provider": {
  18033. "type": "object",
  18034. "properties": {
  18035. "executed": {
  18036. "type": "boolean"
  18037. },
  18038. "metadata": {
  18039. "type": "object"
  18040. }
  18041. },
  18042. "required": ["executed"],
  18043. "additionalProperties": false
  18044. }
  18045. },
  18046. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  18047. "additionalProperties": false
  18048. }
  18049. },
  18050. "required": ["id", "type", "properties"],
  18051. "additionalProperties": false
  18052. },
  18053. "SessionNextRetry_error": {
  18054. "type": "object",
  18055. "properties": {
  18056. "message": {
  18057. "type": "string"
  18058. },
  18059. "statusCode": {
  18060. "type": "number"
  18061. },
  18062. "isRetryable": {
  18063. "type": "boolean"
  18064. },
  18065. "responseHeaders": {
  18066. "type": "object",
  18067. "additionalProperties": {
  18068. "type": "string"
  18069. }
  18070. },
  18071. "responseBody": {
  18072. "type": "string"
  18073. },
  18074. "metadata": {
  18075. "type": "object",
  18076. "additionalProperties": {
  18077. "type": "string"
  18078. }
  18079. }
  18080. },
  18081. "required": ["message", "isRetryable"],
  18082. "additionalProperties": false
  18083. },
  18084. "EventSessionNextRetried": {
  18085. "type": "object",
  18086. "properties": {
  18087. "id": {
  18088. "type": "string"
  18089. },
  18090. "type": {
  18091. "type": "string",
  18092. "enum": ["session.next.retried"]
  18093. },
  18094. "properties": {
  18095. "type": "object",
  18096. "properties": {
  18097. "timestamp": {
  18098. "type": "number"
  18099. },
  18100. "sessionID": {
  18101. "type": "string",
  18102. "pattern": "^ses"
  18103. },
  18104. "attempt": {
  18105. "type": "number"
  18106. },
  18107. "error": {
  18108. "$ref": "#/components/schemas/SessionNextRetry_error"
  18109. }
  18110. },
  18111. "required": ["timestamp", "sessionID", "attempt", "error"],
  18112. "additionalProperties": false
  18113. }
  18114. },
  18115. "required": ["id", "type", "properties"],
  18116. "additionalProperties": false
  18117. },
  18118. "EventSessionNextCompactionStarted": {
  18119. "type": "object",
  18120. "properties": {
  18121. "id": {
  18122. "type": "string"
  18123. },
  18124. "type": {
  18125. "type": "string",
  18126. "enum": ["session.next.compaction.started"]
  18127. },
  18128. "properties": {
  18129. "type": "object",
  18130. "properties": {
  18131. "timestamp": {
  18132. "type": "number"
  18133. },
  18134. "sessionID": {
  18135. "type": "string",
  18136. "pattern": "^ses"
  18137. },
  18138. "reason": {
  18139. "type": "string",
  18140. "enum": ["auto", "manual"]
  18141. }
  18142. },
  18143. "required": ["timestamp", "sessionID", "reason"],
  18144. "additionalProperties": false
  18145. }
  18146. },
  18147. "required": ["id", "type", "properties"],
  18148. "additionalProperties": false
  18149. },
  18150. "EventSessionNextCompactionDelta": {
  18151. "type": "object",
  18152. "properties": {
  18153. "id": {
  18154. "type": "string"
  18155. },
  18156. "type": {
  18157. "type": "string",
  18158. "enum": ["session.next.compaction.delta"]
  18159. },
  18160. "properties": {
  18161. "type": "object",
  18162. "properties": {
  18163. "timestamp": {
  18164. "type": "number"
  18165. },
  18166. "sessionID": {
  18167. "type": "string",
  18168. "pattern": "^ses"
  18169. },
  18170. "text": {
  18171. "type": "string"
  18172. }
  18173. },
  18174. "required": ["timestamp", "sessionID", "text"],
  18175. "additionalProperties": false
  18176. }
  18177. },
  18178. "required": ["id", "type", "properties"],
  18179. "additionalProperties": false
  18180. },
  18181. "EventSessionNextCompactionEnded": {
  18182. "type": "object",
  18183. "properties": {
  18184. "id": {
  18185. "type": "string"
  18186. },
  18187. "type": {
  18188. "type": "string",
  18189. "enum": ["session.next.compaction.ended"]
  18190. },
  18191. "properties": {
  18192. "type": "object",
  18193. "properties": {
  18194. "timestamp": {
  18195. "type": "number"
  18196. },
  18197. "sessionID": {
  18198. "type": "string",
  18199. "pattern": "^ses"
  18200. },
  18201. "text": {
  18202. "type": "string"
  18203. },
  18204. "include": {
  18205. "type": "string"
  18206. }
  18207. },
  18208. "required": ["timestamp", "sessionID", "text"],
  18209. "additionalProperties": false
  18210. }
  18211. },
  18212. "required": ["id", "type", "properties"],
  18213. "additionalProperties": false
  18214. },
  18215. "EventServerConnected": {
  18216. "type": "object",
  18217. "properties": {
  18218. "id": {
  18219. "type": "string"
  18220. },
  18221. "type": {
  18222. "type": "string",
  18223. "enum": ["server.connected"]
  18224. },
  18225. "properties": {
  18226. "type": "object",
  18227. "properties": {}
  18228. }
  18229. },
  18230. "required": ["id", "type", "properties"],
  18231. "additionalProperties": false
  18232. },
  18233. "EventGlobalDisposed": {
  18234. "type": "object",
  18235. "properties": {
  18236. "id": {
  18237. "type": "string"
  18238. },
  18239. "type": {
  18240. "type": "string",
  18241. "enum": ["global.disposed"]
  18242. },
  18243. "properties": {
  18244. "type": "object",
  18245. "properties": {}
  18246. }
  18247. },
  18248. "required": ["id", "type", "properties"],
  18249. "additionalProperties": false
  18250. },
  18251. "SessionInfo": {
  18252. "type": "object",
  18253. "properties": {
  18254. "id": {
  18255. "type": "string",
  18256. "pattern": "^ses"
  18257. },
  18258. "parentID": {
  18259. "type": "string",
  18260. "pattern": "^ses"
  18261. },
  18262. "projectID": {
  18263. "type": "string"
  18264. },
  18265. "workspaceID": {
  18266. "type": "string",
  18267. "pattern": "^wrk"
  18268. },
  18269. "path": {
  18270. "type": "string"
  18271. },
  18272. "agent": {
  18273. "type": "string"
  18274. },
  18275. "model": {
  18276. "type": "object",
  18277. "properties": {
  18278. "id": {
  18279. "type": "string"
  18280. },
  18281. "providerID": {
  18282. "type": "string"
  18283. },
  18284. "variant": {
  18285. "type": "string"
  18286. }
  18287. },
  18288. "required": ["id", "providerID", "variant"],
  18289. "additionalProperties": false
  18290. },
  18291. "cost": {
  18292. "type": "number"
  18293. },
  18294. "tokens": {
  18295. "type": "object",
  18296. "properties": {
  18297. "input": {
  18298. "type": "number"
  18299. },
  18300. "output": {
  18301. "type": "number"
  18302. },
  18303. "reasoning": {
  18304. "type": "number"
  18305. },
  18306. "cache": {
  18307. "type": "object",
  18308. "properties": {
  18309. "read": {
  18310. "type": "number"
  18311. },
  18312. "write": {
  18313. "type": "number"
  18314. }
  18315. },
  18316. "required": ["read", "write"],
  18317. "additionalProperties": false
  18318. }
  18319. },
  18320. "required": ["input", "output", "reasoning", "cache"],
  18321. "additionalProperties": false
  18322. },
  18323. "time": {
  18324. "type": "object",
  18325. "properties": {
  18326. "created": {
  18327. "type": "number"
  18328. },
  18329. "updated": {
  18330. "type": "number"
  18331. },
  18332. "archived": {
  18333. "type": "number"
  18334. }
  18335. },
  18336. "required": ["created", "updated"],
  18337. "additionalProperties": false
  18338. },
  18339. "title": {
  18340. "type": "string"
  18341. }
  18342. },
  18343. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  18344. "additionalProperties": false
  18345. },
  18346. "SessionDelivery": {
  18347. "type": "string",
  18348. "enum": ["immediate", "deferred"]
  18349. },
  18350. "SessionMessageAgentSwitched": {
  18351. "type": "object",
  18352. "properties": {
  18353. "id": {
  18354. "type": "string"
  18355. },
  18356. "metadata": {
  18357. "type": "object"
  18358. },
  18359. "time": {
  18360. "type": "object",
  18361. "properties": {
  18362. "created": {
  18363. "type": "number"
  18364. }
  18365. },
  18366. "required": ["created"],
  18367. "additionalProperties": false
  18368. },
  18369. "type": {
  18370. "type": "string",
  18371. "enum": ["agent-switched"]
  18372. },
  18373. "agent": {
  18374. "type": "string"
  18375. }
  18376. },
  18377. "required": ["id", "time", "type", "agent"],
  18378. "additionalProperties": false
  18379. },
  18380. "SessionMessageModelSwitched": {
  18381. "type": "object",
  18382. "properties": {
  18383. "id": {
  18384. "type": "string"
  18385. },
  18386. "metadata": {
  18387. "type": "object"
  18388. },
  18389. "time": {
  18390. "type": "object",
  18391. "properties": {
  18392. "created": {
  18393. "type": "number"
  18394. }
  18395. },
  18396. "required": ["created"],
  18397. "additionalProperties": false
  18398. },
  18399. "type": {
  18400. "type": "string",
  18401. "enum": ["model-switched"]
  18402. },
  18403. "model": {
  18404. "type": "object",
  18405. "properties": {
  18406. "id": {
  18407. "type": "string"
  18408. },
  18409. "providerID": {
  18410. "type": "string"
  18411. },
  18412. "variant": {
  18413. "type": "string"
  18414. }
  18415. },
  18416. "required": ["id", "providerID", "variant"],
  18417. "additionalProperties": false
  18418. }
  18419. },
  18420. "required": ["id", "time", "type", "model"],
  18421. "additionalProperties": false
  18422. },
  18423. "SessionMessageUser": {
  18424. "type": "object",
  18425. "properties": {
  18426. "id": {
  18427. "type": "string"
  18428. },
  18429. "metadata": {
  18430. "type": "object"
  18431. },
  18432. "time": {
  18433. "type": "object",
  18434. "properties": {
  18435. "created": {
  18436. "type": "number"
  18437. }
  18438. },
  18439. "required": ["created"],
  18440. "additionalProperties": false
  18441. },
  18442. "text": {
  18443. "type": "string"
  18444. },
  18445. "files": {
  18446. "type": "array",
  18447. "items": {
  18448. "$ref": "#/components/schemas/PromptFileAttachment"
  18449. }
  18450. },
  18451. "agents": {
  18452. "type": "array",
  18453. "items": {
  18454. "$ref": "#/components/schemas/PromptAgentAttachment"
  18455. }
  18456. },
  18457. "references": {
  18458. "type": "array",
  18459. "items": {
  18460. "$ref": "#/components/schemas/PromptReferenceAttachment"
  18461. }
  18462. },
  18463. "type": {
  18464. "type": "string",
  18465. "enum": ["user"]
  18466. }
  18467. },
  18468. "required": ["id", "time", "text", "type"],
  18469. "additionalProperties": false
  18470. },
  18471. "SessionMessageSynthetic": {
  18472. "type": "object",
  18473. "properties": {
  18474. "id": {
  18475. "type": "string"
  18476. },
  18477. "metadata": {
  18478. "type": "object"
  18479. },
  18480. "time": {
  18481. "type": "object",
  18482. "properties": {
  18483. "created": {
  18484. "type": "number"
  18485. }
  18486. },
  18487. "required": ["created"],
  18488. "additionalProperties": false
  18489. },
  18490. "sessionID": {
  18491. "type": "string",
  18492. "pattern": "^ses"
  18493. },
  18494. "text": {
  18495. "type": "string"
  18496. },
  18497. "type": {
  18498. "type": "string",
  18499. "enum": ["synthetic"]
  18500. }
  18501. },
  18502. "required": ["id", "time", "sessionID", "text", "type"],
  18503. "additionalProperties": false
  18504. },
  18505. "SessionMessageShell": {
  18506. "type": "object",
  18507. "properties": {
  18508. "id": {
  18509. "type": "string"
  18510. },
  18511. "metadata": {
  18512. "type": "object"
  18513. },
  18514. "time": {
  18515. "type": "object",
  18516. "properties": {
  18517. "created": {
  18518. "type": "number"
  18519. },
  18520. "completed": {
  18521. "type": "number"
  18522. }
  18523. },
  18524. "required": ["created"],
  18525. "additionalProperties": false
  18526. },
  18527. "type": {
  18528. "type": "string",
  18529. "enum": ["shell"]
  18530. },
  18531. "callID": {
  18532. "type": "string"
  18533. },
  18534. "command": {
  18535. "type": "string"
  18536. },
  18537. "output": {
  18538. "type": "string"
  18539. }
  18540. },
  18541. "required": ["id", "time", "type", "callID", "command", "output"],
  18542. "additionalProperties": false
  18543. },
  18544. "SessionMessageAssistantText": {
  18545. "type": "object",
  18546. "properties": {
  18547. "type": {
  18548. "type": "string",
  18549. "enum": ["text"]
  18550. },
  18551. "text": {
  18552. "type": "string"
  18553. }
  18554. },
  18555. "required": ["type", "text"],
  18556. "additionalProperties": false
  18557. },
  18558. "SessionMessageAssistantReasoning": {
  18559. "type": "object",
  18560. "properties": {
  18561. "type": {
  18562. "type": "string",
  18563. "enum": ["reasoning"]
  18564. },
  18565. "id": {
  18566. "type": "string"
  18567. },
  18568. "text": {
  18569. "type": "string"
  18570. }
  18571. },
  18572. "required": ["type", "id", "text"],
  18573. "additionalProperties": false
  18574. },
  18575. "SessionMessageToolStatePending": {
  18576. "type": "object",
  18577. "properties": {
  18578. "status": {
  18579. "type": "string",
  18580. "enum": ["pending"]
  18581. },
  18582. "input": {
  18583. "type": "string"
  18584. }
  18585. },
  18586. "required": ["status", "input"],
  18587. "additionalProperties": false
  18588. },
  18589. "SessionMessageToolStateRunning": {
  18590. "type": "object",
  18591. "properties": {
  18592. "status": {
  18593. "type": "string",
  18594. "enum": ["running"]
  18595. },
  18596. "input": {
  18597. "type": "object"
  18598. },
  18599. "structured": {
  18600. "type": "object"
  18601. },
  18602. "content": {
  18603. "type": "array",
  18604. "items": {
  18605. "anyOf": [
  18606. {
  18607. "$ref": "#/components/schemas/ToolTextContent"
  18608. },
  18609. {
  18610. "$ref": "#/components/schemas/ToolFileContent"
  18611. }
  18612. ]
  18613. }
  18614. }
  18615. },
  18616. "required": ["status", "input", "structured", "content"],
  18617. "additionalProperties": false
  18618. },
  18619. "SessionMessageToolStateCompleted": {
  18620. "type": "object",
  18621. "properties": {
  18622. "status": {
  18623. "type": "string",
  18624. "enum": ["completed"]
  18625. },
  18626. "input": {
  18627. "type": "object"
  18628. },
  18629. "attachments": {
  18630. "type": "array",
  18631. "items": {
  18632. "$ref": "#/components/schemas/PromptFileAttachment"
  18633. }
  18634. },
  18635. "content": {
  18636. "type": "array",
  18637. "items": {
  18638. "anyOf": [
  18639. {
  18640. "$ref": "#/components/schemas/ToolTextContent"
  18641. },
  18642. {
  18643. "$ref": "#/components/schemas/ToolFileContent"
  18644. }
  18645. ]
  18646. }
  18647. },
  18648. "structured": {
  18649. "type": "object"
  18650. }
  18651. },
  18652. "required": ["status", "input", "content", "structured"],
  18653. "additionalProperties": false
  18654. },
  18655. "SessionMessageToolStateError": {
  18656. "type": "object",
  18657. "properties": {
  18658. "status": {
  18659. "type": "string",
  18660. "enum": ["error"]
  18661. },
  18662. "input": {
  18663. "type": "object"
  18664. },
  18665. "content": {
  18666. "type": "array",
  18667. "items": {
  18668. "anyOf": [
  18669. {
  18670. "$ref": "#/components/schemas/ToolTextContent"
  18671. },
  18672. {
  18673. "$ref": "#/components/schemas/ToolFileContent"
  18674. }
  18675. ]
  18676. }
  18677. },
  18678. "structured": {
  18679. "type": "object"
  18680. },
  18681. "error": {
  18682. "$ref": "#/components/schemas/SessionErrorUnknown"
  18683. }
  18684. },
  18685. "required": ["status", "input", "content", "structured", "error"],
  18686. "additionalProperties": false
  18687. },
  18688. "SessionMessageAssistantTool": {
  18689. "type": "object",
  18690. "properties": {
  18691. "type": {
  18692. "type": "string",
  18693. "enum": ["tool"]
  18694. },
  18695. "id": {
  18696. "type": "string"
  18697. },
  18698. "name": {
  18699. "type": "string"
  18700. },
  18701. "provider": {
  18702. "type": "object",
  18703. "properties": {
  18704. "executed": {
  18705. "type": "boolean"
  18706. },
  18707. "metadata": {
  18708. "type": "object"
  18709. }
  18710. },
  18711. "required": ["executed"],
  18712. "additionalProperties": false
  18713. },
  18714. "state": {
  18715. "anyOf": [
  18716. {
  18717. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18718. },
  18719. {
  18720. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18721. },
  18722. {
  18723. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18724. },
  18725. {
  18726. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18727. }
  18728. ]
  18729. },
  18730. "time": {
  18731. "type": "object",
  18732. "properties": {
  18733. "created": {
  18734. "type": "number"
  18735. },
  18736. "ran": {
  18737. "type": "number"
  18738. },
  18739. "completed": {
  18740. "type": "number"
  18741. },
  18742. "pruned": {
  18743. "type": "number"
  18744. }
  18745. },
  18746. "required": ["created"],
  18747. "additionalProperties": false
  18748. }
  18749. },
  18750. "required": ["type", "id", "name", "state", "time"],
  18751. "additionalProperties": false
  18752. },
  18753. "SessionMessageAssistant": {
  18754. "type": "object",
  18755. "properties": {
  18756. "id": {
  18757. "type": "string"
  18758. },
  18759. "metadata": {
  18760. "type": "object"
  18761. },
  18762. "time": {
  18763. "type": "object",
  18764. "properties": {
  18765. "created": {
  18766. "type": "number"
  18767. },
  18768. "completed": {
  18769. "type": "number"
  18770. }
  18771. },
  18772. "required": ["created"],
  18773. "additionalProperties": false
  18774. },
  18775. "type": {
  18776. "type": "string",
  18777. "enum": ["assistant"]
  18778. },
  18779. "agent": {
  18780. "type": "string"
  18781. },
  18782. "model": {
  18783. "type": "object",
  18784. "properties": {
  18785. "id": {
  18786. "type": "string"
  18787. },
  18788. "providerID": {
  18789. "type": "string"
  18790. },
  18791. "variant": {
  18792. "type": "string"
  18793. }
  18794. },
  18795. "required": ["id", "providerID", "variant"],
  18796. "additionalProperties": false
  18797. },
  18798. "content": {
  18799. "type": "array",
  18800. "items": {
  18801. "anyOf": [
  18802. {
  18803. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18804. },
  18805. {
  18806. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18807. },
  18808. {
  18809. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18810. }
  18811. ]
  18812. }
  18813. },
  18814. "snapshot": {
  18815. "type": "object",
  18816. "properties": {
  18817. "start": {
  18818. "type": "string"
  18819. },
  18820. "end": {
  18821. "type": "string"
  18822. }
  18823. },
  18824. "additionalProperties": false
  18825. },
  18826. "finish": {
  18827. "type": "string"
  18828. },
  18829. "cost": {
  18830. "type": "number"
  18831. },
  18832. "tokens": {
  18833. "type": "object",
  18834. "properties": {
  18835. "input": {
  18836. "type": "number"
  18837. },
  18838. "output": {
  18839. "type": "number"
  18840. },
  18841. "reasoning": {
  18842. "type": "number"
  18843. },
  18844. "cache": {
  18845. "type": "object",
  18846. "properties": {
  18847. "read": {
  18848. "type": "number"
  18849. },
  18850. "write": {
  18851. "type": "number"
  18852. }
  18853. },
  18854. "required": ["read", "write"],
  18855. "additionalProperties": false
  18856. }
  18857. },
  18858. "required": ["input", "output", "reasoning", "cache"],
  18859. "additionalProperties": false
  18860. },
  18861. "error": {
  18862. "$ref": "#/components/schemas/SessionErrorUnknown"
  18863. }
  18864. },
  18865. "required": ["id", "time", "type", "agent", "model", "content"],
  18866. "additionalProperties": false
  18867. },
  18868. "SessionMessageCompaction": {
  18869. "type": "object",
  18870. "properties": {
  18871. "type": {
  18872. "type": "string",
  18873. "enum": ["compaction"]
  18874. },
  18875. "reason": {
  18876. "type": "string",
  18877. "enum": ["auto", "manual"]
  18878. },
  18879. "summary": {
  18880. "type": "string"
  18881. },
  18882. "include": {
  18883. "type": "string"
  18884. },
  18885. "id": {
  18886. "type": "string"
  18887. },
  18888. "metadata": {
  18889. "type": "object"
  18890. },
  18891. "time": {
  18892. "type": "object",
  18893. "properties": {
  18894. "created": {
  18895. "type": "number"
  18896. }
  18897. },
  18898. "required": ["created"],
  18899. "additionalProperties": false
  18900. }
  18901. },
  18902. "required": ["type", "reason", "summary", "id", "time"],
  18903. "additionalProperties": false
  18904. },
  18905. "SessionMessage": {
  18906. "anyOf": [
  18907. {
  18908. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  18909. },
  18910. {
  18911. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  18912. },
  18913. {
  18914. "$ref": "#/components/schemas/SessionMessageUser"
  18915. },
  18916. {
  18917. "$ref": "#/components/schemas/SessionMessageSynthetic"
  18918. },
  18919. {
  18920. "$ref": "#/components/schemas/SessionMessageShell"
  18921. },
  18922. {
  18923. "$ref": "#/components/schemas/SessionMessageAssistant"
  18924. },
  18925. {
  18926. "$ref": "#/components/schemas/SessionMessageCompaction"
  18927. }
  18928. ]
  18929. },
  18930. "EventTuiToastShow1": {
  18931. "type": "object",
  18932. "properties": {
  18933. "id": {
  18934. "type": "string"
  18935. },
  18936. "type": {
  18937. "type": "string",
  18938. "enum": ["tui.toast.show"]
  18939. },
  18940. "properties": {
  18941. "type": "object",
  18942. "properties": {
  18943. "title": {
  18944. "type": "string"
  18945. },
  18946. "message": {
  18947. "type": "string"
  18948. },
  18949. "variant": {
  18950. "type": "string",
  18951. "enum": ["info", "success", "warning", "error"]
  18952. },
  18953. "duration": {
  18954. "type": "integer",
  18955. "exclusiveMinimum": 0
  18956. }
  18957. },
  18958. "required": ["message", "variant"],
  18959. "additionalProperties": false
  18960. }
  18961. },
  18962. "required": ["id", "type", "properties"],
  18963. "additionalProperties": false
  18964. },
  18965. "BadRequestError": {
  18966. "type": "object",
  18967. "required": ["name", "data"],
  18968. "properties": {
  18969. "name": {
  18970. "type": "string",
  18971. "enum": ["BadRequest"]
  18972. },
  18973. "data": {
  18974. "type": "object",
  18975. "required": ["message"],
  18976. "properties": {
  18977. "message": {
  18978. "type": "string"
  18979. },
  18980. "kind": {
  18981. "type": "string",
  18982. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  18983. }
  18984. }
  18985. }
  18986. }
  18987. }
  18988. }
  18989. },
  18990. "security": [],
  18991. "tags": [
  18992. {
  18993. "name": "control",
  18994. "description": "Control plane routes."
  18995. },
  18996. {
  18997. "name": "global",
  18998. "description": "Global server routes."
  18999. },
  19000. {
  19001. "name": "event",
  19002. "description": "Instance event stream route."
  19003. },
  19004. {
  19005. "name": "config",
  19006. "description": "Experimental HttpApi config routes."
  19007. },
  19008. {
  19009. "name": "experimental",
  19010. "description": "Experimental HttpApi read-only routes."
  19011. },
  19012. {
  19013. "name": "file",
  19014. "description": "Experimental HttpApi file routes."
  19015. },
  19016. {
  19017. "name": "instance",
  19018. "description": "Experimental HttpApi instance read routes."
  19019. },
  19020. {
  19021. "name": "mcp",
  19022. "description": "Experimental HttpApi MCP routes."
  19023. },
  19024. {
  19025. "name": "project",
  19026. "description": "Experimental HttpApi project routes."
  19027. },
  19028. {
  19029. "name": "pty",
  19030. "description": "Experimental HttpApi PTY routes."
  19031. },
  19032. {
  19033. "name": "question",
  19034. "description": "Question routes."
  19035. },
  19036. {
  19037. "name": "permission",
  19038. "description": "Experimental HttpApi permission routes."
  19039. },
  19040. {
  19041. "name": "provider",
  19042. "description": "Experimental HttpApi provider routes."
  19043. },
  19044. {
  19045. "name": "session",
  19046. "description": "Experimental HttpApi session routes."
  19047. },
  19048. {
  19049. "name": "sync",
  19050. "description": "Experimental HttpApi sync routes."
  19051. },
  19052. {
  19053. "name": "v2",
  19054. "description": "Experimental v2 routes."
  19055. },
  19056. {
  19057. "name": "v2 messages",
  19058. "description": "Experimental v2 message routes."
  19059. },
  19060. {
  19061. "name": "tui",
  19062. "description": "Experimental HttpApi TUI routes."
  19063. },
  19064. {
  19065. "name": "workspace",
  19066. "description": "Experimental HttpApi workspace routes."
  19067. },
  19068. {
  19069. "name": "pty",
  19070. "description": "PTY websocket route."
  19071. }
  19072. ]
  19073. }