openapi.json 521 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "Bad request",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "$ref": "#/components/schemas/BadRequestError"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "description": "Set authentication credentials",
  47. "summary": "Set auth credentials",
  48. "requestBody": {
  49. "content": {
  50. "application/json": {
  51. "schema": {
  52. "$ref": "#/components/schemas/Auth"
  53. }
  54. }
  55. }
  56. },
  57. "x-codeSamples": [
  58. {
  59. "lang": "js",
  60. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  61. }
  62. ]
  63. },
  64. "delete": {
  65. "tags": ["control"],
  66. "operationId": "auth.remove",
  67. "parameters": [
  68. {
  69. "name": "providerID",
  70. "in": "path",
  71. "schema": {
  72. "type": "string"
  73. },
  74. "required": true
  75. }
  76. ],
  77. "responses": {
  78. "200": {
  79. "description": "Successfully removed authentication credentials",
  80. "content": {
  81. "application/json": {
  82. "schema": {
  83. "type": "boolean",
  84. "description": "Successfully removed authentication credentials"
  85. }
  86. }
  87. }
  88. },
  89. "400": {
  90. "description": "Bad request",
  91. "content": {
  92. "application/json": {
  93. "schema": {
  94. "$ref": "#/components/schemas/BadRequestError"
  95. }
  96. }
  97. }
  98. }
  99. },
  100. "description": "Remove authentication credentials",
  101. "summary": "Remove auth credentials",
  102. "x-codeSamples": [
  103. {
  104. "lang": "js",
  105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  106. }
  107. ]
  108. }
  109. },
  110. "/log": {
  111. "post": {
  112. "tags": ["control"],
  113. "operationId": "app.log",
  114. "parameters": [
  115. {
  116. "name": "directory",
  117. "in": "query",
  118. "schema": {
  119. "type": "string"
  120. },
  121. "required": false
  122. },
  123. {
  124. "name": "workspace",
  125. "in": "query",
  126. "schema": {
  127. "type": "string"
  128. },
  129. "required": false
  130. }
  131. ],
  132. "responses": {
  133. "200": {
  134. "description": "Log entry written successfully",
  135. "content": {
  136. "application/json": {
  137. "schema": {
  138. "type": "boolean",
  139. "description": "Log entry written successfully"
  140. }
  141. }
  142. }
  143. },
  144. "400": {
  145. "description": "Bad request",
  146. "content": {
  147. "application/json": {
  148. "schema": {
  149. "$ref": "#/components/schemas/BadRequestError"
  150. }
  151. }
  152. }
  153. }
  154. },
  155. "description": "Write a log entry to the server logs with specified level and metadata.",
  156. "summary": "Write log",
  157. "requestBody": {
  158. "content": {
  159. "application/json": {
  160. "schema": {
  161. "type": "object",
  162. "properties": {
  163. "service": {
  164. "type": "string",
  165. "description": "Service name for the log entry"
  166. },
  167. "level": {
  168. "type": "string",
  169. "enum": ["debug", "info", "error", "warn"],
  170. "description": "Log level"
  171. },
  172. "message": {
  173. "type": "string",
  174. "description": "Log message"
  175. },
  176. "extra": {
  177. "type": "object"
  178. }
  179. },
  180. "required": ["service", "level", "message"],
  181. "additionalProperties": false
  182. }
  183. }
  184. }
  185. },
  186. "x-codeSamples": [
  187. {
  188. "lang": "js",
  189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  190. }
  191. ]
  192. }
  193. },
  194. "/global/health": {
  195. "get": {
  196. "tags": ["global"],
  197. "operationId": "global.health",
  198. "parameters": [],
  199. "responses": {
  200. "200": {
  201. "description": "Health information",
  202. "content": {
  203. "application/json": {
  204. "schema": {
  205. "type": "object",
  206. "properties": {
  207. "healthy": {
  208. "type": "boolean",
  209. "enum": [true]
  210. },
  211. "version": {
  212. "type": "string"
  213. }
  214. },
  215. "required": ["healthy", "version"],
  216. "additionalProperties": false,
  217. "description": "Health information"
  218. }
  219. }
  220. }
  221. }
  222. },
  223. "description": "Get health information about the OpenCode server.",
  224. "summary": "Get health",
  225. "x-codeSamples": [
  226. {
  227. "lang": "js",
  228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  229. }
  230. ]
  231. }
  232. },
  233. "/global/event": {
  234. "get": {
  235. "tags": ["global"],
  236. "operationId": "global.event",
  237. "parameters": [],
  238. "responses": {
  239. "200": {
  240. "description": "Event stream",
  241. "content": {
  242. "text/event-stream": {
  243. "schema": {
  244. "$ref": "#/components/schemas/GlobalEvent"
  245. }
  246. }
  247. }
  248. }
  249. },
  250. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  251. "summary": "Get global events",
  252. "x-codeSamples": [
  253. {
  254. "lang": "js",
  255. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  256. }
  257. ]
  258. }
  259. },
  260. "/global/config": {
  261. "get": {
  262. "tags": ["global"],
  263. "operationId": "global.config.get",
  264. "parameters": [],
  265. "responses": {
  266. "200": {
  267. "description": "Get global config info",
  268. "content": {
  269. "application/json": {
  270. "schema": {
  271. "$ref": "#/components/schemas/Config"
  272. }
  273. }
  274. }
  275. }
  276. },
  277. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  278. "summary": "Get global configuration",
  279. "x-codeSamples": [
  280. {
  281. "lang": "js",
  282. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  283. }
  284. ]
  285. },
  286. "patch": {
  287. "tags": ["global"],
  288. "operationId": "global.config.update",
  289. "parameters": [],
  290. "responses": {
  291. "200": {
  292. "description": "Successfully updated global config",
  293. "content": {
  294. "application/json": {
  295. "schema": {
  296. "$ref": "#/components/schemas/Config"
  297. }
  298. }
  299. }
  300. },
  301. "400": {
  302. "description": "Bad request",
  303. "content": {
  304. "application/json": {
  305. "schema": {
  306. "$ref": "#/components/schemas/BadRequestError"
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "description": "Update global OpenCode configuration settings and preferences.",
  313. "summary": "Update global configuration",
  314. "requestBody": {
  315. "content": {
  316. "application/json": {
  317. "schema": {
  318. "$ref": "#/components/schemas/Config"
  319. }
  320. }
  321. }
  322. },
  323. "x-codeSamples": [
  324. {
  325. "lang": "js",
  326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  327. }
  328. ]
  329. }
  330. },
  331. "/global/dispose": {
  332. "post": {
  333. "tags": ["global"],
  334. "operationId": "global.dispose",
  335. "parameters": [],
  336. "responses": {
  337. "200": {
  338. "description": "Global disposed",
  339. "content": {
  340. "application/json": {
  341. "schema": {
  342. "type": "boolean",
  343. "description": "Global disposed"
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  350. "summary": "Dispose instance",
  351. "x-codeSamples": [
  352. {
  353. "lang": "js",
  354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  355. }
  356. ]
  357. }
  358. },
  359. "/global/upgrade": {
  360. "post": {
  361. "tags": ["global"],
  362. "operationId": "global.upgrade",
  363. "parameters": [],
  364. "responses": {
  365. "200": {
  366. "description": "Upgrade result",
  367. "content": {
  368. "application/json": {
  369. "schema": {
  370. "anyOf": [
  371. {
  372. "type": "object",
  373. "properties": {
  374. "success": {
  375. "type": "boolean",
  376. "enum": [true]
  377. },
  378. "version": {
  379. "type": "string"
  380. }
  381. },
  382. "required": ["success", "version"],
  383. "additionalProperties": false
  384. },
  385. {
  386. "type": "object",
  387. "properties": {
  388. "success": {
  389. "type": "boolean",
  390. "enum": [false]
  391. },
  392. "error": {
  393. "type": "string"
  394. }
  395. },
  396. "required": ["success", "error"],
  397. "additionalProperties": false
  398. }
  399. ],
  400. "description": "Upgrade result"
  401. }
  402. }
  403. }
  404. },
  405. "400": {
  406. "description": "Bad request",
  407. "content": {
  408. "application/json": {
  409. "schema": {
  410. "$ref": "#/components/schemas/BadRequestError"
  411. }
  412. }
  413. }
  414. }
  415. },
  416. "description": "Upgrade opencode to the specified version or latest if not specified.",
  417. "summary": "Upgrade opencode",
  418. "requestBody": {
  419. "content": {
  420. "application/json": {
  421. "schema": {
  422. "type": "object",
  423. "properties": {
  424. "target": {
  425. "type": "string"
  426. }
  427. },
  428. "additionalProperties": false
  429. }
  430. }
  431. }
  432. },
  433. "x-codeSamples": [
  434. {
  435. "lang": "js",
  436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  437. }
  438. ]
  439. }
  440. },
  441. "/event": {
  442. "get": {
  443. "tags": ["event"],
  444. "operationId": "event.subscribe",
  445. "parameters": [
  446. {
  447. "name": "directory",
  448. "in": "query",
  449. "schema": {
  450. "type": "string"
  451. },
  452. "required": false
  453. },
  454. {
  455. "name": "workspace",
  456. "in": "query",
  457. "schema": {
  458. "type": "string"
  459. },
  460. "required": false
  461. }
  462. ],
  463. "responses": {
  464. "200": {
  465. "description": "Event stream",
  466. "content": {
  467. "text/event-stream": {
  468. "schema": {
  469. "$ref": "#/components/schemas/Event"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "description": "Get events",
  476. "summary": "Subscribe to events",
  477. "x-codeSamples": [
  478. {
  479. "lang": "js",
  480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  481. }
  482. ]
  483. }
  484. },
  485. "/config": {
  486. "get": {
  487. "tags": ["config"],
  488. "operationId": "config.get",
  489. "parameters": [
  490. {
  491. "name": "directory",
  492. "in": "query",
  493. "schema": {
  494. "type": "string"
  495. },
  496. "required": false
  497. },
  498. {
  499. "name": "workspace",
  500. "in": "query",
  501. "schema": {
  502. "type": "string"
  503. },
  504. "required": false
  505. }
  506. ],
  507. "responses": {
  508. "200": {
  509. "description": "Get config info",
  510. "content": {
  511. "application/json": {
  512. "schema": {
  513. "$ref": "#/components/schemas/Config"
  514. }
  515. }
  516. }
  517. }
  518. },
  519. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  520. "summary": "Get configuration",
  521. "x-codeSamples": [
  522. {
  523. "lang": "js",
  524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  525. }
  526. ]
  527. },
  528. "patch": {
  529. "tags": ["config"],
  530. "operationId": "config.update",
  531. "parameters": [
  532. {
  533. "name": "directory",
  534. "in": "query",
  535. "schema": {
  536. "type": "string"
  537. },
  538. "required": false
  539. },
  540. {
  541. "name": "workspace",
  542. "in": "query",
  543. "schema": {
  544. "type": "string"
  545. },
  546. "required": false
  547. }
  548. ],
  549. "responses": {
  550. "200": {
  551. "description": "Successfully updated config",
  552. "content": {
  553. "application/json": {
  554. "schema": {
  555. "$ref": "#/components/schemas/Config"
  556. }
  557. }
  558. }
  559. },
  560. "400": {
  561. "description": "Bad request",
  562. "content": {
  563. "application/json": {
  564. "schema": {
  565. "$ref": "#/components/schemas/BadRequestError"
  566. }
  567. }
  568. }
  569. }
  570. },
  571. "description": "Update OpenCode configuration settings and preferences.",
  572. "summary": "Update configuration",
  573. "requestBody": {
  574. "content": {
  575. "application/json": {
  576. "schema": {
  577. "$ref": "#/components/schemas/Config"
  578. }
  579. }
  580. }
  581. },
  582. "x-codeSamples": [
  583. {
  584. "lang": "js",
  585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  586. }
  587. ]
  588. }
  589. },
  590. "/config/providers": {
  591. "get": {
  592. "tags": ["config"],
  593. "operationId": "config.providers",
  594. "parameters": [
  595. {
  596. "name": "directory",
  597. "in": "query",
  598. "schema": {
  599. "type": "string"
  600. },
  601. "required": false
  602. },
  603. {
  604. "name": "workspace",
  605. "in": "query",
  606. "schema": {
  607. "type": "string"
  608. },
  609. "required": false
  610. }
  611. ],
  612. "responses": {
  613. "200": {
  614. "description": "List of providers",
  615. "content": {
  616. "application/json": {
  617. "schema": {
  618. "type": "object",
  619. "properties": {
  620. "providers": {
  621. "type": "array",
  622. "items": {
  623. "$ref": "#/components/schemas/Provider"
  624. }
  625. },
  626. "default": {
  627. "type": "object",
  628. "additionalProperties": {
  629. "type": "string"
  630. }
  631. }
  632. },
  633. "required": ["providers", "default"],
  634. "additionalProperties": false,
  635. "description": "List of providers"
  636. }
  637. }
  638. }
  639. }
  640. },
  641. "description": "Get a list of all configured AI providers and their default models.",
  642. "summary": "List config providers",
  643. "x-codeSamples": [
  644. {
  645. "lang": "js",
  646. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  647. }
  648. ]
  649. }
  650. },
  651. "/experimental/console": {
  652. "get": {
  653. "tags": ["experimental"],
  654. "operationId": "experimental.console.get",
  655. "parameters": [
  656. {
  657. "name": "directory",
  658. "in": "query",
  659. "schema": {
  660. "type": "string"
  661. },
  662. "required": false
  663. },
  664. {
  665. "name": "workspace",
  666. "in": "query",
  667. "schema": {
  668. "type": "string"
  669. },
  670. "required": false
  671. }
  672. ],
  673. "responses": {
  674. "200": {
  675. "description": "Active Console provider metadata",
  676. "content": {
  677. "application/json": {
  678. "schema": {
  679. "$ref": "#/components/schemas/ConsoleState"
  680. }
  681. }
  682. }
  683. },
  684. "500": {
  685. "description": "InternalServerError",
  686. "content": {
  687. "application/json": {
  688. "schema": {
  689. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  690. }
  691. }
  692. }
  693. }
  694. },
  695. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  696. "summary": "Get active Console provider metadata",
  697. "x-codeSamples": [
  698. {
  699. "lang": "js",
  700. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  701. }
  702. ]
  703. }
  704. },
  705. "/experimental/console/orgs": {
  706. "get": {
  707. "tags": ["experimental"],
  708. "operationId": "experimental.console.listOrgs",
  709. "parameters": [
  710. {
  711. "name": "directory",
  712. "in": "query",
  713. "schema": {
  714. "type": "string"
  715. },
  716. "required": false
  717. },
  718. {
  719. "name": "workspace",
  720. "in": "query",
  721. "schema": {
  722. "type": "string"
  723. },
  724. "required": false
  725. }
  726. ],
  727. "responses": {
  728. "200": {
  729. "description": "Switchable Console orgs",
  730. "content": {
  731. "application/json": {
  732. "schema": {
  733. "type": "object",
  734. "properties": {
  735. "orgs": {
  736. "type": "array",
  737. "items": {
  738. "type": "object",
  739. "properties": {
  740. "accountID": {
  741. "type": "string"
  742. },
  743. "accountEmail": {
  744. "type": "string"
  745. },
  746. "accountUrl": {
  747. "type": "string"
  748. },
  749. "orgID": {
  750. "type": "string"
  751. },
  752. "orgName": {
  753. "type": "string"
  754. },
  755. "active": {
  756. "type": "boolean"
  757. }
  758. },
  759. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  760. "additionalProperties": false
  761. }
  762. }
  763. },
  764. "required": ["orgs"],
  765. "additionalProperties": false,
  766. "description": "Switchable Console orgs"
  767. }
  768. }
  769. }
  770. },
  771. "500": {
  772. "description": "InternalServerError",
  773. "content": {
  774. "application/json": {
  775. "schema": {
  776. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  777. }
  778. }
  779. }
  780. }
  781. },
  782. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  783. "summary": "List switchable Console orgs",
  784. "x-codeSamples": [
  785. {
  786. "lang": "js",
  787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  788. }
  789. ]
  790. }
  791. },
  792. "/experimental/console/switch": {
  793. "post": {
  794. "tags": ["experimental"],
  795. "operationId": "experimental.console.switchOrg",
  796. "parameters": [
  797. {
  798. "name": "directory",
  799. "in": "query",
  800. "schema": {
  801. "type": "string"
  802. },
  803. "required": false
  804. },
  805. {
  806. "name": "workspace",
  807. "in": "query",
  808. "schema": {
  809. "type": "string"
  810. },
  811. "required": false
  812. }
  813. ],
  814. "responses": {
  815. "200": {
  816. "description": "Switch success",
  817. "content": {
  818. "application/json": {
  819. "schema": {
  820. "type": "boolean",
  821. "description": "Switch success"
  822. }
  823. }
  824. }
  825. }
  826. },
  827. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  828. "summary": "Switch active Console org",
  829. "requestBody": {
  830. "content": {
  831. "application/json": {
  832. "schema": {
  833. "type": "object",
  834. "properties": {
  835. "accountID": {
  836. "type": "string"
  837. },
  838. "orgID": {
  839. "type": "string"
  840. }
  841. },
  842. "required": ["accountID", "orgID"],
  843. "additionalProperties": false
  844. }
  845. }
  846. }
  847. },
  848. "x-codeSamples": [
  849. {
  850. "lang": "js",
  851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  852. }
  853. ]
  854. }
  855. },
  856. "/experimental/tool": {
  857. "get": {
  858. "tags": ["experimental"],
  859. "operationId": "tool.list",
  860. "parameters": [
  861. {
  862. "name": "directory",
  863. "in": "query",
  864. "schema": {
  865. "type": "string"
  866. },
  867. "required": false
  868. },
  869. {
  870. "name": "workspace",
  871. "in": "query",
  872. "schema": {
  873. "type": "string"
  874. },
  875. "required": false
  876. },
  877. {
  878. "name": "provider",
  879. "in": "query",
  880. "schema": {
  881. "type": "string"
  882. },
  883. "required": true
  884. },
  885. {
  886. "name": "model",
  887. "in": "query",
  888. "schema": {
  889. "type": "string"
  890. },
  891. "required": true
  892. }
  893. ],
  894. "responses": {
  895. "200": {
  896. "description": "Tools",
  897. "content": {
  898. "application/json": {
  899. "schema": {
  900. "$ref": "#/components/schemas/ToolList"
  901. }
  902. }
  903. }
  904. },
  905. "400": {
  906. "description": "Bad request",
  907. "content": {
  908. "application/json": {
  909. "schema": {
  910. "$ref": "#/components/schemas/BadRequestError"
  911. }
  912. }
  913. }
  914. }
  915. },
  916. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  917. "summary": "List tools",
  918. "x-codeSamples": [
  919. {
  920. "lang": "js",
  921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  922. }
  923. ]
  924. }
  925. },
  926. "/experimental/tool/ids": {
  927. "get": {
  928. "tags": ["experimental"],
  929. "operationId": "tool.ids",
  930. "parameters": [
  931. {
  932. "name": "directory",
  933. "in": "query",
  934. "schema": {
  935. "type": "string"
  936. },
  937. "required": false
  938. },
  939. {
  940. "name": "workspace",
  941. "in": "query",
  942. "schema": {
  943. "type": "string"
  944. },
  945. "required": false
  946. }
  947. ],
  948. "responses": {
  949. "200": {
  950. "description": "Tool IDs",
  951. "content": {
  952. "application/json": {
  953. "schema": {
  954. "$ref": "#/components/schemas/ToolIDs"
  955. }
  956. }
  957. }
  958. },
  959. "400": {
  960. "description": "Bad request",
  961. "content": {
  962. "application/json": {
  963. "schema": {
  964. "$ref": "#/components/schemas/BadRequestError"
  965. }
  966. }
  967. }
  968. }
  969. },
  970. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  971. "summary": "List tool IDs",
  972. "x-codeSamples": [
  973. {
  974. "lang": "js",
  975. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  976. }
  977. ]
  978. }
  979. },
  980. "/experimental/worktree": {
  981. "get": {
  982. "tags": ["experimental"],
  983. "operationId": "worktree.list",
  984. "parameters": [
  985. {
  986. "name": "directory",
  987. "in": "query",
  988. "schema": {
  989. "type": "string"
  990. },
  991. "required": false
  992. },
  993. {
  994. "name": "workspace",
  995. "in": "query",
  996. "schema": {
  997. "type": "string"
  998. },
  999. "required": false
  1000. }
  1001. ],
  1002. "responses": {
  1003. "200": {
  1004. "description": "List of worktree directories",
  1005. "content": {
  1006. "application/json": {
  1007. "schema": {
  1008. "type": "array",
  1009. "items": {
  1010. "type": "string"
  1011. },
  1012. "description": "List of worktree directories"
  1013. }
  1014. }
  1015. }
  1016. },
  1017. "400": {
  1018. "description": "WorktreeError",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/WorktreeError"
  1023. }
  1024. }
  1025. }
  1026. }
  1027. },
  1028. "description": "List all sandbox worktrees for the current project.",
  1029. "summary": "List worktrees",
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1034. }
  1035. ]
  1036. },
  1037. "post": {
  1038. "tags": ["experimental"],
  1039. "operationId": "worktree.create",
  1040. "parameters": [
  1041. {
  1042. "name": "directory",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. },
  1049. {
  1050. "name": "workspace",
  1051. "in": "query",
  1052. "schema": {
  1053. "type": "string"
  1054. },
  1055. "required": false
  1056. }
  1057. ],
  1058. "responses": {
  1059. "200": {
  1060. "description": "Worktree created",
  1061. "content": {
  1062. "application/json": {
  1063. "schema": {
  1064. "$ref": "#/components/schemas/Worktree"
  1065. }
  1066. }
  1067. }
  1068. },
  1069. "400": {
  1070. "description": "WorktreeError",
  1071. "content": {
  1072. "application/json": {
  1073. "schema": {
  1074. "$ref": "#/components/schemas/WorktreeError"
  1075. }
  1076. }
  1077. }
  1078. }
  1079. },
  1080. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1081. "summary": "Create worktree",
  1082. "requestBody": {
  1083. "content": {
  1084. "application/json": {
  1085. "schema": {
  1086. "$ref": "#/components/schemas/WorktreeCreateInput"
  1087. }
  1088. }
  1089. }
  1090. },
  1091. "x-codeSamples": [
  1092. {
  1093. "lang": "js",
  1094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1095. }
  1096. ]
  1097. },
  1098. "delete": {
  1099. "tags": ["experimental"],
  1100. "operationId": "worktree.remove",
  1101. "parameters": [
  1102. {
  1103. "name": "directory",
  1104. "in": "query",
  1105. "schema": {
  1106. "type": "string"
  1107. },
  1108. "required": false
  1109. },
  1110. {
  1111. "name": "workspace",
  1112. "in": "query",
  1113. "schema": {
  1114. "type": "string"
  1115. },
  1116. "required": false
  1117. }
  1118. ],
  1119. "responses": {
  1120. "200": {
  1121. "description": "Worktree removed",
  1122. "content": {
  1123. "application/json": {
  1124. "schema": {
  1125. "type": "boolean",
  1126. "description": "Worktree removed"
  1127. }
  1128. }
  1129. }
  1130. },
  1131. "400": {
  1132. "description": "WorktreeError",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/WorktreeError"
  1137. }
  1138. }
  1139. }
  1140. }
  1141. },
  1142. "description": "Remove a git worktree and delete its branch.",
  1143. "summary": "Remove worktree",
  1144. "requestBody": {
  1145. "content": {
  1146. "application/json": {
  1147. "schema": {
  1148. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "x-codeSamples": [
  1154. {
  1155. "lang": "js",
  1156. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1157. }
  1158. ]
  1159. }
  1160. },
  1161. "/experimental/worktree/reset": {
  1162. "post": {
  1163. "tags": ["experimental"],
  1164. "operationId": "worktree.reset",
  1165. "parameters": [
  1166. {
  1167. "name": "directory",
  1168. "in": "query",
  1169. "schema": {
  1170. "type": "string"
  1171. },
  1172. "required": false
  1173. },
  1174. {
  1175. "name": "workspace",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. }
  1182. ],
  1183. "responses": {
  1184. "200": {
  1185. "description": "Worktree reset",
  1186. "content": {
  1187. "application/json": {
  1188. "schema": {
  1189. "type": "boolean",
  1190. "description": "Worktree reset"
  1191. }
  1192. }
  1193. }
  1194. },
  1195. "400": {
  1196. "description": "WorktreeError",
  1197. "content": {
  1198. "application/json": {
  1199. "schema": {
  1200. "$ref": "#/components/schemas/WorktreeError"
  1201. }
  1202. }
  1203. }
  1204. }
  1205. },
  1206. "description": "Reset a worktree branch to the primary default branch.",
  1207. "summary": "Reset worktree",
  1208. "requestBody": {
  1209. "content": {
  1210. "application/json": {
  1211. "schema": {
  1212. "$ref": "#/components/schemas/WorktreeResetInput"
  1213. }
  1214. }
  1215. }
  1216. },
  1217. "x-codeSamples": [
  1218. {
  1219. "lang": "js",
  1220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1221. }
  1222. ]
  1223. }
  1224. },
  1225. "/experimental/session": {
  1226. "get": {
  1227. "tags": ["experimental"],
  1228. "operationId": "experimental.session.list",
  1229. "parameters": [
  1230. {
  1231. "name": "directory",
  1232. "in": "query",
  1233. "schema": {
  1234. "type": "string"
  1235. },
  1236. "required": false
  1237. },
  1238. {
  1239. "name": "workspace",
  1240. "in": "query",
  1241. "schema": {
  1242. "type": "string"
  1243. },
  1244. "required": false
  1245. },
  1246. {
  1247. "name": "roots",
  1248. "in": "query",
  1249. "schema": {
  1250. "anyOf": [
  1251. {
  1252. "type": "boolean"
  1253. },
  1254. {
  1255. "type": "string",
  1256. "enum": ["true", "false"]
  1257. }
  1258. ]
  1259. },
  1260. "required": false
  1261. },
  1262. {
  1263. "name": "start",
  1264. "in": "query",
  1265. "schema": {
  1266. "type": "number"
  1267. },
  1268. "required": false
  1269. },
  1270. {
  1271. "name": "cursor",
  1272. "in": "query",
  1273. "schema": {
  1274. "type": "number"
  1275. },
  1276. "required": false
  1277. },
  1278. {
  1279. "name": "search",
  1280. "in": "query",
  1281. "schema": {
  1282. "type": "string"
  1283. },
  1284. "required": false
  1285. },
  1286. {
  1287. "name": "limit",
  1288. "in": "query",
  1289. "schema": {
  1290. "type": "number"
  1291. },
  1292. "required": false
  1293. },
  1294. {
  1295. "name": "archived",
  1296. "in": "query",
  1297. "schema": {
  1298. "anyOf": [
  1299. {
  1300. "type": "boolean"
  1301. },
  1302. {
  1303. "type": "string",
  1304. "enum": ["true", "false"]
  1305. }
  1306. ]
  1307. },
  1308. "required": false
  1309. }
  1310. ],
  1311. "responses": {
  1312. "200": {
  1313. "description": "List of sessions",
  1314. "content": {
  1315. "application/json": {
  1316. "schema": {
  1317. "type": "array",
  1318. "items": {
  1319. "$ref": "#/components/schemas/GlobalSession"
  1320. },
  1321. "description": "List of sessions"
  1322. }
  1323. }
  1324. }
  1325. }
  1326. },
  1327. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1328. "summary": "List sessions",
  1329. "x-codeSamples": [
  1330. {
  1331. "lang": "js",
  1332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1333. }
  1334. ]
  1335. }
  1336. },
  1337. "/experimental/resource": {
  1338. "get": {
  1339. "tags": ["experimental"],
  1340. "operationId": "experimental.resource.list",
  1341. "parameters": [
  1342. {
  1343. "name": "directory",
  1344. "in": "query",
  1345. "schema": {
  1346. "type": "string"
  1347. },
  1348. "required": false
  1349. },
  1350. {
  1351. "name": "workspace",
  1352. "in": "query",
  1353. "schema": {
  1354. "type": "string"
  1355. },
  1356. "required": false
  1357. }
  1358. ],
  1359. "responses": {
  1360. "200": {
  1361. "description": "MCP resources",
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "type": "object",
  1366. "additionalProperties": {
  1367. "$ref": "#/components/schemas/McpResource"
  1368. },
  1369. "description": "MCP resources"
  1370. }
  1371. }
  1372. }
  1373. }
  1374. },
  1375. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1376. "summary": "Get MCP resources",
  1377. "x-codeSamples": [
  1378. {
  1379. "lang": "js",
  1380. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1381. }
  1382. ]
  1383. }
  1384. },
  1385. "/find": {
  1386. "get": {
  1387. "tags": ["file"],
  1388. "operationId": "find.text",
  1389. "parameters": [
  1390. {
  1391. "name": "directory",
  1392. "in": "query",
  1393. "schema": {
  1394. "type": "string"
  1395. },
  1396. "required": false
  1397. },
  1398. {
  1399. "name": "workspace",
  1400. "in": "query",
  1401. "schema": {
  1402. "type": "string"
  1403. },
  1404. "required": false
  1405. },
  1406. {
  1407. "name": "pattern",
  1408. "in": "query",
  1409. "schema": {
  1410. "type": "string"
  1411. },
  1412. "required": true
  1413. }
  1414. ],
  1415. "responses": {
  1416. "200": {
  1417. "description": "Matches",
  1418. "content": {
  1419. "application/json": {
  1420. "schema": {
  1421. "type": "array",
  1422. "items": {
  1423. "type": "object",
  1424. "properties": {
  1425. "path": {
  1426. "type": "object",
  1427. "properties": {
  1428. "text": {
  1429. "type": "string"
  1430. }
  1431. },
  1432. "required": ["text"],
  1433. "additionalProperties": false
  1434. },
  1435. "lines": {
  1436. "type": "object",
  1437. "properties": {
  1438. "text": {
  1439. "type": "string"
  1440. }
  1441. },
  1442. "required": ["text"],
  1443. "additionalProperties": false
  1444. },
  1445. "line_number": {
  1446. "type": "integer",
  1447. "minimum": 0
  1448. },
  1449. "absolute_offset": {
  1450. "type": "integer",
  1451. "minimum": 0
  1452. },
  1453. "submatches": {
  1454. "type": "array",
  1455. "items": {
  1456. "type": "object",
  1457. "properties": {
  1458. "match": {
  1459. "type": "object",
  1460. "properties": {
  1461. "text": {
  1462. "type": "string"
  1463. }
  1464. },
  1465. "required": ["text"],
  1466. "additionalProperties": false
  1467. },
  1468. "start": {
  1469. "type": "integer",
  1470. "minimum": 0
  1471. },
  1472. "end": {
  1473. "type": "integer",
  1474. "minimum": 0
  1475. }
  1476. },
  1477. "required": ["match", "start", "end"],
  1478. "additionalProperties": false
  1479. }
  1480. }
  1481. },
  1482. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1483. "additionalProperties": false
  1484. },
  1485. "description": "Matches"
  1486. }
  1487. }
  1488. }
  1489. }
  1490. },
  1491. "description": "Search for text patterns across files in the project using ripgrep.",
  1492. "summary": "Find text",
  1493. "x-codeSamples": [
  1494. {
  1495. "lang": "js",
  1496. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1497. }
  1498. ]
  1499. }
  1500. },
  1501. "/find/file": {
  1502. "get": {
  1503. "tags": ["file"],
  1504. "operationId": "find.files",
  1505. "parameters": [
  1506. {
  1507. "name": "directory",
  1508. "in": "query",
  1509. "schema": {
  1510. "type": "string"
  1511. },
  1512. "required": false
  1513. },
  1514. {
  1515. "name": "workspace",
  1516. "in": "query",
  1517. "schema": {
  1518. "type": "string"
  1519. },
  1520. "required": false
  1521. },
  1522. {
  1523. "name": "query",
  1524. "in": "query",
  1525. "schema": {
  1526. "type": "string"
  1527. },
  1528. "required": true
  1529. },
  1530. {
  1531. "name": "dirs",
  1532. "in": "query",
  1533. "schema": {
  1534. "type": "string",
  1535. "enum": ["true", "false"]
  1536. },
  1537. "required": false
  1538. },
  1539. {
  1540. "name": "type",
  1541. "in": "query",
  1542. "schema": {
  1543. "type": "string",
  1544. "enum": ["file", "directory"]
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "limit",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "integer",
  1553. "minimum": 1,
  1554. "maximum": 200
  1555. },
  1556. "required": false
  1557. }
  1558. ],
  1559. "responses": {
  1560. "200": {
  1561. "description": "File paths",
  1562. "content": {
  1563. "application/json": {
  1564. "schema": {
  1565. "type": "array",
  1566. "items": {
  1567. "type": "string"
  1568. },
  1569. "description": "File paths"
  1570. }
  1571. }
  1572. }
  1573. }
  1574. },
  1575. "description": "Search for files or directories by name or pattern in the project directory.",
  1576. "summary": "Find files",
  1577. "x-codeSamples": [
  1578. {
  1579. "lang": "js",
  1580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1581. }
  1582. ]
  1583. }
  1584. },
  1585. "/find/symbol": {
  1586. "get": {
  1587. "tags": ["file"],
  1588. "operationId": "find.symbols",
  1589. "parameters": [
  1590. {
  1591. "name": "directory",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": false
  1597. },
  1598. {
  1599. "name": "workspace",
  1600. "in": "query",
  1601. "schema": {
  1602. "type": "string"
  1603. },
  1604. "required": false
  1605. },
  1606. {
  1607. "name": "query",
  1608. "in": "query",
  1609. "schema": {
  1610. "type": "string"
  1611. },
  1612. "required": true
  1613. }
  1614. ],
  1615. "responses": {
  1616. "200": {
  1617. "description": "Symbols",
  1618. "content": {
  1619. "application/json": {
  1620. "schema": {
  1621. "type": "array",
  1622. "items": {
  1623. "$ref": "#/components/schemas/Symbol"
  1624. },
  1625. "description": "Symbols"
  1626. }
  1627. }
  1628. }
  1629. }
  1630. },
  1631. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1632. "summary": "Find symbols",
  1633. "x-codeSamples": [
  1634. {
  1635. "lang": "js",
  1636. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1637. }
  1638. ]
  1639. }
  1640. },
  1641. "/file": {
  1642. "get": {
  1643. "tags": ["file"],
  1644. "operationId": "file.list",
  1645. "parameters": [
  1646. {
  1647. "name": "directory",
  1648. "in": "query",
  1649. "schema": {
  1650. "type": "string"
  1651. },
  1652. "required": false
  1653. },
  1654. {
  1655. "name": "workspace",
  1656. "in": "query",
  1657. "schema": {
  1658. "type": "string"
  1659. },
  1660. "required": false
  1661. },
  1662. {
  1663. "name": "path",
  1664. "in": "query",
  1665. "schema": {
  1666. "type": "string"
  1667. },
  1668. "required": true
  1669. }
  1670. ],
  1671. "responses": {
  1672. "200": {
  1673. "description": "Files and directories",
  1674. "content": {
  1675. "application/json": {
  1676. "schema": {
  1677. "type": "array",
  1678. "items": {
  1679. "$ref": "#/components/schemas/FileNode"
  1680. },
  1681. "description": "Files and directories"
  1682. }
  1683. }
  1684. }
  1685. }
  1686. },
  1687. "description": "List files and directories in a specified path.",
  1688. "summary": "List files",
  1689. "x-codeSamples": [
  1690. {
  1691. "lang": "js",
  1692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1693. }
  1694. ]
  1695. }
  1696. },
  1697. "/file/content": {
  1698. "get": {
  1699. "tags": ["file"],
  1700. "operationId": "file.read",
  1701. "parameters": [
  1702. {
  1703. "name": "directory",
  1704. "in": "query",
  1705. "schema": {
  1706. "type": "string"
  1707. },
  1708. "required": false
  1709. },
  1710. {
  1711. "name": "workspace",
  1712. "in": "query",
  1713. "schema": {
  1714. "type": "string"
  1715. },
  1716. "required": false
  1717. },
  1718. {
  1719. "name": "path",
  1720. "in": "query",
  1721. "schema": {
  1722. "type": "string"
  1723. },
  1724. "required": true
  1725. }
  1726. ],
  1727. "responses": {
  1728. "200": {
  1729. "description": "File content",
  1730. "content": {
  1731. "application/json": {
  1732. "schema": {
  1733. "$ref": "#/components/schemas/FileContent"
  1734. }
  1735. }
  1736. }
  1737. }
  1738. },
  1739. "description": "Read the content of a specified file.",
  1740. "summary": "Read file",
  1741. "x-codeSamples": [
  1742. {
  1743. "lang": "js",
  1744. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1745. }
  1746. ]
  1747. }
  1748. },
  1749. "/file/status": {
  1750. "get": {
  1751. "tags": ["file"],
  1752. "operationId": "file.status",
  1753. "parameters": [
  1754. {
  1755. "name": "directory",
  1756. "in": "query",
  1757. "schema": {
  1758. "type": "string"
  1759. },
  1760. "required": false
  1761. },
  1762. {
  1763. "name": "workspace",
  1764. "in": "query",
  1765. "schema": {
  1766. "type": "string"
  1767. },
  1768. "required": false
  1769. }
  1770. ],
  1771. "responses": {
  1772. "200": {
  1773. "description": "File status",
  1774. "content": {
  1775. "application/json": {
  1776. "schema": {
  1777. "type": "array",
  1778. "items": {
  1779. "$ref": "#/components/schemas/File"
  1780. },
  1781. "description": "File status"
  1782. }
  1783. }
  1784. }
  1785. }
  1786. },
  1787. "description": "Get the git status of all files in the project.",
  1788. "summary": "Get file status",
  1789. "x-codeSamples": [
  1790. {
  1791. "lang": "js",
  1792. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  1793. }
  1794. ]
  1795. }
  1796. },
  1797. "/instance/dispose": {
  1798. "post": {
  1799. "tags": ["instance"],
  1800. "operationId": "instance.dispose",
  1801. "parameters": [
  1802. {
  1803. "name": "directory",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "workspace",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": false
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Instance disposed",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "boolean",
  1826. "description": "Instance disposed"
  1827. }
  1828. }
  1829. }
  1830. }
  1831. },
  1832. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  1833. "summary": "Dispose instance",
  1834. "x-codeSamples": [
  1835. {
  1836. "lang": "js",
  1837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  1838. }
  1839. ]
  1840. }
  1841. },
  1842. "/path": {
  1843. "get": {
  1844. "tags": ["instance"],
  1845. "operationId": "path.get",
  1846. "parameters": [
  1847. {
  1848. "name": "directory",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": false
  1854. },
  1855. {
  1856. "name": "workspace",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string"
  1860. },
  1861. "required": false
  1862. }
  1863. ],
  1864. "responses": {
  1865. "200": {
  1866. "description": "Path",
  1867. "content": {
  1868. "application/json": {
  1869. "schema": {
  1870. "$ref": "#/components/schemas/Path"
  1871. }
  1872. }
  1873. }
  1874. }
  1875. },
  1876. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  1877. "summary": "Get paths",
  1878. "x-codeSamples": [
  1879. {
  1880. "lang": "js",
  1881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  1882. }
  1883. ]
  1884. }
  1885. },
  1886. "/vcs": {
  1887. "get": {
  1888. "tags": ["instance"],
  1889. "operationId": "vcs.get",
  1890. "parameters": [
  1891. {
  1892. "name": "directory",
  1893. "in": "query",
  1894. "schema": {
  1895. "type": "string"
  1896. },
  1897. "required": false
  1898. },
  1899. {
  1900. "name": "workspace",
  1901. "in": "query",
  1902. "schema": {
  1903. "type": "string"
  1904. },
  1905. "required": false
  1906. }
  1907. ],
  1908. "responses": {
  1909. "200": {
  1910. "description": "VCS info",
  1911. "content": {
  1912. "application/json": {
  1913. "schema": {
  1914. "$ref": "#/components/schemas/VcsInfo"
  1915. }
  1916. }
  1917. }
  1918. }
  1919. },
  1920. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  1921. "summary": "Get VCS info",
  1922. "x-codeSamples": [
  1923. {
  1924. "lang": "js",
  1925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  1926. }
  1927. ]
  1928. }
  1929. },
  1930. "/vcs/status": {
  1931. "get": {
  1932. "tags": ["instance"],
  1933. "operationId": "vcs.status",
  1934. "parameters": [
  1935. {
  1936. "name": "directory",
  1937. "in": "query",
  1938. "schema": {
  1939. "type": "string"
  1940. },
  1941. "required": false
  1942. },
  1943. {
  1944. "name": "workspace",
  1945. "in": "query",
  1946. "schema": {
  1947. "type": "string"
  1948. },
  1949. "required": false
  1950. }
  1951. ],
  1952. "responses": {
  1953. "200": {
  1954. "description": "VCS status",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "type": "array",
  1959. "items": {
  1960. "$ref": "#/components/schemas/VcsFileStatus"
  1961. },
  1962. "description": "VCS status"
  1963. }
  1964. }
  1965. }
  1966. }
  1967. },
  1968. "description": "Retrieve changed files in the current working tree without patches.",
  1969. "summary": "Get VCS status",
  1970. "x-codeSamples": [
  1971. {
  1972. "lang": "js",
  1973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  1974. }
  1975. ]
  1976. }
  1977. },
  1978. "/vcs/diff": {
  1979. "get": {
  1980. "tags": ["instance"],
  1981. "operationId": "vcs.diff",
  1982. "parameters": [
  1983. {
  1984. "name": "directory",
  1985. "in": "query",
  1986. "schema": {
  1987. "type": "string"
  1988. },
  1989. "required": false
  1990. },
  1991. {
  1992. "name": "workspace",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "mode",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string",
  2004. "enum": ["git", "branch"]
  2005. },
  2006. "required": true
  2007. }
  2008. ],
  2009. "responses": {
  2010. "200": {
  2011. "description": "VCS diff",
  2012. "content": {
  2013. "application/json": {
  2014. "schema": {
  2015. "type": "array",
  2016. "items": {
  2017. "$ref": "#/components/schemas/VcsFileDiff"
  2018. },
  2019. "description": "VCS diff"
  2020. }
  2021. }
  2022. }
  2023. }
  2024. },
  2025. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2026. "summary": "Get VCS diff",
  2027. "x-codeSamples": [
  2028. {
  2029. "lang": "js",
  2030. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2031. }
  2032. ]
  2033. }
  2034. },
  2035. "/vcs/diff/raw": {
  2036. "get": {
  2037. "tags": ["instance"],
  2038. "operationId": "vcs.diff.raw",
  2039. "parameters": [
  2040. {
  2041. "name": "directory",
  2042. "in": "query",
  2043. "schema": {
  2044. "type": "string"
  2045. },
  2046. "required": false
  2047. },
  2048. {
  2049. "name": "workspace",
  2050. "in": "query",
  2051. "schema": {
  2052. "type": "string"
  2053. },
  2054. "required": false
  2055. }
  2056. ],
  2057. "responses": {
  2058. "200": {
  2059. "description": "Raw VCS diff",
  2060. "content": {
  2061. "text/x-diff; charset=utf-8": {
  2062. "schema": {
  2063. "type": "string"
  2064. }
  2065. }
  2066. }
  2067. }
  2068. },
  2069. "description": "Retrieve a raw patch for current uncommitted changes.",
  2070. "summary": "Get raw VCS diff",
  2071. "x-codeSamples": [
  2072. {
  2073. "lang": "js",
  2074. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2075. }
  2076. ]
  2077. }
  2078. },
  2079. "/vcs/apply": {
  2080. "post": {
  2081. "tags": ["instance"],
  2082. "operationId": "vcs.apply",
  2083. "parameters": [
  2084. {
  2085. "name": "directory",
  2086. "in": "query",
  2087. "schema": {
  2088. "type": "string"
  2089. },
  2090. "required": false
  2091. },
  2092. {
  2093. "name": "workspace",
  2094. "in": "query",
  2095. "schema": {
  2096. "type": "string"
  2097. },
  2098. "required": false
  2099. }
  2100. ],
  2101. "responses": {
  2102. "200": {
  2103. "description": "VCS patch applied",
  2104. "content": {
  2105. "application/json": {
  2106. "schema": {
  2107. "type": "object",
  2108. "properties": {
  2109. "applied": {
  2110. "type": "boolean"
  2111. }
  2112. },
  2113. "required": ["applied"],
  2114. "additionalProperties": false,
  2115. "description": "VCS patch applied"
  2116. }
  2117. }
  2118. }
  2119. },
  2120. "400": {
  2121. "description": "VcsApplyError",
  2122. "content": {
  2123. "application/json": {
  2124. "schema": {
  2125. "$ref": "#/components/schemas/VcsApplyError"
  2126. }
  2127. }
  2128. }
  2129. }
  2130. },
  2131. "description": "Apply a raw patch to the current working tree.",
  2132. "summary": "Apply VCS patch",
  2133. "requestBody": {
  2134. "content": {
  2135. "application/json": {
  2136. "schema": {
  2137. "type": "object",
  2138. "properties": {
  2139. "patch": {
  2140. "type": "string"
  2141. }
  2142. },
  2143. "required": ["patch"],
  2144. "additionalProperties": false
  2145. }
  2146. }
  2147. }
  2148. },
  2149. "x-codeSamples": [
  2150. {
  2151. "lang": "js",
  2152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2153. }
  2154. ]
  2155. }
  2156. },
  2157. "/command": {
  2158. "get": {
  2159. "tags": ["instance"],
  2160. "operationId": "command.list",
  2161. "parameters": [
  2162. {
  2163. "name": "directory",
  2164. "in": "query",
  2165. "schema": {
  2166. "type": "string"
  2167. },
  2168. "required": false
  2169. },
  2170. {
  2171. "name": "workspace",
  2172. "in": "query",
  2173. "schema": {
  2174. "type": "string"
  2175. },
  2176. "required": false
  2177. }
  2178. ],
  2179. "responses": {
  2180. "200": {
  2181. "description": "List of commands",
  2182. "content": {
  2183. "application/json": {
  2184. "schema": {
  2185. "type": "array",
  2186. "items": {
  2187. "$ref": "#/components/schemas/Command"
  2188. },
  2189. "description": "List of commands"
  2190. }
  2191. }
  2192. }
  2193. }
  2194. },
  2195. "description": "Get a list of all available commands in the OpenCode system.",
  2196. "summary": "List commands",
  2197. "x-codeSamples": [
  2198. {
  2199. "lang": "js",
  2200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2201. }
  2202. ]
  2203. }
  2204. },
  2205. "/agent": {
  2206. "get": {
  2207. "tags": ["instance"],
  2208. "operationId": "app.agents",
  2209. "parameters": [
  2210. {
  2211. "name": "directory",
  2212. "in": "query",
  2213. "schema": {
  2214. "type": "string"
  2215. },
  2216. "required": false
  2217. },
  2218. {
  2219. "name": "workspace",
  2220. "in": "query",
  2221. "schema": {
  2222. "type": "string"
  2223. },
  2224. "required": false
  2225. }
  2226. ],
  2227. "responses": {
  2228. "200": {
  2229. "description": "List of agents",
  2230. "content": {
  2231. "application/json": {
  2232. "schema": {
  2233. "type": "array",
  2234. "items": {
  2235. "$ref": "#/components/schemas/Agent"
  2236. },
  2237. "description": "List of agents"
  2238. }
  2239. }
  2240. }
  2241. }
  2242. },
  2243. "description": "Get a list of all available AI agents in the OpenCode system.",
  2244. "summary": "List agents",
  2245. "x-codeSamples": [
  2246. {
  2247. "lang": "js",
  2248. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2249. }
  2250. ]
  2251. }
  2252. },
  2253. "/skill": {
  2254. "get": {
  2255. "tags": ["instance"],
  2256. "operationId": "app.skills",
  2257. "parameters": [
  2258. {
  2259. "name": "directory",
  2260. "in": "query",
  2261. "schema": {
  2262. "type": "string"
  2263. },
  2264. "required": false
  2265. },
  2266. {
  2267. "name": "workspace",
  2268. "in": "query",
  2269. "schema": {
  2270. "type": "string"
  2271. },
  2272. "required": false
  2273. }
  2274. ],
  2275. "responses": {
  2276. "200": {
  2277. "description": "List of skills",
  2278. "content": {
  2279. "application/json": {
  2280. "schema": {
  2281. "type": "array",
  2282. "items": {
  2283. "type": "object",
  2284. "properties": {
  2285. "name": {
  2286. "type": "string"
  2287. },
  2288. "description": {
  2289. "type": "string"
  2290. },
  2291. "location": {
  2292. "type": "string"
  2293. },
  2294. "content": {
  2295. "type": "string"
  2296. }
  2297. },
  2298. "required": ["name", "location", "content"],
  2299. "additionalProperties": false
  2300. },
  2301. "description": "List of skills"
  2302. }
  2303. }
  2304. }
  2305. }
  2306. },
  2307. "description": "Get a list of all available skills in the OpenCode system.",
  2308. "summary": "List skills",
  2309. "x-codeSamples": [
  2310. {
  2311. "lang": "js",
  2312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2313. }
  2314. ]
  2315. }
  2316. },
  2317. "/lsp": {
  2318. "get": {
  2319. "tags": ["instance"],
  2320. "operationId": "lsp.status",
  2321. "parameters": [
  2322. {
  2323. "name": "directory",
  2324. "in": "query",
  2325. "schema": {
  2326. "type": "string"
  2327. },
  2328. "required": false
  2329. },
  2330. {
  2331. "name": "workspace",
  2332. "in": "query",
  2333. "schema": {
  2334. "type": "string"
  2335. },
  2336. "required": false
  2337. }
  2338. ],
  2339. "responses": {
  2340. "200": {
  2341. "description": "LSP server status",
  2342. "content": {
  2343. "application/json": {
  2344. "schema": {
  2345. "type": "array",
  2346. "items": {
  2347. "$ref": "#/components/schemas/LSPStatus"
  2348. },
  2349. "description": "LSP server status"
  2350. }
  2351. }
  2352. }
  2353. }
  2354. },
  2355. "description": "Get LSP server status",
  2356. "summary": "Get LSP status",
  2357. "x-codeSamples": [
  2358. {
  2359. "lang": "js",
  2360. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2361. }
  2362. ]
  2363. }
  2364. },
  2365. "/formatter": {
  2366. "get": {
  2367. "tags": ["instance"],
  2368. "operationId": "formatter.status",
  2369. "parameters": [
  2370. {
  2371. "name": "directory",
  2372. "in": "query",
  2373. "schema": {
  2374. "type": "string"
  2375. },
  2376. "required": false
  2377. },
  2378. {
  2379. "name": "workspace",
  2380. "in": "query",
  2381. "schema": {
  2382. "type": "string"
  2383. },
  2384. "required": false
  2385. }
  2386. ],
  2387. "responses": {
  2388. "200": {
  2389. "description": "Formatter status",
  2390. "content": {
  2391. "application/json": {
  2392. "schema": {
  2393. "type": "array",
  2394. "items": {
  2395. "$ref": "#/components/schemas/FormatterStatus"
  2396. },
  2397. "description": "Formatter status"
  2398. }
  2399. }
  2400. }
  2401. }
  2402. },
  2403. "description": "Get formatter status",
  2404. "summary": "Get formatter status",
  2405. "x-codeSamples": [
  2406. {
  2407. "lang": "js",
  2408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2409. }
  2410. ]
  2411. }
  2412. },
  2413. "/mcp": {
  2414. "get": {
  2415. "tags": ["mcp"],
  2416. "operationId": "mcp.status",
  2417. "parameters": [
  2418. {
  2419. "name": "directory",
  2420. "in": "query",
  2421. "schema": {
  2422. "type": "string"
  2423. },
  2424. "required": false
  2425. },
  2426. {
  2427. "name": "workspace",
  2428. "in": "query",
  2429. "schema": {
  2430. "type": "string"
  2431. },
  2432. "required": false
  2433. }
  2434. ],
  2435. "responses": {
  2436. "200": {
  2437. "description": "MCP server status",
  2438. "content": {
  2439. "application/json": {
  2440. "schema": {
  2441. "type": "object",
  2442. "additionalProperties": {
  2443. "$ref": "#/components/schemas/MCPStatus"
  2444. },
  2445. "description": "MCP server status"
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2452. "summary": "Get MCP status",
  2453. "x-codeSamples": [
  2454. {
  2455. "lang": "js",
  2456. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2457. }
  2458. ]
  2459. },
  2460. "post": {
  2461. "tags": ["mcp"],
  2462. "operationId": "mcp.add",
  2463. "parameters": [
  2464. {
  2465. "name": "directory",
  2466. "in": "query",
  2467. "schema": {
  2468. "type": "string"
  2469. },
  2470. "required": false
  2471. },
  2472. {
  2473. "name": "workspace",
  2474. "in": "query",
  2475. "schema": {
  2476. "type": "string"
  2477. },
  2478. "required": false
  2479. }
  2480. ],
  2481. "responses": {
  2482. "200": {
  2483. "description": "MCP server added successfully",
  2484. "content": {
  2485. "application/json": {
  2486. "schema": {
  2487. "type": "object",
  2488. "additionalProperties": {
  2489. "$ref": "#/components/schemas/MCPStatus"
  2490. },
  2491. "description": "MCP server added successfully"
  2492. }
  2493. }
  2494. }
  2495. },
  2496. "400": {
  2497. "description": "Bad request",
  2498. "content": {
  2499. "application/json": {
  2500. "schema": {
  2501. "$ref": "#/components/schemas/BadRequestError"
  2502. }
  2503. }
  2504. }
  2505. }
  2506. },
  2507. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2508. "summary": "Add MCP server",
  2509. "requestBody": {
  2510. "content": {
  2511. "application/json": {
  2512. "schema": {
  2513. "type": "object",
  2514. "properties": {
  2515. "name": {
  2516. "type": "string"
  2517. },
  2518. "config": {
  2519. "anyOf": [
  2520. {
  2521. "$ref": "#/components/schemas/McpLocalConfig"
  2522. },
  2523. {
  2524. "$ref": "#/components/schemas/McpRemoteConfig"
  2525. }
  2526. ]
  2527. }
  2528. },
  2529. "required": ["name", "config"],
  2530. "additionalProperties": false
  2531. }
  2532. }
  2533. }
  2534. },
  2535. "x-codeSamples": [
  2536. {
  2537. "lang": "js",
  2538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2539. }
  2540. ]
  2541. }
  2542. },
  2543. "/mcp/{name}/auth": {
  2544. "post": {
  2545. "tags": ["mcp"],
  2546. "operationId": "mcp.auth.start",
  2547. "parameters": [
  2548. {
  2549. "name": "name",
  2550. "in": "path",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": true
  2555. },
  2556. {
  2557. "name": "directory",
  2558. "in": "query",
  2559. "schema": {
  2560. "type": "string"
  2561. },
  2562. "required": false
  2563. },
  2564. {
  2565. "name": "workspace",
  2566. "in": "query",
  2567. "schema": {
  2568. "type": "string"
  2569. },
  2570. "required": false
  2571. }
  2572. ],
  2573. "responses": {
  2574. "200": {
  2575. "description": "OAuth flow started",
  2576. "content": {
  2577. "application/json": {
  2578. "schema": {
  2579. "type": "object",
  2580. "properties": {
  2581. "authorizationUrl": {
  2582. "type": "string"
  2583. },
  2584. "oauthState": {
  2585. "type": "string"
  2586. }
  2587. },
  2588. "required": ["authorizationUrl", "oauthState"],
  2589. "additionalProperties": false,
  2590. "description": "OAuth flow started"
  2591. }
  2592. }
  2593. }
  2594. },
  2595. "400": {
  2596. "description": "McpUnsupportedOAuthError",
  2597. "content": {
  2598. "application/json": {
  2599. "schema": {
  2600. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2601. }
  2602. }
  2603. }
  2604. },
  2605. "404": {
  2606. "description": "Not found",
  2607. "content": {
  2608. "application/json": {
  2609. "schema": {
  2610. "$ref": "#/components/schemas/NotFoundError"
  2611. }
  2612. }
  2613. }
  2614. }
  2615. },
  2616. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  2617. "summary": "Start MCP OAuth",
  2618. "x-codeSamples": [
  2619. {
  2620. "lang": "js",
  2621. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  2622. }
  2623. ]
  2624. },
  2625. "delete": {
  2626. "tags": ["mcp"],
  2627. "operationId": "mcp.auth.remove",
  2628. "parameters": [
  2629. {
  2630. "name": "name",
  2631. "in": "path",
  2632. "schema": {
  2633. "type": "string"
  2634. },
  2635. "required": true
  2636. },
  2637. {
  2638. "name": "directory",
  2639. "in": "query",
  2640. "schema": {
  2641. "type": "string"
  2642. },
  2643. "required": false
  2644. },
  2645. {
  2646. "name": "workspace",
  2647. "in": "query",
  2648. "schema": {
  2649. "type": "string"
  2650. },
  2651. "required": false
  2652. }
  2653. ],
  2654. "responses": {
  2655. "200": {
  2656. "description": "OAuth credentials removed",
  2657. "content": {
  2658. "application/json": {
  2659. "schema": {
  2660. "type": "object",
  2661. "properties": {
  2662. "success": {
  2663. "type": "boolean",
  2664. "enum": [true]
  2665. }
  2666. },
  2667. "required": ["success"],
  2668. "additionalProperties": false,
  2669. "description": "OAuth credentials removed"
  2670. }
  2671. }
  2672. }
  2673. },
  2674. "404": {
  2675. "description": "Not found",
  2676. "content": {
  2677. "application/json": {
  2678. "schema": {
  2679. "$ref": "#/components/schemas/NotFoundError"
  2680. }
  2681. }
  2682. }
  2683. }
  2684. },
  2685. "description": "Remove OAuth credentials for an MCP server.",
  2686. "summary": "Remove MCP OAuth",
  2687. "x-codeSamples": [
  2688. {
  2689. "lang": "js",
  2690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  2691. }
  2692. ]
  2693. }
  2694. },
  2695. "/mcp/{name}/auth/callback": {
  2696. "post": {
  2697. "tags": ["mcp"],
  2698. "operationId": "mcp.auth.callback",
  2699. "parameters": [
  2700. {
  2701. "name": "name",
  2702. "in": "path",
  2703. "schema": {
  2704. "type": "string"
  2705. },
  2706. "required": true
  2707. },
  2708. {
  2709. "name": "directory",
  2710. "in": "query",
  2711. "schema": {
  2712. "type": "string"
  2713. },
  2714. "required": false
  2715. },
  2716. {
  2717. "name": "workspace",
  2718. "in": "query",
  2719. "schema": {
  2720. "type": "string"
  2721. },
  2722. "required": false
  2723. }
  2724. ],
  2725. "responses": {
  2726. "200": {
  2727. "description": "OAuth authentication completed",
  2728. "content": {
  2729. "application/json": {
  2730. "schema": {
  2731. "$ref": "#/components/schemas/MCPStatus"
  2732. }
  2733. }
  2734. }
  2735. },
  2736. "400": {
  2737. "description": "Bad request",
  2738. "content": {
  2739. "application/json": {
  2740. "schema": {
  2741. "$ref": "#/components/schemas/BadRequestError"
  2742. }
  2743. }
  2744. }
  2745. },
  2746. "404": {
  2747. "description": "Not found",
  2748. "content": {
  2749. "application/json": {
  2750. "schema": {
  2751. "$ref": "#/components/schemas/NotFoundError"
  2752. }
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  2758. "summary": "Complete MCP OAuth",
  2759. "requestBody": {
  2760. "content": {
  2761. "application/json": {
  2762. "schema": {
  2763. "type": "object",
  2764. "properties": {
  2765. "code": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["code"],
  2770. "additionalProperties": false
  2771. }
  2772. }
  2773. }
  2774. },
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp/{name}/auth/authenticate": {
  2784. "post": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.auth.authenticate",
  2787. "parameters": [
  2788. {
  2789. "name": "name",
  2790. "in": "path",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": true
  2795. },
  2796. {
  2797. "name": "directory",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. },
  2804. {
  2805. "name": "workspace",
  2806. "in": "query",
  2807. "schema": {
  2808. "type": "string"
  2809. },
  2810. "required": false
  2811. }
  2812. ],
  2813. "responses": {
  2814. "200": {
  2815. "description": "OAuth authentication completed",
  2816. "content": {
  2817. "application/json": {
  2818. "schema": {
  2819. "$ref": "#/components/schemas/MCPStatus"
  2820. }
  2821. }
  2822. }
  2823. },
  2824. "400": {
  2825. "description": "McpUnsupportedOAuthError",
  2826. "content": {
  2827. "application/json": {
  2828. "schema": {
  2829. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2830. }
  2831. }
  2832. }
  2833. },
  2834. "404": {
  2835. "description": "Not found",
  2836. "content": {
  2837. "application/json": {
  2838. "schema": {
  2839. "$ref": "#/components/schemas/NotFoundError"
  2840. }
  2841. }
  2842. }
  2843. }
  2844. },
  2845. "description": "Start OAuth flow and wait for callback (opens browser).",
  2846. "summary": "Authenticate MCP OAuth",
  2847. "x-codeSamples": [
  2848. {
  2849. "lang": "js",
  2850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  2851. }
  2852. ]
  2853. }
  2854. },
  2855. "/mcp/{name}/connect": {
  2856. "post": {
  2857. "tags": ["mcp"],
  2858. "operationId": "mcp.connect",
  2859. "parameters": [
  2860. {
  2861. "name": "name",
  2862. "in": "path",
  2863. "schema": {
  2864. "type": "string"
  2865. },
  2866. "required": true
  2867. },
  2868. {
  2869. "name": "directory",
  2870. "in": "query",
  2871. "schema": {
  2872. "type": "string"
  2873. },
  2874. "required": false
  2875. },
  2876. {
  2877. "name": "workspace",
  2878. "in": "query",
  2879. "schema": {
  2880. "type": "string"
  2881. },
  2882. "required": false
  2883. }
  2884. ],
  2885. "responses": {
  2886. "200": {
  2887. "description": "MCP server connected successfully",
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "boolean",
  2892. "description": "MCP server connected successfully"
  2893. }
  2894. }
  2895. }
  2896. }
  2897. },
  2898. "description": "Connect an MCP server.",
  2899. "x-codeSamples": [
  2900. {
  2901. "lang": "js",
  2902. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "/mcp/{name}/disconnect": {
  2908. "post": {
  2909. "tags": ["mcp"],
  2910. "operationId": "mcp.disconnect",
  2911. "parameters": [
  2912. {
  2913. "name": "name",
  2914. "in": "path",
  2915. "schema": {
  2916. "type": "string"
  2917. },
  2918. "required": true
  2919. },
  2920. {
  2921. "name": "directory",
  2922. "in": "query",
  2923. "schema": {
  2924. "type": "string"
  2925. },
  2926. "required": false
  2927. },
  2928. {
  2929. "name": "workspace",
  2930. "in": "query",
  2931. "schema": {
  2932. "type": "string"
  2933. },
  2934. "required": false
  2935. }
  2936. ],
  2937. "responses": {
  2938. "200": {
  2939. "description": "MCP server disconnected successfully",
  2940. "content": {
  2941. "application/json": {
  2942. "schema": {
  2943. "type": "boolean",
  2944. "description": "MCP server disconnected successfully"
  2945. }
  2946. }
  2947. }
  2948. }
  2949. },
  2950. "description": "Disconnect an MCP server.",
  2951. "x-codeSamples": [
  2952. {
  2953. "lang": "js",
  2954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  2955. }
  2956. ]
  2957. }
  2958. },
  2959. "/project": {
  2960. "get": {
  2961. "tags": ["project"],
  2962. "operationId": "project.list",
  2963. "parameters": [
  2964. {
  2965. "name": "directory",
  2966. "in": "query",
  2967. "schema": {
  2968. "type": "string"
  2969. },
  2970. "required": false
  2971. },
  2972. {
  2973. "name": "workspace",
  2974. "in": "query",
  2975. "schema": {
  2976. "type": "string"
  2977. },
  2978. "required": false
  2979. }
  2980. ],
  2981. "responses": {
  2982. "200": {
  2983. "description": "List of projects",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "type": "array",
  2988. "items": {
  2989. "$ref": "#/components/schemas/Project"
  2990. },
  2991. "description": "List of projects"
  2992. }
  2993. }
  2994. }
  2995. }
  2996. },
  2997. "description": "Get a list of projects that have been opened with OpenCode.",
  2998. "summary": "List all projects",
  2999. "x-codeSamples": [
  3000. {
  3001. "lang": "js",
  3002. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3003. }
  3004. ]
  3005. }
  3006. },
  3007. "/project/current": {
  3008. "get": {
  3009. "tags": ["project"],
  3010. "operationId": "project.current",
  3011. "parameters": [
  3012. {
  3013. "name": "directory",
  3014. "in": "query",
  3015. "schema": {
  3016. "type": "string"
  3017. },
  3018. "required": false
  3019. },
  3020. {
  3021. "name": "workspace",
  3022. "in": "query",
  3023. "schema": {
  3024. "type": "string"
  3025. },
  3026. "required": false
  3027. }
  3028. ],
  3029. "responses": {
  3030. "200": {
  3031. "description": "Current project information",
  3032. "content": {
  3033. "application/json": {
  3034. "schema": {
  3035. "$ref": "#/components/schemas/Project"
  3036. }
  3037. }
  3038. }
  3039. }
  3040. },
  3041. "description": "Retrieve the currently active project that OpenCode is working with.",
  3042. "summary": "Get current project",
  3043. "x-codeSamples": [
  3044. {
  3045. "lang": "js",
  3046. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3047. }
  3048. ]
  3049. }
  3050. },
  3051. "/project/git/init": {
  3052. "post": {
  3053. "tags": ["project"],
  3054. "operationId": "project.initGit",
  3055. "parameters": [
  3056. {
  3057. "name": "directory",
  3058. "in": "query",
  3059. "schema": {
  3060. "type": "string"
  3061. },
  3062. "required": false
  3063. },
  3064. {
  3065. "name": "workspace",
  3066. "in": "query",
  3067. "schema": {
  3068. "type": "string"
  3069. },
  3070. "required": false
  3071. }
  3072. ],
  3073. "responses": {
  3074. "200": {
  3075. "description": "Project information after git initialization",
  3076. "content": {
  3077. "application/json": {
  3078. "schema": {
  3079. "$ref": "#/components/schemas/Project"
  3080. }
  3081. }
  3082. }
  3083. }
  3084. },
  3085. "description": "Create a git repository for the current project and return the refreshed project info.",
  3086. "summary": "Initialize git repository",
  3087. "x-codeSamples": [
  3088. {
  3089. "lang": "js",
  3090. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3091. }
  3092. ]
  3093. }
  3094. },
  3095. "/project/{projectID}": {
  3096. "patch": {
  3097. "tags": ["project"],
  3098. "operationId": "project.update",
  3099. "parameters": [
  3100. {
  3101. "name": "projectID",
  3102. "in": "path",
  3103. "schema": {
  3104. "type": "string"
  3105. },
  3106. "required": true
  3107. },
  3108. {
  3109. "name": "directory",
  3110. "in": "query",
  3111. "schema": {
  3112. "type": "string"
  3113. },
  3114. "required": false
  3115. },
  3116. {
  3117. "name": "workspace",
  3118. "in": "query",
  3119. "schema": {
  3120. "type": "string"
  3121. },
  3122. "required": false
  3123. }
  3124. ],
  3125. "responses": {
  3126. "200": {
  3127. "description": "Updated project information",
  3128. "content": {
  3129. "application/json": {
  3130. "schema": {
  3131. "$ref": "#/components/schemas/Project"
  3132. }
  3133. }
  3134. }
  3135. },
  3136. "400": {
  3137. "description": "Bad request",
  3138. "content": {
  3139. "application/json": {
  3140. "schema": {
  3141. "$ref": "#/components/schemas/BadRequestError"
  3142. }
  3143. }
  3144. }
  3145. },
  3146. "404": {
  3147. "description": "Not found",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "$ref": "#/components/schemas/NotFoundError"
  3152. }
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "description": "Update project properties such as name, icon, and commands.",
  3158. "summary": "Update project",
  3159. "requestBody": {
  3160. "content": {
  3161. "application/json": {
  3162. "schema": {
  3163. "type": "object",
  3164. "properties": {
  3165. "name": {
  3166. "type": "string"
  3167. },
  3168. "icon": {
  3169. "type": "object",
  3170. "properties": {
  3171. "url": {
  3172. "type": "string"
  3173. },
  3174. "override": {
  3175. "type": "string"
  3176. },
  3177. "color": {
  3178. "type": "string"
  3179. }
  3180. },
  3181. "additionalProperties": false
  3182. },
  3183. "commands": {
  3184. "type": "object",
  3185. "properties": {
  3186. "start": {
  3187. "type": "string",
  3188. "description": "Startup script to run when creating a new workspace (worktree)"
  3189. }
  3190. },
  3191. "additionalProperties": false
  3192. }
  3193. },
  3194. "additionalProperties": false
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "x-codeSamples": [
  3200. {
  3201. "lang": "js",
  3202. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3203. }
  3204. ]
  3205. }
  3206. },
  3207. "/pty/shells": {
  3208. "get": {
  3209. "tags": ["pty"],
  3210. "operationId": "pty.shells",
  3211. "parameters": [
  3212. {
  3213. "name": "directory",
  3214. "in": "query",
  3215. "schema": {
  3216. "type": "string"
  3217. },
  3218. "required": false
  3219. },
  3220. {
  3221. "name": "workspace",
  3222. "in": "query",
  3223. "schema": {
  3224. "type": "string"
  3225. },
  3226. "required": false
  3227. }
  3228. ],
  3229. "responses": {
  3230. "200": {
  3231. "description": "List of shells",
  3232. "content": {
  3233. "application/json": {
  3234. "schema": {
  3235. "type": "array",
  3236. "items": {
  3237. "type": "object",
  3238. "properties": {
  3239. "path": {
  3240. "type": "string"
  3241. },
  3242. "name": {
  3243. "type": "string"
  3244. },
  3245. "acceptable": {
  3246. "type": "boolean"
  3247. }
  3248. },
  3249. "required": ["path", "name", "acceptable"],
  3250. "additionalProperties": false
  3251. },
  3252. "description": "List of shells"
  3253. }
  3254. }
  3255. }
  3256. }
  3257. },
  3258. "description": "Get a list of available shells on the system.",
  3259. "summary": "List available shells",
  3260. "x-codeSamples": [
  3261. {
  3262. "lang": "js",
  3263. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3264. }
  3265. ]
  3266. }
  3267. },
  3268. "/pty": {
  3269. "get": {
  3270. "tags": ["pty"],
  3271. "operationId": "pty.list",
  3272. "parameters": [
  3273. {
  3274. "name": "directory",
  3275. "in": "query",
  3276. "schema": {
  3277. "type": "string"
  3278. },
  3279. "required": false
  3280. },
  3281. {
  3282. "name": "workspace",
  3283. "in": "query",
  3284. "schema": {
  3285. "type": "string"
  3286. },
  3287. "required": false
  3288. }
  3289. ],
  3290. "responses": {
  3291. "200": {
  3292. "description": "List of sessions",
  3293. "content": {
  3294. "application/json": {
  3295. "schema": {
  3296. "type": "array",
  3297. "items": {
  3298. "$ref": "#/components/schemas/Pty"
  3299. },
  3300. "description": "List of sessions"
  3301. }
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3307. "summary": "List PTY sessions",
  3308. "x-codeSamples": [
  3309. {
  3310. "lang": "js",
  3311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3312. }
  3313. ]
  3314. },
  3315. "post": {
  3316. "tags": ["pty"],
  3317. "operationId": "pty.create",
  3318. "parameters": [
  3319. {
  3320. "name": "directory",
  3321. "in": "query",
  3322. "schema": {
  3323. "type": "string"
  3324. },
  3325. "required": false
  3326. },
  3327. {
  3328. "name": "workspace",
  3329. "in": "query",
  3330. "schema": {
  3331. "type": "string"
  3332. },
  3333. "required": false
  3334. }
  3335. ],
  3336. "responses": {
  3337. "200": {
  3338. "description": "Created session",
  3339. "content": {
  3340. "application/json": {
  3341. "schema": {
  3342. "$ref": "#/components/schemas/Pty"
  3343. }
  3344. }
  3345. }
  3346. },
  3347. "400": {
  3348. "description": "Bad request",
  3349. "content": {
  3350. "application/json": {
  3351. "schema": {
  3352. "$ref": "#/components/schemas/BadRequestError"
  3353. }
  3354. }
  3355. }
  3356. }
  3357. },
  3358. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3359. "summary": "Create PTY session",
  3360. "requestBody": {
  3361. "content": {
  3362. "application/json": {
  3363. "schema": {
  3364. "type": "object",
  3365. "properties": {
  3366. "command": {
  3367. "type": "string"
  3368. },
  3369. "args": {
  3370. "type": "array",
  3371. "items": {
  3372. "type": "string"
  3373. }
  3374. },
  3375. "cwd": {
  3376. "type": "string"
  3377. },
  3378. "title": {
  3379. "type": "string"
  3380. },
  3381. "env": {
  3382. "type": "object",
  3383. "additionalProperties": {
  3384. "type": "string"
  3385. }
  3386. }
  3387. },
  3388. "additionalProperties": false
  3389. }
  3390. }
  3391. }
  3392. },
  3393. "x-codeSamples": [
  3394. {
  3395. "lang": "js",
  3396. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3397. }
  3398. ]
  3399. }
  3400. },
  3401. "/pty/{ptyID}": {
  3402. "get": {
  3403. "tags": ["pty"],
  3404. "operationId": "pty.get",
  3405. "parameters": [
  3406. {
  3407. "name": "ptyID",
  3408. "in": "path",
  3409. "schema": {
  3410. "type": "string",
  3411. "pattern": "^pty"
  3412. },
  3413. "required": true
  3414. },
  3415. {
  3416. "name": "directory",
  3417. "in": "query",
  3418. "schema": {
  3419. "type": "string"
  3420. },
  3421. "required": false
  3422. },
  3423. {
  3424. "name": "workspace",
  3425. "in": "query",
  3426. "schema": {
  3427. "type": "string"
  3428. },
  3429. "required": false
  3430. }
  3431. ],
  3432. "responses": {
  3433. "200": {
  3434. "description": "Session info",
  3435. "content": {
  3436. "application/json": {
  3437. "schema": {
  3438. "$ref": "#/components/schemas/Pty"
  3439. }
  3440. }
  3441. }
  3442. },
  3443. "404": {
  3444. "description": "NotFoundError",
  3445. "content": {
  3446. "application/json": {
  3447. "schema": {
  3448. "$ref": "#/components/schemas/NotFoundError"
  3449. }
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3455. "summary": "Get PTY session",
  3456. "x-codeSamples": [
  3457. {
  3458. "lang": "js",
  3459. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3460. }
  3461. ]
  3462. },
  3463. "put": {
  3464. "tags": ["pty"],
  3465. "operationId": "pty.update",
  3466. "parameters": [
  3467. {
  3468. "name": "ptyID",
  3469. "in": "path",
  3470. "schema": {
  3471. "type": "string",
  3472. "pattern": "^pty"
  3473. },
  3474. "required": true
  3475. },
  3476. {
  3477. "name": "directory",
  3478. "in": "query",
  3479. "schema": {
  3480. "type": "string"
  3481. },
  3482. "required": false
  3483. },
  3484. {
  3485. "name": "workspace",
  3486. "in": "query",
  3487. "schema": {
  3488. "type": "string"
  3489. },
  3490. "required": false
  3491. }
  3492. ],
  3493. "responses": {
  3494. "200": {
  3495. "description": "Updated session",
  3496. "content": {
  3497. "application/json": {
  3498. "schema": {
  3499. "$ref": "#/components/schemas/Pty"
  3500. }
  3501. }
  3502. }
  3503. },
  3504. "400": {
  3505. "description": "Bad request",
  3506. "content": {
  3507. "application/json": {
  3508. "schema": {
  3509. "$ref": "#/components/schemas/BadRequestError"
  3510. }
  3511. }
  3512. }
  3513. }
  3514. },
  3515. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  3516. "summary": "Update PTY session",
  3517. "requestBody": {
  3518. "content": {
  3519. "application/json": {
  3520. "schema": {
  3521. "type": "object",
  3522. "properties": {
  3523. "title": {
  3524. "type": "string"
  3525. },
  3526. "size": {
  3527. "type": "object",
  3528. "properties": {
  3529. "rows": {
  3530. "type": "integer",
  3531. "exclusiveMinimum": 0
  3532. },
  3533. "cols": {
  3534. "type": "integer",
  3535. "exclusiveMinimum": 0
  3536. }
  3537. },
  3538. "required": ["rows", "cols"],
  3539. "additionalProperties": false
  3540. }
  3541. },
  3542. "additionalProperties": false
  3543. }
  3544. }
  3545. }
  3546. },
  3547. "x-codeSamples": [
  3548. {
  3549. "lang": "js",
  3550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  3551. }
  3552. ]
  3553. },
  3554. "delete": {
  3555. "tags": ["pty"],
  3556. "operationId": "pty.remove",
  3557. "parameters": [
  3558. {
  3559. "name": "ptyID",
  3560. "in": "path",
  3561. "schema": {
  3562. "type": "string",
  3563. "pattern": "^pty"
  3564. },
  3565. "required": true
  3566. },
  3567. {
  3568. "name": "directory",
  3569. "in": "query",
  3570. "schema": {
  3571. "type": "string"
  3572. },
  3573. "required": false
  3574. },
  3575. {
  3576. "name": "workspace",
  3577. "in": "query",
  3578. "schema": {
  3579. "type": "string"
  3580. },
  3581. "required": false
  3582. }
  3583. ],
  3584. "responses": {
  3585. "200": {
  3586. "description": "Session removed",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "type": "boolean",
  3591. "description": "Session removed"
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "404": {
  3597. "description": "NotFoundError",
  3598. "content": {
  3599. "application/json": {
  3600. "schema": {
  3601. "$ref": "#/components/schemas/NotFoundError"
  3602. }
  3603. }
  3604. }
  3605. }
  3606. },
  3607. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  3608. "summary": "Remove PTY session",
  3609. "x-codeSamples": [
  3610. {
  3611. "lang": "js",
  3612. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  3613. }
  3614. ]
  3615. }
  3616. },
  3617. "/pty/{ptyID}/connect-token": {
  3618. "post": {
  3619. "tags": ["pty"],
  3620. "operationId": "pty.connectToken",
  3621. "parameters": [
  3622. {
  3623. "name": "ptyID",
  3624. "in": "path",
  3625. "schema": {
  3626. "type": "string",
  3627. "pattern": "^pty"
  3628. },
  3629. "required": true
  3630. },
  3631. {
  3632. "name": "directory",
  3633. "in": "query",
  3634. "schema": {
  3635. "type": "string"
  3636. },
  3637. "required": false
  3638. },
  3639. {
  3640. "name": "workspace",
  3641. "in": "query",
  3642. "schema": {
  3643. "type": "string"
  3644. },
  3645. "required": false
  3646. }
  3647. ],
  3648. "responses": {
  3649. "200": {
  3650. "description": "WebSocket connect token",
  3651. "content": {
  3652. "application/json": {
  3653. "schema": {
  3654. "type": "object",
  3655. "properties": {
  3656. "ticket": {
  3657. "type": "string"
  3658. },
  3659. "expires_in": {
  3660. "type": "integer",
  3661. "exclusiveMinimum": 0
  3662. }
  3663. },
  3664. "required": ["ticket", "expires_in"],
  3665. "additionalProperties": false,
  3666. "description": "WebSocket connect token"
  3667. }
  3668. }
  3669. }
  3670. },
  3671. "403": {
  3672. "description": "Forbidden",
  3673. "content": {
  3674. "application/json": {
  3675. "schema": {
  3676. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  3677. }
  3678. }
  3679. }
  3680. },
  3681. "404": {
  3682. "description": "NotFoundError",
  3683. "content": {
  3684. "application/json": {
  3685. "schema": {
  3686. "$ref": "#/components/schemas/NotFoundError"
  3687. }
  3688. }
  3689. }
  3690. }
  3691. },
  3692. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  3693. "summary": "Create PTY WebSocket token",
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/question": {
  3703. "get": {
  3704. "tags": ["question"],
  3705. "operationId": "question.list",
  3706. "parameters": [
  3707. {
  3708. "name": "directory",
  3709. "in": "query",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": false
  3714. },
  3715. {
  3716. "name": "workspace",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. }
  3723. ],
  3724. "responses": {
  3725. "200": {
  3726. "description": "List of pending questions",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "$ref": "#/components/schemas/QuestionRequest"
  3733. },
  3734. "description": "List of pending questions"
  3735. }
  3736. }
  3737. }
  3738. }
  3739. },
  3740. "description": "Get all pending question requests across all sessions.",
  3741. "summary": "List pending questions",
  3742. "x-codeSamples": [
  3743. {
  3744. "lang": "js",
  3745. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  3746. }
  3747. ]
  3748. }
  3749. },
  3750. "/question/{requestID}/reply": {
  3751. "post": {
  3752. "tags": ["question"],
  3753. "operationId": "question.reply",
  3754. "parameters": [
  3755. {
  3756. "name": "requestID",
  3757. "in": "path",
  3758. "schema": {
  3759. "type": "string",
  3760. "pattern": "^que"
  3761. },
  3762. "required": true
  3763. },
  3764. {
  3765. "name": "directory",
  3766. "in": "query",
  3767. "schema": {
  3768. "type": "string"
  3769. },
  3770. "required": false
  3771. },
  3772. {
  3773. "name": "workspace",
  3774. "in": "query",
  3775. "schema": {
  3776. "type": "string"
  3777. },
  3778. "required": false
  3779. }
  3780. ],
  3781. "responses": {
  3782. "200": {
  3783. "description": "Question answered successfully",
  3784. "content": {
  3785. "application/json": {
  3786. "schema": {
  3787. "type": "boolean",
  3788. "description": "Question answered successfully"
  3789. }
  3790. }
  3791. }
  3792. },
  3793. "400": {
  3794. "description": "Bad request",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/BadRequestError"
  3799. }
  3800. }
  3801. }
  3802. },
  3803. "404": {
  3804. "description": "Not found",
  3805. "content": {
  3806. "application/json": {
  3807. "schema": {
  3808. "$ref": "#/components/schemas/NotFoundError"
  3809. }
  3810. }
  3811. }
  3812. }
  3813. },
  3814. "description": "Provide answers to a question request from the AI assistant.",
  3815. "summary": "Reply to question request",
  3816. "requestBody": {
  3817. "content": {
  3818. "application/json": {
  3819. "schema": {
  3820. "type": "object",
  3821. "properties": {
  3822. "answers": {
  3823. "type": "array",
  3824. "items": {
  3825. "$ref": "#/components/schemas/QuestionAnswer"
  3826. },
  3827. "description": "User answers in order of questions (each answer is an array of selected labels)"
  3828. }
  3829. },
  3830. "required": ["answers"],
  3831. "additionalProperties": false
  3832. }
  3833. }
  3834. }
  3835. },
  3836. "x-codeSamples": [
  3837. {
  3838. "lang": "js",
  3839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  3840. }
  3841. ]
  3842. }
  3843. },
  3844. "/question/{requestID}/reject": {
  3845. "post": {
  3846. "tags": ["question"],
  3847. "operationId": "question.reject",
  3848. "parameters": [
  3849. {
  3850. "name": "requestID",
  3851. "in": "path",
  3852. "schema": {
  3853. "type": "string",
  3854. "pattern": "^que"
  3855. },
  3856. "required": true
  3857. },
  3858. {
  3859. "name": "directory",
  3860. "in": "query",
  3861. "schema": {
  3862. "type": "string"
  3863. },
  3864. "required": false
  3865. },
  3866. {
  3867. "name": "workspace",
  3868. "in": "query",
  3869. "schema": {
  3870. "type": "string"
  3871. },
  3872. "required": false
  3873. }
  3874. ],
  3875. "responses": {
  3876. "200": {
  3877. "description": "Question rejected successfully",
  3878. "content": {
  3879. "application/json": {
  3880. "schema": {
  3881. "type": "boolean",
  3882. "description": "Question rejected successfully"
  3883. }
  3884. }
  3885. }
  3886. },
  3887. "400": {
  3888. "description": "Bad request",
  3889. "content": {
  3890. "application/json": {
  3891. "schema": {
  3892. "$ref": "#/components/schemas/BadRequestError"
  3893. }
  3894. }
  3895. }
  3896. },
  3897. "404": {
  3898. "description": "Not found",
  3899. "content": {
  3900. "application/json": {
  3901. "schema": {
  3902. "$ref": "#/components/schemas/NotFoundError"
  3903. }
  3904. }
  3905. }
  3906. }
  3907. },
  3908. "description": "Reject a question request from the AI assistant.",
  3909. "summary": "Reject question request",
  3910. "x-codeSamples": [
  3911. {
  3912. "lang": "js",
  3913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  3914. }
  3915. ]
  3916. }
  3917. },
  3918. "/permission": {
  3919. "get": {
  3920. "tags": ["permission"],
  3921. "operationId": "permission.list",
  3922. "parameters": [
  3923. {
  3924. "name": "directory",
  3925. "in": "query",
  3926. "schema": {
  3927. "type": "string"
  3928. },
  3929. "required": false
  3930. },
  3931. {
  3932. "name": "workspace",
  3933. "in": "query",
  3934. "schema": {
  3935. "type": "string"
  3936. },
  3937. "required": false
  3938. }
  3939. ],
  3940. "responses": {
  3941. "200": {
  3942. "description": "List of pending permissions",
  3943. "content": {
  3944. "application/json": {
  3945. "schema": {
  3946. "type": "array",
  3947. "items": {
  3948. "$ref": "#/components/schemas/PermissionRequest"
  3949. },
  3950. "description": "List of pending permissions"
  3951. }
  3952. }
  3953. }
  3954. }
  3955. },
  3956. "description": "Get all pending permission requests across all sessions.",
  3957. "summary": "List pending permissions",
  3958. "x-codeSamples": [
  3959. {
  3960. "lang": "js",
  3961. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  3962. }
  3963. ]
  3964. }
  3965. },
  3966. "/permission/{requestID}/reply": {
  3967. "post": {
  3968. "tags": ["permission"],
  3969. "operationId": "permission.reply",
  3970. "parameters": [
  3971. {
  3972. "name": "requestID",
  3973. "in": "path",
  3974. "schema": {
  3975. "type": "string",
  3976. "pattern": "^per"
  3977. },
  3978. "required": true
  3979. },
  3980. {
  3981. "name": "directory",
  3982. "in": "query",
  3983. "schema": {
  3984. "type": "string"
  3985. },
  3986. "required": false
  3987. },
  3988. {
  3989. "name": "workspace",
  3990. "in": "query",
  3991. "schema": {
  3992. "type": "string"
  3993. },
  3994. "required": false
  3995. }
  3996. ],
  3997. "responses": {
  3998. "200": {
  3999. "description": "Permission processed successfully",
  4000. "content": {
  4001. "application/json": {
  4002. "schema": {
  4003. "type": "boolean",
  4004. "description": "Permission processed successfully"
  4005. }
  4006. }
  4007. }
  4008. },
  4009. "400": {
  4010. "description": "Bad request",
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "$ref": "#/components/schemas/BadRequestError"
  4015. }
  4016. }
  4017. }
  4018. },
  4019. "404": {
  4020. "description": "Not found",
  4021. "content": {
  4022. "application/json": {
  4023. "schema": {
  4024. "$ref": "#/components/schemas/NotFoundError"
  4025. }
  4026. }
  4027. }
  4028. }
  4029. },
  4030. "description": "Approve or deny a permission request from the AI assistant.",
  4031. "summary": "Respond to permission request",
  4032. "requestBody": {
  4033. "content": {
  4034. "application/json": {
  4035. "schema": {
  4036. "type": "object",
  4037. "properties": {
  4038. "reply": {
  4039. "type": "string",
  4040. "enum": ["once", "always", "reject"]
  4041. },
  4042. "message": {
  4043. "type": "string"
  4044. }
  4045. },
  4046. "required": ["reply"],
  4047. "additionalProperties": false
  4048. }
  4049. }
  4050. }
  4051. },
  4052. "x-codeSamples": [
  4053. {
  4054. "lang": "js",
  4055. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4056. }
  4057. ]
  4058. }
  4059. },
  4060. "/provider": {
  4061. "get": {
  4062. "tags": ["provider"],
  4063. "operationId": "provider.list",
  4064. "parameters": [
  4065. {
  4066. "name": "directory",
  4067. "in": "query",
  4068. "schema": {
  4069. "type": "string"
  4070. },
  4071. "required": false
  4072. },
  4073. {
  4074. "name": "workspace",
  4075. "in": "query",
  4076. "schema": {
  4077. "type": "string"
  4078. },
  4079. "required": false
  4080. }
  4081. ],
  4082. "responses": {
  4083. "200": {
  4084. "description": "List of providers",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "type": "object",
  4089. "properties": {
  4090. "all": {
  4091. "type": "array",
  4092. "items": {
  4093. "$ref": "#/components/schemas/Provider"
  4094. }
  4095. },
  4096. "default": {
  4097. "type": "object",
  4098. "additionalProperties": {
  4099. "type": "string"
  4100. }
  4101. },
  4102. "connected": {
  4103. "type": "array",
  4104. "items": {
  4105. "type": "string"
  4106. }
  4107. }
  4108. },
  4109. "required": ["all", "default", "connected"],
  4110. "additionalProperties": false,
  4111. "description": "List of providers"
  4112. }
  4113. }
  4114. }
  4115. }
  4116. },
  4117. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4118. "summary": "List providers",
  4119. "x-codeSamples": [
  4120. {
  4121. "lang": "js",
  4122. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4123. }
  4124. ]
  4125. }
  4126. },
  4127. "/provider/auth": {
  4128. "get": {
  4129. "tags": ["provider"],
  4130. "operationId": "provider.auth",
  4131. "parameters": [
  4132. {
  4133. "name": "directory",
  4134. "in": "query",
  4135. "schema": {
  4136. "type": "string"
  4137. },
  4138. "required": false
  4139. },
  4140. {
  4141. "name": "workspace",
  4142. "in": "query",
  4143. "schema": {
  4144. "type": "string"
  4145. },
  4146. "required": false
  4147. }
  4148. ],
  4149. "responses": {
  4150. "200": {
  4151. "description": "Provider auth methods",
  4152. "content": {
  4153. "application/json": {
  4154. "schema": {
  4155. "type": "object",
  4156. "additionalProperties": {
  4157. "type": "array",
  4158. "items": {
  4159. "$ref": "#/components/schemas/ProviderAuthMethod"
  4160. }
  4161. },
  4162. "description": "Provider auth methods"
  4163. }
  4164. }
  4165. }
  4166. }
  4167. },
  4168. "description": "Retrieve available authentication methods for all AI providers.",
  4169. "summary": "Get provider auth methods",
  4170. "x-codeSamples": [
  4171. {
  4172. "lang": "js",
  4173. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4174. }
  4175. ]
  4176. }
  4177. },
  4178. "/provider/{providerID}/oauth/authorize": {
  4179. "post": {
  4180. "tags": ["provider"],
  4181. "operationId": "provider.oauth.authorize",
  4182. "parameters": [
  4183. {
  4184. "name": "providerID",
  4185. "in": "path",
  4186. "schema": {
  4187. "type": "string"
  4188. },
  4189. "required": true
  4190. },
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "Authorization URL and method",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4215. }
  4216. }
  4217. }
  4218. },
  4219. "400": {
  4220. "description": "ProviderAuthError",
  4221. "content": {
  4222. "application/json": {
  4223. "schema": {
  4224. "$ref": "#/components/schemas/ProviderAuthError1"
  4225. }
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "description": "Start the OAuth authorization flow for a provider.",
  4231. "summary": "Start OAuth authorization",
  4232. "requestBody": {
  4233. "content": {
  4234. "application/json": {
  4235. "schema": {
  4236. "type": "object",
  4237. "properties": {
  4238. "method": {
  4239. "type": "number",
  4240. "description": "Auth method index"
  4241. },
  4242. "inputs": {
  4243. "type": "object",
  4244. "additionalProperties": {
  4245. "type": "string"
  4246. }
  4247. }
  4248. },
  4249. "required": ["method"],
  4250. "additionalProperties": false
  4251. }
  4252. }
  4253. }
  4254. },
  4255. "x-codeSamples": [
  4256. {
  4257. "lang": "js",
  4258. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4259. }
  4260. ]
  4261. }
  4262. },
  4263. "/provider/{providerID}/oauth/callback": {
  4264. "post": {
  4265. "tags": ["provider"],
  4266. "operationId": "provider.oauth.callback",
  4267. "parameters": [
  4268. {
  4269. "name": "providerID",
  4270. "in": "path",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": true
  4275. },
  4276. {
  4277. "name": "directory",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. },
  4284. {
  4285. "name": "workspace",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. }
  4292. ],
  4293. "responses": {
  4294. "200": {
  4295. "description": "OAuth callback processed successfully",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "boolean",
  4300. "description": "OAuth callback processed successfully"
  4301. }
  4302. }
  4303. }
  4304. },
  4305. "400": {
  4306. "description": "ProviderAuthError",
  4307. "content": {
  4308. "application/json": {
  4309. "schema": {
  4310. "$ref": "#/components/schemas/ProviderAuthError1"
  4311. }
  4312. }
  4313. }
  4314. }
  4315. },
  4316. "description": "Handle the OAuth callback from a provider after user authorization.",
  4317. "summary": "Handle OAuth callback",
  4318. "requestBody": {
  4319. "content": {
  4320. "application/json": {
  4321. "schema": {
  4322. "type": "object",
  4323. "properties": {
  4324. "method": {
  4325. "type": "number",
  4326. "description": "Auth method index"
  4327. },
  4328. "code": {
  4329. "type": "string"
  4330. }
  4331. },
  4332. "required": ["method"],
  4333. "additionalProperties": false
  4334. }
  4335. }
  4336. }
  4337. },
  4338. "x-codeSamples": [
  4339. {
  4340. "lang": "js",
  4341. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4342. }
  4343. ]
  4344. }
  4345. },
  4346. "/session": {
  4347. "get": {
  4348. "tags": ["session"],
  4349. "operationId": "session.list",
  4350. "parameters": [
  4351. {
  4352. "name": "directory",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. },
  4359. {
  4360. "name": "workspace",
  4361. "in": "query",
  4362. "schema": {
  4363. "type": "string"
  4364. },
  4365. "required": false
  4366. },
  4367. {
  4368. "name": "scope",
  4369. "in": "query",
  4370. "schema": {
  4371. "type": "string",
  4372. "enum": ["project"]
  4373. },
  4374. "required": false
  4375. },
  4376. {
  4377. "name": "path",
  4378. "in": "query",
  4379. "schema": {
  4380. "type": "string"
  4381. },
  4382. "required": false
  4383. },
  4384. {
  4385. "name": "roots",
  4386. "in": "query",
  4387. "schema": {
  4388. "anyOf": [
  4389. {
  4390. "type": "boolean"
  4391. },
  4392. {
  4393. "type": "string",
  4394. "enum": ["true", "false"]
  4395. }
  4396. ]
  4397. },
  4398. "required": false
  4399. },
  4400. {
  4401. "name": "start",
  4402. "in": "query",
  4403. "schema": {
  4404. "type": "number"
  4405. },
  4406. "required": false
  4407. },
  4408. {
  4409. "name": "search",
  4410. "in": "query",
  4411. "schema": {
  4412. "type": "string"
  4413. },
  4414. "required": false
  4415. },
  4416. {
  4417. "name": "limit",
  4418. "in": "query",
  4419. "schema": {
  4420. "type": "number"
  4421. },
  4422. "required": false
  4423. }
  4424. ],
  4425. "responses": {
  4426. "200": {
  4427. "description": "List of sessions",
  4428. "content": {
  4429. "application/json": {
  4430. "schema": {
  4431. "type": "array",
  4432. "items": {
  4433. "$ref": "#/components/schemas/Session"
  4434. },
  4435. "description": "List of sessions"
  4436. }
  4437. }
  4438. }
  4439. }
  4440. },
  4441. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  4442. "summary": "List sessions",
  4443. "x-codeSamples": [
  4444. {
  4445. "lang": "js",
  4446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  4447. }
  4448. ]
  4449. },
  4450. "post": {
  4451. "tags": ["session"],
  4452. "operationId": "session.create",
  4453. "parameters": [
  4454. {
  4455. "name": "directory",
  4456. "in": "query",
  4457. "schema": {
  4458. "type": "string"
  4459. },
  4460. "required": false
  4461. },
  4462. {
  4463. "name": "workspace",
  4464. "in": "query",
  4465. "schema": {
  4466. "type": "string"
  4467. },
  4468. "required": false
  4469. }
  4470. ],
  4471. "responses": {
  4472. "200": {
  4473. "description": "Successfully created session",
  4474. "content": {
  4475. "application/json": {
  4476. "schema": {
  4477. "$ref": "#/components/schemas/Session"
  4478. }
  4479. }
  4480. }
  4481. },
  4482. "400": {
  4483. "description": "Bad request",
  4484. "content": {
  4485. "application/json": {
  4486. "schema": {
  4487. "$ref": "#/components/schemas/BadRequestError"
  4488. }
  4489. }
  4490. }
  4491. }
  4492. },
  4493. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  4494. "summary": "Create session",
  4495. "requestBody": {
  4496. "content": {
  4497. "application/json": {
  4498. "schema": {
  4499. "type": "object",
  4500. "properties": {
  4501. "parentID": {
  4502. "type": "string",
  4503. "pattern": "^ses"
  4504. },
  4505. "title": {
  4506. "type": "string"
  4507. },
  4508. "agent": {
  4509. "type": "string"
  4510. },
  4511. "model": {
  4512. "type": "object",
  4513. "properties": {
  4514. "id": {
  4515. "type": "string"
  4516. },
  4517. "providerID": {
  4518. "type": "string"
  4519. },
  4520. "variant": {
  4521. "type": "string"
  4522. }
  4523. },
  4524. "required": ["id", "providerID"],
  4525. "additionalProperties": false
  4526. },
  4527. "permission": {
  4528. "$ref": "#/components/schemas/PermissionRuleset"
  4529. },
  4530. "workspaceID": {
  4531. "type": "string",
  4532. "pattern": "^wrk"
  4533. }
  4534. },
  4535. "additionalProperties": false
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "x-codeSamples": [
  4541. {
  4542. "lang": "js",
  4543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  4544. }
  4545. ]
  4546. }
  4547. },
  4548. "/session/status": {
  4549. "get": {
  4550. "tags": ["session"],
  4551. "operationId": "session.status",
  4552. "parameters": [
  4553. {
  4554. "name": "directory",
  4555. "in": "query",
  4556. "schema": {
  4557. "type": "string"
  4558. },
  4559. "required": false
  4560. },
  4561. {
  4562. "name": "workspace",
  4563. "in": "query",
  4564. "schema": {
  4565. "type": "string"
  4566. },
  4567. "required": false
  4568. }
  4569. ],
  4570. "responses": {
  4571. "200": {
  4572. "description": "Get session status",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "type": "object",
  4577. "additionalProperties": {
  4578. "$ref": "#/components/schemas/SessionStatus"
  4579. },
  4580. "description": "Get session status"
  4581. }
  4582. }
  4583. }
  4584. },
  4585. "400": {
  4586. "description": "Bad request",
  4587. "content": {
  4588. "application/json": {
  4589. "schema": {
  4590. "$ref": "#/components/schemas/BadRequestError"
  4591. }
  4592. }
  4593. }
  4594. }
  4595. },
  4596. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  4597. "summary": "Get session status",
  4598. "x-codeSamples": [
  4599. {
  4600. "lang": "js",
  4601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  4602. }
  4603. ]
  4604. }
  4605. },
  4606. "/session/{sessionID}": {
  4607. "get": {
  4608. "tags": ["session"],
  4609. "operationId": "session.get",
  4610. "parameters": [
  4611. {
  4612. "name": "sessionID",
  4613. "in": "path",
  4614. "schema": {
  4615. "type": "string",
  4616. "pattern": "^ses"
  4617. },
  4618. "required": true
  4619. },
  4620. {
  4621. "name": "directory",
  4622. "in": "query",
  4623. "schema": {
  4624. "type": "string"
  4625. },
  4626. "required": false
  4627. },
  4628. {
  4629. "name": "workspace",
  4630. "in": "query",
  4631. "schema": {
  4632. "type": "string"
  4633. },
  4634. "required": false
  4635. }
  4636. ],
  4637. "responses": {
  4638. "200": {
  4639. "description": "Get session",
  4640. "content": {
  4641. "application/json": {
  4642. "schema": {
  4643. "$ref": "#/components/schemas/Session"
  4644. }
  4645. }
  4646. }
  4647. },
  4648. "400": {
  4649. "description": "Bad request",
  4650. "content": {
  4651. "application/json": {
  4652. "schema": {
  4653. "$ref": "#/components/schemas/BadRequestError"
  4654. }
  4655. }
  4656. }
  4657. },
  4658. "404": {
  4659. "description": "NotFoundError",
  4660. "content": {
  4661. "application/json": {
  4662. "schema": {
  4663. "$ref": "#/components/schemas/NotFoundError"
  4664. }
  4665. }
  4666. }
  4667. }
  4668. },
  4669. "description": "Retrieve detailed information about a specific OpenCode session.",
  4670. "summary": "Get session",
  4671. "x-codeSamples": [
  4672. {
  4673. "lang": "js",
  4674. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  4675. }
  4676. ]
  4677. },
  4678. "delete": {
  4679. "tags": ["session"],
  4680. "operationId": "session.delete",
  4681. "parameters": [
  4682. {
  4683. "name": "sessionID",
  4684. "in": "path",
  4685. "schema": {
  4686. "type": "string",
  4687. "pattern": "^ses"
  4688. },
  4689. "required": true
  4690. },
  4691. {
  4692. "name": "directory",
  4693. "in": "query",
  4694. "schema": {
  4695. "type": "string"
  4696. },
  4697. "required": false
  4698. },
  4699. {
  4700. "name": "workspace",
  4701. "in": "query",
  4702. "schema": {
  4703. "type": "string"
  4704. },
  4705. "required": false
  4706. }
  4707. ],
  4708. "responses": {
  4709. "200": {
  4710. "description": "Successfully deleted session",
  4711. "content": {
  4712. "application/json": {
  4713. "schema": {
  4714. "type": "boolean",
  4715. "description": "Successfully deleted session"
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "400": {
  4721. "description": "Bad request",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/BadRequestError"
  4726. }
  4727. }
  4728. }
  4729. },
  4730. "404": {
  4731. "description": "NotFoundError",
  4732. "content": {
  4733. "application/json": {
  4734. "schema": {
  4735. "$ref": "#/components/schemas/NotFoundError"
  4736. }
  4737. }
  4738. }
  4739. }
  4740. },
  4741. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  4742. "summary": "Delete session",
  4743. "x-codeSamples": [
  4744. {
  4745. "lang": "js",
  4746. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  4747. }
  4748. ]
  4749. },
  4750. "patch": {
  4751. "tags": ["session"],
  4752. "operationId": "session.update",
  4753. "parameters": [
  4754. {
  4755. "name": "sessionID",
  4756. "in": "path",
  4757. "schema": {
  4758. "type": "string",
  4759. "pattern": "^ses"
  4760. },
  4761. "required": true
  4762. },
  4763. {
  4764. "name": "directory",
  4765. "in": "query",
  4766. "schema": {
  4767. "type": "string"
  4768. },
  4769. "required": false
  4770. },
  4771. {
  4772. "name": "workspace",
  4773. "in": "query",
  4774. "schema": {
  4775. "type": "string"
  4776. },
  4777. "required": false
  4778. }
  4779. ],
  4780. "responses": {
  4781. "200": {
  4782. "description": "Successfully updated session",
  4783. "content": {
  4784. "application/json": {
  4785. "schema": {
  4786. "$ref": "#/components/schemas/Session"
  4787. }
  4788. }
  4789. }
  4790. },
  4791. "400": {
  4792. "description": "Bad request",
  4793. "content": {
  4794. "application/json": {
  4795. "schema": {
  4796. "$ref": "#/components/schemas/BadRequestError"
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "404": {
  4802. "description": "NotFoundError",
  4803. "content": {
  4804. "application/json": {
  4805. "schema": {
  4806. "$ref": "#/components/schemas/NotFoundError"
  4807. }
  4808. }
  4809. }
  4810. }
  4811. },
  4812. "description": "Update properties of an existing session, such as title or other metadata.",
  4813. "summary": "Update session",
  4814. "requestBody": {
  4815. "content": {
  4816. "application/json": {
  4817. "schema": {
  4818. "type": "object",
  4819. "properties": {
  4820. "title": {
  4821. "type": "string"
  4822. },
  4823. "permission": {
  4824. "$ref": "#/components/schemas/PermissionRuleset"
  4825. },
  4826. "time": {
  4827. "type": "object",
  4828. "properties": {
  4829. "archived": {
  4830. "type": "number"
  4831. }
  4832. },
  4833. "additionalProperties": false
  4834. }
  4835. },
  4836. "additionalProperties": false
  4837. }
  4838. }
  4839. }
  4840. },
  4841. "x-codeSamples": [
  4842. {
  4843. "lang": "js",
  4844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  4845. }
  4846. ]
  4847. }
  4848. },
  4849. "/session/{sessionID}/children": {
  4850. "get": {
  4851. "tags": ["session"],
  4852. "operationId": "session.children",
  4853. "parameters": [
  4854. {
  4855. "name": "sessionID",
  4856. "in": "path",
  4857. "schema": {
  4858. "type": "string",
  4859. "pattern": "^ses"
  4860. },
  4861. "required": true
  4862. },
  4863. {
  4864. "name": "directory",
  4865. "in": "query",
  4866. "schema": {
  4867. "type": "string"
  4868. },
  4869. "required": false
  4870. },
  4871. {
  4872. "name": "workspace",
  4873. "in": "query",
  4874. "schema": {
  4875. "type": "string"
  4876. },
  4877. "required": false
  4878. }
  4879. ],
  4880. "responses": {
  4881. "200": {
  4882. "description": "List of children",
  4883. "content": {
  4884. "application/json": {
  4885. "schema": {
  4886. "type": "array",
  4887. "items": {
  4888. "$ref": "#/components/schemas/Session"
  4889. },
  4890. "description": "List of children"
  4891. }
  4892. }
  4893. }
  4894. },
  4895. "400": {
  4896. "description": "Bad request",
  4897. "content": {
  4898. "application/json": {
  4899. "schema": {
  4900. "$ref": "#/components/schemas/BadRequestError"
  4901. }
  4902. }
  4903. }
  4904. },
  4905. "404": {
  4906. "description": "Not found",
  4907. "content": {
  4908. "application/json": {
  4909. "schema": {
  4910. "$ref": "#/components/schemas/NotFoundError"
  4911. }
  4912. }
  4913. }
  4914. }
  4915. },
  4916. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  4917. "summary": "Get session children",
  4918. "x-codeSamples": [
  4919. {
  4920. "lang": "js",
  4921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  4922. }
  4923. ]
  4924. }
  4925. },
  4926. "/session/{sessionID}/todo": {
  4927. "get": {
  4928. "tags": ["session"],
  4929. "operationId": "session.todo",
  4930. "parameters": [
  4931. {
  4932. "name": "sessionID",
  4933. "in": "path",
  4934. "schema": {
  4935. "type": "string",
  4936. "pattern": "^ses"
  4937. },
  4938. "required": true
  4939. },
  4940. {
  4941. "name": "directory",
  4942. "in": "query",
  4943. "schema": {
  4944. "type": "string"
  4945. },
  4946. "required": false
  4947. },
  4948. {
  4949. "name": "workspace",
  4950. "in": "query",
  4951. "schema": {
  4952. "type": "string"
  4953. },
  4954. "required": false
  4955. }
  4956. ],
  4957. "responses": {
  4958. "200": {
  4959. "description": "Todo list",
  4960. "content": {
  4961. "application/json": {
  4962. "schema": {
  4963. "type": "array",
  4964. "items": {
  4965. "$ref": "#/components/schemas/Todo"
  4966. },
  4967. "description": "Todo list"
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "400": {
  4973. "description": "Bad request",
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "$ref": "#/components/schemas/BadRequestError"
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "404": {
  4983. "description": "Not found",
  4984. "content": {
  4985. "application/json": {
  4986. "schema": {
  4987. "$ref": "#/components/schemas/NotFoundError"
  4988. }
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  4994. "summary": "Get session todos",
  4995. "x-codeSamples": [
  4996. {
  4997. "lang": "js",
  4998. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  4999. }
  5000. ]
  5001. }
  5002. },
  5003. "/session/{sessionID}/diff": {
  5004. "get": {
  5005. "tags": ["session"],
  5006. "operationId": "session.diff",
  5007. "parameters": [
  5008. {
  5009. "name": "sessionID",
  5010. "in": "path",
  5011. "schema": {
  5012. "type": "string",
  5013. "pattern": "^ses"
  5014. },
  5015. "required": true
  5016. },
  5017. {
  5018. "name": "directory",
  5019. "in": "query",
  5020. "schema": {
  5021. "type": "string"
  5022. },
  5023. "required": false
  5024. },
  5025. {
  5026. "name": "workspace",
  5027. "in": "query",
  5028. "schema": {
  5029. "type": "string"
  5030. },
  5031. "required": false
  5032. },
  5033. {
  5034. "name": "messageID",
  5035. "in": "query",
  5036. "schema": {
  5037. "type": "string",
  5038. "pattern": "^msg"
  5039. },
  5040. "required": false
  5041. }
  5042. ],
  5043. "responses": {
  5044. "200": {
  5045. "description": "Successfully retrieved diff",
  5046. "content": {
  5047. "application/json": {
  5048. "schema": {
  5049. "type": "array",
  5050. "items": {
  5051. "$ref": "#/components/schemas/SnapshotFileDiff"
  5052. },
  5053. "description": "Successfully retrieved diff"
  5054. }
  5055. }
  5056. }
  5057. }
  5058. },
  5059. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5060. "summary": "Get message diff",
  5061. "x-codeSamples": [
  5062. {
  5063. "lang": "js",
  5064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5065. }
  5066. ]
  5067. }
  5068. },
  5069. "/session/{sessionID}/message": {
  5070. "get": {
  5071. "tags": ["session"],
  5072. "operationId": "session.messages",
  5073. "parameters": [
  5074. {
  5075. "name": "sessionID",
  5076. "in": "path",
  5077. "schema": {
  5078. "type": "string",
  5079. "pattern": "^ses"
  5080. },
  5081. "required": true
  5082. },
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. },
  5099. {
  5100. "name": "limit",
  5101. "in": "query",
  5102. "schema": {
  5103. "type": "integer",
  5104. "minimum": 0,
  5105. "maximum": 9007199254740991
  5106. },
  5107. "required": false
  5108. },
  5109. {
  5110. "name": "before",
  5111. "in": "query",
  5112. "schema": {
  5113. "type": "string"
  5114. },
  5115. "required": false
  5116. }
  5117. ],
  5118. "responses": {
  5119. "200": {
  5120. "description": "List of messages",
  5121. "content": {
  5122. "application/json": {
  5123. "schema": {
  5124. "type": "array",
  5125. "items": {
  5126. "type": "object",
  5127. "properties": {
  5128. "info": {
  5129. "$ref": "#/components/schemas/Message"
  5130. },
  5131. "parts": {
  5132. "type": "array",
  5133. "items": {
  5134. "$ref": "#/components/schemas/Part"
  5135. }
  5136. }
  5137. },
  5138. "required": ["info", "parts"],
  5139. "additionalProperties": false
  5140. },
  5141. "description": "List of messages"
  5142. }
  5143. }
  5144. }
  5145. },
  5146. "400": {
  5147. "description": "Bad request",
  5148. "content": {
  5149. "application/json": {
  5150. "schema": {
  5151. "$ref": "#/components/schemas/BadRequestError"
  5152. }
  5153. }
  5154. }
  5155. },
  5156. "404": {
  5157. "description": "NotFoundError",
  5158. "content": {
  5159. "application/json": {
  5160. "schema": {
  5161. "$ref": "#/components/schemas/NotFoundError"
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5168. "summary": "Get session messages",
  5169. "x-codeSamples": [
  5170. {
  5171. "lang": "js",
  5172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5173. }
  5174. ]
  5175. },
  5176. "post": {
  5177. "tags": ["session"],
  5178. "operationId": "session.prompt",
  5179. "parameters": [
  5180. {
  5181. "name": "sessionID",
  5182. "in": "path",
  5183. "schema": {
  5184. "type": "string",
  5185. "pattern": "^ses"
  5186. },
  5187. "required": true
  5188. },
  5189. {
  5190. "name": "directory",
  5191. "in": "query",
  5192. "schema": {
  5193. "type": "string"
  5194. },
  5195. "required": false
  5196. },
  5197. {
  5198. "name": "workspace",
  5199. "in": "query",
  5200. "schema": {
  5201. "type": "string"
  5202. },
  5203. "required": false
  5204. }
  5205. ],
  5206. "responses": {
  5207. "200": {
  5208. "description": "Created message",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "type": "object",
  5213. "required": ["info", "parts"],
  5214. "properties": {
  5215. "info": {
  5216. "$ref": "#/components/schemas/AssistantMessage"
  5217. },
  5218. "parts": {
  5219. "type": "array",
  5220. "items": {
  5221. "$ref": "#/components/schemas/Part"
  5222. }
  5223. }
  5224. }
  5225. }
  5226. }
  5227. }
  5228. },
  5229. "400": {
  5230. "description": "Bad request",
  5231. "content": {
  5232. "application/json": {
  5233. "schema": {
  5234. "$ref": "#/components/schemas/BadRequestError"
  5235. }
  5236. }
  5237. }
  5238. },
  5239. "404": {
  5240. "description": "Not found",
  5241. "content": {
  5242. "application/json": {
  5243. "schema": {
  5244. "$ref": "#/components/schemas/NotFoundError"
  5245. }
  5246. }
  5247. }
  5248. }
  5249. },
  5250. "description": "Create and send a new message to a session, streaming the AI response.",
  5251. "summary": "Send message",
  5252. "requestBody": {
  5253. "content": {
  5254. "application/json": {
  5255. "schema": {
  5256. "type": "object",
  5257. "properties": {
  5258. "messageID": {
  5259. "type": "string",
  5260. "pattern": "^msg"
  5261. },
  5262. "model": {
  5263. "type": "object",
  5264. "properties": {
  5265. "providerID": {
  5266. "type": "string"
  5267. },
  5268. "modelID": {
  5269. "type": "string"
  5270. }
  5271. },
  5272. "required": ["providerID", "modelID"],
  5273. "additionalProperties": false
  5274. },
  5275. "agent": {
  5276. "type": "string"
  5277. },
  5278. "noReply": {
  5279. "type": "boolean"
  5280. },
  5281. "tools": {
  5282. "type": "object",
  5283. "additionalProperties": {
  5284. "type": "boolean"
  5285. }
  5286. },
  5287. "format": {
  5288. "$ref": "#/components/schemas/OutputFormat"
  5289. },
  5290. "system": {
  5291. "type": "string"
  5292. },
  5293. "variant": {
  5294. "type": "string"
  5295. },
  5296. "parts": {
  5297. "type": "array",
  5298. "items": {
  5299. "anyOf": [
  5300. {
  5301. "$ref": "#/components/schemas/TextPartInput"
  5302. },
  5303. {
  5304. "$ref": "#/components/schemas/FilePartInput"
  5305. },
  5306. {
  5307. "$ref": "#/components/schemas/AgentPartInput"
  5308. },
  5309. {
  5310. "$ref": "#/components/schemas/SubtaskPartInput"
  5311. }
  5312. ]
  5313. }
  5314. }
  5315. },
  5316. "required": ["parts"],
  5317. "additionalProperties": false
  5318. }
  5319. }
  5320. }
  5321. },
  5322. "x-codeSamples": [
  5323. {
  5324. "lang": "js",
  5325. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  5326. }
  5327. ]
  5328. }
  5329. },
  5330. "/session/{sessionID}/message/{messageID}": {
  5331. "get": {
  5332. "tags": ["session"],
  5333. "operationId": "session.message",
  5334. "parameters": [
  5335. {
  5336. "name": "sessionID",
  5337. "in": "path",
  5338. "schema": {
  5339. "type": "string",
  5340. "pattern": "^ses"
  5341. },
  5342. "required": true
  5343. },
  5344. {
  5345. "name": "messageID",
  5346. "in": "path",
  5347. "schema": {
  5348. "type": "string",
  5349. "pattern": "^msg"
  5350. },
  5351. "required": true
  5352. },
  5353. {
  5354. "name": "directory",
  5355. "in": "query",
  5356. "schema": {
  5357. "type": "string"
  5358. },
  5359. "required": false
  5360. },
  5361. {
  5362. "name": "workspace",
  5363. "in": "query",
  5364. "schema": {
  5365. "type": "string"
  5366. },
  5367. "required": false
  5368. }
  5369. ],
  5370. "responses": {
  5371. "200": {
  5372. "description": "Message",
  5373. "content": {
  5374. "application/json": {
  5375. "schema": {
  5376. "type": "object",
  5377. "properties": {
  5378. "info": {
  5379. "$ref": "#/components/schemas/Message"
  5380. },
  5381. "parts": {
  5382. "type": "array",
  5383. "items": {
  5384. "$ref": "#/components/schemas/Part"
  5385. }
  5386. }
  5387. },
  5388. "required": ["info", "parts"],
  5389. "additionalProperties": false,
  5390. "description": "Message"
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "400": {
  5396. "description": "Bad request",
  5397. "content": {
  5398. "application/json": {
  5399. "schema": {
  5400. "$ref": "#/components/schemas/BadRequestError"
  5401. }
  5402. }
  5403. }
  5404. },
  5405. "404": {
  5406. "description": "NotFoundError",
  5407. "content": {
  5408. "application/json": {
  5409. "schema": {
  5410. "$ref": "#/components/schemas/NotFoundError"
  5411. }
  5412. }
  5413. }
  5414. }
  5415. },
  5416. "description": "Retrieve a specific message from a session by its message ID.",
  5417. "summary": "Get message",
  5418. "x-codeSamples": [
  5419. {
  5420. "lang": "js",
  5421. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  5422. }
  5423. ]
  5424. },
  5425. "delete": {
  5426. "tags": ["session"],
  5427. "operationId": "session.deleteMessage",
  5428. "parameters": [
  5429. {
  5430. "name": "sessionID",
  5431. "in": "path",
  5432. "schema": {
  5433. "type": "string",
  5434. "pattern": "^ses"
  5435. },
  5436. "required": true
  5437. },
  5438. {
  5439. "name": "messageID",
  5440. "in": "path",
  5441. "schema": {
  5442. "type": "string",
  5443. "pattern": "^msg"
  5444. },
  5445. "required": true
  5446. },
  5447. {
  5448. "name": "directory",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. },
  5455. {
  5456. "name": "workspace",
  5457. "in": "query",
  5458. "schema": {
  5459. "type": "string"
  5460. },
  5461. "required": false
  5462. }
  5463. ],
  5464. "responses": {
  5465. "200": {
  5466. "description": "Successfully deleted message",
  5467. "content": {
  5468. "application/json": {
  5469. "schema": {
  5470. "type": "boolean",
  5471. "description": "Successfully deleted message"
  5472. }
  5473. }
  5474. }
  5475. },
  5476. "400": {
  5477. "description": "Bad request",
  5478. "content": {
  5479. "application/json": {
  5480. "schema": {
  5481. "$ref": "#/components/schemas/BadRequestError"
  5482. }
  5483. }
  5484. }
  5485. },
  5486. "404": {
  5487. "description": "Not found",
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "$ref": "#/components/schemas/NotFoundError"
  5492. }
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  5498. "summary": "Delete message",
  5499. "x-codeSamples": [
  5500. {
  5501. "lang": "js",
  5502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  5503. }
  5504. ]
  5505. }
  5506. },
  5507. "/session/{sessionID}/fork": {
  5508. "post": {
  5509. "tags": ["session"],
  5510. "operationId": "session.fork",
  5511. "parameters": [
  5512. {
  5513. "name": "sessionID",
  5514. "in": "path",
  5515. "schema": {
  5516. "type": "string",
  5517. "pattern": "^ses"
  5518. },
  5519. "required": true
  5520. },
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "200",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "Bad request",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "$ref": "#/components/schemas/BadRequestError"
  5555. }
  5556. }
  5557. }
  5558. },
  5559. "404": {
  5560. "description": "NotFoundError",
  5561. "content": {
  5562. "application/json": {
  5563. "schema": {
  5564. "$ref": "#/components/schemas/NotFoundError"
  5565. }
  5566. }
  5567. }
  5568. }
  5569. },
  5570. "description": "Create a new session by forking an existing session at a specific message point.",
  5571. "summary": "Fork session",
  5572. "requestBody": {
  5573. "content": {
  5574. "application/json": {
  5575. "schema": {
  5576. "type": "object",
  5577. "properties": {
  5578. "messageID": {
  5579. "type": "string",
  5580. "pattern": "^msg"
  5581. }
  5582. },
  5583. "additionalProperties": false
  5584. }
  5585. }
  5586. }
  5587. },
  5588. "x-codeSamples": [
  5589. {
  5590. "lang": "js",
  5591. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5592. }
  5593. ]
  5594. }
  5595. },
  5596. "/session/{sessionID}/abort": {
  5597. "post": {
  5598. "tags": ["session"],
  5599. "operationId": "session.abort",
  5600. "parameters": [
  5601. {
  5602. "name": "sessionID",
  5603. "in": "path",
  5604. "schema": {
  5605. "type": "string",
  5606. "pattern": "^ses"
  5607. },
  5608. "required": true
  5609. },
  5610. {
  5611. "name": "directory",
  5612. "in": "query",
  5613. "schema": {
  5614. "type": "string"
  5615. },
  5616. "required": false
  5617. },
  5618. {
  5619. "name": "workspace",
  5620. "in": "query",
  5621. "schema": {
  5622. "type": "string"
  5623. },
  5624. "required": false
  5625. }
  5626. ],
  5627. "responses": {
  5628. "200": {
  5629. "description": "Aborted session",
  5630. "content": {
  5631. "application/json": {
  5632. "schema": {
  5633. "type": "boolean",
  5634. "description": "Aborted session"
  5635. }
  5636. }
  5637. }
  5638. },
  5639. "400": {
  5640. "description": "Bad request",
  5641. "content": {
  5642. "application/json": {
  5643. "schema": {
  5644. "$ref": "#/components/schemas/BadRequestError"
  5645. }
  5646. }
  5647. }
  5648. },
  5649. "404": {
  5650. "description": "Not found",
  5651. "content": {
  5652. "application/json": {
  5653. "schema": {
  5654. "$ref": "#/components/schemas/NotFoundError"
  5655. }
  5656. }
  5657. }
  5658. }
  5659. },
  5660. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5661. "summary": "Abort session",
  5662. "x-codeSamples": [
  5663. {
  5664. "lang": "js",
  5665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5666. }
  5667. ]
  5668. }
  5669. },
  5670. "/session/{sessionID}/init": {
  5671. "post": {
  5672. "tags": ["session"],
  5673. "operationId": "session.init",
  5674. "parameters": [
  5675. {
  5676. "name": "sessionID",
  5677. "in": "path",
  5678. "schema": {
  5679. "type": "string",
  5680. "pattern": "^ses"
  5681. },
  5682. "required": true
  5683. },
  5684. {
  5685. "name": "directory",
  5686. "in": "query",
  5687. "schema": {
  5688. "type": "string"
  5689. },
  5690. "required": false
  5691. },
  5692. {
  5693. "name": "workspace",
  5694. "in": "query",
  5695. "schema": {
  5696. "type": "string"
  5697. },
  5698. "required": false
  5699. }
  5700. ],
  5701. "responses": {
  5702. "200": {
  5703. "description": "200",
  5704. "content": {
  5705. "application/json": {
  5706. "schema": {
  5707. "type": "boolean",
  5708. "description": "200"
  5709. }
  5710. }
  5711. }
  5712. },
  5713. "400": {
  5714. "description": "Bad request",
  5715. "content": {
  5716. "application/json": {
  5717. "schema": {
  5718. "$ref": "#/components/schemas/BadRequestError"
  5719. }
  5720. }
  5721. }
  5722. },
  5723. "404": {
  5724. "description": "Not found",
  5725. "content": {
  5726. "application/json": {
  5727. "schema": {
  5728. "$ref": "#/components/schemas/NotFoundError"
  5729. }
  5730. }
  5731. }
  5732. }
  5733. },
  5734. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5735. "summary": "Initialize session",
  5736. "requestBody": {
  5737. "content": {
  5738. "application/json": {
  5739. "schema": {
  5740. "type": "object",
  5741. "properties": {
  5742. "modelID": {
  5743. "type": "string"
  5744. },
  5745. "providerID": {
  5746. "type": "string"
  5747. },
  5748. "messageID": {
  5749. "type": "string",
  5750. "pattern": "^msg"
  5751. }
  5752. },
  5753. "required": ["modelID", "providerID", "messageID"],
  5754. "additionalProperties": false
  5755. }
  5756. }
  5757. }
  5758. },
  5759. "x-codeSamples": [
  5760. {
  5761. "lang": "js",
  5762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5763. }
  5764. ]
  5765. }
  5766. },
  5767. "/session/{sessionID}/share": {
  5768. "post": {
  5769. "tags": ["session"],
  5770. "operationId": "session.share",
  5771. "parameters": [
  5772. {
  5773. "name": "sessionID",
  5774. "in": "path",
  5775. "schema": {
  5776. "type": "string",
  5777. "pattern": "^ses"
  5778. },
  5779. "required": true
  5780. },
  5781. {
  5782. "name": "directory",
  5783. "in": "query",
  5784. "schema": {
  5785. "type": "string"
  5786. },
  5787. "required": false
  5788. },
  5789. {
  5790. "name": "workspace",
  5791. "in": "query",
  5792. "schema": {
  5793. "type": "string"
  5794. },
  5795. "required": false
  5796. }
  5797. ],
  5798. "responses": {
  5799. "200": {
  5800. "description": "Successfully shared session",
  5801. "content": {
  5802. "application/json": {
  5803. "schema": {
  5804. "$ref": "#/components/schemas/Session"
  5805. }
  5806. }
  5807. }
  5808. },
  5809. "404": {
  5810. "description": "NotFoundError",
  5811. "content": {
  5812. "application/json": {
  5813. "schema": {
  5814. "$ref": "#/components/schemas/NotFoundError"
  5815. }
  5816. }
  5817. }
  5818. },
  5819. "500": {
  5820. "description": "InternalServerError",
  5821. "content": {
  5822. "application/json": {
  5823. "schema": {
  5824. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5825. }
  5826. }
  5827. }
  5828. }
  5829. },
  5830. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5831. "summary": "Share session",
  5832. "x-codeSamples": [
  5833. {
  5834. "lang": "js",
  5835. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5836. }
  5837. ]
  5838. },
  5839. "delete": {
  5840. "tags": ["session"],
  5841. "operationId": "session.unshare",
  5842. "parameters": [
  5843. {
  5844. "name": "sessionID",
  5845. "in": "path",
  5846. "schema": {
  5847. "type": "string",
  5848. "pattern": "^ses"
  5849. },
  5850. "required": true
  5851. },
  5852. {
  5853. "name": "directory",
  5854. "in": "query",
  5855. "schema": {
  5856. "type": "string"
  5857. },
  5858. "required": false
  5859. },
  5860. {
  5861. "name": "workspace",
  5862. "in": "query",
  5863. "schema": {
  5864. "type": "string"
  5865. },
  5866. "required": false
  5867. }
  5868. ],
  5869. "responses": {
  5870. "200": {
  5871. "description": "Successfully unshared session",
  5872. "content": {
  5873. "application/json": {
  5874. "schema": {
  5875. "$ref": "#/components/schemas/Session"
  5876. }
  5877. }
  5878. }
  5879. },
  5880. "404": {
  5881. "description": "NotFoundError",
  5882. "content": {
  5883. "application/json": {
  5884. "schema": {
  5885. "$ref": "#/components/schemas/NotFoundError"
  5886. }
  5887. }
  5888. }
  5889. },
  5890. "500": {
  5891. "description": "InternalServerError",
  5892. "content": {
  5893. "application/json": {
  5894. "schema": {
  5895. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5896. }
  5897. }
  5898. }
  5899. }
  5900. },
  5901. "description": "Remove the shareable link for a session, making it private again.",
  5902. "summary": "Unshare session",
  5903. "x-codeSamples": [
  5904. {
  5905. "lang": "js",
  5906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5907. }
  5908. ]
  5909. }
  5910. },
  5911. "/session/{sessionID}/summarize": {
  5912. "post": {
  5913. "tags": ["session"],
  5914. "operationId": "session.summarize",
  5915. "parameters": [
  5916. {
  5917. "name": "sessionID",
  5918. "in": "path",
  5919. "schema": {
  5920. "type": "string",
  5921. "pattern": "^ses"
  5922. },
  5923. "required": true
  5924. },
  5925. {
  5926. "name": "directory",
  5927. "in": "query",
  5928. "schema": {
  5929. "type": "string"
  5930. },
  5931. "required": false
  5932. },
  5933. {
  5934. "name": "workspace",
  5935. "in": "query",
  5936. "schema": {
  5937. "type": "string"
  5938. },
  5939. "required": false
  5940. }
  5941. ],
  5942. "responses": {
  5943. "200": {
  5944. "description": "Summarized session",
  5945. "content": {
  5946. "application/json": {
  5947. "schema": {
  5948. "type": "boolean",
  5949. "description": "Summarized session"
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "400": {
  5955. "description": "Bad request",
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "$ref": "#/components/schemas/BadRequestError"
  5960. }
  5961. }
  5962. }
  5963. },
  5964. "404": {
  5965. "description": "NotFoundError",
  5966. "content": {
  5967. "application/json": {
  5968. "schema": {
  5969. "$ref": "#/components/schemas/NotFoundError"
  5970. }
  5971. }
  5972. }
  5973. }
  5974. },
  5975. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5976. "summary": "Summarize session",
  5977. "requestBody": {
  5978. "content": {
  5979. "application/json": {
  5980. "schema": {
  5981. "type": "object",
  5982. "properties": {
  5983. "providerID": {
  5984. "type": "string"
  5985. },
  5986. "modelID": {
  5987. "type": "string"
  5988. },
  5989. "auto": {
  5990. "type": "boolean"
  5991. }
  5992. },
  5993. "required": ["providerID", "modelID"],
  5994. "additionalProperties": false
  5995. }
  5996. }
  5997. }
  5998. },
  5999. "x-codeSamples": [
  6000. {
  6001. "lang": "js",
  6002. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6003. }
  6004. ]
  6005. }
  6006. },
  6007. "/session/{sessionID}/prompt_async": {
  6008. "post": {
  6009. "tags": ["session"],
  6010. "operationId": "session.prompt_async",
  6011. "parameters": [
  6012. {
  6013. "name": "sessionID",
  6014. "in": "path",
  6015. "schema": {
  6016. "type": "string",
  6017. "pattern": "^ses"
  6018. },
  6019. "required": true
  6020. },
  6021. {
  6022. "name": "directory",
  6023. "in": "query",
  6024. "schema": {
  6025. "type": "string"
  6026. },
  6027. "required": false
  6028. },
  6029. {
  6030. "name": "workspace",
  6031. "in": "query",
  6032. "schema": {
  6033. "type": "string"
  6034. },
  6035. "required": false
  6036. }
  6037. ],
  6038. "responses": {
  6039. "204": {
  6040. "description": "Prompt accepted"
  6041. },
  6042. "400": {
  6043. "description": "Bad request",
  6044. "content": {
  6045. "application/json": {
  6046. "schema": {
  6047. "$ref": "#/components/schemas/BadRequestError"
  6048. }
  6049. }
  6050. }
  6051. },
  6052. "404": {
  6053. "description": "Not found",
  6054. "content": {
  6055. "application/json": {
  6056. "schema": {
  6057. "$ref": "#/components/schemas/NotFoundError"
  6058. }
  6059. }
  6060. }
  6061. }
  6062. },
  6063. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6064. "summary": "Send async message",
  6065. "requestBody": {
  6066. "content": {
  6067. "application/json": {
  6068. "schema": {
  6069. "type": "object",
  6070. "properties": {
  6071. "messageID": {
  6072. "type": "string",
  6073. "pattern": "^msg"
  6074. },
  6075. "model": {
  6076. "type": "object",
  6077. "properties": {
  6078. "providerID": {
  6079. "type": "string"
  6080. },
  6081. "modelID": {
  6082. "type": "string"
  6083. }
  6084. },
  6085. "required": ["providerID", "modelID"],
  6086. "additionalProperties": false
  6087. },
  6088. "agent": {
  6089. "type": "string"
  6090. },
  6091. "noReply": {
  6092. "type": "boolean"
  6093. },
  6094. "tools": {
  6095. "type": "object",
  6096. "additionalProperties": {
  6097. "type": "boolean"
  6098. }
  6099. },
  6100. "format": {
  6101. "$ref": "#/components/schemas/OutputFormat"
  6102. },
  6103. "system": {
  6104. "type": "string"
  6105. },
  6106. "variant": {
  6107. "type": "string"
  6108. },
  6109. "parts": {
  6110. "type": "array",
  6111. "items": {
  6112. "anyOf": [
  6113. {
  6114. "$ref": "#/components/schemas/TextPartInput"
  6115. },
  6116. {
  6117. "$ref": "#/components/schemas/FilePartInput"
  6118. },
  6119. {
  6120. "$ref": "#/components/schemas/AgentPartInput"
  6121. },
  6122. {
  6123. "$ref": "#/components/schemas/SubtaskPartInput"
  6124. }
  6125. ]
  6126. }
  6127. }
  6128. },
  6129. "required": ["parts"],
  6130. "additionalProperties": false
  6131. }
  6132. }
  6133. }
  6134. },
  6135. "x-codeSamples": [
  6136. {
  6137. "lang": "js",
  6138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6139. }
  6140. ]
  6141. }
  6142. },
  6143. "/session/{sessionID}/command": {
  6144. "post": {
  6145. "tags": ["session"],
  6146. "operationId": "session.command",
  6147. "parameters": [
  6148. {
  6149. "name": "sessionID",
  6150. "in": "path",
  6151. "schema": {
  6152. "type": "string",
  6153. "pattern": "^ses"
  6154. },
  6155. "required": true
  6156. },
  6157. {
  6158. "name": "directory",
  6159. "in": "query",
  6160. "schema": {
  6161. "type": "string"
  6162. },
  6163. "required": false
  6164. },
  6165. {
  6166. "name": "workspace",
  6167. "in": "query",
  6168. "schema": {
  6169. "type": "string"
  6170. },
  6171. "required": false
  6172. }
  6173. ],
  6174. "responses": {
  6175. "200": {
  6176. "description": "Created message",
  6177. "content": {
  6178. "application/json": {
  6179. "schema": {
  6180. "type": "object",
  6181. "required": ["info", "parts"],
  6182. "properties": {
  6183. "info": {
  6184. "$ref": "#/components/schemas/AssistantMessage"
  6185. },
  6186. "parts": {
  6187. "type": "array",
  6188. "items": {
  6189. "$ref": "#/components/schemas/Part"
  6190. }
  6191. }
  6192. }
  6193. }
  6194. }
  6195. }
  6196. },
  6197. "400": {
  6198. "description": "Bad request",
  6199. "content": {
  6200. "application/json": {
  6201. "schema": {
  6202. "$ref": "#/components/schemas/BadRequestError"
  6203. }
  6204. }
  6205. }
  6206. },
  6207. "404": {
  6208. "description": "Not found",
  6209. "content": {
  6210. "application/json": {
  6211. "schema": {
  6212. "$ref": "#/components/schemas/NotFoundError"
  6213. }
  6214. }
  6215. }
  6216. }
  6217. },
  6218. "description": "Send a new command to a session for execution by the AI assistant.",
  6219. "summary": "Send command",
  6220. "requestBody": {
  6221. "content": {
  6222. "application/json": {
  6223. "schema": {
  6224. "type": "object",
  6225. "properties": {
  6226. "messageID": {
  6227. "type": "string",
  6228. "pattern": "^msg"
  6229. },
  6230. "agent": {
  6231. "type": "string"
  6232. },
  6233. "model": {
  6234. "type": "string"
  6235. },
  6236. "arguments": {
  6237. "type": "string"
  6238. },
  6239. "command": {
  6240. "type": "string"
  6241. },
  6242. "variant": {
  6243. "type": "string"
  6244. },
  6245. "parts": {
  6246. "type": "array",
  6247. "items": {
  6248. "type": "object",
  6249. "properties": {
  6250. "id": {
  6251. "type": "string",
  6252. "pattern": "^prt"
  6253. },
  6254. "type": {
  6255. "type": "string",
  6256. "enum": ["file"]
  6257. },
  6258. "mime": {
  6259. "type": "string"
  6260. },
  6261. "filename": {
  6262. "type": "string"
  6263. },
  6264. "url": {
  6265. "type": "string"
  6266. },
  6267. "source": {
  6268. "$ref": "#/components/schemas/FilePartSource"
  6269. }
  6270. },
  6271. "required": ["type", "mime", "url"],
  6272. "additionalProperties": false
  6273. }
  6274. }
  6275. },
  6276. "required": ["arguments", "command"],
  6277. "additionalProperties": false
  6278. }
  6279. }
  6280. }
  6281. },
  6282. "x-codeSamples": [
  6283. {
  6284. "lang": "js",
  6285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6286. }
  6287. ]
  6288. }
  6289. },
  6290. "/session/{sessionID}/shell": {
  6291. "post": {
  6292. "tags": ["session"],
  6293. "operationId": "session.shell",
  6294. "parameters": [
  6295. {
  6296. "name": "sessionID",
  6297. "in": "path",
  6298. "schema": {
  6299. "type": "string",
  6300. "pattern": "^ses"
  6301. },
  6302. "required": true
  6303. },
  6304. {
  6305. "name": "directory",
  6306. "in": "query",
  6307. "schema": {
  6308. "type": "string"
  6309. },
  6310. "required": false
  6311. },
  6312. {
  6313. "name": "workspace",
  6314. "in": "query",
  6315. "schema": {
  6316. "type": "string"
  6317. },
  6318. "required": false
  6319. }
  6320. ],
  6321. "responses": {
  6322. "200": {
  6323. "description": "Created message",
  6324. "content": {
  6325. "application/json": {
  6326. "schema": {
  6327. "type": "object",
  6328. "properties": {
  6329. "info": {
  6330. "$ref": "#/components/schemas/Message"
  6331. },
  6332. "parts": {
  6333. "type": "array",
  6334. "items": {
  6335. "$ref": "#/components/schemas/Part"
  6336. }
  6337. }
  6338. },
  6339. "required": ["info", "parts"],
  6340. "additionalProperties": false,
  6341. "description": "Created message"
  6342. }
  6343. }
  6344. }
  6345. },
  6346. "400": {
  6347. "description": "Bad request",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "$ref": "#/components/schemas/BadRequestError"
  6352. }
  6353. }
  6354. }
  6355. },
  6356. "404": {
  6357. "description": "Not found",
  6358. "content": {
  6359. "application/json": {
  6360. "schema": {
  6361. "$ref": "#/components/schemas/NotFoundError"
  6362. }
  6363. }
  6364. }
  6365. }
  6366. },
  6367. "description": "Execute a shell command within the session context and return the AI's response.",
  6368. "summary": "Run shell command",
  6369. "requestBody": {
  6370. "content": {
  6371. "application/json": {
  6372. "schema": {
  6373. "type": "object",
  6374. "properties": {
  6375. "messageID": {
  6376. "type": "string",
  6377. "pattern": "^msg"
  6378. },
  6379. "agent": {
  6380. "type": "string"
  6381. },
  6382. "model": {
  6383. "type": "object",
  6384. "properties": {
  6385. "providerID": {
  6386. "type": "string"
  6387. },
  6388. "modelID": {
  6389. "type": "string"
  6390. }
  6391. },
  6392. "required": ["providerID", "modelID"],
  6393. "additionalProperties": false
  6394. },
  6395. "command": {
  6396. "type": "string"
  6397. }
  6398. },
  6399. "required": ["agent", "command"],
  6400. "additionalProperties": false
  6401. }
  6402. }
  6403. }
  6404. },
  6405. "x-codeSamples": [
  6406. {
  6407. "lang": "js",
  6408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6409. }
  6410. ]
  6411. }
  6412. },
  6413. "/session/{sessionID}/revert": {
  6414. "post": {
  6415. "tags": ["session"],
  6416. "operationId": "session.revert",
  6417. "parameters": [
  6418. {
  6419. "name": "sessionID",
  6420. "in": "path",
  6421. "schema": {
  6422. "type": "string",
  6423. "pattern": "^ses"
  6424. },
  6425. "required": true
  6426. },
  6427. {
  6428. "name": "directory",
  6429. "in": "query",
  6430. "schema": {
  6431. "type": "string"
  6432. },
  6433. "required": false
  6434. },
  6435. {
  6436. "name": "workspace",
  6437. "in": "query",
  6438. "schema": {
  6439. "type": "string"
  6440. },
  6441. "required": false
  6442. }
  6443. ],
  6444. "responses": {
  6445. "200": {
  6446. "description": "Updated session",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/Session"
  6451. }
  6452. }
  6453. }
  6454. },
  6455. "400": {
  6456. "description": "Bad request",
  6457. "content": {
  6458. "application/json": {
  6459. "schema": {
  6460. "$ref": "#/components/schemas/BadRequestError"
  6461. }
  6462. }
  6463. }
  6464. },
  6465. "404": {
  6466. "description": "Not found",
  6467. "content": {
  6468. "application/json": {
  6469. "schema": {
  6470. "$ref": "#/components/schemas/NotFoundError"
  6471. }
  6472. }
  6473. }
  6474. }
  6475. },
  6476. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6477. "summary": "Revert message",
  6478. "requestBody": {
  6479. "content": {
  6480. "application/json": {
  6481. "schema": {
  6482. "type": "object",
  6483. "properties": {
  6484. "messageID": {
  6485. "type": "string",
  6486. "pattern": "^msg"
  6487. },
  6488. "partID": {
  6489. "type": "string",
  6490. "pattern": "^prt"
  6491. }
  6492. },
  6493. "required": ["messageID"],
  6494. "additionalProperties": false
  6495. }
  6496. }
  6497. }
  6498. },
  6499. "x-codeSamples": [
  6500. {
  6501. "lang": "js",
  6502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6503. }
  6504. ]
  6505. }
  6506. },
  6507. "/session/{sessionID}/unrevert": {
  6508. "post": {
  6509. "tags": ["session"],
  6510. "operationId": "session.unrevert",
  6511. "parameters": [
  6512. {
  6513. "name": "sessionID",
  6514. "in": "path",
  6515. "schema": {
  6516. "type": "string",
  6517. "pattern": "^ses"
  6518. },
  6519. "required": true
  6520. },
  6521. {
  6522. "name": "directory",
  6523. "in": "query",
  6524. "schema": {
  6525. "type": "string"
  6526. },
  6527. "required": false
  6528. },
  6529. {
  6530. "name": "workspace",
  6531. "in": "query",
  6532. "schema": {
  6533. "type": "string"
  6534. },
  6535. "required": false
  6536. }
  6537. ],
  6538. "responses": {
  6539. "200": {
  6540. "description": "Updated session",
  6541. "content": {
  6542. "application/json": {
  6543. "schema": {
  6544. "$ref": "#/components/schemas/Session"
  6545. }
  6546. }
  6547. }
  6548. },
  6549. "400": {
  6550. "description": "Bad request",
  6551. "content": {
  6552. "application/json": {
  6553. "schema": {
  6554. "$ref": "#/components/schemas/BadRequestError"
  6555. }
  6556. }
  6557. }
  6558. },
  6559. "404": {
  6560. "description": "Not found",
  6561. "content": {
  6562. "application/json": {
  6563. "schema": {
  6564. "$ref": "#/components/schemas/NotFoundError"
  6565. }
  6566. }
  6567. }
  6568. }
  6569. },
  6570. "description": "Restore all previously reverted messages in a session.",
  6571. "summary": "Restore reverted messages",
  6572. "x-codeSamples": [
  6573. {
  6574. "lang": "js",
  6575. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6576. }
  6577. ]
  6578. }
  6579. },
  6580. "/session/{sessionID}/permissions/{permissionID}": {
  6581. "post": {
  6582. "tags": ["session"],
  6583. "operationId": "permission.respond",
  6584. "parameters": [
  6585. {
  6586. "name": "sessionID",
  6587. "in": "path",
  6588. "schema": {
  6589. "type": "string",
  6590. "pattern": "^ses"
  6591. },
  6592. "required": true
  6593. },
  6594. {
  6595. "name": "permissionID",
  6596. "in": "path",
  6597. "schema": {
  6598. "type": "string",
  6599. "pattern": "^per"
  6600. },
  6601. "required": true
  6602. },
  6603. {
  6604. "name": "directory",
  6605. "in": "query",
  6606. "schema": {
  6607. "type": "string"
  6608. },
  6609. "required": false
  6610. },
  6611. {
  6612. "name": "workspace",
  6613. "in": "query",
  6614. "schema": {
  6615. "type": "string"
  6616. },
  6617. "required": false
  6618. }
  6619. ],
  6620. "responses": {
  6621. "200": {
  6622. "description": "Permission processed successfully",
  6623. "content": {
  6624. "application/json": {
  6625. "schema": {
  6626. "type": "boolean",
  6627. "description": "Permission processed successfully"
  6628. }
  6629. }
  6630. }
  6631. },
  6632. "400": {
  6633. "description": "Bad request",
  6634. "content": {
  6635. "application/json": {
  6636. "schema": {
  6637. "$ref": "#/components/schemas/BadRequestError"
  6638. }
  6639. }
  6640. }
  6641. },
  6642. "404": {
  6643. "description": "Not found",
  6644. "content": {
  6645. "application/json": {
  6646. "schema": {
  6647. "$ref": "#/components/schemas/NotFoundError"
  6648. }
  6649. }
  6650. }
  6651. }
  6652. },
  6653. "description": "Approve or deny a permission request from the AI assistant.",
  6654. "summary": "Respond to permission",
  6655. "deprecated": true,
  6656. "requestBody": {
  6657. "content": {
  6658. "application/json": {
  6659. "schema": {
  6660. "type": "object",
  6661. "properties": {
  6662. "response": {
  6663. "type": "string",
  6664. "enum": ["once", "always", "reject"]
  6665. }
  6666. },
  6667. "required": ["response"],
  6668. "additionalProperties": false
  6669. }
  6670. }
  6671. }
  6672. },
  6673. "x-codeSamples": [
  6674. {
  6675. "lang": "js",
  6676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6677. }
  6678. ]
  6679. }
  6680. },
  6681. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6682. "delete": {
  6683. "tags": ["session"],
  6684. "operationId": "part.delete",
  6685. "parameters": [
  6686. {
  6687. "name": "sessionID",
  6688. "in": "path",
  6689. "schema": {
  6690. "type": "string",
  6691. "pattern": "^ses"
  6692. },
  6693. "required": true
  6694. },
  6695. {
  6696. "name": "messageID",
  6697. "in": "path",
  6698. "schema": {
  6699. "type": "string",
  6700. "pattern": "^msg"
  6701. },
  6702. "required": true
  6703. },
  6704. {
  6705. "name": "partID",
  6706. "in": "path",
  6707. "schema": {
  6708. "type": "string",
  6709. "pattern": "^prt"
  6710. },
  6711. "required": true
  6712. },
  6713. {
  6714. "name": "directory",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. },
  6721. {
  6722. "name": "workspace",
  6723. "in": "query",
  6724. "schema": {
  6725. "type": "string"
  6726. },
  6727. "required": false
  6728. }
  6729. ],
  6730. "responses": {
  6731. "200": {
  6732. "description": "Successfully deleted part",
  6733. "content": {
  6734. "application/json": {
  6735. "schema": {
  6736. "type": "boolean",
  6737. "description": "Successfully deleted part"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "400": {
  6743. "description": "Bad request",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "$ref": "#/components/schemas/BadRequestError"
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "404": {
  6753. "description": "Not found",
  6754. "content": {
  6755. "application/json": {
  6756. "schema": {
  6757. "$ref": "#/components/schemas/NotFoundError"
  6758. }
  6759. }
  6760. }
  6761. }
  6762. },
  6763. "description": "Delete a part from a message.",
  6764. "x-codeSamples": [
  6765. {
  6766. "lang": "js",
  6767. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6768. }
  6769. ]
  6770. },
  6771. "patch": {
  6772. "tags": ["session"],
  6773. "operationId": "part.update",
  6774. "parameters": [
  6775. {
  6776. "name": "sessionID",
  6777. "in": "path",
  6778. "schema": {
  6779. "type": "string",
  6780. "pattern": "^ses"
  6781. },
  6782. "required": true
  6783. },
  6784. {
  6785. "name": "messageID",
  6786. "in": "path",
  6787. "schema": {
  6788. "type": "string",
  6789. "pattern": "^msg"
  6790. },
  6791. "required": true
  6792. },
  6793. {
  6794. "name": "partID",
  6795. "in": "path",
  6796. "schema": {
  6797. "type": "string",
  6798. "pattern": "^prt"
  6799. },
  6800. "required": true
  6801. },
  6802. {
  6803. "name": "directory",
  6804. "in": "query",
  6805. "schema": {
  6806. "type": "string"
  6807. },
  6808. "required": false
  6809. },
  6810. {
  6811. "name": "workspace",
  6812. "in": "query",
  6813. "schema": {
  6814. "type": "string"
  6815. },
  6816. "required": false
  6817. }
  6818. ],
  6819. "responses": {
  6820. "200": {
  6821. "description": "Successfully updated part",
  6822. "content": {
  6823. "application/json": {
  6824. "schema": {
  6825. "$ref": "#/components/schemas/Part"
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "400": {
  6831. "description": "Bad request",
  6832. "content": {
  6833. "application/json": {
  6834. "schema": {
  6835. "$ref": "#/components/schemas/BadRequestError"
  6836. }
  6837. }
  6838. }
  6839. },
  6840. "404": {
  6841. "description": "Not found",
  6842. "content": {
  6843. "application/json": {
  6844. "schema": {
  6845. "$ref": "#/components/schemas/NotFoundError"
  6846. }
  6847. }
  6848. }
  6849. }
  6850. },
  6851. "description": "Update a part in a message.",
  6852. "requestBody": {
  6853. "content": {
  6854. "application/json": {
  6855. "schema": {
  6856. "$ref": "#/components/schemas/Part"
  6857. }
  6858. }
  6859. }
  6860. },
  6861. "x-codeSamples": [
  6862. {
  6863. "lang": "js",
  6864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6865. }
  6866. ]
  6867. }
  6868. },
  6869. "/sync/start": {
  6870. "post": {
  6871. "tags": ["sync"],
  6872. "operationId": "sync.start",
  6873. "parameters": [
  6874. {
  6875. "name": "directory",
  6876. "in": "query",
  6877. "schema": {
  6878. "type": "string"
  6879. },
  6880. "required": false
  6881. },
  6882. {
  6883. "name": "workspace",
  6884. "in": "query",
  6885. "schema": {
  6886. "type": "string"
  6887. },
  6888. "required": false
  6889. }
  6890. ],
  6891. "responses": {
  6892. "200": {
  6893. "description": "Workspace sync started",
  6894. "content": {
  6895. "application/json": {
  6896. "schema": {
  6897. "type": "boolean",
  6898. "description": "Workspace sync started"
  6899. }
  6900. }
  6901. }
  6902. }
  6903. },
  6904. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6905. "summary": "Start workspace sync",
  6906. "x-codeSamples": [
  6907. {
  6908. "lang": "js",
  6909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6910. }
  6911. ]
  6912. }
  6913. },
  6914. "/sync/replay": {
  6915. "post": {
  6916. "tags": ["sync"],
  6917. "operationId": "sync.replay",
  6918. "parameters": [
  6919. {
  6920. "name": "directory",
  6921. "in": "query",
  6922. "schema": {
  6923. "type": "string"
  6924. },
  6925. "required": false
  6926. },
  6927. {
  6928. "name": "workspace",
  6929. "in": "query",
  6930. "schema": {
  6931. "type": "string"
  6932. },
  6933. "required": false
  6934. }
  6935. ],
  6936. "responses": {
  6937. "200": {
  6938. "description": "Replayed sync events",
  6939. "content": {
  6940. "application/json": {
  6941. "schema": {
  6942. "type": "object",
  6943. "properties": {
  6944. "sessionID": {
  6945. "type": "string"
  6946. }
  6947. },
  6948. "required": ["sessionID"],
  6949. "additionalProperties": false,
  6950. "description": "Replayed sync events"
  6951. }
  6952. }
  6953. }
  6954. },
  6955. "400": {
  6956. "description": "Bad request",
  6957. "content": {
  6958. "application/json": {
  6959. "schema": {
  6960. "$ref": "#/components/schemas/BadRequestError"
  6961. }
  6962. }
  6963. }
  6964. }
  6965. },
  6966. "description": "Validate and replay a complete sync event history.",
  6967. "summary": "Replay sync events",
  6968. "requestBody": {
  6969. "content": {
  6970. "application/json": {
  6971. "schema": {
  6972. "type": "object",
  6973. "properties": {
  6974. "directory": {
  6975. "type": "string"
  6976. },
  6977. "events": {
  6978. "type": "array",
  6979. "minItems": 1,
  6980. "items": {
  6981. "type": "object",
  6982. "properties": {
  6983. "id": {
  6984. "type": "string"
  6985. },
  6986. "aggregateID": {
  6987. "type": "string"
  6988. },
  6989. "seq": {
  6990. "type": "integer",
  6991. "minimum": 0
  6992. },
  6993. "type": {
  6994. "type": "string"
  6995. },
  6996. "data": {
  6997. "type": "object"
  6998. }
  6999. },
  7000. "required": ["id", "aggregateID", "seq", "type", "data"],
  7001. "additionalProperties": false
  7002. }
  7003. }
  7004. },
  7005. "required": ["directory", "events"],
  7006. "additionalProperties": false
  7007. }
  7008. }
  7009. }
  7010. },
  7011. "x-codeSamples": [
  7012. {
  7013. "lang": "js",
  7014. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7015. }
  7016. ]
  7017. }
  7018. },
  7019. "/sync/steal": {
  7020. "post": {
  7021. "tags": ["sync"],
  7022. "operationId": "sync.steal",
  7023. "parameters": [
  7024. {
  7025. "name": "directory",
  7026. "in": "query",
  7027. "schema": {
  7028. "type": "string"
  7029. },
  7030. "required": false
  7031. },
  7032. {
  7033. "name": "workspace",
  7034. "in": "query",
  7035. "schema": {
  7036. "type": "string"
  7037. },
  7038. "required": false
  7039. }
  7040. ],
  7041. "responses": {
  7042. "200": {
  7043. "description": "Session stolen into workspace",
  7044. "content": {
  7045. "application/json": {
  7046. "schema": {
  7047. "type": "object",
  7048. "properties": {
  7049. "sessionID": {
  7050. "type": "string",
  7051. "pattern": "^ses"
  7052. }
  7053. },
  7054. "required": ["sessionID"],
  7055. "additionalProperties": false,
  7056. "description": "Session stolen into workspace"
  7057. }
  7058. }
  7059. }
  7060. },
  7061. "400": {
  7062. "description": "Bad request",
  7063. "content": {
  7064. "application/json": {
  7065. "schema": {
  7066. "$ref": "#/components/schemas/BadRequestError"
  7067. }
  7068. }
  7069. }
  7070. }
  7071. },
  7072. "description": "Update a session to belong to the current workspace through the sync event system.",
  7073. "summary": "Steal session into workspace",
  7074. "requestBody": {
  7075. "content": {
  7076. "application/json": {
  7077. "schema": {
  7078. "type": "object",
  7079. "properties": {
  7080. "sessionID": {
  7081. "type": "string",
  7082. "pattern": "^ses"
  7083. }
  7084. },
  7085. "required": ["sessionID"],
  7086. "additionalProperties": false
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "x-codeSamples": [
  7092. {
  7093. "lang": "js",
  7094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7095. }
  7096. ]
  7097. }
  7098. },
  7099. "/sync/history": {
  7100. "post": {
  7101. "tags": ["sync"],
  7102. "operationId": "sync.history.list",
  7103. "parameters": [
  7104. {
  7105. "name": "directory",
  7106. "in": "query",
  7107. "schema": {
  7108. "type": "string"
  7109. },
  7110. "required": false
  7111. },
  7112. {
  7113. "name": "workspace",
  7114. "in": "query",
  7115. "schema": {
  7116. "type": "string"
  7117. },
  7118. "required": false
  7119. }
  7120. ],
  7121. "responses": {
  7122. "200": {
  7123. "description": "Sync events",
  7124. "content": {
  7125. "application/json": {
  7126. "schema": {
  7127. "type": "array",
  7128. "items": {
  7129. "type": "object",
  7130. "properties": {
  7131. "id": {
  7132. "type": "string"
  7133. },
  7134. "aggregate_id": {
  7135. "type": "string"
  7136. },
  7137. "seq": {
  7138. "type": "integer",
  7139. "minimum": 0
  7140. },
  7141. "type": {
  7142. "type": "string"
  7143. },
  7144. "data": {
  7145. "type": "object"
  7146. }
  7147. },
  7148. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7149. "additionalProperties": false
  7150. },
  7151. "description": "Sync events"
  7152. }
  7153. }
  7154. }
  7155. },
  7156. "400": {
  7157. "description": "Bad request",
  7158. "content": {
  7159. "application/json": {
  7160. "schema": {
  7161. "$ref": "#/components/schemas/BadRequestError"
  7162. }
  7163. }
  7164. }
  7165. }
  7166. },
  7167. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  7168. "summary": "List sync events",
  7169. "requestBody": {
  7170. "content": {
  7171. "application/json": {
  7172. "schema": {
  7173. "type": "object",
  7174. "additionalProperties": {
  7175. "type": "integer",
  7176. "minimum": 0
  7177. }
  7178. }
  7179. }
  7180. }
  7181. },
  7182. "x-codeSamples": [
  7183. {
  7184. "lang": "js",
  7185. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7186. }
  7187. ]
  7188. }
  7189. },
  7190. "/api/session": {
  7191. "get": {
  7192. "tags": ["v2"],
  7193. "operationId": "v2.session.list",
  7194. "parameters": [
  7195. {
  7196. "name": "directory",
  7197. "in": "query",
  7198. "schema": {
  7199. "type": "string"
  7200. },
  7201. "required": false
  7202. },
  7203. {
  7204. "name": "workspace",
  7205. "in": "query",
  7206. "schema": {
  7207. "type": "string"
  7208. },
  7209. "required": false
  7210. },
  7211. {
  7212. "name": "limit",
  7213. "in": "query",
  7214. "schema": {
  7215. "type": "number"
  7216. },
  7217. "required": false
  7218. },
  7219. {
  7220. "name": "order",
  7221. "in": "query",
  7222. "schema": {
  7223. "type": "string",
  7224. "enum": ["asc", "desc"]
  7225. },
  7226. "required": false
  7227. },
  7228. {
  7229. "name": "path",
  7230. "in": "query",
  7231. "schema": {
  7232. "type": "string"
  7233. },
  7234. "required": false
  7235. },
  7236. {
  7237. "name": "roots",
  7238. "in": "query",
  7239. "schema": {
  7240. "anyOf": [
  7241. {
  7242. "type": "boolean"
  7243. },
  7244. {
  7245. "type": "string",
  7246. "enum": ["true", "false"]
  7247. }
  7248. ]
  7249. },
  7250. "required": false
  7251. },
  7252. {
  7253. "name": "start",
  7254. "in": "query",
  7255. "schema": {
  7256. "type": "number"
  7257. },
  7258. "required": false
  7259. },
  7260. {
  7261. "name": "search",
  7262. "in": "query",
  7263. "schema": {
  7264. "type": "string"
  7265. },
  7266. "required": false
  7267. },
  7268. {
  7269. "name": "cursor",
  7270. "in": "query",
  7271. "schema": {
  7272. "type": "string",
  7273. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  7274. },
  7275. "required": false
  7276. }
  7277. ],
  7278. "responses": {
  7279. "200": {
  7280. "description": "V2SessionsResponse",
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "$ref": "#/components/schemas/V2SessionsResponse"
  7285. }
  7286. }
  7287. }
  7288. },
  7289. "400": {
  7290. "description": "Bad request",
  7291. "content": {
  7292. "application/json": {
  7293. "schema": {
  7294. "$ref": "#/components/schemas/BadRequestError"
  7295. }
  7296. }
  7297. }
  7298. }
  7299. },
  7300. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  7301. "summary": "List v2 sessions",
  7302. "x-codeSamples": [
  7303. {
  7304. "lang": "js",
  7305. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7306. }
  7307. ]
  7308. }
  7309. },
  7310. "/api/session/{sessionID}/prompt": {
  7311. "post": {
  7312. "tags": ["v2"],
  7313. "operationId": "v2.session.prompt",
  7314. "parameters": [
  7315. {
  7316. "name": "sessionID",
  7317. "in": "path",
  7318. "schema": {
  7319. "type": "string",
  7320. "pattern": "^ses"
  7321. },
  7322. "required": true
  7323. },
  7324. {
  7325. "name": "directory",
  7326. "in": "query",
  7327. "schema": {
  7328. "type": "string"
  7329. },
  7330. "required": false
  7331. },
  7332. {
  7333. "name": "workspace",
  7334. "in": "query",
  7335. "schema": {
  7336. "type": "string"
  7337. },
  7338. "required": false
  7339. }
  7340. ],
  7341. "responses": {
  7342. "200": {
  7343. "description": "Session.Message",
  7344. "content": {
  7345. "application/json": {
  7346. "schema": {
  7347. "$ref": "#/components/schemas/SessionMessage"
  7348. }
  7349. }
  7350. }
  7351. }
  7352. },
  7353. "description": "Create a v2 session message and queue it for the agent loop.",
  7354. "summary": "Send v2 message",
  7355. "requestBody": {
  7356. "content": {
  7357. "application/json": {
  7358. "schema": {
  7359. "type": "object",
  7360. "properties": {
  7361. "prompt": {
  7362. "$ref": "#/components/schemas/Prompt"
  7363. },
  7364. "delivery": {
  7365. "$ref": "#/components/schemas/SessionDelivery"
  7366. }
  7367. },
  7368. "required": ["prompt"],
  7369. "additionalProperties": false
  7370. }
  7371. }
  7372. }
  7373. },
  7374. "x-codeSamples": [
  7375. {
  7376. "lang": "js",
  7377. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7378. }
  7379. ]
  7380. }
  7381. },
  7382. "/api/session/{sessionID}/compact": {
  7383. "post": {
  7384. "tags": ["v2"],
  7385. "operationId": "v2.session.compact",
  7386. "parameters": [
  7387. {
  7388. "name": "sessionID",
  7389. "in": "path",
  7390. "schema": {
  7391. "type": "string",
  7392. "pattern": "^ses"
  7393. },
  7394. "required": true
  7395. },
  7396. {
  7397. "name": "directory",
  7398. "in": "query",
  7399. "schema": {
  7400. "type": "string"
  7401. },
  7402. "required": false
  7403. },
  7404. {
  7405. "name": "workspace",
  7406. "in": "query",
  7407. "schema": {
  7408. "type": "string"
  7409. },
  7410. "required": false
  7411. }
  7412. ],
  7413. "responses": {
  7414. "204": {
  7415. "description": "<No Content>"
  7416. }
  7417. },
  7418. "description": "Compact a v2 session conversation.",
  7419. "summary": "Compact v2 session",
  7420. "x-codeSamples": [
  7421. {
  7422. "lang": "js",
  7423. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7424. }
  7425. ]
  7426. }
  7427. },
  7428. "/api/session/{sessionID}/wait": {
  7429. "post": {
  7430. "tags": ["v2"],
  7431. "operationId": "v2.session.wait",
  7432. "parameters": [
  7433. {
  7434. "name": "sessionID",
  7435. "in": "path",
  7436. "schema": {
  7437. "type": "string",
  7438. "pattern": "^ses"
  7439. },
  7440. "required": true
  7441. },
  7442. {
  7443. "name": "directory",
  7444. "in": "query",
  7445. "schema": {
  7446. "type": "string"
  7447. },
  7448. "required": false
  7449. },
  7450. {
  7451. "name": "workspace",
  7452. "in": "query",
  7453. "schema": {
  7454. "type": "string"
  7455. },
  7456. "required": false
  7457. }
  7458. ],
  7459. "responses": {
  7460. "204": {
  7461. "description": "<No Content>"
  7462. }
  7463. },
  7464. "description": "Wait for a v2 session agent loop to become idle.",
  7465. "summary": "Wait for v2 session",
  7466. "x-codeSamples": [
  7467. {
  7468. "lang": "js",
  7469. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7470. }
  7471. ]
  7472. }
  7473. },
  7474. "/api/session/{sessionID}/context": {
  7475. "get": {
  7476. "tags": ["v2"],
  7477. "operationId": "v2.session.context",
  7478. "parameters": [
  7479. {
  7480. "name": "sessionID",
  7481. "in": "path",
  7482. "schema": {
  7483. "type": "string",
  7484. "pattern": "^ses"
  7485. },
  7486. "required": true
  7487. },
  7488. {
  7489. "name": "directory",
  7490. "in": "query",
  7491. "schema": {
  7492. "type": "string"
  7493. },
  7494. "required": false
  7495. },
  7496. {
  7497. "name": "workspace",
  7498. "in": "query",
  7499. "schema": {
  7500. "type": "string"
  7501. },
  7502. "required": false
  7503. }
  7504. ],
  7505. "responses": {
  7506. "200": {
  7507. "description": "Success",
  7508. "content": {
  7509. "application/json": {
  7510. "schema": {
  7511. "type": "array",
  7512. "items": {
  7513. "$ref": "#/components/schemas/SessionMessage"
  7514. }
  7515. }
  7516. }
  7517. }
  7518. }
  7519. },
  7520. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7521. "summary": "Get v2 session context",
  7522. "x-codeSamples": [
  7523. {
  7524. "lang": "js",
  7525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7526. }
  7527. ]
  7528. }
  7529. },
  7530. "/api/session/{sessionID}/message": {
  7531. "get": {
  7532. "tags": ["v2 messages"],
  7533. "operationId": "v2.session.messages",
  7534. "parameters": [
  7535. {
  7536. "name": "sessionID",
  7537. "in": "path",
  7538. "schema": {
  7539. "type": "string",
  7540. "pattern": "^ses"
  7541. },
  7542. "required": true
  7543. },
  7544. {
  7545. "name": "directory",
  7546. "in": "query",
  7547. "schema": {
  7548. "type": "string"
  7549. },
  7550. "required": false
  7551. },
  7552. {
  7553. "name": "workspace",
  7554. "in": "query",
  7555. "schema": {
  7556. "type": "string"
  7557. },
  7558. "required": false
  7559. },
  7560. {
  7561. "name": "limit",
  7562. "in": "query",
  7563. "schema": {
  7564. "type": "number"
  7565. },
  7566. "required": false
  7567. },
  7568. {
  7569. "name": "order",
  7570. "in": "query",
  7571. "schema": {
  7572. "type": "string",
  7573. "enum": ["asc", "desc"]
  7574. },
  7575. "required": false
  7576. },
  7577. {
  7578. "name": "cursor",
  7579. "in": "query",
  7580. "schema": {
  7581. "type": "string",
  7582. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  7583. },
  7584. "required": false
  7585. }
  7586. ],
  7587. "responses": {
  7588. "200": {
  7589. "description": "V2SessionMessagesResponse",
  7590. "content": {
  7591. "application/json": {
  7592. "schema": {
  7593. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7594. }
  7595. }
  7596. }
  7597. },
  7598. "400": {
  7599. "description": "Bad request",
  7600. "content": {
  7601. "application/json": {
  7602. "schema": {
  7603. "$ref": "#/components/schemas/BadRequestError"
  7604. }
  7605. }
  7606. }
  7607. }
  7608. },
  7609. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  7610. "summary": "Get v2 session messages",
  7611. "x-codeSamples": [
  7612. {
  7613. "lang": "js",
  7614. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7615. }
  7616. ]
  7617. }
  7618. },
  7619. "/tui/append-prompt": {
  7620. "post": {
  7621. "tags": ["tui"],
  7622. "operationId": "tui.appendPrompt",
  7623. "parameters": [
  7624. {
  7625. "name": "directory",
  7626. "in": "query",
  7627. "schema": {
  7628. "type": "string"
  7629. },
  7630. "required": false
  7631. },
  7632. {
  7633. "name": "workspace",
  7634. "in": "query",
  7635. "schema": {
  7636. "type": "string"
  7637. },
  7638. "required": false
  7639. }
  7640. ],
  7641. "responses": {
  7642. "200": {
  7643. "description": "Prompt processed successfully",
  7644. "content": {
  7645. "application/json": {
  7646. "schema": {
  7647. "type": "boolean",
  7648. "description": "Prompt processed successfully"
  7649. }
  7650. }
  7651. }
  7652. },
  7653. "400": {
  7654. "description": "Bad request",
  7655. "content": {
  7656. "application/json": {
  7657. "schema": {
  7658. "$ref": "#/components/schemas/BadRequestError"
  7659. }
  7660. }
  7661. }
  7662. }
  7663. },
  7664. "description": "Append prompt to the TUI.",
  7665. "summary": "Append TUI prompt",
  7666. "requestBody": {
  7667. "content": {
  7668. "application/json": {
  7669. "schema": {
  7670. "type": "object",
  7671. "properties": {
  7672. "text": {
  7673. "type": "string"
  7674. }
  7675. },
  7676. "required": ["text"],
  7677. "additionalProperties": false
  7678. }
  7679. }
  7680. }
  7681. },
  7682. "x-codeSamples": [
  7683. {
  7684. "lang": "js",
  7685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7686. }
  7687. ]
  7688. }
  7689. },
  7690. "/tui/open-help": {
  7691. "post": {
  7692. "tags": ["tui"],
  7693. "operationId": "tui.openHelp",
  7694. "parameters": [
  7695. {
  7696. "name": "directory",
  7697. "in": "query",
  7698. "schema": {
  7699. "type": "string"
  7700. },
  7701. "required": false
  7702. },
  7703. {
  7704. "name": "workspace",
  7705. "in": "query",
  7706. "schema": {
  7707. "type": "string"
  7708. },
  7709. "required": false
  7710. }
  7711. ],
  7712. "responses": {
  7713. "200": {
  7714. "description": "Help dialog opened successfully",
  7715. "content": {
  7716. "application/json": {
  7717. "schema": {
  7718. "type": "boolean",
  7719. "description": "Help dialog opened successfully"
  7720. }
  7721. }
  7722. }
  7723. }
  7724. },
  7725. "description": "Open the help dialog in the TUI to display user assistance information.",
  7726. "summary": "Open help dialog",
  7727. "x-codeSamples": [
  7728. {
  7729. "lang": "js",
  7730. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7731. }
  7732. ]
  7733. }
  7734. },
  7735. "/tui/open-sessions": {
  7736. "post": {
  7737. "tags": ["tui"],
  7738. "operationId": "tui.openSessions",
  7739. "parameters": [
  7740. {
  7741. "name": "directory",
  7742. "in": "query",
  7743. "schema": {
  7744. "type": "string"
  7745. },
  7746. "required": false
  7747. },
  7748. {
  7749. "name": "workspace",
  7750. "in": "query",
  7751. "schema": {
  7752. "type": "string"
  7753. },
  7754. "required": false
  7755. }
  7756. ],
  7757. "responses": {
  7758. "200": {
  7759. "description": "Session dialog opened successfully",
  7760. "content": {
  7761. "application/json": {
  7762. "schema": {
  7763. "type": "boolean",
  7764. "description": "Session dialog opened successfully"
  7765. }
  7766. }
  7767. }
  7768. }
  7769. },
  7770. "description": "Open the session dialog.",
  7771. "summary": "Open sessions dialog",
  7772. "x-codeSamples": [
  7773. {
  7774. "lang": "js",
  7775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7776. }
  7777. ]
  7778. }
  7779. },
  7780. "/tui/open-themes": {
  7781. "post": {
  7782. "tags": ["tui"],
  7783. "operationId": "tui.openThemes",
  7784. "parameters": [
  7785. {
  7786. "name": "directory",
  7787. "in": "query",
  7788. "schema": {
  7789. "type": "string"
  7790. },
  7791. "required": false
  7792. },
  7793. {
  7794. "name": "workspace",
  7795. "in": "query",
  7796. "schema": {
  7797. "type": "string"
  7798. },
  7799. "required": false
  7800. }
  7801. ],
  7802. "responses": {
  7803. "200": {
  7804. "description": "Theme dialog opened successfully",
  7805. "content": {
  7806. "application/json": {
  7807. "schema": {
  7808. "type": "boolean",
  7809. "description": "Theme dialog opened successfully"
  7810. }
  7811. }
  7812. }
  7813. }
  7814. },
  7815. "description": "Open the theme dialog.",
  7816. "summary": "Open themes dialog",
  7817. "x-codeSamples": [
  7818. {
  7819. "lang": "js",
  7820. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7821. }
  7822. ]
  7823. }
  7824. },
  7825. "/tui/open-models": {
  7826. "post": {
  7827. "tags": ["tui"],
  7828. "operationId": "tui.openModels",
  7829. "parameters": [
  7830. {
  7831. "name": "directory",
  7832. "in": "query",
  7833. "schema": {
  7834. "type": "string"
  7835. },
  7836. "required": false
  7837. },
  7838. {
  7839. "name": "workspace",
  7840. "in": "query",
  7841. "schema": {
  7842. "type": "string"
  7843. },
  7844. "required": false
  7845. }
  7846. ],
  7847. "responses": {
  7848. "200": {
  7849. "description": "Model dialog opened successfully",
  7850. "content": {
  7851. "application/json": {
  7852. "schema": {
  7853. "type": "boolean",
  7854. "description": "Model dialog opened successfully"
  7855. }
  7856. }
  7857. }
  7858. }
  7859. },
  7860. "description": "Open the model dialog.",
  7861. "summary": "Open models dialog",
  7862. "x-codeSamples": [
  7863. {
  7864. "lang": "js",
  7865. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  7866. }
  7867. ]
  7868. }
  7869. },
  7870. "/tui/submit-prompt": {
  7871. "post": {
  7872. "tags": ["tui"],
  7873. "operationId": "tui.submitPrompt",
  7874. "parameters": [
  7875. {
  7876. "name": "directory",
  7877. "in": "query",
  7878. "schema": {
  7879. "type": "string"
  7880. },
  7881. "required": false
  7882. },
  7883. {
  7884. "name": "workspace",
  7885. "in": "query",
  7886. "schema": {
  7887. "type": "string"
  7888. },
  7889. "required": false
  7890. }
  7891. ],
  7892. "responses": {
  7893. "200": {
  7894. "description": "Prompt submitted successfully",
  7895. "content": {
  7896. "application/json": {
  7897. "schema": {
  7898. "type": "boolean",
  7899. "description": "Prompt submitted successfully"
  7900. }
  7901. }
  7902. }
  7903. }
  7904. },
  7905. "description": "Submit the prompt.",
  7906. "summary": "Submit TUI prompt",
  7907. "x-codeSamples": [
  7908. {
  7909. "lang": "js",
  7910. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  7911. }
  7912. ]
  7913. }
  7914. },
  7915. "/tui/clear-prompt": {
  7916. "post": {
  7917. "tags": ["tui"],
  7918. "operationId": "tui.clearPrompt",
  7919. "parameters": [
  7920. {
  7921. "name": "directory",
  7922. "in": "query",
  7923. "schema": {
  7924. "type": "string"
  7925. },
  7926. "required": false
  7927. },
  7928. {
  7929. "name": "workspace",
  7930. "in": "query",
  7931. "schema": {
  7932. "type": "string"
  7933. },
  7934. "required": false
  7935. }
  7936. ],
  7937. "responses": {
  7938. "200": {
  7939. "description": "Prompt cleared successfully",
  7940. "content": {
  7941. "application/json": {
  7942. "schema": {
  7943. "type": "boolean",
  7944. "description": "Prompt cleared successfully"
  7945. }
  7946. }
  7947. }
  7948. }
  7949. },
  7950. "description": "Clear the prompt.",
  7951. "summary": "Clear TUI prompt",
  7952. "x-codeSamples": [
  7953. {
  7954. "lang": "js",
  7955. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  7956. }
  7957. ]
  7958. }
  7959. },
  7960. "/tui/execute-command": {
  7961. "post": {
  7962. "tags": ["tui"],
  7963. "operationId": "tui.executeCommand",
  7964. "parameters": [
  7965. {
  7966. "name": "directory",
  7967. "in": "query",
  7968. "schema": {
  7969. "type": "string"
  7970. },
  7971. "required": false
  7972. },
  7973. {
  7974. "name": "workspace",
  7975. "in": "query",
  7976. "schema": {
  7977. "type": "string"
  7978. },
  7979. "required": false
  7980. }
  7981. ],
  7982. "responses": {
  7983. "200": {
  7984. "description": "Command executed successfully",
  7985. "content": {
  7986. "application/json": {
  7987. "schema": {
  7988. "type": "boolean",
  7989. "description": "Command executed successfully"
  7990. }
  7991. }
  7992. }
  7993. },
  7994. "400": {
  7995. "description": "Bad request",
  7996. "content": {
  7997. "application/json": {
  7998. "schema": {
  7999. "$ref": "#/components/schemas/BadRequestError"
  8000. }
  8001. }
  8002. }
  8003. }
  8004. },
  8005. "description": "Execute a TUI command.",
  8006. "summary": "Execute TUI command",
  8007. "requestBody": {
  8008. "content": {
  8009. "application/json": {
  8010. "schema": {
  8011. "type": "object",
  8012. "properties": {
  8013. "command": {
  8014. "type": "string"
  8015. }
  8016. },
  8017. "required": ["command"],
  8018. "additionalProperties": false
  8019. }
  8020. }
  8021. }
  8022. },
  8023. "x-codeSamples": [
  8024. {
  8025. "lang": "js",
  8026. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8027. }
  8028. ]
  8029. }
  8030. },
  8031. "/tui/show-toast": {
  8032. "post": {
  8033. "tags": ["tui"],
  8034. "operationId": "tui.showToast",
  8035. "parameters": [
  8036. {
  8037. "name": "directory",
  8038. "in": "query",
  8039. "schema": {
  8040. "type": "string"
  8041. },
  8042. "required": false
  8043. },
  8044. {
  8045. "name": "workspace",
  8046. "in": "query",
  8047. "schema": {
  8048. "type": "string"
  8049. },
  8050. "required": false
  8051. }
  8052. ],
  8053. "responses": {
  8054. "200": {
  8055. "description": "Toast notification shown successfully",
  8056. "content": {
  8057. "application/json": {
  8058. "schema": {
  8059. "type": "boolean",
  8060. "description": "Toast notification shown successfully"
  8061. }
  8062. }
  8063. }
  8064. }
  8065. },
  8066. "description": "Show a toast notification in the TUI.",
  8067. "summary": "Show TUI toast",
  8068. "requestBody": {
  8069. "content": {
  8070. "application/json": {
  8071. "schema": {
  8072. "type": "object",
  8073. "properties": {
  8074. "title": {
  8075. "type": "string"
  8076. },
  8077. "message": {
  8078. "type": "string"
  8079. },
  8080. "variant": {
  8081. "type": "string",
  8082. "enum": ["info", "success", "warning", "error"]
  8083. },
  8084. "duration": {
  8085. "type": "integer",
  8086. "exclusiveMinimum": 0
  8087. }
  8088. },
  8089. "required": ["message", "variant"],
  8090. "additionalProperties": false
  8091. }
  8092. }
  8093. }
  8094. },
  8095. "x-codeSamples": [
  8096. {
  8097. "lang": "js",
  8098. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8099. }
  8100. ]
  8101. }
  8102. },
  8103. "/tui/publish": {
  8104. "post": {
  8105. "tags": ["tui"],
  8106. "operationId": "tui.publish",
  8107. "parameters": [
  8108. {
  8109. "name": "directory",
  8110. "in": "query",
  8111. "schema": {
  8112. "type": "string"
  8113. },
  8114. "required": false
  8115. },
  8116. {
  8117. "name": "workspace",
  8118. "in": "query",
  8119. "schema": {
  8120. "type": "string"
  8121. },
  8122. "required": false
  8123. }
  8124. ],
  8125. "responses": {
  8126. "200": {
  8127. "description": "Event published successfully",
  8128. "content": {
  8129. "application/json": {
  8130. "schema": {
  8131. "type": "boolean",
  8132. "description": "Event published successfully"
  8133. }
  8134. }
  8135. }
  8136. },
  8137. "400": {
  8138. "description": "Bad request",
  8139. "content": {
  8140. "application/json": {
  8141. "schema": {
  8142. "$ref": "#/components/schemas/BadRequestError"
  8143. }
  8144. }
  8145. }
  8146. }
  8147. },
  8148. "description": "Publish a TUI event.",
  8149. "summary": "Publish TUI event",
  8150. "requestBody": {
  8151. "content": {
  8152. "application/json": {
  8153. "schema": {
  8154. "anyOf": [
  8155. {
  8156. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8157. },
  8158. {
  8159. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8160. },
  8161. {
  8162. "$ref": "#/components/schemas/EventTuiToastShow"
  8163. },
  8164. {
  8165. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8166. }
  8167. ]
  8168. }
  8169. }
  8170. }
  8171. },
  8172. "x-codeSamples": [
  8173. {
  8174. "lang": "js",
  8175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8176. }
  8177. ]
  8178. }
  8179. },
  8180. "/tui/select-session": {
  8181. "post": {
  8182. "tags": ["tui"],
  8183. "operationId": "tui.selectSession",
  8184. "parameters": [
  8185. {
  8186. "name": "directory",
  8187. "in": "query",
  8188. "schema": {
  8189. "type": "string"
  8190. },
  8191. "required": false
  8192. },
  8193. {
  8194. "name": "workspace",
  8195. "in": "query",
  8196. "schema": {
  8197. "type": "string"
  8198. },
  8199. "required": false
  8200. }
  8201. ],
  8202. "responses": {
  8203. "200": {
  8204. "description": "Session selected successfully",
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "type": "boolean",
  8209. "description": "Session selected successfully"
  8210. }
  8211. }
  8212. }
  8213. },
  8214. "400": {
  8215. "description": "Bad request",
  8216. "content": {
  8217. "application/json": {
  8218. "schema": {
  8219. "$ref": "#/components/schemas/BadRequestError"
  8220. }
  8221. }
  8222. }
  8223. },
  8224. "404": {
  8225. "description": "NotFoundError",
  8226. "content": {
  8227. "application/json": {
  8228. "schema": {
  8229. "$ref": "#/components/schemas/NotFoundError"
  8230. }
  8231. }
  8232. }
  8233. }
  8234. },
  8235. "description": "Navigate the TUI to display the specified session.",
  8236. "summary": "Select session",
  8237. "requestBody": {
  8238. "content": {
  8239. "application/json": {
  8240. "schema": {
  8241. "type": "object",
  8242. "properties": {
  8243. "sessionID": {
  8244. "type": "string",
  8245. "pattern": "^ses",
  8246. "description": "Session ID to navigate to"
  8247. }
  8248. },
  8249. "required": ["sessionID"],
  8250. "additionalProperties": false
  8251. }
  8252. }
  8253. }
  8254. },
  8255. "x-codeSamples": [
  8256. {
  8257. "lang": "js",
  8258. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8259. }
  8260. ]
  8261. }
  8262. },
  8263. "/tui/control/next": {
  8264. "get": {
  8265. "tags": ["tui"],
  8266. "operationId": "tui.control.next",
  8267. "parameters": [
  8268. {
  8269. "name": "directory",
  8270. "in": "query",
  8271. "schema": {
  8272. "type": "string"
  8273. },
  8274. "required": false
  8275. },
  8276. {
  8277. "name": "workspace",
  8278. "in": "query",
  8279. "schema": {
  8280. "type": "string"
  8281. },
  8282. "required": false
  8283. }
  8284. ],
  8285. "responses": {
  8286. "200": {
  8287. "description": "Next TUI request",
  8288. "content": {
  8289. "application/json": {
  8290. "schema": {
  8291. "type": "object",
  8292. "properties": {
  8293. "path": {
  8294. "type": "string"
  8295. },
  8296. "body": {}
  8297. },
  8298. "required": ["path", "body"],
  8299. "additionalProperties": false,
  8300. "description": "Next TUI request"
  8301. }
  8302. }
  8303. }
  8304. }
  8305. },
  8306. "description": "Retrieve the next TUI request from the queue for processing.",
  8307. "summary": "Get next TUI request",
  8308. "x-codeSamples": [
  8309. {
  8310. "lang": "js",
  8311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8312. }
  8313. ]
  8314. }
  8315. },
  8316. "/tui/control/response": {
  8317. "post": {
  8318. "tags": ["tui"],
  8319. "operationId": "tui.control.response",
  8320. "parameters": [
  8321. {
  8322. "name": "directory",
  8323. "in": "query",
  8324. "schema": {
  8325. "type": "string"
  8326. },
  8327. "required": false
  8328. },
  8329. {
  8330. "name": "workspace",
  8331. "in": "query",
  8332. "schema": {
  8333. "type": "string"
  8334. },
  8335. "required": false
  8336. }
  8337. ],
  8338. "responses": {
  8339. "200": {
  8340. "description": "Response submitted successfully",
  8341. "content": {
  8342. "application/json": {
  8343. "schema": {
  8344. "type": "boolean",
  8345. "description": "Response submitted successfully"
  8346. }
  8347. }
  8348. }
  8349. }
  8350. },
  8351. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8352. "summary": "Submit TUI response",
  8353. "requestBody": {
  8354. "content": {
  8355. "application/json": {
  8356. "schema": {}
  8357. }
  8358. }
  8359. },
  8360. "x-codeSamples": [
  8361. {
  8362. "lang": "js",
  8363. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8364. }
  8365. ]
  8366. }
  8367. },
  8368. "/experimental/workspace/adapter": {
  8369. "get": {
  8370. "tags": ["workspace"],
  8371. "operationId": "experimental.workspace.adapter.list",
  8372. "parameters": [
  8373. {
  8374. "name": "directory",
  8375. "in": "query",
  8376. "schema": {
  8377. "type": "string"
  8378. },
  8379. "required": false
  8380. },
  8381. {
  8382. "name": "workspace",
  8383. "in": "query",
  8384. "schema": {
  8385. "type": "string"
  8386. },
  8387. "required": false
  8388. }
  8389. ],
  8390. "responses": {
  8391. "200": {
  8392. "description": "Workspace adapters",
  8393. "content": {
  8394. "application/json": {
  8395. "schema": {
  8396. "type": "array",
  8397. "items": {
  8398. "type": "object",
  8399. "properties": {
  8400. "type": {
  8401. "type": "string"
  8402. },
  8403. "name": {
  8404. "type": "string"
  8405. },
  8406. "description": {
  8407. "type": "string"
  8408. }
  8409. },
  8410. "required": ["type", "name", "description"],
  8411. "additionalProperties": false
  8412. },
  8413. "description": "Workspace adapters"
  8414. }
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "description": "List all available workspace adapters for the current project.",
  8420. "summary": "List workspace adapters",
  8421. "x-codeSamples": [
  8422. {
  8423. "lang": "js",
  8424. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8425. }
  8426. ]
  8427. }
  8428. },
  8429. "/experimental/workspace": {
  8430. "get": {
  8431. "tags": ["workspace"],
  8432. "operationId": "experimental.workspace.list",
  8433. "parameters": [
  8434. {
  8435. "name": "directory",
  8436. "in": "query",
  8437. "schema": {
  8438. "type": "string"
  8439. },
  8440. "required": false
  8441. },
  8442. {
  8443. "name": "workspace",
  8444. "in": "query",
  8445. "schema": {
  8446. "type": "string"
  8447. },
  8448. "required": false
  8449. }
  8450. ],
  8451. "responses": {
  8452. "200": {
  8453. "description": "Workspaces",
  8454. "content": {
  8455. "application/json": {
  8456. "schema": {
  8457. "type": "array",
  8458. "items": {
  8459. "$ref": "#/components/schemas/Workspace"
  8460. },
  8461. "description": "Workspaces"
  8462. }
  8463. }
  8464. }
  8465. }
  8466. },
  8467. "description": "List all workspaces.",
  8468. "summary": "List workspaces",
  8469. "x-codeSamples": [
  8470. {
  8471. "lang": "js",
  8472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8473. }
  8474. ]
  8475. },
  8476. "post": {
  8477. "tags": ["workspace"],
  8478. "operationId": "experimental.workspace.create",
  8479. "parameters": [
  8480. {
  8481. "name": "directory",
  8482. "in": "query",
  8483. "schema": {
  8484. "type": "string"
  8485. },
  8486. "required": false
  8487. },
  8488. {
  8489. "name": "workspace",
  8490. "in": "query",
  8491. "schema": {
  8492. "type": "string"
  8493. },
  8494. "required": false
  8495. }
  8496. ],
  8497. "responses": {
  8498. "200": {
  8499. "description": "Workspace created",
  8500. "content": {
  8501. "application/json": {
  8502. "schema": {
  8503. "$ref": "#/components/schemas/Workspace"
  8504. }
  8505. }
  8506. }
  8507. },
  8508. "400": {
  8509. "description": "Bad request",
  8510. "content": {
  8511. "application/json": {
  8512. "schema": {
  8513. "$ref": "#/components/schemas/BadRequestError"
  8514. }
  8515. }
  8516. }
  8517. }
  8518. },
  8519. "description": "Create a workspace for the current project.",
  8520. "summary": "Create workspace",
  8521. "requestBody": {
  8522. "content": {
  8523. "application/json": {
  8524. "schema": {
  8525. "type": "object",
  8526. "properties": {
  8527. "id": {
  8528. "type": "string",
  8529. "pattern": "^wrk"
  8530. },
  8531. "type": {
  8532. "type": "string"
  8533. },
  8534. "branch": {
  8535. "anyOf": [
  8536. {
  8537. "type": "string"
  8538. },
  8539. {
  8540. "type": "null"
  8541. }
  8542. ]
  8543. },
  8544. "extra": {
  8545. "anyOf": [
  8546. {},
  8547. {
  8548. "type": "null"
  8549. }
  8550. ]
  8551. }
  8552. },
  8553. "required": ["type"],
  8554. "additionalProperties": false
  8555. }
  8556. }
  8557. }
  8558. },
  8559. "x-codeSamples": [
  8560. {
  8561. "lang": "js",
  8562. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8563. }
  8564. ]
  8565. }
  8566. },
  8567. "/experimental/workspace/sync-list": {
  8568. "post": {
  8569. "tags": ["workspace"],
  8570. "operationId": "experimental.workspace.syncList",
  8571. "parameters": [
  8572. {
  8573. "name": "directory",
  8574. "in": "query",
  8575. "schema": {
  8576. "type": "string"
  8577. },
  8578. "required": false
  8579. },
  8580. {
  8581. "name": "workspace",
  8582. "in": "query",
  8583. "schema": {
  8584. "type": "string"
  8585. },
  8586. "required": false
  8587. }
  8588. ],
  8589. "responses": {
  8590. "204": {
  8591. "description": "Workspace list synced"
  8592. }
  8593. },
  8594. "description": "Register missing workspaces returned by workspace adapters.",
  8595. "summary": "Sync workspace list",
  8596. "x-codeSamples": [
  8597. {
  8598. "lang": "js",
  8599. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8600. }
  8601. ]
  8602. }
  8603. },
  8604. "/experimental/workspace/status": {
  8605. "get": {
  8606. "tags": ["workspace"],
  8607. "operationId": "experimental.workspace.status",
  8608. "parameters": [
  8609. {
  8610. "name": "directory",
  8611. "in": "query",
  8612. "schema": {
  8613. "type": "string"
  8614. },
  8615. "required": false
  8616. },
  8617. {
  8618. "name": "workspace",
  8619. "in": "query",
  8620. "schema": {
  8621. "type": "string"
  8622. },
  8623. "required": false
  8624. }
  8625. ],
  8626. "responses": {
  8627. "200": {
  8628. "description": "Workspace status",
  8629. "content": {
  8630. "application/json": {
  8631. "schema": {
  8632. "type": "array",
  8633. "items": {
  8634. "type": "object",
  8635. "properties": {
  8636. "workspaceID": {
  8637. "type": "string",
  8638. "pattern": "^wrk"
  8639. },
  8640. "status": {
  8641. "type": "string",
  8642. "enum": ["connected", "connecting", "disconnected", "error"]
  8643. }
  8644. },
  8645. "required": ["workspaceID", "status"],
  8646. "additionalProperties": false
  8647. },
  8648. "description": "Workspace status"
  8649. }
  8650. }
  8651. }
  8652. }
  8653. },
  8654. "description": "Get connection status for workspaces in the current project.",
  8655. "summary": "Workspace status",
  8656. "x-codeSamples": [
  8657. {
  8658. "lang": "js",
  8659. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8660. }
  8661. ]
  8662. }
  8663. },
  8664. "/experimental/workspace/{id}": {
  8665. "delete": {
  8666. "tags": ["workspace"],
  8667. "operationId": "experimental.workspace.remove",
  8668. "parameters": [
  8669. {
  8670. "name": "id",
  8671. "in": "path",
  8672. "schema": {
  8673. "type": "string",
  8674. "pattern": "^wrk"
  8675. },
  8676. "required": true
  8677. },
  8678. {
  8679. "name": "directory",
  8680. "in": "query",
  8681. "schema": {
  8682. "type": "string"
  8683. },
  8684. "required": false
  8685. },
  8686. {
  8687. "name": "workspace",
  8688. "in": "query",
  8689. "schema": {
  8690. "type": "string"
  8691. },
  8692. "required": false
  8693. }
  8694. ],
  8695. "responses": {
  8696. "200": {
  8697. "description": "Workspace removed",
  8698. "content": {
  8699. "application/json": {
  8700. "schema": {
  8701. "$ref": "#/components/schemas/Workspace"
  8702. }
  8703. }
  8704. }
  8705. },
  8706. "400": {
  8707. "description": "Bad request",
  8708. "content": {
  8709. "application/json": {
  8710. "schema": {
  8711. "$ref": "#/components/schemas/BadRequestError"
  8712. }
  8713. }
  8714. }
  8715. }
  8716. },
  8717. "description": "Remove an existing workspace.",
  8718. "summary": "Remove workspace",
  8719. "x-codeSamples": [
  8720. {
  8721. "lang": "js",
  8722. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8723. }
  8724. ]
  8725. }
  8726. },
  8727. "/experimental/workspace/warp": {
  8728. "post": {
  8729. "tags": ["workspace"],
  8730. "operationId": "experimental.workspace.warp",
  8731. "parameters": [
  8732. {
  8733. "name": "directory",
  8734. "in": "query",
  8735. "schema": {
  8736. "type": "string"
  8737. },
  8738. "required": false
  8739. },
  8740. {
  8741. "name": "workspace",
  8742. "in": "query",
  8743. "schema": {
  8744. "type": "string"
  8745. },
  8746. "required": false
  8747. }
  8748. ],
  8749. "responses": {
  8750. "204": {
  8751. "description": "Session warped"
  8752. },
  8753. "400": {
  8754. "description": "WorkspaceWarpError | VcsApplyError",
  8755. "content": {
  8756. "application/json": {
  8757. "schema": {
  8758. "anyOf": [
  8759. {
  8760. "$ref": "#/components/schemas/WorkspaceWarpError"
  8761. },
  8762. {
  8763. "$ref": "#/components/schemas/VcsApplyError"
  8764. }
  8765. ]
  8766. }
  8767. }
  8768. }
  8769. }
  8770. },
  8771. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8772. "summary": "Warp session into workspace",
  8773. "requestBody": {
  8774. "content": {
  8775. "application/json": {
  8776. "schema": {
  8777. "type": "object",
  8778. "properties": {
  8779. "id": {
  8780. "anyOf": [
  8781. {
  8782. "type": "string",
  8783. "pattern": "^wrk"
  8784. },
  8785. {
  8786. "type": "null"
  8787. }
  8788. ]
  8789. },
  8790. "sessionID": {
  8791. "type": "string",
  8792. "pattern": "^ses"
  8793. },
  8794. "copyChanges": {
  8795. "type": "boolean"
  8796. }
  8797. },
  8798. "required": ["id", "sessionID"],
  8799. "additionalProperties": false
  8800. }
  8801. }
  8802. }
  8803. },
  8804. "x-codeSamples": [
  8805. {
  8806. "lang": "js",
  8807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8808. }
  8809. ]
  8810. }
  8811. },
  8812. "/pty/{ptyID}/connect": {
  8813. "get": {
  8814. "tags": ["pty"],
  8815. "operationId": "pty.connect",
  8816. "parameters": [
  8817. {
  8818. "name": "ptyID",
  8819. "in": "path",
  8820. "schema": {
  8821. "type": "string",
  8822. "pattern": "^pty"
  8823. },
  8824. "required": true
  8825. },
  8826. {
  8827. "name": "directory",
  8828. "in": "query",
  8829. "schema": {
  8830. "type": "string"
  8831. },
  8832. "required": false
  8833. },
  8834. {
  8835. "name": "workspace",
  8836. "in": "query",
  8837. "schema": {
  8838. "type": "string"
  8839. },
  8840. "required": false
  8841. }
  8842. ],
  8843. "responses": {
  8844. "200": {
  8845. "description": "Connected session",
  8846. "content": {
  8847. "application/json": {
  8848. "schema": {
  8849. "type": "boolean",
  8850. "description": "Connected session"
  8851. }
  8852. }
  8853. }
  8854. },
  8855. "403": {
  8856. "description": "Forbidden",
  8857. "content": {
  8858. "application/json": {
  8859. "schema": {
  8860. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  8861. }
  8862. }
  8863. }
  8864. },
  8865. "404": {
  8866. "description": "Not found",
  8867. "content": {
  8868. "application/json": {
  8869. "schema": {
  8870. "$ref": "#/components/schemas/NotFoundError"
  8871. }
  8872. }
  8873. }
  8874. }
  8875. },
  8876. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  8877. "summary": "Connect to PTY session",
  8878. "x-codeSamples": [
  8879. {
  8880. "lang": "js",
  8881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  8882. }
  8883. ]
  8884. }
  8885. }
  8886. },
  8887. "components": {
  8888. "schemas": {
  8889. "Event": {
  8890. "anyOf": [
  8891. {
  8892. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  8893. },
  8894. {
  8895. "$ref": "#/components/schemas/EventFileEdited"
  8896. },
  8897. {
  8898. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  8899. },
  8900. {
  8901. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  8902. },
  8903. {
  8904. "$ref": "#/components/schemas/EventLspUpdated"
  8905. },
  8906. {
  8907. "$ref": "#/components/schemas/EventMessagePartDelta"
  8908. },
  8909. {
  8910. "$ref": "#/components/schemas/EventPermissionAsked"
  8911. },
  8912. {
  8913. "$ref": "#/components/schemas/EventPermissionReplied"
  8914. },
  8915. {
  8916. "$ref": "#/components/schemas/EventSessionDiff"
  8917. },
  8918. {
  8919. "$ref": "#/components/schemas/EventSessionError"
  8920. },
  8921. {
  8922. "$ref": "#/components/schemas/EventInstallationUpdated"
  8923. },
  8924. {
  8925. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  8926. },
  8927. {
  8928. "$ref": "#/components/schemas/EventQuestionAsked"
  8929. },
  8930. {
  8931. "$ref": "#/components/schemas/EventQuestionReplied"
  8932. },
  8933. {
  8934. "$ref": "#/components/schemas/EventQuestionRejected"
  8935. },
  8936. {
  8937. "$ref": "#/components/schemas/EventTodoUpdated"
  8938. },
  8939. {
  8940. "$ref": "#/components/schemas/EventSessionStatus"
  8941. },
  8942. {
  8943. "$ref": "#/components/schemas/EventSessionIdle"
  8944. },
  8945. {
  8946. "$ref": "#/components/schemas/EventSessionCompacted"
  8947. },
  8948. {
  8949. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8950. },
  8951. {
  8952. "$ref": "#/components/schemas/Event.tui.command.execute"
  8953. },
  8954. {
  8955. "$ref": "#/components/schemas/EventTuiToastShow1"
  8956. },
  8957. {
  8958. "$ref": "#/components/schemas/Event.tui.session.select"
  8959. },
  8960. {
  8961. "$ref": "#/components/schemas/EventMcpToolsChanged"
  8962. },
  8963. {
  8964. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  8965. },
  8966. {
  8967. "$ref": "#/components/schemas/EventCommandExecuted"
  8968. },
  8969. {
  8970. "$ref": "#/components/schemas/EventProjectUpdated"
  8971. },
  8972. {
  8973. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  8974. },
  8975. {
  8976. "$ref": "#/components/schemas/EventWorkspaceReady"
  8977. },
  8978. {
  8979. "$ref": "#/components/schemas/EventWorkspaceFailed"
  8980. },
  8981. {
  8982. "$ref": "#/components/schemas/EventWorkspaceStatus"
  8983. },
  8984. {
  8985. "$ref": "#/components/schemas/EventWorktreeReady"
  8986. },
  8987. {
  8988. "$ref": "#/components/schemas/EventWorktreeFailed"
  8989. },
  8990. {
  8991. "$ref": "#/components/schemas/EventPtyCreated"
  8992. },
  8993. {
  8994. "$ref": "#/components/schemas/EventPtyUpdated"
  8995. },
  8996. {
  8997. "$ref": "#/components/schemas/EventPtyExited"
  8998. },
  8999. {
  9000. "$ref": "#/components/schemas/EventPtyDeleted"
  9001. },
  9002. {
  9003. "$ref": "#/components/schemas/EventMessageUpdated"
  9004. },
  9005. {
  9006. "$ref": "#/components/schemas/EventMessageRemoved"
  9007. },
  9008. {
  9009. "$ref": "#/components/schemas/EventMessagePartUpdated"
  9010. },
  9011. {
  9012. "$ref": "#/components/schemas/EventMessagePartRemoved"
  9013. },
  9014. {
  9015. "$ref": "#/components/schemas/EventSessionCreated"
  9016. },
  9017. {
  9018. "$ref": "#/components/schemas/EventSessionUpdated"
  9019. },
  9020. {
  9021. "$ref": "#/components/schemas/EventSessionDeleted"
  9022. },
  9023. {
  9024. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9025. },
  9026. {
  9027. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9028. },
  9029. {
  9030. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9031. },
  9032. {
  9033. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9034. },
  9035. {
  9036. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9037. },
  9038. {
  9039. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9040. },
  9041. {
  9042. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9043. },
  9044. {
  9045. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9049. },
  9050. {
  9051. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9052. },
  9053. {
  9054. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9055. },
  9056. {
  9057. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9058. },
  9059. {
  9060. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9061. },
  9062. {
  9063. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9064. },
  9065. {
  9066. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9067. },
  9068. {
  9069. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9070. },
  9071. {
  9072. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9073. },
  9074. {
  9075. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9076. },
  9077. {
  9078. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9079. },
  9080. {
  9081. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9082. },
  9083. {
  9084. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9085. },
  9086. {
  9087. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9088. },
  9089. {
  9090. "$ref": "#/components/schemas/EventSessionNextRetried"
  9091. },
  9092. {
  9093. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9094. },
  9095. {
  9096. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9097. },
  9098. {
  9099. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9100. },
  9101. {
  9102. "$ref": "#/components/schemas/EventServerConnected"
  9103. },
  9104. {
  9105. "$ref": "#/components/schemas/EventGlobalDisposed"
  9106. }
  9107. ]
  9108. },
  9109. "OAuth": {
  9110. "type": "object",
  9111. "properties": {
  9112. "type": {
  9113. "type": "string",
  9114. "enum": ["oauth"]
  9115. },
  9116. "refresh": {
  9117. "type": "string"
  9118. },
  9119. "access": {
  9120. "type": "string"
  9121. },
  9122. "expires": {
  9123. "type": "integer",
  9124. "minimum": 0
  9125. },
  9126. "accountId": {
  9127. "type": "string"
  9128. },
  9129. "enterpriseUrl": {
  9130. "type": "string"
  9131. }
  9132. },
  9133. "required": ["type", "refresh", "access", "expires"],
  9134. "additionalProperties": false
  9135. },
  9136. "ApiAuth": {
  9137. "type": "object",
  9138. "properties": {
  9139. "type": {
  9140. "type": "string",
  9141. "enum": ["api"]
  9142. },
  9143. "key": {
  9144. "type": "string"
  9145. },
  9146. "metadata": {
  9147. "type": "object",
  9148. "additionalProperties": {
  9149. "type": "string"
  9150. }
  9151. }
  9152. },
  9153. "required": ["type", "key"],
  9154. "additionalProperties": false
  9155. },
  9156. "WellKnownAuth": {
  9157. "type": "object",
  9158. "properties": {
  9159. "type": {
  9160. "type": "string",
  9161. "enum": ["wellknown"]
  9162. },
  9163. "key": {
  9164. "type": "string"
  9165. },
  9166. "token": {
  9167. "type": "string"
  9168. }
  9169. },
  9170. "required": ["type", "key", "token"],
  9171. "additionalProperties": false
  9172. },
  9173. "Auth": {
  9174. "anyOf": [
  9175. {
  9176. "$ref": "#/components/schemas/OAuth"
  9177. },
  9178. {
  9179. "$ref": "#/components/schemas/ApiAuth"
  9180. },
  9181. {
  9182. "$ref": "#/components/schemas/WellKnownAuth"
  9183. }
  9184. ]
  9185. },
  9186. "PermissionRequest": {
  9187. "type": "object",
  9188. "properties": {
  9189. "id": {
  9190. "type": "string",
  9191. "pattern": "^per"
  9192. },
  9193. "sessionID": {
  9194. "type": "string",
  9195. "pattern": "^ses"
  9196. },
  9197. "permission": {
  9198. "type": "string"
  9199. },
  9200. "patterns": {
  9201. "type": "array",
  9202. "items": {
  9203. "type": "string"
  9204. }
  9205. },
  9206. "metadata": {
  9207. "type": "object"
  9208. },
  9209. "always": {
  9210. "type": "array",
  9211. "items": {
  9212. "type": "string"
  9213. }
  9214. },
  9215. "tool": {
  9216. "type": "object",
  9217. "properties": {
  9218. "messageID": {
  9219. "type": "string",
  9220. "pattern": "^msg"
  9221. },
  9222. "callID": {
  9223. "type": "string"
  9224. }
  9225. },
  9226. "required": ["messageID", "callID"],
  9227. "additionalProperties": false
  9228. }
  9229. },
  9230. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9231. "additionalProperties": false
  9232. },
  9233. "SnapshotFileDiff": {
  9234. "type": "object",
  9235. "properties": {
  9236. "file": {
  9237. "type": "string"
  9238. },
  9239. "patch": {
  9240. "type": "string"
  9241. },
  9242. "additions": {
  9243. "type": "number"
  9244. },
  9245. "deletions": {
  9246. "type": "number"
  9247. },
  9248. "status": {
  9249. "type": "string",
  9250. "enum": ["added", "deleted", "modified"]
  9251. }
  9252. },
  9253. "required": ["additions", "deletions"],
  9254. "additionalProperties": false
  9255. },
  9256. "ProviderAuthError": {
  9257. "type": "object",
  9258. "properties": {
  9259. "name": {
  9260. "type": "string",
  9261. "enum": ["ProviderAuthError"]
  9262. },
  9263. "data": {
  9264. "type": "object",
  9265. "properties": {
  9266. "providerID": {
  9267. "type": "string"
  9268. },
  9269. "message": {
  9270. "type": "string"
  9271. }
  9272. },
  9273. "required": ["providerID", "message"],
  9274. "additionalProperties": false
  9275. }
  9276. },
  9277. "required": ["name", "data"],
  9278. "additionalProperties": false
  9279. },
  9280. "UnknownError": {
  9281. "type": "object",
  9282. "properties": {
  9283. "name": {
  9284. "type": "string",
  9285. "enum": ["UnknownError"]
  9286. },
  9287. "data": {
  9288. "type": "object",
  9289. "properties": {
  9290. "message": {
  9291. "type": "string"
  9292. }
  9293. },
  9294. "required": ["message"],
  9295. "additionalProperties": false
  9296. }
  9297. },
  9298. "required": ["name", "data"],
  9299. "additionalProperties": false
  9300. },
  9301. "MessageOutputLengthError": {
  9302. "type": "object",
  9303. "properties": {
  9304. "name": {
  9305. "type": "string",
  9306. "enum": ["MessageOutputLengthError"]
  9307. },
  9308. "data": {
  9309. "type": "object",
  9310. "properties": {}
  9311. }
  9312. },
  9313. "required": ["name", "data"],
  9314. "additionalProperties": false
  9315. },
  9316. "MessageAbortedError": {
  9317. "type": "object",
  9318. "properties": {
  9319. "name": {
  9320. "type": "string",
  9321. "enum": ["MessageAbortedError"]
  9322. },
  9323. "data": {
  9324. "type": "object",
  9325. "properties": {
  9326. "message": {
  9327. "type": "string"
  9328. }
  9329. },
  9330. "required": ["message"],
  9331. "additionalProperties": false
  9332. }
  9333. },
  9334. "required": ["name", "data"],
  9335. "additionalProperties": false
  9336. },
  9337. "StructuredOutputError": {
  9338. "type": "object",
  9339. "properties": {
  9340. "name": {
  9341. "type": "string",
  9342. "enum": ["StructuredOutputError"]
  9343. },
  9344. "data": {
  9345. "type": "object",
  9346. "properties": {
  9347. "message": {
  9348. "type": "string"
  9349. },
  9350. "retries": {
  9351. "type": "integer",
  9352. "minimum": 0
  9353. }
  9354. },
  9355. "required": ["message", "retries"],
  9356. "additionalProperties": false
  9357. }
  9358. },
  9359. "required": ["name", "data"],
  9360. "additionalProperties": false
  9361. },
  9362. "ContextOverflowError": {
  9363. "type": "object",
  9364. "properties": {
  9365. "name": {
  9366. "type": "string",
  9367. "enum": ["ContextOverflowError"]
  9368. },
  9369. "data": {
  9370. "type": "object",
  9371. "properties": {
  9372. "message": {
  9373. "type": "string"
  9374. },
  9375. "responseBody": {
  9376. "type": "string"
  9377. }
  9378. },
  9379. "required": ["message"],
  9380. "additionalProperties": false
  9381. }
  9382. },
  9383. "required": ["name", "data"],
  9384. "additionalProperties": false
  9385. },
  9386. "APIError": {
  9387. "type": "object",
  9388. "properties": {
  9389. "name": {
  9390. "type": "string",
  9391. "enum": ["APIError"]
  9392. },
  9393. "data": {
  9394. "type": "object",
  9395. "properties": {
  9396. "message": {
  9397. "type": "string"
  9398. },
  9399. "statusCode": {
  9400. "type": "integer",
  9401. "minimum": 0
  9402. },
  9403. "isRetryable": {
  9404. "type": "boolean"
  9405. },
  9406. "responseHeaders": {
  9407. "type": "object",
  9408. "additionalProperties": {
  9409. "type": "string"
  9410. }
  9411. },
  9412. "responseBody": {
  9413. "type": "string"
  9414. },
  9415. "metadata": {
  9416. "type": "object",
  9417. "additionalProperties": {
  9418. "type": "string"
  9419. }
  9420. }
  9421. },
  9422. "required": ["message", "isRetryable"],
  9423. "additionalProperties": false
  9424. }
  9425. },
  9426. "required": ["name", "data"],
  9427. "additionalProperties": false
  9428. },
  9429. "QuestionOption": {
  9430. "type": "object",
  9431. "properties": {
  9432. "label": {
  9433. "type": "string",
  9434. "description": "Display text (1-5 words, concise)"
  9435. },
  9436. "description": {
  9437. "type": "string",
  9438. "description": "Explanation of choice"
  9439. }
  9440. },
  9441. "required": ["label", "description"],
  9442. "additionalProperties": false
  9443. },
  9444. "QuestionInfo": {
  9445. "type": "object",
  9446. "properties": {
  9447. "question": {
  9448. "type": "string",
  9449. "description": "Complete question"
  9450. },
  9451. "header": {
  9452. "type": "string",
  9453. "description": "Very short label (max 30 chars)"
  9454. },
  9455. "options": {
  9456. "type": "array",
  9457. "items": {
  9458. "$ref": "#/components/schemas/QuestionOption"
  9459. },
  9460. "description": "Available choices"
  9461. },
  9462. "multiple": {
  9463. "type": "boolean"
  9464. },
  9465. "custom": {
  9466. "type": "boolean"
  9467. }
  9468. },
  9469. "required": ["question", "header", "options"],
  9470. "additionalProperties": false
  9471. },
  9472. "QuestionTool": {
  9473. "type": "object",
  9474. "properties": {
  9475. "messageID": {
  9476. "type": "string",
  9477. "pattern": "^msg"
  9478. },
  9479. "callID": {
  9480. "type": "string"
  9481. }
  9482. },
  9483. "required": ["messageID", "callID"],
  9484. "additionalProperties": false
  9485. },
  9486. "QuestionRequest": {
  9487. "type": "object",
  9488. "properties": {
  9489. "id": {
  9490. "type": "string",
  9491. "pattern": "^que"
  9492. },
  9493. "sessionID": {
  9494. "type": "string",
  9495. "pattern": "^ses"
  9496. },
  9497. "questions": {
  9498. "type": "array",
  9499. "items": {
  9500. "$ref": "#/components/schemas/QuestionInfo"
  9501. },
  9502. "description": "Questions to ask"
  9503. },
  9504. "tool": {
  9505. "$ref": "#/components/schemas/QuestionTool"
  9506. }
  9507. },
  9508. "required": ["id", "sessionID", "questions"],
  9509. "additionalProperties": false
  9510. },
  9511. "QuestionAnswer": {
  9512. "type": "array",
  9513. "items": {
  9514. "type": "string"
  9515. }
  9516. },
  9517. "QuestionReplied": {
  9518. "type": "object",
  9519. "properties": {
  9520. "sessionID": {
  9521. "type": "string",
  9522. "pattern": "^ses"
  9523. },
  9524. "requestID": {
  9525. "type": "string",
  9526. "pattern": "^que"
  9527. },
  9528. "answers": {
  9529. "type": "array",
  9530. "items": {
  9531. "$ref": "#/components/schemas/QuestionAnswer"
  9532. }
  9533. }
  9534. },
  9535. "required": ["sessionID", "requestID", "answers"],
  9536. "additionalProperties": false
  9537. },
  9538. "QuestionRejected": {
  9539. "type": "object",
  9540. "properties": {
  9541. "sessionID": {
  9542. "type": "string",
  9543. "pattern": "^ses"
  9544. },
  9545. "requestID": {
  9546. "type": "string",
  9547. "pattern": "^que"
  9548. }
  9549. },
  9550. "required": ["sessionID", "requestID"],
  9551. "additionalProperties": false
  9552. },
  9553. "Todo": {
  9554. "type": "object",
  9555. "properties": {
  9556. "content": {
  9557. "type": "string",
  9558. "description": "Brief description of the task"
  9559. },
  9560. "status": {
  9561. "type": "string",
  9562. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9563. },
  9564. "priority": {
  9565. "type": "string",
  9566. "description": "Priority level of the task: high, medium, low"
  9567. }
  9568. },
  9569. "required": ["content", "status", "priority"],
  9570. "additionalProperties": false
  9571. },
  9572. "SessionStatus": {
  9573. "anyOf": [
  9574. {
  9575. "type": "object",
  9576. "properties": {
  9577. "type": {
  9578. "type": "string",
  9579. "enum": ["idle"]
  9580. }
  9581. },
  9582. "required": ["type"],
  9583. "additionalProperties": false
  9584. },
  9585. {
  9586. "type": "object",
  9587. "properties": {
  9588. "type": {
  9589. "type": "string",
  9590. "enum": ["retry"]
  9591. },
  9592. "attempt": {
  9593. "type": "integer",
  9594. "minimum": 0
  9595. },
  9596. "message": {
  9597. "type": "string"
  9598. },
  9599. "action": {
  9600. "type": "object",
  9601. "properties": {
  9602. "reason": {
  9603. "type": "string"
  9604. },
  9605. "provider": {
  9606. "type": "string"
  9607. },
  9608. "title": {
  9609. "type": "string"
  9610. },
  9611. "message": {
  9612. "type": "string"
  9613. },
  9614. "label": {
  9615. "type": "string"
  9616. },
  9617. "link": {
  9618. "type": "string"
  9619. }
  9620. },
  9621. "required": ["reason", "provider", "title", "message", "label"],
  9622. "additionalProperties": false
  9623. },
  9624. "next": {
  9625. "type": "integer",
  9626. "minimum": 0
  9627. }
  9628. },
  9629. "required": ["type", "attempt", "message", "next"],
  9630. "additionalProperties": false
  9631. },
  9632. {
  9633. "type": "object",
  9634. "properties": {
  9635. "type": {
  9636. "type": "string",
  9637. "enum": ["busy"]
  9638. }
  9639. },
  9640. "required": ["type"],
  9641. "additionalProperties": false
  9642. }
  9643. ]
  9644. },
  9645. "Event.tui.prompt.append": {
  9646. "type": "object",
  9647. "properties": {
  9648. "id": {
  9649. "type": "string"
  9650. },
  9651. "type": {
  9652. "type": "string",
  9653. "enum": ["tui.prompt.append"]
  9654. },
  9655. "properties": {
  9656. "type": "object",
  9657. "properties": {
  9658. "text": {
  9659. "type": "string"
  9660. }
  9661. },
  9662. "required": ["text"],
  9663. "additionalProperties": false
  9664. }
  9665. },
  9666. "required": ["id", "type", "properties"],
  9667. "additionalProperties": false
  9668. },
  9669. "Event.tui.command.execute": {
  9670. "type": "object",
  9671. "properties": {
  9672. "id": {
  9673. "type": "string"
  9674. },
  9675. "type": {
  9676. "type": "string",
  9677. "enum": ["tui.command.execute"]
  9678. },
  9679. "properties": {
  9680. "type": "object",
  9681. "properties": {
  9682. "command": {
  9683. "anyOf": [
  9684. {
  9685. "type": "string",
  9686. "enum": [
  9687. "session.list",
  9688. "session.new",
  9689. "session.share",
  9690. "session.interrupt",
  9691. "session.compact",
  9692. "session.page.up",
  9693. "session.page.down",
  9694. "session.line.up",
  9695. "session.line.down",
  9696. "session.half.page.up",
  9697. "session.half.page.down",
  9698. "session.first",
  9699. "session.last",
  9700. "prompt.clear",
  9701. "prompt.submit",
  9702. "agent.cycle"
  9703. ]
  9704. },
  9705. {
  9706. "type": "string"
  9707. }
  9708. ]
  9709. }
  9710. },
  9711. "required": ["command"],
  9712. "additionalProperties": false
  9713. }
  9714. },
  9715. "required": ["id", "type", "properties"],
  9716. "additionalProperties": false
  9717. },
  9718. "Event.tui.toast.show": {
  9719. "type": "object",
  9720. "properties": {
  9721. "id": {
  9722. "type": "string"
  9723. },
  9724. "type": {
  9725. "type": "string",
  9726. "enum": ["tui.toast.show"]
  9727. },
  9728. "properties": {
  9729. "type": "object",
  9730. "properties": {
  9731. "title": {
  9732. "type": "string"
  9733. },
  9734. "message": {
  9735. "type": "string"
  9736. },
  9737. "variant": {
  9738. "type": "string",
  9739. "enum": ["info", "success", "warning", "error"]
  9740. },
  9741. "duration": {
  9742. "type": "integer",
  9743. "exclusiveMinimum": 0
  9744. }
  9745. },
  9746. "required": ["message", "variant"],
  9747. "additionalProperties": false
  9748. }
  9749. },
  9750. "required": ["id", "type", "properties"],
  9751. "additionalProperties": false
  9752. },
  9753. "Event.tui.session.select": {
  9754. "type": "object",
  9755. "properties": {
  9756. "id": {
  9757. "type": "string"
  9758. },
  9759. "type": {
  9760. "type": "string",
  9761. "enum": ["tui.session.select"]
  9762. },
  9763. "properties": {
  9764. "type": "object",
  9765. "properties": {
  9766. "sessionID": {
  9767. "type": "string",
  9768. "pattern": "^ses",
  9769. "description": "Session ID to navigate to"
  9770. }
  9771. },
  9772. "required": ["sessionID"],
  9773. "additionalProperties": false
  9774. }
  9775. },
  9776. "required": ["id", "type", "properties"],
  9777. "additionalProperties": false
  9778. },
  9779. "Project": {
  9780. "type": "object",
  9781. "properties": {
  9782. "id": {
  9783. "type": "string"
  9784. },
  9785. "worktree": {
  9786. "type": "string"
  9787. },
  9788. "vcs": {
  9789. "type": "string",
  9790. "enum": ["git"]
  9791. },
  9792. "name": {
  9793. "type": "string"
  9794. },
  9795. "icon": {
  9796. "type": "object",
  9797. "properties": {
  9798. "url": {
  9799. "type": "string"
  9800. },
  9801. "override": {
  9802. "type": "string"
  9803. },
  9804. "color": {
  9805. "type": "string"
  9806. }
  9807. },
  9808. "additionalProperties": false
  9809. },
  9810. "commands": {
  9811. "type": "object",
  9812. "properties": {
  9813. "start": {
  9814. "type": "string",
  9815. "description": "Startup script to run when creating a new workspace (worktree)"
  9816. }
  9817. },
  9818. "additionalProperties": false
  9819. },
  9820. "time": {
  9821. "type": "object",
  9822. "properties": {
  9823. "created": {
  9824. "type": "integer",
  9825. "minimum": 0
  9826. },
  9827. "updated": {
  9828. "type": "integer",
  9829. "minimum": 0
  9830. },
  9831. "initialized": {
  9832. "type": "integer",
  9833. "minimum": 0
  9834. }
  9835. },
  9836. "required": ["created", "updated"],
  9837. "additionalProperties": false
  9838. },
  9839. "sandboxes": {
  9840. "type": "array",
  9841. "items": {
  9842. "type": "string"
  9843. }
  9844. }
  9845. },
  9846. "required": ["id", "worktree", "time", "sandboxes"],
  9847. "additionalProperties": false
  9848. },
  9849. "Pty": {
  9850. "type": "object",
  9851. "properties": {
  9852. "id": {
  9853. "type": "string",
  9854. "pattern": "^pty"
  9855. },
  9856. "title": {
  9857. "type": "string"
  9858. },
  9859. "command": {
  9860. "type": "string"
  9861. },
  9862. "args": {
  9863. "type": "array",
  9864. "items": {
  9865. "type": "string"
  9866. }
  9867. },
  9868. "cwd": {
  9869. "type": "string"
  9870. },
  9871. "status": {
  9872. "type": "string",
  9873. "enum": ["running", "exited"]
  9874. },
  9875. "pid": {
  9876. "type": "integer",
  9877. "exclusiveMinimum": 0
  9878. }
  9879. },
  9880. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  9881. "additionalProperties": false
  9882. },
  9883. "OutputFormatText": {
  9884. "type": "object",
  9885. "properties": {
  9886. "type": {
  9887. "type": "string",
  9888. "enum": ["text"]
  9889. }
  9890. },
  9891. "required": ["type"],
  9892. "additionalProperties": false
  9893. },
  9894. "JSONSchema": {
  9895. "type": "object"
  9896. },
  9897. "OutputFormatJsonSchema": {
  9898. "type": "object",
  9899. "properties": {
  9900. "type": {
  9901. "type": "string",
  9902. "enum": ["json_schema"]
  9903. },
  9904. "schema": {
  9905. "$ref": "#/components/schemas/JSONSchema"
  9906. },
  9907. "retryCount": {
  9908. "type": "integer",
  9909. "minimum": 0
  9910. }
  9911. },
  9912. "required": ["type", "schema"],
  9913. "additionalProperties": false
  9914. },
  9915. "OutputFormat": {
  9916. "anyOf": [
  9917. {
  9918. "$ref": "#/components/schemas/OutputFormatText"
  9919. },
  9920. {
  9921. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  9922. }
  9923. ]
  9924. },
  9925. "UserMessage": {
  9926. "type": "object",
  9927. "properties": {
  9928. "id": {
  9929. "type": "string",
  9930. "pattern": "^msg"
  9931. },
  9932. "sessionID": {
  9933. "type": "string",
  9934. "pattern": "^ses"
  9935. },
  9936. "role": {
  9937. "type": "string",
  9938. "enum": ["user"]
  9939. },
  9940. "time": {
  9941. "type": "object",
  9942. "properties": {
  9943. "created": {
  9944. "type": "integer",
  9945. "minimum": 0
  9946. }
  9947. },
  9948. "required": ["created"],
  9949. "additionalProperties": false
  9950. },
  9951. "format": {
  9952. "$ref": "#/components/schemas/OutputFormat"
  9953. },
  9954. "summary": {
  9955. "type": "object",
  9956. "properties": {
  9957. "title": {
  9958. "type": "string"
  9959. },
  9960. "body": {
  9961. "type": "string"
  9962. },
  9963. "diffs": {
  9964. "type": "array",
  9965. "items": {
  9966. "$ref": "#/components/schemas/SnapshotFileDiff"
  9967. }
  9968. }
  9969. },
  9970. "required": ["diffs"],
  9971. "additionalProperties": false
  9972. },
  9973. "agent": {
  9974. "type": "string"
  9975. },
  9976. "model": {
  9977. "type": "object",
  9978. "properties": {
  9979. "providerID": {
  9980. "type": "string"
  9981. },
  9982. "modelID": {
  9983. "type": "string"
  9984. },
  9985. "variant": {
  9986. "type": "string"
  9987. }
  9988. },
  9989. "required": ["providerID", "modelID"],
  9990. "additionalProperties": false
  9991. },
  9992. "system": {
  9993. "type": "string"
  9994. },
  9995. "tools": {
  9996. "type": "object",
  9997. "additionalProperties": {
  9998. "type": "boolean"
  9999. }
  10000. }
  10001. },
  10002. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  10003. "additionalProperties": false
  10004. },
  10005. "AssistantMessage": {
  10006. "type": "object",
  10007. "properties": {
  10008. "id": {
  10009. "type": "string",
  10010. "pattern": "^msg"
  10011. },
  10012. "sessionID": {
  10013. "type": "string",
  10014. "pattern": "^ses"
  10015. },
  10016. "role": {
  10017. "type": "string",
  10018. "enum": ["assistant"]
  10019. },
  10020. "time": {
  10021. "type": "object",
  10022. "properties": {
  10023. "created": {
  10024. "type": "integer",
  10025. "minimum": 0
  10026. },
  10027. "completed": {
  10028. "type": "integer",
  10029. "minimum": 0
  10030. }
  10031. },
  10032. "required": ["created"],
  10033. "additionalProperties": false
  10034. },
  10035. "error": {
  10036. "anyOf": [
  10037. {
  10038. "$ref": "#/components/schemas/ProviderAuthError"
  10039. },
  10040. {
  10041. "$ref": "#/components/schemas/UnknownError"
  10042. },
  10043. {
  10044. "$ref": "#/components/schemas/MessageOutputLengthError"
  10045. },
  10046. {
  10047. "$ref": "#/components/schemas/MessageAbortedError"
  10048. },
  10049. {
  10050. "$ref": "#/components/schemas/StructuredOutputError"
  10051. },
  10052. {
  10053. "$ref": "#/components/schemas/ContextOverflowError"
  10054. },
  10055. {
  10056. "$ref": "#/components/schemas/APIError"
  10057. }
  10058. ]
  10059. },
  10060. "parentID": {
  10061. "type": "string",
  10062. "pattern": "^msg"
  10063. },
  10064. "modelID": {
  10065. "type": "string"
  10066. },
  10067. "providerID": {
  10068. "type": "string"
  10069. },
  10070. "mode": {
  10071. "type": "string"
  10072. },
  10073. "agent": {
  10074. "type": "string"
  10075. },
  10076. "path": {
  10077. "type": "object",
  10078. "properties": {
  10079. "cwd": {
  10080. "type": "string"
  10081. },
  10082. "root": {
  10083. "type": "string"
  10084. }
  10085. },
  10086. "required": ["cwd", "root"],
  10087. "additionalProperties": false
  10088. },
  10089. "summary": {
  10090. "type": "boolean"
  10091. },
  10092. "cost": {
  10093. "type": "number"
  10094. },
  10095. "tokens": {
  10096. "type": "object",
  10097. "properties": {
  10098. "total": {
  10099. "type": "number"
  10100. },
  10101. "input": {
  10102. "type": "number"
  10103. },
  10104. "output": {
  10105. "type": "number"
  10106. },
  10107. "reasoning": {
  10108. "type": "number"
  10109. },
  10110. "cache": {
  10111. "type": "object",
  10112. "properties": {
  10113. "read": {
  10114. "type": "number"
  10115. },
  10116. "write": {
  10117. "type": "number"
  10118. }
  10119. },
  10120. "required": ["read", "write"],
  10121. "additionalProperties": false
  10122. }
  10123. },
  10124. "required": ["input", "output", "reasoning", "cache"],
  10125. "additionalProperties": false
  10126. },
  10127. "structured": {},
  10128. "variant": {
  10129. "type": "string"
  10130. },
  10131. "finish": {
  10132. "type": "string"
  10133. }
  10134. },
  10135. "required": [
  10136. "id",
  10137. "sessionID",
  10138. "role",
  10139. "time",
  10140. "parentID",
  10141. "modelID",
  10142. "providerID",
  10143. "mode",
  10144. "agent",
  10145. "path",
  10146. "cost",
  10147. "tokens"
  10148. ],
  10149. "additionalProperties": false
  10150. },
  10151. "Message": {
  10152. "anyOf": [
  10153. {
  10154. "$ref": "#/components/schemas/UserMessage"
  10155. },
  10156. {
  10157. "$ref": "#/components/schemas/AssistantMessage"
  10158. }
  10159. ]
  10160. },
  10161. "TextPart": {
  10162. "type": "object",
  10163. "properties": {
  10164. "id": {
  10165. "type": "string",
  10166. "pattern": "^prt"
  10167. },
  10168. "sessionID": {
  10169. "type": "string",
  10170. "pattern": "^ses"
  10171. },
  10172. "messageID": {
  10173. "type": "string",
  10174. "pattern": "^msg"
  10175. },
  10176. "type": {
  10177. "type": "string",
  10178. "enum": ["text"]
  10179. },
  10180. "text": {
  10181. "type": "string"
  10182. },
  10183. "synthetic": {
  10184. "type": "boolean"
  10185. },
  10186. "ignored": {
  10187. "type": "boolean"
  10188. },
  10189. "time": {
  10190. "type": "object",
  10191. "properties": {
  10192. "start": {
  10193. "type": "integer",
  10194. "minimum": 0
  10195. },
  10196. "end": {
  10197. "type": "integer",
  10198. "minimum": 0
  10199. }
  10200. },
  10201. "required": ["start"],
  10202. "additionalProperties": false
  10203. },
  10204. "metadata": {
  10205. "type": "object"
  10206. }
  10207. },
  10208. "required": ["id", "sessionID", "messageID", "type", "text"],
  10209. "additionalProperties": false
  10210. },
  10211. "SubtaskPart": {
  10212. "type": "object",
  10213. "properties": {
  10214. "id": {
  10215. "type": "string",
  10216. "pattern": "^prt"
  10217. },
  10218. "sessionID": {
  10219. "type": "string",
  10220. "pattern": "^ses"
  10221. },
  10222. "messageID": {
  10223. "type": "string",
  10224. "pattern": "^msg"
  10225. },
  10226. "type": {
  10227. "type": "string",
  10228. "enum": ["subtask"]
  10229. },
  10230. "prompt": {
  10231. "type": "string"
  10232. },
  10233. "description": {
  10234. "type": "string"
  10235. },
  10236. "agent": {
  10237. "type": "string"
  10238. },
  10239. "model": {
  10240. "type": "object",
  10241. "properties": {
  10242. "providerID": {
  10243. "type": "string"
  10244. },
  10245. "modelID": {
  10246. "type": "string"
  10247. }
  10248. },
  10249. "required": ["providerID", "modelID"],
  10250. "additionalProperties": false
  10251. },
  10252. "command": {
  10253. "type": "string"
  10254. }
  10255. },
  10256. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10257. "additionalProperties": false
  10258. },
  10259. "ReasoningPart": {
  10260. "type": "object",
  10261. "properties": {
  10262. "id": {
  10263. "type": "string",
  10264. "pattern": "^prt"
  10265. },
  10266. "sessionID": {
  10267. "type": "string",
  10268. "pattern": "^ses"
  10269. },
  10270. "messageID": {
  10271. "type": "string",
  10272. "pattern": "^msg"
  10273. },
  10274. "type": {
  10275. "type": "string",
  10276. "enum": ["reasoning"]
  10277. },
  10278. "text": {
  10279. "type": "string"
  10280. },
  10281. "metadata": {
  10282. "type": "object"
  10283. },
  10284. "time": {
  10285. "type": "object",
  10286. "properties": {
  10287. "start": {
  10288. "type": "integer",
  10289. "minimum": 0
  10290. },
  10291. "end": {
  10292. "type": "integer",
  10293. "minimum": 0
  10294. }
  10295. },
  10296. "required": ["start"],
  10297. "additionalProperties": false
  10298. }
  10299. },
  10300. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10301. "additionalProperties": false
  10302. },
  10303. "FilePartSourceText": {
  10304. "type": "object",
  10305. "properties": {
  10306. "value": {
  10307. "type": "string"
  10308. },
  10309. "start": {
  10310. "type": "number"
  10311. },
  10312. "end": {
  10313. "type": "number"
  10314. }
  10315. },
  10316. "required": ["value", "start", "end"],
  10317. "additionalProperties": false
  10318. },
  10319. "FileSource": {
  10320. "type": "object",
  10321. "properties": {
  10322. "text": {
  10323. "$ref": "#/components/schemas/FilePartSourceText"
  10324. },
  10325. "type": {
  10326. "type": "string",
  10327. "enum": ["file"]
  10328. },
  10329. "path": {
  10330. "type": "string"
  10331. }
  10332. },
  10333. "required": ["text", "type", "path"],
  10334. "additionalProperties": false
  10335. },
  10336. "Range": {
  10337. "type": "object",
  10338. "properties": {
  10339. "start": {
  10340. "type": "object",
  10341. "properties": {
  10342. "line": {
  10343. "type": "integer",
  10344. "minimum": 0
  10345. },
  10346. "character": {
  10347. "type": "integer",
  10348. "minimum": 0
  10349. }
  10350. },
  10351. "required": ["line", "character"],
  10352. "additionalProperties": false
  10353. },
  10354. "end": {
  10355. "type": "object",
  10356. "properties": {
  10357. "line": {
  10358. "type": "integer",
  10359. "minimum": 0
  10360. },
  10361. "character": {
  10362. "type": "integer",
  10363. "minimum": 0
  10364. }
  10365. },
  10366. "required": ["line", "character"],
  10367. "additionalProperties": false
  10368. }
  10369. },
  10370. "required": ["start", "end"],
  10371. "additionalProperties": false
  10372. },
  10373. "SymbolSource": {
  10374. "type": "object",
  10375. "properties": {
  10376. "text": {
  10377. "$ref": "#/components/schemas/FilePartSourceText"
  10378. },
  10379. "type": {
  10380. "type": "string",
  10381. "enum": ["symbol"]
  10382. },
  10383. "path": {
  10384. "type": "string"
  10385. },
  10386. "range": {
  10387. "$ref": "#/components/schemas/Range"
  10388. },
  10389. "name": {
  10390. "type": "string"
  10391. },
  10392. "kind": {
  10393. "type": "integer",
  10394. "minimum": 0
  10395. }
  10396. },
  10397. "required": ["text", "type", "path", "range", "name", "kind"],
  10398. "additionalProperties": false
  10399. },
  10400. "ResourceSource": {
  10401. "type": "object",
  10402. "properties": {
  10403. "text": {
  10404. "$ref": "#/components/schemas/FilePartSourceText"
  10405. },
  10406. "type": {
  10407. "type": "string",
  10408. "enum": ["resource"]
  10409. },
  10410. "clientName": {
  10411. "type": "string"
  10412. },
  10413. "uri": {
  10414. "type": "string"
  10415. }
  10416. },
  10417. "required": ["text", "type", "clientName", "uri"],
  10418. "additionalProperties": false
  10419. },
  10420. "FilePartSource": {
  10421. "anyOf": [
  10422. {
  10423. "$ref": "#/components/schemas/FileSource"
  10424. },
  10425. {
  10426. "$ref": "#/components/schemas/SymbolSource"
  10427. },
  10428. {
  10429. "$ref": "#/components/schemas/ResourceSource"
  10430. }
  10431. ]
  10432. },
  10433. "FilePart": {
  10434. "type": "object",
  10435. "properties": {
  10436. "id": {
  10437. "type": "string",
  10438. "pattern": "^prt"
  10439. },
  10440. "sessionID": {
  10441. "type": "string",
  10442. "pattern": "^ses"
  10443. },
  10444. "messageID": {
  10445. "type": "string",
  10446. "pattern": "^msg"
  10447. },
  10448. "type": {
  10449. "type": "string",
  10450. "enum": ["file"]
  10451. },
  10452. "mime": {
  10453. "type": "string"
  10454. },
  10455. "filename": {
  10456. "type": "string"
  10457. },
  10458. "url": {
  10459. "type": "string"
  10460. },
  10461. "source": {
  10462. "$ref": "#/components/schemas/FilePartSource"
  10463. }
  10464. },
  10465. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10466. "additionalProperties": false
  10467. },
  10468. "ToolStatePending": {
  10469. "type": "object",
  10470. "properties": {
  10471. "status": {
  10472. "type": "string",
  10473. "enum": ["pending"]
  10474. },
  10475. "input": {
  10476. "type": "object"
  10477. },
  10478. "raw": {
  10479. "type": "string"
  10480. }
  10481. },
  10482. "required": ["status", "input", "raw"],
  10483. "additionalProperties": false
  10484. },
  10485. "ToolStateRunning": {
  10486. "type": "object",
  10487. "properties": {
  10488. "status": {
  10489. "type": "string",
  10490. "enum": ["running"]
  10491. },
  10492. "input": {
  10493. "type": "object"
  10494. },
  10495. "title": {
  10496. "type": "string"
  10497. },
  10498. "metadata": {
  10499. "type": "object"
  10500. },
  10501. "time": {
  10502. "type": "object",
  10503. "properties": {
  10504. "start": {
  10505. "type": "integer",
  10506. "minimum": 0
  10507. }
  10508. },
  10509. "required": ["start"],
  10510. "additionalProperties": false
  10511. }
  10512. },
  10513. "required": ["status", "input", "time"],
  10514. "additionalProperties": false
  10515. },
  10516. "ToolStateCompleted": {
  10517. "type": "object",
  10518. "properties": {
  10519. "status": {
  10520. "type": "string",
  10521. "enum": ["completed"]
  10522. },
  10523. "input": {
  10524. "type": "object"
  10525. },
  10526. "output": {
  10527. "type": "string"
  10528. },
  10529. "title": {
  10530. "type": "string"
  10531. },
  10532. "metadata": {
  10533. "type": "object"
  10534. },
  10535. "time": {
  10536. "type": "object",
  10537. "properties": {
  10538. "start": {
  10539. "type": "integer",
  10540. "minimum": 0
  10541. },
  10542. "end": {
  10543. "type": "integer",
  10544. "minimum": 0
  10545. },
  10546. "compacted": {
  10547. "type": "integer",
  10548. "minimum": 0
  10549. }
  10550. },
  10551. "required": ["start", "end"],
  10552. "additionalProperties": false
  10553. },
  10554. "attachments": {
  10555. "type": "array",
  10556. "items": {
  10557. "$ref": "#/components/schemas/FilePart"
  10558. }
  10559. }
  10560. },
  10561. "required": ["status", "input", "output", "title", "metadata", "time"],
  10562. "additionalProperties": false
  10563. },
  10564. "ToolStateError": {
  10565. "type": "object",
  10566. "properties": {
  10567. "status": {
  10568. "type": "string",
  10569. "enum": ["error"]
  10570. },
  10571. "input": {
  10572. "type": "object"
  10573. },
  10574. "error": {
  10575. "type": "string"
  10576. },
  10577. "metadata": {
  10578. "type": "object"
  10579. },
  10580. "time": {
  10581. "type": "object",
  10582. "properties": {
  10583. "start": {
  10584. "type": "integer",
  10585. "minimum": 0
  10586. },
  10587. "end": {
  10588. "type": "integer",
  10589. "minimum": 0
  10590. }
  10591. },
  10592. "required": ["start", "end"],
  10593. "additionalProperties": false
  10594. }
  10595. },
  10596. "required": ["status", "input", "error", "time"],
  10597. "additionalProperties": false
  10598. },
  10599. "ToolState": {
  10600. "anyOf": [
  10601. {
  10602. "$ref": "#/components/schemas/ToolStatePending"
  10603. },
  10604. {
  10605. "$ref": "#/components/schemas/ToolStateRunning"
  10606. },
  10607. {
  10608. "$ref": "#/components/schemas/ToolStateCompleted"
  10609. },
  10610. {
  10611. "$ref": "#/components/schemas/ToolStateError"
  10612. }
  10613. ]
  10614. },
  10615. "ToolPart": {
  10616. "type": "object",
  10617. "properties": {
  10618. "id": {
  10619. "type": "string",
  10620. "pattern": "^prt"
  10621. },
  10622. "sessionID": {
  10623. "type": "string",
  10624. "pattern": "^ses"
  10625. },
  10626. "messageID": {
  10627. "type": "string",
  10628. "pattern": "^msg"
  10629. },
  10630. "type": {
  10631. "type": "string",
  10632. "enum": ["tool"]
  10633. },
  10634. "callID": {
  10635. "type": "string"
  10636. },
  10637. "tool": {
  10638. "type": "string"
  10639. },
  10640. "state": {
  10641. "$ref": "#/components/schemas/ToolState"
  10642. },
  10643. "metadata": {
  10644. "type": "object"
  10645. }
  10646. },
  10647. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10648. "additionalProperties": false
  10649. },
  10650. "StepStartPart": {
  10651. "type": "object",
  10652. "properties": {
  10653. "id": {
  10654. "type": "string",
  10655. "pattern": "^prt"
  10656. },
  10657. "sessionID": {
  10658. "type": "string",
  10659. "pattern": "^ses"
  10660. },
  10661. "messageID": {
  10662. "type": "string",
  10663. "pattern": "^msg"
  10664. },
  10665. "type": {
  10666. "type": "string",
  10667. "enum": ["step-start"]
  10668. },
  10669. "snapshot": {
  10670. "type": "string"
  10671. }
  10672. },
  10673. "required": ["id", "sessionID", "messageID", "type"],
  10674. "additionalProperties": false
  10675. },
  10676. "StepFinishPart": {
  10677. "type": "object",
  10678. "properties": {
  10679. "id": {
  10680. "type": "string",
  10681. "pattern": "^prt"
  10682. },
  10683. "sessionID": {
  10684. "type": "string",
  10685. "pattern": "^ses"
  10686. },
  10687. "messageID": {
  10688. "type": "string",
  10689. "pattern": "^msg"
  10690. },
  10691. "type": {
  10692. "type": "string",
  10693. "enum": ["step-finish"]
  10694. },
  10695. "reason": {
  10696. "type": "string"
  10697. },
  10698. "snapshot": {
  10699. "type": "string"
  10700. },
  10701. "cost": {
  10702. "type": "number"
  10703. },
  10704. "tokens": {
  10705. "type": "object",
  10706. "properties": {
  10707. "total": {
  10708. "type": "number"
  10709. },
  10710. "input": {
  10711. "type": "number"
  10712. },
  10713. "output": {
  10714. "type": "number"
  10715. },
  10716. "reasoning": {
  10717. "type": "number"
  10718. },
  10719. "cache": {
  10720. "type": "object",
  10721. "properties": {
  10722. "read": {
  10723. "type": "number"
  10724. },
  10725. "write": {
  10726. "type": "number"
  10727. }
  10728. },
  10729. "required": ["read", "write"],
  10730. "additionalProperties": false
  10731. }
  10732. },
  10733. "required": ["input", "output", "reasoning", "cache"],
  10734. "additionalProperties": false
  10735. }
  10736. },
  10737. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10738. "additionalProperties": false
  10739. },
  10740. "SnapshotPart": {
  10741. "type": "object",
  10742. "properties": {
  10743. "id": {
  10744. "type": "string",
  10745. "pattern": "^prt"
  10746. },
  10747. "sessionID": {
  10748. "type": "string",
  10749. "pattern": "^ses"
  10750. },
  10751. "messageID": {
  10752. "type": "string",
  10753. "pattern": "^msg"
  10754. },
  10755. "type": {
  10756. "type": "string",
  10757. "enum": ["snapshot"]
  10758. },
  10759. "snapshot": {
  10760. "type": "string"
  10761. }
  10762. },
  10763. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10764. "additionalProperties": false
  10765. },
  10766. "PatchPart": {
  10767. "type": "object",
  10768. "properties": {
  10769. "id": {
  10770. "type": "string",
  10771. "pattern": "^prt"
  10772. },
  10773. "sessionID": {
  10774. "type": "string",
  10775. "pattern": "^ses"
  10776. },
  10777. "messageID": {
  10778. "type": "string",
  10779. "pattern": "^msg"
  10780. },
  10781. "type": {
  10782. "type": "string",
  10783. "enum": ["patch"]
  10784. },
  10785. "hash": {
  10786. "type": "string"
  10787. },
  10788. "files": {
  10789. "type": "array",
  10790. "items": {
  10791. "type": "string"
  10792. }
  10793. }
  10794. },
  10795. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10796. "additionalProperties": false
  10797. },
  10798. "AgentPart": {
  10799. "type": "object",
  10800. "properties": {
  10801. "id": {
  10802. "type": "string",
  10803. "pattern": "^prt"
  10804. },
  10805. "sessionID": {
  10806. "type": "string",
  10807. "pattern": "^ses"
  10808. },
  10809. "messageID": {
  10810. "type": "string",
  10811. "pattern": "^msg"
  10812. },
  10813. "type": {
  10814. "type": "string",
  10815. "enum": ["agent"]
  10816. },
  10817. "name": {
  10818. "type": "string"
  10819. },
  10820. "source": {
  10821. "type": "object",
  10822. "properties": {
  10823. "value": {
  10824. "type": "string"
  10825. },
  10826. "start": {
  10827. "type": "integer",
  10828. "minimum": 0
  10829. },
  10830. "end": {
  10831. "type": "integer",
  10832. "minimum": 0
  10833. }
  10834. },
  10835. "required": ["value", "start", "end"],
  10836. "additionalProperties": false
  10837. }
  10838. },
  10839. "required": ["id", "sessionID", "messageID", "type", "name"],
  10840. "additionalProperties": false
  10841. },
  10842. "RetryPart": {
  10843. "type": "object",
  10844. "properties": {
  10845. "id": {
  10846. "type": "string",
  10847. "pattern": "^prt"
  10848. },
  10849. "sessionID": {
  10850. "type": "string",
  10851. "pattern": "^ses"
  10852. },
  10853. "messageID": {
  10854. "type": "string",
  10855. "pattern": "^msg"
  10856. },
  10857. "type": {
  10858. "type": "string",
  10859. "enum": ["retry"]
  10860. },
  10861. "attempt": {
  10862. "type": "integer",
  10863. "minimum": 0
  10864. },
  10865. "error": {
  10866. "$ref": "#/components/schemas/APIError"
  10867. },
  10868. "time": {
  10869. "type": "object",
  10870. "properties": {
  10871. "created": {
  10872. "type": "integer",
  10873. "minimum": 0
  10874. }
  10875. },
  10876. "required": ["created"],
  10877. "additionalProperties": false
  10878. }
  10879. },
  10880. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  10881. "additionalProperties": false
  10882. },
  10883. "CompactionPart": {
  10884. "type": "object",
  10885. "properties": {
  10886. "id": {
  10887. "type": "string",
  10888. "pattern": "^prt"
  10889. },
  10890. "sessionID": {
  10891. "type": "string",
  10892. "pattern": "^ses"
  10893. },
  10894. "messageID": {
  10895. "type": "string",
  10896. "pattern": "^msg"
  10897. },
  10898. "type": {
  10899. "type": "string",
  10900. "enum": ["compaction"]
  10901. },
  10902. "auto": {
  10903. "type": "boolean"
  10904. },
  10905. "overflow": {
  10906. "type": "boolean"
  10907. },
  10908. "tail_start_id": {
  10909. "type": "string",
  10910. "pattern": "^msg"
  10911. }
  10912. },
  10913. "required": ["id", "sessionID", "messageID", "type", "auto"],
  10914. "additionalProperties": false
  10915. },
  10916. "Part": {
  10917. "anyOf": [
  10918. {
  10919. "$ref": "#/components/schemas/TextPart"
  10920. },
  10921. {
  10922. "$ref": "#/components/schemas/SubtaskPart"
  10923. },
  10924. {
  10925. "$ref": "#/components/schemas/ReasoningPart"
  10926. },
  10927. {
  10928. "$ref": "#/components/schemas/FilePart"
  10929. },
  10930. {
  10931. "$ref": "#/components/schemas/ToolPart"
  10932. },
  10933. {
  10934. "$ref": "#/components/schemas/StepStartPart"
  10935. },
  10936. {
  10937. "$ref": "#/components/schemas/StepFinishPart"
  10938. },
  10939. {
  10940. "$ref": "#/components/schemas/SnapshotPart"
  10941. },
  10942. {
  10943. "$ref": "#/components/schemas/PatchPart"
  10944. },
  10945. {
  10946. "$ref": "#/components/schemas/AgentPart"
  10947. },
  10948. {
  10949. "$ref": "#/components/schemas/RetryPart"
  10950. },
  10951. {
  10952. "$ref": "#/components/schemas/CompactionPart"
  10953. }
  10954. ]
  10955. },
  10956. "PermissionAction": {
  10957. "type": "string",
  10958. "enum": ["allow", "deny", "ask"]
  10959. },
  10960. "PermissionRule": {
  10961. "type": "object",
  10962. "properties": {
  10963. "permission": {
  10964. "type": "string"
  10965. },
  10966. "pattern": {
  10967. "type": "string"
  10968. },
  10969. "action": {
  10970. "$ref": "#/components/schemas/PermissionAction"
  10971. }
  10972. },
  10973. "required": ["permission", "pattern", "action"],
  10974. "additionalProperties": false
  10975. },
  10976. "PermissionRuleset": {
  10977. "type": "array",
  10978. "items": {
  10979. "$ref": "#/components/schemas/PermissionRule"
  10980. }
  10981. },
  10982. "Session": {
  10983. "type": "object",
  10984. "properties": {
  10985. "id": {
  10986. "type": "string",
  10987. "pattern": "^ses"
  10988. },
  10989. "slug": {
  10990. "type": "string"
  10991. },
  10992. "projectID": {
  10993. "type": "string"
  10994. },
  10995. "workspaceID": {
  10996. "type": "string",
  10997. "pattern": "^wrk"
  10998. },
  10999. "directory": {
  11000. "type": "string"
  11001. },
  11002. "path": {
  11003. "type": "string"
  11004. },
  11005. "parentID": {
  11006. "type": "string",
  11007. "pattern": "^ses"
  11008. },
  11009. "summary": {
  11010. "type": "object",
  11011. "properties": {
  11012. "additions": {
  11013. "type": "number"
  11014. },
  11015. "deletions": {
  11016. "type": "number"
  11017. },
  11018. "files": {
  11019. "type": "number"
  11020. },
  11021. "diffs": {
  11022. "type": "array",
  11023. "items": {
  11024. "$ref": "#/components/schemas/SnapshotFileDiff"
  11025. }
  11026. }
  11027. },
  11028. "required": ["additions", "deletions", "files"],
  11029. "additionalProperties": false
  11030. },
  11031. "cost": {
  11032. "type": "number"
  11033. },
  11034. "tokens": {
  11035. "type": "object",
  11036. "properties": {
  11037. "input": {
  11038. "type": "number"
  11039. },
  11040. "output": {
  11041. "type": "number"
  11042. },
  11043. "reasoning": {
  11044. "type": "number"
  11045. },
  11046. "cache": {
  11047. "type": "object",
  11048. "properties": {
  11049. "read": {
  11050. "type": "number"
  11051. },
  11052. "write": {
  11053. "type": "number"
  11054. }
  11055. },
  11056. "required": ["read", "write"],
  11057. "additionalProperties": false
  11058. }
  11059. },
  11060. "required": ["input", "output", "reasoning", "cache"],
  11061. "additionalProperties": false
  11062. },
  11063. "share": {
  11064. "type": "object",
  11065. "properties": {
  11066. "url": {
  11067. "type": "string"
  11068. }
  11069. },
  11070. "required": ["url"],
  11071. "additionalProperties": false
  11072. },
  11073. "title": {
  11074. "type": "string"
  11075. },
  11076. "agent": {
  11077. "type": "string"
  11078. },
  11079. "model": {
  11080. "type": "object",
  11081. "properties": {
  11082. "id": {
  11083. "type": "string"
  11084. },
  11085. "providerID": {
  11086. "type": "string"
  11087. },
  11088. "variant": {
  11089. "type": "string"
  11090. }
  11091. },
  11092. "required": ["id", "providerID"],
  11093. "additionalProperties": false
  11094. },
  11095. "version": {
  11096. "type": "string"
  11097. },
  11098. "time": {
  11099. "type": "object",
  11100. "properties": {
  11101. "created": {
  11102. "type": "integer",
  11103. "minimum": 0
  11104. },
  11105. "updated": {
  11106. "type": "integer",
  11107. "minimum": 0
  11108. },
  11109. "compacting": {
  11110. "type": "integer",
  11111. "minimum": 0
  11112. },
  11113. "archived": {
  11114. "type": "number"
  11115. }
  11116. },
  11117. "required": ["created", "updated"],
  11118. "additionalProperties": false
  11119. },
  11120. "permission": {
  11121. "$ref": "#/components/schemas/PermissionRuleset"
  11122. },
  11123. "revert": {
  11124. "type": "object",
  11125. "properties": {
  11126. "messageID": {
  11127. "type": "string",
  11128. "pattern": "^msg"
  11129. },
  11130. "partID": {
  11131. "type": "string",
  11132. "pattern": "^prt"
  11133. },
  11134. "snapshot": {
  11135. "type": "string"
  11136. },
  11137. "diff": {
  11138. "type": "string"
  11139. }
  11140. },
  11141. "required": ["messageID"],
  11142. "additionalProperties": false
  11143. }
  11144. },
  11145. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11146. "additionalProperties": false
  11147. },
  11148. "Prompt": {
  11149. "type": "object",
  11150. "properties": {
  11151. "text": {
  11152. "type": "string"
  11153. },
  11154. "files": {
  11155. "type": "array",
  11156. "items": {
  11157. "$ref": "#/components/schemas/PromptFileAttachment"
  11158. }
  11159. },
  11160. "agents": {
  11161. "type": "array",
  11162. "items": {
  11163. "$ref": "#/components/schemas/PromptAgentAttachment"
  11164. }
  11165. },
  11166. "references": {
  11167. "type": "array",
  11168. "items": {
  11169. "$ref": "#/components/schemas/PromptReferenceAttachment"
  11170. }
  11171. }
  11172. },
  11173. "required": ["text"],
  11174. "additionalProperties": false
  11175. },
  11176. "GlobalEvent": {
  11177. "type": "object",
  11178. "properties": {
  11179. "directory": {
  11180. "type": "string"
  11181. },
  11182. "project": {
  11183. "type": "string"
  11184. },
  11185. "workspace": {
  11186. "type": "string"
  11187. },
  11188. "payload": {
  11189. "anyOf": [
  11190. {
  11191. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11192. },
  11193. {
  11194. "$ref": "#/components/schemas/EventFileEdited"
  11195. },
  11196. {
  11197. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11198. },
  11199. {
  11200. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11201. },
  11202. {
  11203. "$ref": "#/components/schemas/EventLspUpdated"
  11204. },
  11205. {
  11206. "$ref": "#/components/schemas/EventMessagePartDelta"
  11207. },
  11208. {
  11209. "$ref": "#/components/schemas/EventPermissionAsked"
  11210. },
  11211. {
  11212. "$ref": "#/components/schemas/EventPermissionReplied"
  11213. },
  11214. {
  11215. "$ref": "#/components/schemas/EventSessionDiff"
  11216. },
  11217. {
  11218. "$ref": "#/components/schemas/EventSessionError"
  11219. },
  11220. {
  11221. "$ref": "#/components/schemas/EventInstallationUpdated"
  11222. },
  11223. {
  11224. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11225. },
  11226. {
  11227. "$ref": "#/components/schemas/EventQuestionAsked"
  11228. },
  11229. {
  11230. "$ref": "#/components/schemas/EventQuestionReplied"
  11231. },
  11232. {
  11233. "$ref": "#/components/schemas/EventQuestionRejected"
  11234. },
  11235. {
  11236. "$ref": "#/components/schemas/EventTodoUpdated"
  11237. },
  11238. {
  11239. "$ref": "#/components/schemas/EventSessionStatus"
  11240. },
  11241. {
  11242. "$ref": "#/components/schemas/EventSessionIdle"
  11243. },
  11244. {
  11245. "$ref": "#/components/schemas/EventSessionCompacted"
  11246. },
  11247. {
  11248. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11249. },
  11250. {
  11251. "$ref": "#/components/schemas/Event.tui.command.execute"
  11252. },
  11253. {
  11254. "$ref": "#/components/schemas/Event.tui.toast.show"
  11255. },
  11256. {
  11257. "$ref": "#/components/schemas/Event.tui.session.select"
  11258. },
  11259. {
  11260. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11261. },
  11262. {
  11263. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11264. },
  11265. {
  11266. "$ref": "#/components/schemas/EventCommandExecuted"
  11267. },
  11268. {
  11269. "$ref": "#/components/schemas/EventProjectUpdated"
  11270. },
  11271. {
  11272. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11273. },
  11274. {
  11275. "$ref": "#/components/schemas/EventWorkspaceReady"
  11276. },
  11277. {
  11278. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11279. },
  11280. {
  11281. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11282. },
  11283. {
  11284. "$ref": "#/components/schemas/EventWorktreeReady"
  11285. },
  11286. {
  11287. "$ref": "#/components/schemas/EventWorktreeFailed"
  11288. },
  11289. {
  11290. "$ref": "#/components/schemas/EventPtyCreated"
  11291. },
  11292. {
  11293. "$ref": "#/components/schemas/EventPtyUpdated"
  11294. },
  11295. {
  11296. "$ref": "#/components/schemas/EventPtyExited"
  11297. },
  11298. {
  11299. "$ref": "#/components/schemas/EventPtyDeleted"
  11300. },
  11301. {
  11302. "$ref": "#/components/schemas/EventMessageUpdated"
  11303. },
  11304. {
  11305. "$ref": "#/components/schemas/EventMessageRemoved"
  11306. },
  11307. {
  11308. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11309. },
  11310. {
  11311. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11312. },
  11313. {
  11314. "$ref": "#/components/schemas/EventSessionCreated"
  11315. },
  11316. {
  11317. "$ref": "#/components/schemas/EventSessionUpdated"
  11318. },
  11319. {
  11320. "$ref": "#/components/schemas/EventSessionDeleted"
  11321. },
  11322. {
  11323. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11324. },
  11325. {
  11326. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11327. },
  11328. {
  11329. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11330. },
  11331. {
  11332. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11333. },
  11334. {
  11335. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11336. },
  11337. {
  11338. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11339. },
  11340. {
  11341. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11342. },
  11343. {
  11344. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11345. },
  11346. {
  11347. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11348. },
  11349. {
  11350. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11351. },
  11352. {
  11353. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11354. },
  11355. {
  11356. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11357. },
  11358. {
  11359. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11360. },
  11361. {
  11362. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11363. },
  11364. {
  11365. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11366. },
  11367. {
  11368. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11369. },
  11370. {
  11371. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11372. },
  11373. {
  11374. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11375. },
  11376. {
  11377. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11378. },
  11379. {
  11380. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11381. },
  11382. {
  11383. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11384. },
  11385. {
  11386. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11387. },
  11388. {
  11389. "$ref": "#/components/schemas/EventSessionNextRetried"
  11390. },
  11391. {
  11392. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11393. },
  11394. {
  11395. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11396. },
  11397. {
  11398. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11399. },
  11400. {
  11401. "$ref": "#/components/schemas/EventServerConnected"
  11402. },
  11403. {
  11404. "$ref": "#/components/schemas/EventGlobalDisposed"
  11405. },
  11406. {
  11407. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11408. },
  11409. {
  11410. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11411. },
  11412. {
  11413. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11414. },
  11415. {
  11416. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11417. },
  11418. {
  11419. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11420. },
  11421. {
  11422. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11423. },
  11424. {
  11425. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11426. },
  11427. {
  11428. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11429. },
  11430. {
  11431. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11432. },
  11433. {
  11434. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11435. },
  11436. {
  11437. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11438. },
  11439. {
  11440. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11441. },
  11442. {
  11443. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11444. },
  11445. {
  11446. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11447. },
  11448. {
  11449. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11450. },
  11451. {
  11452. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11453. },
  11454. {
  11455. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11456. },
  11457. {
  11458. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11459. },
  11460. {
  11461. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11462. },
  11463. {
  11464. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11465. },
  11466. {
  11467. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11468. },
  11469. {
  11470. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11471. },
  11472. {
  11473. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11474. },
  11475. {
  11476. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11477. },
  11478. {
  11479. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11480. },
  11481. {
  11482. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11483. },
  11484. {
  11485. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11486. },
  11487. {
  11488. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11489. },
  11490. {
  11491. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11492. },
  11493. {
  11494. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11495. },
  11496. {
  11497. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11498. },
  11499. {
  11500. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11501. },
  11502. {
  11503. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11504. }
  11505. ]
  11506. }
  11507. },
  11508. "required": ["directory", "payload"],
  11509. "additionalProperties": false
  11510. },
  11511. "LogLevel": {
  11512. "type": "string",
  11513. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11514. "description": "Log level"
  11515. },
  11516. "ServerConfig": {
  11517. "type": "object",
  11518. "properties": {
  11519. "port": {
  11520. "type": "integer",
  11521. "exclusiveMinimum": 0
  11522. },
  11523. "hostname": {
  11524. "type": "string"
  11525. },
  11526. "mdns": {
  11527. "type": "boolean"
  11528. },
  11529. "mdnsDomain": {
  11530. "type": "string"
  11531. },
  11532. "cors": {
  11533. "type": "array",
  11534. "items": {
  11535. "type": "string"
  11536. }
  11537. }
  11538. },
  11539. "additionalProperties": false,
  11540. "description": "Server configuration for opencode serve and web commands"
  11541. },
  11542. "ReferenceConfigEntry": {
  11543. "anyOf": [
  11544. {
  11545. "type": "string"
  11546. },
  11547. {
  11548. "type": "object",
  11549. "properties": {
  11550. "repository": {
  11551. "type": "string",
  11552. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11553. },
  11554. "branch": {
  11555. "type": "string"
  11556. }
  11557. },
  11558. "required": ["repository"],
  11559. "additionalProperties": false
  11560. },
  11561. {
  11562. "type": "object",
  11563. "properties": {
  11564. "path": {
  11565. "type": "string",
  11566. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11567. }
  11568. },
  11569. "required": ["path"],
  11570. "additionalProperties": false
  11571. }
  11572. ]
  11573. },
  11574. "ReferenceConfig": {
  11575. "type": "object",
  11576. "additionalProperties": {
  11577. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11578. }
  11579. },
  11580. "PermissionActionConfig": {
  11581. "type": "string",
  11582. "enum": ["ask", "allow", "deny"]
  11583. },
  11584. "PermissionObjectConfig": {
  11585. "type": "object",
  11586. "additionalProperties": {
  11587. "$ref": "#/components/schemas/PermissionActionConfig"
  11588. }
  11589. },
  11590. "PermissionRuleConfig": {
  11591. "anyOf": [
  11592. {
  11593. "$ref": "#/components/schemas/PermissionActionConfig"
  11594. },
  11595. {
  11596. "$ref": "#/components/schemas/PermissionObjectConfig"
  11597. }
  11598. ]
  11599. },
  11600. "PermissionConfig": {
  11601. "anyOf": [
  11602. {
  11603. "$ref": "#/components/schemas/PermissionActionConfig"
  11604. },
  11605. {
  11606. "type": "object",
  11607. "properties": {
  11608. "read": {
  11609. "$ref": "#/components/schemas/PermissionRuleConfig"
  11610. },
  11611. "edit": {
  11612. "$ref": "#/components/schemas/PermissionRuleConfig"
  11613. },
  11614. "glob": {
  11615. "$ref": "#/components/schemas/PermissionRuleConfig"
  11616. },
  11617. "grep": {
  11618. "$ref": "#/components/schemas/PermissionRuleConfig"
  11619. },
  11620. "list": {
  11621. "$ref": "#/components/schemas/PermissionRuleConfig"
  11622. },
  11623. "bash": {
  11624. "$ref": "#/components/schemas/PermissionRuleConfig"
  11625. },
  11626. "task": {
  11627. "$ref": "#/components/schemas/PermissionRuleConfig"
  11628. },
  11629. "external_directory": {
  11630. "$ref": "#/components/schemas/PermissionRuleConfig"
  11631. },
  11632. "todowrite": {
  11633. "$ref": "#/components/schemas/PermissionActionConfig"
  11634. },
  11635. "question": {
  11636. "$ref": "#/components/schemas/PermissionActionConfig"
  11637. },
  11638. "webfetch": {
  11639. "$ref": "#/components/schemas/PermissionActionConfig"
  11640. },
  11641. "websearch": {
  11642. "$ref": "#/components/schemas/PermissionActionConfig"
  11643. },
  11644. "repo_clone": {
  11645. "$ref": "#/components/schemas/PermissionRuleConfig"
  11646. },
  11647. "repo_overview": {
  11648. "$ref": "#/components/schemas/PermissionRuleConfig"
  11649. },
  11650. "lsp": {
  11651. "$ref": "#/components/schemas/PermissionRuleConfig"
  11652. },
  11653. "doom_loop": {
  11654. "$ref": "#/components/schemas/PermissionActionConfig"
  11655. },
  11656. "skill": {
  11657. "$ref": "#/components/schemas/PermissionRuleConfig"
  11658. }
  11659. },
  11660. "additionalProperties": {
  11661. "$ref": "#/components/schemas/PermissionRuleConfig"
  11662. }
  11663. }
  11664. ]
  11665. },
  11666. "AgentConfig": {
  11667. "type": "object",
  11668. "properties": {
  11669. "model": {
  11670. "type": "string"
  11671. },
  11672. "variant": {
  11673. "type": "string"
  11674. },
  11675. "temperature": {
  11676. "type": "number"
  11677. },
  11678. "top_p": {
  11679. "type": "number"
  11680. },
  11681. "prompt": {
  11682. "type": "string"
  11683. },
  11684. "tools": {
  11685. "type": "object",
  11686. "additionalProperties": {
  11687. "type": "boolean"
  11688. }
  11689. },
  11690. "disable": {
  11691. "type": "boolean"
  11692. },
  11693. "description": {
  11694. "type": "string"
  11695. },
  11696. "mode": {
  11697. "type": "string",
  11698. "enum": ["subagent", "primary", "all"]
  11699. },
  11700. "hidden": {
  11701. "type": "boolean"
  11702. },
  11703. "options": {
  11704. "type": "object"
  11705. },
  11706. "color": {
  11707. "anyOf": [
  11708. {
  11709. "type": "string",
  11710. "pattern": "^#[0-9a-fA-F]{6}$"
  11711. },
  11712. {
  11713. "type": "string",
  11714. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11715. }
  11716. ],
  11717. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11718. },
  11719. "steps": {
  11720. "type": "integer",
  11721. "exclusiveMinimum": 0
  11722. },
  11723. "maxSteps": {
  11724. "type": "integer",
  11725. "exclusiveMinimum": 0
  11726. },
  11727. "permission": {
  11728. "$ref": "#/components/schemas/PermissionConfig"
  11729. }
  11730. },
  11731. "additionalProperties": {}
  11732. },
  11733. "ProviderConfig": {
  11734. "type": "object",
  11735. "properties": {
  11736. "api": {
  11737. "type": "string"
  11738. },
  11739. "name": {
  11740. "type": "string"
  11741. },
  11742. "env": {
  11743. "type": "array",
  11744. "items": {
  11745. "type": "string"
  11746. }
  11747. },
  11748. "id": {
  11749. "type": "string"
  11750. },
  11751. "npm": {
  11752. "type": "string"
  11753. },
  11754. "whitelist": {
  11755. "type": "array",
  11756. "items": {
  11757. "type": "string"
  11758. }
  11759. },
  11760. "blacklist": {
  11761. "type": "array",
  11762. "items": {
  11763. "type": "string"
  11764. }
  11765. },
  11766. "options": {
  11767. "type": "object",
  11768. "properties": {
  11769. "apiKey": {
  11770. "type": "string"
  11771. },
  11772. "baseURL": {
  11773. "type": "string"
  11774. },
  11775. "enterpriseUrl": {
  11776. "type": "string"
  11777. },
  11778. "setCacheKey": {
  11779. "type": "boolean"
  11780. },
  11781. "timeout": {
  11782. "anyOf": [
  11783. {
  11784. "type": "integer",
  11785. "exclusiveMinimum": 0
  11786. },
  11787. {
  11788. "type": "boolean",
  11789. "enum": [false]
  11790. }
  11791. ],
  11792. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11793. },
  11794. "chunkTimeout": {
  11795. "type": "integer",
  11796. "exclusiveMinimum": 0
  11797. }
  11798. },
  11799. "additionalProperties": {}
  11800. },
  11801. "models": {
  11802. "type": "object",
  11803. "additionalProperties": {
  11804. "type": "object",
  11805. "properties": {
  11806. "id": {
  11807. "type": "string"
  11808. },
  11809. "name": {
  11810. "type": "string"
  11811. },
  11812. "family": {
  11813. "type": "string"
  11814. },
  11815. "release_date": {
  11816. "type": "string"
  11817. },
  11818. "attachment": {
  11819. "type": "boolean"
  11820. },
  11821. "reasoning": {
  11822. "type": "boolean"
  11823. },
  11824. "temperature": {
  11825. "type": "boolean"
  11826. },
  11827. "tool_call": {
  11828. "type": "boolean"
  11829. },
  11830. "interleaved": {
  11831. "anyOf": [
  11832. {
  11833. "type": "boolean",
  11834. "enum": [true]
  11835. },
  11836. {
  11837. "type": "object",
  11838. "properties": {
  11839. "field": {
  11840. "type": "string",
  11841. "enum": ["reasoning_content", "reasoning_details"]
  11842. }
  11843. },
  11844. "required": ["field"],
  11845. "additionalProperties": false
  11846. }
  11847. ]
  11848. },
  11849. "cost": {
  11850. "type": "object",
  11851. "properties": {
  11852. "input": {
  11853. "type": "number"
  11854. },
  11855. "output": {
  11856. "type": "number"
  11857. },
  11858. "cache_read": {
  11859. "type": "number"
  11860. },
  11861. "cache_write": {
  11862. "type": "number"
  11863. },
  11864. "context_over_200k": {
  11865. "type": "object",
  11866. "properties": {
  11867. "input": {
  11868. "type": "number"
  11869. },
  11870. "output": {
  11871. "type": "number"
  11872. },
  11873. "cache_read": {
  11874. "type": "number"
  11875. },
  11876. "cache_write": {
  11877. "type": "number"
  11878. }
  11879. },
  11880. "required": ["input", "output"],
  11881. "additionalProperties": false
  11882. }
  11883. },
  11884. "required": ["input", "output"],
  11885. "additionalProperties": false
  11886. },
  11887. "limit": {
  11888. "type": "object",
  11889. "properties": {
  11890. "context": {
  11891. "type": "number"
  11892. },
  11893. "input": {
  11894. "type": "number"
  11895. },
  11896. "output": {
  11897. "type": "number"
  11898. }
  11899. },
  11900. "required": ["context", "output"],
  11901. "additionalProperties": false
  11902. },
  11903. "modalities": {
  11904. "type": "object",
  11905. "properties": {
  11906. "input": {
  11907. "type": "array",
  11908. "items": {
  11909. "type": "string",
  11910. "enum": ["text", "audio", "image", "video", "pdf"]
  11911. }
  11912. },
  11913. "output": {
  11914. "type": "array",
  11915. "items": {
  11916. "type": "string",
  11917. "enum": ["text", "audio", "image", "video", "pdf"]
  11918. }
  11919. }
  11920. },
  11921. "required": ["input", "output"],
  11922. "additionalProperties": false
  11923. },
  11924. "experimental": {
  11925. "type": "boolean"
  11926. },
  11927. "status": {
  11928. "type": "string",
  11929. "enum": ["alpha", "beta", "deprecated", "active"]
  11930. },
  11931. "provider": {
  11932. "type": "object",
  11933. "properties": {
  11934. "npm": {
  11935. "type": "string"
  11936. },
  11937. "api": {
  11938. "type": "string"
  11939. }
  11940. },
  11941. "additionalProperties": false
  11942. },
  11943. "options": {
  11944. "type": "object"
  11945. },
  11946. "headers": {
  11947. "type": "object",
  11948. "additionalProperties": {
  11949. "type": "string"
  11950. }
  11951. },
  11952. "variants": {
  11953. "type": "object",
  11954. "additionalProperties": {
  11955. "type": "object",
  11956. "properties": {
  11957. "disabled": {
  11958. "type": "boolean"
  11959. }
  11960. },
  11961. "additionalProperties": {}
  11962. },
  11963. "description": "Variant-specific configuration"
  11964. }
  11965. },
  11966. "additionalProperties": false
  11967. }
  11968. }
  11969. },
  11970. "additionalProperties": false
  11971. },
  11972. "McpLocalConfig": {
  11973. "type": "object",
  11974. "properties": {
  11975. "type": {
  11976. "type": "string",
  11977. "enum": ["local"],
  11978. "description": "Type of MCP server connection"
  11979. },
  11980. "command": {
  11981. "type": "array",
  11982. "items": {
  11983. "type": "string"
  11984. },
  11985. "description": "Command and arguments to run the MCP server"
  11986. },
  11987. "environment": {
  11988. "type": "object",
  11989. "additionalProperties": {
  11990. "type": "string"
  11991. }
  11992. },
  11993. "enabled": {
  11994. "type": "boolean"
  11995. },
  11996. "timeout": {
  11997. "type": "integer",
  11998. "exclusiveMinimum": 0
  11999. }
  12000. },
  12001. "required": ["type", "command"],
  12002. "additionalProperties": false
  12003. },
  12004. "McpOAuthConfig": {
  12005. "type": "object",
  12006. "properties": {
  12007. "clientId": {
  12008. "type": "string"
  12009. },
  12010. "clientSecret": {
  12011. "type": "string"
  12012. },
  12013. "scope": {
  12014. "type": "string"
  12015. },
  12016. "redirectUri": {
  12017. "type": "string"
  12018. }
  12019. },
  12020. "additionalProperties": false
  12021. },
  12022. "McpRemoteConfig": {
  12023. "type": "object",
  12024. "properties": {
  12025. "type": {
  12026. "type": "string",
  12027. "enum": ["remote"],
  12028. "description": "Type of MCP server connection"
  12029. },
  12030. "url": {
  12031. "type": "string",
  12032. "description": "URL of the remote MCP server"
  12033. },
  12034. "enabled": {
  12035. "type": "boolean"
  12036. },
  12037. "headers": {
  12038. "type": "object",
  12039. "additionalProperties": {
  12040. "type": "string"
  12041. }
  12042. },
  12043. "oauth": {
  12044. "anyOf": [
  12045. {
  12046. "$ref": "#/components/schemas/McpOAuthConfig"
  12047. },
  12048. {
  12049. "type": "boolean",
  12050. "enum": [false]
  12051. }
  12052. ],
  12053. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  12054. },
  12055. "timeout": {
  12056. "type": "integer",
  12057. "exclusiveMinimum": 0
  12058. }
  12059. },
  12060. "required": ["type", "url"],
  12061. "additionalProperties": false
  12062. },
  12063. "LayoutConfig": {
  12064. "type": "string",
  12065. "enum": ["auto", "stretch"],
  12066. "description": "@deprecated Always uses stretch layout."
  12067. },
  12068. "ImageAttachmentConfig": {
  12069. "type": "object",
  12070. "properties": {
  12071. "auto_resize": {
  12072. "type": "boolean"
  12073. },
  12074. "max_width": {
  12075. "type": "integer",
  12076. "exclusiveMinimum": 0
  12077. },
  12078. "max_height": {
  12079. "type": "integer",
  12080. "exclusiveMinimum": 0
  12081. },
  12082. "max_base64_bytes": {
  12083. "type": "integer",
  12084. "exclusiveMinimum": 0
  12085. }
  12086. },
  12087. "additionalProperties": false
  12088. },
  12089. "AttachmentConfig": {
  12090. "type": "object",
  12091. "properties": {
  12092. "image": {
  12093. "$ref": "#/components/schemas/ImageAttachmentConfig"
  12094. }
  12095. },
  12096. "additionalProperties": false
  12097. },
  12098. "Config": {
  12099. "type": "object",
  12100. "properties": {
  12101. "$schema": {
  12102. "type": "string"
  12103. },
  12104. "shell": {
  12105. "type": "string"
  12106. },
  12107. "logLevel": {
  12108. "$ref": "#/components/schemas/LogLevel"
  12109. },
  12110. "server": {
  12111. "$ref": "#/components/schemas/ServerConfig"
  12112. },
  12113. "command": {
  12114. "type": "object",
  12115. "additionalProperties": {
  12116. "type": "object",
  12117. "properties": {
  12118. "template": {
  12119. "type": "string"
  12120. },
  12121. "description": {
  12122. "type": "string"
  12123. },
  12124. "agent": {
  12125. "type": "string"
  12126. },
  12127. "model": {
  12128. "type": "string"
  12129. },
  12130. "subtask": {
  12131. "type": "boolean"
  12132. }
  12133. },
  12134. "required": ["template"],
  12135. "additionalProperties": false
  12136. }
  12137. },
  12138. "skills": {
  12139. "type": "object",
  12140. "properties": {
  12141. "paths": {
  12142. "type": "array",
  12143. "items": {
  12144. "type": "string"
  12145. }
  12146. },
  12147. "urls": {
  12148. "type": "array",
  12149. "items": {
  12150. "type": "string"
  12151. }
  12152. }
  12153. },
  12154. "additionalProperties": false
  12155. },
  12156. "reference": {
  12157. "$ref": "#/components/schemas/ReferenceConfig"
  12158. },
  12159. "watcher": {
  12160. "type": "object",
  12161. "properties": {
  12162. "ignore": {
  12163. "type": "array",
  12164. "items": {
  12165. "type": "string"
  12166. }
  12167. }
  12168. },
  12169. "additionalProperties": false
  12170. },
  12171. "snapshot": {
  12172. "type": "boolean"
  12173. },
  12174. "plugin": {
  12175. "type": "array",
  12176. "items": {
  12177. "anyOf": [
  12178. {
  12179. "type": "string"
  12180. },
  12181. {
  12182. "type": "array",
  12183. "prefixItems": [
  12184. {
  12185. "type": "string"
  12186. },
  12187. {
  12188. "type": "object"
  12189. }
  12190. ],
  12191. "maxItems": 2,
  12192. "minItems": 2
  12193. }
  12194. ]
  12195. }
  12196. },
  12197. "share": {
  12198. "type": "string",
  12199. "enum": ["manual", "auto", "disabled"]
  12200. },
  12201. "autoshare": {
  12202. "type": "boolean"
  12203. },
  12204. "autoupdate": {
  12205. "anyOf": [
  12206. {
  12207. "type": "boolean"
  12208. },
  12209. {
  12210. "type": "string",
  12211. "enum": ["notify"]
  12212. }
  12213. ],
  12214. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12215. },
  12216. "disabled_providers": {
  12217. "type": "array",
  12218. "items": {
  12219. "type": "string"
  12220. }
  12221. },
  12222. "enabled_providers": {
  12223. "type": "array",
  12224. "items": {
  12225. "type": "string"
  12226. }
  12227. },
  12228. "model": {
  12229. "type": "string"
  12230. },
  12231. "small_model": {
  12232. "type": "string"
  12233. },
  12234. "default_agent": {
  12235. "type": "string"
  12236. },
  12237. "username": {
  12238. "type": "string"
  12239. },
  12240. "mode": {
  12241. "type": "object",
  12242. "properties": {
  12243. "build": {
  12244. "$ref": "#/components/schemas/AgentConfig"
  12245. },
  12246. "plan": {
  12247. "$ref": "#/components/schemas/AgentConfig"
  12248. }
  12249. },
  12250. "additionalProperties": {
  12251. "$ref": "#/components/schemas/AgentConfig"
  12252. }
  12253. },
  12254. "agent": {
  12255. "type": "object",
  12256. "properties": {
  12257. "plan": {
  12258. "$ref": "#/components/schemas/AgentConfig"
  12259. },
  12260. "build": {
  12261. "$ref": "#/components/schemas/AgentConfig"
  12262. },
  12263. "general": {
  12264. "$ref": "#/components/schemas/AgentConfig"
  12265. },
  12266. "explore": {
  12267. "$ref": "#/components/schemas/AgentConfig"
  12268. },
  12269. "scout": {
  12270. "$ref": "#/components/schemas/AgentConfig"
  12271. },
  12272. "title": {
  12273. "$ref": "#/components/schemas/AgentConfig"
  12274. },
  12275. "summary": {
  12276. "$ref": "#/components/schemas/AgentConfig"
  12277. },
  12278. "compaction": {
  12279. "$ref": "#/components/schemas/AgentConfig"
  12280. }
  12281. },
  12282. "additionalProperties": {
  12283. "$ref": "#/components/schemas/AgentConfig"
  12284. }
  12285. },
  12286. "provider": {
  12287. "type": "object",
  12288. "additionalProperties": {
  12289. "$ref": "#/components/schemas/ProviderConfig"
  12290. }
  12291. },
  12292. "mcp": {
  12293. "type": "object",
  12294. "additionalProperties": {
  12295. "anyOf": [
  12296. {
  12297. "$ref": "#/components/schemas/McpLocalConfig"
  12298. },
  12299. {
  12300. "$ref": "#/components/schemas/McpRemoteConfig"
  12301. },
  12302. {
  12303. "type": "object",
  12304. "properties": {
  12305. "enabled": {
  12306. "type": "boolean"
  12307. }
  12308. },
  12309. "required": ["enabled"],
  12310. "additionalProperties": false
  12311. }
  12312. ]
  12313. }
  12314. },
  12315. "formatter": {
  12316. "anyOf": [
  12317. {
  12318. "type": "boolean"
  12319. },
  12320. {
  12321. "type": "object",
  12322. "additionalProperties": {
  12323. "type": "object",
  12324. "properties": {
  12325. "disabled": {
  12326. "type": "boolean"
  12327. },
  12328. "command": {
  12329. "type": "array",
  12330. "items": {
  12331. "type": "string"
  12332. }
  12333. },
  12334. "environment": {
  12335. "type": "object",
  12336. "additionalProperties": {
  12337. "type": "string"
  12338. }
  12339. },
  12340. "extensions": {
  12341. "type": "array",
  12342. "items": {
  12343. "type": "string"
  12344. }
  12345. }
  12346. },
  12347. "additionalProperties": false
  12348. }
  12349. }
  12350. ],
  12351. "description": "Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
  12352. },
  12353. "lsp": {
  12354. "anyOf": [
  12355. {
  12356. "type": "boolean"
  12357. },
  12358. {
  12359. "type": "object",
  12360. "additionalProperties": {
  12361. "anyOf": [
  12362. {
  12363. "type": "object",
  12364. "properties": {
  12365. "disabled": {
  12366. "type": "boolean",
  12367. "enum": [true]
  12368. }
  12369. },
  12370. "required": ["disabled"],
  12371. "additionalProperties": false
  12372. },
  12373. {
  12374. "type": "object",
  12375. "properties": {
  12376. "command": {
  12377. "type": "array",
  12378. "items": {
  12379. "type": "string"
  12380. }
  12381. },
  12382. "extensions": {
  12383. "type": "array",
  12384. "items": {
  12385. "type": "string"
  12386. }
  12387. },
  12388. "disabled": {
  12389. "type": "boolean"
  12390. },
  12391. "env": {
  12392. "type": "object",
  12393. "additionalProperties": {
  12394. "type": "string"
  12395. }
  12396. },
  12397. "initialization": {
  12398. "type": "object"
  12399. }
  12400. },
  12401. "required": ["command"],
  12402. "additionalProperties": false
  12403. }
  12404. ]
  12405. }
  12406. }
  12407. ],
  12408. "description": "Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
  12409. },
  12410. "instructions": {
  12411. "type": "array",
  12412. "items": {
  12413. "type": "string"
  12414. }
  12415. },
  12416. "layout": {
  12417. "$ref": "#/components/schemas/LayoutConfig"
  12418. },
  12419. "permission": {
  12420. "$ref": "#/components/schemas/PermissionConfig"
  12421. },
  12422. "tools": {
  12423. "type": "object",
  12424. "additionalProperties": {
  12425. "type": "boolean"
  12426. }
  12427. },
  12428. "attachment": {
  12429. "$ref": "#/components/schemas/AttachmentConfig"
  12430. },
  12431. "enterprise": {
  12432. "type": "object",
  12433. "properties": {
  12434. "url": {
  12435. "type": "string"
  12436. }
  12437. },
  12438. "additionalProperties": false
  12439. },
  12440. "tool_output": {
  12441. "type": "object",
  12442. "properties": {
  12443. "max_lines": {
  12444. "type": "integer",
  12445. "exclusiveMinimum": 0
  12446. },
  12447. "max_bytes": {
  12448. "type": "integer",
  12449. "exclusiveMinimum": 0
  12450. }
  12451. },
  12452. "additionalProperties": false
  12453. },
  12454. "compaction": {
  12455. "type": "object",
  12456. "properties": {
  12457. "auto": {
  12458. "type": "boolean"
  12459. },
  12460. "prune": {
  12461. "type": "boolean"
  12462. },
  12463. "tail_turns": {
  12464. "type": "integer",
  12465. "minimum": 0
  12466. },
  12467. "preserve_recent_tokens": {
  12468. "type": "integer",
  12469. "minimum": 0
  12470. },
  12471. "reserved": {
  12472. "type": "integer",
  12473. "minimum": 0
  12474. }
  12475. },
  12476. "additionalProperties": false
  12477. },
  12478. "experimental": {
  12479. "type": "object",
  12480. "properties": {
  12481. "disable_paste_summary": {
  12482. "type": "boolean"
  12483. },
  12484. "batch_tool": {
  12485. "type": "boolean"
  12486. },
  12487. "openTelemetry": {
  12488. "type": "boolean"
  12489. },
  12490. "primary_tools": {
  12491. "type": "array",
  12492. "items": {
  12493. "type": "string"
  12494. }
  12495. },
  12496. "continue_loop_on_deny": {
  12497. "type": "boolean"
  12498. },
  12499. "mcp_timeout": {
  12500. "type": "integer",
  12501. "exclusiveMinimum": 0
  12502. }
  12503. },
  12504. "additionalProperties": false
  12505. }
  12506. },
  12507. "additionalProperties": false
  12508. },
  12509. "Model": {
  12510. "type": "object",
  12511. "properties": {
  12512. "id": {
  12513. "type": "string"
  12514. },
  12515. "providerID": {
  12516. "type": "string"
  12517. },
  12518. "api": {
  12519. "type": "object",
  12520. "properties": {
  12521. "id": {
  12522. "type": "string"
  12523. },
  12524. "url": {
  12525. "type": "string"
  12526. },
  12527. "npm": {
  12528. "type": "string"
  12529. }
  12530. },
  12531. "required": ["id", "url", "npm"],
  12532. "additionalProperties": false
  12533. },
  12534. "name": {
  12535. "type": "string"
  12536. },
  12537. "family": {
  12538. "type": "string"
  12539. },
  12540. "capabilities": {
  12541. "type": "object",
  12542. "properties": {
  12543. "temperature": {
  12544. "type": "boolean"
  12545. },
  12546. "reasoning": {
  12547. "type": "boolean"
  12548. },
  12549. "attachment": {
  12550. "type": "boolean"
  12551. },
  12552. "toolcall": {
  12553. "type": "boolean"
  12554. },
  12555. "input": {
  12556. "type": "object",
  12557. "properties": {
  12558. "text": {
  12559. "type": "boolean"
  12560. },
  12561. "audio": {
  12562. "type": "boolean"
  12563. },
  12564. "image": {
  12565. "type": "boolean"
  12566. },
  12567. "video": {
  12568. "type": "boolean"
  12569. },
  12570. "pdf": {
  12571. "type": "boolean"
  12572. }
  12573. },
  12574. "required": ["text", "audio", "image", "video", "pdf"],
  12575. "additionalProperties": false
  12576. },
  12577. "output": {
  12578. "type": "object",
  12579. "properties": {
  12580. "text": {
  12581. "type": "boolean"
  12582. },
  12583. "audio": {
  12584. "type": "boolean"
  12585. },
  12586. "image": {
  12587. "type": "boolean"
  12588. },
  12589. "video": {
  12590. "type": "boolean"
  12591. },
  12592. "pdf": {
  12593. "type": "boolean"
  12594. }
  12595. },
  12596. "required": ["text", "audio", "image", "video", "pdf"],
  12597. "additionalProperties": false
  12598. },
  12599. "interleaved": {
  12600. "anyOf": [
  12601. {
  12602. "type": "boolean"
  12603. },
  12604. {
  12605. "type": "object",
  12606. "properties": {
  12607. "field": {
  12608. "type": "string",
  12609. "enum": ["reasoning_content", "reasoning_details"]
  12610. }
  12611. },
  12612. "required": ["field"],
  12613. "additionalProperties": false
  12614. }
  12615. ]
  12616. }
  12617. },
  12618. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12619. "additionalProperties": false
  12620. },
  12621. "cost": {
  12622. "type": "object",
  12623. "properties": {
  12624. "input": {
  12625. "type": "number"
  12626. },
  12627. "output": {
  12628. "type": "number"
  12629. },
  12630. "cache": {
  12631. "type": "object",
  12632. "properties": {
  12633. "read": {
  12634. "type": "number"
  12635. },
  12636. "write": {
  12637. "type": "number"
  12638. }
  12639. },
  12640. "required": ["read", "write"],
  12641. "additionalProperties": false
  12642. },
  12643. "tiers": {
  12644. "type": "array",
  12645. "items": {
  12646. "type": "object",
  12647. "properties": {
  12648. "input": {
  12649. "type": "number"
  12650. },
  12651. "output": {
  12652. "type": "number"
  12653. },
  12654. "cache": {
  12655. "type": "object",
  12656. "properties": {
  12657. "read": {
  12658. "type": "number"
  12659. },
  12660. "write": {
  12661. "type": "number"
  12662. }
  12663. },
  12664. "required": ["read", "write"],
  12665. "additionalProperties": false
  12666. },
  12667. "tier": {
  12668. "type": "object",
  12669. "properties": {
  12670. "type": {
  12671. "type": "string",
  12672. "enum": ["context"]
  12673. },
  12674. "size": {
  12675. "type": "number"
  12676. }
  12677. },
  12678. "required": ["type", "size"],
  12679. "additionalProperties": false
  12680. }
  12681. },
  12682. "required": ["input", "output", "cache", "tier"],
  12683. "additionalProperties": false
  12684. }
  12685. },
  12686. "experimentalOver200K": {
  12687. "type": "object",
  12688. "properties": {
  12689. "input": {
  12690. "type": "number"
  12691. },
  12692. "output": {
  12693. "type": "number"
  12694. },
  12695. "cache": {
  12696. "type": "object",
  12697. "properties": {
  12698. "read": {
  12699. "type": "number"
  12700. },
  12701. "write": {
  12702. "type": "number"
  12703. }
  12704. },
  12705. "required": ["read", "write"],
  12706. "additionalProperties": false
  12707. }
  12708. },
  12709. "required": ["input", "output", "cache"],
  12710. "additionalProperties": false
  12711. }
  12712. },
  12713. "required": ["input", "output", "cache"],
  12714. "additionalProperties": false
  12715. },
  12716. "limit": {
  12717. "type": "object",
  12718. "properties": {
  12719. "context": {
  12720. "type": "number"
  12721. },
  12722. "input": {
  12723. "type": "number"
  12724. },
  12725. "output": {
  12726. "type": "number"
  12727. }
  12728. },
  12729. "required": ["context", "output"],
  12730. "additionalProperties": false
  12731. },
  12732. "status": {
  12733. "type": "string",
  12734. "enum": ["alpha", "beta", "deprecated", "active"]
  12735. },
  12736. "options": {
  12737. "type": "object"
  12738. },
  12739. "headers": {
  12740. "type": "object",
  12741. "additionalProperties": {
  12742. "type": "string"
  12743. }
  12744. },
  12745. "release_date": {
  12746. "type": "string"
  12747. },
  12748. "variants": {
  12749. "type": "object",
  12750. "additionalProperties": {
  12751. "type": "object"
  12752. }
  12753. }
  12754. },
  12755. "required": [
  12756. "id",
  12757. "providerID",
  12758. "api",
  12759. "name",
  12760. "capabilities",
  12761. "cost",
  12762. "limit",
  12763. "status",
  12764. "options",
  12765. "headers",
  12766. "release_date"
  12767. ],
  12768. "additionalProperties": false
  12769. },
  12770. "Provider": {
  12771. "type": "object",
  12772. "properties": {
  12773. "id": {
  12774. "type": "string"
  12775. },
  12776. "name": {
  12777. "type": "string"
  12778. },
  12779. "source": {
  12780. "type": "string",
  12781. "enum": ["env", "config", "custom", "api"]
  12782. },
  12783. "env": {
  12784. "type": "array",
  12785. "items": {
  12786. "type": "string"
  12787. }
  12788. },
  12789. "key": {
  12790. "type": "string"
  12791. },
  12792. "options": {
  12793. "type": "object"
  12794. },
  12795. "models": {
  12796. "type": "object",
  12797. "additionalProperties": {
  12798. "$ref": "#/components/schemas/Model"
  12799. }
  12800. }
  12801. },
  12802. "required": ["id", "name", "source", "env", "options", "models"],
  12803. "additionalProperties": false
  12804. },
  12805. "ConsoleState": {
  12806. "type": "object",
  12807. "properties": {
  12808. "consoleManagedProviders": {
  12809. "type": "array",
  12810. "items": {
  12811. "type": "string"
  12812. }
  12813. },
  12814. "activeOrgName": {
  12815. "type": "string"
  12816. },
  12817. "switchableOrgCount": {
  12818. "type": "integer",
  12819. "minimum": 0
  12820. }
  12821. },
  12822. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12823. "additionalProperties": false
  12824. },
  12825. "effect_HttpApiError_InternalServerError": {
  12826. "type": "object",
  12827. "properties": {
  12828. "_tag": {
  12829. "type": "string",
  12830. "enum": ["InternalServerError"]
  12831. }
  12832. },
  12833. "required": ["_tag"],
  12834. "additionalProperties": false
  12835. },
  12836. "ToolListItem": {
  12837. "type": "object",
  12838. "properties": {
  12839. "id": {
  12840. "type": "string"
  12841. },
  12842. "description": {
  12843. "type": "string"
  12844. },
  12845. "parameters": {}
  12846. },
  12847. "required": ["id", "description", "parameters"],
  12848. "additionalProperties": false
  12849. },
  12850. "ToolList": {
  12851. "type": "array",
  12852. "items": {
  12853. "$ref": "#/components/schemas/ToolListItem"
  12854. }
  12855. },
  12856. "ToolIDs": {
  12857. "type": "array",
  12858. "items": {
  12859. "type": "string"
  12860. }
  12861. },
  12862. "WorktreeError": {
  12863. "type": "object",
  12864. "properties": {
  12865. "name": {
  12866. "type": "string",
  12867. "enum": [
  12868. "WorktreeNotGitError",
  12869. "WorktreeNameGenerationFailedError",
  12870. "WorktreeCreateFailedError",
  12871. "WorktreeStartCommandFailedError",
  12872. "WorktreeRemoveFailedError",
  12873. "WorktreeResetFailedError",
  12874. "WorktreeListFailedError"
  12875. ]
  12876. },
  12877. "data": {
  12878. "type": "object",
  12879. "properties": {
  12880. "message": {
  12881. "type": "string"
  12882. }
  12883. },
  12884. "required": ["message"],
  12885. "additionalProperties": false
  12886. }
  12887. },
  12888. "required": ["name", "data"],
  12889. "additionalProperties": false
  12890. },
  12891. "WorktreeCreateInput": {
  12892. "type": "object",
  12893. "properties": {
  12894. "name": {
  12895. "type": "string"
  12896. },
  12897. "startCommand": {
  12898. "type": "string",
  12899. "description": "Additional startup script to run after the project's start command"
  12900. }
  12901. },
  12902. "additionalProperties": false
  12903. },
  12904. "Worktree": {
  12905. "type": "object",
  12906. "properties": {
  12907. "name": {
  12908. "type": "string"
  12909. },
  12910. "branch": {
  12911. "type": "string"
  12912. },
  12913. "directory": {
  12914. "type": "string"
  12915. }
  12916. },
  12917. "required": ["name", "directory"],
  12918. "additionalProperties": false
  12919. },
  12920. "WorktreeRemoveInput": {
  12921. "type": "object",
  12922. "properties": {
  12923. "directory": {
  12924. "type": "string"
  12925. }
  12926. },
  12927. "required": ["directory"],
  12928. "additionalProperties": false
  12929. },
  12930. "WorktreeResetInput": {
  12931. "type": "object",
  12932. "properties": {
  12933. "directory": {
  12934. "type": "string"
  12935. }
  12936. },
  12937. "required": ["directory"],
  12938. "additionalProperties": false
  12939. },
  12940. "ProjectSummary": {
  12941. "type": "object",
  12942. "properties": {
  12943. "id": {
  12944. "type": "string"
  12945. },
  12946. "name": {
  12947. "type": "string"
  12948. },
  12949. "worktree": {
  12950. "type": "string"
  12951. }
  12952. },
  12953. "required": ["id", "worktree"],
  12954. "additionalProperties": false
  12955. },
  12956. "GlobalSession": {
  12957. "type": "object",
  12958. "properties": {
  12959. "id": {
  12960. "type": "string",
  12961. "pattern": "^ses"
  12962. },
  12963. "slug": {
  12964. "type": "string"
  12965. },
  12966. "projectID": {
  12967. "type": "string"
  12968. },
  12969. "workspaceID": {
  12970. "type": "string",
  12971. "pattern": "^wrk"
  12972. },
  12973. "directory": {
  12974. "type": "string"
  12975. },
  12976. "path": {
  12977. "type": "string"
  12978. },
  12979. "parentID": {
  12980. "type": "string",
  12981. "pattern": "^ses"
  12982. },
  12983. "summary": {
  12984. "type": "object",
  12985. "properties": {
  12986. "additions": {
  12987. "type": "number"
  12988. },
  12989. "deletions": {
  12990. "type": "number"
  12991. },
  12992. "files": {
  12993. "type": "number"
  12994. },
  12995. "diffs": {
  12996. "type": "array",
  12997. "items": {
  12998. "$ref": "#/components/schemas/SnapshotFileDiff"
  12999. }
  13000. }
  13001. },
  13002. "required": ["additions", "deletions", "files"],
  13003. "additionalProperties": false
  13004. },
  13005. "cost": {
  13006. "type": "number"
  13007. },
  13008. "tokens": {
  13009. "type": "object",
  13010. "properties": {
  13011. "input": {
  13012. "type": "number"
  13013. },
  13014. "output": {
  13015. "type": "number"
  13016. },
  13017. "reasoning": {
  13018. "type": "number"
  13019. },
  13020. "cache": {
  13021. "type": "object",
  13022. "properties": {
  13023. "read": {
  13024. "type": "number"
  13025. },
  13026. "write": {
  13027. "type": "number"
  13028. }
  13029. },
  13030. "required": ["read", "write"],
  13031. "additionalProperties": false
  13032. }
  13033. },
  13034. "required": ["input", "output", "reasoning", "cache"],
  13035. "additionalProperties": false
  13036. },
  13037. "share": {
  13038. "type": "object",
  13039. "properties": {
  13040. "url": {
  13041. "type": "string"
  13042. }
  13043. },
  13044. "required": ["url"],
  13045. "additionalProperties": false
  13046. },
  13047. "title": {
  13048. "type": "string"
  13049. },
  13050. "agent": {
  13051. "type": "string"
  13052. },
  13053. "model": {
  13054. "type": "object",
  13055. "properties": {
  13056. "id": {
  13057. "type": "string"
  13058. },
  13059. "providerID": {
  13060. "type": "string"
  13061. },
  13062. "variant": {
  13063. "type": "string"
  13064. }
  13065. },
  13066. "required": ["id", "providerID"],
  13067. "additionalProperties": false
  13068. },
  13069. "version": {
  13070. "type": "string"
  13071. },
  13072. "time": {
  13073. "type": "object",
  13074. "properties": {
  13075. "created": {
  13076. "type": "integer",
  13077. "minimum": 0
  13078. },
  13079. "updated": {
  13080. "type": "integer",
  13081. "minimum": 0
  13082. },
  13083. "compacting": {
  13084. "type": "integer",
  13085. "minimum": 0
  13086. },
  13087. "archived": {
  13088. "type": "number"
  13089. }
  13090. },
  13091. "required": ["created", "updated"],
  13092. "additionalProperties": false
  13093. },
  13094. "permission": {
  13095. "$ref": "#/components/schemas/PermissionRuleset"
  13096. },
  13097. "revert": {
  13098. "type": "object",
  13099. "properties": {
  13100. "messageID": {
  13101. "type": "string",
  13102. "pattern": "^msg"
  13103. },
  13104. "partID": {
  13105. "type": "string",
  13106. "pattern": "^prt"
  13107. },
  13108. "snapshot": {
  13109. "type": "string"
  13110. },
  13111. "diff": {
  13112. "type": "string"
  13113. }
  13114. },
  13115. "required": ["messageID"],
  13116. "additionalProperties": false
  13117. },
  13118. "project": {
  13119. "anyOf": [
  13120. {
  13121. "$ref": "#/components/schemas/ProjectSummary"
  13122. },
  13123. {
  13124. "type": "null"
  13125. }
  13126. ]
  13127. }
  13128. },
  13129. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  13130. "additionalProperties": false
  13131. },
  13132. "McpResource": {
  13133. "type": "object",
  13134. "properties": {
  13135. "name": {
  13136. "type": "string"
  13137. },
  13138. "uri": {
  13139. "type": "string"
  13140. },
  13141. "description": {
  13142. "type": "string"
  13143. },
  13144. "mimeType": {
  13145. "type": "string"
  13146. },
  13147. "client": {
  13148. "type": "string"
  13149. }
  13150. },
  13151. "required": ["name", "uri", "client"],
  13152. "additionalProperties": false
  13153. },
  13154. "Symbol": {
  13155. "type": "object",
  13156. "properties": {
  13157. "name": {
  13158. "type": "string"
  13159. },
  13160. "kind": {
  13161. "type": "integer",
  13162. "minimum": 0
  13163. },
  13164. "location": {
  13165. "type": "object",
  13166. "properties": {
  13167. "uri": {
  13168. "type": "string"
  13169. },
  13170. "range": {
  13171. "$ref": "#/components/schemas/Range"
  13172. }
  13173. },
  13174. "required": ["uri", "range"],
  13175. "additionalProperties": false
  13176. }
  13177. },
  13178. "required": ["name", "kind", "location"],
  13179. "additionalProperties": false
  13180. },
  13181. "FileNode": {
  13182. "type": "object",
  13183. "properties": {
  13184. "name": {
  13185. "type": "string"
  13186. },
  13187. "path": {
  13188. "type": "string"
  13189. },
  13190. "absolute": {
  13191. "type": "string"
  13192. },
  13193. "type": {
  13194. "type": "string",
  13195. "enum": ["file", "directory"]
  13196. },
  13197. "ignored": {
  13198. "type": "boolean"
  13199. }
  13200. },
  13201. "required": ["name", "path", "absolute", "type", "ignored"],
  13202. "additionalProperties": false
  13203. },
  13204. "FileContent": {
  13205. "type": "object",
  13206. "properties": {
  13207. "type": {
  13208. "type": "string",
  13209. "enum": ["text", "binary"]
  13210. },
  13211. "content": {
  13212. "type": "string"
  13213. },
  13214. "diff": {
  13215. "type": "string"
  13216. },
  13217. "patch": {
  13218. "type": "object",
  13219. "properties": {
  13220. "oldFileName": {
  13221. "type": "string"
  13222. },
  13223. "newFileName": {
  13224. "type": "string"
  13225. },
  13226. "oldHeader": {
  13227. "type": "string"
  13228. },
  13229. "newHeader": {
  13230. "type": "string"
  13231. },
  13232. "hunks": {
  13233. "type": "array",
  13234. "items": {
  13235. "type": "object",
  13236. "properties": {
  13237. "oldStart": {
  13238. "type": "integer",
  13239. "minimum": 0
  13240. },
  13241. "oldLines": {
  13242. "type": "integer",
  13243. "minimum": 0
  13244. },
  13245. "newStart": {
  13246. "type": "integer",
  13247. "minimum": 0
  13248. },
  13249. "newLines": {
  13250. "type": "integer",
  13251. "minimum": 0
  13252. },
  13253. "lines": {
  13254. "type": "array",
  13255. "items": {
  13256. "type": "string"
  13257. }
  13258. }
  13259. },
  13260. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13261. "additionalProperties": false
  13262. }
  13263. },
  13264. "index": {
  13265. "type": "string"
  13266. }
  13267. },
  13268. "required": ["oldFileName", "newFileName", "hunks"],
  13269. "additionalProperties": false
  13270. },
  13271. "encoding": {
  13272. "type": "string",
  13273. "enum": ["base64"]
  13274. },
  13275. "mimeType": {
  13276. "type": "string"
  13277. }
  13278. },
  13279. "required": ["type", "content"],
  13280. "additionalProperties": false
  13281. },
  13282. "File": {
  13283. "type": "object",
  13284. "properties": {
  13285. "path": {
  13286. "type": "string"
  13287. },
  13288. "added": {
  13289. "type": "integer",
  13290. "minimum": 0
  13291. },
  13292. "removed": {
  13293. "type": "integer",
  13294. "minimum": 0
  13295. },
  13296. "status": {
  13297. "type": "string",
  13298. "enum": ["added", "deleted", "modified"]
  13299. }
  13300. },
  13301. "required": ["path", "added", "removed", "status"],
  13302. "additionalProperties": false
  13303. },
  13304. "Path": {
  13305. "type": "object",
  13306. "properties": {
  13307. "home": {
  13308. "type": "string"
  13309. },
  13310. "state": {
  13311. "type": "string"
  13312. },
  13313. "config": {
  13314. "type": "string"
  13315. },
  13316. "worktree": {
  13317. "type": "string"
  13318. },
  13319. "directory": {
  13320. "type": "string"
  13321. }
  13322. },
  13323. "required": ["home", "state", "config", "worktree", "directory"],
  13324. "additionalProperties": false
  13325. },
  13326. "VcsInfo": {
  13327. "type": "object",
  13328. "properties": {
  13329. "branch": {
  13330. "type": "string"
  13331. },
  13332. "default_branch": {
  13333. "type": "string"
  13334. }
  13335. },
  13336. "additionalProperties": false
  13337. },
  13338. "VcsFileStatus": {
  13339. "type": "object",
  13340. "properties": {
  13341. "file": {
  13342. "type": "string"
  13343. },
  13344. "additions": {
  13345. "type": "number"
  13346. },
  13347. "deletions": {
  13348. "type": "number"
  13349. },
  13350. "status": {
  13351. "type": "string",
  13352. "enum": ["added", "deleted", "modified"]
  13353. }
  13354. },
  13355. "required": ["file", "additions", "deletions", "status"],
  13356. "additionalProperties": false
  13357. },
  13358. "VcsFileDiff": {
  13359. "type": "object",
  13360. "properties": {
  13361. "file": {
  13362. "type": "string"
  13363. },
  13364. "patch": {
  13365. "type": "string"
  13366. },
  13367. "additions": {
  13368. "type": "number"
  13369. },
  13370. "deletions": {
  13371. "type": "number"
  13372. },
  13373. "status": {
  13374. "type": "string",
  13375. "enum": ["added", "deleted", "modified"]
  13376. }
  13377. },
  13378. "required": ["file", "additions", "deletions"],
  13379. "additionalProperties": false
  13380. },
  13381. "VcsApplyError": {
  13382. "type": "object",
  13383. "properties": {
  13384. "name": {
  13385. "type": "string",
  13386. "enum": ["VcsApplyError"]
  13387. },
  13388. "data": {
  13389. "type": "object",
  13390. "properties": {
  13391. "message": {
  13392. "type": "string"
  13393. },
  13394. "reason": {
  13395. "type": "string",
  13396. "enum": ["non-git", "not-clean"]
  13397. }
  13398. },
  13399. "required": ["message", "reason"],
  13400. "additionalProperties": false
  13401. }
  13402. },
  13403. "required": ["name", "data"],
  13404. "additionalProperties": false
  13405. },
  13406. "Command": {
  13407. "type": "object",
  13408. "properties": {
  13409. "name": {
  13410. "type": "string"
  13411. },
  13412. "description": {
  13413. "type": "string"
  13414. },
  13415. "agent": {
  13416. "type": "string"
  13417. },
  13418. "model": {
  13419. "type": "string"
  13420. },
  13421. "source": {
  13422. "type": "string",
  13423. "enum": ["command", "mcp", "skill"]
  13424. },
  13425. "template": {
  13426. "type": "string"
  13427. },
  13428. "subtask": {
  13429. "type": "boolean"
  13430. },
  13431. "hints": {
  13432. "type": "array",
  13433. "items": {
  13434. "type": "string"
  13435. }
  13436. }
  13437. },
  13438. "required": ["name", "template", "hints"],
  13439. "additionalProperties": false
  13440. },
  13441. "Agent": {
  13442. "type": "object",
  13443. "properties": {
  13444. "name": {
  13445. "type": "string"
  13446. },
  13447. "description": {
  13448. "type": "string"
  13449. },
  13450. "mode": {
  13451. "type": "string",
  13452. "enum": ["subagent", "primary", "all"]
  13453. },
  13454. "native": {
  13455. "type": "boolean"
  13456. },
  13457. "hidden": {
  13458. "type": "boolean"
  13459. },
  13460. "topP": {
  13461. "type": "number"
  13462. },
  13463. "temperature": {
  13464. "type": "number"
  13465. },
  13466. "color": {
  13467. "type": "string"
  13468. },
  13469. "permission": {
  13470. "$ref": "#/components/schemas/PermissionRuleset"
  13471. },
  13472. "model": {
  13473. "type": "object",
  13474. "properties": {
  13475. "modelID": {
  13476. "type": "string"
  13477. },
  13478. "providerID": {
  13479. "type": "string"
  13480. }
  13481. },
  13482. "required": ["modelID", "providerID"],
  13483. "additionalProperties": false
  13484. },
  13485. "variant": {
  13486. "type": "string"
  13487. },
  13488. "prompt": {
  13489. "type": "string"
  13490. },
  13491. "options": {
  13492. "type": "object"
  13493. },
  13494. "steps": {
  13495. "type": "number"
  13496. }
  13497. },
  13498. "required": ["name", "mode", "permission", "options"],
  13499. "additionalProperties": false
  13500. },
  13501. "LSPStatus": {
  13502. "type": "object",
  13503. "properties": {
  13504. "id": {
  13505. "type": "string"
  13506. },
  13507. "name": {
  13508. "type": "string"
  13509. },
  13510. "root": {
  13511. "type": "string"
  13512. },
  13513. "status": {
  13514. "type": "string",
  13515. "enum": ["connected", "error"]
  13516. }
  13517. },
  13518. "required": ["id", "name", "root", "status"],
  13519. "additionalProperties": false
  13520. },
  13521. "FormatterStatus": {
  13522. "type": "object",
  13523. "properties": {
  13524. "name": {
  13525. "type": "string"
  13526. },
  13527. "extensions": {
  13528. "type": "array",
  13529. "items": {
  13530. "type": "string"
  13531. }
  13532. },
  13533. "enabled": {
  13534. "type": "boolean"
  13535. }
  13536. },
  13537. "required": ["name", "extensions", "enabled"],
  13538. "additionalProperties": false
  13539. },
  13540. "MCPStatusConnected": {
  13541. "type": "object",
  13542. "properties": {
  13543. "status": {
  13544. "type": "string",
  13545. "enum": ["connected"]
  13546. }
  13547. },
  13548. "required": ["status"],
  13549. "additionalProperties": false
  13550. },
  13551. "MCPStatusDisabled": {
  13552. "type": "object",
  13553. "properties": {
  13554. "status": {
  13555. "type": "string",
  13556. "enum": ["disabled"]
  13557. }
  13558. },
  13559. "required": ["status"],
  13560. "additionalProperties": false
  13561. },
  13562. "MCPStatusFailed": {
  13563. "type": "object",
  13564. "properties": {
  13565. "status": {
  13566. "type": "string",
  13567. "enum": ["failed"]
  13568. },
  13569. "error": {
  13570. "type": "string"
  13571. }
  13572. },
  13573. "required": ["status", "error"],
  13574. "additionalProperties": false
  13575. },
  13576. "MCPStatusNeedsAuth": {
  13577. "type": "object",
  13578. "properties": {
  13579. "status": {
  13580. "type": "string",
  13581. "enum": ["needs_auth"]
  13582. }
  13583. },
  13584. "required": ["status"],
  13585. "additionalProperties": false
  13586. },
  13587. "MCPStatusNeedsClientRegistration": {
  13588. "type": "object",
  13589. "properties": {
  13590. "status": {
  13591. "type": "string",
  13592. "enum": ["needs_client_registration"]
  13593. },
  13594. "error": {
  13595. "type": "string"
  13596. }
  13597. },
  13598. "required": ["status", "error"],
  13599. "additionalProperties": false
  13600. },
  13601. "MCPStatus": {
  13602. "anyOf": [
  13603. {
  13604. "$ref": "#/components/schemas/MCPStatusConnected"
  13605. },
  13606. {
  13607. "$ref": "#/components/schemas/MCPStatusDisabled"
  13608. },
  13609. {
  13610. "$ref": "#/components/schemas/MCPStatusFailed"
  13611. },
  13612. {
  13613. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13614. },
  13615. {
  13616. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13617. }
  13618. ]
  13619. },
  13620. "McpUnsupportedOAuthError": {
  13621. "type": "object",
  13622. "properties": {
  13623. "error": {
  13624. "type": "string"
  13625. }
  13626. },
  13627. "required": ["error"],
  13628. "additionalProperties": false
  13629. },
  13630. "NotFoundError": {
  13631. "type": "object",
  13632. "required": ["name", "data"],
  13633. "properties": {
  13634. "name": {
  13635. "type": "string",
  13636. "enum": ["NotFoundError"]
  13637. },
  13638. "data": {
  13639. "type": "object",
  13640. "required": ["message"],
  13641. "properties": {
  13642. "message": {
  13643. "type": "string"
  13644. }
  13645. }
  13646. }
  13647. }
  13648. },
  13649. "effect_HttpApiError_Forbidden": {
  13650. "type": "object",
  13651. "properties": {
  13652. "_tag": {
  13653. "type": "string",
  13654. "enum": ["Forbidden"]
  13655. }
  13656. },
  13657. "required": ["_tag"],
  13658. "additionalProperties": false
  13659. },
  13660. "ProviderAuthMethod": {
  13661. "type": "object",
  13662. "properties": {
  13663. "type": {
  13664. "type": "string",
  13665. "enum": ["oauth", "api"]
  13666. },
  13667. "label": {
  13668. "type": "string"
  13669. },
  13670. "prompts": {
  13671. "type": "array",
  13672. "items": {
  13673. "anyOf": [
  13674. {
  13675. "type": "object",
  13676. "properties": {
  13677. "type": {
  13678. "type": "string",
  13679. "enum": ["text"]
  13680. },
  13681. "key": {
  13682. "type": "string"
  13683. },
  13684. "message": {
  13685. "type": "string"
  13686. },
  13687. "placeholder": {
  13688. "type": "string"
  13689. },
  13690. "when": {
  13691. "type": "object",
  13692. "properties": {
  13693. "key": {
  13694. "type": "string"
  13695. },
  13696. "op": {
  13697. "type": "string",
  13698. "enum": ["eq", "neq"]
  13699. },
  13700. "value": {
  13701. "type": "string"
  13702. }
  13703. },
  13704. "required": ["key", "op", "value"],
  13705. "additionalProperties": false
  13706. }
  13707. },
  13708. "required": ["type", "key", "message"],
  13709. "additionalProperties": false
  13710. },
  13711. {
  13712. "type": "object",
  13713. "properties": {
  13714. "type": {
  13715. "type": "string",
  13716. "enum": ["select"]
  13717. },
  13718. "key": {
  13719. "type": "string"
  13720. },
  13721. "message": {
  13722. "type": "string"
  13723. },
  13724. "options": {
  13725. "type": "array",
  13726. "items": {
  13727. "type": "object",
  13728. "properties": {
  13729. "label": {
  13730. "type": "string"
  13731. },
  13732. "value": {
  13733. "type": "string"
  13734. },
  13735. "hint": {
  13736. "type": "string"
  13737. }
  13738. },
  13739. "required": ["label", "value"],
  13740. "additionalProperties": false
  13741. }
  13742. },
  13743. "when": {
  13744. "type": "object",
  13745. "properties": {
  13746. "key": {
  13747. "type": "string"
  13748. },
  13749. "op": {
  13750. "type": "string",
  13751. "enum": ["eq", "neq"]
  13752. },
  13753. "value": {
  13754. "type": "string"
  13755. }
  13756. },
  13757. "required": ["key", "op", "value"],
  13758. "additionalProperties": false
  13759. }
  13760. },
  13761. "required": ["type", "key", "message", "options"],
  13762. "additionalProperties": false
  13763. }
  13764. ]
  13765. }
  13766. }
  13767. },
  13768. "required": ["type", "label"],
  13769. "additionalProperties": false
  13770. },
  13771. "ProviderAuthAuthorization": {
  13772. "type": "object",
  13773. "properties": {
  13774. "url": {
  13775. "type": "string"
  13776. },
  13777. "method": {
  13778. "type": "string",
  13779. "enum": ["auto", "code"]
  13780. },
  13781. "instructions": {
  13782. "type": "string"
  13783. }
  13784. },
  13785. "required": ["url", "method", "instructions"],
  13786. "additionalProperties": false
  13787. },
  13788. "ProviderAuthError1": {
  13789. "type": "object",
  13790. "properties": {
  13791. "name": {
  13792. "type": "string",
  13793. "enum": [
  13794. "BadRequest",
  13795. "ProviderAuthOauthMissing",
  13796. "ProviderAuthOauthCodeMissing",
  13797. "ProviderAuthOauthCallbackFailed",
  13798. "ProviderAuthValidationFailed"
  13799. ]
  13800. },
  13801. "data": {
  13802. "type": "object",
  13803. "properties": {
  13804. "providerID": {
  13805. "type": "string"
  13806. },
  13807. "field": {
  13808. "type": "string"
  13809. },
  13810. "message": {
  13811. "type": "string"
  13812. },
  13813. "kind": {
  13814. "type": "string"
  13815. }
  13816. },
  13817. "additionalProperties": false
  13818. }
  13819. },
  13820. "required": ["name", "data"],
  13821. "additionalProperties": false
  13822. },
  13823. "TextPartInput": {
  13824. "type": "object",
  13825. "properties": {
  13826. "id": {
  13827. "type": "string",
  13828. "pattern": "^prt"
  13829. },
  13830. "type": {
  13831. "type": "string",
  13832. "enum": ["text"]
  13833. },
  13834. "text": {
  13835. "type": "string"
  13836. },
  13837. "synthetic": {
  13838. "type": "boolean"
  13839. },
  13840. "ignored": {
  13841. "type": "boolean"
  13842. },
  13843. "time": {
  13844. "type": "object",
  13845. "properties": {
  13846. "start": {
  13847. "type": "integer",
  13848. "minimum": 0
  13849. },
  13850. "end": {
  13851. "type": "integer",
  13852. "minimum": 0
  13853. }
  13854. },
  13855. "required": ["start"],
  13856. "additionalProperties": false
  13857. },
  13858. "metadata": {
  13859. "type": "object"
  13860. }
  13861. },
  13862. "required": ["type", "text"],
  13863. "additionalProperties": false
  13864. },
  13865. "FilePartInput": {
  13866. "type": "object",
  13867. "properties": {
  13868. "id": {
  13869. "type": "string",
  13870. "pattern": "^prt"
  13871. },
  13872. "type": {
  13873. "type": "string",
  13874. "enum": ["file"]
  13875. },
  13876. "mime": {
  13877. "type": "string"
  13878. },
  13879. "filename": {
  13880. "type": "string"
  13881. },
  13882. "url": {
  13883. "type": "string"
  13884. },
  13885. "source": {
  13886. "$ref": "#/components/schemas/FilePartSource"
  13887. }
  13888. },
  13889. "required": ["type", "mime", "url"],
  13890. "additionalProperties": false
  13891. },
  13892. "AgentPartInput": {
  13893. "type": "object",
  13894. "properties": {
  13895. "id": {
  13896. "type": "string",
  13897. "pattern": "^prt"
  13898. },
  13899. "type": {
  13900. "type": "string",
  13901. "enum": ["agent"]
  13902. },
  13903. "name": {
  13904. "type": "string"
  13905. },
  13906. "source": {
  13907. "type": "object",
  13908. "properties": {
  13909. "value": {
  13910. "type": "string"
  13911. },
  13912. "start": {
  13913. "type": "integer",
  13914. "minimum": 0
  13915. },
  13916. "end": {
  13917. "type": "integer",
  13918. "minimum": 0
  13919. }
  13920. },
  13921. "required": ["value", "start", "end"],
  13922. "additionalProperties": false
  13923. }
  13924. },
  13925. "required": ["type", "name"],
  13926. "additionalProperties": false
  13927. },
  13928. "SubtaskPartInput": {
  13929. "type": "object",
  13930. "properties": {
  13931. "id": {
  13932. "type": "string",
  13933. "pattern": "^prt"
  13934. },
  13935. "type": {
  13936. "type": "string",
  13937. "enum": ["subtask"]
  13938. },
  13939. "prompt": {
  13940. "type": "string"
  13941. },
  13942. "description": {
  13943. "type": "string"
  13944. },
  13945. "agent": {
  13946. "type": "string"
  13947. },
  13948. "model": {
  13949. "type": "object",
  13950. "properties": {
  13951. "providerID": {
  13952. "type": "string"
  13953. },
  13954. "modelID": {
  13955. "type": "string"
  13956. }
  13957. },
  13958. "required": ["providerID", "modelID"],
  13959. "additionalProperties": false
  13960. },
  13961. "command": {
  13962. "type": "string"
  13963. }
  13964. },
  13965. "required": ["type", "prompt", "description", "agent"],
  13966. "additionalProperties": false
  13967. },
  13968. "V2SessionsResponse": {
  13969. "type": "object",
  13970. "properties": {
  13971. "items": {
  13972. "type": "array",
  13973. "items": {
  13974. "$ref": "#/components/schemas/SessionInfo"
  13975. }
  13976. },
  13977. "cursor": {
  13978. "type": "object",
  13979. "properties": {
  13980. "previous": {
  13981. "type": "string"
  13982. },
  13983. "next": {
  13984. "type": "string"
  13985. }
  13986. },
  13987. "additionalProperties": false
  13988. }
  13989. },
  13990. "required": ["items", "cursor"],
  13991. "additionalProperties": false
  13992. },
  13993. "V2SessionMessagesResponse": {
  13994. "type": "object",
  13995. "properties": {
  13996. "items": {
  13997. "type": "array",
  13998. "items": {
  13999. "$ref": "#/components/schemas/SessionMessage"
  14000. }
  14001. },
  14002. "cursor": {
  14003. "type": "object",
  14004. "properties": {
  14005. "previous": {
  14006. "type": "string"
  14007. },
  14008. "next": {
  14009. "type": "string"
  14010. }
  14011. },
  14012. "additionalProperties": false
  14013. }
  14014. },
  14015. "required": ["items", "cursor"],
  14016. "additionalProperties": false
  14017. },
  14018. "EventTuiPromptAppend": {
  14019. "type": "object",
  14020. "properties": {
  14021. "type": {
  14022. "type": "string",
  14023. "enum": ["tui.prompt.append"]
  14024. },
  14025. "properties": {
  14026. "type": "object",
  14027. "properties": {
  14028. "text": {
  14029. "type": "string"
  14030. }
  14031. },
  14032. "required": ["text"],
  14033. "additionalProperties": false
  14034. }
  14035. },
  14036. "required": ["type", "properties"],
  14037. "additionalProperties": false
  14038. },
  14039. "EventTuiCommandExecute": {
  14040. "type": "object",
  14041. "properties": {
  14042. "type": {
  14043. "type": "string",
  14044. "enum": ["tui.command.execute"]
  14045. },
  14046. "properties": {
  14047. "type": "object",
  14048. "properties": {
  14049. "command": {
  14050. "anyOf": [
  14051. {
  14052. "type": "string",
  14053. "enum": [
  14054. "session.list",
  14055. "session.new",
  14056. "session.share",
  14057. "session.interrupt",
  14058. "session.compact",
  14059. "session.page.up",
  14060. "session.page.down",
  14061. "session.line.up",
  14062. "session.line.down",
  14063. "session.half.page.up",
  14064. "session.half.page.down",
  14065. "session.first",
  14066. "session.last",
  14067. "prompt.clear",
  14068. "prompt.submit",
  14069. "agent.cycle"
  14070. ]
  14071. },
  14072. {
  14073. "type": "string"
  14074. }
  14075. ]
  14076. }
  14077. },
  14078. "required": ["command"],
  14079. "additionalProperties": false
  14080. }
  14081. },
  14082. "required": ["type", "properties"],
  14083. "additionalProperties": false
  14084. },
  14085. "EventTuiToastShow": {
  14086. "type": "object",
  14087. "properties": {
  14088. "type": {
  14089. "type": "string",
  14090. "enum": ["tui.toast.show"]
  14091. },
  14092. "properties": {
  14093. "type": "object",
  14094. "properties": {
  14095. "title": {
  14096. "type": "string"
  14097. },
  14098. "message": {
  14099. "type": "string"
  14100. },
  14101. "variant": {
  14102. "type": "string",
  14103. "enum": ["info", "success", "warning", "error"]
  14104. },
  14105. "duration": {
  14106. "type": "integer",
  14107. "exclusiveMinimum": 0
  14108. }
  14109. },
  14110. "required": ["message", "variant"],
  14111. "additionalProperties": false
  14112. }
  14113. },
  14114. "required": ["type", "properties"],
  14115. "additionalProperties": false
  14116. },
  14117. "EventTuiSessionSelect": {
  14118. "type": "object",
  14119. "properties": {
  14120. "type": {
  14121. "type": "string",
  14122. "enum": ["tui.session.select"]
  14123. },
  14124. "properties": {
  14125. "type": "object",
  14126. "properties": {
  14127. "sessionID": {
  14128. "type": "string",
  14129. "pattern": "^ses",
  14130. "description": "Session ID to navigate to"
  14131. }
  14132. },
  14133. "required": ["sessionID"],
  14134. "additionalProperties": false
  14135. }
  14136. },
  14137. "required": ["type", "properties"],
  14138. "additionalProperties": false
  14139. },
  14140. "Workspace": {
  14141. "type": "object",
  14142. "properties": {
  14143. "id": {
  14144. "type": "string",
  14145. "pattern": "^wrk"
  14146. },
  14147. "type": {
  14148. "type": "string"
  14149. },
  14150. "name": {
  14151. "type": "string"
  14152. },
  14153. "branch": {
  14154. "anyOf": [
  14155. {
  14156. "type": "string"
  14157. },
  14158. {
  14159. "type": "null"
  14160. }
  14161. ]
  14162. },
  14163. "directory": {
  14164. "anyOf": [
  14165. {
  14166. "type": "string"
  14167. },
  14168. {
  14169. "type": "null"
  14170. }
  14171. ]
  14172. },
  14173. "extra": {
  14174. "anyOf": [
  14175. {},
  14176. {
  14177. "type": "null"
  14178. }
  14179. ]
  14180. },
  14181. "projectID": {
  14182. "type": "string"
  14183. },
  14184. "timeUsed": {
  14185. "anyOf": [
  14186. {
  14187. "type": "number"
  14188. },
  14189. {
  14190. "type": "string",
  14191. "enum": ["NaN"]
  14192. },
  14193. {
  14194. "type": "string",
  14195. "enum": ["Infinity"]
  14196. },
  14197. {
  14198. "type": "string",
  14199. "enum": ["-Infinity"]
  14200. },
  14201. {
  14202. "type": "string",
  14203. "enum": ["Infinity", "-Infinity", "NaN"]
  14204. }
  14205. ]
  14206. }
  14207. },
  14208. "required": ["id", "type", "name", "projectID", "timeUsed"],
  14209. "additionalProperties": false
  14210. },
  14211. "WorkspaceWarpError": {
  14212. "type": "object",
  14213. "properties": {
  14214. "name": {
  14215. "type": "string",
  14216. "enum": ["WorkspaceWarpError"]
  14217. },
  14218. "data": {
  14219. "type": "object",
  14220. "properties": {
  14221. "message": {
  14222. "type": "string"
  14223. }
  14224. },
  14225. "required": ["message"],
  14226. "additionalProperties": false
  14227. }
  14228. },
  14229. "required": ["name", "data"],
  14230. "additionalProperties": false
  14231. },
  14232. "SyncEventMessageUpdated": {
  14233. "type": "object",
  14234. "properties": {
  14235. "type": {
  14236. "type": "string",
  14237. "enum": ["sync"]
  14238. },
  14239. "name": {
  14240. "type": "string",
  14241. "enum": ["message.updated.1"]
  14242. },
  14243. "id": {
  14244. "type": "string"
  14245. },
  14246. "seq": {
  14247. "type": "number"
  14248. },
  14249. "aggregateID": {
  14250. "type": "string",
  14251. "enum": ["sessionID"]
  14252. },
  14253. "data": {
  14254. "type": "object",
  14255. "properties": {
  14256. "sessionID": {
  14257. "type": "string",
  14258. "pattern": "^ses"
  14259. },
  14260. "info": {
  14261. "$ref": "#/components/schemas/Message"
  14262. }
  14263. },
  14264. "required": ["sessionID", "info"],
  14265. "additionalProperties": false
  14266. }
  14267. },
  14268. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14269. "additionalProperties": false
  14270. },
  14271. "SyncEventMessageRemoved": {
  14272. "type": "object",
  14273. "properties": {
  14274. "type": {
  14275. "type": "string",
  14276. "enum": ["sync"]
  14277. },
  14278. "name": {
  14279. "type": "string",
  14280. "enum": ["message.removed.1"]
  14281. },
  14282. "id": {
  14283. "type": "string"
  14284. },
  14285. "seq": {
  14286. "type": "number"
  14287. },
  14288. "aggregateID": {
  14289. "type": "string",
  14290. "enum": ["sessionID"]
  14291. },
  14292. "data": {
  14293. "type": "object",
  14294. "properties": {
  14295. "sessionID": {
  14296. "type": "string",
  14297. "pattern": "^ses"
  14298. },
  14299. "messageID": {
  14300. "type": "string",
  14301. "pattern": "^msg"
  14302. }
  14303. },
  14304. "required": ["sessionID", "messageID"],
  14305. "additionalProperties": false
  14306. }
  14307. },
  14308. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14309. "additionalProperties": false
  14310. },
  14311. "SyncEventMessagePartUpdated": {
  14312. "type": "object",
  14313. "properties": {
  14314. "type": {
  14315. "type": "string",
  14316. "enum": ["sync"]
  14317. },
  14318. "name": {
  14319. "type": "string",
  14320. "enum": ["message.part.updated.1"]
  14321. },
  14322. "id": {
  14323. "type": "string"
  14324. },
  14325. "seq": {
  14326. "type": "number"
  14327. },
  14328. "aggregateID": {
  14329. "type": "string",
  14330. "enum": ["sessionID"]
  14331. },
  14332. "data": {
  14333. "type": "object",
  14334. "properties": {
  14335. "sessionID": {
  14336. "type": "string",
  14337. "pattern": "^ses"
  14338. },
  14339. "part": {
  14340. "$ref": "#/components/schemas/Part"
  14341. },
  14342. "time": {
  14343. "type": "integer",
  14344. "minimum": 0
  14345. }
  14346. },
  14347. "required": ["sessionID", "part", "time"],
  14348. "additionalProperties": false
  14349. }
  14350. },
  14351. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14352. "additionalProperties": false
  14353. },
  14354. "SyncEventMessagePartRemoved": {
  14355. "type": "object",
  14356. "properties": {
  14357. "type": {
  14358. "type": "string",
  14359. "enum": ["sync"]
  14360. },
  14361. "name": {
  14362. "type": "string",
  14363. "enum": ["message.part.removed.1"]
  14364. },
  14365. "id": {
  14366. "type": "string"
  14367. },
  14368. "seq": {
  14369. "type": "number"
  14370. },
  14371. "aggregateID": {
  14372. "type": "string",
  14373. "enum": ["sessionID"]
  14374. },
  14375. "data": {
  14376. "type": "object",
  14377. "properties": {
  14378. "sessionID": {
  14379. "type": "string",
  14380. "pattern": "^ses"
  14381. },
  14382. "messageID": {
  14383. "type": "string",
  14384. "pattern": "^msg"
  14385. },
  14386. "partID": {
  14387. "type": "string",
  14388. "pattern": "^prt"
  14389. }
  14390. },
  14391. "required": ["sessionID", "messageID", "partID"],
  14392. "additionalProperties": false
  14393. }
  14394. },
  14395. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14396. "additionalProperties": false
  14397. },
  14398. "SyncEventSessionCreated": {
  14399. "type": "object",
  14400. "properties": {
  14401. "type": {
  14402. "type": "string",
  14403. "enum": ["sync"]
  14404. },
  14405. "name": {
  14406. "type": "string",
  14407. "enum": ["session.created.1"]
  14408. },
  14409. "id": {
  14410. "type": "string"
  14411. },
  14412. "seq": {
  14413. "type": "number"
  14414. },
  14415. "aggregateID": {
  14416. "type": "string",
  14417. "enum": ["sessionID"]
  14418. },
  14419. "data": {
  14420. "type": "object",
  14421. "properties": {
  14422. "sessionID": {
  14423. "type": "string",
  14424. "pattern": "^ses"
  14425. },
  14426. "info": {
  14427. "$ref": "#/components/schemas/Session"
  14428. }
  14429. },
  14430. "required": ["sessionID", "info"],
  14431. "additionalProperties": false
  14432. }
  14433. },
  14434. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14435. "additionalProperties": false
  14436. },
  14437. "SyncEventSessionUpdated": {
  14438. "type": "object",
  14439. "properties": {
  14440. "type": {
  14441. "type": "string",
  14442. "enum": ["sync"]
  14443. },
  14444. "name": {
  14445. "type": "string",
  14446. "enum": ["session.updated.1"]
  14447. },
  14448. "id": {
  14449. "type": "string"
  14450. },
  14451. "seq": {
  14452. "type": "number"
  14453. },
  14454. "aggregateID": {
  14455. "type": "string",
  14456. "enum": ["sessionID"]
  14457. },
  14458. "data": {
  14459. "type": "object",
  14460. "properties": {
  14461. "sessionID": {
  14462. "type": "string",
  14463. "pattern": "^ses"
  14464. },
  14465. "info": {
  14466. "type": "object",
  14467. "properties": {
  14468. "id": {
  14469. "anyOf": [
  14470. {
  14471. "type": "string",
  14472. "pattern": "^ses"
  14473. },
  14474. {
  14475. "type": "null"
  14476. }
  14477. ]
  14478. },
  14479. "slug": {
  14480. "anyOf": [
  14481. {
  14482. "type": "string"
  14483. },
  14484. {
  14485. "type": "null"
  14486. }
  14487. ]
  14488. },
  14489. "projectID": {
  14490. "anyOf": [
  14491. {
  14492. "type": "string"
  14493. },
  14494. {
  14495. "type": "null"
  14496. }
  14497. ]
  14498. },
  14499. "workspaceID": {
  14500. "anyOf": [
  14501. {
  14502. "type": "string",
  14503. "pattern": "^wrk"
  14504. },
  14505. {
  14506. "type": "null"
  14507. }
  14508. ]
  14509. },
  14510. "directory": {
  14511. "anyOf": [
  14512. {
  14513. "type": "string"
  14514. },
  14515. {
  14516. "type": "null"
  14517. }
  14518. ]
  14519. },
  14520. "path": {
  14521. "anyOf": [
  14522. {
  14523. "type": "string"
  14524. },
  14525. {
  14526. "type": "null"
  14527. }
  14528. ]
  14529. },
  14530. "parentID": {
  14531. "anyOf": [
  14532. {
  14533. "type": "string",
  14534. "pattern": "^ses"
  14535. },
  14536. {
  14537. "type": "null"
  14538. }
  14539. ]
  14540. },
  14541. "summary": {
  14542. "anyOf": [
  14543. {
  14544. "type": "object",
  14545. "properties": {
  14546. "additions": {
  14547. "type": "number"
  14548. },
  14549. "deletions": {
  14550. "type": "number"
  14551. },
  14552. "files": {
  14553. "type": "number"
  14554. },
  14555. "diffs": {
  14556. "type": "array",
  14557. "items": {
  14558. "$ref": "#/components/schemas/SnapshotFileDiff"
  14559. }
  14560. }
  14561. },
  14562. "required": ["additions", "deletions", "files"],
  14563. "additionalProperties": false
  14564. },
  14565. {
  14566. "type": "null"
  14567. }
  14568. ]
  14569. },
  14570. "cost": {
  14571. "anyOf": [
  14572. {
  14573. "type": "number"
  14574. },
  14575. {
  14576. "type": "null"
  14577. }
  14578. ]
  14579. },
  14580. "tokens": {
  14581. "anyOf": [
  14582. {
  14583. "type": "object",
  14584. "properties": {
  14585. "input": {
  14586. "type": "number"
  14587. },
  14588. "output": {
  14589. "type": "number"
  14590. },
  14591. "reasoning": {
  14592. "type": "number"
  14593. },
  14594. "cache": {
  14595. "type": "object",
  14596. "properties": {
  14597. "read": {
  14598. "type": "number"
  14599. },
  14600. "write": {
  14601. "type": "number"
  14602. }
  14603. },
  14604. "required": ["read", "write"],
  14605. "additionalProperties": false
  14606. }
  14607. },
  14608. "required": ["input", "output", "reasoning", "cache"],
  14609. "additionalProperties": false
  14610. },
  14611. {
  14612. "type": "null"
  14613. }
  14614. ]
  14615. },
  14616. "share": {
  14617. "type": "object",
  14618. "properties": {
  14619. "url": {
  14620. "anyOf": [
  14621. {
  14622. "type": "string"
  14623. },
  14624. {
  14625. "type": "null"
  14626. }
  14627. ]
  14628. }
  14629. },
  14630. "additionalProperties": false
  14631. },
  14632. "title": {
  14633. "anyOf": [
  14634. {
  14635. "type": "string"
  14636. },
  14637. {
  14638. "type": "null"
  14639. }
  14640. ]
  14641. },
  14642. "agent": {
  14643. "anyOf": [
  14644. {
  14645. "type": "string"
  14646. },
  14647. {
  14648. "type": "null"
  14649. }
  14650. ]
  14651. },
  14652. "model": {
  14653. "anyOf": [
  14654. {
  14655. "type": "object",
  14656. "properties": {
  14657. "id": {
  14658. "type": "string"
  14659. },
  14660. "providerID": {
  14661. "type": "string"
  14662. },
  14663. "variant": {
  14664. "type": "string"
  14665. }
  14666. },
  14667. "required": ["id", "providerID"],
  14668. "additionalProperties": false
  14669. },
  14670. {
  14671. "type": "null"
  14672. }
  14673. ]
  14674. },
  14675. "version": {
  14676. "anyOf": [
  14677. {
  14678. "type": "string"
  14679. },
  14680. {
  14681. "type": "null"
  14682. }
  14683. ]
  14684. },
  14685. "time": {
  14686. "type": "object",
  14687. "properties": {
  14688. "created": {
  14689. "anyOf": [
  14690. {
  14691. "type": "integer",
  14692. "minimum": 0
  14693. },
  14694. {
  14695. "type": "null"
  14696. }
  14697. ]
  14698. },
  14699. "updated": {
  14700. "anyOf": [
  14701. {
  14702. "type": "integer",
  14703. "minimum": 0
  14704. },
  14705. {
  14706. "type": "null"
  14707. }
  14708. ]
  14709. },
  14710. "compacting": {
  14711. "anyOf": [
  14712. {
  14713. "type": "integer",
  14714. "minimum": 0
  14715. },
  14716. {
  14717. "type": "null"
  14718. }
  14719. ]
  14720. },
  14721. "archived": {
  14722. "anyOf": [
  14723. {
  14724. "type": "number"
  14725. },
  14726. {
  14727. "type": "null"
  14728. }
  14729. ]
  14730. }
  14731. },
  14732. "additionalProperties": false
  14733. },
  14734. "permission": {
  14735. "anyOf": [
  14736. {
  14737. "$ref": "#/components/schemas/PermissionRuleset"
  14738. },
  14739. {
  14740. "type": "null"
  14741. }
  14742. ]
  14743. },
  14744. "revert": {
  14745. "anyOf": [
  14746. {
  14747. "type": "object",
  14748. "properties": {
  14749. "messageID": {
  14750. "type": "string",
  14751. "pattern": "^msg"
  14752. },
  14753. "partID": {
  14754. "type": "string",
  14755. "pattern": "^prt"
  14756. },
  14757. "snapshot": {
  14758. "type": "string"
  14759. },
  14760. "diff": {
  14761. "type": "string"
  14762. }
  14763. },
  14764. "required": ["messageID"],
  14765. "additionalProperties": false
  14766. },
  14767. {
  14768. "type": "null"
  14769. }
  14770. ]
  14771. }
  14772. },
  14773. "additionalProperties": false
  14774. }
  14775. },
  14776. "required": ["sessionID", "info"],
  14777. "additionalProperties": false
  14778. }
  14779. },
  14780. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14781. "additionalProperties": false
  14782. },
  14783. "SyncEventSessionDeleted": {
  14784. "type": "object",
  14785. "properties": {
  14786. "type": {
  14787. "type": "string",
  14788. "enum": ["sync"]
  14789. },
  14790. "name": {
  14791. "type": "string",
  14792. "enum": ["session.deleted.1"]
  14793. },
  14794. "id": {
  14795. "type": "string"
  14796. },
  14797. "seq": {
  14798. "type": "number"
  14799. },
  14800. "aggregateID": {
  14801. "type": "string",
  14802. "enum": ["sessionID"]
  14803. },
  14804. "data": {
  14805. "type": "object",
  14806. "properties": {
  14807. "sessionID": {
  14808. "type": "string",
  14809. "pattern": "^ses"
  14810. },
  14811. "info": {
  14812. "$ref": "#/components/schemas/Session"
  14813. }
  14814. },
  14815. "required": ["sessionID", "info"],
  14816. "additionalProperties": false
  14817. }
  14818. },
  14819. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14820. "additionalProperties": false
  14821. },
  14822. "SyncEventSessionNextAgentSwitched": {
  14823. "type": "object",
  14824. "properties": {
  14825. "type": {
  14826. "type": "string",
  14827. "enum": ["sync"]
  14828. },
  14829. "name": {
  14830. "type": "string",
  14831. "enum": ["session.next.agent.switched.1"]
  14832. },
  14833. "id": {
  14834. "type": "string"
  14835. },
  14836. "seq": {
  14837. "type": "number"
  14838. },
  14839. "aggregateID": {
  14840. "type": "string",
  14841. "enum": ["sessionID"]
  14842. },
  14843. "data": {
  14844. "type": "object",
  14845. "properties": {
  14846. "timestamp": {
  14847. "type": "number"
  14848. },
  14849. "sessionID": {
  14850. "type": "string",
  14851. "pattern": "^ses"
  14852. },
  14853. "agent": {
  14854. "type": "string"
  14855. }
  14856. },
  14857. "required": ["timestamp", "sessionID", "agent"],
  14858. "additionalProperties": false
  14859. }
  14860. },
  14861. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14862. "additionalProperties": false
  14863. },
  14864. "SyncEventSessionNextModelSwitched": {
  14865. "type": "object",
  14866. "properties": {
  14867. "type": {
  14868. "type": "string",
  14869. "enum": ["sync"]
  14870. },
  14871. "name": {
  14872. "type": "string",
  14873. "enum": ["session.next.model.switched.1"]
  14874. },
  14875. "id": {
  14876. "type": "string"
  14877. },
  14878. "seq": {
  14879. "type": "number"
  14880. },
  14881. "aggregateID": {
  14882. "type": "string",
  14883. "enum": ["sessionID"]
  14884. },
  14885. "data": {
  14886. "type": "object",
  14887. "properties": {
  14888. "timestamp": {
  14889. "type": "number"
  14890. },
  14891. "sessionID": {
  14892. "type": "string",
  14893. "pattern": "^ses"
  14894. },
  14895. "model": {
  14896. "type": "object",
  14897. "properties": {
  14898. "id": {
  14899. "type": "string"
  14900. },
  14901. "providerID": {
  14902. "type": "string"
  14903. },
  14904. "variant": {
  14905. "type": "string"
  14906. }
  14907. },
  14908. "required": ["id", "providerID", "variant"],
  14909. "additionalProperties": false
  14910. }
  14911. },
  14912. "required": ["timestamp", "sessionID", "model"],
  14913. "additionalProperties": false
  14914. }
  14915. },
  14916. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14917. "additionalProperties": false
  14918. },
  14919. "SyncEventSessionNextPrompted": {
  14920. "type": "object",
  14921. "properties": {
  14922. "type": {
  14923. "type": "string",
  14924. "enum": ["sync"]
  14925. },
  14926. "name": {
  14927. "type": "string",
  14928. "enum": ["session.next.prompted.1"]
  14929. },
  14930. "id": {
  14931. "type": "string"
  14932. },
  14933. "seq": {
  14934. "type": "number"
  14935. },
  14936. "aggregateID": {
  14937. "type": "string",
  14938. "enum": ["sessionID"]
  14939. },
  14940. "data": {
  14941. "type": "object",
  14942. "properties": {
  14943. "timestamp": {
  14944. "type": "number"
  14945. },
  14946. "sessionID": {
  14947. "type": "string",
  14948. "pattern": "^ses"
  14949. },
  14950. "prompt": {
  14951. "$ref": "#/components/schemas/Prompt"
  14952. }
  14953. },
  14954. "required": ["timestamp", "sessionID", "prompt"],
  14955. "additionalProperties": false
  14956. }
  14957. },
  14958. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14959. "additionalProperties": false
  14960. },
  14961. "SyncEventSessionNextSynthetic": {
  14962. "type": "object",
  14963. "properties": {
  14964. "type": {
  14965. "type": "string",
  14966. "enum": ["sync"]
  14967. },
  14968. "name": {
  14969. "type": "string",
  14970. "enum": ["session.next.synthetic.1"]
  14971. },
  14972. "id": {
  14973. "type": "string"
  14974. },
  14975. "seq": {
  14976. "type": "number"
  14977. },
  14978. "aggregateID": {
  14979. "type": "string",
  14980. "enum": ["sessionID"]
  14981. },
  14982. "data": {
  14983. "type": "object",
  14984. "properties": {
  14985. "timestamp": {
  14986. "type": "number"
  14987. },
  14988. "sessionID": {
  14989. "type": "string",
  14990. "pattern": "^ses"
  14991. },
  14992. "text": {
  14993. "type": "string"
  14994. }
  14995. },
  14996. "required": ["timestamp", "sessionID", "text"],
  14997. "additionalProperties": false
  14998. }
  14999. },
  15000. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15001. "additionalProperties": false
  15002. },
  15003. "SyncEventSessionNextShellStarted": {
  15004. "type": "object",
  15005. "properties": {
  15006. "type": {
  15007. "type": "string",
  15008. "enum": ["sync"]
  15009. },
  15010. "name": {
  15011. "type": "string",
  15012. "enum": ["session.next.shell.started.1"]
  15013. },
  15014. "id": {
  15015. "type": "string"
  15016. },
  15017. "seq": {
  15018. "type": "number"
  15019. },
  15020. "aggregateID": {
  15021. "type": "string",
  15022. "enum": ["sessionID"]
  15023. },
  15024. "data": {
  15025. "type": "object",
  15026. "properties": {
  15027. "timestamp": {
  15028. "type": "number"
  15029. },
  15030. "sessionID": {
  15031. "type": "string",
  15032. "pattern": "^ses"
  15033. },
  15034. "callID": {
  15035. "type": "string"
  15036. },
  15037. "command": {
  15038. "type": "string"
  15039. }
  15040. },
  15041. "required": ["timestamp", "sessionID", "callID", "command"],
  15042. "additionalProperties": false
  15043. }
  15044. },
  15045. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15046. "additionalProperties": false
  15047. },
  15048. "SyncEventSessionNextShellEnded": {
  15049. "type": "object",
  15050. "properties": {
  15051. "type": {
  15052. "type": "string",
  15053. "enum": ["sync"]
  15054. },
  15055. "name": {
  15056. "type": "string",
  15057. "enum": ["session.next.shell.ended.1"]
  15058. },
  15059. "id": {
  15060. "type": "string"
  15061. },
  15062. "seq": {
  15063. "type": "number"
  15064. },
  15065. "aggregateID": {
  15066. "type": "string",
  15067. "enum": ["sessionID"]
  15068. },
  15069. "data": {
  15070. "type": "object",
  15071. "properties": {
  15072. "timestamp": {
  15073. "type": "number"
  15074. },
  15075. "sessionID": {
  15076. "type": "string",
  15077. "pattern": "^ses"
  15078. },
  15079. "callID": {
  15080. "type": "string"
  15081. },
  15082. "output": {
  15083. "type": "string"
  15084. }
  15085. },
  15086. "required": ["timestamp", "sessionID", "callID", "output"],
  15087. "additionalProperties": false
  15088. }
  15089. },
  15090. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15091. "additionalProperties": false
  15092. },
  15093. "SyncEventSessionNextStepStarted": {
  15094. "type": "object",
  15095. "properties": {
  15096. "type": {
  15097. "type": "string",
  15098. "enum": ["sync"]
  15099. },
  15100. "name": {
  15101. "type": "string",
  15102. "enum": ["session.next.step.started.1"]
  15103. },
  15104. "id": {
  15105. "type": "string"
  15106. },
  15107. "seq": {
  15108. "type": "number"
  15109. },
  15110. "aggregateID": {
  15111. "type": "string",
  15112. "enum": ["sessionID"]
  15113. },
  15114. "data": {
  15115. "type": "object",
  15116. "properties": {
  15117. "timestamp": {
  15118. "type": "number"
  15119. },
  15120. "sessionID": {
  15121. "type": "string",
  15122. "pattern": "^ses"
  15123. },
  15124. "agent": {
  15125. "type": "string"
  15126. },
  15127. "model": {
  15128. "type": "object",
  15129. "properties": {
  15130. "id": {
  15131. "type": "string"
  15132. },
  15133. "providerID": {
  15134. "type": "string"
  15135. },
  15136. "variant": {
  15137. "type": "string"
  15138. }
  15139. },
  15140. "required": ["id", "providerID", "variant"],
  15141. "additionalProperties": false
  15142. },
  15143. "snapshot": {
  15144. "type": "string"
  15145. }
  15146. },
  15147. "required": ["timestamp", "sessionID", "agent", "model"],
  15148. "additionalProperties": false
  15149. }
  15150. },
  15151. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15152. "additionalProperties": false
  15153. },
  15154. "SyncEventSessionNextStepEnded": {
  15155. "type": "object",
  15156. "properties": {
  15157. "type": {
  15158. "type": "string",
  15159. "enum": ["sync"]
  15160. },
  15161. "name": {
  15162. "type": "string",
  15163. "enum": ["session.next.step.ended.1"]
  15164. },
  15165. "id": {
  15166. "type": "string"
  15167. },
  15168. "seq": {
  15169. "type": "number"
  15170. },
  15171. "aggregateID": {
  15172. "type": "string",
  15173. "enum": ["sessionID"]
  15174. },
  15175. "data": {
  15176. "type": "object",
  15177. "properties": {
  15178. "timestamp": {
  15179. "type": "number"
  15180. },
  15181. "sessionID": {
  15182. "type": "string",
  15183. "pattern": "^ses"
  15184. },
  15185. "finish": {
  15186. "type": "string"
  15187. },
  15188. "cost": {
  15189. "type": "number"
  15190. },
  15191. "tokens": {
  15192. "type": "object",
  15193. "properties": {
  15194. "input": {
  15195. "type": "number"
  15196. },
  15197. "output": {
  15198. "type": "number"
  15199. },
  15200. "reasoning": {
  15201. "type": "number"
  15202. },
  15203. "cache": {
  15204. "type": "object",
  15205. "properties": {
  15206. "read": {
  15207. "type": "number"
  15208. },
  15209. "write": {
  15210. "type": "number"
  15211. }
  15212. },
  15213. "required": ["read", "write"],
  15214. "additionalProperties": false
  15215. }
  15216. },
  15217. "required": ["input", "output", "reasoning", "cache"],
  15218. "additionalProperties": false
  15219. },
  15220. "snapshot": {
  15221. "type": "string"
  15222. }
  15223. },
  15224. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  15225. "additionalProperties": false
  15226. }
  15227. },
  15228. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15229. "additionalProperties": false
  15230. },
  15231. "SyncEventSessionNextStepFailed": {
  15232. "type": "object",
  15233. "properties": {
  15234. "type": {
  15235. "type": "string",
  15236. "enum": ["sync"]
  15237. },
  15238. "name": {
  15239. "type": "string",
  15240. "enum": ["session.next.step.failed.1"]
  15241. },
  15242. "id": {
  15243. "type": "string"
  15244. },
  15245. "seq": {
  15246. "type": "number"
  15247. },
  15248. "aggregateID": {
  15249. "type": "string",
  15250. "enum": ["sessionID"]
  15251. },
  15252. "data": {
  15253. "type": "object",
  15254. "properties": {
  15255. "timestamp": {
  15256. "type": "number"
  15257. },
  15258. "sessionID": {
  15259. "type": "string",
  15260. "pattern": "^ses"
  15261. },
  15262. "error": {
  15263. "$ref": "#/components/schemas/SessionErrorUnknown"
  15264. }
  15265. },
  15266. "required": ["timestamp", "sessionID", "error"],
  15267. "additionalProperties": false
  15268. }
  15269. },
  15270. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15271. "additionalProperties": false
  15272. },
  15273. "SyncEventSessionNextTextStarted": {
  15274. "type": "object",
  15275. "properties": {
  15276. "type": {
  15277. "type": "string",
  15278. "enum": ["sync"]
  15279. },
  15280. "name": {
  15281. "type": "string",
  15282. "enum": ["session.next.text.started.1"]
  15283. },
  15284. "id": {
  15285. "type": "string"
  15286. },
  15287. "seq": {
  15288. "type": "number"
  15289. },
  15290. "aggregateID": {
  15291. "type": "string",
  15292. "enum": ["sessionID"]
  15293. },
  15294. "data": {
  15295. "type": "object",
  15296. "properties": {
  15297. "timestamp": {
  15298. "type": "number"
  15299. },
  15300. "sessionID": {
  15301. "type": "string",
  15302. "pattern": "^ses"
  15303. }
  15304. },
  15305. "required": ["timestamp", "sessionID"],
  15306. "additionalProperties": false
  15307. }
  15308. },
  15309. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15310. "additionalProperties": false
  15311. },
  15312. "SyncEventSessionNextTextDelta": {
  15313. "type": "object",
  15314. "properties": {
  15315. "type": {
  15316. "type": "string",
  15317. "enum": ["sync"]
  15318. },
  15319. "name": {
  15320. "type": "string",
  15321. "enum": ["session.next.text.delta.1"]
  15322. },
  15323. "id": {
  15324. "type": "string"
  15325. },
  15326. "seq": {
  15327. "type": "number"
  15328. },
  15329. "aggregateID": {
  15330. "type": "string",
  15331. "enum": ["sessionID"]
  15332. },
  15333. "data": {
  15334. "type": "object",
  15335. "properties": {
  15336. "timestamp": {
  15337. "type": "number"
  15338. },
  15339. "sessionID": {
  15340. "type": "string",
  15341. "pattern": "^ses"
  15342. },
  15343. "delta": {
  15344. "type": "string"
  15345. }
  15346. },
  15347. "required": ["timestamp", "sessionID", "delta"],
  15348. "additionalProperties": false
  15349. }
  15350. },
  15351. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15352. "additionalProperties": false
  15353. },
  15354. "SyncEventSessionNextTextEnded": {
  15355. "type": "object",
  15356. "properties": {
  15357. "type": {
  15358. "type": "string",
  15359. "enum": ["sync"]
  15360. },
  15361. "name": {
  15362. "type": "string",
  15363. "enum": ["session.next.text.ended.1"]
  15364. },
  15365. "id": {
  15366. "type": "string"
  15367. },
  15368. "seq": {
  15369. "type": "number"
  15370. },
  15371. "aggregateID": {
  15372. "type": "string",
  15373. "enum": ["sessionID"]
  15374. },
  15375. "data": {
  15376. "type": "object",
  15377. "properties": {
  15378. "timestamp": {
  15379. "type": "number"
  15380. },
  15381. "sessionID": {
  15382. "type": "string",
  15383. "pattern": "^ses"
  15384. },
  15385. "text": {
  15386. "type": "string"
  15387. }
  15388. },
  15389. "required": ["timestamp", "sessionID", "text"],
  15390. "additionalProperties": false
  15391. }
  15392. },
  15393. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15394. "additionalProperties": false
  15395. },
  15396. "SyncEventSessionNextReasoningStarted": {
  15397. "type": "object",
  15398. "properties": {
  15399. "type": {
  15400. "type": "string",
  15401. "enum": ["sync"]
  15402. },
  15403. "name": {
  15404. "type": "string",
  15405. "enum": ["session.next.reasoning.started.1"]
  15406. },
  15407. "id": {
  15408. "type": "string"
  15409. },
  15410. "seq": {
  15411. "type": "number"
  15412. },
  15413. "aggregateID": {
  15414. "type": "string",
  15415. "enum": ["sessionID"]
  15416. },
  15417. "data": {
  15418. "type": "object",
  15419. "properties": {
  15420. "timestamp": {
  15421. "type": "number"
  15422. },
  15423. "sessionID": {
  15424. "type": "string",
  15425. "pattern": "^ses"
  15426. },
  15427. "reasoningID": {
  15428. "type": "string"
  15429. }
  15430. },
  15431. "required": ["timestamp", "sessionID", "reasoningID"],
  15432. "additionalProperties": false
  15433. }
  15434. },
  15435. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15436. "additionalProperties": false
  15437. },
  15438. "SyncEventSessionNextReasoningDelta": {
  15439. "type": "object",
  15440. "properties": {
  15441. "type": {
  15442. "type": "string",
  15443. "enum": ["sync"]
  15444. },
  15445. "name": {
  15446. "type": "string",
  15447. "enum": ["session.next.reasoning.delta.1"]
  15448. },
  15449. "id": {
  15450. "type": "string"
  15451. },
  15452. "seq": {
  15453. "type": "number"
  15454. },
  15455. "aggregateID": {
  15456. "type": "string",
  15457. "enum": ["sessionID"]
  15458. },
  15459. "data": {
  15460. "type": "object",
  15461. "properties": {
  15462. "timestamp": {
  15463. "type": "number"
  15464. },
  15465. "sessionID": {
  15466. "type": "string",
  15467. "pattern": "^ses"
  15468. },
  15469. "reasoningID": {
  15470. "type": "string"
  15471. },
  15472. "delta": {
  15473. "type": "string"
  15474. }
  15475. },
  15476. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15477. "additionalProperties": false
  15478. }
  15479. },
  15480. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15481. "additionalProperties": false
  15482. },
  15483. "SyncEventSessionNextReasoningEnded": {
  15484. "type": "object",
  15485. "properties": {
  15486. "type": {
  15487. "type": "string",
  15488. "enum": ["sync"]
  15489. },
  15490. "name": {
  15491. "type": "string",
  15492. "enum": ["session.next.reasoning.ended.1"]
  15493. },
  15494. "id": {
  15495. "type": "string"
  15496. },
  15497. "seq": {
  15498. "type": "number"
  15499. },
  15500. "aggregateID": {
  15501. "type": "string",
  15502. "enum": ["sessionID"]
  15503. },
  15504. "data": {
  15505. "type": "object",
  15506. "properties": {
  15507. "timestamp": {
  15508. "type": "number"
  15509. },
  15510. "sessionID": {
  15511. "type": "string",
  15512. "pattern": "^ses"
  15513. },
  15514. "reasoningID": {
  15515. "type": "string"
  15516. },
  15517. "text": {
  15518. "type": "string"
  15519. }
  15520. },
  15521. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15522. "additionalProperties": false
  15523. }
  15524. },
  15525. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15526. "additionalProperties": false
  15527. },
  15528. "SyncEventSessionNextToolInputStarted": {
  15529. "type": "object",
  15530. "properties": {
  15531. "type": {
  15532. "type": "string",
  15533. "enum": ["sync"]
  15534. },
  15535. "name": {
  15536. "type": "string",
  15537. "enum": ["session.next.tool.input.started.1"]
  15538. },
  15539. "id": {
  15540. "type": "string"
  15541. },
  15542. "seq": {
  15543. "type": "number"
  15544. },
  15545. "aggregateID": {
  15546. "type": "string",
  15547. "enum": ["sessionID"]
  15548. },
  15549. "data": {
  15550. "type": "object",
  15551. "properties": {
  15552. "timestamp": {
  15553. "type": "number"
  15554. },
  15555. "sessionID": {
  15556. "type": "string",
  15557. "pattern": "^ses"
  15558. },
  15559. "callID": {
  15560. "type": "string"
  15561. },
  15562. "name": {
  15563. "type": "string"
  15564. }
  15565. },
  15566. "required": ["timestamp", "sessionID", "callID", "name"],
  15567. "additionalProperties": false
  15568. }
  15569. },
  15570. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15571. "additionalProperties": false
  15572. },
  15573. "SyncEventSessionNextToolInputDelta": {
  15574. "type": "object",
  15575. "properties": {
  15576. "type": {
  15577. "type": "string",
  15578. "enum": ["sync"]
  15579. },
  15580. "name": {
  15581. "type": "string",
  15582. "enum": ["session.next.tool.input.delta.1"]
  15583. },
  15584. "id": {
  15585. "type": "string"
  15586. },
  15587. "seq": {
  15588. "type": "number"
  15589. },
  15590. "aggregateID": {
  15591. "type": "string",
  15592. "enum": ["sessionID"]
  15593. },
  15594. "data": {
  15595. "type": "object",
  15596. "properties": {
  15597. "timestamp": {
  15598. "type": "number"
  15599. },
  15600. "sessionID": {
  15601. "type": "string",
  15602. "pattern": "^ses"
  15603. },
  15604. "callID": {
  15605. "type": "string"
  15606. },
  15607. "delta": {
  15608. "type": "string"
  15609. }
  15610. },
  15611. "required": ["timestamp", "sessionID", "callID", "delta"],
  15612. "additionalProperties": false
  15613. }
  15614. },
  15615. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15616. "additionalProperties": false
  15617. },
  15618. "SyncEventSessionNextToolInputEnded": {
  15619. "type": "object",
  15620. "properties": {
  15621. "type": {
  15622. "type": "string",
  15623. "enum": ["sync"]
  15624. },
  15625. "name": {
  15626. "type": "string",
  15627. "enum": ["session.next.tool.input.ended.1"]
  15628. },
  15629. "id": {
  15630. "type": "string"
  15631. },
  15632. "seq": {
  15633. "type": "number"
  15634. },
  15635. "aggregateID": {
  15636. "type": "string",
  15637. "enum": ["sessionID"]
  15638. },
  15639. "data": {
  15640. "type": "object",
  15641. "properties": {
  15642. "timestamp": {
  15643. "type": "number"
  15644. },
  15645. "sessionID": {
  15646. "type": "string",
  15647. "pattern": "^ses"
  15648. },
  15649. "callID": {
  15650. "type": "string"
  15651. },
  15652. "text": {
  15653. "type": "string"
  15654. }
  15655. },
  15656. "required": ["timestamp", "sessionID", "callID", "text"],
  15657. "additionalProperties": false
  15658. }
  15659. },
  15660. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15661. "additionalProperties": false
  15662. },
  15663. "SyncEventSessionNextToolCalled": {
  15664. "type": "object",
  15665. "properties": {
  15666. "type": {
  15667. "type": "string",
  15668. "enum": ["sync"]
  15669. },
  15670. "name": {
  15671. "type": "string",
  15672. "enum": ["session.next.tool.called.1"]
  15673. },
  15674. "id": {
  15675. "type": "string"
  15676. },
  15677. "seq": {
  15678. "type": "number"
  15679. },
  15680. "aggregateID": {
  15681. "type": "string",
  15682. "enum": ["sessionID"]
  15683. },
  15684. "data": {
  15685. "type": "object",
  15686. "properties": {
  15687. "timestamp": {
  15688. "type": "number"
  15689. },
  15690. "sessionID": {
  15691. "type": "string",
  15692. "pattern": "^ses"
  15693. },
  15694. "callID": {
  15695. "type": "string"
  15696. },
  15697. "tool": {
  15698. "type": "string"
  15699. },
  15700. "input": {
  15701. "type": "object"
  15702. },
  15703. "provider": {
  15704. "type": "object",
  15705. "properties": {
  15706. "executed": {
  15707. "type": "boolean"
  15708. },
  15709. "metadata": {
  15710. "type": "object"
  15711. }
  15712. },
  15713. "required": ["executed"],
  15714. "additionalProperties": false
  15715. }
  15716. },
  15717. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15718. "additionalProperties": false
  15719. }
  15720. },
  15721. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15722. "additionalProperties": false
  15723. },
  15724. "SyncEventSessionNextToolProgress": {
  15725. "type": "object",
  15726. "properties": {
  15727. "type": {
  15728. "type": "string",
  15729. "enum": ["sync"]
  15730. },
  15731. "name": {
  15732. "type": "string",
  15733. "enum": ["session.next.tool.progress.1"]
  15734. },
  15735. "id": {
  15736. "type": "string"
  15737. },
  15738. "seq": {
  15739. "type": "number"
  15740. },
  15741. "aggregateID": {
  15742. "type": "string",
  15743. "enum": ["sessionID"]
  15744. },
  15745. "data": {
  15746. "type": "object",
  15747. "properties": {
  15748. "timestamp": {
  15749. "type": "number"
  15750. },
  15751. "sessionID": {
  15752. "type": "string",
  15753. "pattern": "^ses"
  15754. },
  15755. "callID": {
  15756. "type": "string"
  15757. },
  15758. "structured": {
  15759. "type": "object"
  15760. },
  15761. "content": {
  15762. "type": "array",
  15763. "items": {
  15764. "anyOf": [
  15765. {
  15766. "$ref": "#/components/schemas/ToolTextContent"
  15767. },
  15768. {
  15769. "$ref": "#/components/schemas/ToolFileContent"
  15770. }
  15771. ]
  15772. }
  15773. }
  15774. },
  15775. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15776. "additionalProperties": false
  15777. }
  15778. },
  15779. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15780. "additionalProperties": false
  15781. },
  15782. "SyncEventSessionNextToolSuccess": {
  15783. "type": "object",
  15784. "properties": {
  15785. "type": {
  15786. "type": "string",
  15787. "enum": ["sync"]
  15788. },
  15789. "name": {
  15790. "type": "string",
  15791. "enum": ["session.next.tool.success.1"]
  15792. },
  15793. "id": {
  15794. "type": "string"
  15795. },
  15796. "seq": {
  15797. "type": "number"
  15798. },
  15799. "aggregateID": {
  15800. "type": "string",
  15801. "enum": ["sessionID"]
  15802. },
  15803. "data": {
  15804. "type": "object",
  15805. "properties": {
  15806. "timestamp": {
  15807. "type": "number"
  15808. },
  15809. "sessionID": {
  15810. "type": "string",
  15811. "pattern": "^ses"
  15812. },
  15813. "callID": {
  15814. "type": "string"
  15815. },
  15816. "structured": {
  15817. "type": "object"
  15818. },
  15819. "content": {
  15820. "type": "array",
  15821. "items": {
  15822. "anyOf": [
  15823. {
  15824. "$ref": "#/components/schemas/ToolTextContent"
  15825. },
  15826. {
  15827. "$ref": "#/components/schemas/ToolFileContent"
  15828. }
  15829. ]
  15830. }
  15831. },
  15832. "provider": {
  15833. "type": "object",
  15834. "properties": {
  15835. "executed": {
  15836. "type": "boolean"
  15837. },
  15838. "metadata": {
  15839. "type": "object"
  15840. }
  15841. },
  15842. "required": ["executed"],
  15843. "additionalProperties": false
  15844. }
  15845. },
  15846. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15847. "additionalProperties": false
  15848. }
  15849. },
  15850. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15851. "additionalProperties": false
  15852. },
  15853. "SyncEventSessionNextToolFailed": {
  15854. "type": "object",
  15855. "properties": {
  15856. "type": {
  15857. "type": "string",
  15858. "enum": ["sync"]
  15859. },
  15860. "name": {
  15861. "type": "string",
  15862. "enum": ["session.next.tool.failed.1"]
  15863. },
  15864. "id": {
  15865. "type": "string"
  15866. },
  15867. "seq": {
  15868. "type": "number"
  15869. },
  15870. "aggregateID": {
  15871. "type": "string",
  15872. "enum": ["sessionID"]
  15873. },
  15874. "data": {
  15875. "type": "object",
  15876. "properties": {
  15877. "timestamp": {
  15878. "type": "number"
  15879. },
  15880. "sessionID": {
  15881. "type": "string",
  15882. "pattern": "^ses"
  15883. },
  15884. "callID": {
  15885. "type": "string"
  15886. },
  15887. "error": {
  15888. "$ref": "#/components/schemas/SessionErrorUnknown"
  15889. },
  15890. "provider": {
  15891. "type": "object",
  15892. "properties": {
  15893. "executed": {
  15894. "type": "boolean"
  15895. },
  15896. "metadata": {
  15897. "type": "object"
  15898. }
  15899. },
  15900. "required": ["executed"],
  15901. "additionalProperties": false
  15902. }
  15903. },
  15904. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15905. "additionalProperties": false
  15906. }
  15907. },
  15908. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15909. "additionalProperties": false
  15910. },
  15911. "SyncEventSessionNextRetried": {
  15912. "type": "object",
  15913. "properties": {
  15914. "type": {
  15915. "type": "string",
  15916. "enum": ["sync"]
  15917. },
  15918. "name": {
  15919. "type": "string",
  15920. "enum": ["session.next.retried.1"]
  15921. },
  15922. "id": {
  15923. "type": "string"
  15924. },
  15925. "seq": {
  15926. "type": "number"
  15927. },
  15928. "aggregateID": {
  15929. "type": "string",
  15930. "enum": ["sessionID"]
  15931. },
  15932. "data": {
  15933. "type": "object",
  15934. "properties": {
  15935. "timestamp": {
  15936. "type": "number"
  15937. },
  15938. "sessionID": {
  15939. "type": "string",
  15940. "pattern": "^ses"
  15941. },
  15942. "attempt": {
  15943. "type": "number"
  15944. },
  15945. "error": {
  15946. "$ref": "#/components/schemas/SessionNextRetry_error"
  15947. }
  15948. },
  15949. "required": ["timestamp", "sessionID", "attempt", "error"],
  15950. "additionalProperties": false
  15951. }
  15952. },
  15953. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15954. "additionalProperties": false
  15955. },
  15956. "SyncEventSessionNextCompactionStarted": {
  15957. "type": "object",
  15958. "properties": {
  15959. "type": {
  15960. "type": "string",
  15961. "enum": ["sync"]
  15962. },
  15963. "name": {
  15964. "type": "string",
  15965. "enum": ["session.next.compaction.started.1"]
  15966. },
  15967. "id": {
  15968. "type": "string"
  15969. },
  15970. "seq": {
  15971. "type": "number"
  15972. },
  15973. "aggregateID": {
  15974. "type": "string",
  15975. "enum": ["sessionID"]
  15976. },
  15977. "data": {
  15978. "type": "object",
  15979. "properties": {
  15980. "timestamp": {
  15981. "type": "number"
  15982. },
  15983. "sessionID": {
  15984. "type": "string",
  15985. "pattern": "^ses"
  15986. },
  15987. "reason": {
  15988. "type": "string",
  15989. "enum": ["auto", "manual"]
  15990. }
  15991. },
  15992. "required": ["timestamp", "sessionID", "reason"],
  15993. "additionalProperties": false
  15994. }
  15995. },
  15996. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15997. "additionalProperties": false
  15998. },
  15999. "SyncEventSessionNextCompactionDelta": {
  16000. "type": "object",
  16001. "properties": {
  16002. "type": {
  16003. "type": "string",
  16004. "enum": ["sync"]
  16005. },
  16006. "name": {
  16007. "type": "string",
  16008. "enum": ["session.next.compaction.delta.1"]
  16009. },
  16010. "id": {
  16011. "type": "string"
  16012. },
  16013. "seq": {
  16014. "type": "number"
  16015. },
  16016. "aggregateID": {
  16017. "type": "string",
  16018. "enum": ["sessionID"]
  16019. },
  16020. "data": {
  16021. "type": "object",
  16022. "properties": {
  16023. "timestamp": {
  16024. "type": "number"
  16025. },
  16026. "sessionID": {
  16027. "type": "string",
  16028. "pattern": "^ses"
  16029. },
  16030. "text": {
  16031. "type": "string"
  16032. }
  16033. },
  16034. "required": ["timestamp", "sessionID", "text"],
  16035. "additionalProperties": false
  16036. }
  16037. },
  16038. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16039. "additionalProperties": false
  16040. },
  16041. "SyncEventSessionNextCompactionEnded": {
  16042. "type": "object",
  16043. "properties": {
  16044. "type": {
  16045. "type": "string",
  16046. "enum": ["sync"]
  16047. },
  16048. "name": {
  16049. "type": "string",
  16050. "enum": ["session.next.compaction.ended.1"]
  16051. },
  16052. "id": {
  16053. "type": "string"
  16054. },
  16055. "seq": {
  16056. "type": "number"
  16057. },
  16058. "aggregateID": {
  16059. "type": "string",
  16060. "enum": ["sessionID"]
  16061. },
  16062. "data": {
  16063. "type": "object",
  16064. "properties": {
  16065. "timestamp": {
  16066. "type": "number"
  16067. },
  16068. "sessionID": {
  16069. "type": "string",
  16070. "pattern": "^ses"
  16071. },
  16072. "text": {
  16073. "type": "string"
  16074. },
  16075. "include": {
  16076. "type": "string"
  16077. }
  16078. },
  16079. "required": ["timestamp", "sessionID", "text"],
  16080. "additionalProperties": false
  16081. }
  16082. },
  16083. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16084. "additionalProperties": false
  16085. },
  16086. "EventServerInstanceDisposed": {
  16087. "type": "object",
  16088. "properties": {
  16089. "id": {
  16090. "type": "string"
  16091. },
  16092. "type": {
  16093. "type": "string",
  16094. "enum": ["server.instance.disposed"]
  16095. },
  16096. "properties": {
  16097. "type": "object",
  16098. "properties": {
  16099. "directory": {
  16100. "type": "string"
  16101. }
  16102. },
  16103. "required": ["directory"],
  16104. "additionalProperties": false
  16105. }
  16106. },
  16107. "required": ["id", "type", "properties"],
  16108. "additionalProperties": false
  16109. },
  16110. "EventFileEdited": {
  16111. "type": "object",
  16112. "properties": {
  16113. "id": {
  16114. "type": "string"
  16115. },
  16116. "type": {
  16117. "type": "string",
  16118. "enum": ["file.edited"]
  16119. },
  16120. "properties": {
  16121. "type": "object",
  16122. "properties": {
  16123. "file": {
  16124. "type": "string"
  16125. }
  16126. },
  16127. "required": ["file"],
  16128. "additionalProperties": false
  16129. }
  16130. },
  16131. "required": ["id", "type", "properties"],
  16132. "additionalProperties": false
  16133. },
  16134. "EventFileWatcherUpdated": {
  16135. "type": "object",
  16136. "properties": {
  16137. "id": {
  16138. "type": "string"
  16139. },
  16140. "type": {
  16141. "type": "string",
  16142. "enum": ["file.watcher.updated"]
  16143. },
  16144. "properties": {
  16145. "type": "object",
  16146. "properties": {
  16147. "file": {
  16148. "type": "string"
  16149. },
  16150. "event": {
  16151. "type": "string",
  16152. "enum": ["add", "change", "unlink"]
  16153. }
  16154. },
  16155. "required": ["file", "event"],
  16156. "additionalProperties": false
  16157. }
  16158. },
  16159. "required": ["id", "type", "properties"],
  16160. "additionalProperties": false
  16161. },
  16162. "EventLspClientDiagnostics": {
  16163. "type": "object",
  16164. "properties": {
  16165. "id": {
  16166. "type": "string"
  16167. },
  16168. "type": {
  16169. "type": "string",
  16170. "enum": ["lsp.client.diagnostics"]
  16171. },
  16172. "properties": {
  16173. "type": "object",
  16174. "properties": {
  16175. "serverID": {
  16176. "type": "string"
  16177. },
  16178. "path": {
  16179. "type": "string"
  16180. }
  16181. },
  16182. "required": ["serverID", "path"],
  16183. "additionalProperties": false
  16184. }
  16185. },
  16186. "required": ["id", "type", "properties"],
  16187. "additionalProperties": false
  16188. },
  16189. "EventLspUpdated": {
  16190. "type": "object",
  16191. "properties": {
  16192. "id": {
  16193. "type": "string"
  16194. },
  16195. "type": {
  16196. "type": "string",
  16197. "enum": ["lsp.updated"]
  16198. },
  16199. "properties": {
  16200. "type": "object",
  16201. "properties": {}
  16202. }
  16203. },
  16204. "required": ["id", "type", "properties"],
  16205. "additionalProperties": false
  16206. },
  16207. "EventMessagePartDelta": {
  16208. "type": "object",
  16209. "properties": {
  16210. "id": {
  16211. "type": "string"
  16212. },
  16213. "type": {
  16214. "type": "string",
  16215. "enum": ["message.part.delta"]
  16216. },
  16217. "properties": {
  16218. "type": "object",
  16219. "properties": {
  16220. "sessionID": {
  16221. "type": "string",
  16222. "pattern": "^ses"
  16223. },
  16224. "messageID": {
  16225. "type": "string",
  16226. "pattern": "^msg"
  16227. },
  16228. "partID": {
  16229. "type": "string",
  16230. "pattern": "^prt"
  16231. },
  16232. "field": {
  16233. "type": "string"
  16234. },
  16235. "delta": {
  16236. "type": "string"
  16237. }
  16238. },
  16239. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16240. "additionalProperties": false
  16241. }
  16242. },
  16243. "required": ["id", "type", "properties"],
  16244. "additionalProperties": false
  16245. },
  16246. "EventPermissionAsked": {
  16247. "type": "object",
  16248. "properties": {
  16249. "id": {
  16250. "type": "string"
  16251. },
  16252. "type": {
  16253. "type": "string",
  16254. "enum": ["permission.asked"]
  16255. },
  16256. "properties": {
  16257. "$ref": "#/components/schemas/PermissionRequest"
  16258. }
  16259. },
  16260. "required": ["id", "type", "properties"],
  16261. "additionalProperties": false
  16262. },
  16263. "EventPermissionReplied": {
  16264. "type": "object",
  16265. "properties": {
  16266. "id": {
  16267. "type": "string"
  16268. },
  16269. "type": {
  16270. "type": "string",
  16271. "enum": ["permission.replied"]
  16272. },
  16273. "properties": {
  16274. "type": "object",
  16275. "properties": {
  16276. "sessionID": {
  16277. "type": "string",
  16278. "pattern": "^ses"
  16279. },
  16280. "requestID": {
  16281. "type": "string",
  16282. "pattern": "^per"
  16283. },
  16284. "reply": {
  16285. "type": "string",
  16286. "enum": ["once", "always", "reject"]
  16287. }
  16288. },
  16289. "required": ["sessionID", "requestID", "reply"],
  16290. "additionalProperties": false
  16291. }
  16292. },
  16293. "required": ["id", "type", "properties"],
  16294. "additionalProperties": false
  16295. },
  16296. "EventSessionDiff": {
  16297. "type": "object",
  16298. "properties": {
  16299. "id": {
  16300. "type": "string"
  16301. },
  16302. "type": {
  16303. "type": "string",
  16304. "enum": ["session.diff"]
  16305. },
  16306. "properties": {
  16307. "type": "object",
  16308. "properties": {
  16309. "sessionID": {
  16310. "type": "string",
  16311. "pattern": "^ses"
  16312. },
  16313. "diff": {
  16314. "type": "array",
  16315. "items": {
  16316. "$ref": "#/components/schemas/SnapshotFileDiff"
  16317. }
  16318. }
  16319. },
  16320. "required": ["sessionID", "diff"],
  16321. "additionalProperties": false
  16322. }
  16323. },
  16324. "required": ["id", "type", "properties"],
  16325. "additionalProperties": false
  16326. },
  16327. "EventSessionError": {
  16328. "type": "object",
  16329. "properties": {
  16330. "id": {
  16331. "type": "string"
  16332. },
  16333. "type": {
  16334. "type": "string",
  16335. "enum": ["session.error"]
  16336. },
  16337. "properties": {
  16338. "type": "object",
  16339. "properties": {
  16340. "sessionID": {
  16341. "type": "string",
  16342. "pattern": "^ses"
  16343. },
  16344. "error": {
  16345. "anyOf": [
  16346. {
  16347. "$ref": "#/components/schemas/ProviderAuthError"
  16348. },
  16349. {
  16350. "$ref": "#/components/schemas/UnknownError"
  16351. },
  16352. {
  16353. "$ref": "#/components/schemas/MessageOutputLengthError"
  16354. },
  16355. {
  16356. "$ref": "#/components/schemas/MessageAbortedError"
  16357. },
  16358. {
  16359. "$ref": "#/components/schemas/StructuredOutputError"
  16360. },
  16361. {
  16362. "$ref": "#/components/schemas/ContextOverflowError"
  16363. },
  16364. {
  16365. "$ref": "#/components/schemas/APIError"
  16366. }
  16367. ]
  16368. }
  16369. },
  16370. "additionalProperties": false
  16371. }
  16372. },
  16373. "required": ["id", "type", "properties"],
  16374. "additionalProperties": false
  16375. },
  16376. "EventInstallationUpdated": {
  16377. "type": "object",
  16378. "properties": {
  16379. "id": {
  16380. "type": "string"
  16381. },
  16382. "type": {
  16383. "type": "string",
  16384. "enum": ["installation.updated"]
  16385. },
  16386. "properties": {
  16387. "type": "object",
  16388. "properties": {
  16389. "version": {
  16390. "type": "string"
  16391. }
  16392. },
  16393. "required": ["version"],
  16394. "additionalProperties": false
  16395. }
  16396. },
  16397. "required": ["id", "type", "properties"],
  16398. "additionalProperties": false
  16399. },
  16400. "EventInstallationUpdate-available": {
  16401. "type": "object",
  16402. "properties": {
  16403. "id": {
  16404. "type": "string"
  16405. },
  16406. "type": {
  16407. "type": "string",
  16408. "enum": ["installation.update-available"]
  16409. },
  16410. "properties": {
  16411. "type": "object",
  16412. "properties": {
  16413. "version": {
  16414. "type": "string"
  16415. }
  16416. },
  16417. "required": ["version"],
  16418. "additionalProperties": false
  16419. }
  16420. },
  16421. "required": ["id", "type", "properties"],
  16422. "additionalProperties": false
  16423. },
  16424. "EventQuestionAsked": {
  16425. "type": "object",
  16426. "properties": {
  16427. "id": {
  16428. "type": "string"
  16429. },
  16430. "type": {
  16431. "type": "string",
  16432. "enum": ["question.asked"]
  16433. },
  16434. "properties": {
  16435. "$ref": "#/components/schemas/QuestionRequest"
  16436. }
  16437. },
  16438. "required": ["id", "type", "properties"],
  16439. "additionalProperties": false
  16440. },
  16441. "EventQuestionReplied": {
  16442. "type": "object",
  16443. "properties": {
  16444. "id": {
  16445. "type": "string"
  16446. },
  16447. "type": {
  16448. "type": "string",
  16449. "enum": ["question.replied"]
  16450. },
  16451. "properties": {
  16452. "$ref": "#/components/schemas/QuestionReplied"
  16453. }
  16454. },
  16455. "required": ["id", "type", "properties"],
  16456. "additionalProperties": false
  16457. },
  16458. "EventQuestionRejected": {
  16459. "type": "object",
  16460. "properties": {
  16461. "id": {
  16462. "type": "string"
  16463. },
  16464. "type": {
  16465. "type": "string",
  16466. "enum": ["question.rejected"]
  16467. },
  16468. "properties": {
  16469. "$ref": "#/components/schemas/QuestionRejected"
  16470. }
  16471. },
  16472. "required": ["id", "type", "properties"],
  16473. "additionalProperties": false
  16474. },
  16475. "EventTodoUpdated": {
  16476. "type": "object",
  16477. "properties": {
  16478. "id": {
  16479. "type": "string"
  16480. },
  16481. "type": {
  16482. "type": "string",
  16483. "enum": ["todo.updated"]
  16484. },
  16485. "properties": {
  16486. "type": "object",
  16487. "properties": {
  16488. "sessionID": {
  16489. "type": "string",
  16490. "pattern": "^ses"
  16491. },
  16492. "todos": {
  16493. "type": "array",
  16494. "items": {
  16495. "$ref": "#/components/schemas/Todo"
  16496. }
  16497. }
  16498. },
  16499. "required": ["sessionID", "todos"],
  16500. "additionalProperties": false
  16501. }
  16502. },
  16503. "required": ["id", "type", "properties"],
  16504. "additionalProperties": false
  16505. },
  16506. "EventSessionStatus": {
  16507. "type": "object",
  16508. "properties": {
  16509. "id": {
  16510. "type": "string"
  16511. },
  16512. "type": {
  16513. "type": "string",
  16514. "enum": ["session.status"]
  16515. },
  16516. "properties": {
  16517. "type": "object",
  16518. "properties": {
  16519. "sessionID": {
  16520. "type": "string",
  16521. "pattern": "^ses"
  16522. },
  16523. "status": {
  16524. "$ref": "#/components/schemas/SessionStatus"
  16525. }
  16526. },
  16527. "required": ["sessionID", "status"],
  16528. "additionalProperties": false
  16529. }
  16530. },
  16531. "required": ["id", "type", "properties"],
  16532. "additionalProperties": false
  16533. },
  16534. "EventSessionIdle": {
  16535. "type": "object",
  16536. "properties": {
  16537. "id": {
  16538. "type": "string"
  16539. },
  16540. "type": {
  16541. "type": "string",
  16542. "enum": ["session.idle"]
  16543. },
  16544. "properties": {
  16545. "type": "object",
  16546. "properties": {
  16547. "sessionID": {
  16548. "type": "string",
  16549. "pattern": "^ses"
  16550. }
  16551. },
  16552. "required": ["sessionID"],
  16553. "additionalProperties": false
  16554. }
  16555. },
  16556. "required": ["id", "type", "properties"],
  16557. "additionalProperties": false
  16558. },
  16559. "EventSessionCompacted": {
  16560. "type": "object",
  16561. "properties": {
  16562. "id": {
  16563. "type": "string"
  16564. },
  16565. "type": {
  16566. "type": "string",
  16567. "enum": ["session.compacted"]
  16568. },
  16569. "properties": {
  16570. "type": "object",
  16571. "properties": {
  16572. "sessionID": {
  16573. "type": "string",
  16574. "pattern": "^ses"
  16575. }
  16576. },
  16577. "required": ["sessionID"],
  16578. "additionalProperties": false
  16579. }
  16580. },
  16581. "required": ["id", "type", "properties"],
  16582. "additionalProperties": false
  16583. },
  16584. "EventMcpToolsChanged": {
  16585. "type": "object",
  16586. "properties": {
  16587. "id": {
  16588. "type": "string"
  16589. },
  16590. "type": {
  16591. "type": "string",
  16592. "enum": ["mcp.tools.changed"]
  16593. },
  16594. "properties": {
  16595. "type": "object",
  16596. "properties": {
  16597. "server": {
  16598. "type": "string"
  16599. }
  16600. },
  16601. "required": ["server"],
  16602. "additionalProperties": false
  16603. }
  16604. },
  16605. "required": ["id", "type", "properties"],
  16606. "additionalProperties": false
  16607. },
  16608. "EventMcpBrowserOpenFailed": {
  16609. "type": "object",
  16610. "properties": {
  16611. "id": {
  16612. "type": "string"
  16613. },
  16614. "type": {
  16615. "type": "string",
  16616. "enum": ["mcp.browser.open.failed"]
  16617. },
  16618. "properties": {
  16619. "type": "object",
  16620. "properties": {
  16621. "mcpName": {
  16622. "type": "string"
  16623. },
  16624. "url": {
  16625. "type": "string"
  16626. }
  16627. },
  16628. "required": ["mcpName", "url"],
  16629. "additionalProperties": false
  16630. }
  16631. },
  16632. "required": ["id", "type", "properties"],
  16633. "additionalProperties": false
  16634. },
  16635. "EventCommandExecuted": {
  16636. "type": "object",
  16637. "properties": {
  16638. "id": {
  16639. "type": "string"
  16640. },
  16641. "type": {
  16642. "type": "string",
  16643. "enum": ["command.executed"]
  16644. },
  16645. "properties": {
  16646. "type": "object",
  16647. "properties": {
  16648. "name": {
  16649. "type": "string"
  16650. },
  16651. "sessionID": {
  16652. "type": "string",
  16653. "pattern": "^ses"
  16654. },
  16655. "arguments": {
  16656. "type": "string"
  16657. },
  16658. "messageID": {
  16659. "type": "string",
  16660. "pattern": "^msg"
  16661. }
  16662. },
  16663. "required": ["name", "sessionID", "arguments", "messageID"],
  16664. "additionalProperties": false
  16665. }
  16666. },
  16667. "required": ["id", "type", "properties"],
  16668. "additionalProperties": false
  16669. },
  16670. "EventProjectUpdated": {
  16671. "type": "object",
  16672. "properties": {
  16673. "id": {
  16674. "type": "string"
  16675. },
  16676. "type": {
  16677. "type": "string",
  16678. "enum": ["project.updated"]
  16679. },
  16680. "properties": {
  16681. "$ref": "#/components/schemas/Project"
  16682. }
  16683. },
  16684. "required": ["id", "type", "properties"],
  16685. "additionalProperties": false
  16686. },
  16687. "EventVcsBranchUpdated": {
  16688. "type": "object",
  16689. "properties": {
  16690. "id": {
  16691. "type": "string"
  16692. },
  16693. "type": {
  16694. "type": "string",
  16695. "enum": ["vcs.branch.updated"]
  16696. },
  16697. "properties": {
  16698. "type": "object",
  16699. "properties": {
  16700. "branch": {
  16701. "type": "string"
  16702. }
  16703. },
  16704. "additionalProperties": false
  16705. }
  16706. },
  16707. "required": ["id", "type", "properties"],
  16708. "additionalProperties": false
  16709. },
  16710. "EventWorkspaceReady": {
  16711. "type": "object",
  16712. "properties": {
  16713. "id": {
  16714. "type": "string"
  16715. },
  16716. "type": {
  16717. "type": "string",
  16718. "enum": ["workspace.ready"]
  16719. },
  16720. "properties": {
  16721. "type": "object",
  16722. "properties": {
  16723. "name": {
  16724. "type": "string"
  16725. }
  16726. },
  16727. "required": ["name"],
  16728. "additionalProperties": false
  16729. }
  16730. },
  16731. "required": ["id", "type", "properties"],
  16732. "additionalProperties": false
  16733. },
  16734. "EventWorkspaceFailed": {
  16735. "type": "object",
  16736. "properties": {
  16737. "id": {
  16738. "type": "string"
  16739. },
  16740. "type": {
  16741. "type": "string",
  16742. "enum": ["workspace.failed"]
  16743. },
  16744. "properties": {
  16745. "type": "object",
  16746. "properties": {
  16747. "message": {
  16748. "type": "string"
  16749. }
  16750. },
  16751. "required": ["message"],
  16752. "additionalProperties": false
  16753. }
  16754. },
  16755. "required": ["id", "type", "properties"],
  16756. "additionalProperties": false
  16757. },
  16758. "EventWorkspaceStatus": {
  16759. "type": "object",
  16760. "properties": {
  16761. "id": {
  16762. "type": "string"
  16763. },
  16764. "type": {
  16765. "type": "string",
  16766. "enum": ["workspace.status"]
  16767. },
  16768. "properties": {
  16769. "type": "object",
  16770. "properties": {
  16771. "workspaceID": {
  16772. "type": "string",
  16773. "pattern": "^wrk"
  16774. },
  16775. "status": {
  16776. "type": "string",
  16777. "enum": ["connected", "connecting", "disconnected", "error"]
  16778. }
  16779. },
  16780. "required": ["workspaceID", "status"],
  16781. "additionalProperties": false
  16782. }
  16783. },
  16784. "required": ["id", "type", "properties"],
  16785. "additionalProperties": false
  16786. },
  16787. "EventWorktreeReady": {
  16788. "type": "object",
  16789. "properties": {
  16790. "id": {
  16791. "type": "string"
  16792. },
  16793. "type": {
  16794. "type": "string",
  16795. "enum": ["worktree.ready"]
  16796. },
  16797. "properties": {
  16798. "type": "object",
  16799. "properties": {
  16800. "name": {
  16801. "type": "string"
  16802. },
  16803. "branch": {
  16804. "type": "string"
  16805. }
  16806. },
  16807. "required": ["name"],
  16808. "additionalProperties": false
  16809. }
  16810. },
  16811. "required": ["id", "type", "properties"],
  16812. "additionalProperties": false
  16813. },
  16814. "EventWorktreeFailed": {
  16815. "type": "object",
  16816. "properties": {
  16817. "id": {
  16818. "type": "string"
  16819. },
  16820. "type": {
  16821. "type": "string",
  16822. "enum": ["worktree.failed"]
  16823. },
  16824. "properties": {
  16825. "type": "object",
  16826. "properties": {
  16827. "message": {
  16828. "type": "string"
  16829. }
  16830. },
  16831. "required": ["message"],
  16832. "additionalProperties": false
  16833. }
  16834. },
  16835. "required": ["id", "type", "properties"],
  16836. "additionalProperties": false
  16837. },
  16838. "EventPtyCreated": {
  16839. "type": "object",
  16840. "properties": {
  16841. "id": {
  16842. "type": "string"
  16843. },
  16844. "type": {
  16845. "type": "string",
  16846. "enum": ["pty.created"]
  16847. },
  16848. "properties": {
  16849. "type": "object",
  16850. "properties": {
  16851. "info": {
  16852. "$ref": "#/components/schemas/Pty"
  16853. }
  16854. },
  16855. "required": ["info"],
  16856. "additionalProperties": false
  16857. }
  16858. },
  16859. "required": ["id", "type", "properties"],
  16860. "additionalProperties": false
  16861. },
  16862. "EventPtyUpdated": {
  16863. "type": "object",
  16864. "properties": {
  16865. "id": {
  16866. "type": "string"
  16867. },
  16868. "type": {
  16869. "type": "string",
  16870. "enum": ["pty.updated"]
  16871. },
  16872. "properties": {
  16873. "type": "object",
  16874. "properties": {
  16875. "info": {
  16876. "$ref": "#/components/schemas/Pty"
  16877. }
  16878. },
  16879. "required": ["info"],
  16880. "additionalProperties": false
  16881. }
  16882. },
  16883. "required": ["id", "type", "properties"],
  16884. "additionalProperties": false
  16885. },
  16886. "EventPtyExited": {
  16887. "type": "object",
  16888. "properties": {
  16889. "id": {
  16890. "type": "string"
  16891. },
  16892. "type": {
  16893. "type": "string",
  16894. "enum": ["pty.exited"]
  16895. },
  16896. "properties": {
  16897. "type": "object",
  16898. "properties": {
  16899. "id": {
  16900. "type": "string",
  16901. "pattern": "^pty"
  16902. },
  16903. "exitCode": {
  16904. "type": "integer",
  16905. "minimum": 0
  16906. }
  16907. },
  16908. "required": ["id", "exitCode"],
  16909. "additionalProperties": false
  16910. }
  16911. },
  16912. "required": ["id", "type", "properties"],
  16913. "additionalProperties": false
  16914. },
  16915. "EventPtyDeleted": {
  16916. "type": "object",
  16917. "properties": {
  16918. "id": {
  16919. "type": "string"
  16920. },
  16921. "type": {
  16922. "type": "string",
  16923. "enum": ["pty.deleted"]
  16924. },
  16925. "properties": {
  16926. "type": "object",
  16927. "properties": {
  16928. "id": {
  16929. "type": "string",
  16930. "pattern": "^pty"
  16931. }
  16932. },
  16933. "required": ["id"],
  16934. "additionalProperties": false
  16935. }
  16936. },
  16937. "required": ["id", "type", "properties"],
  16938. "additionalProperties": false
  16939. },
  16940. "EventMessageUpdated": {
  16941. "type": "object",
  16942. "properties": {
  16943. "id": {
  16944. "type": "string"
  16945. },
  16946. "type": {
  16947. "type": "string",
  16948. "enum": ["message.updated"]
  16949. },
  16950. "properties": {
  16951. "type": "object",
  16952. "properties": {
  16953. "sessionID": {
  16954. "type": "string",
  16955. "pattern": "^ses"
  16956. },
  16957. "info": {
  16958. "$ref": "#/components/schemas/Message"
  16959. }
  16960. },
  16961. "required": ["sessionID", "info"],
  16962. "additionalProperties": false
  16963. }
  16964. },
  16965. "required": ["id", "type", "properties"],
  16966. "additionalProperties": false
  16967. },
  16968. "EventMessageRemoved": {
  16969. "type": "object",
  16970. "properties": {
  16971. "id": {
  16972. "type": "string"
  16973. },
  16974. "type": {
  16975. "type": "string",
  16976. "enum": ["message.removed"]
  16977. },
  16978. "properties": {
  16979. "type": "object",
  16980. "properties": {
  16981. "sessionID": {
  16982. "type": "string",
  16983. "pattern": "^ses"
  16984. },
  16985. "messageID": {
  16986. "type": "string",
  16987. "pattern": "^msg"
  16988. }
  16989. },
  16990. "required": ["sessionID", "messageID"],
  16991. "additionalProperties": false
  16992. }
  16993. },
  16994. "required": ["id", "type", "properties"],
  16995. "additionalProperties": false
  16996. },
  16997. "EventMessagePartUpdated": {
  16998. "type": "object",
  16999. "properties": {
  17000. "id": {
  17001. "type": "string"
  17002. },
  17003. "type": {
  17004. "type": "string",
  17005. "enum": ["message.part.updated"]
  17006. },
  17007. "properties": {
  17008. "type": "object",
  17009. "properties": {
  17010. "sessionID": {
  17011. "type": "string",
  17012. "pattern": "^ses"
  17013. },
  17014. "part": {
  17015. "$ref": "#/components/schemas/Part"
  17016. },
  17017. "time": {
  17018. "type": "integer",
  17019. "minimum": 0
  17020. }
  17021. },
  17022. "required": ["sessionID", "part", "time"],
  17023. "additionalProperties": false
  17024. }
  17025. },
  17026. "required": ["id", "type", "properties"],
  17027. "additionalProperties": false
  17028. },
  17029. "EventMessagePartRemoved": {
  17030. "type": "object",
  17031. "properties": {
  17032. "id": {
  17033. "type": "string"
  17034. },
  17035. "type": {
  17036. "type": "string",
  17037. "enum": ["message.part.removed"]
  17038. },
  17039. "properties": {
  17040. "type": "object",
  17041. "properties": {
  17042. "sessionID": {
  17043. "type": "string",
  17044. "pattern": "^ses"
  17045. },
  17046. "messageID": {
  17047. "type": "string",
  17048. "pattern": "^msg"
  17049. },
  17050. "partID": {
  17051. "type": "string",
  17052. "pattern": "^prt"
  17053. }
  17054. },
  17055. "required": ["sessionID", "messageID", "partID"],
  17056. "additionalProperties": false
  17057. }
  17058. },
  17059. "required": ["id", "type", "properties"],
  17060. "additionalProperties": false
  17061. },
  17062. "EventSessionCreated": {
  17063. "type": "object",
  17064. "properties": {
  17065. "id": {
  17066. "type": "string"
  17067. },
  17068. "type": {
  17069. "type": "string",
  17070. "enum": ["session.created"]
  17071. },
  17072. "properties": {
  17073. "type": "object",
  17074. "properties": {
  17075. "sessionID": {
  17076. "type": "string",
  17077. "pattern": "^ses"
  17078. },
  17079. "info": {
  17080. "$ref": "#/components/schemas/Session"
  17081. }
  17082. },
  17083. "required": ["sessionID", "info"],
  17084. "additionalProperties": false
  17085. }
  17086. },
  17087. "required": ["id", "type", "properties"],
  17088. "additionalProperties": false
  17089. },
  17090. "EventSessionUpdated": {
  17091. "type": "object",
  17092. "properties": {
  17093. "id": {
  17094. "type": "string"
  17095. },
  17096. "type": {
  17097. "type": "string",
  17098. "enum": ["session.updated"]
  17099. },
  17100. "properties": {
  17101. "type": "object",
  17102. "properties": {
  17103. "sessionID": {
  17104. "type": "string",
  17105. "pattern": "^ses"
  17106. },
  17107. "info": {
  17108. "$ref": "#/components/schemas/Session"
  17109. }
  17110. },
  17111. "required": ["sessionID", "info"],
  17112. "additionalProperties": false
  17113. }
  17114. },
  17115. "required": ["id", "type", "properties"],
  17116. "additionalProperties": false
  17117. },
  17118. "EventSessionDeleted": {
  17119. "type": "object",
  17120. "properties": {
  17121. "id": {
  17122. "type": "string"
  17123. },
  17124. "type": {
  17125. "type": "string",
  17126. "enum": ["session.deleted"]
  17127. },
  17128. "properties": {
  17129. "type": "object",
  17130. "properties": {
  17131. "sessionID": {
  17132. "type": "string",
  17133. "pattern": "^ses"
  17134. },
  17135. "info": {
  17136. "$ref": "#/components/schemas/Session"
  17137. }
  17138. },
  17139. "required": ["sessionID", "info"],
  17140. "additionalProperties": false
  17141. }
  17142. },
  17143. "required": ["id", "type", "properties"],
  17144. "additionalProperties": false
  17145. },
  17146. "EventSessionNextAgentSwitched": {
  17147. "type": "object",
  17148. "properties": {
  17149. "id": {
  17150. "type": "string"
  17151. },
  17152. "type": {
  17153. "type": "string",
  17154. "enum": ["session.next.agent.switched"]
  17155. },
  17156. "properties": {
  17157. "type": "object",
  17158. "properties": {
  17159. "timestamp": {
  17160. "type": "number"
  17161. },
  17162. "sessionID": {
  17163. "type": "string",
  17164. "pattern": "^ses"
  17165. },
  17166. "agent": {
  17167. "type": "string"
  17168. }
  17169. },
  17170. "required": ["timestamp", "sessionID", "agent"],
  17171. "additionalProperties": false
  17172. }
  17173. },
  17174. "required": ["id", "type", "properties"],
  17175. "additionalProperties": false
  17176. },
  17177. "EventSessionNextModelSwitched": {
  17178. "type": "object",
  17179. "properties": {
  17180. "id": {
  17181. "type": "string"
  17182. },
  17183. "type": {
  17184. "type": "string",
  17185. "enum": ["session.next.model.switched"]
  17186. },
  17187. "properties": {
  17188. "type": "object",
  17189. "properties": {
  17190. "timestamp": {
  17191. "type": "number"
  17192. },
  17193. "sessionID": {
  17194. "type": "string",
  17195. "pattern": "^ses"
  17196. },
  17197. "model": {
  17198. "type": "object",
  17199. "properties": {
  17200. "id": {
  17201. "type": "string"
  17202. },
  17203. "providerID": {
  17204. "type": "string"
  17205. },
  17206. "variant": {
  17207. "type": "string"
  17208. }
  17209. },
  17210. "required": ["id", "providerID", "variant"],
  17211. "additionalProperties": false
  17212. }
  17213. },
  17214. "required": ["timestamp", "sessionID", "model"],
  17215. "additionalProperties": false
  17216. }
  17217. },
  17218. "required": ["id", "type", "properties"],
  17219. "additionalProperties": false
  17220. },
  17221. "PromptSource": {
  17222. "type": "object",
  17223. "properties": {
  17224. "start": {
  17225. "type": "number"
  17226. },
  17227. "end": {
  17228. "type": "number"
  17229. },
  17230. "text": {
  17231. "type": "string"
  17232. }
  17233. },
  17234. "required": ["start", "end", "text"],
  17235. "additionalProperties": false
  17236. },
  17237. "PromptFileAttachment": {
  17238. "type": "object",
  17239. "properties": {
  17240. "uri": {
  17241. "type": "string"
  17242. },
  17243. "mime": {
  17244. "type": "string"
  17245. },
  17246. "name": {
  17247. "type": "string"
  17248. },
  17249. "description": {
  17250. "type": "string"
  17251. },
  17252. "source": {
  17253. "$ref": "#/components/schemas/PromptSource"
  17254. }
  17255. },
  17256. "required": ["uri", "mime"],
  17257. "additionalProperties": false
  17258. },
  17259. "PromptAgentAttachment": {
  17260. "type": "object",
  17261. "properties": {
  17262. "name": {
  17263. "type": "string"
  17264. },
  17265. "source": {
  17266. "$ref": "#/components/schemas/PromptSource"
  17267. }
  17268. },
  17269. "required": ["name"],
  17270. "additionalProperties": false
  17271. },
  17272. "PromptReferenceAttachment": {
  17273. "type": "object",
  17274. "properties": {
  17275. "name": {
  17276. "type": "string"
  17277. },
  17278. "kind": {
  17279. "type": "string",
  17280. "enum": ["local", "git", "invalid"]
  17281. },
  17282. "uri": {
  17283. "type": "string"
  17284. },
  17285. "repository": {
  17286. "type": "string"
  17287. },
  17288. "branch": {
  17289. "type": "string"
  17290. },
  17291. "target": {
  17292. "type": "string"
  17293. },
  17294. "targetUri": {
  17295. "type": "string"
  17296. },
  17297. "problem": {
  17298. "type": "string"
  17299. },
  17300. "source": {
  17301. "$ref": "#/components/schemas/PromptSource"
  17302. }
  17303. },
  17304. "required": ["name", "kind"],
  17305. "additionalProperties": false
  17306. },
  17307. "EventSessionNextPrompted": {
  17308. "type": "object",
  17309. "properties": {
  17310. "id": {
  17311. "type": "string"
  17312. },
  17313. "type": {
  17314. "type": "string",
  17315. "enum": ["session.next.prompted"]
  17316. },
  17317. "properties": {
  17318. "type": "object",
  17319. "properties": {
  17320. "timestamp": {
  17321. "type": "number"
  17322. },
  17323. "sessionID": {
  17324. "type": "string",
  17325. "pattern": "^ses"
  17326. },
  17327. "prompt": {
  17328. "$ref": "#/components/schemas/Prompt"
  17329. }
  17330. },
  17331. "required": ["timestamp", "sessionID", "prompt"],
  17332. "additionalProperties": false
  17333. }
  17334. },
  17335. "required": ["id", "type", "properties"],
  17336. "additionalProperties": false
  17337. },
  17338. "EventSessionNextSynthetic": {
  17339. "type": "object",
  17340. "properties": {
  17341. "id": {
  17342. "type": "string"
  17343. },
  17344. "type": {
  17345. "type": "string",
  17346. "enum": ["session.next.synthetic"]
  17347. },
  17348. "properties": {
  17349. "type": "object",
  17350. "properties": {
  17351. "timestamp": {
  17352. "type": "number"
  17353. },
  17354. "sessionID": {
  17355. "type": "string",
  17356. "pattern": "^ses"
  17357. },
  17358. "text": {
  17359. "type": "string"
  17360. }
  17361. },
  17362. "required": ["timestamp", "sessionID", "text"],
  17363. "additionalProperties": false
  17364. }
  17365. },
  17366. "required": ["id", "type", "properties"],
  17367. "additionalProperties": false
  17368. },
  17369. "EventSessionNextShellStarted": {
  17370. "type": "object",
  17371. "properties": {
  17372. "id": {
  17373. "type": "string"
  17374. },
  17375. "type": {
  17376. "type": "string",
  17377. "enum": ["session.next.shell.started"]
  17378. },
  17379. "properties": {
  17380. "type": "object",
  17381. "properties": {
  17382. "timestamp": {
  17383. "type": "number"
  17384. },
  17385. "sessionID": {
  17386. "type": "string",
  17387. "pattern": "^ses"
  17388. },
  17389. "callID": {
  17390. "type": "string"
  17391. },
  17392. "command": {
  17393. "type": "string"
  17394. }
  17395. },
  17396. "required": ["timestamp", "sessionID", "callID", "command"],
  17397. "additionalProperties": false
  17398. }
  17399. },
  17400. "required": ["id", "type", "properties"],
  17401. "additionalProperties": false
  17402. },
  17403. "EventSessionNextShellEnded": {
  17404. "type": "object",
  17405. "properties": {
  17406. "id": {
  17407. "type": "string"
  17408. },
  17409. "type": {
  17410. "type": "string",
  17411. "enum": ["session.next.shell.ended"]
  17412. },
  17413. "properties": {
  17414. "type": "object",
  17415. "properties": {
  17416. "timestamp": {
  17417. "type": "number"
  17418. },
  17419. "sessionID": {
  17420. "type": "string",
  17421. "pattern": "^ses"
  17422. },
  17423. "callID": {
  17424. "type": "string"
  17425. },
  17426. "output": {
  17427. "type": "string"
  17428. }
  17429. },
  17430. "required": ["timestamp", "sessionID", "callID", "output"],
  17431. "additionalProperties": false
  17432. }
  17433. },
  17434. "required": ["id", "type", "properties"],
  17435. "additionalProperties": false
  17436. },
  17437. "EventSessionNextStepStarted": {
  17438. "type": "object",
  17439. "properties": {
  17440. "id": {
  17441. "type": "string"
  17442. },
  17443. "type": {
  17444. "type": "string",
  17445. "enum": ["session.next.step.started"]
  17446. },
  17447. "properties": {
  17448. "type": "object",
  17449. "properties": {
  17450. "timestamp": {
  17451. "type": "number"
  17452. },
  17453. "sessionID": {
  17454. "type": "string",
  17455. "pattern": "^ses"
  17456. },
  17457. "agent": {
  17458. "type": "string"
  17459. },
  17460. "model": {
  17461. "type": "object",
  17462. "properties": {
  17463. "id": {
  17464. "type": "string"
  17465. },
  17466. "providerID": {
  17467. "type": "string"
  17468. },
  17469. "variant": {
  17470. "type": "string"
  17471. }
  17472. },
  17473. "required": ["id", "providerID", "variant"],
  17474. "additionalProperties": false
  17475. },
  17476. "snapshot": {
  17477. "type": "string"
  17478. }
  17479. },
  17480. "required": ["timestamp", "sessionID", "agent", "model"],
  17481. "additionalProperties": false
  17482. }
  17483. },
  17484. "required": ["id", "type", "properties"],
  17485. "additionalProperties": false
  17486. },
  17487. "EventSessionNextStepEnded": {
  17488. "type": "object",
  17489. "properties": {
  17490. "id": {
  17491. "type": "string"
  17492. },
  17493. "type": {
  17494. "type": "string",
  17495. "enum": ["session.next.step.ended"]
  17496. },
  17497. "properties": {
  17498. "type": "object",
  17499. "properties": {
  17500. "timestamp": {
  17501. "type": "number"
  17502. },
  17503. "sessionID": {
  17504. "type": "string",
  17505. "pattern": "^ses"
  17506. },
  17507. "finish": {
  17508. "type": "string"
  17509. },
  17510. "cost": {
  17511. "type": "number"
  17512. },
  17513. "tokens": {
  17514. "type": "object",
  17515. "properties": {
  17516. "input": {
  17517. "type": "number"
  17518. },
  17519. "output": {
  17520. "type": "number"
  17521. },
  17522. "reasoning": {
  17523. "type": "number"
  17524. },
  17525. "cache": {
  17526. "type": "object",
  17527. "properties": {
  17528. "read": {
  17529. "type": "number"
  17530. },
  17531. "write": {
  17532. "type": "number"
  17533. }
  17534. },
  17535. "required": ["read", "write"],
  17536. "additionalProperties": false
  17537. }
  17538. },
  17539. "required": ["input", "output", "reasoning", "cache"],
  17540. "additionalProperties": false
  17541. },
  17542. "snapshot": {
  17543. "type": "string"
  17544. }
  17545. },
  17546. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17547. "additionalProperties": false
  17548. }
  17549. },
  17550. "required": ["id", "type", "properties"],
  17551. "additionalProperties": false
  17552. },
  17553. "SessionErrorUnknown": {
  17554. "type": "object",
  17555. "properties": {
  17556. "type": {
  17557. "type": "string",
  17558. "enum": ["unknown"]
  17559. },
  17560. "message": {
  17561. "type": "string"
  17562. }
  17563. },
  17564. "required": ["type", "message"],
  17565. "additionalProperties": false
  17566. },
  17567. "EventSessionNextStepFailed": {
  17568. "type": "object",
  17569. "properties": {
  17570. "id": {
  17571. "type": "string"
  17572. },
  17573. "type": {
  17574. "type": "string",
  17575. "enum": ["session.next.step.failed"]
  17576. },
  17577. "properties": {
  17578. "type": "object",
  17579. "properties": {
  17580. "timestamp": {
  17581. "type": "number"
  17582. },
  17583. "sessionID": {
  17584. "type": "string",
  17585. "pattern": "^ses"
  17586. },
  17587. "error": {
  17588. "$ref": "#/components/schemas/SessionErrorUnknown"
  17589. }
  17590. },
  17591. "required": ["timestamp", "sessionID", "error"],
  17592. "additionalProperties": false
  17593. }
  17594. },
  17595. "required": ["id", "type", "properties"],
  17596. "additionalProperties": false
  17597. },
  17598. "EventSessionNextTextStarted": {
  17599. "type": "object",
  17600. "properties": {
  17601. "id": {
  17602. "type": "string"
  17603. },
  17604. "type": {
  17605. "type": "string",
  17606. "enum": ["session.next.text.started"]
  17607. },
  17608. "properties": {
  17609. "type": "object",
  17610. "properties": {
  17611. "timestamp": {
  17612. "type": "number"
  17613. },
  17614. "sessionID": {
  17615. "type": "string",
  17616. "pattern": "^ses"
  17617. }
  17618. },
  17619. "required": ["timestamp", "sessionID"],
  17620. "additionalProperties": false
  17621. }
  17622. },
  17623. "required": ["id", "type", "properties"],
  17624. "additionalProperties": false
  17625. },
  17626. "EventSessionNextTextDelta": {
  17627. "type": "object",
  17628. "properties": {
  17629. "id": {
  17630. "type": "string"
  17631. },
  17632. "type": {
  17633. "type": "string",
  17634. "enum": ["session.next.text.delta"]
  17635. },
  17636. "properties": {
  17637. "type": "object",
  17638. "properties": {
  17639. "timestamp": {
  17640. "type": "number"
  17641. },
  17642. "sessionID": {
  17643. "type": "string",
  17644. "pattern": "^ses"
  17645. },
  17646. "delta": {
  17647. "type": "string"
  17648. }
  17649. },
  17650. "required": ["timestamp", "sessionID", "delta"],
  17651. "additionalProperties": false
  17652. }
  17653. },
  17654. "required": ["id", "type", "properties"],
  17655. "additionalProperties": false
  17656. },
  17657. "EventSessionNextTextEnded": {
  17658. "type": "object",
  17659. "properties": {
  17660. "id": {
  17661. "type": "string"
  17662. },
  17663. "type": {
  17664. "type": "string",
  17665. "enum": ["session.next.text.ended"]
  17666. },
  17667. "properties": {
  17668. "type": "object",
  17669. "properties": {
  17670. "timestamp": {
  17671. "type": "number"
  17672. },
  17673. "sessionID": {
  17674. "type": "string",
  17675. "pattern": "^ses"
  17676. },
  17677. "text": {
  17678. "type": "string"
  17679. }
  17680. },
  17681. "required": ["timestamp", "sessionID", "text"],
  17682. "additionalProperties": false
  17683. }
  17684. },
  17685. "required": ["id", "type", "properties"],
  17686. "additionalProperties": false
  17687. },
  17688. "EventSessionNextReasoningStarted": {
  17689. "type": "object",
  17690. "properties": {
  17691. "id": {
  17692. "type": "string"
  17693. },
  17694. "type": {
  17695. "type": "string",
  17696. "enum": ["session.next.reasoning.started"]
  17697. },
  17698. "properties": {
  17699. "type": "object",
  17700. "properties": {
  17701. "timestamp": {
  17702. "type": "number"
  17703. },
  17704. "sessionID": {
  17705. "type": "string",
  17706. "pattern": "^ses"
  17707. },
  17708. "reasoningID": {
  17709. "type": "string"
  17710. }
  17711. },
  17712. "required": ["timestamp", "sessionID", "reasoningID"],
  17713. "additionalProperties": false
  17714. }
  17715. },
  17716. "required": ["id", "type", "properties"],
  17717. "additionalProperties": false
  17718. },
  17719. "EventSessionNextReasoningDelta": {
  17720. "type": "object",
  17721. "properties": {
  17722. "id": {
  17723. "type": "string"
  17724. },
  17725. "type": {
  17726. "type": "string",
  17727. "enum": ["session.next.reasoning.delta"]
  17728. },
  17729. "properties": {
  17730. "type": "object",
  17731. "properties": {
  17732. "timestamp": {
  17733. "type": "number"
  17734. },
  17735. "sessionID": {
  17736. "type": "string",
  17737. "pattern": "^ses"
  17738. },
  17739. "reasoningID": {
  17740. "type": "string"
  17741. },
  17742. "delta": {
  17743. "type": "string"
  17744. }
  17745. },
  17746. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17747. "additionalProperties": false
  17748. }
  17749. },
  17750. "required": ["id", "type", "properties"],
  17751. "additionalProperties": false
  17752. },
  17753. "EventSessionNextReasoningEnded": {
  17754. "type": "object",
  17755. "properties": {
  17756. "id": {
  17757. "type": "string"
  17758. },
  17759. "type": {
  17760. "type": "string",
  17761. "enum": ["session.next.reasoning.ended"]
  17762. },
  17763. "properties": {
  17764. "type": "object",
  17765. "properties": {
  17766. "timestamp": {
  17767. "type": "number"
  17768. },
  17769. "sessionID": {
  17770. "type": "string",
  17771. "pattern": "^ses"
  17772. },
  17773. "reasoningID": {
  17774. "type": "string"
  17775. },
  17776. "text": {
  17777. "type": "string"
  17778. }
  17779. },
  17780. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17781. "additionalProperties": false
  17782. }
  17783. },
  17784. "required": ["id", "type", "properties"],
  17785. "additionalProperties": false
  17786. },
  17787. "EventSessionNextToolInputStarted": {
  17788. "type": "object",
  17789. "properties": {
  17790. "id": {
  17791. "type": "string"
  17792. },
  17793. "type": {
  17794. "type": "string",
  17795. "enum": ["session.next.tool.input.started"]
  17796. },
  17797. "properties": {
  17798. "type": "object",
  17799. "properties": {
  17800. "timestamp": {
  17801. "type": "number"
  17802. },
  17803. "sessionID": {
  17804. "type": "string",
  17805. "pattern": "^ses"
  17806. },
  17807. "callID": {
  17808. "type": "string"
  17809. },
  17810. "name": {
  17811. "type": "string"
  17812. }
  17813. },
  17814. "required": ["timestamp", "sessionID", "callID", "name"],
  17815. "additionalProperties": false
  17816. }
  17817. },
  17818. "required": ["id", "type", "properties"],
  17819. "additionalProperties": false
  17820. },
  17821. "EventSessionNextToolInputDelta": {
  17822. "type": "object",
  17823. "properties": {
  17824. "id": {
  17825. "type": "string"
  17826. },
  17827. "type": {
  17828. "type": "string",
  17829. "enum": ["session.next.tool.input.delta"]
  17830. },
  17831. "properties": {
  17832. "type": "object",
  17833. "properties": {
  17834. "timestamp": {
  17835. "type": "number"
  17836. },
  17837. "sessionID": {
  17838. "type": "string",
  17839. "pattern": "^ses"
  17840. },
  17841. "callID": {
  17842. "type": "string"
  17843. },
  17844. "delta": {
  17845. "type": "string"
  17846. }
  17847. },
  17848. "required": ["timestamp", "sessionID", "callID", "delta"],
  17849. "additionalProperties": false
  17850. }
  17851. },
  17852. "required": ["id", "type", "properties"],
  17853. "additionalProperties": false
  17854. },
  17855. "EventSessionNextToolInputEnded": {
  17856. "type": "object",
  17857. "properties": {
  17858. "id": {
  17859. "type": "string"
  17860. },
  17861. "type": {
  17862. "type": "string",
  17863. "enum": ["session.next.tool.input.ended"]
  17864. },
  17865. "properties": {
  17866. "type": "object",
  17867. "properties": {
  17868. "timestamp": {
  17869. "type": "number"
  17870. },
  17871. "sessionID": {
  17872. "type": "string",
  17873. "pattern": "^ses"
  17874. },
  17875. "callID": {
  17876. "type": "string"
  17877. },
  17878. "text": {
  17879. "type": "string"
  17880. }
  17881. },
  17882. "required": ["timestamp", "sessionID", "callID", "text"],
  17883. "additionalProperties": false
  17884. }
  17885. },
  17886. "required": ["id", "type", "properties"],
  17887. "additionalProperties": false
  17888. },
  17889. "EventSessionNextToolCalled": {
  17890. "type": "object",
  17891. "properties": {
  17892. "id": {
  17893. "type": "string"
  17894. },
  17895. "type": {
  17896. "type": "string",
  17897. "enum": ["session.next.tool.called"]
  17898. },
  17899. "properties": {
  17900. "type": "object",
  17901. "properties": {
  17902. "timestamp": {
  17903. "type": "number"
  17904. },
  17905. "sessionID": {
  17906. "type": "string",
  17907. "pattern": "^ses"
  17908. },
  17909. "callID": {
  17910. "type": "string"
  17911. },
  17912. "tool": {
  17913. "type": "string"
  17914. },
  17915. "input": {
  17916. "type": "object"
  17917. },
  17918. "provider": {
  17919. "type": "object",
  17920. "properties": {
  17921. "executed": {
  17922. "type": "boolean"
  17923. },
  17924. "metadata": {
  17925. "type": "object"
  17926. }
  17927. },
  17928. "required": ["executed"],
  17929. "additionalProperties": false
  17930. }
  17931. },
  17932. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17933. "additionalProperties": false
  17934. }
  17935. },
  17936. "required": ["id", "type", "properties"],
  17937. "additionalProperties": false
  17938. },
  17939. "ToolTextContent": {
  17940. "type": "object",
  17941. "properties": {
  17942. "type": {
  17943. "type": "string",
  17944. "enum": ["text"]
  17945. },
  17946. "text": {
  17947. "type": "string"
  17948. }
  17949. },
  17950. "required": ["type", "text"],
  17951. "additionalProperties": false
  17952. },
  17953. "ToolFileContent": {
  17954. "type": "object",
  17955. "properties": {
  17956. "type": {
  17957. "type": "string",
  17958. "enum": ["file"]
  17959. },
  17960. "uri": {
  17961. "type": "string"
  17962. },
  17963. "mime": {
  17964. "type": "string"
  17965. },
  17966. "name": {
  17967. "type": "string"
  17968. }
  17969. },
  17970. "required": ["type", "uri", "mime"],
  17971. "additionalProperties": false
  17972. },
  17973. "EventSessionNextToolProgress": {
  17974. "type": "object",
  17975. "properties": {
  17976. "id": {
  17977. "type": "string"
  17978. },
  17979. "type": {
  17980. "type": "string",
  17981. "enum": ["session.next.tool.progress"]
  17982. },
  17983. "properties": {
  17984. "type": "object",
  17985. "properties": {
  17986. "timestamp": {
  17987. "type": "number"
  17988. },
  17989. "sessionID": {
  17990. "type": "string",
  17991. "pattern": "^ses"
  17992. },
  17993. "callID": {
  17994. "type": "string"
  17995. },
  17996. "structured": {
  17997. "type": "object"
  17998. },
  17999. "content": {
  18000. "type": "array",
  18001. "items": {
  18002. "anyOf": [
  18003. {
  18004. "$ref": "#/components/schemas/ToolTextContent"
  18005. },
  18006. {
  18007. "$ref": "#/components/schemas/ToolFileContent"
  18008. }
  18009. ]
  18010. }
  18011. }
  18012. },
  18013. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  18014. "additionalProperties": false
  18015. }
  18016. },
  18017. "required": ["id", "type", "properties"],
  18018. "additionalProperties": false
  18019. },
  18020. "EventSessionNextToolSuccess": {
  18021. "type": "object",
  18022. "properties": {
  18023. "id": {
  18024. "type": "string"
  18025. },
  18026. "type": {
  18027. "type": "string",
  18028. "enum": ["session.next.tool.success"]
  18029. },
  18030. "properties": {
  18031. "type": "object",
  18032. "properties": {
  18033. "timestamp": {
  18034. "type": "number"
  18035. },
  18036. "sessionID": {
  18037. "type": "string",
  18038. "pattern": "^ses"
  18039. },
  18040. "callID": {
  18041. "type": "string"
  18042. },
  18043. "structured": {
  18044. "type": "object"
  18045. },
  18046. "content": {
  18047. "type": "array",
  18048. "items": {
  18049. "anyOf": [
  18050. {
  18051. "$ref": "#/components/schemas/ToolTextContent"
  18052. },
  18053. {
  18054. "$ref": "#/components/schemas/ToolFileContent"
  18055. }
  18056. ]
  18057. }
  18058. },
  18059. "provider": {
  18060. "type": "object",
  18061. "properties": {
  18062. "executed": {
  18063. "type": "boolean"
  18064. },
  18065. "metadata": {
  18066. "type": "object"
  18067. }
  18068. },
  18069. "required": ["executed"],
  18070. "additionalProperties": false
  18071. }
  18072. },
  18073. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  18074. "additionalProperties": false
  18075. }
  18076. },
  18077. "required": ["id", "type", "properties"],
  18078. "additionalProperties": false
  18079. },
  18080. "EventSessionNextToolFailed": {
  18081. "type": "object",
  18082. "properties": {
  18083. "id": {
  18084. "type": "string"
  18085. },
  18086. "type": {
  18087. "type": "string",
  18088. "enum": ["session.next.tool.failed"]
  18089. },
  18090. "properties": {
  18091. "type": "object",
  18092. "properties": {
  18093. "timestamp": {
  18094. "type": "number"
  18095. },
  18096. "sessionID": {
  18097. "type": "string",
  18098. "pattern": "^ses"
  18099. },
  18100. "callID": {
  18101. "type": "string"
  18102. },
  18103. "error": {
  18104. "$ref": "#/components/schemas/SessionErrorUnknown"
  18105. },
  18106. "provider": {
  18107. "type": "object",
  18108. "properties": {
  18109. "executed": {
  18110. "type": "boolean"
  18111. },
  18112. "metadata": {
  18113. "type": "object"
  18114. }
  18115. },
  18116. "required": ["executed"],
  18117. "additionalProperties": false
  18118. }
  18119. },
  18120. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  18121. "additionalProperties": false
  18122. }
  18123. },
  18124. "required": ["id", "type", "properties"],
  18125. "additionalProperties": false
  18126. },
  18127. "SessionNextRetry_error": {
  18128. "type": "object",
  18129. "properties": {
  18130. "message": {
  18131. "type": "string"
  18132. },
  18133. "statusCode": {
  18134. "type": "number"
  18135. },
  18136. "isRetryable": {
  18137. "type": "boolean"
  18138. },
  18139. "responseHeaders": {
  18140. "type": "object",
  18141. "additionalProperties": {
  18142. "type": "string"
  18143. }
  18144. },
  18145. "responseBody": {
  18146. "type": "string"
  18147. },
  18148. "metadata": {
  18149. "type": "object",
  18150. "additionalProperties": {
  18151. "type": "string"
  18152. }
  18153. }
  18154. },
  18155. "required": ["message", "isRetryable"],
  18156. "additionalProperties": false
  18157. },
  18158. "EventSessionNextRetried": {
  18159. "type": "object",
  18160. "properties": {
  18161. "id": {
  18162. "type": "string"
  18163. },
  18164. "type": {
  18165. "type": "string",
  18166. "enum": ["session.next.retried"]
  18167. },
  18168. "properties": {
  18169. "type": "object",
  18170. "properties": {
  18171. "timestamp": {
  18172. "type": "number"
  18173. },
  18174. "sessionID": {
  18175. "type": "string",
  18176. "pattern": "^ses"
  18177. },
  18178. "attempt": {
  18179. "type": "number"
  18180. },
  18181. "error": {
  18182. "$ref": "#/components/schemas/SessionNextRetry_error"
  18183. }
  18184. },
  18185. "required": ["timestamp", "sessionID", "attempt", "error"],
  18186. "additionalProperties": false
  18187. }
  18188. },
  18189. "required": ["id", "type", "properties"],
  18190. "additionalProperties": false
  18191. },
  18192. "EventSessionNextCompactionStarted": {
  18193. "type": "object",
  18194. "properties": {
  18195. "id": {
  18196. "type": "string"
  18197. },
  18198. "type": {
  18199. "type": "string",
  18200. "enum": ["session.next.compaction.started"]
  18201. },
  18202. "properties": {
  18203. "type": "object",
  18204. "properties": {
  18205. "timestamp": {
  18206. "type": "number"
  18207. },
  18208. "sessionID": {
  18209. "type": "string",
  18210. "pattern": "^ses"
  18211. },
  18212. "reason": {
  18213. "type": "string",
  18214. "enum": ["auto", "manual"]
  18215. }
  18216. },
  18217. "required": ["timestamp", "sessionID", "reason"],
  18218. "additionalProperties": false
  18219. }
  18220. },
  18221. "required": ["id", "type", "properties"],
  18222. "additionalProperties": false
  18223. },
  18224. "EventSessionNextCompactionDelta": {
  18225. "type": "object",
  18226. "properties": {
  18227. "id": {
  18228. "type": "string"
  18229. },
  18230. "type": {
  18231. "type": "string",
  18232. "enum": ["session.next.compaction.delta"]
  18233. },
  18234. "properties": {
  18235. "type": "object",
  18236. "properties": {
  18237. "timestamp": {
  18238. "type": "number"
  18239. },
  18240. "sessionID": {
  18241. "type": "string",
  18242. "pattern": "^ses"
  18243. },
  18244. "text": {
  18245. "type": "string"
  18246. }
  18247. },
  18248. "required": ["timestamp", "sessionID", "text"],
  18249. "additionalProperties": false
  18250. }
  18251. },
  18252. "required": ["id", "type", "properties"],
  18253. "additionalProperties": false
  18254. },
  18255. "EventSessionNextCompactionEnded": {
  18256. "type": "object",
  18257. "properties": {
  18258. "id": {
  18259. "type": "string"
  18260. },
  18261. "type": {
  18262. "type": "string",
  18263. "enum": ["session.next.compaction.ended"]
  18264. },
  18265. "properties": {
  18266. "type": "object",
  18267. "properties": {
  18268. "timestamp": {
  18269. "type": "number"
  18270. },
  18271. "sessionID": {
  18272. "type": "string",
  18273. "pattern": "^ses"
  18274. },
  18275. "text": {
  18276. "type": "string"
  18277. },
  18278. "include": {
  18279. "type": "string"
  18280. }
  18281. },
  18282. "required": ["timestamp", "sessionID", "text"],
  18283. "additionalProperties": false
  18284. }
  18285. },
  18286. "required": ["id", "type", "properties"],
  18287. "additionalProperties": false
  18288. },
  18289. "EventServerConnected": {
  18290. "type": "object",
  18291. "properties": {
  18292. "id": {
  18293. "type": "string"
  18294. },
  18295. "type": {
  18296. "type": "string",
  18297. "enum": ["server.connected"]
  18298. },
  18299. "properties": {
  18300. "type": "object",
  18301. "properties": {}
  18302. }
  18303. },
  18304. "required": ["id", "type", "properties"],
  18305. "additionalProperties": false
  18306. },
  18307. "EventGlobalDisposed": {
  18308. "type": "object",
  18309. "properties": {
  18310. "id": {
  18311. "type": "string"
  18312. },
  18313. "type": {
  18314. "type": "string",
  18315. "enum": ["global.disposed"]
  18316. },
  18317. "properties": {
  18318. "type": "object",
  18319. "properties": {}
  18320. }
  18321. },
  18322. "required": ["id", "type", "properties"],
  18323. "additionalProperties": false
  18324. },
  18325. "SessionInfo": {
  18326. "type": "object",
  18327. "properties": {
  18328. "id": {
  18329. "type": "string",
  18330. "pattern": "^ses"
  18331. },
  18332. "parentID": {
  18333. "type": "string",
  18334. "pattern": "^ses"
  18335. },
  18336. "projectID": {
  18337. "type": "string"
  18338. },
  18339. "workspaceID": {
  18340. "type": "string",
  18341. "pattern": "^wrk"
  18342. },
  18343. "path": {
  18344. "type": "string"
  18345. },
  18346. "agent": {
  18347. "type": "string"
  18348. },
  18349. "model": {
  18350. "type": "object",
  18351. "properties": {
  18352. "id": {
  18353. "type": "string"
  18354. },
  18355. "providerID": {
  18356. "type": "string"
  18357. },
  18358. "variant": {
  18359. "type": "string"
  18360. }
  18361. },
  18362. "required": ["id", "providerID", "variant"],
  18363. "additionalProperties": false
  18364. },
  18365. "cost": {
  18366. "type": "number"
  18367. },
  18368. "tokens": {
  18369. "type": "object",
  18370. "properties": {
  18371. "input": {
  18372. "type": "number"
  18373. },
  18374. "output": {
  18375. "type": "number"
  18376. },
  18377. "reasoning": {
  18378. "type": "number"
  18379. },
  18380. "cache": {
  18381. "type": "object",
  18382. "properties": {
  18383. "read": {
  18384. "type": "number"
  18385. },
  18386. "write": {
  18387. "type": "number"
  18388. }
  18389. },
  18390. "required": ["read", "write"],
  18391. "additionalProperties": false
  18392. }
  18393. },
  18394. "required": ["input", "output", "reasoning", "cache"],
  18395. "additionalProperties": false
  18396. },
  18397. "time": {
  18398. "type": "object",
  18399. "properties": {
  18400. "created": {
  18401. "type": "number"
  18402. },
  18403. "updated": {
  18404. "type": "number"
  18405. },
  18406. "archived": {
  18407. "type": "number"
  18408. }
  18409. },
  18410. "required": ["created", "updated"],
  18411. "additionalProperties": false
  18412. },
  18413. "title": {
  18414. "type": "string"
  18415. }
  18416. },
  18417. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  18418. "additionalProperties": false
  18419. },
  18420. "SessionDelivery": {
  18421. "type": "string",
  18422. "enum": ["immediate", "deferred"]
  18423. },
  18424. "SessionMessageAgentSwitched": {
  18425. "type": "object",
  18426. "properties": {
  18427. "id": {
  18428. "type": "string"
  18429. },
  18430. "metadata": {
  18431. "type": "object"
  18432. },
  18433. "time": {
  18434. "type": "object",
  18435. "properties": {
  18436. "created": {
  18437. "type": "number"
  18438. }
  18439. },
  18440. "required": ["created"],
  18441. "additionalProperties": false
  18442. },
  18443. "type": {
  18444. "type": "string",
  18445. "enum": ["agent-switched"]
  18446. },
  18447. "agent": {
  18448. "type": "string"
  18449. }
  18450. },
  18451. "required": ["id", "time", "type", "agent"],
  18452. "additionalProperties": false
  18453. },
  18454. "SessionMessageModelSwitched": {
  18455. "type": "object",
  18456. "properties": {
  18457. "id": {
  18458. "type": "string"
  18459. },
  18460. "metadata": {
  18461. "type": "object"
  18462. },
  18463. "time": {
  18464. "type": "object",
  18465. "properties": {
  18466. "created": {
  18467. "type": "number"
  18468. }
  18469. },
  18470. "required": ["created"],
  18471. "additionalProperties": false
  18472. },
  18473. "type": {
  18474. "type": "string",
  18475. "enum": ["model-switched"]
  18476. },
  18477. "model": {
  18478. "type": "object",
  18479. "properties": {
  18480. "id": {
  18481. "type": "string"
  18482. },
  18483. "providerID": {
  18484. "type": "string"
  18485. },
  18486. "variant": {
  18487. "type": "string"
  18488. }
  18489. },
  18490. "required": ["id", "providerID", "variant"],
  18491. "additionalProperties": false
  18492. }
  18493. },
  18494. "required": ["id", "time", "type", "model"],
  18495. "additionalProperties": false
  18496. },
  18497. "SessionMessageUser": {
  18498. "type": "object",
  18499. "properties": {
  18500. "id": {
  18501. "type": "string"
  18502. },
  18503. "metadata": {
  18504. "type": "object"
  18505. },
  18506. "time": {
  18507. "type": "object",
  18508. "properties": {
  18509. "created": {
  18510. "type": "number"
  18511. }
  18512. },
  18513. "required": ["created"],
  18514. "additionalProperties": false
  18515. },
  18516. "text": {
  18517. "type": "string"
  18518. },
  18519. "files": {
  18520. "type": "array",
  18521. "items": {
  18522. "$ref": "#/components/schemas/PromptFileAttachment"
  18523. }
  18524. },
  18525. "agents": {
  18526. "type": "array",
  18527. "items": {
  18528. "$ref": "#/components/schemas/PromptAgentAttachment"
  18529. }
  18530. },
  18531. "references": {
  18532. "type": "array",
  18533. "items": {
  18534. "$ref": "#/components/schemas/PromptReferenceAttachment"
  18535. }
  18536. },
  18537. "type": {
  18538. "type": "string",
  18539. "enum": ["user"]
  18540. }
  18541. },
  18542. "required": ["id", "time", "text", "type"],
  18543. "additionalProperties": false
  18544. },
  18545. "SessionMessageSynthetic": {
  18546. "type": "object",
  18547. "properties": {
  18548. "id": {
  18549. "type": "string"
  18550. },
  18551. "metadata": {
  18552. "type": "object"
  18553. },
  18554. "time": {
  18555. "type": "object",
  18556. "properties": {
  18557. "created": {
  18558. "type": "number"
  18559. }
  18560. },
  18561. "required": ["created"],
  18562. "additionalProperties": false
  18563. },
  18564. "sessionID": {
  18565. "type": "string",
  18566. "pattern": "^ses"
  18567. },
  18568. "text": {
  18569. "type": "string"
  18570. },
  18571. "type": {
  18572. "type": "string",
  18573. "enum": ["synthetic"]
  18574. }
  18575. },
  18576. "required": ["id", "time", "sessionID", "text", "type"],
  18577. "additionalProperties": false
  18578. },
  18579. "SessionMessageShell": {
  18580. "type": "object",
  18581. "properties": {
  18582. "id": {
  18583. "type": "string"
  18584. },
  18585. "metadata": {
  18586. "type": "object"
  18587. },
  18588. "time": {
  18589. "type": "object",
  18590. "properties": {
  18591. "created": {
  18592. "type": "number"
  18593. },
  18594. "completed": {
  18595. "type": "number"
  18596. }
  18597. },
  18598. "required": ["created"],
  18599. "additionalProperties": false
  18600. },
  18601. "type": {
  18602. "type": "string",
  18603. "enum": ["shell"]
  18604. },
  18605. "callID": {
  18606. "type": "string"
  18607. },
  18608. "command": {
  18609. "type": "string"
  18610. },
  18611. "output": {
  18612. "type": "string"
  18613. }
  18614. },
  18615. "required": ["id", "time", "type", "callID", "command", "output"],
  18616. "additionalProperties": false
  18617. },
  18618. "SessionMessageAssistantText": {
  18619. "type": "object",
  18620. "properties": {
  18621. "type": {
  18622. "type": "string",
  18623. "enum": ["text"]
  18624. },
  18625. "text": {
  18626. "type": "string"
  18627. }
  18628. },
  18629. "required": ["type", "text"],
  18630. "additionalProperties": false
  18631. },
  18632. "SessionMessageAssistantReasoning": {
  18633. "type": "object",
  18634. "properties": {
  18635. "type": {
  18636. "type": "string",
  18637. "enum": ["reasoning"]
  18638. },
  18639. "id": {
  18640. "type": "string"
  18641. },
  18642. "text": {
  18643. "type": "string"
  18644. }
  18645. },
  18646. "required": ["type", "id", "text"],
  18647. "additionalProperties": false
  18648. },
  18649. "SessionMessageToolStatePending": {
  18650. "type": "object",
  18651. "properties": {
  18652. "status": {
  18653. "type": "string",
  18654. "enum": ["pending"]
  18655. },
  18656. "input": {
  18657. "type": "string"
  18658. }
  18659. },
  18660. "required": ["status", "input"],
  18661. "additionalProperties": false
  18662. },
  18663. "SessionMessageToolStateRunning": {
  18664. "type": "object",
  18665. "properties": {
  18666. "status": {
  18667. "type": "string",
  18668. "enum": ["running"]
  18669. },
  18670. "input": {
  18671. "type": "object"
  18672. },
  18673. "structured": {
  18674. "type": "object"
  18675. },
  18676. "content": {
  18677. "type": "array",
  18678. "items": {
  18679. "anyOf": [
  18680. {
  18681. "$ref": "#/components/schemas/ToolTextContent"
  18682. },
  18683. {
  18684. "$ref": "#/components/schemas/ToolFileContent"
  18685. }
  18686. ]
  18687. }
  18688. }
  18689. },
  18690. "required": ["status", "input", "structured", "content"],
  18691. "additionalProperties": false
  18692. },
  18693. "SessionMessageToolStateCompleted": {
  18694. "type": "object",
  18695. "properties": {
  18696. "status": {
  18697. "type": "string",
  18698. "enum": ["completed"]
  18699. },
  18700. "input": {
  18701. "type": "object"
  18702. },
  18703. "attachments": {
  18704. "type": "array",
  18705. "items": {
  18706. "$ref": "#/components/schemas/PromptFileAttachment"
  18707. }
  18708. },
  18709. "content": {
  18710. "type": "array",
  18711. "items": {
  18712. "anyOf": [
  18713. {
  18714. "$ref": "#/components/schemas/ToolTextContent"
  18715. },
  18716. {
  18717. "$ref": "#/components/schemas/ToolFileContent"
  18718. }
  18719. ]
  18720. }
  18721. },
  18722. "structured": {
  18723. "type": "object"
  18724. }
  18725. },
  18726. "required": ["status", "input", "content", "structured"],
  18727. "additionalProperties": false
  18728. },
  18729. "SessionMessageToolStateError": {
  18730. "type": "object",
  18731. "properties": {
  18732. "status": {
  18733. "type": "string",
  18734. "enum": ["error"]
  18735. },
  18736. "input": {
  18737. "type": "object"
  18738. },
  18739. "content": {
  18740. "type": "array",
  18741. "items": {
  18742. "anyOf": [
  18743. {
  18744. "$ref": "#/components/schemas/ToolTextContent"
  18745. },
  18746. {
  18747. "$ref": "#/components/schemas/ToolFileContent"
  18748. }
  18749. ]
  18750. }
  18751. },
  18752. "structured": {
  18753. "type": "object"
  18754. },
  18755. "error": {
  18756. "$ref": "#/components/schemas/SessionErrorUnknown"
  18757. }
  18758. },
  18759. "required": ["status", "input", "content", "structured", "error"],
  18760. "additionalProperties": false
  18761. },
  18762. "SessionMessageAssistantTool": {
  18763. "type": "object",
  18764. "properties": {
  18765. "type": {
  18766. "type": "string",
  18767. "enum": ["tool"]
  18768. },
  18769. "id": {
  18770. "type": "string"
  18771. },
  18772. "name": {
  18773. "type": "string"
  18774. },
  18775. "provider": {
  18776. "type": "object",
  18777. "properties": {
  18778. "executed": {
  18779. "type": "boolean"
  18780. },
  18781. "metadata": {
  18782. "type": "object"
  18783. }
  18784. },
  18785. "required": ["executed"],
  18786. "additionalProperties": false
  18787. },
  18788. "state": {
  18789. "anyOf": [
  18790. {
  18791. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18792. },
  18793. {
  18794. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18795. },
  18796. {
  18797. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18798. },
  18799. {
  18800. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18801. }
  18802. ]
  18803. },
  18804. "time": {
  18805. "type": "object",
  18806. "properties": {
  18807. "created": {
  18808. "type": "number"
  18809. },
  18810. "ran": {
  18811. "type": "number"
  18812. },
  18813. "completed": {
  18814. "type": "number"
  18815. },
  18816. "pruned": {
  18817. "type": "number"
  18818. }
  18819. },
  18820. "required": ["created"],
  18821. "additionalProperties": false
  18822. }
  18823. },
  18824. "required": ["type", "id", "name", "state", "time"],
  18825. "additionalProperties": false
  18826. },
  18827. "SessionMessageAssistant": {
  18828. "type": "object",
  18829. "properties": {
  18830. "id": {
  18831. "type": "string"
  18832. },
  18833. "metadata": {
  18834. "type": "object"
  18835. },
  18836. "time": {
  18837. "type": "object",
  18838. "properties": {
  18839. "created": {
  18840. "type": "number"
  18841. },
  18842. "completed": {
  18843. "type": "number"
  18844. }
  18845. },
  18846. "required": ["created"],
  18847. "additionalProperties": false
  18848. },
  18849. "type": {
  18850. "type": "string",
  18851. "enum": ["assistant"]
  18852. },
  18853. "agent": {
  18854. "type": "string"
  18855. },
  18856. "model": {
  18857. "type": "object",
  18858. "properties": {
  18859. "id": {
  18860. "type": "string"
  18861. },
  18862. "providerID": {
  18863. "type": "string"
  18864. },
  18865. "variant": {
  18866. "type": "string"
  18867. }
  18868. },
  18869. "required": ["id", "providerID", "variant"],
  18870. "additionalProperties": false
  18871. },
  18872. "content": {
  18873. "type": "array",
  18874. "items": {
  18875. "anyOf": [
  18876. {
  18877. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18878. },
  18879. {
  18880. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18881. },
  18882. {
  18883. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18884. }
  18885. ]
  18886. }
  18887. },
  18888. "snapshot": {
  18889. "type": "object",
  18890. "properties": {
  18891. "start": {
  18892. "type": "string"
  18893. },
  18894. "end": {
  18895. "type": "string"
  18896. }
  18897. },
  18898. "additionalProperties": false
  18899. },
  18900. "finish": {
  18901. "type": "string"
  18902. },
  18903. "cost": {
  18904. "type": "number"
  18905. },
  18906. "tokens": {
  18907. "type": "object",
  18908. "properties": {
  18909. "input": {
  18910. "type": "number"
  18911. },
  18912. "output": {
  18913. "type": "number"
  18914. },
  18915. "reasoning": {
  18916. "type": "number"
  18917. },
  18918. "cache": {
  18919. "type": "object",
  18920. "properties": {
  18921. "read": {
  18922. "type": "number"
  18923. },
  18924. "write": {
  18925. "type": "number"
  18926. }
  18927. },
  18928. "required": ["read", "write"],
  18929. "additionalProperties": false
  18930. }
  18931. },
  18932. "required": ["input", "output", "reasoning", "cache"],
  18933. "additionalProperties": false
  18934. },
  18935. "error": {
  18936. "$ref": "#/components/schemas/SessionErrorUnknown"
  18937. }
  18938. },
  18939. "required": ["id", "time", "type", "agent", "model", "content"],
  18940. "additionalProperties": false
  18941. },
  18942. "SessionMessageCompaction": {
  18943. "type": "object",
  18944. "properties": {
  18945. "type": {
  18946. "type": "string",
  18947. "enum": ["compaction"]
  18948. },
  18949. "reason": {
  18950. "type": "string",
  18951. "enum": ["auto", "manual"]
  18952. },
  18953. "summary": {
  18954. "type": "string"
  18955. },
  18956. "include": {
  18957. "type": "string"
  18958. },
  18959. "id": {
  18960. "type": "string"
  18961. },
  18962. "metadata": {
  18963. "type": "object"
  18964. },
  18965. "time": {
  18966. "type": "object",
  18967. "properties": {
  18968. "created": {
  18969. "type": "number"
  18970. }
  18971. },
  18972. "required": ["created"],
  18973. "additionalProperties": false
  18974. }
  18975. },
  18976. "required": ["type", "reason", "summary", "id", "time"],
  18977. "additionalProperties": false
  18978. },
  18979. "SessionMessage": {
  18980. "anyOf": [
  18981. {
  18982. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  18983. },
  18984. {
  18985. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  18986. },
  18987. {
  18988. "$ref": "#/components/schemas/SessionMessageUser"
  18989. },
  18990. {
  18991. "$ref": "#/components/schemas/SessionMessageSynthetic"
  18992. },
  18993. {
  18994. "$ref": "#/components/schemas/SessionMessageShell"
  18995. },
  18996. {
  18997. "$ref": "#/components/schemas/SessionMessageAssistant"
  18998. },
  18999. {
  19000. "$ref": "#/components/schemas/SessionMessageCompaction"
  19001. }
  19002. ]
  19003. },
  19004. "EventTuiToastShow1": {
  19005. "type": "object",
  19006. "properties": {
  19007. "id": {
  19008. "type": "string"
  19009. },
  19010. "type": {
  19011. "type": "string",
  19012. "enum": ["tui.toast.show"]
  19013. },
  19014. "properties": {
  19015. "type": "object",
  19016. "properties": {
  19017. "title": {
  19018. "type": "string"
  19019. },
  19020. "message": {
  19021. "type": "string"
  19022. },
  19023. "variant": {
  19024. "type": "string",
  19025. "enum": ["info", "success", "warning", "error"]
  19026. },
  19027. "duration": {
  19028. "type": "integer",
  19029. "exclusiveMinimum": 0
  19030. }
  19031. },
  19032. "required": ["message", "variant"],
  19033. "additionalProperties": false
  19034. }
  19035. },
  19036. "required": ["id", "type", "properties"],
  19037. "additionalProperties": false
  19038. },
  19039. "BadRequestError": {
  19040. "type": "object",
  19041. "required": ["name", "data"],
  19042. "properties": {
  19043. "name": {
  19044. "type": "string",
  19045. "enum": ["BadRequest"]
  19046. },
  19047. "data": {
  19048. "type": "object",
  19049. "required": ["message"],
  19050. "properties": {
  19051. "message": {
  19052. "type": "string"
  19053. },
  19054. "kind": {
  19055. "type": "string",
  19056. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  19057. }
  19058. }
  19059. }
  19060. }
  19061. }
  19062. }
  19063. },
  19064. "security": [],
  19065. "tags": [
  19066. {
  19067. "name": "control",
  19068. "description": "Control plane routes."
  19069. },
  19070. {
  19071. "name": "global",
  19072. "description": "Global server routes."
  19073. },
  19074. {
  19075. "name": "event",
  19076. "description": "Instance event stream route."
  19077. },
  19078. {
  19079. "name": "config",
  19080. "description": "Experimental HttpApi config routes."
  19081. },
  19082. {
  19083. "name": "experimental",
  19084. "description": "Experimental HttpApi read-only routes."
  19085. },
  19086. {
  19087. "name": "file",
  19088. "description": "Experimental HttpApi file routes."
  19089. },
  19090. {
  19091. "name": "instance",
  19092. "description": "Experimental HttpApi instance read routes."
  19093. },
  19094. {
  19095. "name": "mcp",
  19096. "description": "Experimental HttpApi MCP routes."
  19097. },
  19098. {
  19099. "name": "project",
  19100. "description": "Experimental HttpApi project routes."
  19101. },
  19102. {
  19103. "name": "pty",
  19104. "description": "Experimental HttpApi PTY routes."
  19105. },
  19106. {
  19107. "name": "question",
  19108. "description": "Question routes."
  19109. },
  19110. {
  19111. "name": "permission",
  19112. "description": "Experimental HttpApi permission routes."
  19113. },
  19114. {
  19115. "name": "provider",
  19116. "description": "Experimental HttpApi provider routes."
  19117. },
  19118. {
  19119. "name": "session",
  19120. "description": "Experimental HttpApi session routes."
  19121. },
  19122. {
  19123. "name": "sync",
  19124. "description": "Experimental HttpApi sync routes."
  19125. },
  19126. {
  19127. "name": "v2",
  19128. "description": "Experimental v2 routes."
  19129. },
  19130. {
  19131. "name": "v2 messages",
  19132. "description": "Experimental v2 message routes."
  19133. },
  19134. {
  19135. "name": "tui",
  19136. "description": "Experimental HttpApi TUI routes."
  19137. },
  19138. {
  19139. "name": "workspace",
  19140. "description": "Experimental HttpApi workspace routes."
  19141. },
  19142. {
  19143. "name": "pty",
  19144. "description": "PTY websocket route."
  19145. }
  19146. ]
  19147. }