openapi.json 512 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834
  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. "404": {
  5540. "description": "NotFoundError",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/NotFoundError"
  5545. }
  5546. }
  5547. }
  5548. }
  5549. },
  5550. "description": "Create a new session by forking an existing session at a specific message point.",
  5551. "summary": "Fork session",
  5552. "requestBody": {
  5553. "content": {
  5554. "application/json": {
  5555. "schema": {
  5556. "type": "object",
  5557. "properties": {
  5558. "messageID": {
  5559. "type": "string",
  5560. "pattern": "^msg"
  5561. }
  5562. },
  5563. "additionalProperties": false
  5564. }
  5565. }
  5566. }
  5567. },
  5568. "x-codeSamples": [
  5569. {
  5570. "lang": "js",
  5571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5572. }
  5573. ]
  5574. }
  5575. },
  5576. "/session/{sessionID}/abort": {
  5577. "post": {
  5578. "tags": ["session"],
  5579. "operationId": "session.abort",
  5580. "parameters": [
  5581. {
  5582. "name": "sessionID",
  5583. "in": "path",
  5584. "schema": {
  5585. "type": "string",
  5586. "pattern": "^ses"
  5587. },
  5588. "required": true
  5589. },
  5590. {
  5591. "name": "directory",
  5592. "in": "query",
  5593. "schema": {
  5594. "type": "string"
  5595. },
  5596. "required": false
  5597. },
  5598. {
  5599. "name": "workspace",
  5600. "in": "query",
  5601. "schema": {
  5602. "type": "string"
  5603. },
  5604. "required": false
  5605. }
  5606. ],
  5607. "responses": {
  5608. "200": {
  5609. "description": "Aborted session",
  5610. "content": {
  5611. "application/json": {
  5612. "schema": {
  5613. "type": "boolean",
  5614. "description": "Aborted session"
  5615. }
  5616. }
  5617. }
  5618. },
  5619. "400": {
  5620. "description": "Bad request",
  5621. "content": {
  5622. "application/json": {
  5623. "schema": {
  5624. "$ref": "#/components/schemas/BadRequestError"
  5625. }
  5626. }
  5627. }
  5628. },
  5629. "404": {
  5630. "description": "Not found",
  5631. "content": {
  5632. "application/json": {
  5633. "schema": {
  5634. "$ref": "#/components/schemas/NotFoundError"
  5635. }
  5636. }
  5637. }
  5638. }
  5639. },
  5640. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5641. "summary": "Abort session",
  5642. "x-codeSamples": [
  5643. {
  5644. "lang": "js",
  5645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5646. }
  5647. ]
  5648. }
  5649. },
  5650. "/session/{sessionID}/init": {
  5651. "post": {
  5652. "tags": ["session"],
  5653. "operationId": "session.init",
  5654. "parameters": [
  5655. {
  5656. "name": "sessionID",
  5657. "in": "path",
  5658. "schema": {
  5659. "type": "string",
  5660. "pattern": "^ses"
  5661. },
  5662. "required": true
  5663. },
  5664. {
  5665. "name": "directory",
  5666. "in": "query",
  5667. "schema": {
  5668. "type": "string"
  5669. },
  5670. "required": false
  5671. },
  5672. {
  5673. "name": "workspace",
  5674. "in": "query",
  5675. "schema": {
  5676. "type": "string"
  5677. },
  5678. "required": false
  5679. }
  5680. ],
  5681. "responses": {
  5682. "200": {
  5683. "description": "200",
  5684. "content": {
  5685. "application/json": {
  5686. "schema": {
  5687. "type": "boolean",
  5688. "description": "200"
  5689. }
  5690. }
  5691. }
  5692. },
  5693. "400": {
  5694. "description": "Bad request",
  5695. "content": {
  5696. "application/json": {
  5697. "schema": {
  5698. "$ref": "#/components/schemas/BadRequestError"
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "404": {
  5704. "description": "Not found",
  5705. "content": {
  5706. "application/json": {
  5707. "schema": {
  5708. "$ref": "#/components/schemas/NotFoundError"
  5709. }
  5710. }
  5711. }
  5712. }
  5713. },
  5714. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5715. "summary": "Initialize session",
  5716. "requestBody": {
  5717. "content": {
  5718. "application/json": {
  5719. "schema": {
  5720. "type": "object",
  5721. "properties": {
  5722. "modelID": {
  5723. "type": "string"
  5724. },
  5725. "providerID": {
  5726. "type": "string"
  5727. },
  5728. "messageID": {
  5729. "type": "string",
  5730. "pattern": "^msg"
  5731. }
  5732. },
  5733. "required": ["modelID", "providerID", "messageID"],
  5734. "additionalProperties": false
  5735. }
  5736. }
  5737. }
  5738. },
  5739. "x-codeSamples": [
  5740. {
  5741. "lang": "js",
  5742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5743. }
  5744. ]
  5745. }
  5746. },
  5747. "/session/{sessionID}/share": {
  5748. "post": {
  5749. "tags": ["session"],
  5750. "operationId": "session.share",
  5751. "parameters": [
  5752. {
  5753. "name": "sessionID",
  5754. "in": "path",
  5755. "schema": {
  5756. "type": "string",
  5757. "pattern": "^ses"
  5758. },
  5759. "required": true
  5760. },
  5761. {
  5762. "name": "directory",
  5763. "in": "query",
  5764. "schema": {
  5765. "type": "string"
  5766. },
  5767. "required": false
  5768. },
  5769. {
  5770. "name": "workspace",
  5771. "in": "query",
  5772. "schema": {
  5773. "type": "string"
  5774. },
  5775. "required": false
  5776. }
  5777. ],
  5778. "responses": {
  5779. "200": {
  5780. "description": "Successfully shared session",
  5781. "content": {
  5782. "application/json": {
  5783. "schema": {
  5784. "$ref": "#/components/schemas/Session"
  5785. }
  5786. }
  5787. }
  5788. },
  5789. "404": {
  5790. "description": "NotFoundError",
  5791. "content": {
  5792. "application/json": {
  5793. "schema": {
  5794. "$ref": "#/components/schemas/NotFoundError"
  5795. }
  5796. }
  5797. }
  5798. },
  5799. "500": {
  5800. "description": "InternalServerError",
  5801. "content": {
  5802. "application/json": {
  5803. "schema": {
  5804. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5805. }
  5806. }
  5807. }
  5808. }
  5809. },
  5810. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5811. "summary": "Share session",
  5812. "x-codeSamples": [
  5813. {
  5814. "lang": "js",
  5815. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5816. }
  5817. ]
  5818. },
  5819. "delete": {
  5820. "tags": ["session"],
  5821. "operationId": "session.unshare",
  5822. "parameters": [
  5823. {
  5824. "name": "sessionID",
  5825. "in": "path",
  5826. "schema": {
  5827. "type": "string",
  5828. "pattern": "^ses"
  5829. },
  5830. "required": true
  5831. },
  5832. {
  5833. "name": "directory",
  5834. "in": "query",
  5835. "schema": {
  5836. "type": "string"
  5837. },
  5838. "required": false
  5839. },
  5840. {
  5841. "name": "workspace",
  5842. "in": "query",
  5843. "schema": {
  5844. "type": "string"
  5845. },
  5846. "required": false
  5847. }
  5848. ],
  5849. "responses": {
  5850. "200": {
  5851. "description": "Successfully unshared session",
  5852. "content": {
  5853. "application/json": {
  5854. "schema": {
  5855. "$ref": "#/components/schemas/Session"
  5856. }
  5857. }
  5858. }
  5859. },
  5860. "404": {
  5861. "description": "NotFoundError",
  5862. "content": {
  5863. "application/json": {
  5864. "schema": {
  5865. "$ref": "#/components/schemas/NotFoundError"
  5866. }
  5867. }
  5868. }
  5869. },
  5870. "500": {
  5871. "description": "InternalServerError",
  5872. "content": {
  5873. "application/json": {
  5874. "schema": {
  5875. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5876. }
  5877. }
  5878. }
  5879. }
  5880. },
  5881. "description": "Remove the shareable link for a session, making it private again.",
  5882. "summary": "Unshare session",
  5883. "x-codeSamples": [
  5884. {
  5885. "lang": "js",
  5886. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5887. }
  5888. ]
  5889. }
  5890. },
  5891. "/session/{sessionID}/summarize": {
  5892. "post": {
  5893. "tags": ["session"],
  5894. "operationId": "session.summarize",
  5895. "parameters": [
  5896. {
  5897. "name": "sessionID",
  5898. "in": "path",
  5899. "schema": {
  5900. "type": "string",
  5901. "pattern": "^ses"
  5902. },
  5903. "required": true
  5904. },
  5905. {
  5906. "name": "directory",
  5907. "in": "query",
  5908. "schema": {
  5909. "type": "string"
  5910. },
  5911. "required": false
  5912. },
  5913. {
  5914. "name": "workspace",
  5915. "in": "query",
  5916. "schema": {
  5917. "type": "string"
  5918. },
  5919. "required": false
  5920. }
  5921. ],
  5922. "responses": {
  5923. "200": {
  5924. "description": "Summarized session",
  5925. "content": {
  5926. "application/json": {
  5927. "schema": {
  5928. "type": "boolean",
  5929. "description": "Summarized session"
  5930. }
  5931. }
  5932. }
  5933. },
  5934. "400": {
  5935. "description": "Bad request",
  5936. "content": {
  5937. "application/json": {
  5938. "schema": {
  5939. "$ref": "#/components/schemas/BadRequestError"
  5940. }
  5941. }
  5942. }
  5943. },
  5944. "404": {
  5945. "description": "NotFoundError",
  5946. "content": {
  5947. "application/json": {
  5948. "schema": {
  5949. "$ref": "#/components/schemas/NotFoundError"
  5950. }
  5951. }
  5952. }
  5953. }
  5954. },
  5955. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5956. "summary": "Summarize session",
  5957. "requestBody": {
  5958. "content": {
  5959. "application/json": {
  5960. "schema": {
  5961. "type": "object",
  5962. "properties": {
  5963. "providerID": {
  5964. "type": "string"
  5965. },
  5966. "modelID": {
  5967. "type": "string"
  5968. },
  5969. "auto": {
  5970. "type": "boolean"
  5971. }
  5972. },
  5973. "required": ["providerID", "modelID"],
  5974. "additionalProperties": false
  5975. }
  5976. }
  5977. }
  5978. },
  5979. "x-codeSamples": [
  5980. {
  5981. "lang": "js",
  5982. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  5983. }
  5984. ]
  5985. }
  5986. },
  5987. "/session/{sessionID}/prompt_async": {
  5988. "post": {
  5989. "tags": ["session"],
  5990. "operationId": "session.prompt_async",
  5991. "parameters": [
  5992. {
  5993. "name": "sessionID",
  5994. "in": "path",
  5995. "schema": {
  5996. "type": "string",
  5997. "pattern": "^ses"
  5998. },
  5999. "required": true
  6000. },
  6001. {
  6002. "name": "directory",
  6003. "in": "query",
  6004. "schema": {
  6005. "type": "string"
  6006. },
  6007. "required": false
  6008. },
  6009. {
  6010. "name": "workspace",
  6011. "in": "query",
  6012. "schema": {
  6013. "type": "string"
  6014. },
  6015. "required": false
  6016. }
  6017. ],
  6018. "responses": {
  6019. "204": {
  6020. "description": "Prompt accepted"
  6021. },
  6022. "400": {
  6023. "description": "Bad request",
  6024. "content": {
  6025. "application/json": {
  6026. "schema": {
  6027. "$ref": "#/components/schemas/BadRequestError"
  6028. }
  6029. }
  6030. }
  6031. },
  6032. "404": {
  6033. "description": "Not found",
  6034. "content": {
  6035. "application/json": {
  6036. "schema": {
  6037. "$ref": "#/components/schemas/NotFoundError"
  6038. }
  6039. }
  6040. }
  6041. }
  6042. },
  6043. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6044. "summary": "Send async message",
  6045. "requestBody": {
  6046. "content": {
  6047. "application/json": {
  6048. "schema": {
  6049. "type": "object",
  6050. "properties": {
  6051. "messageID": {
  6052. "type": "string",
  6053. "pattern": "^msg"
  6054. },
  6055. "model": {
  6056. "type": "object",
  6057. "properties": {
  6058. "providerID": {
  6059. "type": "string"
  6060. },
  6061. "modelID": {
  6062. "type": "string"
  6063. }
  6064. },
  6065. "required": ["providerID", "modelID"],
  6066. "additionalProperties": false
  6067. },
  6068. "agent": {
  6069. "type": "string"
  6070. },
  6071. "noReply": {
  6072. "type": "boolean"
  6073. },
  6074. "tools": {
  6075. "type": "object",
  6076. "additionalProperties": {
  6077. "type": "boolean"
  6078. }
  6079. },
  6080. "format": {
  6081. "$ref": "#/components/schemas/OutputFormat"
  6082. },
  6083. "system": {
  6084. "type": "string"
  6085. },
  6086. "variant": {
  6087. "type": "string"
  6088. },
  6089. "parts": {
  6090. "type": "array",
  6091. "items": {
  6092. "anyOf": [
  6093. {
  6094. "$ref": "#/components/schemas/TextPartInput"
  6095. },
  6096. {
  6097. "$ref": "#/components/schemas/FilePartInput"
  6098. },
  6099. {
  6100. "$ref": "#/components/schemas/AgentPartInput"
  6101. },
  6102. {
  6103. "$ref": "#/components/schemas/SubtaskPartInput"
  6104. }
  6105. ]
  6106. }
  6107. }
  6108. },
  6109. "required": ["parts"],
  6110. "additionalProperties": false
  6111. }
  6112. }
  6113. }
  6114. },
  6115. "x-codeSamples": [
  6116. {
  6117. "lang": "js",
  6118. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6119. }
  6120. ]
  6121. }
  6122. },
  6123. "/session/{sessionID}/command": {
  6124. "post": {
  6125. "tags": ["session"],
  6126. "operationId": "session.command",
  6127. "parameters": [
  6128. {
  6129. "name": "sessionID",
  6130. "in": "path",
  6131. "schema": {
  6132. "type": "string",
  6133. "pattern": "^ses"
  6134. },
  6135. "required": true
  6136. },
  6137. {
  6138. "name": "directory",
  6139. "in": "query",
  6140. "schema": {
  6141. "type": "string"
  6142. },
  6143. "required": false
  6144. },
  6145. {
  6146. "name": "workspace",
  6147. "in": "query",
  6148. "schema": {
  6149. "type": "string"
  6150. },
  6151. "required": false
  6152. }
  6153. ],
  6154. "responses": {
  6155. "200": {
  6156. "description": "Created message",
  6157. "content": {
  6158. "application/json": {
  6159. "schema": {
  6160. "type": "object",
  6161. "required": ["info", "parts"],
  6162. "properties": {
  6163. "info": {
  6164. "$ref": "#/components/schemas/AssistantMessage"
  6165. },
  6166. "parts": {
  6167. "type": "array",
  6168. "items": {
  6169. "$ref": "#/components/schemas/Part"
  6170. }
  6171. }
  6172. }
  6173. }
  6174. }
  6175. }
  6176. },
  6177. "400": {
  6178. "description": "Bad request",
  6179. "content": {
  6180. "application/json": {
  6181. "schema": {
  6182. "$ref": "#/components/schemas/BadRequestError"
  6183. }
  6184. }
  6185. }
  6186. },
  6187. "404": {
  6188. "description": "Not found",
  6189. "content": {
  6190. "application/json": {
  6191. "schema": {
  6192. "$ref": "#/components/schemas/NotFoundError"
  6193. }
  6194. }
  6195. }
  6196. }
  6197. },
  6198. "description": "Send a new command to a session for execution by the AI assistant.",
  6199. "summary": "Send command",
  6200. "requestBody": {
  6201. "content": {
  6202. "application/json": {
  6203. "schema": {
  6204. "type": "object",
  6205. "properties": {
  6206. "messageID": {
  6207. "type": "string",
  6208. "pattern": "^msg"
  6209. },
  6210. "agent": {
  6211. "type": "string"
  6212. },
  6213. "model": {
  6214. "type": "string"
  6215. },
  6216. "arguments": {
  6217. "type": "string"
  6218. },
  6219. "command": {
  6220. "type": "string"
  6221. },
  6222. "variant": {
  6223. "type": "string"
  6224. },
  6225. "parts": {
  6226. "type": "array",
  6227. "items": {
  6228. "type": "object",
  6229. "properties": {
  6230. "id": {
  6231. "type": "string",
  6232. "pattern": "^prt"
  6233. },
  6234. "type": {
  6235. "type": "string",
  6236. "enum": ["file"]
  6237. },
  6238. "mime": {
  6239. "type": "string"
  6240. },
  6241. "filename": {
  6242. "type": "string"
  6243. },
  6244. "url": {
  6245. "type": "string"
  6246. },
  6247. "source": {
  6248. "$ref": "#/components/schemas/FilePartSource"
  6249. }
  6250. },
  6251. "required": ["type", "mime", "url"],
  6252. "additionalProperties": false
  6253. }
  6254. }
  6255. },
  6256. "required": ["arguments", "command"],
  6257. "additionalProperties": false
  6258. }
  6259. }
  6260. }
  6261. },
  6262. "x-codeSamples": [
  6263. {
  6264. "lang": "js",
  6265. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6266. }
  6267. ]
  6268. }
  6269. },
  6270. "/session/{sessionID}/shell": {
  6271. "post": {
  6272. "tags": ["session"],
  6273. "operationId": "session.shell",
  6274. "parameters": [
  6275. {
  6276. "name": "sessionID",
  6277. "in": "path",
  6278. "schema": {
  6279. "type": "string",
  6280. "pattern": "^ses"
  6281. },
  6282. "required": true
  6283. },
  6284. {
  6285. "name": "directory",
  6286. "in": "query",
  6287. "schema": {
  6288. "type": "string"
  6289. },
  6290. "required": false
  6291. },
  6292. {
  6293. "name": "workspace",
  6294. "in": "query",
  6295. "schema": {
  6296. "type": "string"
  6297. },
  6298. "required": false
  6299. }
  6300. ],
  6301. "responses": {
  6302. "200": {
  6303. "description": "Created message",
  6304. "content": {
  6305. "application/json": {
  6306. "schema": {
  6307. "type": "object",
  6308. "properties": {
  6309. "info": {
  6310. "$ref": "#/components/schemas/Message"
  6311. },
  6312. "parts": {
  6313. "type": "array",
  6314. "items": {
  6315. "$ref": "#/components/schemas/Part"
  6316. }
  6317. }
  6318. },
  6319. "required": ["info", "parts"],
  6320. "additionalProperties": false,
  6321. "description": "Created message"
  6322. }
  6323. }
  6324. }
  6325. },
  6326. "400": {
  6327. "description": "Bad request",
  6328. "content": {
  6329. "application/json": {
  6330. "schema": {
  6331. "$ref": "#/components/schemas/BadRequestError"
  6332. }
  6333. }
  6334. }
  6335. },
  6336. "404": {
  6337. "description": "Not found",
  6338. "content": {
  6339. "application/json": {
  6340. "schema": {
  6341. "$ref": "#/components/schemas/NotFoundError"
  6342. }
  6343. }
  6344. }
  6345. }
  6346. },
  6347. "description": "Execute a shell command within the session context and return the AI's response.",
  6348. "summary": "Run shell command",
  6349. "requestBody": {
  6350. "content": {
  6351. "application/json": {
  6352. "schema": {
  6353. "type": "object",
  6354. "properties": {
  6355. "messageID": {
  6356. "type": "string",
  6357. "pattern": "^msg"
  6358. },
  6359. "agent": {
  6360. "type": "string"
  6361. },
  6362. "model": {
  6363. "type": "object",
  6364. "properties": {
  6365. "providerID": {
  6366. "type": "string"
  6367. },
  6368. "modelID": {
  6369. "type": "string"
  6370. }
  6371. },
  6372. "required": ["providerID", "modelID"],
  6373. "additionalProperties": false
  6374. },
  6375. "command": {
  6376. "type": "string"
  6377. }
  6378. },
  6379. "required": ["agent", "command"],
  6380. "additionalProperties": false
  6381. }
  6382. }
  6383. }
  6384. },
  6385. "x-codeSamples": [
  6386. {
  6387. "lang": "js",
  6388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6389. }
  6390. ]
  6391. }
  6392. },
  6393. "/session/{sessionID}/revert": {
  6394. "post": {
  6395. "tags": ["session"],
  6396. "operationId": "session.revert",
  6397. "parameters": [
  6398. {
  6399. "name": "sessionID",
  6400. "in": "path",
  6401. "schema": {
  6402. "type": "string",
  6403. "pattern": "^ses"
  6404. },
  6405. "required": true
  6406. },
  6407. {
  6408. "name": "directory",
  6409. "in": "query",
  6410. "schema": {
  6411. "type": "string"
  6412. },
  6413. "required": false
  6414. },
  6415. {
  6416. "name": "workspace",
  6417. "in": "query",
  6418. "schema": {
  6419. "type": "string"
  6420. },
  6421. "required": false
  6422. }
  6423. ],
  6424. "responses": {
  6425. "200": {
  6426. "description": "Updated session",
  6427. "content": {
  6428. "application/json": {
  6429. "schema": {
  6430. "$ref": "#/components/schemas/Session"
  6431. }
  6432. }
  6433. }
  6434. },
  6435. "400": {
  6436. "description": "Bad request",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "$ref": "#/components/schemas/BadRequestError"
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "404": {
  6446. "description": "Not found",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/NotFoundError"
  6451. }
  6452. }
  6453. }
  6454. }
  6455. },
  6456. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6457. "summary": "Revert message",
  6458. "requestBody": {
  6459. "content": {
  6460. "application/json": {
  6461. "schema": {
  6462. "type": "object",
  6463. "properties": {
  6464. "messageID": {
  6465. "type": "string",
  6466. "pattern": "^msg"
  6467. },
  6468. "partID": {
  6469. "type": "string",
  6470. "pattern": "^prt"
  6471. }
  6472. },
  6473. "required": ["messageID"],
  6474. "additionalProperties": false
  6475. }
  6476. }
  6477. }
  6478. },
  6479. "x-codeSamples": [
  6480. {
  6481. "lang": "js",
  6482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6483. }
  6484. ]
  6485. }
  6486. },
  6487. "/session/{sessionID}/unrevert": {
  6488. "post": {
  6489. "tags": ["session"],
  6490. "operationId": "session.unrevert",
  6491. "parameters": [
  6492. {
  6493. "name": "sessionID",
  6494. "in": "path",
  6495. "schema": {
  6496. "type": "string",
  6497. "pattern": "^ses"
  6498. },
  6499. "required": true
  6500. },
  6501. {
  6502. "name": "directory",
  6503. "in": "query",
  6504. "schema": {
  6505. "type": "string"
  6506. },
  6507. "required": false
  6508. },
  6509. {
  6510. "name": "workspace",
  6511. "in": "query",
  6512. "schema": {
  6513. "type": "string"
  6514. },
  6515. "required": false
  6516. }
  6517. ],
  6518. "responses": {
  6519. "200": {
  6520. "description": "Updated session",
  6521. "content": {
  6522. "application/json": {
  6523. "schema": {
  6524. "$ref": "#/components/schemas/Session"
  6525. }
  6526. }
  6527. }
  6528. },
  6529. "400": {
  6530. "description": "Bad request",
  6531. "content": {
  6532. "application/json": {
  6533. "schema": {
  6534. "$ref": "#/components/schemas/BadRequestError"
  6535. }
  6536. }
  6537. }
  6538. },
  6539. "404": {
  6540. "description": "Not found",
  6541. "content": {
  6542. "application/json": {
  6543. "schema": {
  6544. "$ref": "#/components/schemas/NotFoundError"
  6545. }
  6546. }
  6547. }
  6548. }
  6549. },
  6550. "description": "Restore all previously reverted messages in a session.",
  6551. "summary": "Restore reverted messages",
  6552. "x-codeSamples": [
  6553. {
  6554. "lang": "js",
  6555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6556. }
  6557. ]
  6558. }
  6559. },
  6560. "/session/{sessionID}/permissions/{permissionID}": {
  6561. "post": {
  6562. "tags": ["session"],
  6563. "operationId": "permission.respond",
  6564. "parameters": [
  6565. {
  6566. "name": "sessionID",
  6567. "in": "path",
  6568. "schema": {
  6569. "type": "string",
  6570. "pattern": "^ses"
  6571. },
  6572. "required": true
  6573. },
  6574. {
  6575. "name": "permissionID",
  6576. "in": "path",
  6577. "schema": {
  6578. "type": "string",
  6579. "pattern": "^per"
  6580. },
  6581. "required": true
  6582. },
  6583. {
  6584. "name": "directory",
  6585. "in": "query",
  6586. "schema": {
  6587. "type": "string"
  6588. },
  6589. "required": false
  6590. },
  6591. {
  6592. "name": "workspace",
  6593. "in": "query",
  6594. "schema": {
  6595. "type": "string"
  6596. },
  6597. "required": false
  6598. }
  6599. ],
  6600. "responses": {
  6601. "200": {
  6602. "description": "Permission processed successfully",
  6603. "content": {
  6604. "application/json": {
  6605. "schema": {
  6606. "type": "boolean",
  6607. "description": "Permission processed successfully"
  6608. }
  6609. }
  6610. }
  6611. },
  6612. "400": {
  6613. "description": "Bad request",
  6614. "content": {
  6615. "application/json": {
  6616. "schema": {
  6617. "$ref": "#/components/schemas/BadRequestError"
  6618. }
  6619. }
  6620. }
  6621. },
  6622. "404": {
  6623. "description": "Not found",
  6624. "content": {
  6625. "application/json": {
  6626. "schema": {
  6627. "$ref": "#/components/schemas/NotFoundError"
  6628. }
  6629. }
  6630. }
  6631. }
  6632. },
  6633. "description": "Approve or deny a permission request from the AI assistant.",
  6634. "summary": "Respond to permission",
  6635. "deprecated": true,
  6636. "requestBody": {
  6637. "content": {
  6638. "application/json": {
  6639. "schema": {
  6640. "type": "object",
  6641. "properties": {
  6642. "response": {
  6643. "type": "string",
  6644. "enum": ["once", "always", "reject"]
  6645. }
  6646. },
  6647. "required": ["response"],
  6648. "additionalProperties": false
  6649. }
  6650. }
  6651. }
  6652. },
  6653. "x-codeSamples": [
  6654. {
  6655. "lang": "js",
  6656. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6657. }
  6658. ]
  6659. }
  6660. },
  6661. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6662. "delete": {
  6663. "tags": ["session"],
  6664. "operationId": "part.delete",
  6665. "parameters": [
  6666. {
  6667. "name": "sessionID",
  6668. "in": "path",
  6669. "schema": {
  6670. "type": "string",
  6671. "pattern": "^ses"
  6672. },
  6673. "required": true
  6674. },
  6675. {
  6676. "name": "messageID",
  6677. "in": "path",
  6678. "schema": {
  6679. "type": "string",
  6680. "pattern": "^msg"
  6681. },
  6682. "required": true
  6683. },
  6684. {
  6685. "name": "partID",
  6686. "in": "path",
  6687. "schema": {
  6688. "type": "string",
  6689. "pattern": "^prt"
  6690. },
  6691. "required": true
  6692. },
  6693. {
  6694. "name": "directory",
  6695. "in": "query",
  6696. "schema": {
  6697. "type": "string"
  6698. },
  6699. "required": false
  6700. },
  6701. {
  6702. "name": "workspace",
  6703. "in": "query",
  6704. "schema": {
  6705. "type": "string"
  6706. },
  6707. "required": false
  6708. }
  6709. ],
  6710. "responses": {
  6711. "200": {
  6712. "description": "Successfully deleted part",
  6713. "content": {
  6714. "application/json": {
  6715. "schema": {
  6716. "type": "boolean",
  6717. "description": "Successfully deleted part"
  6718. }
  6719. }
  6720. }
  6721. },
  6722. "400": {
  6723. "description": "Bad request",
  6724. "content": {
  6725. "application/json": {
  6726. "schema": {
  6727. "$ref": "#/components/schemas/BadRequestError"
  6728. }
  6729. }
  6730. }
  6731. },
  6732. "404": {
  6733. "description": "Not found",
  6734. "content": {
  6735. "application/json": {
  6736. "schema": {
  6737. "$ref": "#/components/schemas/NotFoundError"
  6738. }
  6739. }
  6740. }
  6741. }
  6742. },
  6743. "description": "Delete a part from a message.",
  6744. "x-codeSamples": [
  6745. {
  6746. "lang": "js",
  6747. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6748. }
  6749. ]
  6750. },
  6751. "patch": {
  6752. "tags": ["session"],
  6753. "operationId": "part.update",
  6754. "parameters": [
  6755. {
  6756. "name": "sessionID",
  6757. "in": "path",
  6758. "schema": {
  6759. "type": "string",
  6760. "pattern": "^ses"
  6761. },
  6762. "required": true
  6763. },
  6764. {
  6765. "name": "messageID",
  6766. "in": "path",
  6767. "schema": {
  6768. "type": "string",
  6769. "pattern": "^msg"
  6770. },
  6771. "required": true
  6772. },
  6773. {
  6774. "name": "partID",
  6775. "in": "path",
  6776. "schema": {
  6777. "type": "string",
  6778. "pattern": "^prt"
  6779. },
  6780. "required": true
  6781. },
  6782. {
  6783. "name": "directory",
  6784. "in": "query",
  6785. "schema": {
  6786. "type": "string"
  6787. },
  6788. "required": false
  6789. },
  6790. {
  6791. "name": "workspace",
  6792. "in": "query",
  6793. "schema": {
  6794. "type": "string"
  6795. },
  6796. "required": false
  6797. }
  6798. ],
  6799. "responses": {
  6800. "200": {
  6801. "description": "Successfully updated part",
  6802. "content": {
  6803. "application/json": {
  6804. "schema": {
  6805. "$ref": "#/components/schemas/Part"
  6806. }
  6807. }
  6808. }
  6809. },
  6810. "400": {
  6811. "description": "Bad request",
  6812. "content": {
  6813. "application/json": {
  6814. "schema": {
  6815. "$ref": "#/components/schemas/BadRequestError"
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "404": {
  6821. "description": "Not found",
  6822. "content": {
  6823. "application/json": {
  6824. "schema": {
  6825. "$ref": "#/components/schemas/NotFoundError"
  6826. }
  6827. }
  6828. }
  6829. }
  6830. },
  6831. "description": "Update a part in a message.",
  6832. "requestBody": {
  6833. "content": {
  6834. "application/json": {
  6835. "schema": {
  6836. "$ref": "#/components/schemas/Part"
  6837. }
  6838. }
  6839. }
  6840. },
  6841. "x-codeSamples": [
  6842. {
  6843. "lang": "js",
  6844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6845. }
  6846. ]
  6847. }
  6848. },
  6849. "/sync/start": {
  6850. "post": {
  6851. "tags": ["sync"],
  6852. "operationId": "sync.start",
  6853. "parameters": [
  6854. {
  6855. "name": "directory",
  6856. "in": "query",
  6857. "schema": {
  6858. "type": "string"
  6859. },
  6860. "required": false
  6861. },
  6862. {
  6863. "name": "workspace",
  6864. "in": "query",
  6865. "schema": {
  6866. "type": "string"
  6867. },
  6868. "required": false
  6869. }
  6870. ],
  6871. "responses": {
  6872. "200": {
  6873. "description": "Workspace sync started",
  6874. "content": {
  6875. "application/json": {
  6876. "schema": {
  6877. "type": "boolean",
  6878. "description": "Workspace sync started"
  6879. }
  6880. }
  6881. }
  6882. }
  6883. },
  6884. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6885. "summary": "Start workspace sync",
  6886. "x-codeSamples": [
  6887. {
  6888. "lang": "js",
  6889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6890. }
  6891. ]
  6892. }
  6893. },
  6894. "/sync/replay": {
  6895. "post": {
  6896. "tags": ["sync"],
  6897. "operationId": "sync.replay",
  6898. "parameters": [
  6899. {
  6900. "name": "directory",
  6901. "in": "query",
  6902. "schema": {
  6903. "type": "string"
  6904. },
  6905. "required": false
  6906. },
  6907. {
  6908. "name": "workspace",
  6909. "in": "query",
  6910. "schema": {
  6911. "type": "string"
  6912. },
  6913. "required": false
  6914. }
  6915. ],
  6916. "responses": {
  6917. "200": {
  6918. "description": "Replayed sync events",
  6919. "content": {
  6920. "application/json": {
  6921. "schema": {
  6922. "type": "object",
  6923. "properties": {
  6924. "sessionID": {
  6925. "type": "string"
  6926. }
  6927. },
  6928. "required": ["sessionID"],
  6929. "additionalProperties": false,
  6930. "description": "Replayed sync events"
  6931. }
  6932. }
  6933. }
  6934. },
  6935. "400": {
  6936. "description": "Bad request",
  6937. "content": {
  6938. "application/json": {
  6939. "schema": {
  6940. "$ref": "#/components/schemas/BadRequestError"
  6941. }
  6942. }
  6943. }
  6944. }
  6945. },
  6946. "description": "Validate and replay a complete sync event history.",
  6947. "summary": "Replay sync events",
  6948. "requestBody": {
  6949. "content": {
  6950. "application/json": {
  6951. "schema": {
  6952. "type": "object",
  6953. "properties": {
  6954. "directory": {
  6955. "type": "string"
  6956. },
  6957. "events": {
  6958. "type": "array",
  6959. "minItems": 1,
  6960. "items": {
  6961. "type": "object",
  6962. "properties": {
  6963. "id": {
  6964. "type": "string"
  6965. },
  6966. "aggregateID": {
  6967. "type": "string"
  6968. },
  6969. "seq": {
  6970. "type": "integer",
  6971. "minimum": 0
  6972. },
  6973. "type": {
  6974. "type": "string"
  6975. },
  6976. "data": {
  6977. "type": "object"
  6978. }
  6979. },
  6980. "required": ["id", "aggregateID", "seq", "type", "data"],
  6981. "additionalProperties": false
  6982. }
  6983. }
  6984. },
  6985. "required": ["directory", "events"],
  6986. "additionalProperties": false
  6987. }
  6988. }
  6989. }
  6990. },
  6991. "x-codeSamples": [
  6992. {
  6993. "lang": "js",
  6994. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  6995. }
  6996. ]
  6997. }
  6998. },
  6999. "/sync/steal": {
  7000. "post": {
  7001. "tags": ["sync"],
  7002. "operationId": "sync.steal",
  7003. "parameters": [
  7004. {
  7005. "name": "directory",
  7006. "in": "query",
  7007. "schema": {
  7008. "type": "string"
  7009. },
  7010. "required": false
  7011. },
  7012. {
  7013. "name": "workspace",
  7014. "in": "query",
  7015. "schema": {
  7016. "type": "string"
  7017. },
  7018. "required": false
  7019. }
  7020. ],
  7021. "responses": {
  7022. "200": {
  7023. "description": "Session stolen into workspace",
  7024. "content": {
  7025. "application/json": {
  7026. "schema": {
  7027. "type": "object",
  7028. "properties": {
  7029. "sessionID": {
  7030. "type": "string",
  7031. "pattern": "^ses"
  7032. }
  7033. },
  7034. "required": ["sessionID"],
  7035. "additionalProperties": false,
  7036. "description": "Session stolen into workspace"
  7037. }
  7038. }
  7039. }
  7040. },
  7041. "400": {
  7042. "description": "Bad request",
  7043. "content": {
  7044. "application/json": {
  7045. "schema": {
  7046. "$ref": "#/components/schemas/BadRequestError"
  7047. }
  7048. }
  7049. }
  7050. }
  7051. },
  7052. "description": "Update a session to belong to the current workspace through the sync event system.",
  7053. "summary": "Steal session into workspace",
  7054. "requestBody": {
  7055. "content": {
  7056. "application/json": {
  7057. "schema": {
  7058. "type": "object",
  7059. "properties": {
  7060. "sessionID": {
  7061. "type": "string",
  7062. "pattern": "^ses"
  7063. }
  7064. },
  7065. "required": ["sessionID"],
  7066. "additionalProperties": false
  7067. }
  7068. }
  7069. }
  7070. },
  7071. "x-codeSamples": [
  7072. {
  7073. "lang": "js",
  7074. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7075. }
  7076. ]
  7077. }
  7078. },
  7079. "/sync/history": {
  7080. "post": {
  7081. "tags": ["sync"],
  7082. "operationId": "sync.history.list",
  7083. "parameters": [
  7084. {
  7085. "name": "directory",
  7086. "in": "query",
  7087. "schema": {
  7088. "type": "string"
  7089. },
  7090. "required": false
  7091. },
  7092. {
  7093. "name": "workspace",
  7094. "in": "query",
  7095. "schema": {
  7096. "type": "string"
  7097. },
  7098. "required": false
  7099. }
  7100. ],
  7101. "responses": {
  7102. "200": {
  7103. "description": "Sync events",
  7104. "content": {
  7105. "application/json": {
  7106. "schema": {
  7107. "type": "array",
  7108. "items": {
  7109. "type": "object",
  7110. "properties": {
  7111. "id": {
  7112. "type": "string"
  7113. },
  7114. "aggregate_id": {
  7115. "type": "string"
  7116. },
  7117. "seq": {
  7118. "type": "integer",
  7119. "minimum": 0
  7120. },
  7121. "type": {
  7122. "type": "string"
  7123. },
  7124. "data": {
  7125. "type": "object"
  7126. }
  7127. },
  7128. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7129. "additionalProperties": false
  7130. },
  7131. "description": "Sync events"
  7132. }
  7133. }
  7134. }
  7135. },
  7136. "400": {
  7137. "description": "Bad request",
  7138. "content": {
  7139. "application/json": {
  7140. "schema": {
  7141. "$ref": "#/components/schemas/BadRequestError"
  7142. }
  7143. }
  7144. }
  7145. }
  7146. },
  7147. "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.",
  7148. "summary": "List sync events",
  7149. "requestBody": {
  7150. "content": {
  7151. "application/json": {
  7152. "schema": {
  7153. "type": "object",
  7154. "additionalProperties": {
  7155. "type": "integer",
  7156. "minimum": 0
  7157. }
  7158. }
  7159. }
  7160. }
  7161. },
  7162. "x-codeSamples": [
  7163. {
  7164. "lang": "js",
  7165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7166. }
  7167. ]
  7168. }
  7169. },
  7170. "/api/session": {
  7171. "get": {
  7172. "tags": ["v2"],
  7173. "operationId": "v2.session.list",
  7174. "parameters": [
  7175. {
  7176. "name": "directory",
  7177. "in": "query",
  7178. "schema": {
  7179. "type": "string"
  7180. },
  7181. "required": false
  7182. },
  7183. {
  7184. "name": "workspace",
  7185. "in": "query",
  7186. "schema": {
  7187. "type": "string"
  7188. },
  7189. "required": false
  7190. },
  7191. {
  7192. "name": "limit",
  7193. "in": "query",
  7194. "schema": {
  7195. "type": "number"
  7196. },
  7197. "required": false
  7198. },
  7199. {
  7200. "name": "order",
  7201. "in": "query",
  7202. "schema": {
  7203. "type": "string",
  7204. "enum": ["asc", "desc"]
  7205. },
  7206. "required": false
  7207. },
  7208. {
  7209. "name": "path",
  7210. "in": "query",
  7211. "schema": {
  7212. "type": "string"
  7213. },
  7214. "required": false
  7215. },
  7216. {
  7217. "name": "roots",
  7218. "in": "query",
  7219. "schema": {
  7220. "anyOf": [
  7221. {
  7222. "type": "boolean"
  7223. },
  7224. {
  7225. "type": "string",
  7226. "enum": ["true", "false"]
  7227. }
  7228. ]
  7229. },
  7230. "required": false
  7231. },
  7232. {
  7233. "name": "start",
  7234. "in": "query",
  7235. "schema": {
  7236. "type": "number"
  7237. },
  7238. "required": false
  7239. },
  7240. {
  7241. "name": "search",
  7242. "in": "query",
  7243. "schema": {
  7244. "type": "string"
  7245. },
  7246. "required": false
  7247. },
  7248. {
  7249. "name": "cursor",
  7250. "in": "query",
  7251. "schema": {
  7252. "type": "string",
  7253. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  7254. },
  7255. "required": false
  7256. }
  7257. ],
  7258. "responses": {
  7259. "200": {
  7260. "description": "V2SessionsResponse",
  7261. "content": {
  7262. "application/json": {
  7263. "schema": {
  7264. "$ref": "#/components/schemas/V2SessionsResponse"
  7265. }
  7266. }
  7267. }
  7268. },
  7269. "400": {
  7270. "description": "Bad request",
  7271. "content": {
  7272. "application/json": {
  7273. "schema": {
  7274. "$ref": "#/components/schemas/BadRequestError"
  7275. }
  7276. }
  7277. }
  7278. }
  7279. },
  7280. "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.",
  7281. "summary": "List v2 sessions",
  7282. "x-codeSamples": [
  7283. {
  7284. "lang": "js",
  7285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7286. }
  7287. ]
  7288. }
  7289. },
  7290. "/api/session/{sessionID}/prompt": {
  7291. "post": {
  7292. "tags": ["v2"],
  7293. "operationId": "v2.session.prompt",
  7294. "parameters": [
  7295. {
  7296. "name": "sessionID",
  7297. "in": "path",
  7298. "schema": {
  7299. "type": "string",
  7300. "pattern": "^ses"
  7301. },
  7302. "required": true
  7303. },
  7304. {
  7305. "name": "directory",
  7306. "in": "query",
  7307. "schema": {
  7308. "type": "string"
  7309. },
  7310. "required": false
  7311. },
  7312. {
  7313. "name": "workspace",
  7314. "in": "query",
  7315. "schema": {
  7316. "type": "string"
  7317. },
  7318. "required": false
  7319. }
  7320. ],
  7321. "responses": {
  7322. "200": {
  7323. "description": "Session.Message",
  7324. "content": {
  7325. "application/json": {
  7326. "schema": {
  7327. "$ref": "#/components/schemas/SessionMessage"
  7328. }
  7329. }
  7330. }
  7331. }
  7332. },
  7333. "description": "Create a v2 session message and queue it for the agent loop.",
  7334. "summary": "Send v2 message",
  7335. "requestBody": {
  7336. "content": {
  7337. "application/json": {
  7338. "schema": {
  7339. "type": "object",
  7340. "properties": {
  7341. "prompt": {
  7342. "$ref": "#/components/schemas/Prompt"
  7343. },
  7344. "delivery": {
  7345. "$ref": "#/components/schemas/SessionDelivery"
  7346. }
  7347. },
  7348. "required": ["prompt"],
  7349. "additionalProperties": false
  7350. }
  7351. }
  7352. }
  7353. },
  7354. "x-codeSamples": [
  7355. {
  7356. "lang": "js",
  7357. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7358. }
  7359. ]
  7360. }
  7361. },
  7362. "/api/session/{sessionID}/compact": {
  7363. "post": {
  7364. "tags": ["v2"],
  7365. "operationId": "v2.session.compact",
  7366. "parameters": [
  7367. {
  7368. "name": "sessionID",
  7369. "in": "path",
  7370. "schema": {
  7371. "type": "string",
  7372. "pattern": "^ses"
  7373. },
  7374. "required": true
  7375. },
  7376. {
  7377. "name": "directory",
  7378. "in": "query",
  7379. "schema": {
  7380. "type": "string"
  7381. },
  7382. "required": false
  7383. },
  7384. {
  7385. "name": "workspace",
  7386. "in": "query",
  7387. "schema": {
  7388. "type": "string"
  7389. },
  7390. "required": false
  7391. }
  7392. ],
  7393. "responses": {
  7394. "204": {
  7395. "description": "<No Content>"
  7396. }
  7397. },
  7398. "description": "Compact a v2 session conversation.",
  7399. "summary": "Compact v2 session",
  7400. "x-codeSamples": [
  7401. {
  7402. "lang": "js",
  7403. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7404. }
  7405. ]
  7406. }
  7407. },
  7408. "/api/session/{sessionID}/wait": {
  7409. "post": {
  7410. "tags": ["v2"],
  7411. "operationId": "v2.session.wait",
  7412. "parameters": [
  7413. {
  7414. "name": "sessionID",
  7415. "in": "path",
  7416. "schema": {
  7417. "type": "string",
  7418. "pattern": "^ses"
  7419. },
  7420. "required": true
  7421. },
  7422. {
  7423. "name": "directory",
  7424. "in": "query",
  7425. "schema": {
  7426. "type": "string"
  7427. },
  7428. "required": false
  7429. },
  7430. {
  7431. "name": "workspace",
  7432. "in": "query",
  7433. "schema": {
  7434. "type": "string"
  7435. },
  7436. "required": false
  7437. }
  7438. ],
  7439. "responses": {
  7440. "204": {
  7441. "description": "<No Content>"
  7442. }
  7443. },
  7444. "description": "Wait for a v2 session agent loop to become idle.",
  7445. "summary": "Wait for v2 session",
  7446. "x-codeSamples": [
  7447. {
  7448. "lang": "js",
  7449. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7450. }
  7451. ]
  7452. }
  7453. },
  7454. "/api/session/{sessionID}/context": {
  7455. "get": {
  7456. "tags": ["v2"],
  7457. "operationId": "v2.session.context",
  7458. "parameters": [
  7459. {
  7460. "name": "sessionID",
  7461. "in": "path",
  7462. "schema": {
  7463. "type": "string",
  7464. "pattern": "^ses"
  7465. },
  7466. "required": true
  7467. },
  7468. {
  7469. "name": "directory",
  7470. "in": "query",
  7471. "schema": {
  7472. "type": "string"
  7473. },
  7474. "required": false
  7475. },
  7476. {
  7477. "name": "workspace",
  7478. "in": "query",
  7479. "schema": {
  7480. "type": "string"
  7481. },
  7482. "required": false
  7483. }
  7484. ],
  7485. "responses": {
  7486. "200": {
  7487. "description": "Success",
  7488. "content": {
  7489. "application/json": {
  7490. "schema": {
  7491. "type": "array",
  7492. "items": {
  7493. "$ref": "#/components/schemas/SessionMessage"
  7494. }
  7495. }
  7496. }
  7497. }
  7498. }
  7499. },
  7500. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7501. "summary": "Get v2 session context",
  7502. "x-codeSamples": [
  7503. {
  7504. "lang": "js",
  7505. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7506. }
  7507. ]
  7508. }
  7509. },
  7510. "/api/session/{sessionID}/message": {
  7511. "get": {
  7512. "tags": ["v2 messages"],
  7513. "operationId": "v2.session.messages",
  7514. "parameters": [
  7515. {
  7516. "name": "sessionID",
  7517. "in": "path",
  7518. "schema": {
  7519. "type": "string",
  7520. "pattern": "^ses"
  7521. },
  7522. "required": true
  7523. },
  7524. {
  7525. "name": "directory",
  7526. "in": "query",
  7527. "schema": {
  7528. "type": "string"
  7529. },
  7530. "required": false
  7531. },
  7532. {
  7533. "name": "workspace",
  7534. "in": "query",
  7535. "schema": {
  7536. "type": "string"
  7537. },
  7538. "required": false
  7539. },
  7540. {
  7541. "name": "limit",
  7542. "in": "query",
  7543. "schema": {
  7544. "type": "number"
  7545. },
  7546. "required": false
  7547. },
  7548. {
  7549. "name": "order",
  7550. "in": "query",
  7551. "schema": {
  7552. "type": "string",
  7553. "enum": ["asc", "desc"]
  7554. },
  7555. "required": false
  7556. },
  7557. {
  7558. "name": "cursor",
  7559. "in": "query",
  7560. "schema": {
  7561. "type": "string",
  7562. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  7563. },
  7564. "required": false
  7565. }
  7566. ],
  7567. "responses": {
  7568. "200": {
  7569. "description": "V2SessionMessagesResponse",
  7570. "content": {
  7571. "application/json": {
  7572. "schema": {
  7573. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7574. }
  7575. }
  7576. }
  7577. },
  7578. "400": {
  7579. "description": "Bad request",
  7580. "content": {
  7581. "application/json": {
  7582. "schema": {
  7583. "$ref": "#/components/schemas/BadRequestError"
  7584. }
  7585. }
  7586. }
  7587. }
  7588. },
  7589. "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.",
  7590. "summary": "Get v2 session messages",
  7591. "x-codeSamples": [
  7592. {
  7593. "lang": "js",
  7594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7595. }
  7596. ]
  7597. }
  7598. },
  7599. "/tui/append-prompt": {
  7600. "post": {
  7601. "tags": ["tui"],
  7602. "operationId": "tui.appendPrompt",
  7603. "parameters": [
  7604. {
  7605. "name": "directory",
  7606. "in": "query",
  7607. "schema": {
  7608. "type": "string"
  7609. },
  7610. "required": false
  7611. },
  7612. {
  7613. "name": "workspace",
  7614. "in": "query",
  7615. "schema": {
  7616. "type": "string"
  7617. },
  7618. "required": false
  7619. }
  7620. ],
  7621. "responses": {
  7622. "200": {
  7623. "description": "Prompt processed successfully",
  7624. "content": {
  7625. "application/json": {
  7626. "schema": {
  7627. "type": "boolean",
  7628. "description": "Prompt processed successfully"
  7629. }
  7630. }
  7631. }
  7632. },
  7633. "400": {
  7634. "description": "Bad request",
  7635. "content": {
  7636. "application/json": {
  7637. "schema": {
  7638. "$ref": "#/components/schemas/BadRequestError"
  7639. }
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "description": "Append prompt to the TUI.",
  7645. "summary": "Append TUI prompt",
  7646. "requestBody": {
  7647. "content": {
  7648. "application/json": {
  7649. "schema": {
  7650. "type": "object",
  7651. "properties": {
  7652. "text": {
  7653. "type": "string"
  7654. }
  7655. },
  7656. "required": ["text"],
  7657. "additionalProperties": false
  7658. }
  7659. }
  7660. }
  7661. },
  7662. "x-codeSamples": [
  7663. {
  7664. "lang": "js",
  7665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7666. }
  7667. ]
  7668. }
  7669. },
  7670. "/tui/open-help": {
  7671. "post": {
  7672. "tags": ["tui"],
  7673. "operationId": "tui.openHelp",
  7674. "parameters": [
  7675. {
  7676. "name": "directory",
  7677. "in": "query",
  7678. "schema": {
  7679. "type": "string"
  7680. },
  7681. "required": false
  7682. },
  7683. {
  7684. "name": "workspace",
  7685. "in": "query",
  7686. "schema": {
  7687. "type": "string"
  7688. },
  7689. "required": false
  7690. }
  7691. ],
  7692. "responses": {
  7693. "200": {
  7694. "description": "Help dialog opened successfully",
  7695. "content": {
  7696. "application/json": {
  7697. "schema": {
  7698. "type": "boolean",
  7699. "description": "Help dialog opened successfully"
  7700. }
  7701. }
  7702. }
  7703. }
  7704. },
  7705. "description": "Open the help dialog in the TUI to display user assistance information.",
  7706. "summary": "Open help dialog",
  7707. "x-codeSamples": [
  7708. {
  7709. "lang": "js",
  7710. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7711. }
  7712. ]
  7713. }
  7714. },
  7715. "/tui/open-sessions": {
  7716. "post": {
  7717. "tags": ["tui"],
  7718. "operationId": "tui.openSessions",
  7719. "parameters": [
  7720. {
  7721. "name": "directory",
  7722. "in": "query",
  7723. "schema": {
  7724. "type": "string"
  7725. },
  7726. "required": false
  7727. },
  7728. {
  7729. "name": "workspace",
  7730. "in": "query",
  7731. "schema": {
  7732. "type": "string"
  7733. },
  7734. "required": false
  7735. }
  7736. ],
  7737. "responses": {
  7738. "200": {
  7739. "description": "Session dialog opened successfully",
  7740. "content": {
  7741. "application/json": {
  7742. "schema": {
  7743. "type": "boolean",
  7744. "description": "Session dialog opened successfully"
  7745. }
  7746. }
  7747. }
  7748. }
  7749. },
  7750. "description": "Open the session dialog.",
  7751. "summary": "Open sessions dialog",
  7752. "x-codeSamples": [
  7753. {
  7754. "lang": "js",
  7755. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7756. }
  7757. ]
  7758. }
  7759. },
  7760. "/tui/open-themes": {
  7761. "post": {
  7762. "tags": ["tui"],
  7763. "operationId": "tui.openThemes",
  7764. "parameters": [
  7765. {
  7766. "name": "directory",
  7767. "in": "query",
  7768. "schema": {
  7769. "type": "string"
  7770. },
  7771. "required": false
  7772. },
  7773. {
  7774. "name": "workspace",
  7775. "in": "query",
  7776. "schema": {
  7777. "type": "string"
  7778. },
  7779. "required": false
  7780. }
  7781. ],
  7782. "responses": {
  7783. "200": {
  7784. "description": "Theme dialog opened successfully",
  7785. "content": {
  7786. "application/json": {
  7787. "schema": {
  7788. "type": "boolean",
  7789. "description": "Theme dialog opened successfully"
  7790. }
  7791. }
  7792. }
  7793. }
  7794. },
  7795. "description": "Open the theme dialog.",
  7796. "summary": "Open themes dialog",
  7797. "x-codeSamples": [
  7798. {
  7799. "lang": "js",
  7800. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7801. }
  7802. ]
  7803. }
  7804. },
  7805. "/tui/open-models": {
  7806. "post": {
  7807. "tags": ["tui"],
  7808. "operationId": "tui.openModels",
  7809. "parameters": [
  7810. {
  7811. "name": "directory",
  7812. "in": "query",
  7813. "schema": {
  7814. "type": "string"
  7815. },
  7816. "required": false
  7817. },
  7818. {
  7819. "name": "workspace",
  7820. "in": "query",
  7821. "schema": {
  7822. "type": "string"
  7823. },
  7824. "required": false
  7825. }
  7826. ],
  7827. "responses": {
  7828. "200": {
  7829. "description": "Model dialog opened successfully",
  7830. "content": {
  7831. "application/json": {
  7832. "schema": {
  7833. "type": "boolean",
  7834. "description": "Model dialog opened successfully"
  7835. }
  7836. }
  7837. }
  7838. }
  7839. },
  7840. "description": "Open the model dialog.",
  7841. "summary": "Open models dialog",
  7842. "x-codeSamples": [
  7843. {
  7844. "lang": "js",
  7845. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  7846. }
  7847. ]
  7848. }
  7849. },
  7850. "/tui/submit-prompt": {
  7851. "post": {
  7852. "tags": ["tui"],
  7853. "operationId": "tui.submitPrompt",
  7854. "parameters": [
  7855. {
  7856. "name": "directory",
  7857. "in": "query",
  7858. "schema": {
  7859. "type": "string"
  7860. },
  7861. "required": false
  7862. },
  7863. {
  7864. "name": "workspace",
  7865. "in": "query",
  7866. "schema": {
  7867. "type": "string"
  7868. },
  7869. "required": false
  7870. }
  7871. ],
  7872. "responses": {
  7873. "200": {
  7874. "description": "Prompt submitted successfully",
  7875. "content": {
  7876. "application/json": {
  7877. "schema": {
  7878. "type": "boolean",
  7879. "description": "Prompt submitted successfully"
  7880. }
  7881. }
  7882. }
  7883. }
  7884. },
  7885. "description": "Submit the prompt.",
  7886. "summary": "Submit TUI prompt",
  7887. "x-codeSamples": [
  7888. {
  7889. "lang": "js",
  7890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  7891. }
  7892. ]
  7893. }
  7894. },
  7895. "/tui/clear-prompt": {
  7896. "post": {
  7897. "tags": ["tui"],
  7898. "operationId": "tui.clearPrompt",
  7899. "parameters": [
  7900. {
  7901. "name": "directory",
  7902. "in": "query",
  7903. "schema": {
  7904. "type": "string"
  7905. },
  7906. "required": false
  7907. },
  7908. {
  7909. "name": "workspace",
  7910. "in": "query",
  7911. "schema": {
  7912. "type": "string"
  7913. },
  7914. "required": false
  7915. }
  7916. ],
  7917. "responses": {
  7918. "200": {
  7919. "description": "Prompt cleared successfully",
  7920. "content": {
  7921. "application/json": {
  7922. "schema": {
  7923. "type": "boolean",
  7924. "description": "Prompt cleared successfully"
  7925. }
  7926. }
  7927. }
  7928. }
  7929. },
  7930. "description": "Clear the prompt.",
  7931. "summary": "Clear TUI prompt",
  7932. "x-codeSamples": [
  7933. {
  7934. "lang": "js",
  7935. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  7936. }
  7937. ]
  7938. }
  7939. },
  7940. "/tui/execute-command": {
  7941. "post": {
  7942. "tags": ["tui"],
  7943. "operationId": "tui.executeCommand",
  7944. "parameters": [
  7945. {
  7946. "name": "directory",
  7947. "in": "query",
  7948. "schema": {
  7949. "type": "string"
  7950. },
  7951. "required": false
  7952. },
  7953. {
  7954. "name": "workspace",
  7955. "in": "query",
  7956. "schema": {
  7957. "type": "string"
  7958. },
  7959. "required": false
  7960. }
  7961. ],
  7962. "responses": {
  7963. "200": {
  7964. "description": "Command executed successfully",
  7965. "content": {
  7966. "application/json": {
  7967. "schema": {
  7968. "type": "boolean",
  7969. "description": "Command executed successfully"
  7970. }
  7971. }
  7972. }
  7973. },
  7974. "400": {
  7975. "description": "Bad request",
  7976. "content": {
  7977. "application/json": {
  7978. "schema": {
  7979. "$ref": "#/components/schemas/BadRequestError"
  7980. }
  7981. }
  7982. }
  7983. }
  7984. },
  7985. "description": "Execute a TUI command.",
  7986. "summary": "Execute TUI command",
  7987. "requestBody": {
  7988. "content": {
  7989. "application/json": {
  7990. "schema": {
  7991. "type": "object",
  7992. "properties": {
  7993. "command": {
  7994. "type": "string"
  7995. }
  7996. },
  7997. "required": ["command"],
  7998. "additionalProperties": false
  7999. }
  8000. }
  8001. }
  8002. },
  8003. "x-codeSamples": [
  8004. {
  8005. "lang": "js",
  8006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8007. }
  8008. ]
  8009. }
  8010. },
  8011. "/tui/show-toast": {
  8012. "post": {
  8013. "tags": ["tui"],
  8014. "operationId": "tui.showToast",
  8015. "parameters": [
  8016. {
  8017. "name": "directory",
  8018. "in": "query",
  8019. "schema": {
  8020. "type": "string"
  8021. },
  8022. "required": false
  8023. },
  8024. {
  8025. "name": "workspace",
  8026. "in": "query",
  8027. "schema": {
  8028. "type": "string"
  8029. },
  8030. "required": false
  8031. }
  8032. ],
  8033. "responses": {
  8034. "200": {
  8035. "description": "Toast notification shown successfully",
  8036. "content": {
  8037. "application/json": {
  8038. "schema": {
  8039. "type": "boolean",
  8040. "description": "Toast notification shown successfully"
  8041. }
  8042. }
  8043. }
  8044. }
  8045. },
  8046. "description": "Show a toast notification in the TUI.",
  8047. "summary": "Show TUI toast",
  8048. "requestBody": {
  8049. "content": {
  8050. "application/json": {
  8051. "schema": {
  8052. "type": "object",
  8053. "properties": {
  8054. "title": {
  8055. "type": "string"
  8056. },
  8057. "message": {
  8058. "type": "string"
  8059. },
  8060. "variant": {
  8061. "type": "string",
  8062. "enum": ["info", "success", "warning", "error"]
  8063. },
  8064. "duration": {
  8065. "type": "integer",
  8066. "exclusiveMinimum": 0
  8067. }
  8068. },
  8069. "required": ["message", "variant"],
  8070. "additionalProperties": false
  8071. }
  8072. }
  8073. }
  8074. },
  8075. "x-codeSamples": [
  8076. {
  8077. "lang": "js",
  8078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8079. }
  8080. ]
  8081. }
  8082. },
  8083. "/tui/publish": {
  8084. "post": {
  8085. "tags": ["tui"],
  8086. "operationId": "tui.publish",
  8087. "parameters": [
  8088. {
  8089. "name": "directory",
  8090. "in": "query",
  8091. "schema": {
  8092. "type": "string"
  8093. },
  8094. "required": false
  8095. },
  8096. {
  8097. "name": "workspace",
  8098. "in": "query",
  8099. "schema": {
  8100. "type": "string"
  8101. },
  8102. "required": false
  8103. }
  8104. ],
  8105. "responses": {
  8106. "200": {
  8107. "description": "Event published successfully",
  8108. "content": {
  8109. "application/json": {
  8110. "schema": {
  8111. "type": "boolean",
  8112. "description": "Event published successfully"
  8113. }
  8114. }
  8115. }
  8116. },
  8117. "400": {
  8118. "description": "Bad request",
  8119. "content": {
  8120. "application/json": {
  8121. "schema": {
  8122. "$ref": "#/components/schemas/BadRequestError"
  8123. }
  8124. }
  8125. }
  8126. }
  8127. },
  8128. "description": "Publish a TUI event.",
  8129. "summary": "Publish TUI event",
  8130. "requestBody": {
  8131. "content": {
  8132. "application/json": {
  8133. "schema": {
  8134. "anyOf": [
  8135. {
  8136. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8137. },
  8138. {
  8139. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8140. },
  8141. {
  8142. "$ref": "#/components/schemas/EventTuiToastShow"
  8143. },
  8144. {
  8145. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8146. }
  8147. ]
  8148. }
  8149. }
  8150. }
  8151. },
  8152. "x-codeSamples": [
  8153. {
  8154. "lang": "js",
  8155. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8156. }
  8157. ]
  8158. }
  8159. },
  8160. "/tui/select-session": {
  8161. "post": {
  8162. "tags": ["tui"],
  8163. "operationId": "tui.selectSession",
  8164. "parameters": [
  8165. {
  8166. "name": "directory",
  8167. "in": "query",
  8168. "schema": {
  8169. "type": "string"
  8170. },
  8171. "required": false
  8172. },
  8173. {
  8174. "name": "workspace",
  8175. "in": "query",
  8176. "schema": {
  8177. "type": "string"
  8178. },
  8179. "required": false
  8180. }
  8181. ],
  8182. "responses": {
  8183. "200": {
  8184. "description": "Session selected successfully",
  8185. "content": {
  8186. "application/json": {
  8187. "schema": {
  8188. "type": "boolean",
  8189. "description": "Session selected successfully"
  8190. }
  8191. }
  8192. }
  8193. },
  8194. "400": {
  8195. "description": "Bad request",
  8196. "content": {
  8197. "application/json": {
  8198. "schema": {
  8199. "$ref": "#/components/schemas/BadRequestError"
  8200. }
  8201. }
  8202. }
  8203. },
  8204. "404": {
  8205. "description": "NotFoundError",
  8206. "content": {
  8207. "application/json": {
  8208. "schema": {
  8209. "$ref": "#/components/schemas/NotFoundError"
  8210. }
  8211. }
  8212. }
  8213. }
  8214. },
  8215. "description": "Navigate the TUI to display the specified session.",
  8216. "summary": "Select session",
  8217. "requestBody": {
  8218. "content": {
  8219. "application/json": {
  8220. "schema": {
  8221. "type": "object",
  8222. "properties": {
  8223. "sessionID": {
  8224. "type": "string",
  8225. "pattern": "^ses",
  8226. "description": "Session ID to navigate to"
  8227. }
  8228. },
  8229. "required": ["sessionID"],
  8230. "additionalProperties": false
  8231. }
  8232. }
  8233. }
  8234. },
  8235. "x-codeSamples": [
  8236. {
  8237. "lang": "js",
  8238. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8239. }
  8240. ]
  8241. }
  8242. },
  8243. "/tui/control/next": {
  8244. "get": {
  8245. "tags": ["tui"],
  8246. "operationId": "tui.control.next",
  8247. "parameters": [
  8248. {
  8249. "name": "directory",
  8250. "in": "query",
  8251. "schema": {
  8252. "type": "string"
  8253. },
  8254. "required": false
  8255. },
  8256. {
  8257. "name": "workspace",
  8258. "in": "query",
  8259. "schema": {
  8260. "type": "string"
  8261. },
  8262. "required": false
  8263. }
  8264. ],
  8265. "responses": {
  8266. "200": {
  8267. "description": "Next TUI request",
  8268. "content": {
  8269. "application/json": {
  8270. "schema": {
  8271. "type": "object",
  8272. "properties": {
  8273. "path": {
  8274. "type": "string"
  8275. },
  8276. "body": {}
  8277. },
  8278. "required": ["path", "body"],
  8279. "additionalProperties": false,
  8280. "description": "Next TUI request"
  8281. }
  8282. }
  8283. }
  8284. }
  8285. },
  8286. "description": "Retrieve the next TUI request from the queue for processing.",
  8287. "summary": "Get next TUI request",
  8288. "x-codeSamples": [
  8289. {
  8290. "lang": "js",
  8291. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8292. }
  8293. ]
  8294. }
  8295. },
  8296. "/tui/control/response": {
  8297. "post": {
  8298. "tags": ["tui"],
  8299. "operationId": "tui.control.response",
  8300. "parameters": [
  8301. {
  8302. "name": "directory",
  8303. "in": "query",
  8304. "schema": {
  8305. "type": "string"
  8306. },
  8307. "required": false
  8308. },
  8309. {
  8310. "name": "workspace",
  8311. "in": "query",
  8312. "schema": {
  8313. "type": "string"
  8314. },
  8315. "required": false
  8316. }
  8317. ],
  8318. "responses": {
  8319. "200": {
  8320. "description": "Response submitted successfully",
  8321. "content": {
  8322. "application/json": {
  8323. "schema": {
  8324. "type": "boolean",
  8325. "description": "Response submitted successfully"
  8326. }
  8327. }
  8328. }
  8329. }
  8330. },
  8331. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8332. "summary": "Submit TUI response",
  8333. "requestBody": {
  8334. "content": {
  8335. "application/json": {
  8336. "schema": {}
  8337. }
  8338. }
  8339. },
  8340. "x-codeSamples": [
  8341. {
  8342. "lang": "js",
  8343. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8344. }
  8345. ]
  8346. }
  8347. },
  8348. "/experimental/workspace/adapter": {
  8349. "get": {
  8350. "tags": ["workspace"],
  8351. "operationId": "experimental.workspace.adapter.list",
  8352. "parameters": [
  8353. {
  8354. "name": "directory",
  8355. "in": "query",
  8356. "schema": {
  8357. "type": "string"
  8358. },
  8359. "required": false
  8360. },
  8361. {
  8362. "name": "workspace",
  8363. "in": "query",
  8364. "schema": {
  8365. "type": "string"
  8366. },
  8367. "required": false
  8368. }
  8369. ],
  8370. "responses": {
  8371. "200": {
  8372. "description": "Workspace adapters",
  8373. "content": {
  8374. "application/json": {
  8375. "schema": {
  8376. "type": "array",
  8377. "items": {
  8378. "type": "object",
  8379. "properties": {
  8380. "type": {
  8381. "type": "string"
  8382. },
  8383. "name": {
  8384. "type": "string"
  8385. },
  8386. "description": {
  8387. "type": "string"
  8388. }
  8389. },
  8390. "required": ["type", "name", "description"],
  8391. "additionalProperties": false
  8392. },
  8393. "description": "Workspace adapters"
  8394. }
  8395. }
  8396. }
  8397. }
  8398. },
  8399. "description": "List all available workspace adapters for the current project.",
  8400. "summary": "List workspace adapters",
  8401. "x-codeSamples": [
  8402. {
  8403. "lang": "js",
  8404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8405. }
  8406. ]
  8407. }
  8408. },
  8409. "/experimental/workspace": {
  8410. "get": {
  8411. "tags": ["workspace"],
  8412. "operationId": "experimental.workspace.list",
  8413. "parameters": [
  8414. {
  8415. "name": "directory",
  8416. "in": "query",
  8417. "schema": {
  8418. "type": "string"
  8419. },
  8420. "required": false
  8421. },
  8422. {
  8423. "name": "workspace",
  8424. "in": "query",
  8425. "schema": {
  8426. "type": "string"
  8427. },
  8428. "required": false
  8429. }
  8430. ],
  8431. "responses": {
  8432. "200": {
  8433. "description": "Workspaces",
  8434. "content": {
  8435. "application/json": {
  8436. "schema": {
  8437. "type": "array",
  8438. "items": {
  8439. "$ref": "#/components/schemas/Workspace"
  8440. },
  8441. "description": "Workspaces"
  8442. }
  8443. }
  8444. }
  8445. }
  8446. },
  8447. "description": "List all workspaces.",
  8448. "summary": "List workspaces",
  8449. "x-codeSamples": [
  8450. {
  8451. "lang": "js",
  8452. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8453. }
  8454. ]
  8455. },
  8456. "post": {
  8457. "tags": ["workspace"],
  8458. "operationId": "experimental.workspace.create",
  8459. "parameters": [
  8460. {
  8461. "name": "directory",
  8462. "in": "query",
  8463. "schema": {
  8464. "type": "string"
  8465. },
  8466. "required": false
  8467. },
  8468. {
  8469. "name": "workspace",
  8470. "in": "query",
  8471. "schema": {
  8472. "type": "string"
  8473. },
  8474. "required": false
  8475. }
  8476. ],
  8477. "responses": {
  8478. "200": {
  8479. "description": "Workspace created",
  8480. "content": {
  8481. "application/json": {
  8482. "schema": {
  8483. "$ref": "#/components/schemas/Workspace"
  8484. }
  8485. }
  8486. }
  8487. },
  8488. "400": {
  8489. "description": "Bad request",
  8490. "content": {
  8491. "application/json": {
  8492. "schema": {
  8493. "$ref": "#/components/schemas/BadRequestError"
  8494. }
  8495. }
  8496. }
  8497. }
  8498. },
  8499. "description": "Create a workspace for the current project.",
  8500. "summary": "Create workspace",
  8501. "requestBody": {
  8502. "content": {
  8503. "application/json": {
  8504. "schema": {
  8505. "type": "object",
  8506. "properties": {
  8507. "id": {
  8508. "type": "string",
  8509. "pattern": "^wrk"
  8510. },
  8511. "type": {
  8512. "type": "string"
  8513. },
  8514. "branch": {
  8515. "anyOf": [
  8516. {
  8517. "type": "string"
  8518. },
  8519. {
  8520. "type": "null"
  8521. }
  8522. ]
  8523. },
  8524. "extra": {
  8525. "anyOf": [
  8526. {},
  8527. {
  8528. "type": "null"
  8529. }
  8530. ]
  8531. }
  8532. },
  8533. "required": ["type", "branch"],
  8534. "additionalProperties": false
  8535. }
  8536. }
  8537. }
  8538. },
  8539. "x-codeSamples": [
  8540. {
  8541. "lang": "js",
  8542. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8543. }
  8544. ]
  8545. }
  8546. },
  8547. "/experimental/workspace/sync-list": {
  8548. "post": {
  8549. "tags": ["workspace"],
  8550. "operationId": "experimental.workspace.syncList",
  8551. "parameters": [
  8552. {
  8553. "name": "directory",
  8554. "in": "query",
  8555. "schema": {
  8556. "type": "string"
  8557. },
  8558. "required": false
  8559. },
  8560. {
  8561. "name": "workspace",
  8562. "in": "query",
  8563. "schema": {
  8564. "type": "string"
  8565. },
  8566. "required": false
  8567. }
  8568. ],
  8569. "responses": {
  8570. "204": {
  8571. "description": "Workspace list synced"
  8572. }
  8573. },
  8574. "description": "Register missing workspaces returned by workspace adapters.",
  8575. "summary": "Sync workspace list",
  8576. "x-codeSamples": [
  8577. {
  8578. "lang": "js",
  8579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8580. }
  8581. ]
  8582. }
  8583. },
  8584. "/experimental/workspace/status": {
  8585. "get": {
  8586. "tags": ["workspace"],
  8587. "operationId": "experimental.workspace.status",
  8588. "parameters": [
  8589. {
  8590. "name": "directory",
  8591. "in": "query",
  8592. "schema": {
  8593. "type": "string"
  8594. },
  8595. "required": false
  8596. },
  8597. {
  8598. "name": "workspace",
  8599. "in": "query",
  8600. "schema": {
  8601. "type": "string"
  8602. },
  8603. "required": false
  8604. }
  8605. ],
  8606. "responses": {
  8607. "200": {
  8608. "description": "Workspace status",
  8609. "content": {
  8610. "application/json": {
  8611. "schema": {
  8612. "type": "array",
  8613. "items": {
  8614. "type": "object",
  8615. "properties": {
  8616. "workspaceID": {
  8617. "type": "string",
  8618. "pattern": "^wrk"
  8619. },
  8620. "status": {
  8621. "type": "string",
  8622. "enum": ["connected", "connecting", "disconnected", "error"]
  8623. }
  8624. },
  8625. "required": ["workspaceID", "status"],
  8626. "additionalProperties": false
  8627. },
  8628. "description": "Workspace status"
  8629. }
  8630. }
  8631. }
  8632. }
  8633. },
  8634. "description": "Get connection status for workspaces in the current project.",
  8635. "summary": "Workspace status",
  8636. "x-codeSamples": [
  8637. {
  8638. "lang": "js",
  8639. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8640. }
  8641. ]
  8642. }
  8643. },
  8644. "/experimental/workspace/{id}": {
  8645. "delete": {
  8646. "tags": ["workspace"],
  8647. "operationId": "experimental.workspace.remove",
  8648. "parameters": [
  8649. {
  8650. "name": "id",
  8651. "in": "path",
  8652. "schema": {
  8653. "type": "string",
  8654. "pattern": "^wrk"
  8655. },
  8656. "required": true
  8657. },
  8658. {
  8659. "name": "directory",
  8660. "in": "query",
  8661. "schema": {
  8662. "type": "string"
  8663. },
  8664. "required": false
  8665. },
  8666. {
  8667. "name": "workspace",
  8668. "in": "query",
  8669. "schema": {
  8670. "type": "string"
  8671. },
  8672. "required": false
  8673. }
  8674. ],
  8675. "responses": {
  8676. "200": {
  8677. "description": "Workspace removed",
  8678. "content": {
  8679. "application/json": {
  8680. "schema": {
  8681. "$ref": "#/components/schemas/Workspace"
  8682. }
  8683. }
  8684. }
  8685. },
  8686. "400": {
  8687. "description": "Bad request",
  8688. "content": {
  8689. "application/json": {
  8690. "schema": {
  8691. "$ref": "#/components/schemas/BadRequestError"
  8692. }
  8693. }
  8694. }
  8695. }
  8696. },
  8697. "description": "Remove an existing workspace.",
  8698. "summary": "Remove workspace",
  8699. "x-codeSamples": [
  8700. {
  8701. "lang": "js",
  8702. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8703. }
  8704. ]
  8705. }
  8706. },
  8707. "/experimental/workspace/warp": {
  8708. "post": {
  8709. "tags": ["workspace"],
  8710. "operationId": "experimental.workspace.warp",
  8711. "parameters": [
  8712. {
  8713. "name": "directory",
  8714. "in": "query",
  8715. "schema": {
  8716. "type": "string"
  8717. },
  8718. "required": false
  8719. },
  8720. {
  8721. "name": "workspace",
  8722. "in": "query",
  8723. "schema": {
  8724. "type": "string"
  8725. },
  8726. "required": false
  8727. }
  8728. ],
  8729. "responses": {
  8730. "204": {
  8731. "description": "Session warped"
  8732. },
  8733. "400": {
  8734. "description": "WorkspaceWarpError | VcsApplyError",
  8735. "content": {
  8736. "application/json": {
  8737. "schema": {
  8738. "anyOf": [
  8739. {
  8740. "$ref": "#/components/schemas/WorkspaceWarpError"
  8741. },
  8742. {
  8743. "$ref": "#/components/schemas/VcsApplyError"
  8744. }
  8745. ]
  8746. }
  8747. }
  8748. }
  8749. }
  8750. },
  8751. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8752. "summary": "Warp session into workspace",
  8753. "requestBody": {
  8754. "content": {
  8755. "application/json": {
  8756. "schema": {
  8757. "type": "object",
  8758. "properties": {
  8759. "id": {
  8760. "anyOf": [
  8761. {
  8762. "type": "string",
  8763. "pattern": "^wrk"
  8764. },
  8765. {
  8766. "type": "null"
  8767. }
  8768. ]
  8769. },
  8770. "sessionID": {
  8771. "type": "string",
  8772. "pattern": "^ses"
  8773. },
  8774. "copyChanges": {
  8775. "type": "boolean"
  8776. }
  8777. },
  8778. "required": ["id", "sessionID"],
  8779. "additionalProperties": false
  8780. }
  8781. }
  8782. }
  8783. },
  8784. "x-codeSamples": [
  8785. {
  8786. "lang": "js",
  8787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8788. }
  8789. ]
  8790. }
  8791. },
  8792. "/pty/{ptyID}/connect": {
  8793. "get": {
  8794. "tags": ["pty"],
  8795. "operationId": "pty.connect",
  8796. "parameters": [
  8797. {
  8798. "name": "ptyID",
  8799. "in": "path",
  8800. "schema": {
  8801. "type": "string",
  8802. "pattern": "^pty"
  8803. },
  8804. "required": true
  8805. },
  8806. {
  8807. "name": "directory",
  8808. "in": "query",
  8809. "schema": {
  8810. "type": "string"
  8811. },
  8812. "required": false
  8813. },
  8814. {
  8815. "name": "workspace",
  8816. "in": "query",
  8817. "schema": {
  8818. "type": "string"
  8819. },
  8820. "required": false
  8821. }
  8822. ],
  8823. "responses": {
  8824. "200": {
  8825. "description": "Connected session",
  8826. "content": {
  8827. "application/json": {
  8828. "schema": {
  8829. "type": "boolean",
  8830. "description": "Connected session"
  8831. }
  8832. }
  8833. }
  8834. },
  8835. "403": {
  8836. "description": "Forbidden",
  8837. "content": {
  8838. "application/json": {
  8839. "schema": {
  8840. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  8841. }
  8842. }
  8843. }
  8844. },
  8845. "404": {
  8846. "description": "Not found",
  8847. "content": {
  8848. "application/json": {
  8849. "schema": {
  8850. "$ref": "#/components/schemas/NotFoundError"
  8851. }
  8852. }
  8853. }
  8854. }
  8855. },
  8856. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  8857. "summary": "Connect to PTY session",
  8858. "x-codeSamples": [
  8859. {
  8860. "lang": "js",
  8861. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  8862. }
  8863. ]
  8864. }
  8865. }
  8866. },
  8867. "components": {
  8868. "schemas": {
  8869. "Event": {
  8870. "anyOf": [
  8871. {
  8872. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  8873. },
  8874. {
  8875. "$ref": "#/components/schemas/EventFileEdited"
  8876. },
  8877. {
  8878. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  8879. },
  8880. {
  8881. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  8882. },
  8883. {
  8884. "$ref": "#/components/schemas/EventLspUpdated"
  8885. },
  8886. {
  8887. "$ref": "#/components/schemas/EventMessagePartDelta"
  8888. },
  8889. {
  8890. "$ref": "#/components/schemas/EventPermissionAsked"
  8891. },
  8892. {
  8893. "$ref": "#/components/schemas/EventPermissionReplied"
  8894. },
  8895. {
  8896. "$ref": "#/components/schemas/EventSessionDiff"
  8897. },
  8898. {
  8899. "$ref": "#/components/schemas/EventSessionError"
  8900. },
  8901. {
  8902. "$ref": "#/components/schemas/EventInstallationUpdated"
  8903. },
  8904. {
  8905. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  8906. },
  8907. {
  8908. "$ref": "#/components/schemas/EventQuestionAsked"
  8909. },
  8910. {
  8911. "$ref": "#/components/schemas/EventQuestionReplied"
  8912. },
  8913. {
  8914. "$ref": "#/components/schemas/EventQuestionRejected"
  8915. },
  8916. {
  8917. "$ref": "#/components/schemas/EventTodoUpdated"
  8918. },
  8919. {
  8920. "$ref": "#/components/schemas/EventSessionStatus"
  8921. },
  8922. {
  8923. "$ref": "#/components/schemas/EventSessionIdle"
  8924. },
  8925. {
  8926. "$ref": "#/components/schemas/EventSessionCompacted"
  8927. },
  8928. {
  8929. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8930. },
  8931. {
  8932. "$ref": "#/components/schemas/Event.tui.command.execute"
  8933. },
  8934. {
  8935. "$ref": "#/components/schemas/EventTuiToastShow1"
  8936. },
  8937. {
  8938. "$ref": "#/components/schemas/Event.tui.session.select"
  8939. },
  8940. {
  8941. "$ref": "#/components/schemas/EventMcpToolsChanged"
  8942. },
  8943. {
  8944. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  8945. },
  8946. {
  8947. "$ref": "#/components/schemas/EventCommandExecuted"
  8948. },
  8949. {
  8950. "$ref": "#/components/schemas/EventProjectUpdated"
  8951. },
  8952. {
  8953. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  8954. },
  8955. {
  8956. "$ref": "#/components/schemas/EventWorkspaceReady"
  8957. },
  8958. {
  8959. "$ref": "#/components/schemas/EventWorkspaceFailed"
  8960. },
  8961. {
  8962. "$ref": "#/components/schemas/EventWorkspaceStatus"
  8963. },
  8964. {
  8965. "$ref": "#/components/schemas/EventWorktreeReady"
  8966. },
  8967. {
  8968. "$ref": "#/components/schemas/EventWorktreeFailed"
  8969. },
  8970. {
  8971. "$ref": "#/components/schemas/EventPtyCreated"
  8972. },
  8973. {
  8974. "$ref": "#/components/schemas/EventPtyUpdated"
  8975. },
  8976. {
  8977. "$ref": "#/components/schemas/EventPtyExited"
  8978. },
  8979. {
  8980. "$ref": "#/components/schemas/EventPtyDeleted"
  8981. },
  8982. {
  8983. "$ref": "#/components/schemas/EventMessageUpdated"
  8984. },
  8985. {
  8986. "$ref": "#/components/schemas/EventMessageRemoved"
  8987. },
  8988. {
  8989. "$ref": "#/components/schemas/EventMessagePartUpdated"
  8990. },
  8991. {
  8992. "$ref": "#/components/schemas/EventMessagePartRemoved"
  8993. },
  8994. {
  8995. "$ref": "#/components/schemas/EventSessionCreated"
  8996. },
  8997. {
  8998. "$ref": "#/components/schemas/EventSessionUpdated"
  8999. },
  9000. {
  9001. "$ref": "#/components/schemas/EventSessionDeleted"
  9002. },
  9003. {
  9004. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9005. },
  9006. {
  9007. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9008. },
  9009. {
  9010. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9011. },
  9012. {
  9013. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9014. },
  9015. {
  9016. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9017. },
  9018. {
  9019. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9020. },
  9021. {
  9022. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9023. },
  9024. {
  9025. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9026. },
  9027. {
  9028. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9029. },
  9030. {
  9031. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9032. },
  9033. {
  9034. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9035. },
  9036. {
  9037. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9038. },
  9039. {
  9040. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9041. },
  9042. {
  9043. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9044. },
  9045. {
  9046. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9047. },
  9048. {
  9049. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9050. },
  9051. {
  9052. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9053. },
  9054. {
  9055. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9056. },
  9057. {
  9058. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9059. },
  9060. {
  9061. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9062. },
  9063. {
  9064. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9065. },
  9066. {
  9067. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9068. },
  9069. {
  9070. "$ref": "#/components/schemas/EventSessionNextRetried"
  9071. },
  9072. {
  9073. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9074. },
  9075. {
  9076. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9077. },
  9078. {
  9079. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9080. },
  9081. {
  9082. "$ref": "#/components/schemas/EventServerConnected"
  9083. },
  9084. {
  9085. "$ref": "#/components/schemas/EventGlobalDisposed"
  9086. }
  9087. ]
  9088. },
  9089. "OAuth": {
  9090. "type": "object",
  9091. "properties": {
  9092. "type": {
  9093. "type": "string",
  9094. "enum": ["oauth"]
  9095. },
  9096. "refresh": {
  9097. "type": "string"
  9098. },
  9099. "access": {
  9100. "type": "string"
  9101. },
  9102. "expires": {
  9103. "type": "integer",
  9104. "minimum": 0
  9105. },
  9106. "accountId": {
  9107. "type": "string"
  9108. },
  9109. "enterpriseUrl": {
  9110. "type": "string"
  9111. }
  9112. },
  9113. "required": ["type", "refresh", "access", "expires"],
  9114. "additionalProperties": false
  9115. },
  9116. "ApiAuth": {
  9117. "type": "object",
  9118. "properties": {
  9119. "type": {
  9120. "type": "string",
  9121. "enum": ["api"]
  9122. },
  9123. "key": {
  9124. "type": "string"
  9125. },
  9126. "metadata": {
  9127. "type": "object",
  9128. "additionalProperties": {
  9129. "type": "string"
  9130. }
  9131. }
  9132. },
  9133. "required": ["type", "key"],
  9134. "additionalProperties": false
  9135. },
  9136. "WellKnownAuth": {
  9137. "type": "object",
  9138. "properties": {
  9139. "type": {
  9140. "type": "string",
  9141. "enum": ["wellknown"]
  9142. },
  9143. "key": {
  9144. "type": "string"
  9145. },
  9146. "token": {
  9147. "type": "string"
  9148. }
  9149. },
  9150. "required": ["type", "key", "token"],
  9151. "additionalProperties": false
  9152. },
  9153. "Auth": {
  9154. "anyOf": [
  9155. {
  9156. "$ref": "#/components/schemas/OAuth"
  9157. },
  9158. {
  9159. "$ref": "#/components/schemas/ApiAuth"
  9160. },
  9161. {
  9162. "$ref": "#/components/schemas/WellKnownAuth"
  9163. }
  9164. ]
  9165. },
  9166. "PermissionRequest": {
  9167. "type": "object",
  9168. "properties": {
  9169. "id": {
  9170. "type": "string",
  9171. "pattern": "^per"
  9172. },
  9173. "sessionID": {
  9174. "type": "string",
  9175. "pattern": "^ses"
  9176. },
  9177. "permission": {
  9178. "type": "string"
  9179. },
  9180. "patterns": {
  9181. "type": "array",
  9182. "items": {
  9183. "type": "string"
  9184. }
  9185. },
  9186. "metadata": {
  9187. "type": "object"
  9188. },
  9189. "always": {
  9190. "type": "array",
  9191. "items": {
  9192. "type": "string"
  9193. }
  9194. },
  9195. "tool": {
  9196. "type": "object",
  9197. "properties": {
  9198. "messageID": {
  9199. "type": "string",
  9200. "pattern": "^msg"
  9201. },
  9202. "callID": {
  9203. "type": "string"
  9204. }
  9205. },
  9206. "required": ["messageID", "callID"],
  9207. "additionalProperties": false
  9208. }
  9209. },
  9210. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9211. "additionalProperties": false
  9212. },
  9213. "SnapshotFileDiff": {
  9214. "type": "object",
  9215. "properties": {
  9216. "file": {
  9217. "type": "string"
  9218. },
  9219. "patch": {
  9220. "type": "string"
  9221. },
  9222. "additions": {
  9223. "type": "number"
  9224. },
  9225. "deletions": {
  9226. "type": "number"
  9227. },
  9228. "status": {
  9229. "type": "string",
  9230. "enum": ["added", "deleted", "modified"]
  9231. }
  9232. },
  9233. "required": ["additions", "deletions"],
  9234. "additionalProperties": false
  9235. },
  9236. "ProviderAuthError": {
  9237. "type": "object",
  9238. "properties": {
  9239. "name": {
  9240. "type": "string",
  9241. "enum": ["ProviderAuthError"]
  9242. },
  9243. "data": {
  9244. "type": "object",
  9245. "properties": {
  9246. "providerID": {
  9247. "type": "string"
  9248. },
  9249. "message": {
  9250. "type": "string"
  9251. }
  9252. },
  9253. "required": ["providerID", "message"],
  9254. "additionalProperties": false
  9255. }
  9256. },
  9257. "required": ["name", "data"],
  9258. "additionalProperties": false
  9259. },
  9260. "UnknownError": {
  9261. "type": "object",
  9262. "properties": {
  9263. "name": {
  9264. "type": "string",
  9265. "enum": ["UnknownError"]
  9266. },
  9267. "data": {
  9268. "type": "object",
  9269. "properties": {
  9270. "message": {
  9271. "type": "string"
  9272. }
  9273. },
  9274. "required": ["message"],
  9275. "additionalProperties": false
  9276. }
  9277. },
  9278. "required": ["name", "data"],
  9279. "additionalProperties": false
  9280. },
  9281. "MessageOutputLengthError": {
  9282. "type": "object",
  9283. "properties": {
  9284. "name": {
  9285. "type": "string",
  9286. "enum": ["MessageOutputLengthError"]
  9287. },
  9288. "data": {
  9289. "type": "object",
  9290. "properties": {}
  9291. }
  9292. },
  9293. "required": ["name", "data"],
  9294. "additionalProperties": false
  9295. },
  9296. "MessageAbortedError": {
  9297. "type": "object",
  9298. "properties": {
  9299. "name": {
  9300. "type": "string",
  9301. "enum": ["MessageAbortedError"]
  9302. },
  9303. "data": {
  9304. "type": "object",
  9305. "properties": {
  9306. "message": {
  9307. "type": "string"
  9308. }
  9309. },
  9310. "required": ["message"],
  9311. "additionalProperties": false
  9312. }
  9313. },
  9314. "required": ["name", "data"],
  9315. "additionalProperties": false
  9316. },
  9317. "StructuredOutputError": {
  9318. "type": "object",
  9319. "properties": {
  9320. "name": {
  9321. "type": "string",
  9322. "enum": ["StructuredOutputError"]
  9323. },
  9324. "data": {
  9325. "type": "object",
  9326. "properties": {
  9327. "message": {
  9328. "type": "string"
  9329. },
  9330. "retries": {
  9331. "type": "integer",
  9332. "minimum": 0
  9333. }
  9334. },
  9335. "required": ["message", "retries"],
  9336. "additionalProperties": false
  9337. }
  9338. },
  9339. "required": ["name", "data"],
  9340. "additionalProperties": false
  9341. },
  9342. "ContextOverflowError": {
  9343. "type": "object",
  9344. "properties": {
  9345. "name": {
  9346. "type": "string",
  9347. "enum": ["ContextOverflowError"]
  9348. },
  9349. "data": {
  9350. "type": "object",
  9351. "properties": {
  9352. "message": {
  9353. "type": "string"
  9354. },
  9355. "responseBody": {
  9356. "type": "string"
  9357. }
  9358. },
  9359. "required": ["message"],
  9360. "additionalProperties": false
  9361. }
  9362. },
  9363. "required": ["name", "data"],
  9364. "additionalProperties": false
  9365. },
  9366. "APIError": {
  9367. "type": "object",
  9368. "properties": {
  9369. "name": {
  9370. "type": "string",
  9371. "enum": ["APIError"]
  9372. },
  9373. "data": {
  9374. "type": "object",
  9375. "properties": {
  9376. "message": {
  9377. "type": "string"
  9378. },
  9379. "statusCode": {
  9380. "type": "integer",
  9381. "minimum": 0
  9382. },
  9383. "isRetryable": {
  9384. "type": "boolean"
  9385. },
  9386. "responseHeaders": {
  9387. "type": "object",
  9388. "additionalProperties": {
  9389. "type": "string"
  9390. }
  9391. },
  9392. "responseBody": {
  9393. "type": "string"
  9394. },
  9395. "metadata": {
  9396. "type": "object",
  9397. "additionalProperties": {
  9398. "type": "string"
  9399. }
  9400. }
  9401. },
  9402. "required": ["message", "isRetryable"],
  9403. "additionalProperties": false
  9404. }
  9405. },
  9406. "required": ["name", "data"],
  9407. "additionalProperties": false
  9408. },
  9409. "QuestionOption": {
  9410. "type": "object",
  9411. "properties": {
  9412. "label": {
  9413. "type": "string",
  9414. "description": "Display text (1-5 words, concise)"
  9415. },
  9416. "description": {
  9417. "type": "string",
  9418. "description": "Explanation of choice"
  9419. }
  9420. },
  9421. "required": ["label", "description"],
  9422. "additionalProperties": false
  9423. },
  9424. "QuestionInfo": {
  9425. "type": "object",
  9426. "properties": {
  9427. "question": {
  9428. "type": "string",
  9429. "description": "Complete question"
  9430. },
  9431. "header": {
  9432. "type": "string",
  9433. "description": "Very short label (max 30 chars)"
  9434. },
  9435. "options": {
  9436. "type": "array",
  9437. "items": {
  9438. "$ref": "#/components/schemas/QuestionOption"
  9439. },
  9440. "description": "Available choices"
  9441. },
  9442. "multiple": {
  9443. "type": "boolean"
  9444. },
  9445. "custom": {
  9446. "type": "boolean"
  9447. }
  9448. },
  9449. "required": ["question", "header", "options"],
  9450. "additionalProperties": false
  9451. },
  9452. "QuestionTool": {
  9453. "type": "object",
  9454. "properties": {
  9455. "messageID": {
  9456. "type": "string",
  9457. "pattern": "^msg"
  9458. },
  9459. "callID": {
  9460. "type": "string"
  9461. }
  9462. },
  9463. "required": ["messageID", "callID"],
  9464. "additionalProperties": false
  9465. },
  9466. "QuestionRequest": {
  9467. "type": "object",
  9468. "properties": {
  9469. "id": {
  9470. "type": "string",
  9471. "pattern": "^que"
  9472. },
  9473. "sessionID": {
  9474. "type": "string",
  9475. "pattern": "^ses"
  9476. },
  9477. "questions": {
  9478. "type": "array",
  9479. "items": {
  9480. "$ref": "#/components/schemas/QuestionInfo"
  9481. },
  9482. "description": "Questions to ask"
  9483. },
  9484. "tool": {
  9485. "$ref": "#/components/schemas/QuestionTool"
  9486. }
  9487. },
  9488. "required": ["id", "sessionID", "questions"],
  9489. "additionalProperties": false
  9490. },
  9491. "QuestionAnswer": {
  9492. "type": "array",
  9493. "items": {
  9494. "type": "string"
  9495. }
  9496. },
  9497. "QuestionReplied": {
  9498. "type": "object",
  9499. "properties": {
  9500. "sessionID": {
  9501. "type": "string",
  9502. "pattern": "^ses"
  9503. },
  9504. "requestID": {
  9505. "type": "string",
  9506. "pattern": "^que"
  9507. },
  9508. "answers": {
  9509. "type": "array",
  9510. "items": {
  9511. "$ref": "#/components/schemas/QuestionAnswer"
  9512. }
  9513. }
  9514. },
  9515. "required": ["sessionID", "requestID", "answers"],
  9516. "additionalProperties": false
  9517. },
  9518. "QuestionRejected": {
  9519. "type": "object",
  9520. "properties": {
  9521. "sessionID": {
  9522. "type": "string",
  9523. "pattern": "^ses"
  9524. },
  9525. "requestID": {
  9526. "type": "string",
  9527. "pattern": "^que"
  9528. }
  9529. },
  9530. "required": ["sessionID", "requestID"],
  9531. "additionalProperties": false
  9532. },
  9533. "Todo": {
  9534. "type": "object",
  9535. "properties": {
  9536. "content": {
  9537. "type": "string",
  9538. "description": "Brief description of the task"
  9539. },
  9540. "status": {
  9541. "type": "string",
  9542. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9543. },
  9544. "priority": {
  9545. "type": "string",
  9546. "description": "Priority level of the task: high, medium, low"
  9547. }
  9548. },
  9549. "required": ["content", "status", "priority"],
  9550. "additionalProperties": false
  9551. },
  9552. "SessionStatus": {
  9553. "anyOf": [
  9554. {
  9555. "type": "object",
  9556. "properties": {
  9557. "type": {
  9558. "type": "string",
  9559. "enum": ["idle"]
  9560. }
  9561. },
  9562. "required": ["type"],
  9563. "additionalProperties": false
  9564. },
  9565. {
  9566. "type": "object",
  9567. "properties": {
  9568. "type": {
  9569. "type": "string",
  9570. "enum": ["retry"]
  9571. },
  9572. "attempt": {
  9573. "type": "integer",
  9574. "minimum": 0
  9575. },
  9576. "message": {
  9577. "type": "string"
  9578. },
  9579. "action": {
  9580. "type": "object",
  9581. "properties": {
  9582. "reason": {
  9583. "type": "string"
  9584. },
  9585. "provider": {
  9586. "type": "string"
  9587. },
  9588. "title": {
  9589. "type": "string"
  9590. },
  9591. "message": {
  9592. "type": "string"
  9593. },
  9594. "label": {
  9595. "type": "string"
  9596. },
  9597. "link": {
  9598. "type": "string"
  9599. }
  9600. },
  9601. "required": ["reason", "provider", "title", "message", "label"],
  9602. "additionalProperties": false
  9603. },
  9604. "next": {
  9605. "type": "integer",
  9606. "minimum": 0
  9607. }
  9608. },
  9609. "required": ["type", "attempt", "message", "next"],
  9610. "additionalProperties": false
  9611. },
  9612. {
  9613. "type": "object",
  9614. "properties": {
  9615. "type": {
  9616. "type": "string",
  9617. "enum": ["busy"]
  9618. }
  9619. },
  9620. "required": ["type"],
  9621. "additionalProperties": false
  9622. }
  9623. ]
  9624. },
  9625. "Event.tui.prompt.append": {
  9626. "type": "object",
  9627. "properties": {
  9628. "id": {
  9629. "type": "string"
  9630. },
  9631. "type": {
  9632. "type": "string",
  9633. "enum": ["tui.prompt.append"]
  9634. },
  9635. "properties": {
  9636. "type": "object",
  9637. "properties": {
  9638. "text": {
  9639. "type": "string"
  9640. }
  9641. },
  9642. "required": ["text"],
  9643. "additionalProperties": false
  9644. }
  9645. },
  9646. "required": ["id", "type", "properties"],
  9647. "additionalProperties": false
  9648. },
  9649. "Event.tui.command.execute": {
  9650. "type": "object",
  9651. "properties": {
  9652. "id": {
  9653. "type": "string"
  9654. },
  9655. "type": {
  9656. "type": "string",
  9657. "enum": ["tui.command.execute"]
  9658. },
  9659. "properties": {
  9660. "type": "object",
  9661. "properties": {
  9662. "command": {
  9663. "anyOf": [
  9664. {
  9665. "type": "string",
  9666. "enum": [
  9667. "session.list",
  9668. "session.new",
  9669. "session.share",
  9670. "session.interrupt",
  9671. "session.compact",
  9672. "session.page.up",
  9673. "session.page.down",
  9674. "session.line.up",
  9675. "session.line.down",
  9676. "session.half.page.up",
  9677. "session.half.page.down",
  9678. "session.first",
  9679. "session.last",
  9680. "prompt.clear",
  9681. "prompt.submit",
  9682. "agent.cycle"
  9683. ]
  9684. },
  9685. {
  9686. "type": "string"
  9687. }
  9688. ]
  9689. }
  9690. },
  9691. "required": ["command"],
  9692. "additionalProperties": false
  9693. }
  9694. },
  9695. "required": ["id", "type", "properties"],
  9696. "additionalProperties": false
  9697. },
  9698. "Event.tui.toast.show": {
  9699. "type": "object",
  9700. "properties": {
  9701. "id": {
  9702. "type": "string"
  9703. },
  9704. "type": {
  9705. "type": "string",
  9706. "enum": ["tui.toast.show"]
  9707. },
  9708. "properties": {
  9709. "type": "object",
  9710. "properties": {
  9711. "title": {
  9712. "type": "string"
  9713. },
  9714. "message": {
  9715. "type": "string"
  9716. },
  9717. "variant": {
  9718. "type": "string",
  9719. "enum": ["info", "success", "warning", "error"]
  9720. },
  9721. "duration": {
  9722. "type": "integer",
  9723. "exclusiveMinimum": 0
  9724. }
  9725. },
  9726. "required": ["message", "variant"],
  9727. "additionalProperties": false
  9728. }
  9729. },
  9730. "required": ["id", "type", "properties"],
  9731. "additionalProperties": false
  9732. },
  9733. "Event.tui.session.select": {
  9734. "type": "object",
  9735. "properties": {
  9736. "id": {
  9737. "type": "string"
  9738. },
  9739. "type": {
  9740. "type": "string",
  9741. "enum": ["tui.session.select"]
  9742. },
  9743. "properties": {
  9744. "type": "object",
  9745. "properties": {
  9746. "sessionID": {
  9747. "type": "string",
  9748. "pattern": "^ses",
  9749. "description": "Session ID to navigate to"
  9750. }
  9751. },
  9752. "required": ["sessionID"],
  9753. "additionalProperties": false
  9754. }
  9755. },
  9756. "required": ["id", "type", "properties"],
  9757. "additionalProperties": false
  9758. },
  9759. "Project": {
  9760. "type": "object",
  9761. "properties": {
  9762. "id": {
  9763. "type": "string"
  9764. },
  9765. "worktree": {
  9766. "type": "string"
  9767. },
  9768. "vcs": {
  9769. "type": "string",
  9770. "enum": ["git"]
  9771. },
  9772. "name": {
  9773. "type": "string"
  9774. },
  9775. "icon": {
  9776. "type": "object",
  9777. "properties": {
  9778. "url": {
  9779. "type": "string"
  9780. },
  9781. "override": {
  9782. "type": "string"
  9783. },
  9784. "color": {
  9785. "type": "string"
  9786. }
  9787. },
  9788. "additionalProperties": false
  9789. },
  9790. "commands": {
  9791. "type": "object",
  9792. "properties": {
  9793. "start": {
  9794. "type": "string",
  9795. "description": "Startup script to run when creating a new workspace (worktree)"
  9796. }
  9797. },
  9798. "additionalProperties": false
  9799. },
  9800. "time": {
  9801. "type": "object",
  9802. "properties": {
  9803. "created": {
  9804. "type": "integer",
  9805. "minimum": 0
  9806. },
  9807. "updated": {
  9808. "type": "integer",
  9809. "minimum": 0
  9810. },
  9811. "initialized": {
  9812. "type": "integer",
  9813. "minimum": 0
  9814. }
  9815. },
  9816. "required": ["created", "updated"],
  9817. "additionalProperties": false
  9818. },
  9819. "sandboxes": {
  9820. "type": "array",
  9821. "items": {
  9822. "type": "string"
  9823. }
  9824. }
  9825. },
  9826. "required": ["id", "worktree", "time", "sandboxes"],
  9827. "additionalProperties": false
  9828. },
  9829. "Pty": {
  9830. "type": "object",
  9831. "properties": {
  9832. "id": {
  9833. "type": "string",
  9834. "pattern": "^pty"
  9835. },
  9836. "title": {
  9837. "type": "string"
  9838. },
  9839. "command": {
  9840. "type": "string"
  9841. },
  9842. "args": {
  9843. "type": "array",
  9844. "items": {
  9845. "type": "string"
  9846. }
  9847. },
  9848. "cwd": {
  9849. "type": "string"
  9850. },
  9851. "status": {
  9852. "type": "string",
  9853. "enum": ["running", "exited"]
  9854. },
  9855. "pid": {
  9856. "type": "integer",
  9857. "exclusiveMinimum": 0
  9858. }
  9859. },
  9860. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  9861. "additionalProperties": false
  9862. },
  9863. "OutputFormatText": {
  9864. "type": "object",
  9865. "properties": {
  9866. "type": {
  9867. "type": "string",
  9868. "enum": ["text"]
  9869. }
  9870. },
  9871. "required": ["type"],
  9872. "additionalProperties": false
  9873. },
  9874. "JSONSchema": {
  9875. "type": "object"
  9876. },
  9877. "OutputFormatJsonSchema": {
  9878. "type": "object",
  9879. "properties": {
  9880. "type": {
  9881. "type": "string",
  9882. "enum": ["json_schema"]
  9883. },
  9884. "schema": {
  9885. "$ref": "#/components/schemas/JSONSchema"
  9886. },
  9887. "retryCount": {
  9888. "type": "integer",
  9889. "minimum": 0
  9890. }
  9891. },
  9892. "required": ["type", "schema"],
  9893. "additionalProperties": false
  9894. },
  9895. "OutputFormat": {
  9896. "anyOf": [
  9897. {
  9898. "$ref": "#/components/schemas/OutputFormatText"
  9899. },
  9900. {
  9901. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  9902. }
  9903. ]
  9904. },
  9905. "UserMessage": {
  9906. "type": "object",
  9907. "properties": {
  9908. "id": {
  9909. "type": "string",
  9910. "pattern": "^msg"
  9911. },
  9912. "sessionID": {
  9913. "type": "string",
  9914. "pattern": "^ses"
  9915. },
  9916. "role": {
  9917. "type": "string",
  9918. "enum": ["user"]
  9919. },
  9920. "time": {
  9921. "type": "object",
  9922. "properties": {
  9923. "created": {
  9924. "type": "integer",
  9925. "minimum": 0
  9926. }
  9927. },
  9928. "required": ["created"],
  9929. "additionalProperties": false
  9930. },
  9931. "format": {
  9932. "$ref": "#/components/schemas/OutputFormat"
  9933. },
  9934. "summary": {
  9935. "type": "object",
  9936. "properties": {
  9937. "title": {
  9938. "type": "string"
  9939. },
  9940. "body": {
  9941. "type": "string"
  9942. },
  9943. "diffs": {
  9944. "type": "array",
  9945. "items": {
  9946. "$ref": "#/components/schemas/SnapshotFileDiff"
  9947. }
  9948. }
  9949. },
  9950. "required": ["diffs"],
  9951. "additionalProperties": false
  9952. },
  9953. "agent": {
  9954. "type": "string"
  9955. },
  9956. "model": {
  9957. "type": "object",
  9958. "properties": {
  9959. "providerID": {
  9960. "type": "string"
  9961. },
  9962. "modelID": {
  9963. "type": "string"
  9964. },
  9965. "variant": {
  9966. "type": "string"
  9967. }
  9968. },
  9969. "required": ["providerID", "modelID"],
  9970. "additionalProperties": false
  9971. },
  9972. "system": {
  9973. "type": "string"
  9974. },
  9975. "tools": {
  9976. "type": "object",
  9977. "additionalProperties": {
  9978. "type": "boolean"
  9979. }
  9980. }
  9981. },
  9982. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  9983. "additionalProperties": false
  9984. },
  9985. "AssistantMessage": {
  9986. "type": "object",
  9987. "properties": {
  9988. "id": {
  9989. "type": "string",
  9990. "pattern": "^msg"
  9991. },
  9992. "sessionID": {
  9993. "type": "string",
  9994. "pattern": "^ses"
  9995. },
  9996. "role": {
  9997. "type": "string",
  9998. "enum": ["assistant"]
  9999. },
  10000. "time": {
  10001. "type": "object",
  10002. "properties": {
  10003. "created": {
  10004. "type": "integer",
  10005. "minimum": 0
  10006. },
  10007. "completed": {
  10008. "type": "integer",
  10009. "minimum": 0
  10010. }
  10011. },
  10012. "required": ["created"],
  10013. "additionalProperties": false
  10014. },
  10015. "error": {
  10016. "anyOf": [
  10017. {
  10018. "$ref": "#/components/schemas/ProviderAuthError"
  10019. },
  10020. {
  10021. "$ref": "#/components/schemas/UnknownError"
  10022. },
  10023. {
  10024. "$ref": "#/components/schemas/MessageOutputLengthError"
  10025. },
  10026. {
  10027. "$ref": "#/components/schemas/MessageAbortedError"
  10028. },
  10029. {
  10030. "$ref": "#/components/schemas/StructuredOutputError"
  10031. },
  10032. {
  10033. "$ref": "#/components/schemas/ContextOverflowError"
  10034. },
  10035. {
  10036. "$ref": "#/components/schemas/APIError"
  10037. }
  10038. ]
  10039. },
  10040. "parentID": {
  10041. "type": "string",
  10042. "pattern": "^msg"
  10043. },
  10044. "modelID": {
  10045. "type": "string"
  10046. },
  10047. "providerID": {
  10048. "type": "string"
  10049. },
  10050. "mode": {
  10051. "type": "string"
  10052. },
  10053. "agent": {
  10054. "type": "string"
  10055. },
  10056. "path": {
  10057. "type": "object",
  10058. "properties": {
  10059. "cwd": {
  10060. "type": "string"
  10061. },
  10062. "root": {
  10063. "type": "string"
  10064. }
  10065. },
  10066. "required": ["cwd", "root"],
  10067. "additionalProperties": false
  10068. },
  10069. "summary": {
  10070. "type": "boolean"
  10071. },
  10072. "cost": {
  10073. "type": "number"
  10074. },
  10075. "tokens": {
  10076. "type": "object",
  10077. "properties": {
  10078. "total": {
  10079. "type": "number"
  10080. },
  10081. "input": {
  10082. "type": "number"
  10083. },
  10084. "output": {
  10085. "type": "number"
  10086. },
  10087. "reasoning": {
  10088. "type": "number"
  10089. },
  10090. "cache": {
  10091. "type": "object",
  10092. "properties": {
  10093. "read": {
  10094. "type": "number"
  10095. },
  10096. "write": {
  10097. "type": "number"
  10098. }
  10099. },
  10100. "required": ["read", "write"],
  10101. "additionalProperties": false
  10102. }
  10103. },
  10104. "required": ["input", "output", "reasoning", "cache"],
  10105. "additionalProperties": false
  10106. },
  10107. "structured": {},
  10108. "variant": {
  10109. "type": "string"
  10110. },
  10111. "finish": {
  10112. "type": "string"
  10113. }
  10114. },
  10115. "required": [
  10116. "id",
  10117. "sessionID",
  10118. "role",
  10119. "time",
  10120. "parentID",
  10121. "modelID",
  10122. "providerID",
  10123. "mode",
  10124. "agent",
  10125. "path",
  10126. "cost",
  10127. "tokens"
  10128. ],
  10129. "additionalProperties": false
  10130. },
  10131. "Message": {
  10132. "anyOf": [
  10133. {
  10134. "$ref": "#/components/schemas/UserMessage"
  10135. },
  10136. {
  10137. "$ref": "#/components/schemas/AssistantMessage"
  10138. }
  10139. ]
  10140. },
  10141. "TextPart": {
  10142. "type": "object",
  10143. "properties": {
  10144. "id": {
  10145. "type": "string",
  10146. "pattern": "^prt"
  10147. },
  10148. "sessionID": {
  10149. "type": "string",
  10150. "pattern": "^ses"
  10151. },
  10152. "messageID": {
  10153. "type": "string",
  10154. "pattern": "^msg"
  10155. },
  10156. "type": {
  10157. "type": "string",
  10158. "enum": ["text"]
  10159. },
  10160. "text": {
  10161. "type": "string"
  10162. },
  10163. "synthetic": {
  10164. "type": "boolean"
  10165. },
  10166. "ignored": {
  10167. "type": "boolean"
  10168. },
  10169. "time": {
  10170. "type": "object",
  10171. "properties": {
  10172. "start": {
  10173. "type": "integer",
  10174. "minimum": 0
  10175. },
  10176. "end": {
  10177. "type": "integer",
  10178. "minimum": 0
  10179. }
  10180. },
  10181. "required": ["start"],
  10182. "additionalProperties": false
  10183. },
  10184. "metadata": {
  10185. "type": "object"
  10186. }
  10187. },
  10188. "required": ["id", "sessionID", "messageID", "type", "text"],
  10189. "additionalProperties": false
  10190. },
  10191. "SubtaskPart": {
  10192. "type": "object",
  10193. "properties": {
  10194. "id": {
  10195. "type": "string",
  10196. "pattern": "^prt"
  10197. },
  10198. "sessionID": {
  10199. "type": "string",
  10200. "pattern": "^ses"
  10201. },
  10202. "messageID": {
  10203. "type": "string",
  10204. "pattern": "^msg"
  10205. },
  10206. "type": {
  10207. "type": "string",
  10208. "enum": ["subtask"]
  10209. },
  10210. "prompt": {
  10211. "type": "string"
  10212. },
  10213. "description": {
  10214. "type": "string"
  10215. },
  10216. "agent": {
  10217. "type": "string"
  10218. },
  10219. "model": {
  10220. "type": "object",
  10221. "properties": {
  10222. "providerID": {
  10223. "type": "string"
  10224. },
  10225. "modelID": {
  10226. "type": "string"
  10227. }
  10228. },
  10229. "required": ["providerID", "modelID"],
  10230. "additionalProperties": false
  10231. },
  10232. "command": {
  10233. "type": "string"
  10234. }
  10235. },
  10236. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10237. "additionalProperties": false
  10238. },
  10239. "ReasoningPart": {
  10240. "type": "object",
  10241. "properties": {
  10242. "id": {
  10243. "type": "string",
  10244. "pattern": "^prt"
  10245. },
  10246. "sessionID": {
  10247. "type": "string",
  10248. "pattern": "^ses"
  10249. },
  10250. "messageID": {
  10251. "type": "string",
  10252. "pattern": "^msg"
  10253. },
  10254. "type": {
  10255. "type": "string",
  10256. "enum": ["reasoning"]
  10257. },
  10258. "text": {
  10259. "type": "string"
  10260. },
  10261. "metadata": {
  10262. "type": "object"
  10263. },
  10264. "time": {
  10265. "type": "object",
  10266. "properties": {
  10267. "start": {
  10268. "type": "integer",
  10269. "minimum": 0
  10270. },
  10271. "end": {
  10272. "type": "integer",
  10273. "minimum": 0
  10274. }
  10275. },
  10276. "required": ["start"],
  10277. "additionalProperties": false
  10278. }
  10279. },
  10280. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10281. "additionalProperties": false
  10282. },
  10283. "FilePartSourceText": {
  10284. "type": "object",
  10285. "properties": {
  10286. "value": {
  10287. "type": "string"
  10288. },
  10289. "start": {
  10290. "type": "number"
  10291. },
  10292. "end": {
  10293. "type": "number"
  10294. }
  10295. },
  10296. "required": ["value", "start", "end"],
  10297. "additionalProperties": false
  10298. },
  10299. "FileSource": {
  10300. "type": "object",
  10301. "properties": {
  10302. "text": {
  10303. "$ref": "#/components/schemas/FilePartSourceText"
  10304. },
  10305. "type": {
  10306. "type": "string",
  10307. "enum": ["file"]
  10308. },
  10309. "path": {
  10310. "type": "string"
  10311. }
  10312. },
  10313. "required": ["text", "type", "path"],
  10314. "additionalProperties": false
  10315. },
  10316. "Range": {
  10317. "type": "object",
  10318. "properties": {
  10319. "start": {
  10320. "type": "object",
  10321. "properties": {
  10322. "line": {
  10323. "type": "integer",
  10324. "minimum": 0
  10325. },
  10326. "character": {
  10327. "type": "integer",
  10328. "minimum": 0
  10329. }
  10330. },
  10331. "required": ["line", "character"],
  10332. "additionalProperties": false
  10333. },
  10334. "end": {
  10335. "type": "object",
  10336. "properties": {
  10337. "line": {
  10338. "type": "integer",
  10339. "minimum": 0
  10340. },
  10341. "character": {
  10342. "type": "integer",
  10343. "minimum": 0
  10344. }
  10345. },
  10346. "required": ["line", "character"],
  10347. "additionalProperties": false
  10348. }
  10349. },
  10350. "required": ["start", "end"],
  10351. "additionalProperties": false
  10352. },
  10353. "SymbolSource": {
  10354. "type": "object",
  10355. "properties": {
  10356. "text": {
  10357. "$ref": "#/components/schemas/FilePartSourceText"
  10358. },
  10359. "type": {
  10360. "type": "string",
  10361. "enum": ["symbol"]
  10362. },
  10363. "path": {
  10364. "type": "string"
  10365. },
  10366. "range": {
  10367. "$ref": "#/components/schemas/Range"
  10368. },
  10369. "name": {
  10370. "type": "string"
  10371. },
  10372. "kind": {
  10373. "type": "integer",
  10374. "minimum": 0
  10375. }
  10376. },
  10377. "required": ["text", "type", "path", "range", "name", "kind"],
  10378. "additionalProperties": false
  10379. },
  10380. "ResourceSource": {
  10381. "type": "object",
  10382. "properties": {
  10383. "text": {
  10384. "$ref": "#/components/schemas/FilePartSourceText"
  10385. },
  10386. "type": {
  10387. "type": "string",
  10388. "enum": ["resource"]
  10389. },
  10390. "clientName": {
  10391. "type": "string"
  10392. },
  10393. "uri": {
  10394. "type": "string"
  10395. }
  10396. },
  10397. "required": ["text", "type", "clientName", "uri"],
  10398. "additionalProperties": false
  10399. },
  10400. "FilePartSource": {
  10401. "anyOf": [
  10402. {
  10403. "$ref": "#/components/schemas/FileSource"
  10404. },
  10405. {
  10406. "$ref": "#/components/schemas/SymbolSource"
  10407. },
  10408. {
  10409. "$ref": "#/components/schemas/ResourceSource"
  10410. }
  10411. ]
  10412. },
  10413. "FilePart": {
  10414. "type": "object",
  10415. "properties": {
  10416. "id": {
  10417. "type": "string",
  10418. "pattern": "^prt"
  10419. },
  10420. "sessionID": {
  10421. "type": "string",
  10422. "pattern": "^ses"
  10423. },
  10424. "messageID": {
  10425. "type": "string",
  10426. "pattern": "^msg"
  10427. },
  10428. "type": {
  10429. "type": "string",
  10430. "enum": ["file"]
  10431. },
  10432. "mime": {
  10433. "type": "string"
  10434. },
  10435. "filename": {
  10436. "type": "string"
  10437. },
  10438. "url": {
  10439. "type": "string"
  10440. },
  10441. "source": {
  10442. "$ref": "#/components/schemas/FilePartSource"
  10443. }
  10444. },
  10445. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10446. "additionalProperties": false
  10447. },
  10448. "ToolStatePending": {
  10449. "type": "object",
  10450. "properties": {
  10451. "status": {
  10452. "type": "string",
  10453. "enum": ["pending"]
  10454. },
  10455. "input": {
  10456. "type": "object"
  10457. },
  10458. "raw": {
  10459. "type": "string"
  10460. }
  10461. },
  10462. "required": ["status", "input", "raw"],
  10463. "additionalProperties": false
  10464. },
  10465. "ToolStateRunning": {
  10466. "type": "object",
  10467. "properties": {
  10468. "status": {
  10469. "type": "string",
  10470. "enum": ["running"]
  10471. },
  10472. "input": {
  10473. "type": "object"
  10474. },
  10475. "title": {
  10476. "type": "string"
  10477. },
  10478. "metadata": {
  10479. "type": "object"
  10480. },
  10481. "time": {
  10482. "type": "object",
  10483. "properties": {
  10484. "start": {
  10485. "type": "integer",
  10486. "minimum": 0
  10487. }
  10488. },
  10489. "required": ["start"],
  10490. "additionalProperties": false
  10491. }
  10492. },
  10493. "required": ["status", "input", "time"],
  10494. "additionalProperties": false
  10495. },
  10496. "ToolStateCompleted": {
  10497. "type": "object",
  10498. "properties": {
  10499. "status": {
  10500. "type": "string",
  10501. "enum": ["completed"]
  10502. },
  10503. "input": {
  10504. "type": "object"
  10505. },
  10506. "output": {
  10507. "type": "string"
  10508. },
  10509. "title": {
  10510. "type": "string"
  10511. },
  10512. "metadata": {
  10513. "type": "object"
  10514. },
  10515. "time": {
  10516. "type": "object",
  10517. "properties": {
  10518. "start": {
  10519. "type": "integer",
  10520. "minimum": 0
  10521. },
  10522. "end": {
  10523. "type": "integer",
  10524. "minimum": 0
  10525. },
  10526. "compacted": {
  10527. "type": "integer",
  10528. "minimum": 0
  10529. }
  10530. },
  10531. "required": ["start", "end"],
  10532. "additionalProperties": false
  10533. },
  10534. "attachments": {
  10535. "type": "array",
  10536. "items": {
  10537. "$ref": "#/components/schemas/FilePart"
  10538. }
  10539. }
  10540. },
  10541. "required": ["status", "input", "output", "title", "metadata", "time"],
  10542. "additionalProperties": false
  10543. },
  10544. "ToolStateError": {
  10545. "type": "object",
  10546. "properties": {
  10547. "status": {
  10548. "type": "string",
  10549. "enum": ["error"]
  10550. },
  10551. "input": {
  10552. "type": "object"
  10553. },
  10554. "error": {
  10555. "type": "string"
  10556. },
  10557. "metadata": {
  10558. "type": "object"
  10559. },
  10560. "time": {
  10561. "type": "object",
  10562. "properties": {
  10563. "start": {
  10564. "type": "integer",
  10565. "minimum": 0
  10566. },
  10567. "end": {
  10568. "type": "integer",
  10569. "minimum": 0
  10570. }
  10571. },
  10572. "required": ["start", "end"],
  10573. "additionalProperties": false
  10574. }
  10575. },
  10576. "required": ["status", "input", "error", "time"],
  10577. "additionalProperties": false
  10578. },
  10579. "ToolState": {
  10580. "anyOf": [
  10581. {
  10582. "$ref": "#/components/schemas/ToolStatePending"
  10583. },
  10584. {
  10585. "$ref": "#/components/schemas/ToolStateRunning"
  10586. },
  10587. {
  10588. "$ref": "#/components/schemas/ToolStateCompleted"
  10589. },
  10590. {
  10591. "$ref": "#/components/schemas/ToolStateError"
  10592. }
  10593. ]
  10594. },
  10595. "ToolPart": {
  10596. "type": "object",
  10597. "properties": {
  10598. "id": {
  10599. "type": "string",
  10600. "pattern": "^prt"
  10601. },
  10602. "sessionID": {
  10603. "type": "string",
  10604. "pattern": "^ses"
  10605. },
  10606. "messageID": {
  10607. "type": "string",
  10608. "pattern": "^msg"
  10609. },
  10610. "type": {
  10611. "type": "string",
  10612. "enum": ["tool"]
  10613. },
  10614. "callID": {
  10615. "type": "string"
  10616. },
  10617. "tool": {
  10618. "type": "string"
  10619. },
  10620. "state": {
  10621. "$ref": "#/components/schemas/ToolState"
  10622. },
  10623. "metadata": {
  10624. "type": "object"
  10625. }
  10626. },
  10627. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10628. "additionalProperties": false
  10629. },
  10630. "StepStartPart": {
  10631. "type": "object",
  10632. "properties": {
  10633. "id": {
  10634. "type": "string",
  10635. "pattern": "^prt"
  10636. },
  10637. "sessionID": {
  10638. "type": "string",
  10639. "pattern": "^ses"
  10640. },
  10641. "messageID": {
  10642. "type": "string",
  10643. "pattern": "^msg"
  10644. },
  10645. "type": {
  10646. "type": "string",
  10647. "enum": ["step-start"]
  10648. },
  10649. "snapshot": {
  10650. "type": "string"
  10651. }
  10652. },
  10653. "required": ["id", "sessionID", "messageID", "type"],
  10654. "additionalProperties": false
  10655. },
  10656. "StepFinishPart": {
  10657. "type": "object",
  10658. "properties": {
  10659. "id": {
  10660. "type": "string",
  10661. "pattern": "^prt"
  10662. },
  10663. "sessionID": {
  10664. "type": "string",
  10665. "pattern": "^ses"
  10666. },
  10667. "messageID": {
  10668. "type": "string",
  10669. "pattern": "^msg"
  10670. },
  10671. "type": {
  10672. "type": "string",
  10673. "enum": ["step-finish"]
  10674. },
  10675. "reason": {
  10676. "type": "string"
  10677. },
  10678. "snapshot": {
  10679. "type": "string"
  10680. },
  10681. "cost": {
  10682. "type": "number"
  10683. },
  10684. "tokens": {
  10685. "type": "object",
  10686. "properties": {
  10687. "total": {
  10688. "type": "number"
  10689. },
  10690. "input": {
  10691. "type": "number"
  10692. },
  10693. "output": {
  10694. "type": "number"
  10695. },
  10696. "reasoning": {
  10697. "type": "number"
  10698. },
  10699. "cache": {
  10700. "type": "object",
  10701. "properties": {
  10702. "read": {
  10703. "type": "number"
  10704. },
  10705. "write": {
  10706. "type": "number"
  10707. }
  10708. },
  10709. "required": ["read", "write"],
  10710. "additionalProperties": false
  10711. }
  10712. },
  10713. "required": ["input", "output", "reasoning", "cache"],
  10714. "additionalProperties": false
  10715. }
  10716. },
  10717. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10718. "additionalProperties": false
  10719. },
  10720. "SnapshotPart": {
  10721. "type": "object",
  10722. "properties": {
  10723. "id": {
  10724. "type": "string",
  10725. "pattern": "^prt"
  10726. },
  10727. "sessionID": {
  10728. "type": "string",
  10729. "pattern": "^ses"
  10730. },
  10731. "messageID": {
  10732. "type": "string",
  10733. "pattern": "^msg"
  10734. },
  10735. "type": {
  10736. "type": "string",
  10737. "enum": ["snapshot"]
  10738. },
  10739. "snapshot": {
  10740. "type": "string"
  10741. }
  10742. },
  10743. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10744. "additionalProperties": false
  10745. },
  10746. "PatchPart": {
  10747. "type": "object",
  10748. "properties": {
  10749. "id": {
  10750. "type": "string",
  10751. "pattern": "^prt"
  10752. },
  10753. "sessionID": {
  10754. "type": "string",
  10755. "pattern": "^ses"
  10756. },
  10757. "messageID": {
  10758. "type": "string",
  10759. "pattern": "^msg"
  10760. },
  10761. "type": {
  10762. "type": "string",
  10763. "enum": ["patch"]
  10764. },
  10765. "hash": {
  10766. "type": "string"
  10767. },
  10768. "files": {
  10769. "type": "array",
  10770. "items": {
  10771. "type": "string"
  10772. }
  10773. }
  10774. },
  10775. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10776. "additionalProperties": false
  10777. },
  10778. "AgentPart": {
  10779. "type": "object",
  10780. "properties": {
  10781. "id": {
  10782. "type": "string",
  10783. "pattern": "^prt"
  10784. },
  10785. "sessionID": {
  10786. "type": "string",
  10787. "pattern": "^ses"
  10788. },
  10789. "messageID": {
  10790. "type": "string",
  10791. "pattern": "^msg"
  10792. },
  10793. "type": {
  10794. "type": "string",
  10795. "enum": ["agent"]
  10796. },
  10797. "name": {
  10798. "type": "string"
  10799. },
  10800. "source": {
  10801. "type": "object",
  10802. "properties": {
  10803. "value": {
  10804. "type": "string"
  10805. },
  10806. "start": {
  10807. "type": "integer",
  10808. "minimum": 0
  10809. },
  10810. "end": {
  10811. "type": "integer",
  10812. "minimum": 0
  10813. }
  10814. },
  10815. "required": ["value", "start", "end"],
  10816. "additionalProperties": false
  10817. }
  10818. },
  10819. "required": ["id", "sessionID", "messageID", "type", "name"],
  10820. "additionalProperties": false
  10821. },
  10822. "RetryPart": {
  10823. "type": "object",
  10824. "properties": {
  10825. "id": {
  10826. "type": "string",
  10827. "pattern": "^prt"
  10828. },
  10829. "sessionID": {
  10830. "type": "string",
  10831. "pattern": "^ses"
  10832. },
  10833. "messageID": {
  10834. "type": "string",
  10835. "pattern": "^msg"
  10836. },
  10837. "type": {
  10838. "type": "string",
  10839. "enum": ["retry"]
  10840. },
  10841. "attempt": {
  10842. "type": "integer",
  10843. "minimum": 0
  10844. },
  10845. "error": {
  10846. "$ref": "#/components/schemas/APIError"
  10847. },
  10848. "time": {
  10849. "type": "object",
  10850. "properties": {
  10851. "created": {
  10852. "type": "integer",
  10853. "minimum": 0
  10854. }
  10855. },
  10856. "required": ["created"],
  10857. "additionalProperties": false
  10858. }
  10859. },
  10860. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  10861. "additionalProperties": false
  10862. },
  10863. "CompactionPart": {
  10864. "type": "object",
  10865. "properties": {
  10866. "id": {
  10867. "type": "string",
  10868. "pattern": "^prt"
  10869. },
  10870. "sessionID": {
  10871. "type": "string",
  10872. "pattern": "^ses"
  10873. },
  10874. "messageID": {
  10875. "type": "string",
  10876. "pattern": "^msg"
  10877. },
  10878. "type": {
  10879. "type": "string",
  10880. "enum": ["compaction"]
  10881. },
  10882. "auto": {
  10883. "type": "boolean"
  10884. },
  10885. "overflow": {
  10886. "type": "boolean"
  10887. },
  10888. "tail_start_id": {
  10889. "type": "string",
  10890. "pattern": "^msg"
  10891. }
  10892. },
  10893. "required": ["id", "sessionID", "messageID", "type", "auto"],
  10894. "additionalProperties": false
  10895. },
  10896. "Part": {
  10897. "anyOf": [
  10898. {
  10899. "$ref": "#/components/schemas/TextPart"
  10900. },
  10901. {
  10902. "$ref": "#/components/schemas/SubtaskPart"
  10903. },
  10904. {
  10905. "$ref": "#/components/schemas/ReasoningPart"
  10906. },
  10907. {
  10908. "$ref": "#/components/schemas/FilePart"
  10909. },
  10910. {
  10911. "$ref": "#/components/schemas/ToolPart"
  10912. },
  10913. {
  10914. "$ref": "#/components/schemas/StepStartPart"
  10915. },
  10916. {
  10917. "$ref": "#/components/schemas/StepFinishPart"
  10918. },
  10919. {
  10920. "$ref": "#/components/schemas/SnapshotPart"
  10921. },
  10922. {
  10923. "$ref": "#/components/schemas/PatchPart"
  10924. },
  10925. {
  10926. "$ref": "#/components/schemas/AgentPart"
  10927. },
  10928. {
  10929. "$ref": "#/components/schemas/RetryPart"
  10930. },
  10931. {
  10932. "$ref": "#/components/schemas/CompactionPart"
  10933. }
  10934. ]
  10935. },
  10936. "PermissionAction": {
  10937. "type": "string",
  10938. "enum": ["allow", "deny", "ask"]
  10939. },
  10940. "PermissionRule": {
  10941. "type": "object",
  10942. "properties": {
  10943. "permission": {
  10944. "type": "string"
  10945. },
  10946. "pattern": {
  10947. "type": "string"
  10948. },
  10949. "action": {
  10950. "$ref": "#/components/schemas/PermissionAction"
  10951. }
  10952. },
  10953. "required": ["permission", "pattern", "action"],
  10954. "additionalProperties": false
  10955. },
  10956. "PermissionRuleset": {
  10957. "type": "array",
  10958. "items": {
  10959. "$ref": "#/components/schemas/PermissionRule"
  10960. }
  10961. },
  10962. "Session": {
  10963. "type": "object",
  10964. "properties": {
  10965. "id": {
  10966. "type": "string",
  10967. "pattern": "^ses"
  10968. },
  10969. "slug": {
  10970. "type": "string"
  10971. },
  10972. "projectID": {
  10973. "type": "string"
  10974. },
  10975. "workspaceID": {
  10976. "type": "string",
  10977. "pattern": "^wrk"
  10978. },
  10979. "directory": {
  10980. "type": "string"
  10981. },
  10982. "path": {
  10983. "type": "string"
  10984. },
  10985. "parentID": {
  10986. "type": "string",
  10987. "pattern": "^ses"
  10988. },
  10989. "summary": {
  10990. "type": "object",
  10991. "properties": {
  10992. "additions": {
  10993. "type": "number"
  10994. },
  10995. "deletions": {
  10996. "type": "number"
  10997. },
  10998. "files": {
  10999. "type": "number"
  11000. },
  11001. "diffs": {
  11002. "type": "array",
  11003. "items": {
  11004. "$ref": "#/components/schemas/SnapshotFileDiff"
  11005. }
  11006. }
  11007. },
  11008. "required": ["additions", "deletions", "files"],
  11009. "additionalProperties": false
  11010. },
  11011. "share": {
  11012. "type": "object",
  11013. "properties": {
  11014. "url": {
  11015. "type": "string"
  11016. }
  11017. },
  11018. "required": ["url"],
  11019. "additionalProperties": false
  11020. },
  11021. "title": {
  11022. "type": "string"
  11023. },
  11024. "agent": {
  11025. "type": "string"
  11026. },
  11027. "model": {
  11028. "type": "object",
  11029. "properties": {
  11030. "id": {
  11031. "type": "string"
  11032. },
  11033. "providerID": {
  11034. "type": "string"
  11035. },
  11036. "variant": {
  11037. "type": "string"
  11038. }
  11039. },
  11040. "required": ["id", "providerID"],
  11041. "additionalProperties": false
  11042. },
  11043. "version": {
  11044. "type": "string"
  11045. },
  11046. "time": {
  11047. "type": "object",
  11048. "properties": {
  11049. "created": {
  11050. "type": "integer",
  11051. "minimum": 0
  11052. },
  11053. "updated": {
  11054. "type": "integer",
  11055. "minimum": 0
  11056. },
  11057. "compacting": {
  11058. "type": "integer",
  11059. "minimum": 0
  11060. },
  11061. "archived": {
  11062. "type": "number"
  11063. }
  11064. },
  11065. "required": ["created", "updated"],
  11066. "additionalProperties": false
  11067. },
  11068. "permission": {
  11069. "$ref": "#/components/schemas/PermissionRuleset"
  11070. },
  11071. "revert": {
  11072. "type": "object",
  11073. "properties": {
  11074. "messageID": {
  11075. "type": "string",
  11076. "pattern": "^msg"
  11077. },
  11078. "partID": {
  11079. "type": "string",
  11080. "pattern": "^prt"
  11081. },
  11082. "snapshot": {
  11083. "type": "string"
  11084. },
  11085. "diff": {
  11086. "type": "string"
  11087. }
  11088. },
  11089. "required": ["messageID"],
  11090. "additionalProperties": false
  11091. }
  11092. },
  11093. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11094. "additionalProperties": false
  11095. },
  11096. "Prompt": {
  11097. "type": "object",
  11098. "properties": {
  11099. "text": {
  11100. "type": "string"
  11101. },
  11102. "files": {
  11103. "type": "array",
  11104. "items": {
  11105. "$ref": "#/components/schemas/PromptFileAttachment"
  11106. }
  11107. },
  11108. "agents": {
  11109. "type": "array",
  11110. "items": {
  11111. "$ref": "#/components/schemas/PromptAgentAttachment"
  11112. }
  11113. }
  11114. },
  11115. "required": ["text"],
  11116. "additionalProperties": false
  11117. },
  11118. "GlobalEvent": {
  11119. "type": "object",
  11120. "properties": {
  11121. "directory": {
  11122. "type": "string"
  11123. },
  11124. "project": {
  11125. "type": "string"
  11126. },
  11127. "workspace": {
  11128. "type": "string"
  11129. },
  11130. "payload": {
  11131. "anyOf": [
  11132. {
  11133. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11134. },
  11135. {
  11136. "$ref": "#/components/schemas/EventFileEdited"
  11137. },
  11138. {
  11139. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11140. },
  11141. {
  11142. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11143. },
  11144. {
  11145. "$ref": "#/components/schemas/EventLspUpdated"
  11146. },
  11147. {
  11148. "$ref": "#/components/schemas/EventMessagePartDelta"
  11149. },
  11150. {
  11151. "$ref": "#/components/schemas/EventPermissionAsked"
  11152. },
  11153. {
  11154. "$ref": "#/components/schemas/EventPermissionReplied"
  11155. },
  11156. {
  11157. "$ref": "#/components/schemas/EventSessionDiff"
  11158. },
  11159. {
  11160. "$ref": "#/components/schemas/EventSessionError"
  11161. },
  11162. {
  11163. "$ref": "#/components/schemas/EventInstallationUpdated"
  11164. },
  11165. {
  11166. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11167. },
  11168. {
  11169. "$ref": "#/components/schemas/EventQuestionAsked"
  11170. },
  11171. {
  11172. "$ref": "#/components/schemas/EventQuestionReplied"
  11173. },
  11174. {
  11175. "$ref": "#/components/schemas/EventQuestionRejected"
  11176. },
  11177. {
  11178. "$ref": "#/components/schemas/EventTodoUpdated"
  11179. },
  11180. {
  11181. "$ref": "#/components/schemas/EventSessionStatus"
  11182. },
  11183. {
  11184. "$ref": "#/components/schemas/EventSessionIdle"
  11185. },
  11186. {
  11187. "$ref": "#/components/schemas/EventSessionCompacted"
  11188. },
  11189. {
  11190. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11191. },
  11192. {
  11193. "$ref": "#/components/schemas/Event.tui.command.execute"
  11194. },
  11195. {
  11196. "$ref": "#/components/schemas/Event.tui.toast.show"
  11197. },
  11198. {
  11199. "$ref": "#/components/schemas/Event.tui.session.select"
  11200. },
  11201. {
  11202. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11203. },
  11204. {
  11205. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11206. },
  11207. {
  11208. "$ref": "#/components/schemas/EventCommandExecuted"
  11209. },
  11210. {
  11211. "$ref": "#/components/schemas/EventProjectUpdated"
  11212. },
  11213. {
  11214. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11215. },
  11216. {
  11217. "$ref": "#/components/schemas/EventWorkspaceReady"
  11218. },
  11219. {
  11220. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11221. },
  11222. {
  11223. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11224. },
  11225. {
  11226. "$ref": "#/components/schemas/EventWorktreeReady"
  11227. },
  11228. {
  11229. "$ref": "#/components/schemas/EventWorktreeFailed"
  11230. },
  11231. {
  11232. "$ref": "#/components/schemas/EventPtyCreated"
  11233. },
  11234. {
  11235. "$ref": "#/components/schemas/EventPtyUpdated"
  11236. },
  11237. {
  11238. "$ref": "#/components/schemas/EventPtyExited"
  11239. },
  11240. {
  11241. "$ref": "#/components/schemas/EventPtyDeleted"
  11242. },
  11243. {
  11244. "$ref": "#/components/schemas/EventMessageUpdated"
  11245. },
  11246. {
  11247. "$ref": "#/components/schemas/EventMessageRemoved"
  11248. },
  11249. {
  11250. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11251. },
  11252. {
  11253. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11254. },
  11255. {
  11256. "$ref": "#/components/schemas/EventSessionCreated"
  11257. },
  11258. {
  11259. "$ref": "#/components/schemas/EventSessionUpdated"
  11260. },
  11261. {
  11262. "$ref": "#/components/schemas/EventSessionDeleted"
  11263. },
  11264. {
  11265. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11266. },
  11267. {
  11268. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11269. },
  11270. {
  11271. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11272. },
  11273. {
  11274. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11275. },
  11276. {
  11277. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11278. },
  11279. {
  11280. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11281. },
  11282. {
  11283. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11284. },
  11285. {
  11286. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11287. },
  11288. {
  11289. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11290. },
  11291. {
  11292. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11293. },
  11294. {
  11295. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11296. },
  11297. {
  11298. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11299. },
  11300. {
  11301. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11302. },
  11303. {
  11304. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11305. },
  11306. {
  11307. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11308. },
  11309. {
  11310. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11311. },
  11312. {
  11313. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11314. },
  11315. {
  11316. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11317. },
  11318. {
  11319. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11320. },
  11321. {
  11322. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11323. },
  11324. {
  11325. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11326. },
  11327. {
  11328. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11329. },
  11330. {
  11331. "$ref": "#/components/schemas/EventSessionNextRetried"
  11332. },
  11333. {
  11334. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11335. },
  11336. {
  11337. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11338. },
  11339. {
  11340. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11341. },
  11342. {
  11343. "$ref": "#/components/schemas/EventServerConnected"
  11344. },
  11345. {
  11346. "$ref": "#/components/schemas/EventGlobalDisposed"
  11347. },
  11348. {
  11349. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11350. },
  11351. {
  11352. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11353. },
  11354. {
  11355. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11356. },
  11357. {
  11358. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11359. },
  11360. {
  11361. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11362. },
  11363. {
  11364. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11365. },
  11366. {
  11367. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11368. },
  11369. {
  11370. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11371. },
  11372. {
  11373. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11374. },
  11375. {
  11376. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11377. },
  11378. {
  11379. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11380. },
  11381. {
  11382. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11383. },
  11384. {
  11385. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11386. },
  11387. {
  11388. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11389. },
  11390. {
  11391. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11392. },
  11393. {
  11394. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11395. },
  11396. {
  11397. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11398. },
  11399. {
  11400. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11401. },
  11402. {
  11403. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11404. },
  11405. {
  11406. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11407. },
  11408. {
  11409. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11410. },
  11411. {
  11412. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11413. },
  11414. {
  11415. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11416. },
  11417. {
  11418. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11419. },
  11420. {
  11421. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11422. },
  11423. {
  11424. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11425. },
  11426. {
  11427. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11428. },
  11429. {
  11430. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11431. },
  11432. {
  11433. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11434. },
  11435. {
  11436. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11437. },
  11438. {
  11439. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11440. },
  11441. {
  11442. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11443. },
  11444. {
  11445. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11446. }
  11447. ]
  11448. }
  11449. },
  11450. "required": ["directory", "payload"],
  11451. "additionalProperties": false
  11452. },
  11453. "LogLevel": {
  11454. "type": "string",
  11455. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11456. "description": "Log level"
  11457. },
  11458. "ServerConfig": {
  11459. "type": "object",
  11460. "properties": {
  11461. "port": {
  11462. "type": "integer",
  11463. "exclusiveMinimum": 0
  11464. },
  11465. "hostname": {
  11466. "type": "string"
  11467. },
  11468. "mdns": {
  11469. "type": "boolean"
  11470. },
  11471. "mdnsDomain": {
  11472. "type": "string"
  11473. },
  11474. "cors": {
  11475. "type": "array",
  11476. "items": {
  11477. "type": "string"
  11478. }
  11479. }
  11480. },
  11481. "additionalProperties": false,
  11482. "description": "Server configuration for opencode serve and web commands"
  11483. },
  11484. "ReferenceConfigEntry": {
  11485. "anyOf": [
  11486. {
  11487. "type": "string"
  11488. },
  11489. {
  11490. "type": "object",
  11491. "properties": {
  11492. "repository": {
  11493. "type": "string",
  11494. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11495. },
  11496. "branch": {
  11497. "type": "string"
  11498. }
  11499. },
  11500. "required": ["repository"],
  11501. "additionalProperties": false
  11502. },
  11503. {
  11504. "type": "object",
  11505. "properties": {
  11506. "path": {
  11507. "type": "string",
  11508. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11509. }
  11510. },
  11511. "required": ["path"],
  11512. "additionalProperties": false
  11513. }
  11514. ]
  11515. },
  11516. "ReferenceConfig": {
  11517. "type": "object",
  11518. "additionalProperties": {
  11519. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11520. }
  11521. },
  11522. "PermissionActionConfig": {
  11523. "type": "string",
  11524. "enum": ["ask", "allow", "deny"]
  11525. },
  11526. "PermissionObjectConfig": {
  11527. "type": "object",
  11528. "additionalProperties": {
  11529. "$ref": "#/components/schemas/PermissionActionConfig"
  11530. }
  11531. },
  11532. "PermissionRuleConfig": {
  11533. "anyOf": [
  11534. {
  11535. "$ref": "#/components/schemas/PermissionActionConfig"
  11536. },
  11537. {
  11538. "$ref": "#/components/schemas/PermissionObjectConfig"
  11539. }
  11540. ]
  11541. },
  11542. "PermissionConfig": {
  11543. "anyOf": [
  11544. {
  11545. "$ref": "#/components/schemas/PermissionActionConfig"
  11546. },
  11547. {
  11548. "type": "object",
  11549. "properties": {
  11550. "read": {
  11551. "$ref": "#/components/schemas/PermissionRuleConfig"
  11552. },
  11553. "edit": {
  11554. "$ref": "#/components/schemas/PermissionRuleConfig"
  11555. },
  11556. "glob": {
  11557. "$ref": "#/components/schemas/PermissionRuleConfig"
  11558. },
  11559. "grep": {
  11560. "$ref": "#/components/schemas/PermissionRuleConfig"
  11561. },
  11562. "list": {
  11563. "$ref": "#/components/schemas/PermissionRuleConfig"
  11564. },
  11565. "bash": {
  11566. "$ref": "#/components/schemas/PermissionRuleConfig"
  11567. },
  11568. "task": {
  11569. "$ref": "#/components/schemas/PermissionRuleConfig"
  11570. },
  11571. "external_directory": {
  11572. "$ref": "#/components/schemas/PermissionRuleConfig"
  11573. },
  11574. "todowrite": {
  11575. "$ref": "#/components/schemas/PermissionActionConfig"
  11576. },
  11577. "question": {
  11578. "$ref": "#/components/schemas/PermissionActionConfig"
  11579. },
  11580. "webfetch": {
  11581. "$ref": "#/components/schemas/PermissionActionConfig"
  11582. },
  11583. "websearch": {
  11584. "$ref": "#/components/schemas/PermissionActionConfig"
  11585. },
  11586. "codesearch": {
  11587. "$ref": "#/components/schemas/PermissionActionConfig"
  11588. },
  11589. "repo_clone": {
  11590. "$ref": "#/components/schemas/PermissionRuleConfig"
  11591. },
  11592. "repo_overview": {
  11593. "$ref": "#/components/schemas/PermissionRuleConfig"
  11594. },
  11595. "lsp": {
  11596. "$ref": "#/components/schemas/PermissionRuleConfig"
  11597. },
  11598. "doom_loop": {
  11599. "$ref": "#/components/schemas/PermissionActionConfig"
  11600. },
  11601. "skill": {
  11602. "$ref": "#/components/schemas/PermissionRuleConfig"
  11603. }
  11604. },
  11605. "additionalProperties": {
  11606. "$ref": "#/components/schemas/PermissionRuleConfig"
  11607. }
  11608. }
  11609. ]
  11610. },
  11611. "AgentConfig": {
  11612. "type": "object",
  11613. "properties": {
  11614. "model": {
  11615. "type": "string"
  11616. },
  11617. "variant": {
  11618. "type": "string"
  11619. },
  11620. "temperature": {
  11621. "type": "number"
  11622. },
  11623. "top_p": {
  11624. "type": "number"
  11625. },
  11626. "prompt": {
  11627. "type": "string"
  11628. },
  11629. "tools": {
  11630. "type": "object",
  11631. "additionalProperties": {
  11632. "type": "boolean"
  11633. }
  11634. },
  11635. "disable": {
  11636. "type": "boolean"
  11637. },
  11638. "description": {
  11639. "type": "string"
  11640. },
  11641. "mode": {
  11642. "type": "string",
  11643. "enum": ["subagent", "primary", "all"]
  11644. },
  11645. "hidden": {
  11646. "type": "boolean"
  11647. },
  11648. "options": {
  11649. "type": "object"
  11650. },
  11651. "color": {
  11652. "anyOf": [
  11653. {
  11654. "type": "string",
  11655. "pattern": "^#[0-9a-fA-F]{6}$"
  11656. },
  11657. {
  11658. "type": "string",
  11659. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11660. }
  11661. ],
  11662. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11663. },
  11664. "steps": {
  11665. "type": "integer",
  11666. "exclusiveMinimum": 0
  11667. },
  11668. "maxSteps": {
  11669. "type": "integer",
  11670. "exclusiveMinimum": 0
  11671. },
  11672. "permission": {
  11673. "$ref": "#/components/schemas/PermissionConfig"
  11674. }
  11675. },
  11676. "additionalProperties": {}
  11677. },
  11678. "ProviderConfig": {
  11679. "type": "object",
  11680. "properties": {
  11681. "api": {
  11682. "type": "string"
  11683. },
  11684. "name": {
  11685. "type": "string"
  11686. },
  11687. "env": {
  11688. "type": "array",
  11689. "items": {
  11690. "type": "string"
  11691. }
  11692. },
  11693. "id": {
  11694. "type": "string"
  11695. },
  11696. "npm": {
  11697. "type": "string"
  11698. },
  11699. "whitelist": {
  11700. "type": "array",
  11701. "items": {
  11702. "type": "string"
  11703. }
  11704. },
  11705. "blacklist": {
  11706. "type": "array",
  11707. "items": {
  11708. "type": "string"
  11709. }
  11710. },
  11711. "options": {
  11712. "type": "object",
  11713. "properties": {
  11714. "apiKey": {
  11715. "type": "string"
  11716. },
  11717. "baseURL": {
  11718. "type": "string"
  11719. },
  11720. "enterpriseUrl": {
  11721. "type": "string"
  11722. },
  11723. "setCacheKey": {
  11724. "type": "boolean"
  11725. },
  11726. "timeout": {
  11727. "anyOf": [
  11728. {
  11729. "type": "integer",
  11730. "exclusiveMinimum": 0
  11731. },
  11732. {
  11733. "type": "boolean",
  11734. "enum": [false]
  11735. }
  11736. ],
  11737. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11738. },
  11739. "chunkTimeout": {
  11740. "type": "integer",
  11741. "exclusiveMinimum": 0
  11742. }
  11743. },
  11744. "additionalProperties": {}
  11745. },
  11746. "models": {
  11747. "type": "object",
  11748. "additionalProperties": {
  11749. "type": "object",
  11750. "properties": {
  11751. "id": {
  11752. "type": "string"
  11753. },
  11754. "name": {
  11755. "type": "string"
  11756. },
  11757. "family": {
  11758. "type": "string"
  11759. },
  11760. "release_date": {
  11761. "type": "string"
  11762. },
  11763. "attachment": {
  11764. "type": "boolean"
  11765. },
  11766. "reasoning": {
  11767. "type": "boolean"
  11768. },
  11769. "temperature": {
  11770. "type": "boolean"
  11771. },
  11772. "tool_call": {
  11773. "type": "boolean"
  11774. },
  11775. "interleaved": {
  11776. "anyOf": [
  11777. {
  11778. "type": "boolean",
  11779. "enum": [true]
  11780. },
  11781. {
  11782. "type": "object",
  11783. "properties": {
  11784. "field": {
  11785. "type": "string",
  11786. "enum": ["reasoning_content", "reasoning_details"]
  11787. }
  11788. },
  11789. "required": ["field"],
  11790. "additionalProperties": false
  11791. }
  11792. ]
  11793. },
  11794. "cost": {
  11795. "type": "object",
  11796. "properties": {
  11797. "input": {
  11798. "type": "number"
  11799. },
  11800. "output": {
  11801. "type": "number"
  11802. },
  11803. "cache_read": {
  11804. "type": "number"
  11805. },
  11806. "cache_write": {
  11807. "type": "number"
  11808. },
  11809. "context_over_200k": {
  11810. "type": "object",
  11811. "properties": {
  11812. "input": {
  11813. "type": "number"
  11814. },
  11815. "output": {
  11816. "type": "number"
  11817. },
  11818. "cache_read": {
  11819. "type": "number"
  11820. },
  11821. "cache_write": {
  11822. "type": "number"
  11823. }
  11824. },
  11825. "required": ["input", "output"],
  11826. "additionalProperties": false
  11827. }
  11828. },
  11829. "required": ["input", "output"],
  11830. "additionalProperties": false
  11831. },
  11832. "limit": {
  11833. "type": "object",
  11834. "properties": {
  11835. "context": {
  11836. "type": "number"
  11837. },
  11838. "input": {
  11839. "type": "number"
  11840. },
  11841. "output": {
  11842. "type": "number"
  11843. }
  11844. },
  11845. "required": ["context", "output"],
  11846. "additionalProperties": false
  11847. },
  11848. "modalities": {
  11849. "type": "object",
  11850. "properties": {
  11851. "input": {
  11852. "type": "array",
  11853. "items": {
  11854. "type": "string",
  11855. "enum": ["text", "audio", "image", "video", "pdf"]
  11856. }
  11857. },
  11858. "output": {
  11859. "type": "array",
  11860. "items": {
  11861. "type": "string",
  11862. "enum": ["text", "audio", "image", "video", "pdf"]
  11863. }
  11864. }
  11865. },
  11866. "required": ["input", "output"],
  11867. "additionalProperties": false
  11868. },
  11869. "experimental": {
  11870. "type": "boolean"
  11871. },
  11872. "status": {
  11873. "type": "string",
  11874. "enum": ["alpha", "beta", "deprecated", "active"]
  11875. },
  11876. "provider": {
  11877. "type": "object",
  11878. "properties": {
  11879. "npm": {
  11880. "type": "string"
  11881. },
  11882. "api": {
  11883. "type": "string"
  11884. }
  11885. },
  11886. "additionalProperties": false
  11887. },
  11888. "options": {
  11889. "type": "object"
  11890. },
  11891. "headers": {
  11892. "type": "object",
  11893. "additionalProperties": {
  11894. "type": "string"
  11895. }
  11896. },
  11897. "variants": {
  11898. "type": "object",
  11899. "additionalProperties": {
  11900. "type": "object",
  11901. "properties": {
  11902. "disabled": {
  11903. "type": "boolean"
  11904. }
  11905. },
  11906. "additionalProperties": {}
  11907. },
  11908. "description": "Variant-specific configuration"
  11909. }
  11910. },
  11911. "additionalProperties": false
  11912. }
  11913. }
  11914. },
  11915. "additionalProperties": false
  11916. },
  11917. "McpLocalConfig": {
  11918. "type": "object",
  11919. "properties": {
  11920. "type": {
  11921. "type": "string",
  11922. "enum": ["local"],
  11923. "description": "Type of MCP server connection"
  11924. },
  11925. "command": {
  11926. "type": "array",
  11927. "items": {
  11928. "type": "string"
  11929. },
  11930. "description": "Command and arguments to run the MCP server"
  11931. },
  11932. "environment": {
  11933. "type": "object",
  11934. "additionalProperties": {
  11935. "type": "string"
  11936. }
  11937. },
  11938. "enabled": {
  11939. "type": "boolean"
  11940. },
  11941. "timeout": {
  11942. "type": "integer",
  11943. "exclusiveMinimum": 0
  11944. }
  11945. },
  11946. "required": ["type", "command"],
  11947. "additionalProperties": false
  11948. },
  11949. "McpOAuthConfig": {
  11950. "type": "object",
  11951. "properties": {
  11952. "clientId": {
  11953. "type": "string"
  11954. },
  11955. "clientSecret": {
  11956. "type": "string"
  11957. },
  11958. "scope": {
  11959. "type": "string"
  11960. },
  11961. "redirectUri": {
  11962. "type": "string"
  11963. }
  11964. },
  11965. "additionalProperties": false
  11966. },
  11967. "McpRemoteConfig": {
  11968. "type": "object",
  11969. "properties": {
  11970. "type": {
  11971. "type": "string",
  11972. "enum": ["remote"],
  11973. "description": "Type of MCP server connection"
  11974. },
  11975. "url": {
  11976. "type": "string",
  11977. "description": "URL of the remote MCP server"
  11978. },
  11979. "enabled": {
  11980. "type": "boolean"
  11981. },
  11982. "headers": {
  11983. "type": "object",
  11984. "additionalProperties": {
  11985. "type": "string"
  11986. }
  11987. },
  11988. "oauth": {
  11989. "anyOf": [
  11990. {
  11991. "$ref": "#/components/schemas/McpOAuthConfig"
  11992. },
  11993. {
  11994. "type": "boolean",
  11995. "enum": [false]
  11996. }
  11997. ],
  11998. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  11999. },
  12000. "timeout": {
  12001. "type": "integer",
  12002. "exclusiveMinimum": 0
  12003. }
  12004. },
  12005. "required": ["type", "url"],
  12006. "additionalProperties": false
  12007. },
  12008. "LayoutConfig": {
  12009. "type": "string",
  12010. "enum": ["auto", "stretch"],
  12011. "description": "@deprecated Always uses stretch layout."
  12012. },
  12013. "ImageAttachmentConfig": {
  12014. "type": "object",
  12015. "properties": {
  12016. "auto_resize": {
  12017. "type": "boolean"
  12018. },
  12019. "max_width": {
  12020. "type": "integer",
  12021. "exclusiveMinimum": 0
  12022. },
  12023. "max_height": {
  12024. "type": "integer",
  12025. "exclusiveMinimum": 0
  12026. },
  12027. "max_base64_bytes": {
  12028. "type": "integer",
  12029. "exclusiveMinimum": 0
  12030. }
  12031. },
  12032. "additionalProperties": false
  12033. },
  12034. "AttachmentConfig": {
  12035. "type": "object",
  12036. "properties": {
  12037. "image": {
  12038. "$ref": "#/components/schemas/ImageAttachmentConfig"
  12039. }
  12040. },
  12041. "additionalProperties": false
  12042. },
  12043. "Config": {
  12044. "type": "object",
  12045. "properties": {
  12046. "$schema": {
  12047. "type": "string"
  12048. },
  12049. "shell": {
  12050. "type": "string"
  12051. },
  12052. "logLevel": {
  12053. "$ref": "#/components/schemas/LogLevel"
  12054. },
  12055. "server": {
  12056. "$ref": "#/components/schemas/ServerConfig"
  12057. },
  12058. "command": {
  12059. "type": "object",
  12060. "additionalProperties": {
  12061. "type": "object",
  12062. "properties": {
  12063. "template": {
  12064. "type": "string"
  12065. },
  12066. "description": {
  12067. "type": "string"
  12068. },
  12069. "agent": {
  12070. "type": "string"
  12071. },
  12072. "model": {
  12073. "type": "string"
  12074. },
  12075. "subtask": {
  12076. "type": "boolean"
  12077. }
  12078. },
  12079. "required": ["template"],
  12080. "additionalProperties": false
  12081. }
  12082. },
  12083. "skills": {
  12084. "type": "object",
  12085. "properties": {
  12086. "paths": {
  12087. "type": "array",
  12088. "items": {
  12089. "type": "string"
  12090. }
  12091. },
  12092. "urls": {
  12093. "type": "array",
  12094. "items": {
  12095. "type": "string"
  12096. }
  12097. }
  12098. },
  12099. "additionalProperties": false
  12100. },
  12101. "reference": {
  12102. "$ref": "#/components/schemas/ReferenceConfig"
  12103. },
  12104. "watcher": {
  12105. "type": "object",
  12106. "properties": {
  12107. "ignore": {
  12108. "type": "array",
  12109. "items": {
  12110. "type": "string"
  12111. }
  12112. }
  12113. },
  12114. "additionalProperties": false
  12115. },
  12116. "snapshot": {
  12117. "type": "boolean"
  12118. },
  12119. "plugin": {
  12120. "type": "array",
  12121. "items": {
  12122. "anyOf": [
  12123. {
  12124. "type": "string"
  12125. },
  12126. {
  12127. "type": "array",
  12128. "prefixItems": [
  12129. {
  12130. "type": "string"
  12131. },
  12132. {
  12133. "type": "object"
  12134. }
  12135. ],
  12136. "maxItems": 2,
  12137. "minItems": 2
  12138. }
  12139. ]
  12140. }
  12141. },
  12142. "share": {
  12143. "type": "string",
  12144. "enum": ["manual", "auto", "disabled"]
  12145. },
  12146. "autoshare": {
  12147. "type": "boolean"
  12148. },
  12149. "autoupdate": {
  12150. "anyOf": [
  12151. {
  12152. "type": "boolean"
  12153. },
  12154. {
  12155. "type": "string",
  12156. "enum": ["notify"]
  12157. }
  12158. ],
  12159. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12160. },
  12161. "disabled_providers": {
  12162. "type": "array",
  12163. "items": {
  12164. "type": "string"
  12165. }
  12166. },
  12167. "enabled_providers": {
  12168. "type": "array",
  12169. "items": {
  12170. "type": "string"
  12171. }
  12172. },
  12173. "model": {
  12174. "type": "string"
  12175. },
  12176. "small_model": {
  12177. "type": "string"
  12178. },
  12179. "default_agent": {
  12180. "type": "string"
  12181. },
  12182. "username": {
  12183. "type": "string"
  12184. },
  12185. "mode": {
  12186. "type": "object",
  12187. "properties": {
  12188. "build": {
  12189. "$ref": "#/components/schemas/AgentConfig"
  12190. },
  12191. "plan": {
  12192. "$ref": "#/components/schemas/AgentConfig"
  12193. }
  12194. },
  12195. "additionalProperties": {
  12196. "$ref": "#/components/schemas/AgentConfig"
  12197. }
  12198. },
  12199. "agent": {
  12200. "type": "object",
  12201. "properties": {
  12202. "plan": {
  12203. "$ref": "#/components/schemas/AgentConfig"
  12204. },
  12205. "build": {
  12206. "$ref": "#/components/schemas/AgentConfig"
  12207. },
  12208. "general": {
  12209. "$ref": "#/components/schemas/AgentConfig"
  12210. },
  12211. "explore": {
  12212. "$ref": "#/components/schemas/AgentConfig"
  12213. },
  12214. "scout": {
  12215. "$ref": "#/components/schemas/AgentConfig"
  12216. },
  12217. "title": {
  12218. "$ref": "#/components/schemas/AgentConfig"
  12219. },
  12220. "summary": {
  12221. "$ref": "#/components/schemas/AgentConfig"
  12222. },
  12223. "compaction": {
  12224. "$ref": "#/components/schemas/AgentConfig"
  12225. }
  12226. },
  12227. "additionalProperties": {
  12228. "$ref": "#/components/schemas/AgentConfig"
  12229. }
  12230. },
  12231. "provider": {
  12232. "type": "object",
  12233. "additionalProperties": {
  12234. "$ref": "#/components/schemas/ProviderConfig"
  12235. }
  12236. },
  12237. "mcp": {
  12238. "type": "object",
  12239. "additionalProperties": {
  12240. "anyOf": [
  12241. {
  12242. "$ref": "#/components/schemas/McpLocalConfig"
  12243. },
  12244. {
  12245. "$ref": "#/components/schemas/McpRemoteConfig"
  12246. },
  12247. {
  12248. "type": "object",
  12249. "properties": {
  12250. "enabled": {
  12251. "type": "boolean"
  12252. }
  12253. },
  12254. "required": ["enabled"],
  12255. "additionalProperties": false
  12256. }
  12257. ]
  12258. }
  12259. },
  12260. "formatter": {
  12261. "anyOf": [
  12262. {
  12263. "type": "boolean"
  12264. },
  12265. {
  12266. "type": "object",
  12267. "additionalProperties": {
  12268. "type": "object",
  12269. "properties": {
  12270. "disabled": {
  12271. "type": "boolean"
  12272. },
  12273. "command": {
  12274. "type": "array",
  12275. "items": {
  12276. "type": "string"
  12277. }
  12278. },
  12279. "environment": {
  12280. "type": "object",
  12281. "additionalProperties": {
  12282. "type": "string"
  12283. }
  12284. },
  12285. "extensions": {
  12286. "type": "array",
  12287. "items": {
  12288. "type": "string"
  12289. }
  12290. }
  12291. },
  12292. "additionalProperties": false
  12293. }
  12294. }
  12295. ],
  12296. "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."
  12297. },
  12298. "lsp": {
  12299. "anyOf": [
  12300. {
  12301. "type": "boolean"
  12302. },
  12303. {
  12304. "type": "object",
  12305. "additionalProperties": {
  12306. "anyOf": [
  12307. {
  12308. "type": "object",
  12309. "properties": {
  12310. "disabled": {
  12311. "type": "boolean",
  12312. "enum": [true]
  12313. }
  12314. },
  12315. "required": ["disabled"],
  12316. "additionalProperties": false
  12317. },
  12318. {
  12319. "type": "object",
  12320. "properties": {
  12321. "command": {
  12322. "type": "array",
  12323. "items": {
  12324. "type": "string"
  12325. }
  12326. },
  12327. "extensions": {
  12328. "type": "array",
  12329. "items": {
  12330. "type": "string"
  12331. }
  12332. },
  12333. "disabled": {
  12334. "type": "boolean"
  12335. },
  12336. "env": {
  12337. "type": "object",
  12338. "additionalProperties": {
  12339. "type": "string"
  12340. }
  12341. },
  12342. "initialization": {
  12343. "type": "object"
  12344. }
  12345. },
  12346. "required": ["command"],
  12347. "additionalProperties": false
  12348. }
  12349. ]
  12350. }
  12351. }
  12352. ],
  12353. "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."
  12354. },
  12355. "instructions": {
  12356. "type": "array",
  12357. "items": {
  12358. "type": "string"
  12359. }
  12360. },
  12361. "layout": {
  12362. "$ref": "#/components/schemas/LayoutConfig"
  12363. },
  12364. "permission": {
  12365. "$ref": "#/components/schemas/PermissionConfig"
  12366. },
  12367. "tools": {
  12368. "type": "object",
  12369. "additionalProperties": {
  12370. "type": "boolean"
  12371. }
  12372. },
  12373. "attachment": {
  12374. "$ref": "#/components/schemas/AttachmentConfig"
  12375. },
  12376. "enterprise": {
  12377. "type": "object",
  12378. "properties": {
  12379. "url": {
  12380. "type": "string"
  12381. }
  12382. },
  12383. "additionalProperties": false
  12384. },
  12385. "tool_output": {
  12386. "type": "object",
  12387. "properties": {
  12388. "max_lines": {
  12389. "type": "integer",
  12390. "exclusiveMinimum": 0
  12391. },
  12392. "max_bytes": {
  12393. "type": "integer",
  12394. "exclusiveMinimum": 0
  12395. }
  12396. },
  12397. "additionalProperties": false
  12398. },
  12399. "compaction": {
  12400. "type": "object",
  12401. "properties": {
  12402. "auto": {
  12403. "type": "boolean"
  12404. },
  12405. "prune": {
  12406. "type": "boolean"
  12407. },
  12408. "tail_turns": {
  12409. "type": "integer",
  12410. "minimum": 0
  12411. },
  12412. "preserve_recent_tokens": {
  12413. "type": "integer",
  12414. "minimum": 0
  12415. },
  12416. "reserved": {
  12417. "type": "integer",
  12418. "minimum": 0
  12419. }
  12420. },
  12421. "additionalProperties": false
  12422. },
  12423. "experimental": {
  12424. "type": "object",
  12425. "properties": {
  12426. "disable_paste_summary": {
  12427. "type": "boolean"
  12428. },
  12429. "batch_tool": {
  12430. "type": "boolean"
  12431. },
  12432. "openTelemetry": {
  12433. "type": "boolean"
  12434. },
  12435. "primary_tools": {
  12436. "type": "array",
  12437. "items": {
  12438. "type": "string"
  12439. }
  12440. },
  12441. "continue_loop_on_deny": {
  12442. "type": "boolean"
  12443. },
  12444. "mcp_timeout": {
  12445. "type": "integer",
  12446. "exclusiveMinimum": 0
  12447. }
  12448. },
  12449. "additionalProperties": false
  12450. }
  12451. },
  12452. "additionalProperties": false
  12453. },
  12454. "Model": {
  12455. "type": "object",
  12456. "properties": {
  12457. "id": {
  12458. "type": "string"
  12459. },
  12460. "providerID": {
  12461. "type": "string"
  12462. },
  12463. "api": {
  12464. "type": "object",
  12465. "properties": {
  12466. "id": {
  12467. "type": "string"
  12468. },
  12469. "url": {
  12470. "type": "string"
  12471. },
  12472. "npm": {
  12473. "type": "string"
  12474. }
  12475. },
  12476. "required": ["id", "url", "npm"],
  12477. "additionalProperties": false
  12478. },
  12479. "name": {
  12480. "type": "string"
  12481. },
  12482. "family": {
  12483. "type": "string"
  12484. },
  12485. "capabilities": {
  12486. "type": "object",
  12487. "properties": {
  12488. "temperature": {
  12489. "type": "boolean"
  12490. },
  12491. "reasoning": {
  12492. "type": "boolean"
  12493. },
  12494. "attachment": {
  12495. "type": "boolean"
  12496. },
  12497. "toolcall": {
  12498. "type": "boolean"
  12499. },
  12500. "input": {
  12501. "type": "object",
  12502. "properties": {
  12503. "text": {
  12504. "type": "boolean"
  12505. },
  12506. "audio": {
  12507. "type": "boolean"
  12508. },
  12509. "image": {
  12510. "type": "boolean"
  12511. },
  12512. "video": {
  12513. "type": "boolean"
  12514. },
  12515. "pdf": {
  12516. "type": "boolean"
  12517. }
  12518. },
  12519. "required": ["text", "audio", "image", "video", "pdf"],
  12520. "additionalProperties": false
  12521. },
  12522. "output": {
  12523. "type": "object",
  12524. "properties": {
  12525. "text": {
  12526. "type": "boolean"
  12527. },
  12528. "audio": {
  12529. "type": "boolean"
  12530. },
  12531. "image": {
  12532. "type": "boolean"
  12533. },
  12534. "video": {
  12535. "type": "boolean"
  12536. },
  12537. "pdf": {
  12538. "type": "boolean"
  12539. }
  12540. },
  12541. "required": ["text", "audio", "image", "video", "pdf"],
  12542. "additionalProperties": false
  12543. },
  12544. "interleaved": {
  12545. "anyOf": [
  12546. {
  12547. "type": "boolean"
  12548. },
  12549. {
  12550. "type": "object",
  12551. "properties": {
  12552. "field": {
  12553. "type": "string",
  12554. "enum": ["reasoning_content", "reasoning_details"]
  12555. }
  12556. },
  12557. "required": ["field"],
  12558. "additionalProperties": false
  12559. }
  12560. ]
  12561. }
  12562. },
  12563. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12564. "additionalProperties": false
  12565. },
  12566. "cost": {
  12567. "type": "object",
  12568. "properties": {
  12569. "input": {
  12570. "type": "number"
  12571. },
  12572. "output": {
  12573. "type": "number"
  12574. },
  12575. "cache": {
  12576. "type": "object",
  12577. "properties": {
  12578. "read": {
  12579. "type": "number"
  12580. },
  12581. "write": {
  12582. "type": "number"
  12583. }
  12584. },
  12585. "required": ["read", "write"],
  12586. "additionalProperties": false
  12587. },
  12588. "experimentalOver200K": {
  12589. "type": "object",
  12590. "properties": {
  12591. "input": {
  12592. "type": "number"
  12593. },
  12594. "output": {
  12595. "type": "number"
  12596. },
  12597. "cache": {
  12598. "type": "object",
  12599. "properties": {
  12600. "read": {
  12601. "type": "number"
  12602. },
  12603. "write": {
  12604. "type": "number"
  12605. }
  12606. },
  12607. "required": ["read", "write"],
  12608. "additionalProperties": false
  12609. }
  12610. },
  12611. "required": ["input", "output", "cache"],
  12612. "additionalProperties": false
  12613. }
  12614. },
  12615. "required": ["input", "output", "cache"],
  12616. "additionalProperties": false
  12617. },
  12618. "limit": {
  12619. "type": "object",
  12620. "properties": {
  12621. "context": {
  12622. "type": "number"
  12623. },
  12624. "input": {
  12625. "type": "number"
  12626. },
  12627. "output": {
  12628. "type": "number"
  12629. }
  12630. },
  12631. "required": ["context", "output"],
  12632. "additionalProperties": false
  12633. },
  12634. "status": {
  12635. "type": "string",
  12636. "enum": ["alpha", "beta", "deprecated", "active"]
  12637. },
  12638. "options": {
  12639. "type": "object"
  12640. },
  12641. "headers": {
  12642. "type": "object",
  12643. "additionalProperties": {
  12644. "type": "string"
  12645. }
  12646. },
  12647. "release_date": {
  12648. "type": "string"
  12649. },
  12650. "variants": {
  12651. "type": "object",
  12652. "additionalProperties": {
  12653. "type": "object"
  12654. }
  12655. }
  12656. },
  12657. "required": [
  12658. "id",
  12659. "providerID",
  12660. "api",
  12661. "name",
  12662. "capabilities",
  12663. "cost",
  12664. "limit",
  12665. "status",
  12666. "options",
  12667. "headers",
  12668. "release_date"
  12669. ],
  12670. "additionalProperties": false
  12671. },
  12672. "Provider": {
  12673. "type": "object",
  12674. "properties": {
  12675. "id": {
  12676. "type": "string"
  12677. },
  12678. "name": {
  12679. "type": "string"
  12680. },
  12681. "source": {
  12682. "type": "string",
  12683. "enum": ["env", "config", "custom", "api"]
  12684. },
  12685. "env": {
  12686. "type": "array",
  12687. "items": {
  12688. "type": "string"
  12689. }
  12690. },
  12691. "key": {
  12692. "type": "string"
  12693. },
  12694. "options": {
  12695. "type": "object"
  12696. },
  12697. "models": {
  12698. "type": "object",
  12699. "additionalProperties": {
  12700. "$ref": "#/components/schemas/Model"
  12701. }
  12702. }
  12703. },
  12704. "required": ["id", "name", "source", "env", "options", "models"],
  12705. "additionalProperties": false
  12706. },
  12707. "ConsoleState": {
  12708. "type": "object",
  12709. "properties": {
  12710. "consoleManagedProviders": {
  12711. "type": "array",
  12712. "items": {
  12713. "type": "string"
  12714. }
  12715. },
  12716. "activeOrgName": {
  12717. "type": "string"
  12718. },
  12719. "switchableOrgCount": {
  12720. "type": "integer",
  12721. "minimum": 0
  12722. }
  12723. },
  12724. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12725. "additionalProperties": false
  12726. },
  12727. "effect_HttpApiError_InternalServerError": {
  12728. "type": "object",
  12729. "properties": {
  12730. "_tag": {
  12731. "type": "string",
  12732. "enum": ["InternalServerError"]
  12733. }
  12734. },
  12735. "required": ["_tag"],
  12736. "additionalProperties": false
  12737. },
  12738. "ToolListItem": {
  12739. "type": "object",
  12740. "properties": {
  12741. "id": {
  12742. "type": "string"
  12743. },
  12744. "description": {
  12745. "type": "string"
  12746. },
  12747. "parameters": {}
  12748. },
  12749. "required": ["id", "description", "parameters"],
  12750. "additionalProperties": false
  12751. },
  12752. "ToolList": {
  12753. "type": "array",
  12754. "items": {
  12755. "$ref": "#/components/schemas/ToolListItem"
  12756. }
  12757. },
  12758. "ToolIDs": {
  12759. "type": "array",
  12760. "items": {
  12761. "type": "string"
  12762. }
  12763. },
  12764. "WorktreeCreateInput": {
  12765. "type": "object",
  12766. "properties": {
  12767. "name": {
  12768. "type": "string"
  12769. },
  12770. "startCommand": {
  12771. "type": "string",
  12772. "description": "Additional startup script to run after the project's start command"
  12773. }
  12774. },
  12775. "additionalProperties": false
  12776. },
  12777. "Worktree": {
  12778. "type": "object",
  12779. "properties": {
  12780. "name": {
  12781. "type": "string"
  12782. },
  12783. "branch": {
  12784. "type": "string"
  12785. },
  12786. "directory": {
  12787. "type": "string"
  12788. }
  12789. },
  12790. "required": ["name", "branch", "directory"],
  12791. "additionalProperties": false
  12792. },
  12793. "WorktreeRemoveInput": {
  12794. "type": "object",
  12795. "properties": {
  12796. "directory": {
  12797. "type": "string"
  12798. }
  12799. },
  12800. "required": ["directory"],
  12801. "additionalProperties": false
  12802. },
  12803. "WorktreeResetInput": {
  12804. "type": "object",
  12805. "properties": {
  12806. "directory": {
  12807. "type": "string"
  12808. }
  12809. },
  12810. "required": ["directory"],
  12811. "additionalProperties": false
  12812. },
  12813. "ProjectSummary": {
  12814. "type": "object",
  12815. "properties": {
  12816. "id": {
  12817. "type": "string"
  12818. },
  12819. "name": {
  12820. "type": "string"
  12821. },
  12822. "worktree": {
  12823. "type": "string"
  12824. }
  12825. },
  12826. "required": ["id", "worktree"],
  12827. "additionalProperties": false
  12828. },
  12829. "GlobalSession": {
  12830. "type": "object",
  12831. "properties": {
  12832. "id": {
  12833. "type": "string",
  12834. "pattern": "^ses"
  12835. },
  12836. "slug": {
  12837. "type": "string"
  12838. },
  12839. "projectID": {
  12840. "type": "string"
  12841. },
  12842. "workspaceID": {
  12843. "type": "string",
  12844. "pattern": "^wrk"
  12845. },
  12846. "directory": {
  12847. "type": "string"
  12848. },
  12849. "path": {
  12850. "type": "string"
  12851. },
  12852. "parentID": {
  12853. "type": "string",
  12854. "pattern": "^ses"
  12855. },
  12856. "summary": {
  12857. "type": "object",
  12858. "properties": {
  12859. "additions": {
  12860. "type": "number"
  12861. },
  12862. "deletions": {
  12863. "type": "number"
  12864. },
  12865. "files": {
  12866. "type": "number"
  12867. },
  12868. "diffs": {
  12869. "type": "array",
  12870. "items": {
  12871. "$ref": "#/components/schemas/SnapshotFileDiff"
  12872. }
  12873. }
  12874. },
  12875. "required": ["additions", "deletions", "files"],
  12876. "additionalProperties": false
  12877. },
  12878. "share": {
  12879. "type": "object",
  12880. "properties": {
  12881. "url": {
  12882. "type": "string"
  12883. }
  12884. },
  12885. "required": ["url"],
  12886. "additionalProperties": false
  12887. },
  12888. "title": {
  12889. "type": "string"
  12890. },
  12891. "agent": {
  12892. "type": "string"
  12893. },
  12894. "model": {
  12895. "type": "object",
  12896. "properties": {
  12897. "id": {
  12898. "type": "string"
  12899. },
  12900. "providerID": {
  12901. "type": "string"
  12902. },
  12903. "variant": {
  12904. "type": "string"
  12905. }
  12906. },
  12907. "required": ["id", "providerID"],
  12908. "additionalProperties": false
  12909. },
  12910. "version": {
  12911. "type": "string"
  12912. },
  12913. "time": {
  12914. "type": "object",
  12915. "properties": {
  12916. "created": {
  12917. "type": "integer",
  12918. "minimum": 0
  12919. },
  12920. "updated": {
  12921. "type": "integer",
  12922. "minimum": 0
  12923. },
  12924. "compacting": {
  12925. "type": "integer",
  12926. "minimum": 0
  12927. },
  12928. "archived": {
  12929. "type": "number"
  12930. }
  12931. },
  12932. "required": ["created", "updated"],
  12933. "additionalProperties": false
  12934. },
  12935. "permission": {
  12936. "$ref": "#/components/schemas/PermissionRuleset"
  12937. },
  12938. "revert": {
  12939. "type": "object",
  12940. "properties": {
  12941. "messageID": {
  12942. "type": "string",
  12943. "pattern": "^msg"
  12944. },
  12945. "partID": {
  12946. "type": "string",
  12947. "pattern": "^prt"
  12948. },
  12949. "snapshot": {
  12950. "type": "string"
  12951. },
  12952. "diff": {
  12953. "type": "string"
  12954. }
  12955. },
  12956. "required": ["messageID"],
  12957. "additionalProperties": false
  12958. },
  12959. "project": {
  12960. "anyOf": [
  12961. {
  12962. "$ref": "#/components/schemas/ProjectSummary"
  12963. },
  12964. {
  12965. "type": "null"
  12966. }
  12967. ]
  12968. }
  12969. },
  12970. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  12971. "additionalProperties": false
  12972. },
  12973. "McpResource": {
  12974. "type": "object",
  12975. "properties": {
  12976. "name": {
  12977. "type": "string"
  12978. },
  12979. "uri": {
  12980. "type": "string"
  12981. },
  12982. "description": {
  12983. "type": "string"
  12984. },
  12985. "mimeType": {
  12986. "type": "string"
  12987. },
  12988. "client": {
  12989. "type": "string"
  12990. }
  12991. },
  12992. "required": ["name", "uri", "client"],
  12993. "additionalProperties": false
  12994. },
  12995. "Symbol": {
  12996. "type": "object",
  12997. "properties": {
  12998. "name": {
  12999. "type": "string"
  13000. },
  13001. "kind": {
  13002. "type": "integer",
  13003. "minimum": 0
  13004. },
  13005. "location": {
  13006. "type": "object",
  13007. "properties": {
  13008. "uri": {
  13009. "type": "string"
  13010. },
  13011. "range": {
  13012. "$ref": "#/components/schemas/Range"
  13013. }
  13014. },
  13015. "required": ["uri", "range"],
  13016. "additionalProperties": false
  13017. }
  13018. },
  13019. "required": ["name", "kind", "location"],
  13020. "additionalProperties": false
  13021. },
  13022. "FileNode": {
  13023. "type": "object",
  13024. "properties": {
  13025. "name": {
  13026. "type": "string"
  13027. },
  13028. "path": {
  13029. "type": "string"
  13030. },
  13031. "absolute": {
  13032. "type": "string"
  13033. },
  13034. "type": {
  13035. "type": "string",
  13036. "enum": ["file", "directory"]
  13037. },
  13038. "ignored": {
  13039. "type": "boolean"
  13040. }
  13041. },
  13042. "required": ["name", "path", "absolute", "type", "ignored"],
  13043. "additionalProperties": false
  13044. },
  13045. "FileContent": {
  13046. "type": "object",
  13047. "properties": {
  13048. "type": {
  13049. "type": "string",
  13050. "enum": ["text", "binary"]
  13051. },
  13052. "content": {
  13053. "type": "string"
  13054. },
  13055. "diff": {
  13056. "type": "string"
  13057. },
  13058. "patch": {
  13059. "type": "object",
  13060. "properties": {
  13061. "oldFileName": {
  13062. "type": "string"
  13063. },
  13064. "newFileName": {
  13065. "type": "string"
  13066. },
  13067. "oldHeader": {
  13068. "type": "string"
  13069. },
  13070. "newHeader": {
  13071. "type": "string"
  13072. },
  13073. "hunks": {
  13074. "type": "array",
  13075. "items": {
  13076. "type": "object",
  13077. "properties": {
  13078. "oldStart": {
  13079. "type": "integer",
  13080. "minimum": 0
  13081. },
  13082. "oldLines": {
  13083. "type": "integer",
  13084. "minimum": 0
  13085. },
  13086. "newStart": {
  13087. "type": "integer",
  13088. "minimum": 0
  13089. },
  13090. "newLines": {
  13091. "type": "integer",
  13092. "minimum": 0
  13093. },
  13094. "lines": {
  13095. "type": "array",
  13096. "items": {
  13097. "type": "string"
  13098. }
  13099. }
  13100. },
  13101. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13102. "additionalProperties": false
  13103. }
  13104. },
  13105. "index": {
  13106. "type": "string"
  13107. }
  13108. },
  13109. "required": ["oldFileName", "newFileName", "hunks"],
  13110. "additionalProperties": false
  13111. },
  13112. "encoding": {
  13113. "type": "string",
  13114. "enum": ["base64"]
  13115. },
  13116. "mimeType": {
  13117. "type": "string"
  13118. }
  13119. },
  13120. "required": ["type", "content"],
  13121. "additionalProperties": false
  13122. },
  13123. "File": {
  13124. "type": "object",
  13125. "properties": {
  13126. "path": {
  13127. "type": "string"
  13128. },
  13129. "added": {
  13130. "type": "integer",
  13131. "minimum": 0
  13132. },
  13133. "removed": {
  13134. "type": "integer",
  13135. "minimum": 0
  13136. },
  13137. "status": {
  13138. "type": "string",
  13139. "enum": ["added", "deleted", "modified"]
  13140. }
  13141. },
  13142. "required": ["path", "added", "removed", "status"],
  13143. "additionalProperties": false
  13144. },
  13145. "Path": {
  13146. "type": "object",
  13147. "properties": {
  13148. "home": {
  13149. "type": "string"
  13150. },
  13151. "state": {
  13152. "type": "string"
  13153. },
  13154. "config": {
  13155. "type": "string"
  13156. },
  13157. "worktree": {
  13158. "type": "string"
  13159. },
  13160. "directory": {
  13161. "type": "string"
  13162. }
  13163. },
  13164. "required": ["home", "state", "config", "worktree", "directory"],
  13165. "additionalProperties": false
  13166. },
  13167. "VcsInfo": {
  13168. "type": "object",
  13169. "properties": {
  13170. "branch": {
  13171. "type": "string"
  13172. },
  13173. "default_branch": {
  13174. "type": "string"
  13175. }
  13176. },
  13177. "additionalProperties": false
  13178. },
  13179. "VcsFileStatus": {
  13180. "type": "object",
  13181. "properties": {
  13182. "file": {
  13183. "type": "string"
  13184. },
  13185. "additions": {
  13186. "type": "number"
  13187. },
  13188. "deletions": {
  13189. "type": "number"
  13190. },
  13191. "status": {
  13192. "type": "string",
  13193. "enum": ["added", "deleted", "modified"]
  13194. }
  13195. },
  13196. "required": ["file", "additions", "deletions", "status"],
  13197. "additionalProperties": false
  13198. },
  13199. "VcsFileDiff": {
  13200. "type": "object",
  13201. "properties": {
  13202. "file": {
  13203. "type": "string"
  13204. },
  13205. "patch": {
  13206. "type": "string"
  13207. },
  13208. "additions": {
  13209. "type": "number"
  13210. },
  13211. "deletions": {
  13212. "type": "number"
  13213. },
  13214. "status": {
  13215. "type": "string",
  13216. "enum": ["added", "deleted", "modified"]
  13217. }
  13218. },
  13219. "required": ["file", "additions", "deletions"],
  13220. "additionalProperties": false
  13221. },
  13222. "VcsApplyError": {
  13223. "type": "object",
  13224. "properties": {
  13225. "name": {
  13226. "type": "string",
  13227. "enum": ["VcsApplyError"]
  13228. },
  13229. "data": {
  13230. "type": "object",
  13231. "properties": {
  13232. "message": {
  13233. "type": "string"
  13234. },
  13235. "reason": {
  13236. "type": "string",
  13237. "enum": ["non-git", "not-clean"]
  13238. }
  13239. },
  13240. "required": ["message", "reason"],
  13241. "additionalProperties": false
  13242. }
  13243. },
  13244. "required": ["name", "data"],
  13245. "additionalProperties": false
  13246. },
  13247. "Command": {
  13248. "type": "object",
  13249. "properties": {
  13250. "name": {
  13251. "type": "string"
  13252. },
  13253. "description": {
  13254. "type": "string"
  13255. },
  13256. "agent": {
  13257. "type": "string"
  13258. },
  13259. "model": {
  13260. "type": "string"
  13261. },
  13262. "source": {
  13263. "type": "string",
  13264. "enum": ["command", "mcp", "skill"]
  13265. },
  13266. "template": {
  13267. "type": "string"
  13268. },
  13269. "subtask": {
  13270. "type": "boolean"
  13271. },
  13272. "hints": {
  13273. "type": "array",
  13274. "items": {
  13275. "type": "string"
  13276. }
  13277. }
  13278. },
  13279. "required": ["name", "template", "hints"],
  13280. "additionalProperties": false
  13281. },
  13282. "Agent": {
  13283. "type": "object",
  13284. "properties": {
  13285. "name": {
  13286. "type": "string"
  13287. },
  13288. "description": {
  13289. "type": "string"
  13290. },
  13291. "mode": {
  13292. "type": "string",
  13293. "enum": ["subagent", "primary", "all"]
  13294. },
  13295. "native": {
  13296. "type": "boolean"
  13297. },
  13298. "hidden": {
  13299. "type": "boolean"
  13300. },
  13301. "topP": {
  13302. "type": "number"
  13303. },
  13304. "temperature": {
  13305. "type": "number"
  13306. },
  13307. "color": {
  13308. "type": "string"
  13309. },
  13310. "permission": {
  13311. "$ref": "#/components/schemas/PermissionRuleset"
  13312. },
  13313. "model": {
  13314. "type": "object",
  13315. "properties": {
  13316. "modelID": {
  13317. "type": "string"
  13318. },
  13319. "providerID": {
  13320. "type": "string"
  13321. }
  13322. },
  13323. "required": ["modelID", "providerID"],
  13324. "additionalProperties": false
  13325. },
  13326. "variant": {
  13327. "type": "string"
  13328. },
  13329. "prompt": {
  13330. "type": "string"
  13331. },
  13332. "options": {
  13333. "type": "object"
  13334. },
  13335. "steps": {
  13336. "type": "number"
  13337. }
  13338. },
  13339. "required": ["name", "mode", "permission", "options"],
  13340. "additionalProperties": false
  13341. },
  13342. "LSPStatus": {
  13343. "type": "object",
  13344. "properties": {
  13345. "id": {
  13346. "type": "string"
  13347. },
  13348. "name": {
  13349. "type": "string"
  13350. },
  13351. "root": {
  13352. "type": "string"
  13353. },
  13354. "status": {
  13355. "type": "string",
  13356. "enum": ["connected", "error"]
  13357. }
  13358. },
  13359. "required": ["id", "name", "root", "status"],
  13360. "additionalProperties": false
  13361. },
  13362. "FormatterStatus": {
  13363. "type": "object",
  13364. "properties": {
  13365. "name": {
  13366. "type": "string"
  13367. },
  13368. "extensions": {
  13369. "type": "array",
  13370. "items": {
  13371. "type": "string"
  13372. }
  13373. },
  13374. "enabled": {
  13375. "type": "boolean"
  13376. }
  13377. },
  13378. "required": ["name", "extensions", "enabled"],
  13379. "additionalProperties": false
  13380. },
  13381. "MCPStatusConnected": {
  13382. "type": "object",
  13383. "properties": {
  13384. "status": {
  13385. "type": "string",
  13386. "enum": ["connected"]
  13387. }
  13388. },
  13389. "required": ["status"],
  13390. "additionalProperties": false
  13391. },
  13392. "MCPStatusDisabled": {
  13393. "type": "object",
  13394. "properties": {
  13395. "status": {
  13396. "type": "string",
  13397. "enum": ["disabled"]
  13398. }
  13399. },
  13400. "required": ["status"],
  13401. "additionalProperties": false
  13402. },
  13403. "MCPStatusFailed": {
  13404. "type": "object",
  13405. "properties": {
  13406. "status": {
  13407. "type": "string",
  13408. "enum": ["failed"]
  13409. },
  13410. "error": {
  13411. "type": "string"
  13412. }
  13413. },
  13414. "required": ["status", "error"],
  13415. "additionalProperties": false
  13416. },
  13417. "MCPStatusNeedsAuth": {
  13418. "type": "object",
  13419. "properties": {
  13420. "status": {
  13421. "type": "string",
  13422. "enum": ["needs_auth"]
  13423. }
  13424. },
  13425. "required": ["status"],
  13426. "additionalProperties": false
  13427. },
  13428. "MCPStatusNeedsClientRegistration": {
  13429. "type": "object",
  13430. "properties": {
  13431. "status": {
  13432. "type": "string",
  13433. "enum": ["needs_client_registration"]
  13434. },
  13435. "error": {
  13436. "type": "string"
  13437. }
  13438. },
  13439. "required": ["status", "error"],
  13440. "additionalProperties": false
  13441. },
  13442. "MCPStatus": {
  13443. "anyOf": [
  13444. {
  13445. "$ref": "#/components/schemas/MCPStatusConnected"
  13446. },
  13447. {
  13448. "$ref": "#/components/schemas/MCPStatusDisabled"
  13449. },
  13450. {
  13451. "$ref": "#/components/schemas/MCPStatusFailed"
  13452. },
  13453. {
  13454. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13455. },
  13456. {
  13457. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13458. }
  13459. ]
  13460. },
  13461. "McpUnsupportedOAuthError": {
  13462. "type": "object",
  13463. "properties": {
  13464. "error": {
  13465. "type": "string"
  13466. }
  13467. },
  13468. "required": ["error"],
  13469. "additionalProperties": false
  13470. },
  13471. "NotFoundError": {
  13472. "type": "object",
  13473. "required": ["name", "data"],
  13474. "properties": {
  13475. "name": {
  13476. "type": "string",
  13477. "enum": ["NotFoundError"]
  13478. },
  13479. "data": {
  13480. "type": "object",
  13481. "required": ["message"],
  13482. "properties": {
  13483. "message": {
  13484. "type": "string"
  13485. }
  13486. }
  13487. }
  13488. }
  13489. },
  13490. "effect_HttpApiError_Forbidden": {
  13491. "type": "object",
  13492. "properties": {
  13493. "_tag": {
  13494. "type": "string",
  13495. "enum": ["Forbidden"]
  13496. }
  13497. },
  13498. "required": ["_tag"],
  13499. "additionalProperties": false
  13500. },
  13501. "ProviderAuthMethod": {
  13502. "type": "object",
  13503. "properties": {
  13504. "type": {
  13505. "type": "string",
  13506. "enum": ["oauth", "api"]
  13507. },
  13508. "label": {
  13509. "type": "string"
  13510. },
  13511. "prompts": {
  13512. "type": "array",
  13513. "items": {
  13514. "anyOf": [
  13515. {
  13516. "type": "object",
  13517. "properties": {
  13518. "type": {
  13519. "type": "string",
  13520. "enum": ["text"]
  13521. },
  13522. "key": {
  13523. "type": "string"
  13524. },
  13525. "message": {
  13526. "type": "string"
  13527. },
  13528. "placeholder": {
  13529. "type": "string"
  13530. },
  13531. "when": {
  13532. "type": "object",
  13533. "properties": {
  13534. "key": {
  13535. "type": "string"
  13536. },
  13537. "op": {
  13538. "type": "string",
  13539. "enum": ["eq", "neq"]
  13540. },
  13541. "value": {
  13542. "type": "string"
  13543. }
  13544. },
  13545. "required": ["key", "op", "value"],
  13546. "additionalProperties": false
  13547. }
  13548. },
  13549. "required": ["type", "key", "message"],
  13550. "additionalProperties": false
  13551. },
  13552. {
  13553. "type": "object",
  13554. "properties": {
  13555. "type": {
  13556. "type": "string",
  13557. "enum": ["select"]
  13558. },
  13559. "key": {
  13560. "type": "string"
  13561. },
  13562. "message": {
  13563. "type": "string"
  13564. },
  13565. "options": {
  13566. "type": "array",
  13567. "items": {
  13568. "type": "object",
  13569. "properties": {
  13570. "label": {
  13571. "type": "string"
  13572. },
  13573. "value": {
  13574. "type": "string"
  13575. },
  13576. "hint": {
  13577. "type": "string"
  13578. }
  13579. },
  13580. "required": ["label", "value"],
  13581. "additionalProperties": false
  13582. }
  13583. },
  13584. "when": {
  13585. "type": "object",
  13586. "properties": {
  13587. "key": {
  13588. "type": "string"
  13589. },
  13590. "op": {
  13591. "type": "string",
  13592. "enum": ["eq", "neq"]
  13593. },
  13594. "value": {
  13595. "type": "string"
  13596. }
  13597. },
  13598. "required": ["key", "op", "value"],
  13599. "additionalProperties": false
  13600. }
  13601. },
  13602. "required": ["type", "key", "message", "options"],
  13603. "additionalProperties": false
  13604. }
  13605. ]
  13606. }
  13607. }
  13608. },
  13609. "required": ["type", "label"],
  13610. "additionalProperties": false
  13611. },
  13612. "ProviderAuthAuthorization": {
  13613. "type": "object",
  13614. "properties": {
  13615. "url": {
  13616. "type": "string"
  13617. },
  13618. "method": {
  13619. "type": "string",
  13620. "enum": ["auto", "code"]
  13621. },
  13622. "instructions": {
  13623. "type": "string"
  13624. }
  13625. },
  13626. "required": ["url", "method", "instructions"],
  13627. "additionalProperties": false
  13628. },
  13629. "TextPartInput": {
  13630. "type": "object",
  13631. "properties": {
  13632. "id": {
  13633. "type": "string",
  13634. "pattern": "^prt"
  13635. },
  13636. "type": {
  13637. "type": "string",
  13638. "enum": ["text"]
  13639. },
  13640. "text": {
  13641. "type": "string"
  13642. },
  13643. "synthetic": {
  13644. "type": "boolean"
  13645. },
  13646. "ignored": {
  13647. "type": "boolean"
  13648. },
  13649. "time": {
  13650. "type": "object",
  13651. "properties": {
  13652. "start": {
  13653. "type": "integer",
  13654. "minimum": 0
  13655. },
  13656. "end": {
  13657. "type": "integer",
  13658. "minimum": 0
  13659. }
  13660. },
  13661. "required": ["start"],
  13662. "additionalProperties": false
  13663. },
  13664. "metadata": {
  13665. "type": "object"
  13666. }
  13667. },
  13668. "required": ["type", "text"],
  13669. "additionalProperties": false
  13670. },
  13671. "FilePartInput": {
  13672. "type": "object",
  13673. "properties": {
  13674. "id": {
  13675. "type": "string",
  13676. "pattern": "^prt"
  13677. },
  13678. "type": {
  13679. "type": "string",
  13680. "enum": ["file"]
  13681. },
  13682. "mime": {
  13683. "type": "string"
  13684. },
  13685. "filename": {
  13686. "type": "string"
  13687. },
  13688. "url": {
  13689. "type": "string"
  13690. },
  13691. "source": {
  13692. "$ref": "#/components/schemas/FilePartSource"
  13693. }
  13694. },
  13695. "required": ["type", "mime", "url"],
  13696. "additionalProperties": false
  13697. },
  13698. "AgentPartInput": {
  13699. "type": "object",
  13700. "properties": {
  13701. "id": {
  13702. "type": "string",
  13703. "pattern": "^prt"
  13704. },
  13705. "type": {
  13706. "type": "string",
  13707. "enum": ["agent"]
  13708. },
  13709. "name": {
  13710. "type": "string"
  13711. },
  13712. "source": {
  13713. "type": "object",
  13714. "properties": {
  13715. "value": {
  13716. "type": "string"
  13717. },
  13718. "start": {
  13719. "type": "integer",
  13720. "minimum": 0
  13721. },
  13722. "end": {
  13723. "type": "integer",
  13724. "minimum": 0
  13725. }
  13726. },
  13727. "required": ["value", "start", "end"],
  13728. "additionalProperties": false
  13729. }
  13730. },
  13731. "required": ["type", "name"],
  13732. "additionalProperties": false
  13733. },
  13734. "SubtaskPartInput": {
  13735. "type": "object",
  13736. "properties": {
  13737. "id": {
  13738. "type": "string",
  13739. "pattern": "^prt"
  13740. },
  13741. "type": {
  13742. "type": "string",
  13743. "enum": ["subtask"]
  13744. },
  13745. "prompt": {
  13746. "type": "string"
  13747. },
  13748. "description": {
  13749. "type": "string"
  13750. },
  13751. "agent": {
  13752. "type": "string"
  13753. },
  13754. "model": {
  13755. "type": "object",
  13756. "properties": {
  13757. "providerID": {
  13758. "type": "string"
  13759. },
  13760. "modelID": {
  13761. "type": "string"
  13762. }
  13763. },
  13764. "required": ["providerID", "modelID"],
  13765. "additionalProperties": false
  13766. },
  13767. "command": {
  13768. "type": "string"
  13769. }
  13770. },
  13771. "required": ["type", "prompt", "description", "agent"],
  13772. "additionalProperties": false
  13773. },
  13774. "V2SessionsResponse": {
  13775. "type": "object",
  13776. "properties": {
  13777. "items": {
  13778. "type": "array",
  13779. "items": {
  13780. "$ref": "#/components/schemas/SessionInfo"
  13781. }
  13782. },
  13783. "cursor": {
  13784. "type": "object",
  13785. "properties": {
  13786. "previous": {
  13787. "type": "string"
  13788. },
  13789. "next": {
  13790. "type": "string"
  13791. }
  13792. },
  13793. "additionalProperties": false
  13794. }
  13795. },
  13796. "required": ["items", "cursor"],
  13797. "additionalProperties": false
  13798. },
  13799. "V2SessionMessagesResponse": {
  13800. "type": "object",
  13801. "properties": {
  13802. "items": {
  13803. "type": "array",
  13804. "items": {
  13805. "$ref": "#/components/schemas/SessionMessage"
  13806. }
  13807. },
  13808. "cursor": {
  13809. "type": "object",
  13810. "properties": {
  13811. "previous": {
  13812. "type": "string"
  13813. },
  13814. "next": {
  13815. "type": "string"
  13816. }
  13817. },
  13818. "additionalProperties": false
  13819. }
  13820. },
  13821. "required": ["items", "cursor"],
  13822. "additionalProperties": false
  13823. },
  13824. "EventTuiPromptAppend": {
  13825. "type": "object",
  13826. "properties": {
  13827. "type": {
  13828. "type": "string",
  13829. "enum": ["tui.prompt.append"]
  13830. },
  13831. "properties": {
  13832. "type": "object",
  13833. "properties": {
  13834. "text": {
  13835. "type": "string"
  13836. }
  13837. },
  13838. "required": ["text"],
  13839. "additionalProperties": false
  13840. }
  13841. },
  13842. "required": ["type", "properties"],
  13843. "additionalProperties": false
  13844. },
  13845. "EventTuiCommandExecute": {
  13846. "type": "object",
  13847. "properties": {
  13848. "type": {
  13849. "type": "string",
  13850. "enum": ["tui.command.execute"]
  13851. },
  13852. "properties": {
  13853. "type": "object",
  13854. "properties": {
  13855. "command": {
  13856. "anyOf": [
  13857. {
  13858. "type": "string",
  13859. "enum": [
  13860. "session.list",
  13861. "session.new",
  13862. "session.share",
  13863. "session.interrupt",
  13864. "session.compact",
  13865. "session.page.up",
  13866. "session.page.down",
  13867. "session.line.up",
  13868. "session.line.down",
  13869. "session.half.page.up",
  13870. "session.half.page.down",
  13871. "session.first",
  13872. "session.last",
  13873. "prompt.clear",
  13874. "prompt.submit",
  13875. "agent.cycle"
  13876. ]
  13877. },
  13878. {
  13879. "type": "string"
  13880. }
  13881. ]
  13882. }
  13883. },
  13884. "required": ["command"],
  13885. "additionalProperties": false
  13886. }
  13887. },
  13888. "required": ["type", "properties"],
  13889. "additionalProperties": false
  13890. },
  13891. "EventTuiToastShow": {
  13892. "type": "object",
  13893. "properties": {
  13894. "type": {
  13895. "type": "string",
  13896. "enum": ["tui.toast.show"]
  13897. },
  13898. "properties": {
  13899. "type": "object",
  13900. "properties": {
  13901. "title": {
  13902. "type": "string"
  13903. },
  13904. "message": {
  13905. "type": "string"
  13906. },
  13907. "variant": {
  13908. "type": "string",
  13909. "enum": ["info", "success", "warning", "error"]
  13910. },
  13911. "duration": {
  13912. "type": "integer",
  13913. "exclusiveMinimum": 0
  13914. }
  13915. },
  13916. "required": ["message", "variant"],
  13917. "additionalProperties": false
  13918. }
  13919. },
  13920. "required": ["type", "properties"],
  13921. "additionalProperties": false
  13922. },
  13923. "EventTuiSessionSelect": {
  13924. "type": "object",
  13925. "properties": {
  13926. "type": {
  13927. "type": "string",
  13928. "enum": ["tui.session.select"]
  13929. },
  13930. "properties": {
  13931. "type": "object",
  13932. "properties": {
  13933. "sessionID": {
  13934. "type": "string",
  13935. "pattern": "^ses",
  13936. "description": "Session ID to navigate to"
  13937. }
  13938. },
  13939. "required": ["sessionID"],
  13940. "additionalProperties": false
  13941. }
  13942. },
  13943. "required": ["type", "properties"],
  13944. "additionalProperties": false
  13945. },
  13946. "Workspace": {
  13947. "type": "object",
  13948. "properties": {
  13949. "id": {
  13950. "type": "string",
  13951. "pattern": "^wrk"
  13952. },
  13953. "type": {
  13954. "type": "string"
  13955. },
  13956. "name": {
  13957. "type": "string"
  13958. },
  13959. "branch": {
  13960. "anyOf": [
  13961. {
  13962. "type": "string"
  13963. },
  13964. {
  13965. "type": "null"
  13966. }
  13967. ]
  13968. },
  13969. "directory": {
  13970. "anyOf": [
  13971. {
  13972. "type": "string"
  13973. },
  13974. {
  13975. "type": "null"
  13976. }
  13977. ]
  13978. },
  13979. "extra": {
  13980. "anyOf": [
  13981. {},
  13982. {
  13983. "type": "null"
  13984. }
  13985. ]
  13986. },
  13987. "projectID": {
  13988. "type": "string"
  13989. },
  13990. "timeUsed": {
  13991. "anyOf": [
  13992. {
  13993. "type": "number"
  13994. },
  13995. {
  13996. "type": "string",
  13997. "enum": ["NaN"]
  13998. },
  13999. {
  14000. "type": "string",
  14001. "enum": ["Infinity"]
  14002. },
  14003. {
  14004. "type": "string",
  14005. "enum": ["-Infinity"]
  14006. },
  14007. {
  14008. "type": "string",
  14009. "enum": ["Infinity", "-Infinity", "NaN"]
  14010. }
  14011. ]
  14012. }
  14013. },
  14014. "required": ["id", "type", "name", "branch", "directory", "extra", "projectID", "timeUsed"],
  14015. "additionalProperties": false
  14016. },
  14017. "WorkspaceWarpError": {
  14018. "type": "object",
  14019. "properties": {
  14020. "name": {
  14021. "type": "string",
  14022. "enum": ["WorkspaceWarpError"]
  14023. },
  14024. "data": {
  14025. "type": "object",
  14026. "properties": {
  14027. "message": {
  14028. "type": "string"
  14029. }
  14030. },
  14031. "required": ["message"],
  14032. "additionalProperties": false
  14033. }
  14034. },
  14035. "required": ["name", "data"],
  14036. "additionalProperties": false
  14037. },
  14038. "SyncEventMessageUpdated": {
  14039. "type": "object",
  14040. "properties": {
  14041. "type": {
  14042. "type": "string",
  14043. "enum": ["sync"]
  14044. },
  14045. "name": {
  14046. "type": "string",
  14047. "enum": ["message.updated.1"]
  14048. },
  14049. "id": {
  14050. "type": "string"
  14051. },
  14052. "seq": {
  14053. "type": "number"
  14054. },
  14055. "aggregateID": {
  14056. "type": "string",
  14057. "enum": ["sessionID"]
  14058. },
  14059. "data": {
  14060. "type": "object",
  14061. "properties": {
  14062. "sessionID": {
  14063. "type": "string",
  14064. "pattern": "^ses"
  14065. },
  14066. "info": {
  14067. "$ref": "#/components/schemas/Message"
  14068. }
  14069. },
  14070. "required": ["sessionID", "info"],
  14071. "additionalProperties": false
  14072. }
  14073. },
  14074. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14075. "additionalProperties": false
  14076. },
  14077. "SyncEventMessageRemoved": {
  14078. "type": "object",
  14079. "properties": {
  14080. "type": {
  14081. "type": "string",
  14082. "enum": ["sync"]
  14083. },
  14084. "name": {
  14085. "type": "string",
  14086. "enum": ["message.removed.1"]
  14087. },
  14088. "id": {
  14089. "type": "string"
  14090. },
  14091. "seq": {
  14092. "type": "number"
  14093. },
  14094. "aggregateID": {
  14095. "type": "string",
  14096. "enum": ["sessionID"]
  14097. },
  14098. "data": {
  14099. "type": "object",
  14100. "properties": {
  14101. "sessionID": {
  14102. "type": "string",
  14103. "pattern": "^ses"
  14104. },
  14105. "messageID": {
  14106. "type": "string",
  14107. "pattern": "^msg"
  14108. }
  14109. },
  14110. "required": ["sessionID", "messageID"],
  14111. "additionalProperties": false
  14112. }
  14113. },
  14114. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14115. "additionalProperties": false
  14116. },
  14117. "SyncEventMessagePartUpdated": {
  14118. "type": "object",
  14119. "properties": {
  14120. "type": {
  14121. "type": "string",
  14122. "enum": ["sync"]
  14123. },
  14124. "name": {
  14125. "type": "string",
  14126. "enum": ["message.part.updated.1"]
  14127. },
  14128. "id": {
  14129. "type": "string"
  14130. },
  14131. "seq": {
  14132. "type": "number"
  14133. },
  14134. "aggregateID": {
  14135. "type": "string",
  14136. "enum": ["sessionID"]
  14137. },
  14138. "data": {
  14139. "type": "object",
  14140. "properties": {
  14141. "sessionID": {
  14142. "type": "string",
  14143. "pattern": "^ses"
  14144. },
  14145. "part": {
  14146. "$ref": "#/components/schemas/Part"
  14147. },
  14148. "time": {
  14149. "type": "integer",
  14150. "minimum": 0
  14151. }
  14152. },
  14153. "required": ["sessionID", "part", "time"],
  14154. "additionalProperties": false
  14155. }
  14156. },
  14157. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14158. "additionalProperties": false
  14159. },
  14160. "SyncEventMessagePartRemoved": {
  14161. "type": "object",
  14162. "properties": {
  14163. "type": {
  14164. "type": "string",
  14165. "enum": ["sync"]
  14166. },
  14167. "name": {
  14168. "type": "string",
  14169. "enum": ["message.part.removed.1"]
  14170. },
  14171. "id": {
  14172. "type": "string"
  14173. },
  14174. "seq": {
  14175. "type": "number"
  14176. },
  14177. "aggregateID": {
  14178. "type": "string",
  14179. "enum": ["sessionID"]
  14180. },
  14181. "data": {
  14182. "type": "object",
  14183. "properties": {
  14184. "sessionID": {
  14185. "type": "string",
  14186. "pattern": "^ses"
  14187. },
  14188. "messageID": {
  14189. "type": "string",
  14190. "pattern": "^msg"
  14191. },
  14192. "partID": {
  14193. "type": "string",
  14194. "pattern": "^prt"
  14195. }
  14196. },
  14197. "required": ["sessionID", "messageID", "partID"],
  14198. "additionalProperties": false
  14199. }
  14200. },
  14201. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14202. "additionalProperties": false
  14203. },
  14204. "SyncEventSessionCreated": {
  14205. "type": "object",
  14206. "properties": {
  14207. "type": {
  14208. "type": "string",
  14209. "enum": ["sync"]
  14210. },
  14211. "name": {
  14212. "type": "string",
  14213. "enum": ["session.created.1"]
  14214. },
  14215. "id": {
  14216. "type": "string"
  14217. },
  14218. "seq": {
  14219. "type": "number"
  14220. },
  14221. "aggregateID": {
  14222. "type": "string",
  14223. "enum": ["sessionID"]
  14224. },
  14225. "data": {
  14226. "type": "object",
  14227. "properties": {
  14228. "sessionID": {
  14229. "type": "string",
  14230. "pattern": "^ses"
  14231. },
  14232. "info": {
  14233. "$ref": "#/components/schemas/Session"
  14234. }
  14235. },
  14236. "required": ["sessionID", "info"],
  14237. "additionalProperties": false
  14238. }
  14239. },
  14240. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14241. "additionalProperties": false
  14242. },
  14243. "SyncEventSessionUpdated": {
  14244. "type": "object",
  14245. "properties": {
  14246. "type": {
  14247. "type": "string",
  14248. "enum": ["sync"]
  14249. },
  14250. "name": {
  14251. "type": "string",
  14252. "enum": ["session.updated.1"]
  14253. },
  14254. "id": {
  14255. "type": "string"
  14256. },
  14257. "seq": {
  14258. "type": "number"
  14259. },
  14260. "aggregateID": {
  14261. "type": "string",
  14262. "enum": ["sessionID"]
  14263. },
  14264. "data": {
  14265. "type": "object",
  14266. "properties": {
  14267. "sessionID": {
  14268. "type": "string",
  14269. "pattern": "^ses"
  14270. },
  14271. "info": {
  14272. "type": "object",
  14273. "properties": {
  14274. "id": {
  14275. "anyOf": [
  14276. {
  14277. "type": "string",
  14278. "pattern": "^ses"
  14279. },
  14280. {
  14281. "type": "null"
  14282. }
  14283. ]
  14284. },
  14285. "slug": {
  14286. "anyOf": [
  14287. {
  14288. "type": "string"
  14289. },
  14290. {
  14291. "type": "null"
  14292. }
  14293. ]
  14294. },
  14295. "projectID": {
  14296. "anyOf": [
  14297. {
  14298. "type": "string"
  14299. },
  14300. {
  14301. "type": "null"
  14302. }
  14303. ]
  14304. },
  14305. "workspaceID": {
  14306. "anyOf": [
  14307. {
  14308. "type": "string",
  14309. "pattern": "^wrk"
  14310. },
  14311. {
  14312. "type": "null"
  14313. }
  14314. ]
  14315. },
  14316. "directory": {
  14317. "anyOf": [
  14318. {
  14319. "type": "string"
  14320. },
  14321. {
  14322. "type": "null"
  14323. }
  14324. ]
  14325. },
  14326. "path": {
  14327. "anyOf": [
  14328. {
  14329. "type": "string"
  14330. },
  14331. {
  14332. "type": "null"
  14333. }
  14334. ]
  14335. },
  14336. "parentID": {
  14337. "anyOf": [
  14338. {
  14339. "type": "string",
  14340. "pattern": "^ses"
  14341. },
  14342. {
  14343. "type": "null"
  14344. }
  14345. ]
  14346. },
  14347. "summary": {
  14348. "anyOf": [
  14349. {
  14350. "type": "object",
  14351. "properties": {
  14352. "additions": {
  14353. "type": "number"
  14354. },
  14355. "deletions": {
  14356. "type": "number"
  14357. },
  14358. "files": {
  14359. "type": "number"
  14360. },
  14361. "diffs": {
  14362. "type": "array",
  14363. "items": {
  14364. "$ref": "#/components/schemas/SnapshotFileDiff"
  14365. }
  14366. }
  14367. },
  14368. "required": ["additions", "deletions", "files"],
  14369. "additionalProperties": false
  14370. },
  14371. {
  14372. "type": "null"
  14373. }
  14374. ]
  14375. },
  14376. "share": {
  14377. "type": "object",
  14378. "properties": {
  14379. "url": {
  14380. "anyOf": [
  14381. {
  14382. "type": "string"
  14383. },
  14384. {
  14385. "type": "null"
  14386. }
  14387. ]
  14388. }
  14389. },
  14390. "additionalProperties": false
  14391. },
  14392. "title": {
  14393. "anyOf": [
  14394. {
  14395. "type": "string"
  14396. },
  14397. {
  14398. "type": "null"
  14399. }
  14400. ]
  14401. },
  14402. "agent": {
  14403. "anyOf": [
  14404. {
  14405. "type": "string"
  14406. },
  14407. {
  14408. "type": "null"
  14409. }
  14410. ]
  14411. },
  14412. "model": {
  14413. "anyOf": [
  14414. {
  14415. "type": "object",
  14416. "properties": {
  14417. "id": {
  14418. "type": "string"
  14419. },
  14420. "providerID": {
  14421. "type": "string"
  14422. },
  14423. "variant": {
  14424. "type": "string"
  14425. }
  14426. },
  14427. "required": ["id", "providerID"],
  14428. "additionalProperties": false
  14429. },
  14430. {
  14431. "type": "null"
  14432. }
  14433. ]
  14434. },
  14435. "version": {
  14436. "anyOf": [
  14437. {
  14438. "type": "string"
  14439. },
  14440. {
  14441. "type": "null"
  14442. }
  14443. ]
  14444. },
  14445. "time": {
  14446. "type": "object",
  14447. "properties": {
  14448. "created": {
  14449. "anyOf": [
  14450. {
  14451. "type": "integer",
  14452. "minimum": 0
  14453. },
  14454. {
  14455. "type": "null"
  14456. }
  14457. ]
  14458. },
  14459. "updated": {
  14460. "anyOf": [
  14461. {
  14462. "type": "integer",
  14463. "minimum": 0
  14464. },
  14465. {
  14466. "type": "null"
  14467. }
  14468. ]
  14469. },
  14470. "compacting": {
  14471. "anyOf": [
  14472. {
  14473. "type": "integer",
  14474. "minimum": 0
  14475. },
  14476. {
  14477. "type": "null"
  14478. }
  14479. ]
  14480. },
  14481. "archived": {
  14482. "anyOf": [
  14483. {
  14484. "type": "number"
  14485. },
  14486. {
  14487. "type": "null"
  14488. }
  14489. ]
  14490. }
  14491. },
  14492. "additionalProperties": false
  14493. },
  14494. "permission": {
  14495. "anyOf": [
  14496. {
  14497. "$ref": "#/components/schemas/PermissionRuleset"
  14498. },
  14499. {
  14500. "type": "null"
  14501. }
  14502. ]
  14503. },
  14504. "revert": {
  14505. "anyOf": [
  14506. {
  14507. "type": "object",
  14508. "properties": {
  14509. "messageID": {
  14510. "type": "string",
  14511. "pattern": "^msg"
  14512. },
  14513. "partID": {
  14514. "type": "string",
  14515. "pattern": "^prt"
  14516. },
  14517. "snapshot": {
  14518. "type": "string"
  14519. },
  14520. "diff": {
  14521. "type": "string"
  14522. }
  14523. },
  14524. "required": ["messageID"],
  14525. "additionalProperties": false
  14526. },
  14527. {
  14528. "type": "null"
  14529. }
  14530. ]
  14531. }
  14532. },
  14533. "additionalProperties": false
  14534. }
  14535. },
  14536. "required": ["sessionID", "info"],
  14537. "additionalProperties": false
  14538. }
  14539. },
  14540. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14541. "additionalProperties": false
  14542. },
  14543. "SyncEventSessionDeleted": {
  14544. "type": "object",
  14545. "properties": {
  14546. "type": {
  14547. "type": "string",
  14548. "enum": ["sync"]
  14549. },
  14550. "name": {
  14551. "type": "string",
  14552. "enum": ["session.deleted.1"]
  14553. },
  14554. "id": {
  14555. "type": "string"
  14556. },
  14557. "seq": {
  14558. "type": "number"
  14559. },
  14560. "aggregateID": {
  14561. "type": "string",
  14562. "enum": ["sessionID"]
  14563. },
  14564. "data": {
  14565. "type": "object",
  14566. "properties": {
  14567. "sessionID": {
  14568. "type": "string",
  14569. "pattern": "^ses"
  14570. },
  14571. "info": {
  14572. "$ref": "#/components/schemas/Session"
  14573. }
  14574. },
  14575. "required": ["sessionID", "info"],
  14576. "additionalProperties": false
  14577. }
  14578. },
  14579. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14580. "additionalProperties": false
  14581. },
  14582. "SyncEventSessionNextAgentSwitched": {
  14583. "type": "object",
  14584. "properties": {
  14585. "type": {
  14586. "type": "string",
  14587. "enum": ["sync"]
  14588. },
  14589. "name": {
  14590. "type": "string",
  14591. "enum": ["session.next.agent.switched.1"]
  14592. },
  14593. "id": {
  14594. "type": "string"
  14595. },
  14596. "seq": {
  14597. "type": "number"
  14598. },
  14599. "aggregateID": {
  14600. "type": "string",
  14601. "enum": ["sessionID"]
  14602. },
  14603. "data": {
  14604. "type": "object",
  14605. "properties": {
  14606. "timestamp": {
  14607. "type": "number"
  14608. },
  14609. "sessionID": {
  14610. "type": "string",
  14611. "pattern": "^ses"
  14612. },
  14613. "agent": {
  14614. "type": "string"
  14615. }
  14616. },
  14617. "required": ["timestamp", "sessionID", "agent"],
  14618. "additionalProperties": false
  14619. }
  14620. },
  14621. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14622. "additionalProperties": false
  14623. },
  14624. "SyncEventSessionNextModelSwitched": {
  14625. "type": "object",
  14626. "properties": {
  14627. "type": {
  14628. "type": "string",
  14629. "enum": ["sync"]
  14630. },
  14631. "name": {
  14632. "type": "string",
  14633. "enum": ["session.next.model.switched.1"]
  14634. },
  14635. "id": {
  14636. "type": "string"
  14637. },
  14638. "seq": {
  14639. "type": "number"
  14640. },
  14641. "aggregateID": {
  14642. "type": "string",
  14643. "enum": ["sessionID"]
  14644. },
  14645. "data": {
  14646. "type": "object",
  14647. "properties": {
  14648. "timestamp": {
  14649. "type": "number"
  14650. },
  14651. "sessionID": {
  14652. "type": "string",
  14653. "pattern": "^ses"
  14654. },
  14655. "model": {
  14656. "type": "object",
  14657. "properties": {
  14658. "id": {
  14659. "type": "string"
  14660. },
  14661. "providerID": {
  14662. "type": "string"
  14663. },
  14664. "variant": {
  14665. "type": "string"
  14666. }
  14667. },
  14668. "required": ["id", "providerID", "variant"],
  14669. "additionalProperties": false
  14670. }
  14671. },
  14672. "required": ["timestamp", "sessionID", "model"],
  14673. "additionalProperties": false
  14674. }
  14675. },
  14676. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14677. "additionalProperties": false
  14678. },
  14679. "SyncEventSessionNextPrompted": {
  14680. "type": "object",
  14681. "properties": {
  14682. "type": {
  14683. "type": "string",
  14684. "enum": ["sync"]
  14685. },
  14686. "name": {
  14687. "type": "string",
  14688. "enum": ["session.next.prompted.1"]
  14689. },
  14690. "id": {
  14691. "type": "string"
  14692. },
  14693. "seq": {
  14694. "type": "number"
  14695. },
  14696. "aggregateID": {
  14697. "type": "string",
  14698. "enum": ["sessionID"]
  14699. },
  14700. "data": {
  14701. "type": "object",
  14702. "properties": {
  14703. "timestamp": {
  14704. "type": "number"
  14705. },
  14706. "sessionID": {
  14707. "type": "string",
  14708. "pattern": "^ses"
  14709. },
  14710. "prompt": {
  14711. "$ref": "#/components/schemas/Prompt"
  14712. }
  14713. },
  14714. "required": ["timestamp", "sessionID", "prompt"],
  14715. "additionalProperties": false
  14716. }
  14717. },
  14718. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14719. "additionalProperties": false
  14720. },
  14721. "SyncEventSessionNextSynthetic": {
  14722. "type": "object",
  14723. "properties": {
  14724. "type": {
  14725. "type": "string",
  14726. "enum": ["sync"]
  14727. },
  14728. "name": {
  14729. "type": "string",
  14730. "enum": ["session.next.synthetic.1"]
  14731. },
  14732. "id": {
  14733. "type": "string"
  14734. },
  14735. "seq": {
  14736. "type": "number"
  14737. },
  14738. "aggregateID": {
  14739. "type": "string",
  14740. "enum": ["sessionID"]
  14741. },
  14742. "data": {
  14743. "type": "object",
  14744. "properties": {
  14745. "timestamp": {
  14746. "type": "number"
  14747. },
  14748. "sessionID": {
  14749. "type": "string",
  14750. "pattern": "^ses"
  14751. },
  14752. "text": {
  14753. "type": "string"
  14754. }
  14755. },
  14756. "required": ["timestamp", "sessionID", "text"],
  14757. "additionalProperties": false
  14758. }
  14759. },
  14760. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14761. "additionalProperties": false
  14762. },
  14763. "SyncEventSessionNextShellStarted": {
  14764. "type": "object",
  14765. "properties": {
  14766. "type": {
  14767. "type": "string",
  14768. "enum": ["sync"]
  14769. },
  14770. "name": {
  14771. "type": "string",
  14772. "enum": ["session.next.shell.started.1"]
  14773. },
  14774. "id": {
  14775. "type": "string"
  14776. },
  14777. "seq": {
  14778. "type": "number"
  14779. },
  14780. "aggregateID": {
  14781. "type": "string",
  14782. "enum": ["sessionID"]
  14783. },
  14784. "data": {
  14785. "type": "object",
  14786. "properties": {
  14787. "timestamp": {
  14788. "type": "number"
  14789. },
  14790. "sessionID": {
  14791. "type": "string",
  14792. "pattern": "^ses"
  14793. },
  14794. "callID": {
  14795. "type": "string"
  14796. },
  14797. "command": {
  14798. "type": "string"
  14799. }
  14800. },
  14801. "required": ["timestamp", "sessionID", "callID", "command"],
  14802. "additionalProperties": false
  14803. }
  14804. },
  14805. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14806. "additionalProperties": false
  14807. },
  14808. "SyncEventSessionNextShellEnded": {
  14809. "type": "object",
  14810. "properties": {
  14811. "type": {
  14812. "type": "string",
  14813. "enum": ["sync"]
  14814. },
  14815. "name": {
  14816. "type": "string",
  14817. "enum": ["session.next.shell.ended.1"]
  14818. },
  14819. "id": {
  14820. "type": "string"
  14821. },
  14822. "seq": {
  14823. "type": "number"
  14824. },
  14825. "aggregateID": {
  14826. "type": "string",
  14827. "enum": ["sessionID"]
  14828. },
  14829. "data": {
  14830. "type": "object",
  14831. "properties": {
  14832. "timestamp": {
  14833. "type": "number"
  14834. },
  14835. "sessionID": {
  14836. "type": "string",
  14837. "pattern": "^ses"
  14838. },
  14839. "callID": {
  14840. "type": "string"
  14841. },
  14842. "output": {
  14843. "type": "string"
  14844. }
  14845. },
  14846. "required": ["timestamp", "sessionID", "callID", "output"],
  14847. "additionalProperties": false
  14848. }
  14849. },
  14850. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14851. "additionalProperties": false
  14852. },
  14853. "SyncEventSessionNextStepStarted": {
  14854. "type": "object",
  14855. "properties": {
  14856. "type": {
  14857. "type": "string",
  14858. "enum": ["sync"]
  14859. },
  14860. "name": {
  14861. "type": "string",
  14862. "enum": ["session.next.step.started.1"]
  14863. },
  14864. "id": {
  14865. "type": "string"
  14866. },
  14867. "seq": {
  14868. "type": "number"
  14869. },
  14870. "aggregateID": {
  14871. "type": "string",
  14872. "enum": ["sessionID"]
  14873. },
  14874. "data": {
  14875. "type": "object",
  14876. "properties": {
  14877. "timestamp": {
  14878. "type": "number"
  14879. },
  14880. "sessionID": {
  14881. "type": "string",
  14882. "pattern": "^ses"
  14883. },
  14884. "agent": {
  14885. "type": "string"
  14886. },
  14887. "model": {
  14888. "type": "object",
  14889. "properties": {
  14890. "id": {
  14891. "type": "string"
  14892. },
  14893. "providerID": {
  14894. "type": "string"
  14895. },
  14896. "variant": {
  14897. "type": "string"
  14898. }
  14899. },
  14900. "required": ["id", "providerID", "variant"],
  14901. "additionalProperties": false
  14902. },
  14903. "snapshot": {
  14904. "type": "string"
  14905. }
  14906. },
  14907. "required": ["timestamp", "sessionID", "agent", "model"],
  14908. "additionalProperties": false
  14909. }
  14910. },
  14911. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14912. "additionalProperties": false
  14913. },
  14914. "SyncEventSessionNextStepEnded": {
  14915. "type": "object",
  14916. "properties": {
  14917. "type": {
  14918. "type": "string",
  14919. "enum": ["sync"]
  14920. },
  14921. "name": {
  14922. "type": "string",
  14923. "enum": ["session.next.step.ended.1"]
  14924. },
  14925. "id": {
  14926. "type": "string"
  14927. },
  14928. "seq": {
  14929. "type": "number"
  14930. },
  14931. "aggregateID": {
  14932. "type": "string",
  14933. "enum": ["sessionID"]
  14934. },
  14935. "data": {
  14936. "type": "object",
  14937. "properties": {
  14938. "timestamp": {
  14939. "type": "number"
  14940. },
  14941. "sessionID": {
  14942. "type": "string",
  14943. "pattern": "^ses"
  14944. },
  14945. "finish": {
  14946. "type": "string"
  14947. },
  14948. "cost": {
  14949. "type": "number"
  14950. },
  14951. "tokens": {
  14952. "type": "object",
  14953. "properties": {
  14954. "input": {
  14955. "type": "number"
  14956. },
  14957. "output": {
  14958. "type": "number"
  14959. },
  14960. "reasoning": {
  14961. "type": "number"
  14962. },
  14963. "cache": {
  14964. "type": "object",
  14965. "properties": {
  14966. "read": {
  14967. "type": "number"
  14968. },
  14969. "write": {
  14970. "type": "number"
  14971. }
  14972. },
  14973. "required": ["read", "write"],
  14974. "additionalProperties": false
  14975. }
  14976. },
  14977. "required": ["input", "output", "reasoning", "cache"],
  14978. "additionalProperties": false
  14979. },
  14980. "snapshot": {
  14981. "type": "string"
  14982. }
  14983. },
  14984. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  14985. "additionalProperties": false
  14986. }
  14987. },
  14988. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14989. "additionalProperties": false
  14990. },
  14991. "SyncEventSessionNextStepFailed": {
  14992. "type": "object",
  14993. "properties": {
  14994. "type": {
  14995. "type": "string",
  14996. "enum": ["sync"]
  14997. },
  14998. "name": {
  14999. "type": "string",
  15000. "enum": ["session.next.step.failed.1"]
  15001. },
  15002. "id": {
  15003. "type": "string"
  15004. },
  15005. "seq": {
  15006. "type": "number"
  15007. },
  15008. "aggregateID": {
  15009. "type": "string",
  15010. "enum": ["sessionID"]
  15011. },
  15012. "data": {
  15013. "type": "object",
  15014. "properties": {
  15015. "timestamp": {
  15016. "type": "number"
  15017. },
  15018. "sessionID": {
  15019. "type": "string",
  15020. "pattern": "^ses"
  15021. },
  15022. "error": {
  15023. "$ref": "#/components/schemas/SessionErrorUnknown"
  15024. }
  15025. },
  15026. "required": ["timestamp", "sessionID", "error"],
  15027. "additionalProperties": false
  15028. }
  15029. },
  15030. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15031. "additionalProperties": false
  15032. },
  15033. "SyncEventSessionNextTextStarted": {
  15034. "type": "object",
  15035. "properties": {
  15036. "type": {
  15037. "type": "string",
  15038. "enum": ["sync"]
  15039. },
  15040. "name": {
  15041. "type": "string",
  15042. "enum": ["session.next.text.started.1"]
  15043. },
  15044. "id": {
  15045. "type": "string"
  15046. },
  15047. "seq": {
  15048. "type": "number"
  15049. },
  15050. "aggregateID": {
  15051. "type": "string",
  15052. "enum": ["sessionID"]
  15053. },
  15054. "data": {
  15055. "type": "object",
  15056. "properties": {
  15057. "timestamp": {
  15058. "type": "number"
  15059. },
  15060. "sessionID": {
  15061. "type": "string",
  15062. "pattern": "^ses"
  15063. }
  15064. },
  15065. "required": ["timestamp", "sessionID"],
  15066. "additionalProperties": false
  15067. }
  15068. },
  15069. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15070. "additionalProperties": false
  15071. },
  15072. "SyncEventSessionNextTextDelta": {
  15073. "type": "object",
  15074. "properties": {
  15075. "type": {
  15076. "type": "string",
  15077. "enum": ["sync"]
  15078. },
  15079. "name": {
  15080. "type": "string",
  15081. "enum": ["session.next.text.delta.1"]
  15082. },
  15083. "id": {
  15084. "type": "string"
  15085. },
  15086. "seq": {
  15087. "type": "number"
  15088. },
  15089. "aggregateID": {
  15090. "type": "string",
  15091. "enum": ["sessionID"]
  15092. },
  15093. "data": {
  15094. "type": "object",
  15095. "properties": {
  15096. "timestamp": {
  15097. "type": "number"
  15098. },
  15099. "sessionID": {
  15100. "type": "string",
  15101. "pattern": "^ses"
  15102. },
  15103. "delta": {
  15104. "type": "string"
  15105. }
  15106. },
  15107. "required": ["timestamp", "sessionID", "delta"],
  15108. "additionalProperties": false
  15109. }
  15110. },
  15111. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15112. "additionalProperties": false
  15113. },
  15114. "SyncEventSessionNextTextEnded": {
  15115. "type": "object",
  15116. "properties": {
  15117. "type": {
  15118. "type": "string",
  15119. "enum": ["sync"]
  15120. },
  15121. "name": {
  15122. "type": "string",
  15123. "enum": ["session.next.text.ended.1"]
  15124. },
  15125. "id": {
  15126. "type": "string"
  15127. },
  15128. "seq": {
  15129. "type": "number"
  15130. },
  15131. "aggregateID": {
  15132. "type": "string",
  15133. "enum": ["sessionID"]
  15134. },
  15135. "data": {
  15136. "type": "object",
  15137. "properties": {
  15138. "timestamp": {
  15139. "type": "number"
  15140. },
  15141. "sessionID": {
  15142. "type": "string",
  15143. "pattern": "^ses"
  15144. },
  15145. "text": {
  15146. "type": "string"
  15147. }
  15148. },
  15149. "required": ["timestamp", "sessionID", "text"],
  15150. "additionalProperties": false
  15151. }
  15152. },
  15153. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15154. "additionalProperties": false
  15155. },
  15156. "SyncEventSessionNextReasoningStarted": {
  15157. "type": "object",
  15158. "properties": {
  15159. "type": {
  15160. "type": "string",
  15161. "enum": ["sync"]
  15162. },
  15163. "name": {
  15164. "type": "string",
  15165. "enum": ["session.next.reasoning.started.1"]
  15166. },
  15167. "id": {
  15168. "type": "string"
  15169. },
  15170. "seq": {
  15171. "type": "number"
  15172. },
  15173. "aggregateID": {
  15174. "type": "string",
  15175. "enum": ["sessionID"]
  15176. },
  15177. "data": {
  15178. "type": "object",
  15179. "properties": {
  15180. "timestamp": {
  15181. "type": "number"
  15182. },
  15183. "sessionID": {
  15184. "type": "string",
  15185. "pattern": "^ses"
  15186. },
  15187. "reasoningID": {
  15188. "type": "string"
  15189. }
  15190. },
  15191. "required": ["timestamp", "sessionID", "reasoningID"],
  15192. "additionalProperties": false
  15193. }
  15194. },
  15195. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15196. "additionalProperties": false
  15197. },
  15198. "SyncEventSessionNextReasoningDelta": {
  15199. "type": "object",
  15200. "properties": {
  15201. "type": {
  15202. "type": "string",
  15203. "enum": ["sync"]
  15204. },
  15205. "name": {
  15206. "type": "string",
  15207. "enum": ["session.next.reasoning.delta.1"]
  15208. },
  15209. "id": {
  15210. "type": "string"
  15211. },
  15212. "seq": {
  15213. "type": "number"
  15214. },
  15215. "aggregateID": {
  15216. "type": "string",
  15217. "enum": ["sessionID"]
  15218. },
  15219. "data": {
  15220. "type": "object",
  15221. "properties": {
  15222. "timestamp": {
  15223. "type": "number"
  15224. },
  15225. "sessionID": {
  15226. "type": "string",
  15227. "pattern": "^ses"
  15228. },
  15229. "reasoningID": {
  15230. "type": "string"
  15231. },
  15232. "delta": {
  15233. "type": "string"
  15234. }
  15235. },
  15236. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15237. "additionalProperties": false
  15238. }
  15239. },
  15240. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15241. "additionalProperties": false
  15242. },
  15243. "SyncEventSessionNextReasoningEnded": {
  15244. "type": "object",
  15245. "properties": {
  15246. "type": {
  15247. "type": "string",
  15248. "enum": ["sync"]
  15249. },
  15250. "name": {
  15251. "type": "string",
  15252. "enum": ["session.next.reasoning.ended.1"]
  15253. },
  15254. "id": {
  15255. "type": "string"
  15256. },
  15257. "seq": {
  15258. "type": "number"
  15259. },
  15260. "aggregateID": {
  15261. "type": "string",
  15262. "enum": ["sessionID"]
  15263. },
  15264. "data": {
  15265. "type": "object",
  15266. "properties": {
  15267. "timestamp": {
  15268. "type": "number"
  15269. },
  15270. "sessionID": {
  15271. "type": "string",
  15272. "pattern": "^ses"
  15273. },
  15274. "reasoningID": {
  15275. "type": "string"
  15276. },
  15277. "text": {
  15278. "type": "string"
  15279. }
  15280. },
  15281. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15282. "additionalProperties": false
  15283. }
  15284. },
  15285. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15286. "additionalProperties": false
  15287. },
  15288. "SyncEventSessionNextToolInputStarted": {
  15289. "type": "object",
  15290. "properties": {
  15291. "type": {
  15292. "type": "string",
  15293. "enum": ["sync"]
  15294. },
  15295. "name": {
  15296. "type": "string",
  15297. "enum": ["session.next.tool.input.started.1"]
  15298. },
  15299. "id": {
  15300. "type": "string"
  15301. },
  15302. "seq": {
  15303. "type": "number"
  15304. },
  15305. "aggregateID": {
  15306. "type": "string",
  15307. "enum": ["sessionID"]
  15308. },
  15309. "data": {
  15310. "type": "object",
  15311. "properties": {
  15312. "timestamp": {
  15313. "type": "number"
  15314. },
  15315. "sessionID": {
  15316. "type": "string",
  15317. "pattern": "^ses"
  15318. },
  15319. "callID": {
  15320. "type": "string"
  15321. },
  15322. "name": {
  15323. "type": "string"
  15324. }
  15325. },
  15326. "required": ["timestamp", "sessionID", "callID", "name"],
  15327. "additionalProperties": false
  15328. }
  15329. },
  15330. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15331. "additionalProperties": false
  15332. },
  15333. "SyncEventSessionNextToolInputDelta": {
  15334. "type": "object",
  15335. "properties": {
  15336. "type": {
  15337. "type": "string",
  15338. "enum": ["sync"]
  15339. },
  15340. "name": {
  15341. "type": "string",
  15342. "enum": ["session.next.tool.input.delta.1"]
  15343. },
  15344. "id": {
  15345. "type": "string"
  15346. },
  15347. "seq": {
  15348. "type": "number"
  15349. },
  15350. "aggregateID": {
  15351. "type": "string",
  15352. "enum": ["sessionID"]
  15353. },
  15354. "data": {
  15355. "type": "object",
  15356. "properties": {
  15357. "timestamp": {
  15358. "type": "number"
  15359. },
  15360. "sessionID": {
  15361. "type": "string",
  15362. "pattern": "^ses"
  15363. },
  15364. "callID": {
  15365. "type": "string"
  15366. },
  15367. "delta": {
  15368. "type": "string"
  15369. }
  15370. },
  15371. "required": ["timestamp", "sessionID", "callID", "delta"],
  15372. "additionalProperties": false
  15373. }
  15374. },
  15375. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15376. "additionalProperties": false
  15377. },
  15378. "SyncEventSessionNextToolInputEnded": {
  15379. "type": "object",
  15380. "properties": {
  15381. "type": {
  15382. "type": "string",
  15383. "enum": ["sync"]
  15384. },
  15385. "name": {
  15386. "type": "string",
  15387. "enum": ["session.next.tool.input.ended.1"]
  15388. },
  15389. "id": {
  15390. "type": "string"
  15391. },
  15392. "seq": {
  15393. "type": "number"
  15394. },
  15395. "aggregateID": {
  15396. "type": "string",
  15397. "enum": ["sessionID"]
  15398. },
  15399. "data": {
  15400. "type": "object",
  15401. "properties": {
  15402. "timestamp": {
  15403. "type": "number"
  15404. },
  15405. "sessionID": {
  15406. "type": "string",
  15407. "pattern": "^ses"
  15408. },
  15409. "callID": {
  15410. "type": "string"
  15411. },
  15412. "text": {
  15413. "type": "string"
  15414. }
  15415. },
  15416. "required": ["timestamp", "sessionID", "callID", "text"],
  15417. "additionalProperties": false
  15418. }
  15419. },
  15420. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15421. "additionalProperties": false
  15422. },
  15423. "SyncEventSessionNextToolCalled": {
  15424. "type": "object",
  15425. "properties": {
  15426. "type": {
  15427. "type": "string",
  15428. "enum": ["sync"]
  15429. },
  15430. "name": {
  15431. "type": "string",
  15432. "enum": ["session.next.tool.called.1"]
  15433. },
  15434. "id": {
  15435. "type": "string"
  15436. },
  15437. "seq": {
  15438. "type": "number"
  15439. },
  15440. "aggregateID": {
  15441. "type": "string",
  15442. "enum": ["sessionID"]
  15443. },
  15444. "data": {
  15445. "type": "object",
  15446. "properties": {
  15447. "timestamp": {
  15448. "type": "number"
  15449. },
  15450. "sessionID": {
  15451. "type": "string",
  15452. "pattern": "^ses"
  15453. },
  15454. "callID": {
  15455. "type": "string"
  15456. },
  15457. "tool": {
  15458. "type": "string"
  15459. },
  15460. "input": {
  15461. "type": "object"
  15462. },
  15463. "provider": {
  15464. "type": "object",
  15465. "properties": {
  15466. "executed": {
  15467. "type": "boolean"
  15468. },
  15469. "metadata": {
  15470. "type": "object"
  15471. }
  15472. },
  15473. "required": ["executed"],
  15474. "additionalProperties": false
  15475. }
  15476. },
  15477. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15478. "additionalProperties": false
  15479. }
  15480. },
  15481. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15482. "additionalProperties": false
  15483. },
  15484. "SyncEventSessionNextToolProgress": {
  15485. "type": "object",
  15486. "properties": {
  15487. "type": {
  15488. "type": "string",
  15489. "enum": ["sync"]
  15490. },
  15491. "name": {
  15492. "type": "string",
  15493. "enum": ["session.next.tool.progress.1"]
  15494. },
  15495. "id": {
  15496. "type": "string"
  15497. },
  15498. "seq": {
  15499. "type": "number"
  15500. },
  15501. "aggregateID": {
  15502. "type": "string",
  15503. "enum": ["sessionID"]
  15504. },
  15505. "data": {
  15506. "type": "object",
  15507. "properties": {
  15508. "timestamp": {
  15509. "type": "number"
  15510. },
  15511. "sessionID": {
  15512. "type": "string",
  15513. "pattern": "^ses"
  15514. },
  15515. "callID": {
  15516. "type": "string"
  15517. },
  15518. "structured": {
  15519. "type": "object"
  15520. },
  15521. "content": {
  15522. "type": "array",
  15523. "items": {
  15524. "anyOf": [
  15525. {
  15526. "$ref": "#/components/schemas/ToolTextContent"
  15527. },
  15528. {
  15529. "$ref": "#/components/schemas/ToolFileContent"
  15530. }
  15531. ]
  15532. }
  15533. }
  15534. },
  15535. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15536. "additionalProperties": false
  15537. }
  15538. },
  15539. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15540. "additionalProperties": false
  15541. },
  15542. "SyncEventSessionNextToolSuccess": {
  15543. "type": "object",
  15544. "properties": {
  15545. "type": {
  15546. "type": "string",
  15547. "enum": ["sync"]
  15548. },
  15549. "name": {
  15550. "type": "string",
  15551. "enum": ["session.next.tool.success.1"]
  15552. },
  15553. "id": {
  15554. "type": "string"
  15555. },
  15556. "seq": {
  15557. "type": "number"
  15558. },
  15559. "aggregateID": {
  15560. "type": "string",
  15561. "enum": ["sessionID"]
  15562. },
  15563. "data": {
  15564. "type": "object",
  15565. "properties": {
  15566. "timestamp": {
  15567. "type": "number"
  15568. },
  15569. "sessionID": {
  15570. "type": "string",
  15571. "pattern": "^ses"
  15572. },
  15573. "callID": {
  15574. "type": "string"
  15575. },
  15576. "structured": {
  15577. "type": "object"
  15578. },
  15579. "content": {
  15580. "type": "array",
  15581. "items": {
  15582. "anyOf": [
  15583. {
  15584. "$ref": "#/components/schemas/ToolTextContent"
  15585. },
  15586. {
  15587. "$ref": "#/components/schemas/ToolFileContent"
  15588. }
  15589. ]
  15590. }
  15591. },
  15592. "provider": {
  15593. "type": "object",
  15594. "properties": {
  15595. "executed": {
  15596. "type": "boolean"
  15597. },
  15598. "metadata": {
  15599. "type": "object"
  15600. }
  15601. },
  15602. "required": ["executed"],
  15603. "additionalProperties": false
  15604. }
  15605. },
  15606. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15607. "additionalProperties": false
  15608. }
  15609. },
  15610. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15611. "additionalProperties": false
  15612. },
  15613. "SyncEventSessionNextToolFailed": {
  15614. "type": "object",
  15615. "properties": {
  15616. "type": {
  15617. "type": "string",
  15618. "enum": ["sync"]
  15619. },
  15620. "name": {
  15621. "type": "string",
  15622. "enum": ["session.next.tool.failed.1"]
  15623. },
  15624. "id": {
  15625. "type": "string"
  15626. },
  15627. "seq": {
  15628. "type": "number"
  15629. },
  15630. "aggregateID": {
  15631. "type": "string",
  15632. "enum": ["sessionID"]
  15633. },
  15634. "data": {
  15635. "type": "object",
  15636. "properties": {
  15637. "timestamp": {
  15638. "type": "number"
  15639. },
  15640. "sessionID": {
  15641. "type": "string",
  15642. "pattern": "^ses"
  15643. },
  15644. "callID": {
  15645. "type": "string"
  15646. },
  15647. "error": {
  15648. "$ref": "#/components/schemas/SessionErrorUnknown"
  15649. },
  15650. "provider": {
  15651. "type": "object",
  15652. "properties": {
  15653. "executed": {
  15654. "type": "boolean"
  15655. },
  15656. "metadata": {
  15657. "type": "object"
  15658. }
  15659. },
  15660. "required": ["executed"],
  15661. "additionalProperties": false
  15662. }
  15663. },
  15664. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15665. "additionalProperties": false
  15666. }
  15667. },
  15668. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15669. "additionalProperties": false
  15670. },
  15671. "SyncEventSessionNextRetried": {
  15672. "type": "object",
  15673. "properties": {
  15674. "type": {
  15675. "type": "string",
  15676. "enum": ["sync"]
  15677. },
  15678. "name": {
  15679. "type": "string",
  15680. "enum": ["session.next.retried.1"]
  15681. },
  15682. "id": {
  15683. "type": "string"
  15684. },
  15685. "seq": {
  15686. "type": "number"
  15687. },
  15688. "aggregateID": {
  15689. "type": "string",
  15690. "enum": ["sessionID"]
  15691. },
  15692. "data": {
  15693. "type": "object",
  15694. "properties": {
  15695. "timestamp": {
  15696. "type": "number"
  15697. },
  15698. "sessionID": {
  15699. "type": "string",
  15700. "pattern": "^ses"
  15701. },
  15702. "attempt": {
  15703. "type": "number"
  15704. },
  15705. "error": {
  15706. "$ref": "#/components/schemas/SessionNextRetry_error"
  15707. }
  15708. },
  15709. "required": ["timestamp", "sessionID", "attempt", "error"],
  15710. "additionalProperties": false
  15711. }
  15712. },
  15713. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15714. "additionalProperties": false
  15715. },
  15716. "SyncEventSessionNextCompactionStarted": {
  15717. "type": "object",
  15718. "properties": {
  15719. "type": {
  15720. "type": "string",
  15721. "enum": ["sync"]
  15722. },
  15723. "name": {
  15724. "type": "string",
  15725. "enum": ["session.next.compaction.started.1"]
  15726. },
  15727. "id": {
  15728. "type": "string"
  15729. },
  15730. "seq": {
  15731. "type": "number"
  15732. },
  15733. "aggregateID": {
  15734. "type": "string",
  15735. "enum": ["sessionID"]
  15736. },
  15737. "data": {
  15738. "type": "object",
  15739. "properties": {
  15740. "timestamp": {
  15741. "type": "number"
  15742. },
  15743. "sessionID": {
  15744. "type": "string",
  15745. "pattern": "^ses"
  15746. },
  15747. "reason": {
  15748. "type": "string",
  15749. "enum": ["auto", "manual"]
  15750. }
  15751. },
  15752. "required": ["timestamp", "sessionID", "reason"],
  15753. "additionalProperties": false
  15754. }
  15755. },
  15756. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15757. "additionalProperties": false
  15758. },
  15759. "SyncEventSessionNextCompactionDelta": {
  15760. "type": "object",
  15761. "properties": {
  15762. "type": {
  15763. "type": "string",
  15764. "enum": ["sync"]
  15765. },
  15766. "name": {
  15767. "type": "string",
  15768. "enum": ["session.next.compaction.delta.1"]
  15769. },
  15770. "id": {
  15771. "type": "string"
  15772. },
  15773. "seq": {
  15774. "type": "number"
  15775. },
  15776. "aggregateID": {
  15777. "type": "string",
  15778. "enum": ["sessionID"]
  15779. },
  15780. "data": {
  15781. "type": "object",
  15782. "properties": {
  15783. "timestamp": {
  15784. "type": "number"
  15785. },
  15786. "sessionID": {
  15787. "type": "string",
  15788. "pattern": "^ses"
  15789. },
  15790. "text": {
  15791. "type": "string"
  15792. }
  15793. },
  15794. "required": ["timestamp", "sessionID", "text"],
  15795. "additionalProperties": false
  15796. }
  15797. },
  15798. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15799. "additionalProperties": false
  15800. },
  15801. "SyncEventSessionNextCompactionEnded": {
  15802. "type": "object",
  15803. "properties": {
  15804. "type": {
  15805. "type": "string",
  15806. "enum": ["sync"]
  15807. },
  15808. "name": {
  15809. "type": "string",
  15810. "enum": ["session.next.compaction.ended.1"]
  15811. },
  15812. "id": {
  15813. "type": "string"
  15814. },
  15815. "seq": {
  15816. "type": "number"
  15817. },
  15818. "aggregateID": {
  15819. "type": "string",
  15820. "enum": ["sessionID"]
  15821. },
  15822. "data": {
  15823. "type": "object",
  15824. "properties": {
  15825. "timestamp": {
  15826. "type": "number"
  15827. },
  15828. "sessionID": {
  15829. "type": "string",
  15830. "pattern": "^ses"
  15831. },
  15832. "text": {
  15833. "type": "string"
  15834. },
  15835. "include": {
  15836. "type": "string"
  15837. }
  15838. },
  15839. "required": ["timestamp", "sessionID", "text"],
  15840. "additionalProperties": false
  15841. }
  15842. },
  15843. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15844. "additionalProperties": false
  15845. },
  15846. "EventServerInstanceDisposed": {
  15847. "type": "object",
  15848. "properties": {
  15849. "id": {
  15850. "type": "string"
  15851. },
  15852. "type": {
  15853. "type": "string",
  15854. "enum": ["server.instance.disposed"]
  15855. },
  15856. "properties": {
  15857. "type": "object",
  15858. "properties": {
  15859. "directory": {
  15860. "type": "string"
  15861. }
  15862. },
  15863. "required": ["directory"],
  15864. "additionalProperties": false
  15865. }
  15866. },
  15867. "required": ["id", "type", "properties"],
  15868. "additionalProperties": false
  15869. },
  15870. "EventFileEdited": {
  15871. "type": "object",
  15872. "properties": {
  15873. "id": {
  15874. "type": "string"
  15875. },
  15876. "type": {
  15877. "type": "string",
  15878. "enum": ["file.edited"]
  15879. },
  15880. "properties": {
  15881. "type": "object",
  15882. "properties": {
  15883. "file": {
  15884. "type": "string"
  15885. }
  15886. },
  15887. "required": ["file"],
  15888. "additionalProperties": false
  15889. }
  15890. },
  15891. "required": ["id", "type", "properties"],
  15892. "additionalProperties": false
  15893. },
  15894. "EventFileWatcherUpdated": {
  15895. "type": "object",
  15896. "properties": {
  15897. "id": {
  15898. "type": "string"
  15899. },
  15900. "type": {
  15901. "type": "string",
  15902. "enum": ["file.watcher.updated"]
  15903. },
  15904. "properties": {
  15905. "type": "object",
  15906. "properties": {
  15907. "file": {
  15908. "type": "string"
  15909. },
  15910. "event": {
  15911. "type": "string",
  15912. "enum": ["add", "change", "unlink"]
  15913. }
  15914. },
  15915. "required": ["file", "event"],
  15916. "additionalProperties": false
  15917. }
  15918. },
  15919. "required": ["id", "type", "properties"],
  15920. "additionalProperties": false
  15921. },
  15922. "EventLspClientDiagnostics": {
  15923. "type": "object",
  15924. "properties": {
  15925. "id": {
  15926. "type": "string"
  15927. },
  15928. "type": {
  15929. "type": "string",
  15930. "enum": ["lsp.client.diagnostics"]
  15931. },
  15932. "properties": {
  15933. "type": "object",
  15934. "properties": {
  15935. "serverID": {
  15936. "type": "string"
  15937. },
  15938. "path": {
  15939. "type": "string"
  15940. }
  15941. },
  15942. "required": ["serverID", "path"],
  15943. "additionalProperties": false
  15944. }
  15945. },
  15946. "required": ["id", "type", "properties"],
  15947. "additionalProperties": false
  15948. },
  15949. "EventLspUpdated": {
  15950. "type": "object",
  15951. "properties": {
  15952. "id": {
  15953. "type": "string"
  15954. },
  15955. "type": {
  15956. "type": "string",
  15957. "enum": ["lsp.updated"]
  15958. },
  15959. "properties": {
  15960. "type": "object",
  15961. "properties": {}
  15962. }
  15963. },
  15964. "required": ["id", "type", "properties"],
  15965. "additionalProperties": false
  15966. },
  15967. "EventMessagePartDelta": {
  15968. "type": "object",
  15969. "properties": {
  15970. "id": {
  15971. "type": "string"
  15972. },
  15973. "type": {
  15974. "type": "string",
  15975. "enum": ["message.part.delta"]
  15976. },
  15977. "properties": {
  15978. "type": "object",
  15979. "properties": {
  15980. "sessionID": {
  15981. "type": "string",
  15982. "pattern": "^ses"
  15983. },
  15984. "messageID": {
  15985. "type": "string",
  15986. "pattern": "^msg"
  15987. },
  15988. "partID": {
  15989. "type": "string",
  15990. "pattern": "^prt"
  15991. },
  15992. "field": {
  15993. "type": "string"
  15994. },
  15995. "delta": {
  15996. "type": "string"
  15997. }
  15998. },
  15999. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16000. "additionalProperties": false
  16001. }
  16002. },
  16003. "required": ["id", "type", "properties"],
  16004. "additionalProperties": false
  16005. },
  16006. "EventPermissionAsked": {
  16007. "type": "object",
  16008. "properties": {
  16009. "id": {
  16010. "type": "string"
  16011. },
  16012. "type": {
  16013. "type": "string",
  16014. "enum": ["permission.asked"]
  16015. },
  16016. "properties": {
  16017. "$ref": "#/components/schemas/PermissionRequest"
  16018. }
  16019. },
  16020. "required": ["id", "type", "properties"],
  16021. "additionalProperties": false
  16022. },
  16023. "EventPermissionReplied": {
  16024. "type": "object",
  16025. "properties": {
  16026. "id": {
  16027. "type": "string"
  16028. },
  16029. "type": {
  16030. "type": "string",
  16031. "enum": ["permission.replied"]
  16032. },
  16033. "properties": {
  16034. "type": "object",
  16035. "properties": {
  16036. "sessionID": {
  16037. "type": "string",
  16038. "pattern": "^ses"
  16039. },
  16040. "requestID": {
  16041. "type": "string",
  16042. "pattern": "^per"
  16043. },
  16044. "reply": {
  16045. "type": "string",
  16046. "enum": ["once", "always", "reject"]
  16047. }
  16048. },
  16049. "required": ["sessionID", "requestID", "reply"],
  16050. "additionalProperties": false
  16051. }
  16052. },
  16053. "required": ["id", "type", "properties"],
  16054. "additionalProperties": false
  16055. },
  16056. "EventSessionDiff": {
  16057. "type": "object",
  16058. "properties": {
  16059. "id": {
  16060. "type": "string"
  16061. },
  16062. "type": {
  16063. "type": "string",
  16064. "enum": ["session.diff"]
  16065. },
  16066. "properties": {
  16067. "type": "object",
  16068. "properties": {
  16069. "sessionID": {
  16070. "type": "string",
  16071. "pattern": "^ses"
  16072. },
  16073. "diff": {
  16074. "type": "array",
  16075. "items": {
  16076. "$ref": "#/components/schemas/SnapshotFileDiff"
  16077. }
  16078. }
  16079. },
  16080. "required": ["sessionID", "diff"],
  16081. "additionalProperties": false
  16082. }
  16083. },
  16084. "required": ["id", "type", "properties"],
  16085. "additionalProperties": false
  16086. },
  16087. "EventSessionError": {
  16088. "type": "object",
  16089. "properties": {
  16090. "id": {
  16091. "type": "string"
  16092. },
  16093. "type": {
  16094. "type": "string",
  16095. "enum": ["session.error"]
  16096. },
  16097. "properties": {
  16098. "type": "object",
  16099. "properties": {
  16100. "sessionID": {
  16101. "type": "string",
  16102. "pattern": "^ses"
  16103. },
  16104. "error": {
  16105. "anyOf": [
  16106. {
  16107. "$ref": "#/components/schemas/ProviderAuthError"
  16108. },
  16109. {
  16110. "$ref": "#/components/schemas/UnknownError"
  16111. },
  16112. {
  16113. "$ref": "#/components/schemas/MessageOutputLengthError"
  16114. },
  16115. {
  16116. "$ref": "#/components/schemas/MessageAbortedError"
  16117. },
  16118. {
  16119. "$ref": "#/components/schemas/StructuredOutputError"
  16120. },
  16121. {
  16122. "$ref": "#/components/schemas/ContextOverflowError"
  16123. },
  16124. {
  16125. "$ref": "#/components/schemas/APIError"
  16126. }
  16127. ]
  16128. }
  16129. },
  16130. "additionalProperties": false
  16131. }
  16132. },
  16133. "required": ["id", "type", "properties"],
  16134. "additionalProperties": false
  16135. },
  16136. "EventInstallationUpdated": {
  16137. "type": "object",
  16138. "properties": {
  16139. "id": {
  16140. "type": "string"
  16141. },
  16142. "type": {
  16143. "type": "string",
  16144. "enum": ["installation.updated"]
  16145. },
  16146. "properties": {
  16147. "type": "object",
  16148. "properties": {
  16149. "version": {
  16150. "type": "string"
  16151. }
  16152. },
  16153. "required": ["version"],
  16154. "additionalProperties": false
  16155. }
  16156. },
  16157. "required": ["id", "type", "properties"],
  16158. "additionalProperties": false
  16159. },
  16160. "EventInstallationUpdate-available": {
  16161. "type": "object",
  16162. "properties": {
  16163. "id": {
  16164. "type": "string"
  16165. },
  16166. "type": {
  16167. "type": "string",
  16168. "enum": ["installation.update-available"]
  16169. },
  16170. "properties": {
  16171. "type": "object",
  16172. "properties": {
  16173. "version": {
  16174. "type": "string"
  16175. }
  16176. },
  16177. "required": ["version"],
  16178. "additionalProperties": false
  16179. }
  16180. },
  16181. "required": ["id", "type", "properties"],
  16182. "additionalProperties": false
  16183. },
  16184. "EventQuestionAsked": {
  16185. "type": "object",
  16186. "properties": {
  16187. "id": {
  16188. "type": "string"
  16189. },
  16190. "type": {
  16191. "type": "string",
  16192. "enum": ["question.asked"]
  16193. },
  16194. "properties": {
  16195. "$ref": "#/components/schemas/QuestionRequest"
  16196. }
  16197. },
  16198. "required": ["id", "type", "properties"],
  16199. "additionalProperties": false
  16200. },
  16201. "EventQuestionReplied": {
  16202. "type": "object",
  16203. "properties": {
  16204. "id": {
  16205. "type": "string"
  16206. },
  16207. "type": {
  16208. "type": "string",
  16209. "enum": ["question.replied"]
  16210. },
  16211. "properties": {
  16212. "$ref": "#/components/schemas/QuestionReplied"
  16213. }
  16214. },
  16215. "required": ["id", "type", "properties"],
  16216. "additionalProperties": false
  16217. },
  16218. "EventQuestionRejected": {
  16219. "type": "object",
  16220. "properties": {
  16221. "id": {
  16222. "type": "string"
  16223. },
  16224. "type": {
  16225. "type": "string",
  16226. "enum": ["question.rejected"]
  16227. },
  16228. "properties": {
  16229. "$ref": "#/components/schemas/QuestionRejected"
  16230. }
  16231. },
  16232. "required": ["id", "type", "properties"],
  16233. "additionalProperties": false
  16234. },
  16235. "EventTodoUpdated": {
  16236. "type": "object",
  16237. "properties": {
  16238. "id": {
  16239. "type": "string"
  16240. },
  16241. "type": {
  16242. "type": "string",
  16243. "enum": ["todo.updated"]
  16244. },
  16245. "properties": {
  16246. "type": "object",
  16247. "properties": {
  16248. "sessionID": {
  16249. "type": "string",
  16250. "pattern": "^ses"
  16251. },
  16252. "todos": {
  16253. "type": "array",
  16254. "items": {
  16255. "$ref": "#/components/schemas/Todo"
  16256. }
  16257. }
  16258. },
  16259. "required": ["sessionID", "todos"],
  16260. "additionalProperties": false
  16261. }
  16262. },
  16263. "required": ["id", "type", "properties"],
  16264. "additionalProperties": false
  16265. },
  16266. "EventSessionStatus": {
  16267. "type": "object",
  16268. "properties": {
  16269. "id": {
  16270. "type": "string"
  16271. },
  16272. "type": {
  16273. "type": "string",
  16274. "enum": ["session.status"]
  16275. },
  16276. "properties": {
  16277. "type": "object",
  16278. "properties": {
  16279. "sessionID": {
  16280. "type": "string",
  16281. "pattern": "^ses"
  16282. },
  16283. "status": {
  16284. "$ref": "#/components/schemas/SessionStatus"
  16285. }
  16286. },
  16287. "required": ["sessionID", "status"],
  16288. "additionalProperties": false
  16289. }
  16290. },
  16291. "required": ["id", "type", "properties"],
  16292. "additionalProperties": false
  16293. },
  16294. "EventSessionIdle": {
  16295. "type": "object",
  16296. "properties": {
  16297. "id": {
  16298. "type": "string"
  16299. },
  16300. "type": {
  16301. "type": "string",
  16302. "enum": ["session.idle"]
  16303. },
  16304. "properties": {
  16305. "type": "object",
  16306. "properties": {
  16307. "sessionID": {
  16308. "type": "string",
  16309. "pattern": "^ses"
  16310. }
  16311. },
  16312. "required": ["sessionID"],
  16313. "additionalProperties": false
  16314. }
  16315. },
  16316. "required": ["id", "type", "properties"],
  16317. "additionalProperties": false
  16318. },
  16319. "EventSessionCompacted": {
  16320. "type": "object",
  16321. "properties": {
  16322. "id": {
  16323. "type": "string"
  16324. },
  16325. "type": {
  16326. "type": "string",
  16327. "enum": ["session.compacted"]
  16328. },
  16329. "properties": {
  16330. "type": "object",
  16331. "properties": {
  16332. "sessionID": {
  16333. "type": "string",
  16334. "pattern": "^ses"
  16335. }
  16336. },
  16337. "required": ["sessionID"],
  16338. "additionalProperties": false
  16339. }
  16340. },
  16341. "required": ["id", "type", "properties"],
  16342. "additionalProperties": false
  16343. },
  16344. "EventMcpToolsChanged": {
  16345. "type": "object",
  16346. "properties": {
  16347. "id": {
  16348. "type": "string"
  16349. },
  16350. "type": {
  16351. "type": "string",
  16352. "enum": ["mcp.tools.changed"]
  16353. },
  16354. "properties": {
  16355. "type": "object",
  16356. "properties": {
  16357. "server": {
  16358. "type": "string"
  16359. }
  16360. },
  16361. "required": ["server"],
  16362. "additionalProperties": false
  16363. }
  16364. },
  16365. "required": ["id", "type", "properties"],
  16366. "additionalProperties": false
  16367. },
  16368. "EventMcpBrowserOpenFailed": {
  16369. "type": "object",
  16370. "properties": {
  16371. "id": {
  16372. "type": "string"
  16373. },
  16374. "type": {
  16375. "type": "string",
  16376. "enum": ["mcp.browser.open.failed"]
  16377. },
  16378. "properties": {
  16379. "type": "object",
  16380. "properties": {
  16381. "mcpName": {
  16382. "type": "string"
  16383. },
  16384. "url": {
  16385. "type": "string"
  16386. }
  16387. },
  16388. "required": ["mcpName", "url"],
  16389. "additionalProperties": false
  16390. }
  16391. },
  16392. "required": ["id", "type", "properties"],
  16393. "additionalProperties": false
  16394. },
  16395. "EventCommandExecuted": {
  16396. "type": "object",
  16397. "properties": {
  16398. "id": {
  16399. "type": "string"
  16400. },
  16401. "type": {
  16402. "type": "string",
  16403. "enum": ["command.executed"]
  16404. },
  16405. "properties": {
  16406. "type": "object",
  16407. "properties": {
  16408. "name": {
  16409. "type": "string"
  16410. },
  16411. "sessionID": {
  16412. "type": "string",
  16413. "pattern": "^ses"
  16414. },
  16415. "arguments": {
  16416. "type": "string"
  16417. },
  16418. "messageID": {
  16419. "type": "string",
  16420. "pattern": "^msg"
  16421. }
  16422. },
  16423. "required": ["name", "sessionID", "arguments", "messageID"],
  16424. "additionalProperties": false
  16425. }
  16426. },
  16427. "required": ["id", "type", "properties"],
  16428. "additionalProperties": false
  16429. },
  16430. "EventProjectUpdated": {
  16431. "type": "object",
  16432. "properties": {
  16433. "id": {
  16434. "type": "string"
  16435. },
  16436. "type": {
  16437. "type": "string",
  16438. "enum": ["project.updated"]
  16439. },
  16440. "properties": {
  16441. "$ref": "#/components/schemas/Project"
  16442. }
  16443. },
  16444. "required": ["id", "type", "properties"],
  16445. "additionalProperties": false
  16446. },
  16447. "EventVcsBranchUpdated": {
  16448. "type": "object",
  16449. "properties": {
  16450. "id": {
  16451. "type": "string"
  16452. },
  16453. "type": {
  16454. "type": "string",
  16455. "enum": ["vcs.branch.updated"]
  16456. },
  16457. "properties": {
  16458. "type": "object",
  16459. "properties": {
  16460. "branch": {
  16461. "type": "string"
  16462. }
  16463. },
  16464. "additionalProperties": false
  16465. }
  16466. },
  16467. "required": ["id", "type", "properties"],
  16468. "additionalProperties": false
  16469. },
  16470. "EventWorkspaceReady": {
  16471. "type": "object",
  16472. "properties": {
  16473. "id": {
  16474. "type": "string"
  16475. },
  16476. "type": {
  16477. "type": "string",
  16478. "enum": ["workspace.ready"]
  16479. },
  16480. "properties": {
  16481. "type": "object",
  16482. "properties": {
  16483. "name": {
  16484. "type": "string"
  16485. }
  16486. },
  16487. "required": ["name"],
  16488. "additionalProperties": false
  16489. }
  16490. },
  16491. "required": ["id", "type", "properties"],
  16492. "additionalProperties": false
  16493. },
  16494. "EventWorkspaceFailed": {
  16495. "type": "object",
  16496. "properties": {
  16497. "id": {
  16498. "type": "string"
  16499. },
  16500. "type": {
  16501. "type": "string",
  16502. "enum": ["workspace.failed"]
  16503. },
  16504. "properties": {
  16505. "type": "object",
  16506. "properties": {
  16507. "message": {
  16508. "type": "string"
  16509. }
  16510. },
  16511. "required": ["message"],
  16512. "additionalProperties": false
  16513. }
  16514. },
  16515. "required": ["id", "type", "properties"],
  16516. "additionalProperties": false
  16517. },
  16518. "EventWorkspaceStatus": {
  16519. "type": "object",
  16520. "properties": {
  16521. "id": {
  16522. "type": "string"
  16523. },
  16524. "type": {
  16525. "type": "string",
  16526. "enum": ["workspace.status"]
  16527. },
  16528. "properties": {
  16529. "type": "object",
  16530. "properties": {
  16531. "workspaceID": {
  16532. "type": "string",
  16533. "pattern": "^wrk"
  16534. },
  16535. "status": {
  16536. "type": "string",
  16537. "enum": ["connected", "connecting", "disconnected", "error"]
  16538. }
  16539. },
  16540. "required": ["workspaceID", "status"],
  16541. "additionalProperties": false
  16542. }
  16543. },
  16544. "required": ["id", "type", "properties"],
  16545. "additionalProperties": false
  16546. },
  16547. "EventWorktreeReady": {
  16548. "type": "object",
  16549. "properties": {
  16550. "id": {
  16551. "type": "string"
  16552. },
  16553. "type": {
  16554. "type": "string",
  16555. "enum": ["worktree.ready"]
  16556. },
  16557. "properties": {
  16558. "type": "object",
  16559. "properties": {
  16560. "name": {
  16561. "type": "string"
  16562. },
  16563. "branch": {
  16564. "type": "string"
  16565. }
  16566. },
  16567. "required": ["name", "branch"],
  16568. "additionalProperties": false
  16569. }
  16570. },
  16571. "required": ["id", "type", "properties"],
  16572. "additionalProperties": false
  16573. },
  16574. "EventWorktreeFailed": {
  16575. "type": "object",
  16576. "properties": {
  16577. "id": {
  16578. "type": "string"
  16579. },
  16580. "type": {
  16581. "type": "string",
  16582. "enum": ["worktree.failed"]
  16583. },
  16584. "properties": {
  16585. "type": "object",
  16586. "properties": {
  16587. "message": {
  16588. "type": "string"
  16589. }
  16590. },
  16591. "required": ["message"],
  16592. "additionalProperties": false
  16593. }
  16594. },
  16595. "required": ["id", "type", "properties"],
  16596. "additionalProperties": false
  16597. },
  16598. "EventPtyCreated": {
  16599. "type": "object",
  16600. "properties": {
  16601. "id": {
  16602. "type": "string"
  16603. },
  16604. "type": {
  16605. "type": "string",
  16606. "enum": ["pty.created"]
  16607. },
  16608. "properties": {
  16609. "type": "object",
  16610. "properties": {
  16611. "info": {
  16612. "$ref": "#/components/schemas/Pty"
  16613. }
  16614. },
  16615. "required": ["info"],
  16616. "additionalProperties": false
  16617. }
  16618. },
  16619. "required": ["id", "type", "properties"],
  16620. "additionalProperties": false
  16621. },
  16622. "EventPtyUpdated": {
  16623. "type": "object",
  16624. "properties": {
  16625. "id": {
  16626. "type": "string"
  16627. },
  16628. "type": {
  16629. "type": "string",
  16630. "enum": ["pty.updated"]
  16631. },
  16632. "properties": {
  16633. "type": "object",
  16634. "properties": {
  16635. "info": {
  16636. "$ref": "#/components/schemas/Pty"
  16637. }
  16638. },
  16639. "required": ["info"],
  16640. "additionalProperties": false
  16641. }
  16642. },
  16643. "required": ["id", "type", "properties"],
  16644. "additionalProperties": false
  16645. },
  16646. "EventPtyExited": {
  16647. "type": "object",
  16648. "properties": {
  16649. "id": {
  16650. "type": "string"
  16651. },
  16652. "type": {
  16653. "type": "string",
  16654. "enum": ["pty.exited"]
  16655. },
  16656. "properties": {
  16657. "type": "object",
  16658. "properties": {
  16659. "id": {
  16660. "type": "string",
  16661. "pattern": "^pty"
  16662. },
  16663. "exitCode": {
  16664. "type": "integer",
  16665. "minimum": 0
  16666. }
  16667. },
  16668. "required": ["id", "exitCode"],
  16669. "additionalProperties": false
  16670. }
  16671. },
  16672. "required": ["id", "type", "properties"],
  16673. "additionalProperties": false
  16674. },
  16675. "EventPtyDeleted": {
  16676. "type": "object",
  16677. "properties": {
  16678. "id": {
  16679. "type": "string"
  16680. },
  16681. "type": {
  16682. "type": "string",
  16683. "enum": ["pty.deleted"]
  16684. },
  16685. "properties": {
  16686. "type": "object",
  16687. "properties": {
  16688. "id": {
  16689. "type": "string",
  16690. "pattern": "^pty"
  16691. }
  16692. },
  16693. "required": ["id"],
  16694. "additionalProperties": false
  16695. }
  16696. },
  16697. "required": ["id", "type", "properties"],
  16698. "additionalProperties": false
  16699. },
  16700. "EventMessageUpdated": {
  16701. "type": "object",
  16702. "properties": {
  16703. "id": {
  16704. "type": "string"
  16705. },
  16706. "type": {
  16707. "type": "string",
  16708. "enum": ["message.updated"]
  16709. },
  16710. "properties": {
  16711. "type": "object",
  16712. "properties": {
  16713. "sessionID": {
  16714. "type": "string",
  16715. "pattern": "^ses"
  16716. },
  16717. "info": {
  16718. "$ref": "#/components/schemas/Message"
  16719. }
  16720. },
  16721. "required": ["sessionID", "info"],
  16722. "additionalProperties": false
  16723. }
  16724. },
  16725. "required": ["id", "type", "properties"],
  16726. "additionalProperties": false
  16727. },
  16728. "EventMessageRemoved": {
  16729. "type": "object",
  16730. "properties": {
  16731. "id": {
  16732. "type": "string"
  16733. },
  16734. "type": {
  16735. "type": "string",
  16736. "enum": ["message.removed"]
  16737. },
  16738. "properties": {
  16739. "type": "object",
  16740. "properties": {
  16741. "sessionID": {
  16742. "type": "string",
  16743. "pattern": "^ses"
  16744. },
  16745. "messageID": {
  16746. "type": "string",
  16747. "pattern": "^msg"
  16748. }
  16749. },
  16750. "required": ["sessionID", "messageID"],
  16751. "additionalProperties": false
  16752. }
  16753. },
  16754. "required": ["id", "type", "properties"],
  16755. "additionalProperties": false
  16756. },
  16757. "EventMessagePartUpdated": {
  16758. "type": "object",
  16759. "properties": {
  16760. "id": {
  16761. "type": "string"
  16762. },
  16763. "type": {
  16764. "type": "string",
  16765. "enum": ["message.part.updated"]
  16766. },
  16767. "properties": {
  16768. "type": "object",
  16769. "properties": {
  16770. "sessionID": {
  16771. "type": "string",
  16772. "pattern": "^ses"
  16773. },
  16774. "part": {
  16775. "$ref": "#/components/schemas/Part"
  16776. },
  16777. "time": {
  16778. "type": "integer",
  16779. "minimum": 0
  16780. }
  16781. },
  16782. "required": ["sessionID", "part", "time"],
  16783. "additionalProperties": false
  16784. }
  16785. },
  16786. "required": ["id", "type", "properties"],
  16787. "additionalProperties": false
  16788. },
  16789. "EventMessagePartRemoved": {
  16790. "type": "object",
  16791. "properties": {
  16792. "id": {
  16793. "type": "string"
  16794. },
  16795. "type": {
  16796. "type": "string",
  16797. "enum": ["message.part.removed"]
  16798. },
  16799. "properties": {
  16800. "type": "object",
  16801. "properties": {
  16802. "sessionID": {
  16803. "type": "string",
  16804. "pattern": "^ses"
  16805. },
  16806. "messageID": {
  16807. "type": "string",
  16808. "pattern": "^msg"
  16809. },
  16810. "partID": {
  16811. "type": "string",
  16812. "pattern": "^prt"
  16813. }
  16814. },
  16815. "required": ["sessionID", "messageID", "partID"],
  16816. "additionalProperties": false
  16817. }
  16818. },
  16819. "required": ["id", "type", "properties"],
  16820. "additionalProperties": false
  16821. },
  16822. "EventSessionCreated": {
  16823. "type": "object",
  16824. "properties": {
  16825. "id": {
  16826. "type": "string"
  16827. },
  16828. "type": {
  16829. "type": "string",
  16830. "enum": ["session.created"]
  16831. },
  16832. "properties": {
  16833. "type": "object",
  16834. "properties": {
  16835. "sessionID": {
  16836. "type": "string",
  16837. "pattern": "^ses"
  16838. },
  16839. "info": {
  16840. "$ref": "#/components/schemas/Session"
  16841. }
  16842. },
  16843. "required": ["sessionID", "info"],
  16844. "additionalProperties": false
  16845. }
  16846. },
  16847. "required": ["id", "type", "properties"],
  16848. "additionalProperties": false
  16849. },
  16850. "EventSessionUpdated": {
  16851. "type": "object",
  16852. "properties": {
  16853. "id": {
  16854. "type": "string"
  16855. },
  16856. "type": {
  16857. "type": "string",
  16858. "enum": ["session.updated"]
  16859. },
  16860. "properties": {
  16861. "type": "object",
  16862. "properties": {
  16863. "sessionID": {
  16864. "type": "string",
  16865. "pattern": "^ses"
  16866. },
  16867. "info": {
  16868. "$ref": "#/components/schemas/Session"
  16869. }
  16870. },
  16871. "required": ["sessionID", "info"],
  16872. "additionalProperties": false
  16873. }
  16874. },
  16875. "required": ["id", "type", "properties"],
  16876. "additionalProperties": false
  16877. },
  16878. "EventSessionDeleted": {
  16879. "type": "object",
  16880. "properties": {
  16881. "id": {
  16882. "type": "string"
  16883. },
  16884. "type": {
  16885. "type": "string",
  16886. "enum": ["session.deleted"]
  16887. },
  16888. "properties": {
  16889. "type": "object",
  16890. "properties": {
  16891. "sessionID": {
  16892. "type": "string",
  16893. "pattern": "^ses"
  16894. },
  16895. "info": {
  16896. "$ref": "#/components/schemas/Session"
  16897. }
  16898. },
  16899. "required": ["sessionID", "info"],
  16900. "additionalProperties": false
  16901. }
  16902. },
  16903. "required": ["id", "type", "properties"],
  16904. "additionalProperties": false
  16905. },
  16906. "EventSessionNextAgentSwitched": {
  16907. "type": "object",
  16908. "properties": {
  16909. "id": {
  16910. "type": "string"
  16911. },
  16912. "type": {
  16913. "type": "string",
  16914. "enum": ["session.next.agent.switched"]
  16915. },
  16916. "properties": {
  16917. "type": "object",
  16918. "properties": {
  16919. "timestamp": {
  16920. "type": "number"
  16921. },
  16922. "sessionID": {
  16923. "type": "string",
  16924. "pattern": "^ses"
  16925. },
  16926. "agent": {
  16927. "type": "string"
  16928. }
  16929. },
  16930. "required": ["timestamp", "sessionID", "agent"],
  16931. "additionalProperties": false
  16932. }
  16933. },
  16934. "required": ["id", "type", "properties"],
  16935. "additionalProperties": false
  16936. },
  16937. "EventSessionNextModelSwitched": {
  16938. "type": "object",
  16939. "properties": {
  16940. "id": {
  16941. "type": "string"
  16942. },
  16943. "type": {
  16944. "type": "string",
  16945. "enum": ["session.next.model.switched"]
  16946. },
  16947. "properties": {
  16948. "type": "object",
  16949. "properties": {
  16950. "timestamp": {
  16951. "type": "number"
  16952. },
  16953. "sessionID": {
  16954. "type": "string",
  16955. "pattern": "^ses"
  16956. },
  16957. "model": {
  16958. "type": "object",
  16959. "properties": {
  16960. "id": {
  16961. "type": "string"
  16962. },
  16963. "providerID": {
  16964. "type": "string"
  16965. },
  16966. "variant": {
  16967. "type": "string"
  16968. }
  16969. },
  16970. "required": ["id", "providerID", "variant"],
  16971. "additionalProperties": false
  16972. }
  16973. },
  16974. "required": ["timestamp", "sessionID", "model"],
  16975. "additionalProperties": false
  16976. }
  16977. },
  16978. "required": ["id", "type", "properties"],
  16979. "additionalProperties": false
  16980. },
  16981. "PromptSource": {
  16982. "type": "object",
  16983. "properties": {
  16984. "start": {
  16985. "type": "number"
  16986. },
  16987. "end": {
  16988. "type": "number"
  16989. },
  16990. "text": {
  16991. "type": "string"
  16992. }
  16993. },
  16994. "required": ["start", "end", "text"],
  16995. "additionalProperties": false
  16996. },
  16997. "PromptFileAttachment": {
  16998. "type": "object",
  16999. "properties": {
  17000. "uri": {
  17001. "type": "string"
  17002. },
  17003. "mime": {
  17004. "type": "string"
  17005. },
  17006. "name": {
  17007. "type": "string"
  17008. },
  17009. "description": {
  17010. "type": "string"
  17011. },
  17012. "source": {
  17013. "$ref": "#/components/schemas/PromptSource"
  17014. }
  17015. },
  17016. "required": ["uri", "mime"],
  17017. "additionalProperties": false
  17018. },
  17019. "PromptAgentAttachment": {
  17020. "type": "object",
  17021. "properties": {
  17022. "name": {
  17023. "type": "string"
  17024. },
  17025. "source": {
  17026. "$ref": "#/components/schemas/PromptSource"
  17027. }
  17028. },
  17029. "required": ["name"],
  17030. "additionalProperties": false
  17031. },
  17032. "EventSessionNextPrompted": {
  17033. "type": "object",
  17034. "properties": {
  17035. "id": {
  17036. "type": "string"
  17037. },
  17038. "type": {
  17039. "type": "string",
  17040. "enum": ["session.next.prompted"]
  17041. },
  17042. "properties": {
  17043. "type": "object",
  17044. "properties": {
  17045. "timestamp": {
  17046. "type": "number"
  17047. },
  17048. "sessionID": {
  17049. "type": "string",
  17050. "pattern": "^ses"
  17051. },
  17052. "prompt": {
  17053. "$ref": "#/components/schemas/Prompt"
  17054. }
  17055. },
  17056. "required": ["timestamp", "sessionID", "prompt"],
  17057. "additionalProperties": false
  17058. }
  17059. },
  17060. "required": ["id", "type", "properties"],
  17061. "additionalProperties": false
  17062. },
  17063. "EventSessionNextSynthetic": {
  17064. "type": "object",
  17065. "properties": {
  17066. "id": {
  17067. "type": "string"
  17068. },
  17069. "type": {
  17070. "type": "string",
  17071. "enum": ["session.next.synthetic"]
  17072. },
  17073. "properties": {
  17074. "type": "object",
  17075. "properties": {
  17076. "timestamp": {
  17077. "type": "number"
  17078. },
  17079. "sessionID": {
  17080. "type": "string",
  17081. "pattern": "^ses"
  17082. },
  17083. "text": {
  17084. "type": "string"
  17085. }
  17086. },
  17087. "required": ["timestamp", "sessionID", "text"],
  17088. "additionalProperties": false
  17089. }
  17090. },
  17091. "required": ["id", "type", "properties"],
  17092. "additionalProperties": false
  17093. },
  17094. "EventSessionNextShellStarted": {
  17095. "type": "object",
  17096. "properties": {
  17097. "id": {
  17098. "type": "string"
  17099. },
  17100. "type": {
  17101. "type": "string",
  17102. "enum": ["session.next.shell.started"]
  17103. },
  17104. "properties": {
  17105. "type": "object",
  17106. "properties": {
  17107. "timestamp": {
  17108. "type": "number"
  17109. },
  17110. "sessionID": {
  17111. "type": "string",
  17112. "pattern": "^ses"
  17113. },
  17114. "callID": {
  17115. "type": "string"
  17116. },
  17117. "command": {
  17118. "type": "string"
  17119. }
  17120. },
  17121. "required": ["timestamp", "sessionID", "callID", "command"],
  17122. "additionalProperties": false
  17123. }
  17124. },
  17125. "required": ["id", "type", "properties"],
  17126. "additionalProperties": false
  17127. },
  17128. "EventSessionNextShellEnded": {
  17129. "type": "object",
  17130. "properties": {
  17131. "id": {
  17132. "type": "string"
  17133. },
  17134. "type": {
  17135. "type": "string",
  17136. "enum": ["session.next.shell.ended"]
  17137. },
  17138. "properties": {
  17139. "type": "object",
  17140. "properties": {
  17141. "timestamp": {
  17142. "type": "number"
  17143. },
  17144. "sessionID": {
  17145. "type": "string",
  17146. "pattern": "^ses"
  17147. },
  17148. "callID": {
  17149. "type": "string"
  17150. },
  17151. "output": {
  17152. "type": "string"
  17153. }
  17154. },
  17155. "required": ["timestamp", "sessionID", "callID", "output"],
  17156. "additionalProperties": false
  17157. }
  17158. },
  17159. "required": ["id", "type", "properties"],
  17160. "additionalProperties": false
  17161. },
  17162. "EventSessionNextStepStarted": {
  17163. "type": "object",
  17164. "properties": {
  17165. "id": {
  17166. "type": "string"
  17167. },
  17168. "type": {
  17169. "type": "string",
  17170. "enum": ["session.next.step.started"]
  17171. },
  17172. "properties": {
  17173. "type": "object",
  17174. "properties": {
  17175. "timestamp": {
  17176. "type": "number"
  17177. },
  17178. "sessionID": {
  17179. "type": "string",
  17180. "pattern": "^ses"
  17181. },
  17182. "agent": {
  17183. "type": "string"
  17184. },
  17185. "model": {
  17186. "type": "object",
  17187. "properties": {
  17188. "id": {
  17189. "type": "string"
  17190. },
  17191. "providerID": {
  17192. "type": "string"
  17193. },
  17194. "variant": {
  17195. "type": "string"
  17196. }
  17197. },
  17198. "required": ["id", "providerID", "variant"],
  17199. "additionalProperties": false
  17200. },
  17201. "snapshot": {
  17202. "type": "string"
  17203. }
  17204. },
  17205. "required": ["timestamp", "sessionID", "agent", "model"],
  17206. "additionalProperties": false
  17207. }
  17208. },
  17209. "required": ["id", "type", "properties"],
  17210. "additionalProperties": false
  17211. },
  17212. "EventSessionNextStepEnded": {
  17213. "type": "object",
  17214. "properties": {
  17215. "id": {
  17216. "type": "string"
  17217. },
  17218. "type": {
  17219. "type": "string",
  17220. "enum": ["session.next.step.ended"]
  17221. },
  17222. "properties": {
  17223. "type": "object",
  17224. "properties": {
  17225. "timestamp": {
  17226. "type": "number"
  17227. },
  17228. "sessionID": {
  17229. "type": "string",
  17230. "pattern": "^ses"
  17231. },
  17232. "finish": {
  17233. "type": "string"
  17234. },
  17235. "cost": {
  17236. "type": "number"
  17237. },
  17238. "tokens": {
  17239. "type": "object",
  17240. "properties": {
  17241. "input": {
  17242. "type": "number"
  17243. },
  17244. "output": {
  17245. "type": "number"
  17246. },
  17247. "reasoning": {
  17248. "type": "number"
  17249. },
  17250. "cache": {
  17251. "type": "object",
  17252. "properties": {
  17253. "read": {
  17254. "type": "number"
  17255. },
  17256. "write": {
  17257. "type": "number"
  17258. }
  17259. },
  17260. "required": ["read", "write"],
  17261. "additionalProperties": false
  17262. }
  17263. },
  17264. "required": ["input", "output", "reasoning", "cache"],
  17265. "additionalProperties": false
  17266. },
  17267. "snapshot": {
  17268. "type": "string"
  17269. }
  17270. },
  17271. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17272. "additionalProperties": false
  17273. }
  17274. },
  17275. "required": ["id", "type", "properties"],
  17276. "additionalProperties": false
  17277. },
  17278. "SessionErrorUnknown": {
  17279. "type": "object",
  17280. "properties": {
  17281. "type": {
  17282. "type": "string",
  17283. "enum": ["unknown"]
  17284. },
  17285. "message": {
  17286. "type": "string"
  17287. }
  17288. },
  17289. "required": ["type", "message"],
  17290. "additionalProperties": false
  17291. },
  17292. "EventSessionNextStepFailed": {
  17293. "type": "object",
  17294. "properties": {
  17295. "id": {
  17296. "type": "string"
  17297. },
  17298. "type": {
  17299. "type": "string",
  17300. "enum": ["session.next.step.failed"]
  17301. },
  17302. "properties": {
  17303. "type": "object",
  17304. "properties": {
  17305. "timestamp": {
  17306. "type": "number"
  17307. },
  17308. "sessionID": {
  17309. "type": "string",
  17310. "pattern": "^ses"
  17311. },
  17312. "error": {
  17313. "$ref": "#/components/schemas/SessionErrorUnknown"
  17314. }
  17315. },
  17316. "required": ["timestamp", "sessionID", "error"],
  17317. "additionalProperties": false
  17318. }
  17319. },
  17320. "required": ["id", "type", "properties"],
  17321. "additionalProperties": false
  17322. },
  17323. "EventSessionNextTextStarted": {
  17324. "type": "object",
  17325. "properties": {
  17326. "id": {
  17327. "type": "string"
  17328. },
  17329. "type": {
  17330. "type": "string",
  17331. "enum": ["session.next.text.started"]
  17332. },
  17333. "properties": {
  17334. "type": "object",
  17335. "properties": {
  17336. "timestamp": {
  17337. "type": "number"
  17338. },
  17339. "sessionID": {
  17340. "type": "string",
  17341. "pattern": "^ses"
  17342. }
  17343. },
  17344. "required": ["timestamp", "sessionID"],
  17345. "additionalProperties": false
  17346. }
  17347. },
  17348. "required": ["id", "type", "properties"],
  17349. "additionalProperties": false
  17350. },
  17351. "EventSessionNextTextDelta": {
  17352. "type": "object",
  17353. "properties": {
  17354. "id": {
  17355. "type": "string"
  17356. },
  17357. "type": {
  17358. "type": "string",
  17359. "enum": ["session.next.text.delta"]
  17360. },
  17361. "properties": {
  17362. "type": "object",
  17363. "properties": {
  17364. "timestamp": {
  17365. "type": "number"
  17366. },
  17367. "sessionID": {
  17368. "type": "string",
  17369. "pattern": "^ses"
  17370. },
  17371. "delta": {
  17372. "type": "string"
  17373. }
  17374. },
  17375. "required": ["timestamp", "sessionID", "delta"],
  17376. "additionalProperties": false
  17377. }
  17378. },
  17379. "required": ["id", "type", "properties"],
  17380. "additionalProperties": false
  17381. },
  17382. "EventSessionNextTextEnded": {
  17383. "type": "object",
  17384. "properties": {
  17385. "id": {
  17386. "type": "string"
  17387. },
  17388. "type": {
  17389. "type": "string",
  17390. "enum": ["session.next.text.ended"]
  17391. },
  17392. "properties": {
  17393. "type": "object",
  17394. "properties": {
  17395. "timestamp": {
  17396. "type": "number"
  17397. },
  17398. "sessionID": {
  17399. "type": "string",
  17400. "pattern": "^ses"
  17401. },
  17402. "text": {
  17403. "type": "string"
  17404. }
  17405. },
  17406. "required": ["timestamp", "sessionID", "text"],
  17407. "additionalProperties": false
  17408. }
  17409. },
  17410. "required": ["id", "type", "properties"],
  17411. "additionalProperties": false
  17412. },
  17413. "EventSessionNextReasoningStarted": {
  17414. "type": "object",
  17415. "properties": {
  17416. "id": {
  17417. "type": "string"
  17418. },
  17419. "type": {
  17420. "type": "string",
  17421. "enum": ["session.next.reasoning.started"]
  17422. },
  17423. "properties": {
  17424. "type": "object",
  17425. "properties": {
  17426. "timestamp": {
  17427. "type": "number"
  17428. },
  17429. "sessionID": {
  17430. "type": "string",
  17431. "pattern": "^ses"
  17432. },
  17433. "reasoningID": {
  17434. "type": "string"
  17435. }
  17436. },
  17437. "required": ["timestamp", "sessionID", "reasoningID"],
  17438. "additionalProperties": false
  17439. }
  17440. },
  17441. "required": ["id", "type", "properties"],
  17442. "additionalProperties": false
  17443. },
  17444. "EventSessionNextReasoningDelta": {
  17445. "type": "object",
  17446. "properties": {
  17447. "id": {
  17448. "type": "string"
  17449. },
  17450. "type": {
  17451. "type": "string",
  17452. "enum": ["session.next.reasoning.delta"]
  17453. },
  17454. "properties": {
  17455. "type": "object",
  17456. "properties": {
  17457. "timestamp": {
  17458. "type": "number"
  17459. },
  17460. "sessionID": {
  17461. "type": "string",
  17462. "pattern": "^ses"
  17463. },
  17464. "reasoningID": {
  17465. "type": "string"
  17466. },
  17467. "delta": {
  17468. "type": "string"
  17469. }
  17470. },
  17471. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17472. "additionalProperties": false
  17473. }
  17474. },
  17475. "required": ["id", "type", "properties"],
  17476. "additionalProperties": false
  17477. },
  17478. "EventSessionNextReasoningEnded": {
  17479. "type": "object",
  17480. "properties": {
  17481. "id": {
  17482. "type": "string"
  17483. },
  17484. "type": {
  17485. "type": "string",
  17486. "enum": ["session.next.reasoning.ended"]
  17487. },
  17488. "properties": {
  17489. "type": "object",
  17490. "properties": {
  17491. "timestamp": {
  17492. "type": "number"
  17493. },
  17494. "sessionID": {
  17495. "type": "string",
  17496. "pattern": "^ses"
  17497. },
  17498. "reasoningID": {
  17499. "type": "string"
  17500. },
  17501. "text": {
  17502. "type": "string"
  17503. }
  17504. },
  17505. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17506. "additionalProperties": false
  17507. }
  17508. },
  17509. "required": ["id", "type", "properties"],
  17510. "additionalProperties": false
  17511. },
  17512. "EventSessionNextToolInputStarted": {
  17513. "type": "object",
  17514. "properties": {
  17515. "id": {
  17516. "type": "string"
  17517. },
  17518. "type": {
  17519. "type": "string",
  17520. "enum": ["session.next.tool.input.started"]
  17521. },
  17522. "properties": {
  17523. "type": "object",
  17524. "properties": {
  17525. "timestamp": {
  17526. "type": "number"
  17527. },
  17528. "sessionID": {
  17529. "type": "string",
  17530. "pattern": "^ses"
  17531. },
  17532. "callID": {
  17533. "type": "string"
  17534. },
  17535. "name": {
  17536. "type": "string"
  17537. }
  17538. },
  17539. "required": ["timestamp", "sessionID", "callID", "name"],
  17540. "additionalProperties": false
  17541. }
  17542. },
  17543. "required": ["id", "type", "properties"],
  17544. "additionalProperties": false
  17545. },
  17546. "EventSessionNextToolInputDelta": {
  17547. "type": "object",
  17548. "properties": {
  17549. "id": {
  17550. "type": "string"
  17551. },
  17552. "type": {
  17553. "type": "string",
  17554. "enum": ["session.next.tool.input.delta"]
  17555. },
  17556. "properties": {
  17557. "type": "object",
  17558. "properties": {
  17559. "timestamp": {
  17560. "type": "number"
  17561. },
  17562. "sessionID": {
  17563. "type": "string",
  17564. "pattern": "^ses"
  17565. },
  17566. "callID": {
  17567. "type": "string"
  17568. },
  17569. "delta": {
  17570. "type": "string"
  17571. }
  17572. },
  17573. "required": ["timestamp", "sessionID", "callID", "delta"],
  17574. "additionalProperties": false
  17575. }
  17576. },
  17577. "required": ["id", "type", "properties"],
  17578. "additionalProperties": false
  17579. },
  17580. "EventSessionNextToolInputEnded": {
  17581. "type": "object",
  17582. "properties": {
  17583. "id": {
  17584. "type": "string"
  17585. },
  17586. "type": {
  17587. "type": "string",
  17588. "enum": ["session.next.tool.input.ended"]
  17589. },
  17590. "properties": {
  17591. "type": "object",
  17592. "properties": {
  17593. "timestamp": {
  17594. "type": "number"
  17595. },
  17596. "sessionID": {
  17597. "type": "string",
  17598. "pattern": "^ses"
  17599. },
  17600. "callID": {
  17601. "type": "string"
  17602. },
  17603. "text": {
  17604. "type": "string"
  17605. }
  17606. },
  17607. "required": ["timestamp", "sessionID", "callID", "text"],
  17608. "additionalProperties": false
  17609. }
  17610. },
  17611. "required": ["id", "type", "properties"],
  17612. "additionalProperties": false
  17613. },
  17614. "EventSessionNextToolCalled": {
  17615. "type": "object",
  17616. "properties": {
  17617. "id": {
  17618. "type": "string"
  17619. },
  17620. "type": {
  17621. "type": "string",
  17622. "enum": ["session.next.tool.called"]
  17623. },
  17624. "properties": {
  17625. "type": "object",
  17626. "properties": {
  17627. "timestamp": {
  17628. "type": "number"
  17629. },
  17630. "sessionID": {
  17631. "type": "string",
  17632. "pattern": "^ses"
  17633. },
  17634. "callID": {
  17635. "type": "string"
  17636. },
  17637. "tool": {
  17638. "type": "string"
  17639. },
  17640. "input": {
  17641. "type": "object"
  17642. },
  17643. "provider": {
  17644. "type": "object",
  17645. "properties": {
  17646. "executed": {
  17647. "type": "boolean"
  17648. },
  17649. "metadata": {
  17650. "type": "object"
  17651. }
  17652. },
  17653. "required": ["executed"],
  17654. "additionalProperties": false
  17655. }
  17656. },
  17657. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17658. "additionalProperties": false
  17659. }
  17660. },
  17661. "required": ["id", "type", "properties"],
  17662. "additionalProperties": false
  17663. },
  17664. "ToolTextContent": {
  17665. "type": "object",
  17666. "properties": {
  17667. "type": {
  17668. "type": "string",
  17669. "enum": ["text"]
  17670. },
  17671. "text": {
  17672. "type": "string"
  17673. }
  17674. },
  17675. "required": ["type", "text"],
  17676. "additionalProperties": false
  17677. },
  17678. "ToolFileContent": {
  17679. "type": "object",
  17680. "properties": {
  17681. "type": {
  17682. "type": "string",
  17683. "enum": ["file"]
  17684. },
  17685. "uri": {
  17686. "type": "string"
  17687. },
  17688. "mime": {
  17689. "type": "string"
  17690. },
  17691. "name": {
  17692. "type": "string"
  17693. }
  17694. },
  17695. "required": ["type", "uri", "mime"],
  17696. "additionalProperties": false
  17697. },
  17698. "EventSessionNextToolProgress": {
  17699. "type": "object",
  17700. "properties": {
  17701. "id": {
  17702. "type": "string"
  17703. },
  17704. "type": {
  17705. "type": "string",
  17706. "enum": ["session.next.tool.progress"]
  17707. },
  17708. "properties": {
  17709. "type": "object",
  17710. "properties": {
  17711. "timestamp": {
  17712. "type": "number"
  17713. },
  17714. "sessionID": {
  17715. "type": "string",
  17716. "pattern": "^ses"
  17717. },
  17718. "callID": {
  17719. "type": "string"
  17720. },
  17721. "structured": {
  17722. "type": "object"
  17723. },
  17724. "content": {
  17725. "type": "array",
  17726. "items": {
  17727. "anyOf": [
  17728. {
  17729. "$ref": "#/components/schemas/ToolTextContent"
  17730. },
  17731. {
  17732. "$ref": "#/components/schemas/ToolFileContent"
  17733. }
  17734. ]
  17735. }
  17736. }
  17737. },
  17738. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17739. "additionalProperties": false
  17740. }
  17741. },
  17742. "required": ["id", "type", "properties"],
  17743. "additionalProperties": false
  17744. },
  17745. "EventSessionNextToolSuccess": {
  17746. "type": "object",
  17747. "properties": {
  17748. "id": {
  17749. "type": "string"
  17750. },
  17751. "type": {
  17752. "type": "string",
  17753. "enum": ["session.next.tool.success"]
  17754. },
  17755. "properties": {
  17756. "type": "object",
  17757. "properties": {
  17758. "timestamp": {
  17759. "type": "number"
  17760. },
  17761. "sessionID": {
  17762. "type": "string",
  17763. "pattern": "^ses"
  17764. },
  17765. "callID": {
  17766. "type": "string"
  17767. },
  17768. "structured": {
  17769. "type": "object"
  17770. },
  17771. "content": {
  17772. "type": "array",
  17773. "items": {
  17774. "anyOf": [
  17775. {
  17776. "$ref": "#/components/schemas/ToolTextContent"
  17777. },
  17778. {
  17779. "$ref": "#/components/schemas/ToolFileContent"
  17780. }
  17781. ]
  17782. }
  17783. },
  17784. "provider": {
  17785. "type": "object",
  17786. "properties": {
  17787. "executed": {
  17788. "type": "boolean"
  17789. },
  17790. "metadata": {
  17791. "type": "object"
  17792. }
  17793. },
  17794. "required": ["executed"],
  17795. "additionalProperties": false
  17796. }
  17797. },
  17798. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17799. "additionalProperties": false
  17800. }
  17801. },
  17802. "required": ["id", "type", "properties"],
  17803. "additionalProperties": false
  17804. },
  17805. "EventSessionNextToolFailed": {
  17806. "type": "object",
  17807. "properties": {
  17808. "id": {
  17809. "type": "string"
  17810. },
  17811. "type": {
  17812. "type": "string",
  17813. "enum": ["session.next.tool.failed"]
  17814. },
  17815. "properties": {
  17816. "type": "object",
  17817. "properties": {
  17818. "timestamp": {
  17819. "type": "number"
  17820. },
  17821. "sessionID": {
  17822. "type": "string",
  17823. "pattern": "^ses"
  17824. },
  17825. "callID": {
  17826. "type": "string"
  17827. },
  17828. "error": {
  17829. "$ref": "#/components/schemas/SessionErrorUnknown"
  17830. },
  17831. "provider": {
  17832. "type": "object",
  17833. "properties": {
  17834. "executed": {
  17835. "type": "boolean"
  17836. },
  17837. "metadata": {
  17838. "type": "object"
  17839. }
  17840. },
  17841. "required": ["executed"],
  17842. "additionalProperties": false
  17843. }
  17844. },
  17845. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17846. "additionalProperties": false
  17847. }
  17848. },
  17849. "required": ["id", "type", "properties"],
  17850. "additionalProperties": false
  17851. },
  17852. "SessionNextRetry_error": {
  17853. "type": "object",
  17854. "properties": {
  17855. "message": {
  17856. "type": "string"
  17857. },
  17858. "statusCode": {
  17859. "type": "number"
  17860. },
  17861. "isRetryable": {
  17862. "type": "boolean"
  17863. },
  17864. "responseHeaders": {
  17865. "type": "object",
  17866. "additionalProperties": {
  17867. "type": "string"
  17868. }
  17869. },
  17870. "responseBody": {
  17871. "type": "string"
  17872. },
  17873. "metadata": {
  17874. "type": "object",
  17875. "additionalProperties": {
  17876. "type": "string"
  17877. }
  17878. }
  17879. },
  17880. "required": ["message", "isRetryable"],
  17881. "additionalProperties": false
  17882. },
  17883. "EventSessionNextRetried": {
  17884. "type": "object",
  17885. "properties": {
  17886. "id": {
  17887. "type": "string"
  17888. },
  17889. "type": {
  17890. "type": "string",
  17891. "enum": ["session.next.retried"]
  17892. },
  17893. "properties": {
  17894. "type": "object",
  17895. "properties": {
  17896. "timestamp": {
  17897. "type": "number"
  17898. },
  17899. "sessionID": {
  17900. "type": "string",
  17901. "pattern": "^ses"
  17902. },
  17903. "attempt": {
  17904. "type": "number"
  17905. },
  17906. "error": {
  17907. "$ref": "#/components/schemas/SessionNextRetry_error"
  17908. }
  17909. },
  17910. "required": ["timestamp", "sessionID", "attempt", "error"],
  17911. "additionalProperties": false
  17912. }
  17913. },
  17914. "required": ["id", "type", "properties"],
  17915. "additionalProperties": false
  17916. },
  17917. "EventSessionNextCompactionStarted": {
  17918. "type": "object",
  17919. "properties": {
  17920. "id": {
  17921. "type": "string"
  17922. },
  17923. "type": {
  17924. "type": "string",
  17925. "enum": ["session.next.compaction.started"]
  17926. },
  17927. "properties": {
  17928. "type": "object",
  17929. "properties": {
  17930. "timestamp": {
  17931. "type": "number"
  17932. },
  17933. "sessionID": {
  17934. "type": "string",
  17935. "pattern": "^ses"
  17936. },
  17937. "reason": {
  17938. "type": "string",
  17939. "enum": ["auto", "manual"]
  17940. }
  17941. },
  17942. "required": ["timestamp", "sessionID", "reason"],
  17943. "additionalProperties": false
  17944. }
  17945. },
  17946. "required": ["id", "type", "properties"],
  17947. "additionalProperties": false
  17948. },
  17949. "EventSessionNextCompactionDelta": {
  17950. "type": "object",
  17951. "properties": {
  17952. "id": {
  17953. "type": "string"
  17954. },
  17955. "type": {
  17956. "type": "string",
  17957. "enum": ["session.next.compaction.delta"]
  17958. },
  17959. "properties": {
  17960. "type": "object",
  17961. "properties": {
  17962. "timestamp": {
  17963. "type": "number"
  17964. },
  17965. "sessionID": {
  17966. "type": "string",
  17967. "pattern": "^ses"
  17968. },
  17969. "text": {
  17970. "type": "string"
  17971. }
  17972. },
  17973. "required": ["timestamp", "sessionID", "text"],
  17974. "additionalProperties": false
  17975. }
  17976. },
  17977. "required": ["id", "type", "properties"],
  17978. "additionalProperties": false
  17979. },
  17980. "EventSessionNextCompactionEnded": {
  17981. "type": "object",
  17982. "properties": {
  17983. "id": {
  17984. "type": "string"
  17985. },
  17986. "type": {
  17987. "type": "string",
  17988. "enum": ["session.next.compaction.ended"]
  17989. },
  17990. "properties": {
  17991. "type": "object",
  17992. "properties": {
  17993. "timestamp": {
  17994. "type": "number"
  17995. },
  17996. "sessionID": {
  17997. "type": "string",
  17998. "pattern": "^ses"
  17999. },
  18000. "text": {
  18001. "type": "string"
  18002. },
  18003. "include": {
  18004. "type": "string"
  18005. }
  18006. },
  18007. "required": ["timestamp", "sessionID", "text"],
  18008. "additionalProperties": false
  18009. }
  18010. },
  18011. "required": ["id", "type", "properties"],
  18012. "additionalProperties": false
  18013. },
  18014. "EventServerConnected": {
  18015. "type": "object",
  18016. "properties": {
  18017. "id": {
  18018. "type": "string"
  18019. },
  18020. "type": {
  18021. "type": "string",
  18022. "enum": ["server.connected"]
  18023. },
  18024. "properties": {
  18025. "type": "object",
  18026. "properties": {}
  18027. }
  18028. },
  18029. "required": ["id", "type", "properties"],
  18030. "additionalProperties": false
  18031. },
  18032. "EventGlobalDisposed": {
  18033. "type": "object",
  18034. "properties": {
  18035. "id": {
  18036. "type": "string"
  18037. },
  18038. "type": {
  18039. "type": "string",
  18040. "enum": ["global.disposed"]
  18041. },
  18042. "properties": {
  18043. "type": "object",
  18044. "properties": {}
  18045. }
  18046. },
  18047. "required": ["id", "type", "properties"],
  18048. "additionalProperties": false
  18049. },
  18050. "SessionInfo": {
  18051. "type": "object",
  18052. "properties": {
  18053. "id": {
  18054. "type": "string",
  18055. "pattern": "^ses"
  18056. },
  18057. "parentID": {
  18058. "type": "string",
  18059. "pattern": "^ses"
  18060. },
  18061. "projectID": {
  18062. "type": "string"
  18063. },
  18064. "workspaceID": {
  18065. "type": "string",
  18066. "pattern": "^wrk"
  18067. },
  18068. "path": {
  18069. "type": "string"
  18070. },
  18071. "agent": {
  18072. "type": "string"
  18073. },
  18074. "model": {
  18075. "type": "object",
  18076. "properties": {
  18077. "id": {
  18078. "type": "string"
  18079. },
  18080. "providerID": {
  18081. "type": "string"
  18082. },
  18083. "variant": {
  18084. "type": "string"
  18085. }
  18086. },
  18087. "required": ["id", "providerID", "variant"],
  18088. "additionalProperties": false
  18089. },
  18090. "time": {
  18091. "type": "object",
  18092. "properties": {
  18093. "created": {
  18094. "type": "number"
  18095. },
  18096. "updated": {
  18097. "type": "number"
  18098. },
  18099. "archived": {
  18100. "type": "number"
  18101. }
  18102. },
  18103. "required": ["created", "updated"],
  18104. "additionalProperties": false
  18105. },
  18106. "title": {
  18107. "type": "string"
  18108. }
  18109. },
  18110. "required": ["id", "projectID", "time", "title"],
  18111. "additionalProperties": false
  18112. },
  18113. "SessionDelivery": {
  18114. "type": "string",
  18115. "enum": ["immediate", "deferred"]
  18116. },
  18117. "SessionMessageAgentSwitched": {
  18118. "type": "object",
  18119. "properties": {
  18120. "id": {
  18121. "type": "string"
  18122. },
  18123. "metadata": {
  18124. "type": "object"
  18125. },
  18126. "time": {
  18127. "type": "object",
  18128. "properties": {
  18129. "created": {
  18130. "type": "number"
  18131. }
  18132. },
  18133. "required": ["created"],
  18134. "additionalProperties": false
  18135. },
  18136. "type": {
  18137. "type": "string",
  18138. "enum": ["agent-switched"]
  18139. },
  18140. "agent": {
  18141. "type": "string"
  18142. }
  18143. },
  18144. "required": ["id", "time", "type", "agent"],
  18145. "additionalProperties": false
  18146. },
  18147. "SessionMessageModelSwitched": {
  18148. "type": "object",
  18149. "properties": {
  18150. "id": {
  18151. "type": "string"
  18152. },
  18153. "metadata": {
  18154. "type": "object"
  18155. },
  18156. "time": {
  18157. "type": "object",
  18158. "properties": {
  18159. "created": {
  18160. "type": "number"
  18161. }
  18162. },
  18163. "required": ["created"],
  18164. "additionalProperties": false
  18165. },
  18166. "type": {
  18167. "type": "string",
  18168. "enum": ["model-switched"]
  18169. },
  18170. "model": {
  18171. "type": "object",
  18172. "properties": {
  18173. "id": {
  18174. "type": "string"
  18175. },
  18176. "providerID": {
  18177. "type": "string"
  18178. },
  18179. "variant": {
  18180. "type": "string"
  18181. }
  18182. },
  18183. "required": ["id", "providerID", "variant"],
  18184. "additionalProperties": false
  18185. }
  18186. },
  18187. "required": ["id", "time", "type", "model"],
  18188. "additionalProperties": false
  18189. },
  18190. "SessionMessageUser": {
  18191. "type": "object",
  18192. "properties": {
  18193. "id": {
  18194. "type": "string"
  18195. },
  18196. "metadata": {
  18197. "type": "object"
  18198. },
  18199. "time": {
  18200. "type": "object",
  18201. "properties": {
  18202. "created": {
  18203. "type": "number"
  18204. }
  18205. },
  18206. "required": ["created"],
  18207. "additionalProperties": false
  18208. },
  18209. "text": {
  18210. "type": "string"
  18211. },
  18212. "files": {
  18213. "type": "array",
  18214. "items": {
  18215. "$ref": "#/components/schemas/PromptFileAttachment"
  18216. }
  18217. },
  18218. "agents": {
  18219. "type": "array",
  18220. "items": {
  18221. "$ref": "#/components/schemas/PromptAgentAttachment"
  18222. }
  18223. },
  18224. "type": {
  18225. "type": "string",
  18226. "enum": ["user"]
  18227. }
  18228. },
  18229. "required": ["id", "time", "text", "type"],
  18230. "additionalProperties": false
  18231. },
  18232. "SessionMessageSynthetic": {
  18233. "type": "object",
  18234. "properties": {
  18235. "id": {
  18236. "type": "string"
  18237. },
  18238. "metadata": {
  18239. "type": "object"
  18240. },
  18241. "time": {
  18242. "type": "object",
  18243. "properties": {
  18244. "created": {
  18245. "type": "number"
  18246. }
  18247. },
  18248. "required": ["created"],
  18249. "additionalProperties": false
  18250. },
  18251. "sessionID": {
  18252. "type": "string",
  18253. "pattern": "^ses"
  18254. },
  18255. "text": {
  18256. "type": "string"
  18257. },
  18258. "type": {
  18259. "type": "string",
  18260. "enum": ["synthetic"]
  18261. }
  18262. },
  18263. "required": ["id", "time", "sessionID", "text", "type"],
  18264. "additionalProperties": false
  18265. },
  18266. "SessionMessageShell": {
  18267. "type": "object",
  18268. "properties": {
  18269. "id": {
  18270. "type": "string"
  18271. },
  18272. "metadata": {
  18273. "type": "object"
  18274. },
  18275. "time": {
  18276. "type": "object",
  18277. "properties": {
  18278. "created": {
  18279. "type": "number"
  18280. },
  18281. "completed": {
  18282. "type": "number"
  18283. }
  18284. },
  18285. "required": ["created"],
  18286. "additionalProperties": false
  18287. },
  18288. "type": {
  18289. "type": "string",
  18290. "enum": ["shell"]
  18291. },
  18292. "callID": {
  18293. "type": "string"
  18294. },
  18295. "command": {
  18296. "type": "string"
  18297. },
  18298. "output": {
  18299. "type": "string"
  18300. }
  18301. },
  18302. "required": ["id", "time", "type", "callID", "command", "output"],
  18303. "additionalProperties": false
  18304. },
  18305. "SessionMessageAssistantText": {
  18306. "type": "object",
  18307. "properties": {
  18308. "type": {
  18309. "type": "string",
  18310. "enum": ["text"]
  18311. },
  18312. "text": {
  18313. "type": "string"
  18314. }
  18315. },
  18316. "required": ["type", "text"],
  18317. "additionalProperties": false
  18318. },
  18319. "SessionMessageAssistantReasoning": {
  18320. "type": "object",
  18321. "properties": {
  18322. "type": {
  18323. "type": "string",
  18324. "enum": ["reasoning"]
  18325. },
  18326. "id": {
  18327. "type": "string"
  18328. },
  18329. "text": {
  18330. "type": "string"
  18331. }
  18332. },
  18333. "required": ["type", "id", "text"],
  18334. "additionalProperties": false
  18335. },
  18336. "SessionMessageToolStatePending": {
  18337. "type": "object",
  18338. "properties": {
  18339. "status": {
  18340. "type": "string",
  18341. "enum": ["pending"]
  18342. },
  18343. "input": {
  18344. "type": "string"
  18345. }
  18346. },
  18347. "required": ["status", "input"],
  18348. "additionalProperties": false
  18349. },
  18350. "SessionMessageToolStateRunning": {
  18351. "type": "object",
  18352. "properties": {
  18353. "status": {
  18354. "type": "string",
  18355. "enum": ["running"]
  18356. },
  18357. "input": {
  18358. "type": "object"
  18359. },
  18360. "structured": {
  18361. "type": "object"
  18362. },
  18363. "content": {
  18364. "type": "array",
  18365. "items": {
  18366. "anyOf": [
  18367. {
  18368. "$ref": "#/components/schemas/ToolTextContent"
  18369. },
  18370. {
  18371. "$ref": "#/components/schemas/ToolFileContent"
  18372. }
  18373. ]
  18374. }
  18375. }
  18376. },
  18377. "required": ["status", "input", "structured", "content"],
  18378. "additionalProperties": false
  18379. },
  18380. "SessionMessageToolStateCompleted": {
  18381. "type": "object",
  18382. "properties": {
  18383. "status": {
  18384. "type": "string",
  18385. "enum": ["completed"]
  18386. },
  18387. "input": {
  18388. "type": "object"
  18389. },
  18390. "attachments": {
  18391. "type": "array",
  18392. "items": {
  18393. "$ref": "#/components/schemas/PromptFileAttachment"
  18394. }
  18395. },
  18396. "content": {
  18397. "type": "array",
  18398. "items": {
  18399. "anyOf": [
  18400. {
  18401. "$ref": "#/components/schemas/ToolTextContent"
  18402. },
  18403. {
  18404. "$ref": "#/components/schemas/ToolFileContent"
  18405. }
  18406. ]
  18407. }
  18408. },
  18409. "structured": {
  18410. "type": "object"
  18411. }
  18412. },
  18413. "required": ["status", "input", "content", "structured"],
  18414. "additionalProperties": false
  18415. },
  18416. "SessionMessageToolStateError": {
  18417. "type": "object",
  18418. "properties": {
  18419. "status": {
  18420. "type": "string",
  18421. "enum": ["error"]
  18422. },
  18423. "input": {
  18424. "type": "object"
  18425. },
  18426. "content": {
  18427. "type": "array",
  18428. "items": {
  18429. "anyOf": [
  18430. {
  18431. "$ref": "#/components/schemas/ToolTextContent"
  18432. },
  18433. {
  18434. "$ref": "#/components/schemas/ToolFileContent"
  18435. }
  18436. ]
  18437. }
  18438. },
  18439. "structured": {
  18440. "type": "object"
  18441. },
  18442. "error": {
  18443. "$ref": "#/components/schemas/SessionErrorUnknown"
  18444. }
  18445. },
  18446. "required": ["status", "input", "content", "structured", "error"],
  18447. "additionalProperties": false
  18448. },
  18449. "SessionMessageAssistantTool": {
  18450. "type": "object",
  18451. "properties": {
  18452. "type": {
  18453. "type": "string",
  18454. "enum": ["tool"]
  18455. },
  18456. "id": {
  18457. "type": "string"
  18458. },
  18459. "name": {
  18460. "type": "string"
  18461. },
  18462. "provider": {
  18463. "type": "object",
  18464. "properties": {
  18465. "executed": {
  18466. "type": "boolean"
  18467. },
  18468. "metadata": {
  18469. "type": "object"
  18470. }
  18471. },
  18472. "required": ["executed"],
  18473. "additionalProperties": false
  18474. },
  18475. "state": {
  18476. "anyOf": [
  18477. {
  18478. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18479. },
  18480. {
  18481. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18482. },
  18483. {
  18484. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18485. },
  18486. {
  18487. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18488. }
  18489. ]
  18490. },
  18491. "time": {
  18492. "type": "object",
  18493. "properties": {
  18494. "created": {
  18495. "type": "number"
  18496. },
  18497. "ran": {
  18498. "type": "number"
  18499. },
  18500. "completed": {
  18501. "type": "number"
  18502. },
  18503. "pruned": {
  18504. "type": "number"
  18505. }
  18506. },
  18507. "required": ["created"],
  18508. "additionalProperties": false
  18509. }
  18510. },
  18511. "required": ["type", "id", "name", "state", "time"],
  18512. "additionalProperties": false
  18513. },
  18514. "SessionMessageAssistant": {
  18515. "type": "object",
  18516. "properties": {
  18517. "id": {
  18518. "type": "string"
  18519. },
  18520. "metadata": {
  18521. "type": "object"
  18522. },
  18523. "time": {
  18524. "type": "object",
  18525. "properties": {
  18526. "created": {
  18527. "type": "number"
  18528. },
  18529. "completed": {
  18530. "type": "number"
  18531. }
  18532. },
  18533. "required": ["created"],
  18534. "additionalProperties": false
  18535. },
  18536. "type": {
  18537. "type": "string",
  18538. "enum": ["assistant"]
  18539. },
  18540. "agent": {
  18541. "type": "string"
  18542. },
  18543. "model": {
  18544. "type": "object",
  18545. "properties": {
  18546. "id": {
  18547. "type": "string"
  18548. },
  18549. "providerID": {
  18550. "type": "string"
  18551. },
  18552. "variant": {
  18553. "type": "string"
  18554. }
  18555. },
  18556. "required": ["id", "providerID", "variant"],
  18557. "additionalProperties": false
  18558. },
  18559. "content": {
  18560. "type": "array",
  18561. "items": {
  18562. "anyOf": [
  18563. {
  18564. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18565. },
  18566. {
  18567. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18568. },
  18569. {
  18570. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18571. }
  18572. ]
  18573. }
  18574. },
  18575. "snapshot": {
  18576. "type": "object",
  18577. "properties": {
  18578. "start": {
  18579. "type": "string"
  18580. },
  18581. "end": {
  18582. "type": "string"
  18583. }
  18584. },
  18585. "additionalProperties": false
  18586. },
  18587. "finish": {
  18588. "type": "string"
  18589. },
  18590. "cost": {
  18591. "type": "number"
  18592. },
  18593. "tokens": {
  18594. "type": "object",
  18595. "properties": {
  18596. "input": {
  18597. "type": "number"
  18598. },
  18599. "output": {
  18600. "type": "number"
  18601. },
  18602. "reasoning": {
  18603. "type": "number"
  18604. },
  18605. "cache": {
  18606. "type": "object",
  18607. "properties": {
  18608. "read": {
  18609. "type": "number"
  18610. },
  18611. "write": {
  18612. "type": "number"
  18613. }
  18614. },
  18615. "required": ["read", "write"],
  18616. "additionalProperties": false
  18617. }
  18618. },
  18619. "required": ["input", "output", "reasoning", "cache"],
  18620. "additionalProperties": false
  18621. },
  18622. "error": {
  18623. "$ref": "#/components/schemas/SessionErrorUnknown"
  18624. }
  18625. },
  18626. "required": ["id", "time", "type", "agent", "model", "content"],
  18627. "additionalProperties": false
  18628. },
  18629. "SessionMessageCompaction": {
  18630. "type": "object",
  18631. "properties": {
  18632. "type": {
  18633. "type": "string",
  18634. "enum": ["compaction"]
  18635. },
  18636. "reason": {
  18637. "type": "string",
  18638. "enum": ["auto", "manual"]
  18639. },
  18640. "summary": {
  18641. "type": "string"
  18642. },
  18643. "include": {
  18644. "type": "string"
  18645. },
  18646. "id": {
  18647. "type": "string"
  18648. },
  18649. "metadata": {
  18650. "type": "object"
  18651. },
  18652. "time": {
  18653. "type": "object",
  18654. "properties": {
  18655. "created": {
  18656. "type": "number"
  18657. }
  18658. },
  18659. "required": ["created"],
  18660. "additionalProperties": false
  18661. }
  18662. },
  18663. "required": ["type", "reason", "summary", "id", "time"],
  18664. "additionalProperties": false
  18665. },
  18666. "SessionMessage": {
  18667. "anyOf": [
  18668. {
  18669. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  18670. },
  18671. {
  18672. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  18673. },
  18674. {
  18675. "$ref": "#/components/schemas/SessionMessageUser"
  18676. },
  18677. {
  18678. "$ref": "#/components/schemas/SessionMessageSynthetic"
  18679. },
  18680. {
  18681. "$ref": "#/components/schemas/SessionMessageShell"
  18682. },
  18683. {
  18684. "$ref": "#/components/schemas/SessionMessageAssistant"
  18685. },
  18686. {
  18687. "$ref": "#/components/schemas/SessionMessageCompaction"
  18688. }
  18689. ]
  18690. },
  18691. "EventTuiToastShow1": {
  18692. "type": "object",
  18693. "properties": {
  18694. "id": {
  18695. "type": "string"
  18696. },
  18697. "type": {
  18698. "type": "string",
  18699. "enum": ["tui.toast.show"]
  18700. },
  18701. "properties": {
  18702. "type": "object",
  18703. "properties": {
  18704. "title": {
  18705. "type": "string"
  18706. },
  18707. "message": {
  18708. "type": "string"
  18709. },
  18710. "variant": {
  18711. "type": "string",
  18712. "enum": ["info", "success", "warning", "error"]
  18713. },
  18714. "duration": {
  18715. "type": "integer",
  18716. "exclusiveMinimum": 0
  18717. }
  18718. },
  18719. "required": ["message", "variant"],
  18720. "additionalProperties": false
  18721. }
  18722. },
  18723. "required": ["id", "type", "properties"],
  18724. "additionalProperties": false
  18725. },
  18726. "BadRequestError": {
  18727. "type": "object",
  18728. "required": ["name", "data"],
  18729. "properties": {
  18730. "name": {
  18731. "type": "string",
  18732. "enum": ["BadRequest"]
  18733. },
  18734. "data": {
  18735. "type": "object",
  18736. "required": ["message"],
  18737. "properties": {
  18738. "message": {
  18739. "type": "string"
  18740. },
  18741. "kind": {
  18742. "type": "string",
  18743. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  18744. }
  18745. }
  18746. }
  18747. }
  18748. }
  18749. }
  18750. },
  18751. "security": [],
  18752. "tags": [
  18753. {
  18754. "name": "control",
  18755. "description": "Control plane routes."
  18756. },
  18757. {
  18758. "name": "global",
  18759. "description": "Global server routes."
  18760. },
  18761. {
  18762. "name": "event",
  18763. "description": "Instance event stream route."
  18764. },
  18765. {
  18766. "name": "config",
  18767. "description": "Experimental HttpApi config routes."
  18768. },
  18769. {
  18770. "name": "experimental",
  18771. "description": "Experimental HttpApi read-only routes."
  18772. },
  18773. {
  18774. "name": "file",
  18775. "description": "Experimental HttpApi file routes."
  18776. },
  18777. {
  18778. "name": "instance",
  18779. "description": "Experimental HttpApi instance read routes."
  18780. },
  18781. {
  18782. "name": "mcp",
  18783. "description": "Experimental HttpApi MCP routes."
  18784. },
  18785. {
  18786. "name": "project",
  18787. "description": "Experimental HttpApi project routes."
  18788. },
  18789. {
  18790. "name": "pty",
  18791. "description": "Experimental HttpApi PTY routes."
  18792. },
  18793. {
  18794. "name": "question",
  18795. "description": "Question routes."
  18796. },
  18797. {
  18798. "name": "permission",
  18799. "description": "Experimental HttpApi permission routes."
  18800. },
  18801. {
  18802. "name": "provider",
  18803. "description": "Experimental HttpApi provider routes."
  18804. },
  18805. {
  18806. "name": "session",
  18807. "description": "Experimental HttpApi session routes."
  18808. },
  18809. {
  18810. "name": "sync",
  18811. "description": "Experimental HttpApi sync routes."
  18812. },
  18813. {
  18814. "name": "v2",
  18815. "description": "Experimental v2 routes."
  18816. },
  18817. {
  18818. "name": "v2 messages",
  18819. "description": "Experimental v2 message routes."
  18820. },
  18821. {
  18822. "name": "tui",
  18823. "description": "Experimental HttpApi TUI routes."
  18824. },
  18825. {
  18826. "name": "workspace",
  18827. "description": "Experimental HttpApi workspace routes."
  18828. },
  18829. {
  18830. "name": "pty",
  18831. "description": "PTY websocket route."
  18832. }
  18833. ]
  18834. }