openapi.json 701 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132
  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": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. },
  2292. {
  2293. "name": "context",
  2294. "in": "query",
  2295. "schema": {
  2296. "type": "integer",
  2297. "minimum": 0
  2298. },
  2299. "required": false
  2300. }
  2301. ],
  2302. "responses": {
  2303. "200": {
  2304. "description": "VCS diff",
  2305. "content": {
  2306. "application/json": {
  2307. "schema": {
  2308. "type": "array",
  2309. "items": {
  2310. "$ref": "#/components/schemas/VcsFileDiff"
  2311. },
  2312. "description": "VCS diff"
  2313. }
  2314. }
  2315. }
  2316. },
  2317. "400": {
  2318. "description": "Bad request",
  2319. "content": {
  2320. "application/json": {
  2321. "schema": {
  2322. "$ref": "#/components/schemas/BadRequestError"
  2323. }
  2324. }
  2325. }
  2326. }
  2327. },
  2328. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2329. "summary": "Get VCS diff",
  2330. "x-codeSamples": [
  2331. {
  2332. "lang": "js",
  2333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2334. }
  2335. ]
  2336. }
  2337. },
  2338. "/vcs/diff/raw": {
  2339. "get": {
  2340. "tags": ["instance"],
  2341. "operationId": "vcs.diff.raw",
  2342. "parameters": [
  2343. {
  2344. "name": "directory",
  2345. "in": "query",
  2346. "schema": {
  2347. "type": "string"
  2348. },
  2349. "required": false
  2350. },
  2351. {
  2352. "name": "workspace",
  2353. "in": "query",
  2354. "schema": {
  2355. "type": "string"
  2356. },
  2357. "required": false
  2358. }
  2359. ],
  2360. "responses": {
  2361. "200": {
  2362. "description": "Raw VCS diff",
  2363. "content": {
  2364. "text/x-diff; charset=utf-8": {
  2365. "schema": {
  2366. "type": "string"
  2367. }
  2368. }
  2369. }
  2370. },
  2371. "400": {
  2372. "description": "Bad request",
  2373. "content": {
  2374. "application/json": {
  2375. "schema": {
  2376. "$ref": "#/components/schemas/BadRequestError"
  2377. }
  2378. }
  2379. }
  2380. }
  2381. },
  2382. "description": "Retrieve a raw patch for current uncommitted changes.",
  2383. "summary": "Get raw VCS diff",
  2384. "x-codeSamples": [
  2385. {
  2386. "lang": "js",
  2387. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2388. }
  2389. ]
  2390. }
  2391. },
  2392. "/vcs/apply": {
  2393. "post": {
  2394. "tags": ["instance"],
  2395. "operationId": "vcs.apply",
  2396. "parameters": [
  2397. {
  2398. "name": "directory",
  2399. "in": "query",
  2400. "schema": {
  2401. "type": "string"
  2402. },
  2403. "required": false
  2404. },
  2405. {
  2406. "name": "workspace",
  2407. "in": "query",
  2408. "schema": {
  2409. "type": "string"
  2410. },
  2411. "required": false
  2412. }
  2413. ],
  2414. "responses": {
  2415. "200": {
  2416. "description": "VCS patch applied",
  2417. "content": {
  2418. "application/json": {
  2419. "schema": {
  2420. "type": "object",
  2421. "properties": {
  2422. "applied": {
  2423. "type": "boolean"
  2424. }
  2425. },
  2426. "required": ["applied"],
  2427. "additionalProperties": false,
  2428. "description": "VCS patch applied"
  2429. }
  2430. }
  2431. }
  2432. },
  2433. "400": {
  2434. "description": "VcsApplyError | InvalidRequestError",
  2435. "content": {
  2436. "application/json": {
  2437. "schema": {
  2438. "anyOf": [
  2439. {
  2440. "$ref": "#/components/schemas/VcsApplyError"
  2441. },
  2442. {
  2443. "$ref": "#/components/schemas/InvalidRequestError"
  2444. }
  2445. ]
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Apply a raw patch to the current working tree.",
  2452. "summary": "Apply VCS patch",
  2453. "requestBody": {
  2454. "content": {
  2455. "application/json": {
  2456. "schema": {
  2457. "type": "object",
  2458. "properties": {
  2459. "patch": {
  2460. "type": "string"
  2461. }
  2462. },
  2463. "required": ["patch"],
  2464. "additionalProperties": false
  2465. }
  2466. }
  2467. }
  2468. },
  2469. "x-codeSamples": [
  2470. {
  2471. "lang": "js",
  2472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2473. }
  2474. ]
  2475. }
  2476. },
  2477. "/command": {
  2478. "get": {
  2479. "tags": ["instance"],
  2480. "operationId": "command.list",
  2481. "parameters": [
  2482. {
  2483. "name": "directory",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. },
  2490. {
  2491. "name": "workspace",
  2492. "in": "query",
  2493. "schema": {
  2494. "type": "string"
  2495. },
  2496. "required": false
  2497. }
  2498. ],
  2499. "responses": {
  2500. "200": {
  2501. "description": "List of commands",
  2502. "content": {
  2503. "application/json": {
  2504. "schema": {
  2505. "type": "array",
  2506. "items": {
  2507. "$ref": "#/components/schemas/Command"
  2508. },
  2509. "description": "List of commands"
  2510. }
  2511. }
  2512. }
  2513. },
  2514. "400": {
  2515. "description": "Bad request",
  2516. "content": {
  2517. "application/json": {
  2518. "schema": {
  2519. "$ref": "#/components/schemas/BadRequestError"
  2520. }
  2521. }
  2522. }
  2523. }
  2524. },
  2525. "description": "Get a list of all available commands in the OpenCode system.",
  2526. "summary": "List commands",
  2527. "x-codeSamples": [
  2528. {
  2529. "lang": "js",
  2530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2531. }
  2532. ]
  2533. }
  2534. },
  2535. "/agent": {
  2536. "get": {
  2537. "tags": ["instance"],
  2538. "operationId": "app.agents",
  2539. "parameters": [
  2540. {
  2541. "name": "directory",
  2542. "in": "query",
  2543. "schema": {
  2544. "type": "string"
  2545. },
  2546. "required": false
  2547. },
  2548. {
  2549. "name": "workspace",
  2550. "in": "query",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": false
  2555. }
  2556. ],
  2557. "responses": {
  2558. "200": {
  2559. "description": "List of agents",
  2560. "content": {
  2561. "application/json": {
  2562. "schema": {
  2563. "type": "array",
  2564. "items": {
  2565. "$ref": "#/components/schemas/Agent"
  2566. },
  2567. "description": "List of agents"
  2568. }
  2569. }
  2570. }
  2571. },
  2572. "400": {
  2573. "description": "Bad request",
  2574. "content": {
  2575. "application/json": {
  2576. "schema": {
  2577. "$ref": "#/components/schemas/BadRequestError"
  2578. }
  2579. }
  2580. }
  2581. }
  2582. },
  2583. "description": "Get a list of all available AI agents in the OpenCode system.",
  2584. "summary": "List agents",
  2585. "x-codeSamples": [
  2586. {
  2587. "lang": "js",
  2588. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2589. }
  2590. ]
  2591. }
  2592. },
  2593. "/skill": {
  2594. "get": {
  2595. "tags": ["instance"],
  2596. "operationId": "app.skills",
  2597. "parameters": [
  2598. {
  2599. "name": "directory",
  2600. "in": "query",
  2601. "schema": {
  2602. "type": "string"
  2603. },
  2604. "required": false
  2605. },
  2606. {
  2607. "name": "workspace",
  2608. "in": "query",
  2609. "schema": {
  2610. "type": "string"
  2611. },
  2612. "required": false
  2613. }
  2614. ],
  2615. "responses": {
  2616. "200": {
  2617. "description": "List of skills",
  2618. "content": {
  2619. "application/json": {
  2620. "schema": {
  2621. "type": "array",
  2622. "items": {
  2623. "type": "object",
  2624. "properties": {
  2625. "name": {
  2626. "type": "string"
  2627. },
  2628. "description": {
  2629. "type": "string"
  2630. },
  2631. "location": {
  2632. "type": "string"
  2633. },
  2634. "content": {
  2635. "type": "string"
  2636. }
  2637. },
  2638. "required": ["name", "location", "content"],
  2639. "additionalProperties": false
  2640. },
  2641. "description": "List of skills"
  2642. }
  2643. }
  2644. }
  2645. },
  2646. "400": {
  2647. "description": "Bad request",
  2648. "content": {
  2649. "application/json": {
  2650. "schema": {
  2651. "$ref": "#/components/schemas/BadRequestError"
  2652. }
  2653. }
  2654. }
  2655. }
  2656. },
  2657. "description": "Get a list of all available skills in the OpenCode system.",
  2658. "summary": "List skills",
  2659. "x-codeSamples": [
  2660. {
  2661. "lang": "js",
  2662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2663. }
  2664. ]
  2665. }
  2666. },
  2667. "/lsp": {
  2668. "get": {
  2669. "tags": ["instance"],
  2670. "operationId": "lsp.status",
  2671. "parameters": [
  2672. {
  2673. "name": "directory",
  2674. "in": "query",
  2675. "schema": {
  2676. "type": "string"
  2677. },
  2678. "required": false
  2679. },
  2680. {
  2681. "name": "workspace",
  2682. "in": "query",
  2683. "schema": {
  2684. "type": "string"
  2685. },
  2686. "required": false
  2687. }
  2688. ],
  2689. "responses": {
  2690. "200": {
  2691. "description": "LSP server status",
  2692. "content": {
  2693. "application/json": {
  2694. "schema": {
  2695. "type": "array",
  2696. "items": {
  2697. "$ref": "#/components/schemas/LSPStatus"
  2698. },
  2699. "description": "LSP server status"
  2700. }
  2701. }
  2702. }
  2703. },
  2704. "400": {
  2705. "description": "Bad request",
  2706. "content": {
  2707. "application/json": {
  2708. "schema": {
  2709. "$ref": "#/components/schemas/BadRequestError"
  2710. }
  2711. }
  2712. }
  2713. }
  2714. },
  2715. "description": "Get LSP server status",
  2716. "summary": "Get LSP status",
  2717. "x-codeSamples": [
  2718. {
  2719. "lang": "js",
  2720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2721. }
  2722. ]
  2723. }
  2724. },
  2725. "/formatter": {
  2726. "get": {
  2727. "tags": ["instance"],
  2728. "operationId": "formatter.status",
  2729. "parameters": [
  2730. {
  2731. "name": "directory",
  2732. "in": "query",
  2733. "schema": {
  2734. "type": "string"
  2735. },
  2736. "required": false
  2737. },
  2738. {
  2739. "name": "workspace",
  2740. "in": "query",
  2741. "schema": {
  2742. "type": "string"
  2743. },
  2744. "required": false
  2745. }
  2746. ],
  2747. "responses": {
  2748. "200": {
  2749. "description": "Formatter status",
  2750. "content": {
  2751. "application/json": {
  2752. "schema": {
  2753. "type": "array",
  2754. "items": {
  2755. "$ref": "#/components/schemas/FormatterStatus"
  2756. },
  2757. "description": "Formatter status"
  2758. }
  2759. }
  2760. }
  2761. },
  2762. "400": {
  2763. "description": "Bad request",
  2764. "content": {
  2765. "application/json": {
  2766. "schema": {
  2767. "$ref": "#/components/schemas/BadRequestError"
  2768. }
  2769. }
  2770. }
  2771. }
  2772. },
  2773. "description": "Get formatter status",
  2774. "summary": "Get formatter status",
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp": {
  2784. "get": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.status",
  2787. "parameters": [
  2788. {
  2789. "name": "directory",
  2790. "in": "query",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": false
  2795. },
  2796. {
  2797. "name": "workspace",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. }
  2804. ],
  2805. "responses": {
  2806. "200": {
  2807. "description": "MCP server status",
  2808. "content": {
  2809. "application/json": {
  2810. "schema": {
  2811. "type": "object",
  2812. "additionalProperties": {
  2813. "$ref": "#/components/schemas/MCPStatus"
  2814. },
  2815. "description": "MCP server status"
  2816. }
  2817. }
  2818. }
  2819. },
  2820. "400": {
  2821. "description": "Bad request",
  2822. "content": {
  2823. "application/json": {
  2824. "schema": {
  2825. "$ref": "#/components/schemas/BadRequestError"
  2826. }
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2832. "summary": "Get MCP status",
  2833. "x-codeSamples": [
  2834. {
  2835. "lang": "js",
  2836. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2837. }
  2838. ]
  2839. },
  2840. "post": {
  2841. "tags": ["mcp"],
  2842. "operationId": "mcp.add",
  2843. "parameters": [
  2844. {
  2845. "name": "directory",
  2846. "in": "query",
  2847. "schema": {
  2848. "type": "string"
  2849. },
  2850. "required": false
  2851. },
  2852. {
  2853. "name": "workspace",
  2854. "in": "query",
  2855. "schema": {
  2856. "type": "string"
  2857. },
  2858. "required": false
  2859. }
  2860. ],
  2861. "responses": {
  2862. "200": {
  2863. "description": "MCP server added successfully",
  2864. "content": {
  2865. "application/json": {
  2866. "schema": {
  2867. "type": "object",
  2868. "additionalProperties": {
  2869. "$ref": "#/components/schemas/MCPStatus"
  2870. },
  2871. "description": "MCP server added successfully"
  2872. }
  2873. }
  2874. }
  2875. },
  2876. "400": {
  2877. "description": "BadRequest | InvalidRequestError",
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "anyOf": [
  2882. {
  2883. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2884. },
  2885. {
  2886. "$ref": "#/components/schemas/InvalidRequestError"
  2887. }
  2888. ]
  2889. }
  2890. }
  2891. }
  2892. }
  2893. },
  2894. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2895. "summary": "Add MCP server",
  2896. "requestBody": {
  2897. "content": {
  2898. "application/json": {
  2899. "schema": {
  2900. "type": "object",
  2901. "properties": {
  2902. "name": {
  2903. "type": "string"
  2904. },
  2905. "config": {
  2906. "anyOf": [
  2907. {
  2908. "$ref": "#/components/schemas/McpLocalConfig"
  2909. },
  2910. {
  2911. "$ref": "#/components/schemas/McpRemoteConfig"
  2912. }
  2913. ]
  2914. }
  2915. },
  2916. "required": ["name", "config"],
  2917. "additionalProperties": false
  2918. }
  2919. }
  2920. }
  2921. },
  2922. "x-codeSamples": [
  2923. {
  2924. "lang": "js",
  2925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2926. }
  2927. ]
  2928. }
  2929. },
  2930. "/mcp/{name}/auth": {
  2931. "post": {
  2932. "tags": ["mcp"],
  2933. "operationId": "mcp.auth.start",
  2934. "parameters": [
  2935. {
  2936. "name": "name",
  2937. "in": "path",
  2938. "schema": {
  2939. "type": "string"
  2940. },
  2941. "required": true
  2942. },
  2943. {
  2944. "name": "directory",
  2945. "in": "query",
  2946. "schema": {
  2947. "type": "string"
  2948. },
  2949. "required": false
  2950. },
  2951. {
  2952. "name": "workspace",
  2953. "in": "query",
  2954. "schema": {
  2955. "type": "string"
  2956. },
  2957. "required": false
  2958. }
  2959. ],
  2960. "responses": {
  2961. "200": {
  2962. "description": "OAuth flow started",
  2963. "content": {
  2964. "application/json": {
  2965. "schema": {
  2966. "type": "object",
  2967. "properties": {
  2968. "authorizationUrl": {
  2969. "type": "string"
  2970. },
  2971. "oauthState": {
  2972. "type": "string"
  2973. }
  2974. },
  2975. "required": ["authorizationUrl", "oauthState"],
  2976. "additionalProperties": false,
  2977. "description": "OAuth flow started"
  2978. }
  2979. }
  2980. }
  2981. },
  2982. "400": {
  2983. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "anyOf": [
  2988. {
  2989. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2990. },
  2991. {
  2992. "$ref": "#/components/schemas/InvalidRequestError"
  2993. }
  2994. ]
  2995. }
  2996. }
  2997. }
  2998. },
  2999. "404": {
  3000. "description": "McpServerNotFoundError",
  3001. "content": {
  3002. "application/json": {
  3003. "schema": {
  3004. "$ref": "#/components/schemas/McpServerNotFoundError"
  3005. }
  3006. }
  3007. }
  3008. }
  3009. },
  3010. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3011. "summary": "Start MCP OAuth",
  3012. "x-codeSamples": [
  3013. {
  3014. "lang": "js",
  3015. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3016. }
  3017. ]
  3018. },
  3019. "delete": {
  3020. "tags": ["mcp"],
  3021. "operationId": "mcp.auth.remove",
  3022. "parameters": [
  3023. {
  3024. "name": "name",
  3025. "in": "path",
  3026. "schema": {
  3027. "type": "string"
  3028. },
  3029. "required": true
  3030. },
  3031. {
  3032. "name": "directory",
  3033. "in": "query",
  3034. "schema": {
  3035. "type": "string"
  3036. },
  3037. "required": false
  3038. },
  3039. {
  3040. "name": "workspace",
  3041. "in": "query",
  3042. "schema": {
  3043. "type": "string"
  3044. },
  3045. "required": false
  3046. }
  3047. ],
  3048. "responses": {
  3049. "200": {
  3050. "description": "OAuth credentials removed",
  3051. "content": {
  3052. "application/json": {
  3053. "schema": {
  3054. "type": "object",
  3055. "properties": {
  3056. "success": {
  3057. "type": "boolean",
  3058. "enum": [true]
  3059. }
  3060. },
  3061. "required": ["success"],
  3062. "additionalProperties": false,
  3063. "description": "OAuth credentials removed"
  3064. }
  3065. }
  3066. }
  3067. },
  3068. "400": {
  3069. "description": "Bad request",
  3070. "content": {
  3071. "application/json": {
  3072. "schema": {
  3073. "$ref": "#/components/schemas/BadRequestError"
  3074. }
  3075. }
  3076. }
  3077. },
  3078. "404": {
  3079. "description": "McpServerNotFoundError",
  3080. "content": {
  3081. "application/json": {
  3082. "schema": {
  3083. "$ref": "#/components/schemas/McpServerNotFoundError"
  3084. }
  3085. }
  3086. }
  3087. }
  3088. },
  3089. "description": "Remove OAuth credentials for an MCP server.",
  3090. "summary": "Remove MCP OAuth",
  3091. "x-codeSamples": [
  3092. {
  3093. "lang": "js",
  3094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3095. }
  3096. ]
  3097. }
  3098. },
  3099. "/mcp/{name}/auth/callback": {
  3100. "post": {
  3101. "tags": ["mcp"],
  3102. "operationId": "mcp.auth.callback",
  3103. "parameters": [
  3104. {
  3105. "name": "name",
  3106. "in": "path",
  3107. "schema": {
  3108. "type": "string"
  3109. },
  3110. "required": true
  3111. },
  3112. {
  3113. "name": "directory",
  3114. "in": "query",
  3115. "schema": {
  3116. "type": "string"
  3117. },
  3118. "required": false
  3119. },
  3120. {
  3121. "name": "workspace",
  3122. "in": "query",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": false
  3127. }
  3128. ],
  3129. "responses": {
  3130. "200": {
  3131. "description": "OAuth authentication completed",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/MCPStatus"
  3136. }
  3137. }
  3138. }
  3139. },
  3140. "400": {
  3141. "description": "BadRequest | InvalidRequestError",
  3142. "content": {
  3143. "application/json": {
  3144. "schema": {
  3145. "anyOf": [
  3146. {
  3147. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3148. },
  3149. {
  3150. "$ref": "#/components/schemas/InvalidRequestError"
  3151. }
  3152. ]
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "404": {
  3158. "description": "McpServerNotFoundError",
  3159. "content": {
  3160. "application/json": {
  3161. "schema": {
  3162. "$ref": "#/components/schemas/McpServerNotFoundError"
  3163. }
  3164. }
  3165. }
  3166. }
  3167. },
  3168. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3169. "summary": "Complete MCP OAuth",
  3170. "requestBody": {
  3171. "content": {
  3172. "application/json": {
  3173. "schema": {
  3174. "type": "object",
  3175. "properties": {
  3176. "code": {
  3177. "type": "string"
  3178. }
  3179. },
  3180. "required": ["code"],
  3181. "additionalProperties": false
  3182. }
  3183. }
  3184. }
  3185. },
  3186. "x-codeSamples": [
  3187. {
  3188. "lang": "js",
  3189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3190. }
  3191. ]
  3192. }
  3193. },
  3194. "/mcp/{name}/auth/authenticate": {
  3195. "post": {
  3196. "tags": ["mcp"],
  3197. "operationId": "mcp.auth.authenticate",
  3198. "parameters": [
  3199. {
  3200. "name": "name",
  3201. "in": "path",
  3202. "schema": {
  3203. "type": "string"
  3204. },
  3205. "required": true
  3206. },
  3207. {
  3208. "name": "directory",
  3209. "in": "query",
  3210. "schema": {
  3211. "type": "string"
  3212. },
  3213. "required": false
  3214. },
  3215. {
  3216. "name": "workspace",
  3217. "in": "query",
  3218. "schema": {
  3219. "type": "string"
  3220. },
  3221. "required": false
  3222. }
  3223. ],
  3224. "responses": {
  3225. "200": {
  3226. "description": "OAuth authentication completed",
  3227. "content": {
  3228. "application/json": {
  3229. "schema": {
  3230. "$ref": "#/components/schemas/MCPStatus"
  3231. }
  3232. }
  3233. }
  3234. },
  3235. "400": {
  3236. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3237. "content": {
  3238. "application/json": {
  3239. "schema": {
  3240. "anyOf": [
  3241. {
  3242. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3243. },
  3244. {
  3245. "$ref": "#/components/schemas/InvalidRequestError"
  3246. }
  3247. ]
  3248. }
  3249. }
  3250. }
  3251. },
  3252. "404": {
  3253. "description": "McpServerNotFoundError",
  3254. "content": {
  3255. "application/json": {
  3256. "schema": {
  3257. "$ref": "#/components/schemas/McpServerNotFoundError"
  3258. }
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "description": "Start OAuth flow and wait for callback (opens browser).",
  3264. "summary": "Authenticate MCP OAuth",
  3265. "x-codeSamples": [
  3266. {
  3267. "lang": "js",
  3268. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3269. }
  3270. ]
  3271. }
  3272. },
  3273. "/mcp/{name}/connect": {
  3274. "post": {
  3275. "tags": ["mcp"],
  3276. "operationId": "mcp.connect",
  3277. "parameters": [
  3278. {
  3279. "name": "name",
  3280. "in": "path",
  3281. "schema": {
  3282. "type": "string"
  3283. },
  3284. "required": true
  3285. },
  3286. {
  3287. "name": "directory",
  3288. "in": "query",
  3289. "schema": {
  3290. "type": "string"
  3291. },
  3292. "required": false
  3293. },
  3294. {
  3295. "name": "workspace",
  3296. "in": "query",
  3297. "schema": {
  3298. "type": "string"
  3299. },
  3300. "required": false
  3301. }
  3302. ],
  3303. "responses": {
  3304. "200": {
  3305. "description": "MCP server connected successfully",
  3306. "content": {
  3307. "application/json": {
  3308. "schema": {
  3309. "type": "boolean",
  3310. "description": "MCP server connected successfully"
  3311. }
  3312. }
  3313. }
  3314. },
  3315. "400": {
  3316. "description": "Bad request",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/BadRequestError"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "404": {
  3326. "description": "McpServerNotFoundError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "$ref": "#/components/schemas/McpServerNotFoundError"
  3331. }
  3332. }
  3333. }
  3334. }
  3335. },
  3336. "description": "Connect an MCP server.",
  3337. "x-codeSamples": [
  3338. {
  3339. "lang": "js",
  3340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3341. }
  3342. ]
  3343. }
  3344. },
  3345. "/mcp/{name}/disconnect": {
  3346. "post": {
  3347. "tags": ["mcp"],
  3348. "operationId": "mcp.disconnect",
  3349. "parameters": [
  3350. {
  3351. "name": "name",
  3352. "in": "path",
  3353. "schema": {
  3354. "type": "string"
  3355. },
  3356. "required": true
  3357. },
  3358. {
  3359. "name": "directory",
  3360. "in": "query",
  3361. "schema": {
  3362. "type": "string"
  3363. },
  3364. "required": false
  3365. },
  3366. {
  3367. "name": "workspace",
  3368. "in": "query",
  3369. "schema": {
  3370. "type": "string"
  3371. },
  3372. "required": false
  3373. }
  3374. ],
  3375. "responses": {
  3376. "200": {
  3377. "description": "MCP server disconnected successfully",
  3378. "content": {
  3379. "application/json": {
  3380. "schema": {
  3381. "type": "boolean",
  3382. "description": "MCP server disconnected successfully"
  3383. }
  3384. }
  3385. }
  3386. },
  3387. "400": {
  3388. "description": "Bad request",
  3389. "content": {
  3390. "application/json": {
  3391. "schema": {
  3392. "$ref": "#/components/schemas/BadRequestError"
  3393. }
  3394. }
  3395. }
  3396. },
  3397. "404": {
  3398. "description": "McpServerNotFoundError",
  3399. "content": {
  3400. "application/json": {
  3401. "schema": {
  3402. "$ref": "#/components/schemas/McpServerNotFoundError"
  3403. }
  3404. }
  3405. }
  3406. }
  3407. },
  3408. "description": "Disconnect an MCP server.",
  3409. "x-codeSamples": [
  3410. {
  3411. "lang": "js",
  3412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3413. }
  3414. ]
  3415. }
  3416. },
  3417. "/project": {
  3418. "get": {
  3419. "tags": ["project"],
  3420. "operationId": "project.list",
  3421. "parameters": [
  3422. {
  3423. "name": "directory",
  3424. "in": "query",
  3425. "schema": {
  3426. "type": "string"
  3427. },
  3428. "required": false
  3429. },
  3430. {
  3431. "name": "workspace",
  3432. "in": "query",
  3433. "schema": {
  3434. "type": "string"
  3435. },
  3436. "required": false
  3437. }
  3438. ],
  3439. "responses": {
  3440. "200": {
  3441. "description": "List of projects",
  3442. "content": {
  3443. "application/json": {
  3444. "schema": {
  3445. "type": "array",
  3446. "items": {
  3447. "$ref": "#/components/schemas/Project"
  3448. },
  3449. "description": "List of projects"
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "400": {
  3455. "description": "Bad request",
  3456. "content": {
  3457. "application/json": {
  3458. "schema": {
  3459. "$ref": "#/components/schemas/BadRequestError"
  3460. }
  3461. }
  3462. }
  3463. }
  3464. },
  3465. "description": "Get a list of projects that have been opened with OpenCode.",
  3466. "summary": "List all projects",
  3467. "x-codeSamples": [
  3468. {
  3469. "lang": "js",
  3470. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3471. }
  3472. ]
  3473. }
  3474. },
  3475. "/project/current": {
  3476. "get": {
  3477. "tags": ["project"],
  3478. "operationId": "project.current",
  3479. "parameters": [
  3480. {
  3481. "name": "directory",
  3482. "in": "query",
  3483. "schema": {
  3484. "type": "string"
  3485. },
  3486. "required": false
  3487. },
  3488. {
  3489. "name": "workspace",
  3490. "in": "query",
  3491. "schema": {
  3492. "type": "string"
  3493. },
  3494. "required": false
  3495. }
  3496. ],
  3497. "responses": {
  3498. "200": {
  3499. "description": "Current project information",
  3500. "content": {
  3501. "application/json": {
  3502. "schema": {
  3503. "$ref": "#/components/schemas/Project"
  3504. }
  3505. }
  3506. }
  3507. },
  3508. "400": {
  3509. "description": "Bad request",
  3510. "content": {
  3511. "application/json": {
  3512. "schema": {
  3513. "$ref": "#/components/schemas/BadRequestError"
  3514. }
  3515. }
  3516. }
  3517. }
  3518. },
  3519. "description": "Retrieve the currently active project that OpenCode is working with.",
  3520. "summary": "Get current project",
  3521. "x-codeSamples": [
  3522. {
  3523. "lang": "js",
  3524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3525. }
  3526. ]
  3527. }
  3528. },
  3529. "/project/git/init": {
  3530. "post": {
  3531. "tags": ["project"],
  3532. "operationId": "project.initGit",
  3533. "parameters": [
  3534. {
  3535. "name": "directory",
  3536. "in": "query",
  3537. "schema": {
  3538. "type": "string"
  3539. },
  3540. "required": false
  3541. },
  3542. {
  3543. "name": "workspace",
  3544. "in": "query",
  3545. "schema": {
  3546. "type": "string"
  3547. },
  3548. "required": false
  3549. }
  3550. ],
  3551. "responses": {
  3552. "200": {
  3553. "description": "Project information after git initialization",
  3554. "content": {
  3555. "application/json": {
  3556. "schema": {
  3557. "$ref": "#/components/schemas/Project"
  3558. }
  3559. }
  3560. }
  3561. },
  3562. "400": {
  3563. "description": "Bad request",
  3564. "content": {
  3565. "application/json": {
  3566. "schema": {
  3567. "$ref": "#/components/schemas/BadRequestError"
  3568. }
  3569. }
  3570. }
  3571. }
  3572. },
  3573. "description": "Create a git repository for the current project and return the refreshed project info.",
  3574. "summary": "Initialize git repository",
  3575. "x-codeSamples": [
  3576. {
  3577. "lang": "js",
  3578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3579. }
  3580. ]
  3581. }
  3582. },
  3583. "/project/{projectID}": {
  3584. "patch": {
  3585. "tags": ["project"],
  3586. "operationId": "project.update",
  3587. "parameters": [
  3588. {
  3589. "name": "projectID",
  3590. "in": "path",
  3591. "schema": {
  3592. "type": "string"
  3593. },
  3594. "required": true
  3595. },
  3596. {
  3597. "name": "directory",
  3598. "in": "query",
  3599. "schema": {
  3600. "type": "string"
  3601. },
  3602. "required": false
  3603. },
  3604. {
  3605. "name": "workspace",
  3606. "in": "query",
  3607. "schema": {
  3608. "type": "string"
  3609. },
  3610. "required": false
  3611. }
  3612. ],
  3613. "responses": {
  3614. "200": {
  3615. "description": "Updated project information",
  3616. "content": {
  3617. "application/json": {
  3618. "schema": {
  3619. "$ref": "#/components/schemas/Project"
  3620. }
  3621. }
  3622. }
  3623. },
  3624. "400": {
  3625. "description": "BadRequest | InvalidRequestError",
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "anyOf": [
  3630. {
  3631. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3632. },
  3633. {
  3634. "$ref": "#/components/schemas/InvalidRequestError"
  3635. }
  3636. ]
  3637. }
  3638. }
  3639. }
  3640. },
  3641. "404": {
  3642. "description": "ProjectNotFoundError",
  3643. "content": {
  3644. "application/json": {
  3645. "schema": {
  3646. "$ref": "#/components/schemas/ProjectNotFoundError"
  3647. }
  3648. }
  3649. }
  3650. }
  3651. },
  3652. "description": "Update project properties such as name, icon, and commands.",
  3653. "summary": "Update project",
  3654. "requestBody": {
  3655. "content": {
  3656. "application/json": {
  3657. "schema": {
  3658. "type": "object",
  3659. "properties": {
  3660. "name": {
  3661. "type": "string"
  3662. },
  3663. "icon": {
  3664. "type": "object",
  3665. "properties": {
  3666. "url": {
  3667. "type": "string"
  3668. },
  3669. "override": {
  3670. "type": "string"
  3671. },
  3672. "color": {
  3673. "type": "string"
  3674. }
  3675. },
  3676. "additionalProperties": false
  3677. },
  3678. "commands": {
  3679. "type": "object",
  3680. "properties": {
  3681. "start": {
  3682. "type": "string",
  3683. "description": "Startup script to run when creating a new workspace (worktree)"
  3684. }
  3685. },
  3686. "additionalProperties": false
  3687. }
  3688. },
  3689. "additionalProperties": false
  3690. }
  3691. }
  3692. }
  3693. },
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/project/{projectID}/directories": {
  3703. "get": {
  3704. "tags": ["project"],
  3705. "operationId": "project.directories",
  3706. "parameters": [
  3707. {
  3708. "name": "projectID",
  3709. "in": "path",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": true
  3714. },
  3715. {
  3716. "name": "directory",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. },
  3723. {
  3724. "name": "workspace",
  3725. "in": "query",
  3726. "schema": {
  3727. "type": "string"
  3728. },
  3729. "required": false
  3730. }
  3731. ],
  3732. "responses": {
  3733. "200": {
  3734. "description": "Project directories",
  3735. "content": {
  3736. "application/json": {
  3737. "schema": {
  3738. "$ref": "#/components/schemas/ProjectDirectories"
  3739. }
  3740. }
  3741. }
  3742. },
  3743. "400": {
  3744. "description": "Bad request",
  3745. "content": {
  3746. "application/json": {
  3747. "schema": {
  3748. "$ref": "#/components/schemas/BadRequestError"
  3749. }
  3750. }
  3751. }
  3752. }
  3753. },
  3754. "description": "List known local absolute directories for a project.",
  3755. "summary": "List project directories",
  3756. "x-codeSamples": [
  3757. {
  3758. "lang": "js",
  3759. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3760. }
  3761. ]
  3762. }
  3763. },
  3764. "/experimental/project/{projectID}/copy": {
  3765. "post": {
  3766. "tags": ["projectCopy"],
  3767. "operationId": "experimental.projectCopy.create",
  3768. "parameters": [
  3769. {
  3770. "name": "projectID",
  3771. "in": "path",
  3772. "schema": {
  3773. "type": "string"
  3774. },
  3775. "required": true
  3776. },
  3777. {
  3778. "name": "directory",
  3779. "in": "query",
  3780. "schema": {
  3781. "type": "string"
  3782. },
  3783. "required": false
  3784. },
  3785. {
  3786. "name": "workspace",
  3787. "in": "query",
  3788. "schema": {
  3789. "type": "string"
  3790. },
  3791. "required": false
  3792. }
  3793. ],
  3794. "responses": {
  3795. "200": {
  3796. "description": "Project copy created",
  3797. "content": {
  3798. "application/json": {
  3799. "schema": {
  3800. "$ref": "#/components/schemas/ProjectCopyCopy"
  3801. }
  3802. }
  3803. }
  3804. },
  3805. "400": {
  3806. "description": "BadRequest | InvalidRequestError",
  3807. "content": {
  3808. "application/json": {
  3809. "schema": {
  3810. "anyOf": [
  3811. {
  3812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3813. },
  3814. {
  3815. "$ref": "#/components/schemas/InvalidRequestError"
  3816. }
  3817. ]
  3818. }
  3819. }
  3820. }
  3821. }
  3822. },
  3823. "description": "Create a local physical copy of a project using the selected strategy.",
  3824. "summary": "Create project copy",
  3825. "requestBody": {
  3826. "content": {
  3827. "application/json": {
  3828. "schema": {
  3829. "type": "object",
  3830. "properties": {
  3831. "strategy": {
  3832. "type": "string",
  3833. "enum": ["git_worktree"]
  3834. },
  3835. "directory": {
  3836. "type": "string"
  3837. }
  3838. },
  3839. "required": ["strategy", "directory"],
  3840. "additionalProperties": false
  3841. }
  3842. }
  3843. }
  3844. },
  3845. "x-codeSamples": [
  3846. {
  3847. "lang": "js",
  3848. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3849. }
  3850. ]
  3851. },
  3852. "delete": {
  3853. "tags": ["projectCopy"],
  3854. "operationId": "experimental.projectCopy.remove",
  3855. "parameters": [
  3856. {
  3857. "name": "projectID",
  3858. "in": "path",
  3859. "schema": {
  3860. "type": "string"
  3861. },
  3862. "required": true
  3863. },
  3864. {
  3865. "name": "directory",
  3866. "in": "query",
  3867. "schema": {
  3868. "type": "string"
  3869. },
  3870. "required": false
  3871. },
  3872. {
  3873. "name": "workspace",
  3874. "in": "query",
  3875. "schema": {
  3876. "type": "string"
  3877. },
  3878. "required": false
  3879. }
  3880. ],
  3881. "responses": {
  3882. "204": {
  3883. "description": "Project copy removed"
  3884. },
  3885. "400": {
  3886. "description": "BadRequest | InvalidRequestError",
  3887. "content": {
  3888. "application/json": {
  3889. "schema": {
  3890. "anyOf": [
  3891. {
  3892. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3893. },
  3894. {
  3895. "$ref": "#/components/schemas/InvalidRequestError"
  3896. }
  3897. ]
  3898. }
  3899. }
  3900. }
  3901. }
  3902. },
  3903. "description": "Remove a local physical copy of a project using the selected strategy.",
  3904. "summary": "Remove project copy",
  3905. "requestBody": {
  3906. "content": {
  3907. "application/json": {
  3908. "schema": {
  3909. "type": "object",
  3910. "properties": {
  3911. "directory": {
  3912. "type": "string"
  3913. }
  3914. },
  3915. "required": ["directory"],
  3916. "additionalProperties": false
  3917. }
  3918. }
  3919. }
  3920. },
  3921. "x-codeSamples": [
  3922. {
  3923. "lang": "js",
  3924. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  3925. }
  3926. ]
  3927. }
  3928. },
  3929. "/experimental/project/{projectID}/copy/refresh": {
  3930. "post": {
  3931. "tags": ["projectCopy"],
  3932. "operationId": "experimental.projectCopy.refresh",
  3933. "parameters": [
  3934. {
  3935. "name": "projectID",
  3936. "in": "path",
  3937. "schema": {
  3938. "type": "string"
  3939. },
  3940. "required": true
  3941. },
  3942. {
  3943. "name": "directory",
  3944. "in": "query",
  3945. "schema": {
  3946. "type": "string"
  3947. },
  3948. "required": false
  3949. },
  3950. {
  3951. "name": "workspace",
  3952. "in": "query",
  3953. "schema": {
  3954. "type": "string"
  3955. },
  3956. "required": false
  3957. }
  3958. ],
  3959. "responses": {
  3960. "204": {
  3961. "description": "Project copies refreshed"
  3962. },
  3963. "400": {
  3964. "description": "BadRequest | InvalidRequestError",
  3965. "content": {
  3966. "application/json": {
  3967. "schema": {
  3968. "anyOf": [
  3969. {
  3970. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3971. },
  3972. {
  3973. "$ref": "#/components/schemas/InvalidRequestError"
  3974. }
  3975. ]
  3976. }
  3977. }
  3978. }
  3979. }
  3980. },
  3981. "description": "Discover local project copies using one or all configured strategies.",
  3982. "summary": "Refresh project copies",
  3983. "x-codeSamples": [
  3984. {
  3985. "lang": "js",
  3986. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  3987. }
  3988. ]
  3989. }
  3990. },
  3991. "/pty/shells": {
  3992. "get": {
  3993. "tags": ["pty"],
  3994. "operationId": "pty.shells",
  3995. "parameters": [
  3996. {
  3997. "name": "directory",
  3998. "in": "query",
  3999. "schema": {
  4000. "type": "string"
  4001. },
  4002. "required": false
  4003. },
  4004. {
  4005. "name": "workspace",
  4006. "in": "query",
  4007. "schema": {
  4008. "type": "string"
  4009. },
  4010. "required": false
  4011. }
  4012. ],
  4013. "responses": {
  4014. "200": {
  4015. "description": "List of shells",
  4016. "content": {
  4017. "application/json": {
  4018. "schema": {
  4019. "type": "array",
  4020. "items": {
  4021. "type": "object",
  4022. "properties": {
  4023. "path": {
  4024. "type": "string"
  4025. },
  4026. "name": {
  4027. "type": "string"
  4028. },
  4029. "acceptable": {
  4030. "type": "boolean"
  4031. }
  4032. },
  4033. "required": ["path", "name", "acceptable"],
  4034. "additionalProperties": false
  4035. },
  4036. "description": "List of shells"
  4037. }
  4038. }
  4039. }
  4040. },
  4041. "400": {
  4042. "description": "Bad request",
  4043. "content": {
  4044. "application/json": {
  4045. "schema": {
  4046. "$ref": "#/components/schemas/BadRequestError"
  4047. }
  4048. }
  4049. }
  4050. }
  4051. },
  4052. "description": "Get a list of available shells on the system.",
  4053. "summary": "List available shells",
  4054. "x-codeSamples": [
  4055. {
  4056. "lang": "js",
  4057. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4058. }
  4059. ]
  4060. }
  4061. },
  4062. "/pty": {
  4063. "get": {
  4064. "tags": ["pty"],
  4065. "operationId": "pty.list",
  4066. "parameters": [
  4067. {
  4068. "name": "directory",
  4069. "in": "query",
  4070. "schema": {
  4071. "type": "string"
  4072. },
  4073. "required": false
  4074. },
  4075. {
  4076. "name": "workspace",
  4077. "in": "query",
  4078. "schema": {
  4079. "type": "string"
  4080. },
  4081. "required": false
  4082. }
  4083. ],
  4084. "responses": {
  4085. "200": {
  4086. "description": "List of sessions",
  4087. "content": {
  4088. "application/json": {
  4089. "schema": {
  4090. "type": "array",
  4091. "items": {
  4092. "$ref": "#/components/schemas/Pty"
  4093. },
  4094. "description": "List of sessions"
  4095. }
  4096. }
  4097. }
  4098. },
  4099. "400": {
  4100. "description": "Bad request",
  4101. "content": {
  4102. "application/json": {
  4103. "schema": {
  4104. "$ref": "#/components/schemas/BadRequestError"
  4105. }
  4106. }
  4107. }
  4108. }
  4109. },
  4110. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4111. "summary": "List PTY sessions",
  4112. "x-codeSamples": [
  4113. {
  4114. "lang": "js",
  4115. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4116. }
  4117. ]
  4118. },
  4119. "post": {
  4120. "tags": ["pty"],
  4121. "operationId": "pty.create",
  4122. "parameters": [
  4123. {
  4124. "name": "directory",
  4125. "in": "query",
  4126. "schema": {
  4127. "type": "string"
  4128. },
  4129. "required": false
  4130. },
  4131. {
  4132. "name": "workspace",
  4133. "in": "query",
  4134. "schema": {
  4135. "type": "string"
  4136. },
  4137. "required": false
  4138. }
  4139. ],
  4140. "responses": {
  4141. "200": {
  4142. "description": "Created session",
  4143. "content": {
  4144. "application/json": {
  4145. "schema": {
  4146. "$ref": "#/components/schemas/Pty"
  4147. }
  4148. }
  4149. }
  4150. },
  4151. "400": {
  4152. "description": "BadRequest | InvalidRequestError",
  4153. "content": {
  4154. "application/json": {
  4155. "schema": {
  4156. "anyOf": [
  4157. {
  4158. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4159. },
  4160. {
  4161. "$ref": "#/components/schemas/InvalidRequestError"
  4162. }
  4163. ]
  4164. }
  4165. }
  4166. }
  4167. }
  4168. },
  4169. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4170. "summary": "Create PTY session",
  4171. "requestBody": {
  4172. "content": {
  4173. "application/json": {
  4174. "schema": {
  4175. "type": "object",
  4176. "properties": {
  4177. "command": {
  4178. "type": "string"
  4179. },
  4180. "args": {
  4181. "type": "array",
  4182. "items": {
  4183. "type": "string"
  4184. }
  4185. },
  4186. "cwd": {
  4187. "type": "string"
  4188. },
  4189. "title": {
  4190. "type": "string"
  4191. },
  4192. "env": {
  4193. "type": "object",
  4194. "additionalProperties": {
  4195. "type": "string"
  4196. }
  4197. }
  4198. },
  4199. "additionalProperties": false
  4200. }
  4201. }
  4202. }
  4203. },
  4204. "x-codeSamples": [
  4205. {
  4206. "lang": "js",
  4207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4208. }
  4209. ]
  4210. }
  4211. },
  4212. "/pty/{ptyID}": {
  4213. "get": {
  4214. "tags": ["pty"],
  4215. "operationId": "pty.get",
  4216. "parameters": [
  4217. {
  4218. "name": "ptyID",
  4219. "in": "path",
  4220. "schema": {
  4221. "type": "string",
  4222. "pattern": "^pty"
  4223. },
  4224. "required": true
  4225. },
  4226. {
  4227. "name": "directory",
  4228. "in": "query",
  4229. "schema": {
  4230. "type": "string"
  4231. },
  4232. "required": false
  4233. },
  4234. {
  4235. "name": "workspace",
  4236. "in": "query",
  4237. "schema": {
  4238. "type": "string"
  4239. },
  4240. "required": false
  4241. }
  4242. ],
  4243. "responses": {
  4244. "200": {
  4245. "description": "Session info",
  4246. "content": {
  4247. "application/json": {
  4248. "schema": {
  4249. "$ref": "#/components/schemas/Pty"
  4250. }
  4251. }
  4252. }
  4253. },
  4254. "400": {
  4255. "description": "Bad request",
  4256. "content": {
  4257. "application/json": {
  4258. "schema": {
  4259. "$ref": "#/components/schemas/BadRequestError"
  4260. }
  4261. }
  4262. }
  4263. },
  4264. "404": {
  4265. "description": "PtyNotFoundError",
  4266. "content": {
  4267. "application/json": {
  4268. "schema": {
  4269. "$ref": "#/components/schemas/PtyNotFoundError"
  4270. }
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4276. "summary": "Get PTY session",
  4277. "x-codeSamples": [
  4278. {
  4279. "lang": "js",
  4280. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4281. }
  4282. ]
  4283. },
  4284. "put": {
  4285. "tags": ["pty"],
  4286. "operationId": "pty.update",
  4287. "parameters": [
  4288. {
  4289. "name": "ptyID",
  4290. "in": "path",
  4291. "schema": {
  4292. "type": "string",
  4293. "pattern": "^pty"
  4294. },
  4295. "required": true
  4296. },
  4297. {
  4298. "name": "directory",
  4299. "in": "query",
  4300. "schema": {
  4301. "type": "string"
  4302. },
  4303. "required": false
  4304. },
  4305. {
  4306. "name": "workspace",
  4307. "in": "query",
  4308. "schema": {
  4309. "type": "string"
  4310. },
  4311. "required": false
  4312. }
  4313. ],
  4314. "responses": {
  4315. "200": {
  4316. "description": "Updated session",
  4317. "content": {
  4318. "application/json": {
  4319. "schema": {
  4320. "$ref": "#/components/schemas/Pty"
  4321. }
  4322. }
  4323. }
  4324. },
  4325. "400": {
  4326. "description": "BadRequest | InvalidRequestError",
  4327. "content": {
  4328. "application/json": {
  4329. "schema": {
  4330. "anyOf": [
  4331. {
  4332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4333. },
  4334. {
  4335. "$ref": "#/components/schemas/InvalidRequestError"
  4336. }
  4337. ]
  4338. }
  4339. }
  4340. }
  4341. },
  4342. "404": {
  4343. "description": "PtyNotFoundError",
  4344. "content": {
  4345. "application/json": {
  4346. "schema": {
  4347. "$ref": "#/components/schemas/PtyNotFoundError"
  4348. }
  4349. }
  4350. }
  4351. }
  4352. },
  4353. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4354. "summary": "Update PTY session",
  4355. "requestBody": {
  4356. "content": {
  4357. "application/json": {
  4358. "schema": {
  4359. "type": "object",
  4360. "properties": {
  4361. "title": {
  4362. "type": "string"
  4363. },
  4364. "size": {
  4365. "type": "object",
  4366. "properties": {
  4367. "rows": {
  4368. "type": "integer",
  4369. "exclusiveMinimum": 0
  4370. },
  4371. "cols": {
  4372. "type": "integer",
  4373. "exclusiveMinimum": 0
  4374. }
  4375. },
  4376. "required": ["rows", "cols"],
  4377. "additionalProperties": false
  4378. }
  4379. },
  4380. "additionalProperties": false
  4381. }
  4382. }
  4383. }
  4384. },
  4385. "x-codeSamples": [
  4386. {
  4387. "lang": "js",
  4388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4389. }
  4390. ]
  4391. },
  4392. "delete": {
  4393. "tags": ["pty"],
  4394. "operationId": "pty.remove",
  4395. "parameters": [
  4396. {
  4397. "name": "ptyID",
  4398. "in": "path",
  4399. "schema": {
  4400. "type": "string",
  4401. "pattern": "^pty"
  4402. },
  4403. "required": true
  4404. },
  4405. {
  4406. "name": "directory",
  4407. "in": "query",
  4408. "schema": {
  4409. "type": "string"
  4410. },
  4411. "required": false
  4412. },
  4413. {
  4414. "name": "workspace",
  4415. "in": "query",
  4416. "schema": {
  4417. "type": "string"
  4418. },
  4419. "required": false
  4420. }
  4421. ],
  4422. "responses": {
  4423. "200": {
  4424. "description": "Session removed",
  4425. "content": {
  4426. "application/json": {
  4427. "schema": {
  4428. "type": "boolean",
  4429. "description": "Session removed"
  4430. }
  4431. }
  4432. }
  4433. },
  4434. "400": {
  4435. "description": "Bad request",
  4436. "content": {
  4437. "application/json": {
  4438. "schema": {
  4439. "$ref": "#/components/schemas/BadRequestError"
  4440. }
  4441. }
  4442. }
  4443. },
  4444. "404": {
  4445. "description": "PtyNotFoundError",
  4446. "content": {
  4447. "application/json": {
  4448. "schema": {
  4449. "$ref": "#/components/schemas/PtyNotFoundError"
  4450. }
  4451. }
  4452. }
  4453. }
  4454. },
  4455. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4456. "summary": "Remove PTY session",
  4457. "x-codeSamples": [
  4458. {
  4459. "lang": "js",
  4460. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4461. }
  4462. ]
  4463. }
  4464. },
  4465. "/pty/{ptyID}/connect-token": {
  4466. "post": {
  4467. "tags": ["pty"],
  4468. "operationId": "pty.connectToken",
  4469. "parameters": [
  4470. {
  4471. "name": "ptyID",
  4472. "in": "path",
  4473. "schema": {
  4474. "type": "string",
  4475. "pattern": "^pty"
  4476. },
  4477. "required": true
  4478. },
  4479. {
  4480. "name": "directory",
  4481. "in": "query",
  4482. "schema": {
  4483. "type": "string"
  4484. },
  4485. "required": false
  4486. },
  4487. {
  4488. "name": "workspace",
  4489. "in": "query",
  4490. "schema": {
  4491. "type": "string"
  4492. },
  4493. "required": false
  4494. }
  4495. ],
  4496. "responses": {
  4497. "200": {
  4498. "description": "WebSocket connect token",
  4499. "content": {
  4500. "application/json": {
  4501. "schema": {
  4502. "type": "object",
  4503. "properties": {
  4504. "ticket": {
  4505. "type": "string"
  4506. },
  4507. "expires_in": {
  4508. "type": "integer",
  4509. "exclusiveMinimum": 0
  4510. }
  4511. },
  4512. "required": ["ticket", "expires_in"],
  4513. "additionalProperties": false,
  4514. "description": "WebSocket connect token"
  4515. }
  4516. }
  4517. }
  4518. },
  4519. "400": {
  4520. "description": "Bad request",
  4521. "content": {
  4522. "application/json": {
  4523. "schema": {
  4524. "$ref": "#/components/schemas/BadRequestError"
  4525. }
  4526. }
  4527. }
  4528. },
  4529. "403": {
  4530. "description": "PtyForbiddenError",
  4531. "content": {
  4532. "application/json": {
  4533. "schema": {
  4534. "$ref": "#/components/schemas/PtyForbiddenError"
  4535. }
  4536. }
  4537. }
  4538. },
  4539. "404": {
  4540. "description": "PtyNotFoundError",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "$ref": "#/components/schemas/PtyNotFoundError"
  4545. }
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4551. "summary": "Create PTY WebSocket token",
  4552. "x-codeSamples": [
  4553. {
  4554. "lang": "js",
  4555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4556. }
  4557. ]
  4558. }
  4559. },
  4560. "/question": {
  4561. "get": {
  4562. "tags": ["question"],
  4563. "operationId": "question.list",
  4564. "parameters": [
  4565. {
  4566. "name": "directory",
  4567. "in": "query",
  4568. "schema": {
  4569. "type": "string"
  4570. },
  4571. "required": false
  4572. },
  4573. {
  4574. "name": "workspace",
  4575. "in": "query",
  4576. "schema": {
  4577. "type": "string"
  4578. },
  4579. "required": false
  4580. }
  4581. ],
  4582. "responses": {
  4583. "200": {
  4584. "description": "List of pending questions",
  4585. "content": {
  4586. "application/json": {
  4587. "schema": {
  4588. "type": "array",
  4589. "items": {
  4590. "$ref": "#/components/schemas/QuestionRequest"
  4591. },
  4592. "description": "List of pending questions"
  4593. }
  4594. }
  4595. }
  4596. },
  4597. "400": {
  4598. "description": "Bad request",
  4599. "content": {
  4600. "application/json": {
  4601. "schema": {
  4602. "$ref": "#/components/schemas/BadRequestError"
  4603. }
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "description": "Get all pending question requests across all sessions.",
  4609. "summary": "List pending questions",
  4610. "x-codeSamples": [
  4611. {
  4612. "lang": "js",
  4613. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4614. }
  4615. ]
  4616. }
  4617. },
  4618. "/question/{requestID}/reply": {
  4619. "post": {
  4620. "tags": ["question"],
  4621. "operationId": "question.reply",
  4622. "parameters": [
  4623. {
  4624. "name": "requestID",
  4625. "in": "path",
  4626. "schema": {
  4627. "type": "string",
  4628. "pattern": "^que"
  4629. },
  4630. "required": true
  4631. },
  4632. {
  4633. "name": "directory",
  4634. "in": "query",
  4635. "schema": {
  4636. "type": "string"
  4637. },
  4638. "required": false
  4639. },
  4640. {
  4641. "name": "workspace",
  4642. "in": "query",
  4643. "schema": {
  4644. "type": "string"
  4645. },
  4646. "required": false
  4647. }
  4648. ],
  4649. "responses": {
  4650. "200": {
  4651. "description": "Question answered successfully",
  4652. "content": {
  4653. "application/json": {
  4654. "schema": {
  4655. "type": "boolean",
  4656. "description": "Question answered successfully"
  4657. }
  4658. }
  4659. }
  4660. },
  4661. "400": {
  4662. "description": "BadRequest | InvalidRequestError",
  4663. "content": {
  4664. "application/json": {
  4665. "schema": {
  4666. "anyOf": [
  4667. {
  4668. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4669. },
  4670. {
  4671. "$ref": "#/components/schemas/InvalidRequestError"
  4672. }
  4673. ]
  4674. }
  4675. }
  4676. }
  4677. },
  4678. "404": {
  4679. "description": "QuestionNotFoundError",
  4680. "content": {
  4681. "application/json": {
  4682. "schema": {
  4683. "$ref": "#/components/schemas/QuestionNotFoundError"
  4684. }
  4685. }
  4686. }
  4687. }
  4688. },
  4689. "description": "Provide answers to a question request from the AI assistant.",
  4690. "summary": "Reply to question request",
  4691. "requestBody": {
  4692. "content": {
  4693. "application/json": {
  4694. "schema": {
  4695. "type": "object",
  4696. "properties": {
  4697. "answers": {
  4698. "type": "array",
  4699. "items": {
  4700. "$ref": "#/components/schemas/QuestionAnswer"
  4701. },
  4702. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4703. }
  4704. },
  4705. "required": ["answers"],
  4706. "additionalProperties": false
  4707. }
  4708. }
  4709. }
  4710. },
  4711. "x-codeSamples": [
  4712. {
  4713. "lang": "js",
  4714. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4715. }
  4716. ]
  4717. }
  4718. },
  4719. "/question/{requestID}/reject": {
  4720. "post": {
  4721. "tags": ["question"],
  4722. "operationId": "question.reject",
  4723. "parameters": [
  4724. {
  4725. "name": "requestID",
  4726. "in": "path",
  4727. "schema": {
  4728. "type": "string",
  4729. "pattern": "^que"
  4730. },
  4731. "required": true
  4732. },
  4733. {
  4734. "name": "directory",
  4735. "in": "query",
  4736. "schema": {
  4737. "type": "string"
  4738. },
  4739. "required": false
  4740. },
  4741. {
  4742. "name": "workspace",
  4743. "in": "query",
  4744. "schema": {
  4745. "type": "string"
  4746. },
  4747. "required": false
  4748. }
  4749. ],
  4750. "responses": {
  4751. "200": {
  4752. "description": "Question rejected successfully",
  4753. "content": {
  4754. "application/json": {
  4755. "schema": {
  4756. "type": "boolean",
  4757. "description": "Question rejected successfully"
  4758. }
  4759. }
  4760. }
  4761. },
  4762. "400": {
  4763. "description": "BadRequest | InvalidRequestError",
  4764. "content": {
  4765. "application/json": {
  4766. "schema": {
  4767. "anyOf": [
  4768. {
  4769. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4770. },
  4771. {
  4772. "$ref": "#/components/schemas/InvalidRequestError"
  4773. }
  4774. ]
  4775. }
  4776. }
  4777. }
  4778. },
  4779. "404": {
  4780. "description": "QuestionNotFoundError",
  4781. "content": {
  4782. "application/json": {
  4783. "schema": {
  4784. "$ref": "#/components/schemas/QuestionNotFoundError"
  4785. }
  4786. }
  4787. }
  4788. }
  4789. },
  4790. "description": "Reject a question request from the AI assistant.",
  4791. "summary": "Reject question request",
  4792. "x-codeSamples": [
  4793. {
  4794. "lang": "js",
  4795. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4796. }
  4797. ]
  4798. }
  4799. },
  4800. "/permission": {
  4801. "get": {
  4802. "tags": ["permission"],
  4803. "operationId": "permission.list",
  4804. "parameters": [
  4805. {
  4806. "name": "directory",
  4807. "in": "query",
  4808. "schema": {
  4809. "type": "string"
  4810. },
  4811. "required": false
  4812. },
  4813. {
  4814. "name": "workspace",
  4815. "in": "query",
  4816. "schema": {
  4817. "type": "string"
  4818. },
  4819. "required": false
  4820. }
  4821. ],
  4822. "responses": {
  4823. "200": {
  4824. "description": "List of pending permissions",
  4825. "content": {
  4826. "application/json": {
  4827. "schema": {
  4828. "type": "array",
  4829. "items": {
  4830. "$ref": "#/components/schemas/PermissionRequest"
  4831. },
  4832. "description": "List of pending permissions"
  4833. }
  4834. }
  4835. }
  4836. },
  4837. "400": {
  4838. "description": "Bad request",
  4839. "content": {
  4840. "application/json": {
  4841. "schema": {
  4842. "$ref": "#/components/schemas/BadRequestError"
  4843. }
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "description": "Get all pending permission requests across all sessions.",
  4849. "summary": "List pending permissions",
  4850. "x-codeSamples": [
  4851. {
  4852. "lang": "js",
  4853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4854. }
  4855. ]
  4856. }
  4857. },
  4858. "/permission/{requestID}/reply": {
  4859. "post": {
  4860. "tags": ["permission"],
  4861. "operationId": "permission.reply",
  4862. "parameters": [
  4863. {
  4864. "name": "requestID",
  4865. "in": "path",
  4866. "schema": {
  4867. "type": "string",
  4868. "pattern": "^per"
  4869. },
  4870. "required": true
  4871. },
  4872. {
  4873. "name": "directory",
  4874. "in": "query",
  4875. "schema": {
  4876. "type": "string"
  4877. },
  4878. "required": false
  4879. },
  4880. {
  4881. "name": "workspace",
  4882. "in": "query",
  4883. "schema": {
  4884. "type": "string"
  4885. },
  4886. "required": false
  4887. }
  4888. ],
  4889. "responses": {
  4890. "200": {
  4891. "description": "Permission processed successfully",
  4892. "content": {
  4893. "application/json": {
  4894. "schema": {
  4895. "type": "boolean",
  4896. "description": "Permission processed successfully"
  4897. }
  4898. }
  4899. }
  4900. },
  4901. "400": {
  4902. "description": "BadRequest | InvalidRequestError",
  4903. "content": {
  4904. "application/json": {
  4905. "schema": {
  4906. "anyOf": [
  4907. {
  4908. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4909. },
  4910. {
  4911. "$ref": "#/components/schemas/InvalidRequestError"
  4912. }
  4913. ]
  4914. }
  4915. }
  4916. }
  4917. },
  4918. "404": {
  4919. "description": "PermissionNotFoundError",
  4920. "content": {
  4921. "application/json": {
  4922. "schema": {
  4923. "$ref": "#/components/schemas/PermissionNotFoundError"
  4924. }
  4925. }
  4926. }
  4927. }
  4928. },
  4929. "description": "Approve or deny a permission request from the AI assistant.",
  4930. "summary": "Respond to permission request",
  4931. "requestBody": {
  4932. "content": {
  4933. "application/json": {
  4934. "schema": {
  4935. "type": "object",
  4936. "properties": {
  4937. "reply": {
  4938. "type": "string",
  4939. "enum": ["once", "always", "reject"]
  4940. },
  4941. "message": {
  4942. "type": "string"
  4943. }
  4944. },
  4945. "required": ["reply"],
  4946. "additionalProperties": false
  4947. }
  4948. }
  4949. }
  4950. },
  4951. "x-codeSamples": [
  4952. {
  4953. "lang": "js",
  4954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4955. }
  4956. ]
  4957. }
  4958. },
  4959. "/provider": {
  4960. "get": {
  4961. "tags": ["provider"],
  4962. "operationId": "provider.list",
  4963. "parameters": [
  4964. {
  4965. "name": "directory",
  4966. "in": "query",
  4967. "schema": {
  4968. "type": "string"
  4969. },
  4970. "required": false
  4971. },
  4972. {
  4973. "name": "workspace",
  4974. "in": "query",
  4975. "schema": {
  4976. "type": "string"
  4977. },
  4978. "required": false
  4979. }
  4980. ],
  4981. "responses": {
  4982. "200": {
  4983. "description": "List of providers",
  4984. "content": {
  4985. "application/json": {
  4986. "schema": {
  4987. "type": "object",
  4988. "properties": {
  4989. "all": {
  4990. "type": "array",
  4991. "items": {
  4992. "$ref": "#/components/schemas/Provider"
  4993. }
  4994. },
  4995. "default": {
  4996. "type": "object",
  4997. "additionalProperties": {
  4998. "type": "string"
  4999. }
  5000. },
  5001. "connected": {
  5002. "type": "array",
  5003. "items": {
  5004. "type": "string"
  5005. }
  5006. }
  5007. },
  5008. "required": ["all", "default", "connected"],
  5009. "additionalProperties": false,
  5010. "description": "List of providers"
  5011. }
  5012. }
  5013. }
  5014. },
  5015. "400": {
  5016. "description": "Bad request",
  5017. "content": {
  5018. "application/json": {
  5019. "schema": {
  5020. "$ref": "#/components/schemas/BadRequestError"
  5021. }
  5022. }
  5023. }
  5024. }
  5025. },
  5026. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5027. "summary": "List providers",
  5028. "x-codeSamples": [
  5029. {
  5030. "lang": "js",
  5031. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5032. }
  5033. ]
  5034. }
  5035. },
  5036. "/provider/auth": {
  5037. "get": {
  5038. "tags": ["provider"],
  5039. "operationId": "provider.auth",
  5040. "parameters": [
  5041. {
  5042. "name": "directory",
  5043. "in": "query",
  5044. "schema": {
  5045. "type": "string"
  5046. },
  5047. "required": false
  5048. },
  5049. {
  5050. "name": "workspace",
  5051. "in": "query",
  5052. "schema": {
  5053. "type": "string"
  5054. },
  5055. "required": false
  5056. }
  5057. ],
  5058. "responses": {
  5059. "200": {
  5060. "description": "Provider auth methods",
  5061. "content": {
  5062. "application/json": {
  5063. "schema": {
  5064. "type": "object",
  5065. "additionalProperties": {
  5066. "type": "array",
  5067. "items": {
  5068. "$ref": "#/components/schemas/ProviderAuthMethod"
  5069. }
  5070. },
  5071. "description": "Provider auth methods"
  5072. }
  5073. }
  5074. }
  5075. },
  5076. "400": {
  5077. "description": "Bad request",
  5078. "content": {
  5079. "application/json": {
  5080. "schema": {
  5081. "$ref": "#/components/schemas/BadRequestError"
  5082. }
  5083. }
  5084. }
  5085. }
  5086. },
  5087. "description": "Retrieve available authentication methods for all AI providers.",
  5088. "summary": "Get provider auth methods",
  5089. "x-codeSamples": [
  5090. {
  5091. "lang": "js",
  5092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5093. }
  5094. ]
  5095. }
  5096. },
  5097. "/provider/{providerID}/oauth/authorize": {
  5098. "post": {
  5099. "tags": ["provider"],
  5100. "operationId": "provider.oauth.authorize",
  5101. "parameters": [
  5102. {
  5103. "name": "providerID",
  5104. "in": "path",
  5105. "schema": {
  5106. "type": "string"
  5107. },
  5108. "required": true
  5109. },
  5110. {
  5111. "name": "directory",
  5112. "in": "query",
  5113. "schema": {
  5114. "type": "string"
  5115. },
  5116. "required": false
  5117. },
  5118. {
  5119. "name": "workspace",
  5120. "in": "query",
  5121. "schema": {
  5122. "type": "string"
  5123. },
  5124. "required": false
  5125. }
  5126. ],
  5127. "responses": {
  5128. "200": {
  5129. "description": "Authorization URL and method",
  5130. "content": {
  5131. "application/json": {
  5132. "schema": {
  5133. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5134. }
  5135. }
  5136. }
  5137. },
  5138. "400": {
  5139. "description": "ProviderAuthError | InvalidRequestError",
  5140. "content": {
  5141. "application/json": {
  5142. "schema": {
  5143. "anyOf": [
  5144. {
  5145. "$ref": "#/components/schemas/ProviderAuthError1"
  5146. },
  5147. {
  5148. "$ref": "#/components/schemas/InvalidRequestError"
  5149. }
  5150. ]
  5151. }
  5152. }
  5153. }
  5154. }
  5155. },
  5156. "description": "Start the OAuth authorization flow for a provider.",
  5157. "summary": "Start OAuth authorization",
  5158. "requestBody": {
  5159. "content": {
  5160. "application/json": {
  5161. "schema": {
  5162. "type": "object",
  5163. "properties": {
  5164. "method": {
  5165. "type": "number",
  5166. "description": "Auth method index"
  5167. },
  5168. "inputs": {
  5169. "type": "object",
  5170. "additionalProperties": {
  5171. "type": "string"
  5172. }
  5173. }
  5174. },
  5175. "required": ["method"],
  5176. "additionalProperties": false
  5177. }
  5178. }
  5179. }
  5180. },
  5181. "x-codeSamples": [
  5182. {
  5183. "lang": "js",
  5184. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5185. }
  5186. ]
  5187. }
  5188. },
  5189. "/provider/{providerID}/oauth/callback": {
  5190. "post": {
  5191. "tags": ["provider"],
  5192. "operationId": "provider.oauth.callback",
  5193. "parameters": [
  5194. {
  5195. "name": "providerID",
  5196. "in": "path",
  5197. "schema": {
  5198. "type": "string"
  5199. },
  5200. "required": true
  5201. },
  5202. {
  5203. "name": "directory",
  5204. "in": "query",
  5205. "schema": {
  5206. "type": "string"
  5207. },
  5208. "required": false
  5209. },
  5210. {
  5211. "name": "workspace",
  5212. "in": "query",
  5213. "schema": {
  5214. "type": "string"
  5215. },
  5216. "required": false
  5217. }
  5218. ],
  5219. "responses": {
  5220. "200": {
  5221. "description": "OAuth callback processed successfully",
  5222. "content": {
  5223. "application/json": {
  5224. "schema": {
  5225. "type": "boolean",
  5226. "description": "OAuth callback processed successfully"
  5227. }
  5228. }
  5229. }
  5230. },
  5231. "400": {
  5232. "description": "ProviderAuthError | InvalidRequestError",
  5233. "content": {
  5234. "application/json": {
  5235. "schema": {
  5236. "anyOf": [
  5237. {
  5238. "$ref": "#/components/schemas/ProviderAuthError1"
  5239. },
  5240. {
  5241. "$ref": "#/components/schemas/InvalidRequestError"
  5242. }
  5243. ]
  5244. }
  5245. }
  5246. }
  5247. }
  5248. },
  5249. "description": "Handle the OAuth callback from a provider after user authorization.",
  5250. "summary": "Handle OAuth callback",
  5251. "requestBody": {
  5252. "content": {
  5253. "application/json": {
  5254. "schema": {
  5255. "type": "object",
  5256. "properties": {
  5257. "method": {
  5258. "type": "number",
  5259. "description": "Auth method index"
  5260. },
  5261. "code": {
  5262. "type": "string"
  5263. }
  5264. },
  5265. "required": ["method"],
  5266. "additionalProperties": false
  5267. }
  5268. }
  5269. }
  5270. },
  5271. "x-codeSamples": [
  5272. {
  5273. "lang": "js",
  5274. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5275. }
  5276. ]
  5277. }
  5278. },
  5279. "/session": {
  5280. "get": {
  5281. "tags": ["session"],
  5282. "operationId": "session.list",
  5283. "parameters": [
  5284. {
  5285. "name": "directory",
  5286. "in": "query",
  5287. "schema": {
  5288. "type": "string"
  5289. },
  5290. "required": false
  5291. },
  5292. {
  5293. "name": "workspace",
  5294. "in": "query",
  5295. "schema": {
  5296. "type": "string"
  5297. },
  5298. "required": false
  5299. },
  5300. {
  5301. "name": "scope",
  5302. "in": "query",
  5303. "schema": {
  5304. "type": "string",
  5305. "enum": ["project"]
  5306. },
  5307. "required": false
  5308. },
  5309. {
  5310. "name": "path",
  5311. "in": "query",
  5312. "schema": {
  5313. "type": "string"
  5314. },
  5315. "required": false
  5316. },
  5317. {
  5318. "name": "roots",
  5319. "in": "query",
  5320. "schema": {
  5321. "anyOf": [
  5322. {
  5323. "type": "boolean"
  5324. },
  5325. {
  5326. "type": "string",
  5327. "enum": ["true", "false"]
  5328. }
  5329. ]
  5330. },
  5331. "required": false
  5332. },
  5333. {
  5334. "name": "start",
  5335. "in": "query",
  5336. "schema": {
  5337. "type": "number"
  5338. },
  5339. "required": false
  5340. },
  5341. {
  5342. "name": "search",
  5343. "in": "query",
  5344. "schema": {
  5345. "type": "string"
  5346. },
  5347. "required": false
  5348. },
  5349. {
  5350. "name": "limit",
  5351. "in": "query",
  5352. "schema": {
  5353. "type": "number"
  5354. },
  5355. "required": false
  5356. }
  5357. ],
  5358. "responses": {
  5359. "200": {
  5360. "description": "List of sessions",
  5361. "content": {
  5362. "application/json": {
  5363. "schema": {
  5364. "type": "array",
  5365. "items": {
  5366. "$ref": "#/components/schemas/Session"
  5367. },
  5368. "description": "List of sessions"
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "400": {
  5374. "description": "Bad request",
  5375. "content": {
  5376. "application/json": {
  5377. "schema": {
  5378. "$ref": "#/components/schemas/BadRequestError"
  5379. }
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5385. "summary": "List sessions",
  5386. "x-codeSamples": [
  5387. {
  5388. "lang": "js",
  5389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5390. }
  5391. ]
  5392. },
  5393. "post": {
  5394. "tags": ["session"],
  5395. "operationId": "session.create",
  5396. "parameters": [
  5397. {
  5398. "name": "directory",
  5399. "in": "query",
  5400. "schema": {
  5401. "type": "string"
  5402. },
  5403. "required": false
  5404. },
  5405. {
  5406. "name": "workspace",
  5407. "in": "query",
  5408. "schema": {
  5409. "type": "string"
  5410. },
  5411. "required": false
  5412. }
  5413. ],
  5414. "responses": {
  5415. "200": {
  5416. "description": "Successfully created session",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/Session"
  5421. }
  5422. }
  5423. }
  5424. },
  5425. "400": {
  5426. "description": "BadRequest | InvalidRequestError",
  5427. "content": {
  5428. "application/json": {
  5429. "schema": {
  5430. "anyOf": [
  5431. {
  5432. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5433. },
  5434. {
  5435. "$ref": "#/components/schemas/InvalidRequestError"
  5436. }
  5437. ]
  5438. }
  5439. }
  5440. }
  5441. }
  5442. },
  5443. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5444. "summary": "Create session",
  5445. "requestBody": {
  5446. "content": {
  5447. "application/json": {
  5448. "schema": {
  5449. "type": "object",
  5450. "properties": {
  5451. "parentID": {
  5452. "type": "string",
  5453. "pattern": "^ses"
  5454. },
  5455. "title": {
  5456. "type": "string"
  5457. },
  5458. "agent": {
  5459. "type": "string"
  5460. },
  5461. "model": {
  5462. "type": "object",
  5463. "properties": {
  5464. "id": {
  5465. "type": "string"
  5466. },
  5467. "providerID": {
  5468. "type": "string"
  5469. },
  5470. "variant": {
  5471. "type": "string"
  5472. }
  5473. },
  5474. "required": ["id", "providerID"],
  5475. "additionalProperties": false
  5476. },
  5477. "metadata": {
  5478. "type": "object"
  5479. },
  5480. "permission": {
  5481. "$ref": "#/components/schemas/PermissionRuleset"
  5482. },
  5483. "workspaceID": {
  5484. "type": "string",
  5485. "pattern": "^wrk"
  5486. }
  5487. },
  5488. "additionalProperties": false
  5489. }
  5490. }
  5491. }
  5492. },
  5493. "x-codeSamples": [
  5494. {
  5495. "lang": "js",
  5496. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5497. }
  5498. ]
  5499. }
  5500. },
  5501. "/session/status": {
  5502. "get": {
  5503. "tags": ["session"],
  5504. "operationId": "session.status",
  5505. "parameters": [
  5506. {
  5507. "name": "directory",
  5508. "in": "query",
  5509. "schema": {
  5510. "type": "string"
  5511. },
  5512. "required": false
  5513. },
  5514. {
  5515. "name": "workspace",
  5516. "in": "query",
  5517. "schema": {
  5518. "type": "string"
  5519. },
  5520. "required": false
  5521. }
  5522. ],
  5523. "responses": {
  5524. "200": {
  5525. "description": "Get session status",
  5526. "content": {
  5527. "application/json": {
  5528. "schema": {
  5529. "type": "object",
  5530. "additionalProperties": {
  5531. "$ref": "#/components/schemas/SessionStatus"
  5532. },
  5533. "description": "Get session status"
  5534. }
  5535. }
  5536. }
  5537. },
  5538. "400": {
  5539. "description": "BadRequest | InvalidRequestError",
  5540. "content": {
  5541. "application/json": {
  5542. "schema": {
  5543. "anyOf": [
  5544. {
  5545. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5546. },
  5547. {
  5548. "$ref": "#/components/schemas/InvalidRequestError"
  5549. }
  5550. ]
  5551. }
  5552. }
  5553. }
  5554. }
  5555. },
  5556. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5557. "summary": "Get session status",
  5558. "x-codeSamples": [
  5559. {
  5560. "lang": "js",
  5561. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5562. }
  5563. ]
  5564. }
  5565. },
  5566. "/session/{sessionID}": {
  5567. "get": {
  5568. "tags": ["session"],
  5569. "operationId": "session.get",
  5570. "parameters": [
  5571. {
  5572. "name": "sessionID",
  5573. "in": "path",
  5574. "schema": {
  5575. "type": "string",
  5576. "pattern": "^ses"
  5577. },
  5578. "required": true
  5579. },
  5580. {
  5581. "name": "directory",
  5582. "in": "query",
  5583. "schema": {
  5584. "type": "string"
  5585. },
  5586. "required": false
  5587. },
  5588. {
  5589. "name": "workspace",
  5590. "in": "query",
  5591. "schema": {
  5592. "type": "string"
  5593. },
  5594. "required": false
  5595. }
  5596. ],
  5597. "responses": {
  5598. "200": {
  5599. "description": "Get session",
  5600. "content": {
  5601. "application/json": {
  5602. "schema": {
  5603. "$ref": "#/components/schemas/Session"
  5604. }
  5605. }
  5606. }
  5607. },
  5608. "400": {
  5609. "description": "BadRequest | InvalidRequestError",
  5610. "content": {
  5611. "application/json": {
  5612. "schema": {
  5613. "anyOf": [
  5614. {
  5615. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5616. },
  5617. {
  5618. "$ref": "#/components/schemas/InvalidRequestError"
  5619. }
  5620. ]
  5621. }
  5622. }
  5623. }
  5624. },
  5625. "404": {
  5626. "description": "NotFoundError",
  5627. "content": {
  5628. "application/json": {
  5629. "schema": {
  5630. "$ref": "#/components/schemas/NotFoundError"
  5631. }
  5632. }
  5633. }
  5634. }
  5635. },
  5636. "description": "Retrieve detailed information about a specific OpenCode session.",
  5637. "summary": "Get session",
  5638. "x-codeSamples": [
  5639. {
  5640. "lang": "js",
  5641. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5642. }
  5643. ]
  5644. },
  5645. "delete": {
  5646. "tags": ["session"],
  5647. "operationId": "session.delete",
  5648. "parameters": [
  5649. {
  5650. "name": "sessionID",
  5651. "in": "path",
  5652. "schema": {
  5653. "type": "string",
  5654. "pattern": "^ses"
  5655. },
  5656. "required": true
  5657. },
  5658. {
  5659. "name": "directory",
  5660. "in": "query",
  5661. "schema": {
  5662. "type": "string"
  5663. },
  5664. "required": false
  5665. },
  5666. {
  5667. "name": "workspace",
  5668. "in": "query",
  5669. "schema": {
  5670. "type": "string"
  5671. },
  5672. "required": false
  5673. }
  5674. ],
  5675. "responses": {
  5676. "200": {
  5677. "description": "Successfully deleted session",
  5678. "content": {
  5679. "application/json": {
  5680. "schema": {
  5681. "type": "boolean",
  5682. "description": "Successfully deleted session"
  5683. }
  5684. }
  5685. }
  5686. },
  5687. "400": {
  5688. "description": "BadRequest | InvalidRequestError",
  5689. "content": {
  5690. "application/json": {
  5691. "schema": {
  5692. "anyOf": [
  5693. {
  5694. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5695. },
  5696. {
  5697. "$ref": "#/components/schemas/InvalidRequestError"
  5698. }
  5699. ]
  5700. }
  5701. }
  5702. }
  5703. },
  5704. "404": {
  5705. "description": "NotFoundError",
  5706. "content": {
  5707. "application/json": {
  5708. "schema": {
  5709. "$ref": "#/components/schemas/NotFoundError"
  5710. }
  5711. }
  5712. }
  5713. }
  5714. },
  5715. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5716. "summary": "Delete session",
  5717. "x-codeSamples": [
  5718. {
  5719. "lang": "js",
  5720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5721. }
  5722. ]
  5723. },
  5724. "patch": {
  5725. "tags": ["session"],
  5726. "operationId": "session.update",
  5727. "parameters": [
  5728. {
  5729. "name": "sessionID",
  5730. "in": "path",
  5731. "schema": {
  5732. "type": "string",
  5733. "pattern": "^ses"
  5734. },
  5735. "required": true
  5736. },
  5737. {
  5738. "name": "directory",
  5739. "in": "query",
  5740. "schema": {
  5741. "type": "string"
  5742. },
  5743. "required": false
  5744. },
  5745. {
  5746. "name": "workspace",
  5747. "in": "query",
  5748. "schema": {
  5749. "type": "string"
  5750. },
  5751. "required": false
  5752. }
  5753. ],
  5754. "responses": {
  5755. "200": {
  5756. "description": "Successfully updated session",
  5757. "content": {
  5758. "application/json": {
  5759. "schema": {
  5760. "$ref": "#/components/schemas/Session"
  5761. }
  5762. }
  5763. }
  5764. },
  5765. "400": {
  5766. "description": "BadRequest | InvalidRequestError",
  5767. "content": {
  5768. "application/json": {
  5769. "schema": {
  5770. "anyOf": [
  5771. {
  5772. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5773. },
  5774. {
  5775. "$ref": "#/components/schemas/InvalidRequestError"
  5776. }
  5777. ]
  5778. }
  5779. }
  5780. }
  5781. },
  5782. "404": {
  5783. "description": "NotFoundError",
  5784. "content": {
  5785. "application/json": {
  5786. "schema": {
  5787. "$ref": "#/components/schemas/NotFoundError"
  5788. }
  5789. }
  5790. }
  5791. }
  5792. },
  5793. "description": "Update properties of an existing session, such as title or other metadata.",
  5794. "summary": "Update session",
  5795. "requestBody": {
  5796. "content": {
  5797. "application/json": {
  5798. "schema": {
  5799. "type": "object",
  5800. "properties": {
  5801. "title": {
  5802. "type": "string"
  5803. },
  5804. "metadata": {
  5805. "type": "object"
  5806. },
  5807. "permission": {
  5808. "$ref": "#/components/schemas/PermissionRuleset"
  5809. },
  5810. "time": {
  5811. "type": "object",
  5812. "properties": {
  5813. "archived": {
  5814. "type": "number"
  5815. }
  5816. },
  5817. "additionalProperties": false
  5818. }
  5819. },
  5820. "additionalProperties": false
  5821. }
  5822. }
  5823. }
  5824. },
  5825. "x-codeSamples": [
  5826. {
  5827. "lang": "js",
  5828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5829. }
  5830. ]
  5831. }
  5832. },
  5833. "/session/{sessionID}/children": {
  5834. "get": {
  5835. "tags": ["session"],
  5836. "operationId": "session.children",
  5837. "parameters": [
  5838. {
  5839. "name": "sessionID",
  5840. "in": "path",
  5841. "schema": {
  5842. "type": "string",
  5843. "pattern": "^ses"
  5844. },
  5845. "required": true
  5846. },
  5847. {
  5848. "name": "directory",
  5849. "in": "query",
  5850. "schema": {
  5851. "type": "string"
  5852. },
  5853. "required": false
  5854. },
  5855. {
  5856. "name": "workspace",
  5857. "in": "query",
  5858. "schema": {
  5859. "type": "string"
  5860. },
  5861. "required": false
  5862. }
  5863. ],
  5864. "responses": {
  5865. "200": {
  5866. "description": "List of children",
  5867. "content": {
  5868. "application/json": {
  5869. "schema": {
  5870. "type": "array",
  5871. "items": {
  5872. "$ref": "#/components/schemas/Session"
  5873. },
  5874. "description": "List of children"
  5875. }
  5876. }
  5877. }
  5878. },
  5879. "400": {
  5880. "description": "BadRequest | InvalidRequestError",
  5881. "content": {
  5882. "application/json": {
  5883. "schema": {
  5884. "anyOf": [
  5885. {
  5886. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5887. },
  5888. {
  5889. "$ref": "#/components/schemas/InvalidRequestError"
  5890. }
  5891. ]
  5892. }
  5893. }
  5894. }
  5895. },
  5896. "404": {
  5897. "description": "NotFoundError",
  5898. "content": {
  5899. "application/json": {
  5900. "schema": {
  5901. "$ref": "#/components/schemas/NotFoundError"
  5902. }
  5903. }
  5904. }
  5905. }
  5906. },
  5907. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5908. "summary": "Get session children",
  5909. "x-codeSamples": [
  5910. {
  5911. "lang": "js",
  5912. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5913. }
  5914. ]
  5915. }
  5916. },
  5917. "/session/{sessionID}/todo": {
  5918. "get": {
  5919. "tags": ["session"],
  5920. "operationId": "session.todo",
  5921. "parameters": [
  5922. {
  5923. "name": "sessionID",
  5924. "in": "path",
  5925. "schema": {
  5926. "type": "string",
  5927. "pattern": "^ses"
  5928. },
  5929. "required": true
  5930. },
  5931. {
  5932. "name": "directory",
  5933. "in": "query",
  5934. "schema": {
  5935. "type": "string"
  5936. },
  5937. "required": false
  5938. },
  5939. {
  5940. "name": "workspace",
  5941. "in": "query",
  5942. "schema": {
  5943. "type": "string"
  5944. },
  5945. "required": false
  5946. }
  5947. ],
  5948. "responses": {
  5949. "200": {
  5950. "description": "Todo list",
  5951. "content": {
  5952. "application/json": {
  5953. "schema": {
  5954. "type": "array",
  5955. "items": {
  5956. "$ref": "#/components/schemas/Todo"
  5957. },
  5958. "description": "Todo list"
  5959. }
  5960. }
  5961. }
  5962. },
  5963. "400": {
  5964. "description": "BadRequest | InvalidRequestError",
  5965. "content": {
  5966. "application/json": {
  5967. "schema": {
  5968. "anyOf": [
  5969. {
  5970. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5971. },
  5972. {
  5973. "$ref": "#/components/schemas/InvalidRequestError"
  5974. }
  5975. ]
  5976. }
  5977. }
  5978. }
  5979. },
  5980. "404": {
  5981. "description": "NotFoundError",
  5982. "content": {
  5983. "application/json": {
  5984. "schema": {
  5985. "$ref": "#/components/schemas/NotFoundError"
  5986. }
  5987. }
  5988. }
  5989. }
  5990. },
  5991. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5992. "summary": "Get session todos",
  5993. "x-codeSamples": [
  5994. {
  5995. "lang": "js",
  5996. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5997. }
  5998. ]
  5999. }
  6000. },
  6001. "/session/{sessionID}/diff": {
  6002. "get": {
  6003. "tags": ["session"],
  6004. "operationId": "session.diff",
  6005. "parameters": [
  6006. {
  6007. "name": "sessionID",
  6008. "in": "path",
  6009. "schema": {
  6010. "type": "string",
  6011. "pattern": "^ses"
  6012. },
  6013. "required": true
  6014. },
  6015. {
  6016. "name": "directory",
  6017. "in": "query",
  6018. "schema": {
  6019. "type": "string"
  6020. },
  6021. "required": false
  6022. },
  6023. {
  6024. "name": "workspace",
  6025. "in": "query",
  6026. "schema": {
  6027. "type": "string"
  6028. },
  6029. "required": false
  6030. },
  6031. {
  6032. "name": "messageID",
  6033. "in": "query",
  6034. "schema": {
  6035. "type": "string",
  6036. "pattern": "^msg"
  6037. },
  6038. "required": false
  6039. }
  6040. ],
  6041. "responses": {
  6042. "200": {
  6043. "description": "Successfully retrieved diff",
  6044. "content": {
  6045. "application/json": {
  6046. "schema": {
  6047. "type": "array",
  6048. "items": {
  6049. "$ref": "#/components/schemas/SnapshotFileDiff"
  6050. },
  6051. "description": "Successfully retrieved diff"
  6052. }
  6053. }
  6054. }
  6055. },
  6056. "400": {
  6057. "description": "Bad request",
  6058. "content": {
  6059. "application/json": {
  6060. "schema": {
  6061. "$ref": "#/components/schemas/BadRequestError"
  6062. }
  6063. }
  6064. }
  6065. }
  6066. },
  6067. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6068. "summary": "Get message diff",
  6069. "x-codeSamples": [
  6070. {
  6071. "lang": "js",
  6072. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6073. }
  6074. ]
  6075. }
  6076. },
  6077. "/session/{sessionID}/message": {
  6078. "get": {
  6079. "tags": ["session"],
  6080. "operationId": "session.messages",
  6081. "parameters": [
  6082. {
  6083. "name": "sessionID",
  6084. "in": "path",
  6085. "schema": {
  6086. "type": "string",
  6087. "pattern": "^ses"
  6088. },
  6089. "required": true
  6090. },
  6091. {
  6092. "name": "directory",
  6093. "in": "query",
  6094. "schema": {
  6095. "type": "string"
  6096. },
  6097. "required": false
  6098. },
  6099. {
  6100. "name": "workspace",
  6101. "in": "query",
  6102. "schema": {
  6103. "type": "string"
  6104. },
  6105. "required": false
  6106. },
  6107. {
  6108. "name": "limit",
  6109. "in": "query",
  6110. "schema": {
  6111. "type": "integer",
  6112. "minimum": 0,
  6113. "maximum": 9007199254740991
  6114. },
  6115. "required": false
  6116. },
  6117. {
  6118. "name": "before",
  6119. "in": "query",
  6120. "schema": {
  6121. "type": "string"
  6122. },
  6123. "required": false
  6124. }
  6125. ],
  6126. "responses": {
  6127. "200": {
  6128. "description": "List of messages",
  6129. "content": {
  6130. "application/json": {
  6131. "schema": {
  6132. "type": "array",
  6133. "items": {
  6134. "type": "object",
  6135. "properties": {
  6136. "info": {
  6137. "$ref": "#/components/schemas/Message"
  6138. },
  6139. "parts": {
  6140. "type": "array",
  6141. "items": {
  6142. "$ref": "#/components/schemas/Part"
  6143. }
  6144. }
  6145. },
  6146. "required": ["info", "parts"],
  6147. "additionalProperties": false
  6148. },
  6149. "description": "List of messages"
  6150. }
  6151. }
  6152. }
  6153. },
  6154. "400": {
  6155. "description": "BadRequest | InvalidRequestError",
  6156. "content": {
  6157. "application/json": {
  6158. "schema": {
  6159. "anyOf": [
  6160. {
  6161. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6162. },
  6163. {
  6164. "$ref": "#/components/schemas/InvalidRequestError"
  6165. }
  6166. ]
  6167. }
  6168. }
  6169. }
  6170. },
  6171. "404": {
  6172. "description": "NotFoundError",
  6173. "content": {
  6174. "application/json": {
  6175. "schema": {
  6176. "$ref": "#/components/schemas/NotFoundError"
  6177. }
  6178. }
  6179. }
  6180. }
  6181. },
  6182. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6183. "summary": "Get session messages",
  6184. "x-codeSamples": [
  6185. {
  6186. "lang": "js",
  6187. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6188. }
  6189. ]
  6190. },
  6191. "post": {
  6192. "tags": ["session"],
  6193. "operationId": "session.prompt",
  6194. "parameters": [
  6195. {
  6196. "name": "sessionID",
  6197. "in": "path",
  6198. "schema": {
  6199. "type": "string",
  6200. "pattern": "^ses"
  6201. },
  6202. "required": true
  6203. },
  6204. {
  6205. "name": "directory",
  6206. "in": "query",
  6207. "schema": {
  6208. "type": "string"
  6209. },
  6210. "required": false
  6211. },
  6212. {
  6213. "name": "workspace",
  6214. "in": "query",
  6215. "schema": {
  6216. "type": "string"
  6217. },
  6218. "required": false
  6219. }
  6220. ],
  6221. "responses": {
  6222. "200": {
  6223. "description": "Created message",
  6224. "content": {
  6225. "application/json": {
  6226. "schema": {
  6227. "type": "object",
  6228. "required": ["info", "parts"],
  6229. "properties": {
  6230. "info": {
  6231. "$ref": "#/components/schemas/AssistantMessage"
  6232. },
  6233. "parts": {
  6234. "type": "array",
  6235. "items": {
  6236. "$ref": "#/components/schemas/Part"
  6237. }
  6238. }
  6239. }
  6240. }
  6241. }
  6242. }
  6243. },
  6244. "400": {
  6245. "description": "BadRequest | InvalidRequestError",
  6246. "content": {
  6247. "application/json": {
  6248. "schema": {
  6249. "anyOf": [
  6250. {
  6251. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6252. },
  6253. {
  6254. "$ref": "#/components/schemas/InvalidRequestError"
  6255. }
  6256. ]
  6257. }
  6258. }
  6259. }
  6260. },
  6261. "404": {
  6262. "description": "NotFoundError",
  6263. "content": {
  6264. "application/json": {
  6265. "schema": {
  6266. "$ref": "#/components/schemas/NotFoundError"
  6267. }
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "description": "Create and send a new message to a session, streaming the AI response.",
  6273. "summary": "Send message",
  6274. "requestBody": {
  6275. "content": {
  6276. "application/json": {
  6277. "schema": {
  6278. "type": "object",
  6279. "properties": {
  6280. "messageID": {
  6281. "type": "string",
  6282. "pattern": "^msg"
  6283. },
  6284. "model": {
  6285. "type": "object",
  6286. "properties": {
  6287. "providerID": {
  6288. "type": "string"
  6289. },
  6290. "modelID": {
  6291. "type": "string"
  6292. }
  6293. },
  6294. "required": ["providerID", "modelID"],
  6295. "additionalProperties": false
  6296. },
  6297. "agent": {
  6298. "type": "string"
  6299. },
  6300. "noReply": {
  6301. "type": "boolean"
  6302. },
  6303. "tools": {
  6304. "type": "object",
  6305. "additionalProperties": {
  6306. "type": "boolean"
  6307. }
  6308. },
  6309. "format": {
  6310. "$ref": "#/components/schemas/OutputFormat"
  6311. },
  6312. "system": {
  6313. "type": "string"
  6314. },
  6315. "variant": {
  6316. "type": "string"
  6317. },
  6318. "parts": {
  6319. "type": "array",
  6320. "items": {
  6321. "anyOf": [
  6322. {
  6323. "$ref": "#/components/schemas/TextPartInput"
  6324. },
  6325. {
  6326. "$ref": "#/components/schemas/FilePartInput"
  6327. },
  6328. {
  6329. "$ref": "#/components/schemas/AgentPartInput"
  6330. },
  6331. {
  6332. "$ref": "#/components/schemas/SubtaskPartInput"
  6333. }
  6334. ]
  6335. }
  6336. }
  6337. },
  6338. "required": ["parts"],
  6339. "additionalProperties": false
  6340. }
  6341. }
  6342. }
  6343. },
  6344. "x-codeSamples": [
  6345. {
  6346. "lang": "js",
  6347. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6348. }
  6349. ]
  6350. }
  6351. },
  6352. "/session/{sessionID}/message/{messageID}": {
  6353. "get": {
  6354. "tags": ["session"],
  6355. "operationId": "session.message",
  6356. "parameters": [
  6357. {
  6358. "name": "sessionID",
  6359. "in": "path",
  6360. "schema": {
  6361. "type": "string",
  6362. "pattern": "^ses"
  6363. },
  6364. "required": true
  6365. },
  6366. {
  6367. "name": "messageID",
  6368. "in": "path",
  6369. "schema": {
  6370. "type": "string",
  6371. "pattern": "^msg"
  6372. },
  6373. "required": true
  6374. },
  6375. {
  6376. "name": "directory",
  6377. "in": "query",
  6378. "schema": {
  6379. "type": "string"
  6380. },
  6381. "required": false
  6382. },
  6383. {
  6384. "name": "workspace",
  6385. "in": "query",
  6386. "schema": {
  6387. "type": "string"
  6388. },
  6389. "required": false
  6390. }
  6391. ],
  6392. "responses": {
  6393. "200": {
  6394. "description": "Message",
  6395. "content": {
  6396. "application/json": {
  6397. "schema": {
  6398. "type": "object",
  6399. "properties": {
  6400. "info": {
  6401. "$ref": "#/components/schemas/Message"
  6402. },
  6403. "parts": {
  6404. "type": "array",
  6405. "items": {
  6406. "$ref": "#/components/schemas/Part"
  6407. }
  6408. }
  6409. },
  6410. "required": ["info", "parts"],
  6411. "additionalProperties": false,
  6412. "description": "Message"
  6413. }
  6414. }
  6415. }
  6416. },
  6417. "400": {
  6418. "description": "BadRequest | InvalidRequestError",
  6419. "content": {
  6420. "application/json": {
  6421. "schema": {
  6422. "anyOf": [
  6423. {
  6424. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6425. },
  6426. {
  6427. "$ref": "#/components/schemas/InvalidRequestError"
  6428. }
  6429. ]
  6430. }
  6431. }
  6432. }
  6433. },
  6434. "404": {
  6435. "description": "NotFoundError",
  6436. "content": {
  6437. "application/json": {
  6438. "schema": {
  6439. "$ref": "#/components/schemas/NotFoundError"
  6440. }
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "description": "Retrieve a specific message from a session by its message ID.",
  6446. "summary": "Get message",
  6447. "x-codeSamples": [
  6448. {
  6449. "lang": "js",
  6450. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6451. }
  6452. ]
  6453. },
  6454. "delete": {
  6455. "tags": ["session"],
  6456. "operationId": "session.deleteMessage",
  6457. "parameters": [
  6458. {
  6459. "name": "sessionID",
  6460. "in": "path",
  6461. "schema": {
  6462. "type": "string",
  6463. "pattern": "^ses"
  6464. },
  6465. "required": true
  6466. },
  6467. {
  6468. "name": "messageID",
  6469. "in": "path",
  6470. "schema": {
  6471. "type": "string",
  6472. "pattern": "^msg"
  6473. },
  6474. "required": true
  6475. },
  6476. {
  6477. "name": "directory",
  6478. "in": "query",
  6479. "schema": {
  6480. "type": "string"
  6481. },
  6482. "required": false
  6483. },
  6484. {
  6485. "name": "workspace",
  6486. "in": "query",
  6487. "schema": {
  6488. "type": "string"
  6489. },
  6490. "required": false
  6491. }
  6492. ],
  6493. "responses": {
  6494. "200": {
  6495. "description": "Successfully deleted message",
  6496. "content": {
  6497. "application/json": {
  6498. "schema": {
  6499. "type": "boolean",
  6500. "description": "Successfully deleted message"
  6501. }
  6502. }
  6503. }
  6504. },
  6505. "400": {
  6506. "description": "BadRequest | InvalidRequestError",
  6507. "content": {
  6508. "application/json": {
  6509. "schema": {
  6510. "anyOf": [
  6511. {
  6512. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6513. },
  6514. {
  6515. "$ref": "#/components/schemas/InvalidRequestError"
  6516. }
  6517. ]
  6518. }
  6519. }
  6520. }
  6521. },
  6522. "404": {
  6523. "description": "NotFoundError",
  6524. "content": {
  6525. "application/json": {
  6526. "schema": {
  6527. "$ref": "#/components/schemas/NotFoundError"
  6528. }
  6529. }
  6530. }
  6531. },
  6532. "409": {
  6533. "description": "SessionBusyError",
  6534. "content": {
  6535. "application/json": {
  6536. "schema": {
  6537. "$ref": "#/components/schemas/SessionBusyError"
  6538. }
  6539. }
  6540. }
  6541. }
  6542. },
  6543. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6544. "summary": "Delete message",
  6545. "x-codeSamples": [
  6546. {
  6547. "lang": "js",
  6548. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6549. }
  6550. ]
  6551. }
  6552. },
  6553. "/session/{sessionID}/fork": {
  6554. "post": {
  6555. "tags": ["session"],
  6556. "operationId": "session.fork",
  6557. "parameters": [
  6558. {
  6559. "name": "sessionID",
  6560. "in": "path",
  6561. "schema": {
  6562. "type": "string",
  6563. "pattern": "^ses"
  6564. },
  6565. "required": true
  6566. },
  6567. {
  6568. "name": "directory",
  6569. "in": "query",
  6570. "schema": {
  6571. "type": "string"
  6572. },
  6573. "required": false
  6574. },
  6575. {
  6576. "name": "workspace",
  6577. "in": "query",
  6578. "schema": {
  6579. "type": "string"
  6580. },
  6581. "required": false
  6582. }
  6583. ],
  6584. "responses": {
  6585. "200": {
  6586. "description": "200",
  6587. "content": {
  6588. "application/json": {
  6589. "schema": {
  6590. "$ref": "#/components/schemas/Session"
  6591. }
  6592. }
  6593. }
  6594. },
  6595. "400": {
  6596. "description": "BadRequest | InvalidRequestError",
  6597. "content": {
  6598. "application/json": {
  6599. "schema": {
  6600. "anyOf": [
  6601. {
  6602. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6603. },
  6604. {
  6605. "$ref": "#/components/schemas/InvalidRequestError"
  6606. }
  6607. ]
  6608. }
  6609. }
  6610. }
  6611. },
  6612. "404": {
  6613. "description": "NotFoundError",
  6614. "content": {
  6615. "application/json": {
  6616. "schema": {
  6617. "$ref": "#/components/schemas/NotFoundError"
  6618. }
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "description": "Create a new session by forking an existing session at a specific message point.",
  6624. "summary": "Fork session",
  6625. "requestBody": {
  6626. "content": {
  6627. "application/json": {
  6628. "schema": {
  6629. "type": "object",
  6630. "properties": {
  6631. "messageID": {
  6632. "type": "string",
  6633. "pattern": "^msg"
  6634. }
  6635. },
  6636. "additionalProperties": false
  6637. }
  6638. }
  6639. }
  6640. },
  6641. "x-codeSamples": [
  6642. {
  6643. "lang": "js",
  6644. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6645. }
  6646. ]
  6647. }
  6648. },
  6649. "/session/{sessionID}/abort": {
  6650. "post": {
  6651. "tags": ["session"],
  6652. "operationId": "session.abort",
  6653. "parameters": [
  6654. {
  6655. "name": "sessionID",
  6656. "in": "path",
  6657. "schema": {
  6658. "type": "string",
  6659. "pattern": "^ses"
  6660. },
  6661. "required": true
  6662. },
  6663. {
  6664. "name": "directory",
  6665. "in": "query",
  6666. "schema": {
  6667. "type": "string"
  6668. },
  6669. "required": false
  6670. },
  6671. {
  6672. "name": "workspace",
  6673. "in": "query",
  6674. "schema": {
  6675. "type": "string"
  6676. },
  6677. "required": false
  6678. }
  6679. ],
  6680. "responses": {
  6681. "200": {
  6682. "description": "Aborted session",
  6683. "content": {
  6684. "application/json": {
  6685. "schema": {
  6686. "type": "boolean",
  6687. "description": "Aborted session"
  6688. }
  6689. }
  6690. }
  6691. },
  6692. "400": {
  6693. "description": "BadRequest | InvalidRequestError",
  6694. "content": {
  6695. "application/json": {
  6696. "schema": {
  6697. "anyOf": [
  6698. {
  6699. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6700. },
  6701. {
  6702. "$ref": "#/components/schemas/InvalidRequestError"
  6703. }
  6704. ]
  6705. }
  6706. }
  6707. }
  6708. }
  6709. },
  6710. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6711. "summary": "Abort session",
  6712. "x-codeSamples": [
  6713. {
  6714. "lang": "js",
  6715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6716. }
  6717. ]
  6718. }
  6719. },
  6720. "/session/{sessionID}/init": {
  6721. "post": {
  6722. "tags": ["session"],
  6723. "operationId": "session.init",
  6724. "parameters": [
  6725. {
  6726. "name": "sessionID",
  6727. "in": "path",
  6728. "schema": {
  6729. "type": "string",
  6730. "pattern": "^ses"
  6731. },
  6732. "required": true
  6733. },
  6734. {
  6735. "name": "directory",
  6736. "in": "query",
  6737. "schema": {
  6738. "type": "string"
  6739. },
  6740. "required": false
  6741. },
  6742. {
  6743. "name": "workspace",
  6744. "in": "query",
  6745. "schema": {
  6746. "type": "string"
  6747. },
  6748. "required": false
  6749. }
  6750. ],
  6751. "responses": {
  6752. "200": {
  6753. "description": "200",
  6754. "content": {
  6755. "application/json": {
  6756. "schema": {
  6757. "type": "boolean",
  6758. "description": "200"
  6759. }
  6760. }
  6761. }
  6762. },
  6763. "400": {
  6764. "description": "BadRequest | InvalidRequestError",
  6765. "content": {
  6766. "application/json": {
  6767. "schema": {
  6768. "anyOf": [
  6769. {
  6770. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6771. },
  6772. {
  6773. "$ref": "#/components/schemas/InvalidRequestError"
  6774. }
  6775. ]
  6776. }
  6777. }
  6778. }
  6779. },
  6780. "404": {
  6781. "description": "NotFoundError",
  6782. "content": {
  6783. "application/json": {
  6784. "schema": {
  6785. "$ref": "#/components/schemas/NotFoundError"
  6786. }
  6787. }
  6788. }
  6789. }
  6790. },
  6791. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6792. "summary": "Initialize session",
  6793. "requestBody": {
  6794. "content": {
  6795. "application/json": {
  6796. "schema": {
  6797. "type": "object",
  6798. "properties": {
  6799. "modelID": {
  6800. "type": "string"
  6801. },
  6802. "providerID": {
  6803. "type": "string"
  6804. },
  6805. "messageID": {
  6806. "type": "string",
  6807. "pattern": "^msg"
  6808. }
  6809. },
  6810. "required": ["modelID", "providerID", "messageID"],
  6811. "additionalProperties": false
  6812. }
  6813. }
  6814. }
  6815. },
  6816. "x-codeSamples": [
  6817. {
  6818. "lang": "js",
  6819. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6820. }
  6821. ]
  6822. }
  6823. },
  6824. "/session/{sessionID}/share": {
  6825. "post": {
  6826. "tags": ["session"],
  6827. "operationId": "session.share",
  6828. "parameters": [
  6829. {
  6830. "name": "sessionID",
  6831. "in": "path",
  6832. "schema": {
  6833. "type": "string",
  6834. "pattern": "^ses"
  6835. },
  6836. "required": true
  6837. },
  6838. {
  6839. "name": "directory",
  6840. "in": "query",
  6841. "schema": {
  6842. "type": "string"
  6843. },
  6844. "required": false
  6845. },
  6846. {
  6847. "name": "workspace",
  6848. "in": "query",
  6849. "schema": {
  6850. "type": "string"
  6851. },
  6852. "required": false
  6853. }
  6854. ],
  6855. "responses": {
  6856. "200": {
  6857. "description": "Successfully shared session",
  6858. "content": {
  6859. "application/json": {
  6860. "schema": {
  6861. "$ref": "#/components/schemas/Session"
  6862. }
  6863. }
  6864. }
  6865. },
  6866. "400": {
  6867. "description": "Bad request",
  6868. "content": {
  6869. "application/json": {
  6870. "schema": {
  6871. "$ref": "#/components/schemas/BadRequestError"
  6872. }
  6873. }
  6874. }
  6875. },
  6876. "404": {
  6877. "description": "NotFoundError",
  6878. "content": {
  6879. "application/json": {
  6880. "schema": {
  6881. "$ref": "#/components/schemas/NotFoundError"
  6882. }
  6883. }
  6884. }
  6885. },
  6886. "500": {
  6887. "description": "InternalServerError",
  6888. "content": {
  6889. "application/json": {
  6890. "schema": {
  6891. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6892. }
  6893. }
  6894. }
  6895. }
  6896. },
  6897. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6898. "summary": "Share session",
  6899. "x-codeSamples": [
  6900. {
  6901. "lang": "js",
  6902. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6903. }
  6904. ]
  6905. },
  6906. "delete": {
  6907. "tags": ["session"],
  6908. "operationId": "session.unshare",
  6909. "parameters": [
  6910. {
  6911. "name": "sessionID",
  6912. "in": "path",
  6913. "schema": {
  6914. "type": "string",
  6915. "pattern": "^ses"
  6916. },
  6917. "required": true
  6918. },
  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": "Successfully unshared session",
  6939. "content": {
  6940. "application/json": {
  6941. "schema": {
  6942. "$ref": "#/components/schemas/Session"
  6943. }
  6944. }
  6945. }
  6946. },
  6947. "400": {
  6948. "description": "Bad request",
  6949. "content": {
  6950. "application/json": {
  6951. "schema": {
  6952. "$ref": "#/components/schemas/BadRequestError"
  6953. }
  6954. }
  6955. }
  6956. },
  6957. "404": {
  6958. "description": "NotFoundError",
  6959. "content": {
  6960. "application/json": {
  6961. "schema": {
  6962. "$ref": "#/components/schemas/NotFoundError"
  6963. }
  6964. }
  6965. }
  6966. },
  6967. "500": {
  6968. "description": "InternalServerError",
  6969. "content": {
  6970. "application/json": {
  6971. "schema": {
  6972. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6973. }
  6974. }
  6975. }
  6976. }
  6977. },
  6978. "description": "Remove the shareable link for a session, making it private again.",
  6979. "summary": "Unshare session",
  6980. "x-codeSamples": [
  6981. {
  6982. "lang": "js",
  6983. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6984. }
  6985. ]
  6986. }
  6987. },
  6988. "/session/{sessionID}/summarize": {
  6989. "post": {
  6990. "tags": ["session"],
  6991. "operationId": "session.summarize",
  6992. "parameters": [
  6993. {
  6994. "name": "sessionID",
  6995. "in": "path",
  6996. "schema": {
  6997. "type": "string",
  6998. "pattern": "^ses"
  6999. },
  7000. "required": true
  7001. },
  7002. {
  7003. "name": "directory",
  7004. "in": "query",
  7005. "schema": {
  7006. "type": "string"
  7007. },
  7008. "required": false
  7009. },
  7010. {
  7011. "name": "workspace",
  7012. "in": "query",
  7013. "schema": {
  7014. "type": "string"
  7015. },
  7016. "required": false
  7017. }
  7018. ],
  7019. "responses": {
  7020. "200": {
  7021. "description": "Summarized session",
  7022. "content": {
  7023. "application/json": {
  7024. "schema": {
  7025. "type": "boolean",
  7026. "description": "Summarized session"
  7027. }
  7028. }
  7029. }
  7030. },
  7031. "400": {
  7032. "description": "BadRequest | InvalidRequestError",
  7033. "content": {
  7034. "application/json": {
  7035. "schema": {
  7036. "anyOf": [
  7037. {
  7038. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7039. },
  7040. {
  7041. "$ref": "#/components/schemas/InvalidRequestError"
  7042. }
  7043. ]
  7044. }
  7045. }
  7046. }
  7047. },
  7048. "404": {
  7049. "description": "NotFoundError",
  7050. "content": {
  7051. "application/json": {
  7052. "schema": {
  7053. "$ref": "#/components/schemas/NotFoundError"
  7054. }
  7055. }
  7056. }
  7057. }
  7058. },
  7059. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7060. "summary": "Summarize session",
  7061. "requestBody": {
  7062. "content": {
  7063. "application/json": {
  7064. "schema": {
  7065. "type": "object",
  7066. "properties": {
  7067. "providerID": {
  7068. "type": "string"
  7069. },
  7070. "modelID": {
  7071. "type": "string"
  7072. },
  7073. "auto": {
  7074. "type": "boolean"
  7075. }
  7076. },
  7077. "required": ["providerID", "modelID"],
  7078. "additionalProperties": false
  7079. }
  7080. }
  7081. }
  7082. },
  7083. "x-codeSamples": [
  7084. {
  7085. "lang": "js",
  7086. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7087. }
  7088. ]
  7089. }
  7090. },
  7091. "/session/{sessionID}/prompt_async": {
  7092. "post": {
  7093. "tags": ["session"],
  7094. "operationId": "session.prompt_async",
  7095. "parameters": [
  7096. {
  7097. "name": "sessionID",
  7098. "in": "path",
  7099. "schema": {
  7100. "type": "string",
  7101. "pattern": "^ses"
  7102. },
  7103. "required": true
  7104. },
  7105. {
  7106. "name": "directory",
  7107. "in": "query",
  7108. "schema": {
  7109. "type": "string"
  7110. },
  7111. "required": false
  7112. },
  7113. {
  7114. "name": "workspace",
  7115. "in": "query",
  7116. "schema": {
  7117. "type": "string"
  7118. },
  7119. "required": false
  7120. }
  7121. ],
  7122. "responses": {
  7123. "204": {
  7124. "description": "Prompt accepted"
  7125. },
  7126. "400": {
  7127. "description": "BadRequest | InvalidRequestError",
  7128. "content": {
  7129. "application/json": {
  7130. "schema": {
  7131. "anyOf": [
  7132. {
  7133. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7134. },
  7135. {
  7136. "$ref": "#/components/schemas/InvalidRequestError"
  7137. }
  7138. ]
  7139. }
  7140. }
  7141. }
  7142. },
  7143. "404": {
  7144. "description": "NotFoundError",
  7145. "content": {
  7146. "application/json": {
  7147. "schema": {
  7148. "$ref": "#/components/schemas/NotFoundError"
  7149. }
  7150. }
  7151. }
  7152. }
  7153. },
  7154. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7155. "summary": "Send async message",
  7156. "requestBody": {
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "type": "object",
  7161. "properties": {
  7162. "messageID": {
  7163. "type": "string",
  7164. "pattern": "^msg"
  7165. },
  7166. "model": {
  7167. "type": "object",
  7168. "properties": {
  7169. "providerID": {
  7170. "type": "string"
  7171. },
  7172. "modelID": {
  7173. "type": "string"
  7174. }
  7175. },
  7176. "required": ["providerID", "modelID"],
  7177. "additionalProperties": false
  7178. },
  7179. "agent": {
  7180. "type": "string"
  7181. },
  7182. "noReply": {
  7183. "type": "boolean"
  7184. },
  7185. "tools": {
  7186. "type": "object",
  7187. "additionalProperties": {
  7188. "type": "boolean"
  7189. }
  7190. },
  7191. "format": {
  7192. "$ref": "#/components/schemas/OutputFormat"
  7193. },
  7194. "system": {
  7195. "type": "string"
  7196. },
  7197. "variant": {
  7198. "type": "string"
  7199. },
  7200. "parts": {
  7201. "type": "array",
  7202. "items": {
  7203. "anyOf": [
  7204. {
  7205. "$ref": "#/components/schemas/TextPartInput"
  7206. },
  7207. {
  7208. "$ref": "#/components/schemas/FilePartInput"
  7209. },
  7210. {
  7211. "$ref": "#/components/schemas/AgentPartInput"
  7212. },
  7213. {
  7214. "$ref": "#/components/schemas/SubtaskPartInput"
  7215. }
  7216. ]
  7217. }
  7218. }
  7219. },
  7220. "required": ["parts"],
  7221. "additionalProperties": false
  7222. }
  7223. }
  7224. }
  7225. },
  7226. "x-codeSamples": [
  7227. {
  7228. "lang": "js",
  7229. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7230. }
  7231. ]
  7232. }
  7233. },
  7234. "/session/{sessionID}/command": {
  7235. "post": {
  7236. "tags": ["session"],
  7237. "operationId": "session.command",
  7238. "parameters": [
  7239. {
  7240. "name": "sessionID",
  7241. "in": "path",
  7242. "schema": {
  7243. "type": "string",
  7244. "pattern": "^ses"
  7245. },
  7246. "required": true
  7247. },
  7248. {
  7249. "name": "directory",
  7250. "in": "query",
  7251. "schema": {
  7252. "type": "string"
  7253. },
  7254. "required": false
  7255. },
  7256. {
  7257. "name": "workspace",
  7258. "in": "query",
  7259. "schema": {
  7260. "type": "string"
  7261. },
  7262. "required": false
  7263. }
  7264. ],
  7265. "responses": {
  7266. "200": {
  7267. "description": "Created message",
  7268. "content": {
  7269. "application/json": {
  7270. "schema": {
  7271. "type": "object",
  7272. "required": ["info", "parts"],
  7273. "properties": {
  7274. "info": {
  7275. "$ref": "#/components/schemas/AssistantMessage"
  7276. },
  7277. "parts": {
  7278. "type": "array",
  7279. "items": {
  7280. "$ref": "#/components/schemas/Part"
  7281. }
  7282. }
  7283. }
  7284. }
  7285. }
  7286. }
  7287. },
  7288. "400": {
  7289. "description": "BadRequest | InvalidRequestError",
  7290. "content": {
  7291. "application/json": {
  7292. "schema": {
  7293. "anyOf": [
  7294. {
  7295. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7296. },
  7297. {
  7298. "$ref": "#/components/schemas/InvalidRequestError"
  7299. }
  7300. ]
  7301. }
  7302. }
  7303. }
  7304. },
  7305. "404": {
  7306. "description": "NotFoundError",
  7307. "content": {
  7308. "application/json": {
  7309. "schema": {
  7310. "$ref": "#/components/schemas/NotFoundError"
  7311. }
  7312. }
  7313. }
  7314. }
  7315. },
  7316. "description": "Send a new command to a session for execution by the AI assistant.",
  7317. "summary": "Send command",
  7318. "requestBody": {
  7319. "content": {
  7320. "application/json": {
  7321. "schema": {
  7322. "type": "object",
  7323. "properties": {
  7324. "messageID": {
  7325. "type": "string",
  7326. "pattern": "^msg"
  7327. },
  7328. "agent": {
  7329. "type": "string"
  7330. },
  7331. "model": {
  7332. "type": "string"
  7333. },
  7334. "arguments": {
  7335. "type": "string"
  7336. },
  7337. "command": {
  7338. "type": "string"
  7339. },
  7340. "variant": {
  7341. "type": "string"
  7342. },
  7343. "parts": {
  7344. "type": "array",
  7345. "items": {
  7346. "type": "object",
  7347. "properties": {
  7348. "id": {
  7349. "type": "string",
  7350. "pattern": "^prt"
  7351. },
  7352. "type": {
  7353. "type": "string",
  7354. "enum": ["file"]
  7355. },
  7356. "mime": {
  7357. "type": "string"
  7358. },
  7359. "filename": {
  7360. "type": "string"
  7361. },
  7362. "url": {
  7363. "type": "string"
  7364. },
  7365. "source": {
  7366. "$ref": "#/components/schemas/FilePartSource"
  7367. }
  7368. },
  7369. "required": ["type", "mime", "url"],
  7370. "additionalProperties": false
  7371. }
  7372. }
  7373. },
  7374. "required": ["arguments", "command"],
  7375. "additionalProperties": false
  7376. }
  7377. }
  7378. }
  7379. },
  7380. "x-codeSamples": [
  7381. {
  7382. "lang": "js",
  7383. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7384. }
  7385. ]
  7386. }
  7387. },
  7388. "/session/{sessionID}/shell": {
  7389. "post": {
  7390. "tags": ["session"],
  7391. "operationId": "session.shell",
  7392. "parameters": [
  7393. {
  7394. "name": "sessionID",
  7395. "in": "path",
  7396. "schema": {
  7397. "type": "string",
  7398. "pattern": "^ses"
  7399. },
  7400. "required": true
  7401. },
  7402. {
  7403. "name": "directory",
  7404. "in": "query",
  7405. "schema": {
  7406. "type": "string"
  7407. },
  7408. "required": false
  7409. },
  7410. {
  7411. "name": "workspace",
  7412. "in": "query",
  7413. "schema": {
  7414. "type": "string"
  7415. },
  7416. "required": false
  7417. }
  7418. ],
  7419. "responses": {
  7420. "200": {
  7421. "description": "Created message",
  7422. "content": {
  7423. "application/json": {
  7424. "schema": {
  7425. "type": "object",
  7426. "properties": {
  7427. "info": {
  7428. "$ref": "#/components/schemas/Message"
  7429. },
  7430. "parts": {
  7431. "type": "array",
  7432. "items": {
  7433. "$ref": "#/components/schemas/Part"
  7434. }
  7435. }
  7436. },
  7437. "required": ["info", "parts"],
  7438. "additionalProperties": false,
  7439. "description": "Created message"
  7440. }
  7441. }
  7442. }
  7443. },
  7444. "400": {
  7445. "description": "BadRequest | InvalidRequestError",
  7446. "content": {
  7447. "application/json": {
  7448. "schema": {
  7449. "anyOf": [
  7450. {
  7451. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7452. },
  7453. {
  7454. "$ref": "#/components/schemas/InvalidRequestError"
  7455. }
  7456. ]
  7457. }
  7458. }
  7459. }
  7460. },
  7461. "404": {
  7462. "description": "NotFoundError",
  7463. "content": {
  7464. "application/json": {
  7465. "schema": {
  7466. "$ref": "#/components/schemas/NotFoundError"
  7467. }
  7468. }
  7469. }
  7470. },
  7471. "409": {
  7472. "description": "SessionBusyError",
  7473. "content": {
  7474. "application/json": {
  7475. "schema": {
  7476. "$ref": "#/components/schemas/SessionBusyError"
  7477. }
  7478. }
  7479. }
  7480. }
  7481. },
  7482. "description": "Execute a shell command within the session context and return the AI's response.",
  7483. "summary": "Run shell command",
  7484. "requestBody": {
  7485. "content": {
  7486. "application/json": {
  7487. "schema": {
  7488. "type": "object",
  7489. "properties": {
  7490. "messageID": {
  7491. "type": "string",
  7492. "pattern": "^msg"
  7493. },
  7494. "agent": {
  7495. "type": "string"
  7496. },
  7497. "model": {
  7498. "type": "object",
  7499. "properties": {
  7500. "providerID": {
  7501. "type": "string"
  7502. },
  7503. "modelID": {
  7504. "type": "string"
  7505. }
  7506. },
  7507. "required": ["providerID", "modelID"],
  7508. "additionalProperties": false
  7509. },
  7510. "command": {
  7511. "type": "string"
  7512. }
  7513. },
  7514. "required": ["agent", "command"],
  7515. "additionalProperties": false
  7516. }
  7517. }
  7518. }
  7519. },
  7520. "x-codeSamples": [
  7521. {
  7522. "lang": "js",
  7523. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7524. }
  7525. ]
  7526. }
  7527. },
  7528. "/session/{sessionID}/revert": {
  7529. "post": {
  7530. "tags": ["session"],
  7531. "operationId": "session.revert",
  7532. "parameters": [
  7533. {
  7534. "name": "sessionID",
  7535. "in": "path",
  7536. "schema": {
  7537. "type": "string",
  7538. "pattern": "^ses"
  7539. },
  7540. "required": true
  7541. },
  7542. {
  7543. "name": "directory",
  7544. "in": "query",
  7545. "schema": {
  7546. "type": "string"
  7547. },
  7548. "required": false
  7549. },
  7550. {
  7551. "name": "workspace",
  7552. "in": "query",
  7553. "schema": {
  7554. "type": "string"
  7555. },
  7556. "required": false
  7557. }
  7558. ],
  7559. "responses": {
  7560. "200": {
  7561. "description": "Updated session",
  7562. "content": {
  7563. "application/json": {
  7564. "schema": {
  7565. "$ref": "#/components/schemas/Session"
  7566. }
  7567. }
  7568. }
  7569. },
  7570. "400": {
  7571. "description": "BadRequest | InvalidRequestError",
  7572. "content": {
  7573. "application/json": {
  7574. "schema": {
  7575. "anyOf": [
  7576. {
  7577. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7578. },
  7579. {
  7580. "$ref": "#/components/schemas/InvalidRequestError"
  7581. }
  7582. ]
  7583. }
  7584. }
  7585. }
  7586. },
  7587. "404": {
  7588. "description": "NotFoundError",
  7589. "content": {
  7590. "application/json": {
  7591. "schema": {
  7592. "$ref": "#/components/schemas/NotFoundError"
  7593. }
  7594. }
  7595. }
  7596. },
  7597. "409": {
  7598. "description": "SessionBusyError",
  7599. "content": {
  7600. "application/json": {
  7601. "schema": {
  7602. "$ref": "#/components/schemas/SessionBusyError"
  7603. }
  7604. }
  7605. }
  7606. }
  7607. },
  7608. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7609. "summary": "Revert message",
  7610. "requestBody": {
  7611. "content": {
  7612. "application/json": {
  7613. "schema": {
  7614. "type": "object",
  7615. "properties": {
  7616. "messageID": {
  7617. "type": "string",
  7618. "pattern": "^msg"
  7619. },
  7620. "partID": {
  7621. "type": "string",
  7622. "pattern": "^prt"
  7623. }
  7624. },
  7625. "required": ["messageID"],
  7626. "additionalProperties": false
  7627. }
  7628. }
  7629. }
  7630. },
  7631. "x-codeSamples": [
  7632. {
  7633. "lang": "js",
  7634. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7635. }
  7636. ]
  7637. }
  7638. },
  7639. "/session/{sessionID}/unrevert": {
  7640. "post": {
  7641. "tags": ["session"],
  7642. "operationId": "session.unrevert",
  7643. "parameters": [
  7644. {
  7645. "name": "sessionID",
  7646. "in": "path",
  7647. "schema": {
  7648. "type": "string",
  7649. "pattern": "^ses"
  7650. },
  7651. "required": true
  7652. },
  7653. {
  7654. "name": "directory",
  7655. "in": "query",
  7656. "schema": {
  7657. "type": "string"
  7658. },
  7659. "required": false
  7660. },
  7661. {
  7662. "name": "workspace",
  7663. "in": "query",
  7664. "schema": {
  7665. "type": "string"
  7666. },
  7667. "required": false
  7668. }
  7669. ],
  7670. "responses": {
  7671. "200": {
  7672. "description": "Updated session",
  7673. "content": {
  7674. "application/json": {
  7675. "schema": {
  7676. "$ref": "#/components/schemas/Session"
  7677. }
  7678. }
  7679. }
  7680. },
  7681. "400": {
  7682. "description": "BadRequest | InvalidRequestError",
  7683. "content": {
  7684. "application/json": {
  7685. "schema": {
  7686. "anyOf": [
  7687. {
  7688. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7689. },
  7690. {
  7691. "$ref": "#/components/schemas/InvalidRequestError"
  7692. }
  7693. ]
  7694. }
  7695. }
  7696. }
  7697. },
  7698. "404": {
  7699. "description": "NotFoundError",
  7700. "content": {
  7701. "application/json": {
  7702. "schema": {
  7703. "$ref": "#/components/schemas/NotFoundError"
  7704. }
  7705. }
  7706. }
  7707. },
  7708. "409": {
  7709. "description": "SessionBusyError",
  7710. "content": {
  7711. "application/json": {
  7712. "schema": {
  7713. "$ref": "#/components/schemas/SessionBusyError"
  7714. }
  7715. }
  7716. }
  7717. }
  7718. },
  7719. "description": "Restore all previously reverted messages in a session.",
  7720. "summary": "Restore reverted messages",
  7721. "x-codeSamples": [
  7722. {
  7723. "lang": "js",
  7724. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7725. }
  7726. ]
  7727. }
  7728. },
  7729. "/session/{sessionID}/permissions/{permissionID}": {
  7730. "post": {
  7731. "tags": ["session"],
  7732. "operationId": "permission.respond",
  7733. "parameters": [
  7734. {
  7735. "name": "sessionID",
  7736. "in": "path",
  7737. "schema": {
  7738. "type": "string",
  7739. "pattern": "^ses"
  7740. },
  7741. "required": true
  7742. },
  7743. {
  7744. "name": "permissionID",
  7745. "in": "path",
  7746. "schema": {
  7747. "type": "string",
  7748. "pattern": "^per"
  7749. },
  7750. "required": true
  7751. },
  7752. {
  7753. "name": "directory",
  7754. "in": "query",
  7755. "schema": {
  7756. "type": "string"
  7757. },
  7758. "required": false
  7759. },
  7760. {
  7761. "name": "workspace",
  7762. "in": "query",
  7763. "schema": {
  7764. "type": "string"
  7765. },
  7766. "required": false
  7767. }
  7768. ],
  7769. "responses": {
  7770. "200": {
  7771. "description": "Permission processed successfully",
  7772. "content": {
  7773. "application/json": {
  7774. "schema": {
  7775. "type": "boolean",
  7776. "description": "Permission processed successfully"
  7777. }
  7778. }
  7779. }
  7780. },
  7781. "400": {
  7782. "description": "BadRequest | InvalidRequestError",
  7783. "content": {
  7784. "application/json": {
  7785. "schema": {
  7786. "anyOf": [
  7787. {
  7788. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7789. },
  7790. {
  7791. "$ref": "#/components/schemas/InvalidRequestError"
  7792. }
  7793. ]
  7794. }
  7795. }
  7796. }
  7797. },
  7798. "404": {
  7799. "description": "NotFoundError | PermissionNotFoundError",
  7800. "content": {
  7801. "application/json": {
  7802. "schema": {
  7803. "anyOf": [
  7804. {
  7805. "$ref": "#/components/schemas/NotFoundError"
  7806. },
  7807. {
  7808. "$ref": "#/components/schemas/PermissionNotFoundError"
  7809. }
  7810. ]
  7811. }
  7812. }
  7813. }
  7814. }
  7815. },
  7816. "description": "Approve or deny a permission request from the AI assistant.",
  7817. "summary": "Respond to permission",
  7818. "deprecated": true,
  7819. "requestBody": {
  7820. "content": {
  7821. "application/json": {
  7822. "schema": {
  7823. "type": "object",
  7824. "properties": {
  7825. "response": {
  7826. "type": "string",
  7827. "enum": ["once", "always", "reject"]
  7828. }
  7829. },
  7830. "required": ["response"],
  7831. "additionalProperties": false
  7832. }
  7833. }
  7834. }
  7835. },
  7836. "x-codeSamples": [
  7837. {
  7838. "lang": "js",
  7839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7840. }
  7841. ]
  7842. }
  7843. },
  7844. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7845. "delete": {
  7846. "tags": ["session"],
  7847. "operationId": "part.delete",
  7848. "parameters": [
  7849. {
  7850. "name": "sessionID",
  7851. "in": "path",
  7852. "schema": {
  7853. "type": "string",
  7854. "pattern": "^ses"
  7855. },
  7856. "required": true
  7857. },
  7858. {
  7859. "name": "messageID",
  7860. "in": "path",
  7861. "schema": {
  7862. "type": "string",
  7863. "pattern": "^msg"
  7864. },
  7865. "required": true
  7866. },
  7867. {
  7868. "name": "partID",
  7869. "in": "path",
  7870. "schema": {
  7871. "type": "string",
  7872. "pattern": "^prt"
  7873. },
  7874. "required": true
  7875. },
  7876. {
  7877. "name": "directory",
  7878. "in": "query",
  7879. "schema": {
  7880. "type": "string"
  7881. },
  7882. "required": false
  7883. },
  7884. {
  7885. "name": "workspace",
  7886. "in": "query",
  7887. "schema": {
  7888. "type": "string"
  7889. },
  7890. "required": false
  7891. }
  7892. ],
  7893. "responses": {
  7894. "200": {
  7895. "description": "Successfully deleted part",
  7896. "content": {
  7897. "application/json": {
  7898. "schema": {
  7899. "type": "boolean",
  7900. "description": "Successfully deleted part"
  7901. }
  7902. }
  7903. }
  7904. },
  7905. "400": {
  7906. "description": "BadRequest | InvalidRequestError",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "anyOf": [
  7911. {
  7912. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7913. },
  7914. {
  7915. "$ref": "#/components/schemas/InvalidRequestError"
  7916. }
  7917. ]
  7918. }
  7919. }
  7920. }
  7921. },
  7922. "404": {
  7923. "description": "NotFoundError",
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "$ref": "#/components/schemas/NotFoundError"
  7928. }
  7929. }
  7930. }
  7931. }
  7932. },
  7933. "description": "Delete a part from a message.",
  7934. "x-codeSamples": [
  7935. {
  7936. "lang": "js",
  7937. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7938. }
  7939. ]
  7940. },
  7941. "patch": {
  7942. "tags": ["session"],
  7943. "operationId": "part.update",
  7944. "parameters": [
  7945. {
  7946. "name": "sessionID",
  7947. "in": "path",
  7948. "schema": {
  7949. "type": "string",
  7950. "pattern": "^ses"
  7951. },
  7952. "required": true
  7953. },
  7954. {
  7955. "name": "messageID",
  7956. "in": "path",
  7957. "schema": {
  7958. "type": "string",
  7959. "pattern": "^msg"
  7960. },
  7961. "required": true
  7962. },
  7963. {
  7964. "name": "partID",
  7965. "in": "path",
  7966. "schema": {
  7967. "type": "string",
  7968. "pattern": "^prt"
  7969. },
  7970. "required": true
  7971. },
  7972. {
  7973. "name": "directory",
  7974. "in": "query",
  7975. "schema": {
  7976. "type": "string"
  7977. },
  7978. "required": false
  7979. },
  7980. {
  7981. "name": "workspace",
  7982. "in": "query",
  7983. "schema": {
  7984. "type": "string"
  7985. },
  7986. "required": false
  7987. }
  7988. ],
  7989. "responses": {
  7990. "200": {
  7991. "description": "Successfully updated part",
  7992. "content": {
  7993. "application/json": {
  7994. "schema": {
  7995. "$ref": "#/components/schemas/Part"
  7996. }
  7997. }
  7998. }
  7999. },
  8000. "400": {
  8001. "description": "BadRequest | InvalidRequestError",
  8002. "content": {
  8003. "application/json": {
  8004. "schema": {
  8005. "anyOf": [
  8006. {
  8007. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8008. },
  8009. {
  8010. "$ref": "#/components/schemas/InvalidRequestError"
  8011. }
  8012. ]
  8013. }
  8014. }
  8015. }
  8016. },
  8017. "404": {
  8018. "description": "NotFoundError",
  8019. "content": {
  8020. "application/json": {
  8021. "schema": {
  8022. "$ref": "#/components/schemas/NotFoundError"
  8023. }
  8024. }
  8025. }
  8026. }
  8027. },
  8028. "description": "Update a part in a message.",
  8029. "requestBody": {
  8030. "content": {
  8031. "application/json": {
  8032. "schema": {
  8033. "$ref": "#/components/schemas/Part"
  8034. }
  8035. }
  8036. }
  8037. },
  8038. "x-codeSamples": [
  8039. {
  8040. "lang": "js",
  8041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8042. }
  8043. ]
  8044. }
  8045. },
  8046. "/sync/start": {
  8047. "post": {
  8048. "tags": ["sync"],
  8049. "operationId": "sync.start",
  8050. "parameters": [
  8051. {
  8052. "name": "directory",
  8053. "in": "query",
  8054. "schema": {
  8055. "type": "string"
  8056. },
  8057. "required": false
  8058. },
  8059. {
  8060. "name": "workspace",
  8061. "in": "query",
  8062. "schema": {
  8063. "type": "string"
  8064. },
  8065. "required": false
  8066. }
  8067. ],
  8068. "responses": {
  8069. "200": {
  8070. "description": "Workspace sync started",
  8071. "content": {
  8072. "application/json": {
  8073. "schema": {
  8074. "type": "boolean",
  8075. "description": "Workspace sync started"
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "400": {
  8081. "description": "Bad request",
  8082. "content": {
  8083. "application/json": {
  8084. "schema": {
  8085. "$ref": "#/components/schemas/BadRequestError"
  8086. }
  8087. }
  8088. }
  8089. }
  8090. },
  8091. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8092. "summary": "Start workspace sync",
  8093. "x-codeSamples": [
  8094. {
  8095. "lang": "js",
  8096. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8097. }
  8098. ]
  8099. }
  8100. },
  8101. "/sync/replay": {
  8102. "post": {
  8103. "tags": ["sync"],
  8104. "operationId": "sync.replay",
  8105. "parameters": [
  8106. {
  8107. "name": "directory",
  8108. "in": "query",
  8109. "schema": {
  8110. "type": "string"
  8111. },
  8112. "required": false
  8113. },
  8114. {
  8115. "name": "workspace",
  8116. "in": "query",
  8117. "schema": {
  8118. "type": "string"
  8119. },
  8120. "required": false
  8121. }
  8122. ],
  8123. "responses": {
  8124. "200": {
  8125. "description": "Replayed sync events",
  8126. "content": {
  8127. "application/json": {
  8128. "schema": {
  8129. "type": "object",
  8130. "properties": {
  8131. "sessionID": {
  8132. "type": "string"
  8133. }
  8134. },
  8135. "required": ["sessionID"],
  8136. "additionalProperties": false,
  8137. "description": "Replayed sync events"
  8138. }
  8139. }
  8140. }
  8141. },
  8142. "400": {
  8143. "description": "BadRequest | InvalidRequestError",
  8144. "content": {
  8145. "application/json": {
  8146. "schema": {
  8147. "anyOf": [
  8148. {
  8149. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8150. },
  8151. {
  8152. "$ref": "#/components/schemas/InvalidRequestError"
  8153. }
  8154. ]
  8155. }
  8156. }
  8157. }
  8158. }
  8159. },
  8160. "description": "Validate and replay a complete sync event history.",
  8161. "summary": "Replay sync events",
  8162. "requestBody": {
  8163. "content": {
  8164. "application/json": {
  8165. "schema": {
  8166. "type": "object",
  8167. "properties": {
  8168. "directory": {
  8169. "type": "string"
  8170. },
  8171. "events": {
  8172. "type": "array",
  8173. "minItems": 1,
  8174. "items": {
  8175. "type": "object",
  8176. "properties": {
  8177. "id": {
  8178. "type": "string"
  8179. },
  8180. "aggregateID": {
  8181. "type": "string"
  8182. },
  8183. "seq": {
  8184. "type": "integer",
  8185. "minimum": 0
  8186. },
  8187. "type": {
  8188. "type": "string"
  8189. },
  8190. "data": {
  8191. "type": "object"
  8192. }
  8193. },
  8194. "required": ["id", "aggregateID", "seq", "type", "data"],
  8195. "additionalProperties": false
  8196. }
  8197. }
  8198. },
  8199. "required": ["directory", "events"],
  8200. "additionalProperties": false
  8201. }
  8202. }
  8203. }
  8204. },
  8205. "x-codeSamples": [
  8206. {
  8207. "lang": "js",
  8208. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8209. }
  8210. ]
  8211. }
  8212. },
  8213. "/sync/steal": {
  8214. "post": {
  8215. "tags": ["sync"],
  8216. "operationId": "sync.steal",
  8217. "parameters": [
  8218. {
  8219. "name": "directory",
  8220. "in": "query",
  8221. "schema": {
  8222. "type": "string"
  8223. },
  8224. "required": false
  8225. },
  8226. {
  8227. "name": "workspace",
  8228. "in": "query",
  8229. "schema": {
  8230. "type": "string"
  8231. },
  8232. "required": false
  8233. }
  8234. ],
  8235. "responses": {
  8236. "200": {
  8237. "description": "Session stolen into workspace",
  8238. "content": {
  8239. "application/json": {
  8240. "schema": {
  8241. "type": "object",
  8242. "properties": {
  8243. "sessionID": {
  8244. "type": "string",
  8245. "pattern": "^ses"
  8246. }
  8247. },
  8248. "required": ["sessionID"],
  8249. "additionalProperties": false,
  8250. "description": "Session stolen into workspace"
  8251. }
  8252. }
  8253. }
  8254. },
  8255. "400": {
  8256. "description": "BadRequest | InvalidRequestError",
  8257. "content": {
  8258. "application/json": {
  8259. "schema": {
  8260. "anyOf": [
  8261. {
  8262. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8263. },
  8264. {
  8265. "$ref": "#/components/schemas/InvalidRequestError"
  8266. }
  8267. ]
  8268. }
  8269. }
  8270. }
  8271. }
  8272. },
  8273. "description": "Update a session to belong to the current workspace through the sync event system.",
  8274. "summary": "Steal session into workspace",
  8275. "requestBody": {
  8276. "content": {
  8277. "application/json": {
  8278. "schema": {
  8279. "type": "object",
  8280. "properties": {
  8281. "sessionID": {
  8282. "type": "string",
  8283. "pattern": "^ses"
  8284. }
  8285. },
  8286. "required": ["sessionID"],
  8287. "additionalProperties": false
  8288. }
  8289. }
  8290. }
  8291. },
  8292. "x-codeSamples": [
  8293. {
  8294. "lang": "js",
  8295. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8296. }
  8297. ]
  8298. }
  8299. },
  8300. "/sync/history": {
  8301. "post": {
  8302. "tags": ["sync"],
  8303. "operationId": "sync.history.list",
  8304. "parameters": [
  8305. {
  8306. "name": "directory",
  8307. "in": "query",
  8308. "schema": {
  8309. "type": "string"
  8310. },
  8311. "required": false
  8312. },
  8313. {
  8314. "name": "workspace",
  8315. "in": "query",
  8316. "schema": {
  8317. "type": "string"
  8318. },
  8319. "required": false
  8320. }
  8321. ],
  8322. "responses": {
  8323. "200": {
  8324. "description": "Sync events",
  8325. "content": {
  8326. "application/json": {
  8327. "schema": {
  8328. "type": "array",
  8329. "items": {
  8330. "type": "object",
  8331. "properties": {
  8332. "id": {
  8333. "type": "string"
  8334. },
  8335. "aggregate_id": {
  8336. "type": "string"
  8337. },
  8338. "seq": {
  8339. "type": "integer",
  8340. "minimum": 0
  8341. },
  8342. "type": {
  8343. "type": "string"
  8344. },
  8345. "data": {
  8346. "type": "object"
  8347. }
  8348. },
  8349. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8350. "additionalProperties": false
  8351. },
  8352. "description": "Sync events"
  8353. }
  8354. }
  8355. }
  8356. },
  8357. "400": {
  8358. "description": "BadRequest | InvalidRequestError",
  8359. "content": {
  8360. "application/json": {
  8361. "schema": {
  8362. "anyOf": [
  8363. {
  8364. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8365. },
  8366. {
  8367. "$ref": "#/components/schemas/InvalidRequestError"
  8368. }
  8369. ]
  8370. }
  8371. }
  8372. }
  8373. }
  8374. },
  8375. "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.",
  8376. "summary": "List sync events",
  8377. "requestBody": {
  8378. "content": {
  8379. "application/json": {
  8380. "schema": {
  8381. "type": "object",
  8382. "additionalProperties": {
  8383. "type": "integer",
  8384. "minimum": 0
  8385. }
  8386. }
  8387. }
  8388. }
  8389. },
  8390. "x-codeSamples": [
  8391. {
  8392. "lang": "js",
  8393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8394. }
  8395. ]
  8396. }
  8397. },
  8398. "/api/session": {
  8399. "get": {
  8400. "tags": ["v2"],
  8401. "operationId": "v2.session.list",
  8402. "parameters": [
  8403. {
  8404. "name": "workspace",
  8405. "in": "query",
  8406. "schema": {
  8407. "type": "string",
  8408. "pattern": "^wrk"
  8409. },
  8410. "required": false
  8411. },
  8412. {
  8413. "name": "limit",
  8414. "in": "query",
  8415. "schema": {
  8416. "type": "number"
  8417. },
  8418. "required": false
  8419. },
  8420. {
  8421. "name": "order",
  8422. "in": "query",
  8423. "schema": {
  8424. "type": "string",
  8425. "enum": ["asc", "desc"]
  8426. },
  8427. "required": false
  8428. },
  8429. {
  8430. "name": "search",
  8431. "in": "query",
  8432. "schema": {
  8433. "type": "string"
  8434. },
  8435. "required": false
  8436. },
  8437. {
  8438. "name": "directory",
  8439. "in": "query",
  8440. "schema": {
  8441. "type": "string"
  8442. },
  8443. "required": false
  8444. },
  8445. {
  8446. "name": "project",
  8447. "in": "query",
  8448. "schema": {
  8449. "type": "string"
  8450. },
  8451. "required": false
  8452. },
  8453. {
  8454. "name": "subpath",
  8455. "in": "query",
  8456. "schema": {
  8457. "type": "string"
  8458. },
  8459. "required": false
  8460. },
  8461. {
  8462. "name": "cursor",
  8463. "in": "query",
  8464. "schema": {
  8465. "type": "string",
  8466. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  8467. },
  8468. "required": false
  8469. }
  8470. ],
  8471. "security": [],
  8472. "responses": {
  8473. "200": {
  8474. "description": "V2SessionsResponse",
  8475. "content": {
  8476. "application/json": {
  8477. "schema": {
  8478. "$ref": "#/components/schemas/V2SessionsResponse"
  8479. }
  8480. }
  8481. }
  8482. },
  8483. "400": {
  8484. "description": "InvalidCursorError | InvalidRequestError",
  8485. "content": {
  8486. "application/json": {
  8487. "schema": {
  8488. "anyOf": [
  8489. {
  8490. "$ref": "#/components/schemas/InvalidCursorError"
  8491. },
  8492. {
  8493. "$ref": "#/components/schemas/InvalidRequestError"
  8494. },
  8495. {
  8496. "$ref": "#/components/schemas/InvalidRequestError"
  8497. }
  8498. ]
  8499. }
  8500. }
  8501. }
  8502. },
  8503. "401": {
  8504. "description": "UnauthorizedError",
  8505. "content": {
  8506. "application/json": {
  8507. "schema": {
  8508. "$ref": "#/components/schemas/UnauthorizedError"
  8509. }
  8510. }
  8511. }
  8512. }
  8513. },
  8514. "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.",
  8515. "summary": "List v2 sessions",
  8516. "x-codeSamples": [
  8517. {
  8518. "lang": "js",
  8519. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8520. }
  8521. ]
  8522. }
  8523. },
  8524. "/api/session/{sessionID}/prompt": {
  8525. "post": {
  8526. "tags": ["v2"],
  8527. "operationId": "v2.session.prompt",
  8528. "parameters": [
  8529. {
  8530. "name": "sessionID",
  8531. "in": "path",
  8532. "schema": {
  8533. "type": "string",
  8534. "pattern": "^ses"
  8535. },
  8536. "required": true
  8537. },
  8538. {
  8539. "name": "directory",
  8540. "in": "query",
  8541. "schema": {
  8542. "type": "string"
  8543. },
  8544. "required": false
  8545. },
  8546. {
  8547. "name": "workspace",
  8548. "in": "query",
  8549. "schema": {
  8550. "type": "string"
  8551. },
  8552. "required": false
  8553. }
  8554. ],
  8555. "security": [],
  8556. "responses": {
  8557. "200": {
  8558. "description": "Session.Message",
  8559. "content": {
  8560. "application/json": {
  8561. "schema": {
  8562. "$ref": "#/components/schemas/SessionMessage"
  8563. }
  8564. }
  8565. }
  8566. },
  8567. "400": {
  8568. "description": "InvalidRequestError",
  8569. "content": {
  8570. "application/json": {
  8571. "schema": {
  8572. "$ref": "#/components/schemas/InvalidRequestError"
  8573. }
  8574. }
  8575. }
  8576. },
  8577. "401": {
  8578. "description": "UnauthorizedError",
  8579. "content": {
  8580. "application/json": {
  8581. "schema": {
  8582. "$ref": "#/components/schemas/UnauthorizedError"
  8583. }
  8584. }
  8585. }
  8586. },
  8587. "404": {
  8588. "description": "SessionNotFoundError",
  8589. "content": {
  8590. "application/json": {
  8591. "schema": {
  8592. "$ref": "#/components/schemas/SessionNotFoundError"
  8593. }
  8594. }
  8595. }
  8596. },
  8597. "503": {
  8598. "description": "ServiceUnavailableError",
  8599. "content": {
  8600. "application/json": {
  8601. "schema": {
  8602. "$ref": "#/components/schemas/ServiceUnavailableError"
  8603. }
  8604. }
  8605. }
  8606. }
  8607. },
  8608. "description": "Create a v2 session message and queue it for the agent loop.",
  8609. "summary": "Send v2 message",
  8610. "requestBody": {
  8611. "content": {
  8612. "application/json": {
  8613. "schema": {
  8614. "type": "object",
  8615. "properties": {
  8616. "prompt": {
  8617. "$ref": "#/components/schemas/Prompt"
  8618. },
  8619. "delivery": {
  8620. "$ref": "#/components/schemas/SessionDelivery"
  8621. }
  8622. },
  8623. "required": ["prompt"],
  8624. "additionalProperties": false
  8625. }
  8626. }
  8627. }
  8628. },
  8629. "x-codeSamples": [
  8630. {
  8631. "lang": "js",
  8632. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8633. }
  8634. ]
  8635. }
  8636. },
  8637. "/api/session/{sessionID}/compact": {
  8638. "post": {
  8639. "tags": ["v2"],
  8640. "operationId": "v2.session.compact",
  8641. "parameters": [
  8642. {
  8643. "name": "sessionID",
  8644. "in": "path",
  8645. "schema": {
  8646. "type": "string",
  8647. "pattern": "^ses"
  8648. },
  8649. "required": true
  8650. },
  8651. {
  8652. "name": "directory",
  8653. "in": "query",
  8654. "schema": {
  8655. "type": "string"
  8656. },
  8657. "required": false
  8658. },
  8659. {
  8660. "name": "workspace",
  8661. "in": "query",
  8662. "schema": {
  8663. "type": "string"
  8664. },
  8665. "required": false
  8666. }
  8667. ],
  8668. "security": [],
  8669. "responses": {
  8670. "204": {
  8671. "description": "<No Content>"
  8672. },
  8673. "400": {
  8674. "description": "InvalidRequestError",
  8675. "content": {
  8676. "application/json": {
  8677. "schema": {
  8678. "$ref": "#/components/schemas/InvalidRequestError"
  8679. }
  8680. }
  8681. }
  8682. },
  8683. "401": {
  8684. "description": "UnauthorizedError",
  8685. "content": {
  8686. "application/json": {
  8687. "schema": {
  8688. "$ref": "#/components/schemas/UnauthorizedError"
  8689. }
  8690. }
  8691. }
  8692. },
  8693. "404": {
  8694. "description": "SessionNotFoundError",
  8695. "content": {
  8696. "application/json": {
  8697. "schema": {
  8698. "$ref": "#/components/schemas/SessionNotFoundError"
  8699. }
  8700. }
  8701. }
  8702. },
  8703. "503": {
  8704. "description": "ServiceUnavailableError",
  8705. "content": {
  8706. "application/json": {
  8707. "schema": {
  8708. "$ref": "#/components/schemas/ServiceUnavailableError"
  8709. }
  8710. }
  8711. }
  8712. }
  8713. },
  8714. "description": "Compact a v2 session conversation.",
  8715. "summary": "Compact v2 session",
  8716. "x-codeSamples": [
  8717. {
  8718. "lang": "js",
  8719. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8720. }
  8721. ]
  8722. }
  8723. },
  8724. "/api/session/{sessionID}/wait": {
  8725. "post": {
  8726. "tags": ["v2"],
  8727. "operationId": "v2.session.wait",
  8728. "parameters": [
  8729. {
  8730. "name": "sessionID",
  8731. "in": "path",
  8732. "schema": {
  8733. "type": "string",
  8734. "pattern": "^ses"
  8735. },
  8736. "required": true
  8737. },
  8738. {
  8739. "name": "directory",
  8740. "in": "query",
  8741. "schema": {
  8742. "type": "string"
  8743. },
  8744. "required": false
  8745. },
  8746. {
  8747. "name": "workspace",
  8748. "in": "query",
  8749. "schema": {
  8750. "type": "string"
  8751. },
  8752. "required": false
  8753. }
  8754. ],
  8755. "security": [],
  8756. "responses": {
  8757. "204": {
  8758. "description": "<No Content>"
  8759. },
  8760. "400": {
  8761. "description": "InvalidRequestError",
  8762. "content": {
  8763. "application/json": {
  8764. "schema": {
  8765. "$ref": "#/components/schemas/InvalidRequestError"
  8766. }
  8767. }
  8768. }
  8769. },
  8770. "401": {
  8771. "description": "UnauthorizedError",
  8772. "content": {
  8773. "application/json": {
  8774. "schema": {
  8775. "$ref": "#/components/schemas/UnauthorizedError"
  8776. }
  8777. }
  8778. }
  8779. },
  8780. "404": {
  8781. "description": "SessionNotFoundError",
  8782. "content": {
  8783. "application/json": {
  8784. "schema": {
  8785. "$ref": "#/components/schemas/SessionNotFoundError"
  8786. }
  8787. }
  8788. }
  8789. },
  8790. "503": {
  8791. "description": "ServiceUnavailableError",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "$ref": "#/components/schemas/ServiceUnavailableError"
  8796. }
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "description": "Wait for a v2 session agent loop to become idle.",
  8802. "summary": "Wait for v2 session",
  8803. "x-codeSamples": [
  8804. {
  8805. "lang": "js",
  8806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8807. }
  8808. ]
  8809. }
  8810. },
  8811. "/api/session/{sessionID}/context": {
  8812. "get": {
  8813. "tags": ["v2"],
  8814. "operationId": "v2.session.context",
  8815. "parameters": [
  8816. {
  8817. "name": "sessionID",
  8818. "in": "path",
  8819. "schema": {
  8820. "type": "string",
  8821. "pattern": "^ses"
  8822. },
  8823. "required": true
  8824. },
  8825. {
  8826. "name": "directory",
  8827. "in": "query",
  8828. "schema": {
  8829. "type": "string"
  8830. },
  8831. "required": false
  8832. },
  8833. {
  8834. "name": "workspace",
  8835. "in": "query",
  8836. "schema": {
  8837. "type": "string"
  8838. },
  8839. "required": false
  8840. }
  8841. ],
  8842. "security": [],
  8843. "responses": {
  8844. "200": {
  8845. "description": "Success",
  8846. "content": {
  8847. "application/json": {
  8848. "schema": {
  8849. "type": "array",
  8850. "items": {
  8851. "$ref": "#/components/schemas/SessionMessage"
  8852. }
  8853. }
  8854. }
  8855. }
  8856. },
  8857. "400": {
  8858. "description": "InvalidRequestError",
  8859. "content": {
  8860. "application/json": {
  8861. "schema": {
  8862. "$ref": "#/components/schemas/InvalidRequestError"
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "401": {
  8868. "description": "UnauthorizedError",
  8869. "content": {
  8870. "application/json": {
  8871. "schema": {
  8872. "$ref": "#/components/schemas/UnauthorizedError"
  8873. }
  8874. }
  8875. }
  8876. },
  8877. "404": {
  8878. "description": "SessionNotFoundError",
  8879. "content": {
  8880. "application/json": {
  8881. "schema": {
  8882. "$ref": "#/components/schemas/SessionNotFoundError"
  8883. }
  8884. }
  8885. }
  8886. },
  8887. "500": {
  8888. "description": "UnknownError",
  8889. "content": {
  8890. "application/json": {
  8891. "schema": {
  8892. "$ref": "#/components/schemas/UnknownError1"
  8893. }
  8894. }
  8895. }
  8896. }
  8897. },
  8898. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8899. "summary": "Get v2 session context",
  8900. "x-codeSamples": [
  8901. {
  8902. "lang": "js",
  8903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8904. }
  8905. ]
  8906. }
  8907. },
  8908. "/api/session/{sessionID}/message": {
  8909. "get": {
  8910. "tags": ["v2 messages"],
  8911. "operationId": "v2.session.messages",
  8912. "parameters": [
  8913. {
  8914. "name": "sessionID",
  8915. "in": "path",
  8916. "schema": {
  8917. "type": "string",
  8918. "pattern": "^ses"
  8919. },
  8920. "required": true
  8921. },
  8922. {
  8923. "name": "directory",
  8924. "in": "query",
  8925. "schema": {
  8926. "type": "string"
  8927. },
  8928. "required": false
  8929. },
  8930. {
  8931. "name": "workspace",
  8932. "in": "query",
  8933. "schema": {
  8934. "type": "string"
  8935. },
  8936. "required": false
  8937. },
  8938. {
  8939. "name": "limit",
  8940. "in": "query",
  8941. "schema": {
  8942. "type": "number"
  8943. },
  8944. "required": false
  8945. },
  8946. {
  8947. "name": "order",
  8948. "in": "query",
  8949. "schema": {
  8950. "type": "string",
  8951. "enum": ["asc", "desc"]
  8952. },
  8953. "required": false
  8954. },
  8955. {
  8956. "name": "cursor",
  8957. "in": "query",
  8958. "schema": {
  8959. "type": "string",
  8960. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8961. },
  8962. "required": false
  8963. }
  8964. ],
  8965. "security": [],
  8966. "responses": {
  8967. "200": {
  8968. "description": "V2SessionMessagesResponse",
  8969. "content": {
  8970. "application/json": {
  8971. "schema": {
  8972. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8973. }
  8974. }
  8975. }
  8976. },
  8977. "400": {
  8978. "description": "InvalidCursorError | InvalidRequestError",
  8979. "content": {
  8980. "application/json": {
  8981. "schema": {
  8982. "anyOf": [
  8983. {
  8984. "$ref": "#/components/schemas/InvalidCursorError"
  8985. },
  8986. {
  8987. "$ref": "#/components/schemas/InvalidRequestError"
  8988. }
  8989. ]
  8990. }
  8991. }
  8992. }
  8993. },
  8994. "401": {
  8995. "description": "UnauthorizedError",
  8996. "content": {
  8997. "application/json": {
  8998. "schema": {
  8999. "$ref": "#/components/schemas/UnauthorizedError"
  9000. }
  9001. }
  9002. }
  9003. },
  9004. "404": {
  9005. "description": "SessionNotFoundError",
  9006. "content": {
  9007. "application/json": {
  9008. "schema": {
  9009. "$ref": "#/components/schemas/SessionNotFoundError"
  9010. }
  9011. }
  9012. }
  9013. },
  9014. "500": {
  9015. "description": "UnknownError",
  9016. "content": {
  9017. "application/json": {
  9018. "schema": {
  9019. "$ref": "#/components/schemas/UnknownError1"
  9020. }
  9021. }
  9022. }
  9023. }
  9024. },
  9025. "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.",
  9026. "summary": "Get v2 session messages",
  9027. "x-codeSamples": [
  9028. {
  9029. "lang": "js",
  9030. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  9031. }
  9032. ]
  9033. }
  9034. },
  9035. "/api/model": {
  9036. "get": {
  9037. "tags": ["v2 models"],
  9038. "operationId": "v2.model.list",
  9039. "parameters": [
  9040. {
  9041. "name": "location",
  9042. "in": "query",
  9043. "schema": {
  9044. "type": "object",
  9045. "properties": {
  9046. "directory": {
  9047. "type": "string"
  9048. },
  9049. "workspace": {
  9050. "type": "string"
  9051. }
  9052. },
  9053. "additionalProperties": false
  9054. },
  9055. "required": false,
  9056. "style": "deepObject",
  9057. "explode": true
  9058. }
  9059. ],
  9060. "security": [],
  9061. "responses": {
  9062. "200": {
  9063. "description": "Success",
  9064. "content": {
  9065. "application/json": {
  9066. "schema": {
  9067. "type": "array",
  9068. "items": {
  9069. "$ref": "#/components/schemas/ModelV2Info"
  9070. }
  9071. }
  9072. }
  9073. }
  9074. },
  9075. "400": {
  9076. "description": "InvalidRequestError",
  9077. "content": {
  9078. "application/json": {
  9079. "schema": {
  9080. "$ref": "#/components/schemas/InvalidRequestError"
  9081. }
  9082. }
  9083. }
  9084. },
  9085. "401": {
  9086. "description": "UnauthorizedError",
  9087. "content": {
  9088. "application/json": {
  9089. "schema": {
  9090. "$ref": "#/components/schemas/UnauthorizedError"
  9091. }
  9092. }
  9093. }
  9094. },
  9095. "503": {
  9096. "description": "ServiceUnavailableError",
  9097. "content": {
  9098. "application/json": {
  9099. "schema": {
  9100. "$ref": "#/components/schemas/ServiceUnavailableError"
  9101. }
  9102. }
  9103. }
  9104. }
  9105. },
  9106. "description": "Retrieve available v2 models ordered by release date.",
  9107. "summary": "List v2 models",
  9108. "x-codeSamples": [
  9109. {
  9110. "lang": "js",
  9111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  9112. }
  9113. ]
  9114. }
  9115. },
  9116. "/api/provider": {
  9117. "get": {
  9118. "tags": ["v2 providers"],
  9119. "operationId": "v2.provider.list",
  9120. "parameters": [
  9121. {
  9122. "name": "location",
  9123. "in": "query",
  9124. "schema": {
  9125. "type": "object",
  9126. "properties": {
  9127. "directory": {
  9128. "type": "string"
  9129. },
  9130. "workspace": {
  9131. "type": "string"
  9132. }
  9133. },
  9134. "additionalProperties": false
  9135. },
  9136. "required": false,
  9137. "style": "deepObject",
  9138. "explode": true
  9139. }
  9140. ],
  9141. "security": [],
  9142. "responses": {
  9143. "200": {
  9144. "description": "Success",
  9145. "content": {
  9146. "application/json": {
  9147. "schema": {
  9148. "type": "array",
  9149. "items": {
  9150. "$ref": "#/components/schemas/ProviderV2Info"
  9151. }
  9152. }
  9153. }
  9154. }
  9155. },
  9156. "400": {
  9157. "description": "InvalidRequestError",
  9158. "content": {
  9159. "application/json": {
  9160. "schema": {
  9161. "$ref": "#/components/schemas/InvalidRequestError"
  9162. }
  9163. }
  9164. }
  9165. },
  9166. "401": {
  9167. "description": "UnauthorizedError",
  9168. "content": {
  9169. "application/json": {
  9170. "schema": {
  9171. "$ref": "#/components/schemas/UnauthorizedError"
  9172. }
  9173. }
  9174. }
  9175. },
  9176. "503": {
  9177. "description": "ServiceUnavailableError",
  9178. "content": {
  9179. "application/json": {
  9180. "schema": {
  9181. "$ref": "#/components/schemas/ServiceUnavailableError"
  9182. }
  9183. }
  9184. }
  9185. }
  9186. },
  9187. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  9188. "summary": "List v2 providers",
  9189. "x-codeSamples": [
  9190. {
  9191. "lang": "js",
  9192. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  9193. }
  9194. ]
  9195. }
  9196. },
  9197. "/api/provider/{providerID}": {
  9198. "get": {
  9199. "tags": ["v2 providers"],
  9200. "operationId": "v2.provider.get",
  9201. "parameters": [
  9202. {
  9203. "name": "providerID",
  9204. "in": "path",
  9205. "schema": {
  9206. "type": "string"
  9207. },
  9208. "required": true
  9209. },
  9210. {
  9211. "name": "location",
  9212. "in": "query",
  9213. "schema": {
  9214. "type": "object",
  9215. "properties": {
  9216. "directory": {
  9217. "type": "string"
  9218. },
  9219. "workspace": {
  9220. "type": "string"
  9221. }
  9222. },
  9223. "additionalProperties": false
  9224. },
  9225. "required": false,
  9226. "style": "deepObject",
  9227. "explode": true
  9228. }
  9229. ],
  9230. "security": [],
  9231. "responses": {
  9232. "200": {
  9233. "description": "ProviderV2.Info",
  9234. "content": {
  9235. "application/json": {
  9236. "schema": {
  9237. "$ref": "#/components/schemas/ProviderV2Info"
  9238. }
  9239. }
  9240. }
  9241. },
  9242. "400": {
  9243. "description": "InvalidRequestError",
  9244. "content": {
  9245. "application/json": {
  9246. "schema": {
  9247. "$ref": "#/components/schemas/InvalidRequestError"
  9248. }
  9249. }
  9250. }
  9251. },
  9252. "401": {
  9253. "description": "UnauthorizedError",
  9254. "content": {
  9255. "application/json": {
  9256. "schema": {
  9257. "$ref": "#/components/schemas/UnauthorizedError"
  9258. }
  9259. }
  9260. }
  9261. },
  9262. "404": {
  9263. "description": "ProviderNotFoundError",
  9264. "content": {
  9265. "application/json": {
  9266. "schema": {
  9267. "$ref": "#/components/schemas/ProviderNotFoundError"
  9268. }
  9269. }
  9270. }
  9271. },
  9272. "503": {
  9273. "description": "ServiceUnavailableError",
  9274. "content": {
  9275. "application/json": {
  9276. "schema": {
  9277. "$ref": "#/components/schemas/ServiceUnavailableError"
  9278. }
  9279. }
  9280. }
  9281. }
  9282. },
  9283. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  9284. "summary": "Get v2 provider",
  9285. "x-codeSamples": [
  9286. {
  9287. "lang": "js",
  9288. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  9289. }
  9290. ]
  9291. }
  9292. },
  9293. "/api/permission/request": {
  9294. "get": {
  9295. "tags": ["v2 permissions"],
  9296. "operationId": "v2.permission.request.list",
  9297. "parameters": [
  9298. {
  9299. "name": "location",
  9300. "in": "query",
  9301. "schema": {
  9302. "type": "object",
  9303. "properties": {
  9304. "directory": {
  9305. "type": "string"
  9306. },
  9307. "workspace": {
  9308. "type": "string"
  9309. }
  9310. },
  9311. "additionalProperties": false
  9312. },
  9313. "required": false,
  9314. "style": "deepObject",
  9315. "explode": true
  9316. }
  9317. ],
  9318. "security": [],
  9319. "responses": {
  9320. "200": {
  9321. "description": "Success",
  9322. "content": {
  9323. "application/json": {
  9324. "schema": {
  9325. "type": "array",
  9326. "items": {
  9327. "$ref": "#/components/schemas/PermissionV2Request"
  9328. }
  9329. }
  9330. }
  9331. }
  9332. },
  9333. "400": {
  9334. "description": "InvalidRequestError",
  9335. "content": {
  9336. "application/json": {
  9337. "schema": {
  9338. "$ref": "#/components/schemas/InvalidRequestError"
  9339. }
  9340. }
  9341. }
  9342. },
  9343. "401": {
  9344. "description": "UnauthorizedError",
  9345. "content": {
  9346. "application/json": {
  9347. "schema": {
  9348. "$ref": "#/components/schemas/UnauthorizedError"
  9349. }
  9350. }
  9351. }
  9352. }
  9353. },
  9354. "description": "Retrieve pending permission requests for a location.",
  9355. "summary": "List pending permission requests",
  9356. "x-codeSamples": [
  9357. {
  9358. "lang": "js",
  9359. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  9360. }
  9361. ]
  9362. }
  9363. },
  9364. "/api/session/{sessionID}/permission/request": {
  9365. "get": {
  9366. "tags": ["v2 session permissions"],
  9367. "operationId": "v2.session.permission.list",
  9368. "parameters": [
  9369. {
  9370. "name": "sessionID",
  9371. "in": "path",
  9372. "schema": {
  9373. "type": "string",
  9374. "pattern": "^ses"
  9375. },
  9376. "required": true
  9377. }
  9378. ],
  9379. "security": [],
  9380. "responses": {
  9381. "200": {
  9382. "description": "Success",
  9383. "content": {
  9384. "application/json": {
  9385. "schema": {
  9386. "type": "array",
  9387. "items": {
  9388. "$ref": "#/components/schemas/PermissionV2Request"
  9389. }
  9390. }
  9391. }
  9392. }
  9393. },
  9394. "400": {
  9395. "description": "InvalidRequestError",
  9396. "content": {
  9397. "application/json": {
  9398. "schema": {
  9399. "$ref": "#/components/schemas/InvalidRequestError"
  9400. }
  9401. }
  9402. }
  9403. },
  9404. "401": {
  9405. "description": "UnauthorizedError",
  9406. "content": {
  9407. "application/json": {
  9408. "schema": {
  9409. "$ref": "#/components/schemas/UnauthorizedError"
  9410. }
  9411. }
  9412. }
  9413. },
  9414. "404": {
  9415. "description": "SessionNotFoundError",
  9416. "content": {
  9417. "application/json": {
  9418. "schema": {
  9419. "$ref": "#/components/schemas/SessionNotFoundError"
  9420. }
  9421. }
  9422. }
  9423. }
  9424. },
  9425. "description": "Retrieve pending permission requests owned by a session.",
  9426. "summary": "List session permission requests",
  9427. "x-codeSamples": [
  9428. {
  9429. "lang": "js",
  9430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  9431. }
  9432. ]
  9433. }
  9434. },
  9435. "/api/session/{sessionID}/permission/request/{requestID}/reply": {
  9436. "post": {
  9437. "tags": ["v2 session permissions"],
  9438. "operationId": "v2.session.permission.reply",
  9439. "parameters": [
  9440. {
  9441. "name": "sessionID",
  9442. "in": "path",
  9443. "schema": {
  9444. "type": "string",
  9445. "pattern": "^ses"
  9446. },
  9447. "required": true
  9448. },
  9449. {
  9450. "name": "requestID",
  9451. "in": "path",
  9452. "schema": {
  9453. "type": "string",
  9454. "pattern": "^per"
  9455. },
  9456. "required": true
  9457. }
  9458. ],
  9459. "security": [],
  9460. "responses": {
  9461. "204": {
  9462. "description": "<No Content>"
  9463. },
  9464. "400": {
  9465. "description": "InvalidRequestError",
  9466. "content": {
  9467. "application/json": {
  9468. "schema": {
  9469. "$ref": "#/components/schemas/InvalidRequestError"
  9470. }
  9471. }
  9472. }
  9473. },
  9474. "401": {
  9475. "description": "UnauthorizedError",
  9476. "content": {
  9477. "application/json": {
  9478. "schema": {
  9479. "$ref": "#/components/schemas/UnauthorizedError"
  9480. }
  9481. }
  9482. }
  9483. },
  9484. "404": {
  9485. "description": "SessionNotFoundError | PermissionNotFoundError",
  9486. "content": {
  9487. "application/json": {
  9488. "schema": {
  9489. "anyOf": [
  9490. {
  9491. "$ref": "#/components/schemas/SessionNotFoundError"
  9492. },
  9493. {
  9494. "$ref": "#/components/schemas/PermissionNotFoundError"
  9495. }
  9496. ]
  9497. }
  9498. }
  9499. }
  9500. }
  9501. },
  9502. "description": "Respond to a pending permission request owned by a session.",
  9503. "summary": "Reply to pending permission request",
  9504. "requestBody": {
  9505. "content": {
  9506. "application/json": {
  9507. "schema": {
  9508. "type": "object",
  9509. "properties": {
  9510. "reply": {
  9511. "$ref": "#/components/schemas/PermissionV2Reply"
  9512. },
  9513. "message": {
  9514. "type": "string"
  9515. }
  9516. },
  9517. "required": ["reply"],
  9518. "additionalProperties": false
  9519. }
  9520. }
  9521. }
  9522. },
  9523. "x-codeSamples": [
  9524. {
  9525. "lang": "js",
  9526. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  9527. }
  9528. ]
  9529. }
  9530. },
  9531. "/api/permission/saved": {
  9532. "get": {
  9533. "tags": ["v2 saved permissions"],
  9534. "operationId": "v2.permission.saved.list",
  9535. "parameters": [
  9536. {
  9537. "name": "projectID",
  9538. "in": "query",
  9539. "schema": {
  9540. "type": "string"
  9541. },
  9542. "required": false
  9543. }
  9544. ],
  9545. "security": [],
  9546. "responses": {
  9547. "200": {
  9548. "description": "Success",
  9549. "content": {
  9550. "application/json": {
  9551. "schema": {
  9552. "type": "array",
  9553. "items": {
  9554. "$ref": "#/components/schemas/PermissionSavedInfo"
  9555. }
  9556. }
  9557. }
  9558. }
  9559. },
  9560. "400": {
  9561. "description": "InvalidRequestError",
  9562. "content": {
  9563. "application/json": {
  9564. "schema": {
  9565. "$ref": "#/components/schemas/InvalidRequestError"
  9566. }
  9567. }
  9568. }
  9569. },
  9570. "401": {
  9571. "description": "UnauthorizedError",
  9572. "content": {
  9573. "application/json": {
  9574. "schema": {
  9575. "$ref": "#/components/schemas/UnauthorizedError"
  9576. }
  9577. }
  9578. }
  9579. }
  9580. },
  9581. "description": "Retrieve saved permissions, optionally filtered by project.",
  9582. "summary": "List saved permissions",
  9583. "x-codeSamples": [
  9584. {
  9585. "lang": "js",
  9586. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  9587. }
  9588. ]
  9589. }
  9590. },
  9591. "/api/permission/saved/{id}": {
  9592. "delete": {
  9593. "tags": ["v2 saved permissions"],
  9594. "operationId": "v2.permission.saved.remove",
  9595. "parameters": [
  9596. {
  9597. "name": "id",
  9598. "in": "path",
  9599. "schema": {
  9600. "type": "string"
  9601. },
  9602. "required": true
  9603. }
  9604. ],
  9605. "security": [],
  9606. "responses": {
  9607. "204": {
  9608. "description": "<No Content>"
  9609. },
  9610. "400": {
  9611. "description": "InvalidRequestError",
  9612. "content": {
  9613. "application/json": {
  9614. "schema": {
  9615. "$ref": "#/components/schemas/InvalidRequestError"
  9616. }
  9617. }
  9618. }
  9619. },
  9620. "401": {
  9621. "description": "UnauthorizedError",
  9622. "content": {
  9623. "application/json": {
  9624. "schema": {
  9625. "$ref": "#/components/schemas/UnauthorizedError"
  9626. }
  9627. }
  9628. }
  9629. }
  9630. },
  9631. "description": "Remove a saved permission by ID.",
  9632. "summary": "Remove saved permission",
  9633. "x-codeSamples": [
  9634. {
  9635. "lang": "js",
  9636. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  9637. }
  9638. ]
  9639. }
  9640. },
  9641. "/api/fs/read": {
  9642. "get": {
  9643. "tags": ["v2 filesystem"],
  9644. "operationId": "v2.fs.read",
  9645. "parameters": [
  9646. {
  9647. "name": "location",
  9648. "in": "query",
  9649. "schema": {
  9650. "type": "object",
  9651. "properties": {
  9652. "directory": {
  9653. "type": "string"
  9654. },
  9655. "workspace": {
  9656. "type": "string"
  9657. }
  9658. },
  9659. "additionalProperties": false
  9660. },
  9661. "required": false,
  9662. "style": "deepObject",
  9663. "explode": true
  9664. },
  9665. {
  9666. "name": "path",
  9667. "in": "query",
  9668. "schema": {
  9669. "type": "string"
  9670. },
  9671. "required": true
  9672. },
  9673. {
  9674. "name": "reference",
  9675. "in": "query",
  9676. "schema": {
  9677. "type": "string"
  9678. },
  9679. "required": false
  9680. }
  9681. ],
  9682. "security": [],
  9683. "responses": {
  9684. "200": {
  9685. "description": "Success",
  9686. "content": {
  9687. "application/json": {
  9688. "schema": {
  9689. "anyOf": [
  9690. {
  9691. "$ref": "#/components/schemas/LocationFileSystemTextContent"
  9692. },
  9693. {
  9694. "$ref": "#/components/schemas/LocationFileSystemBinaryContent"
  9695. }
  9696. ]
  9697. }
  9698. }
  9699. }
  9700. },
  9701. "400": {
  9702. "description": "InvalidRequestError",
  9703. "content": {
  9704. "application/json": {
  9705. "schema": {
  9706. "$ref": "#/components/schemas/InvalidRequestError"
  9707. }
  9708. }
  9709. }
  9710. },
  9711. "401": {
  9712. "description": "UnauthorizedError",
  9713. "content": {
  9714. "application/json": {
  9715. "schema": {
  9716. "$ref": "#/components/schemas/UnauthorizedError"
  9717. }
  9718. }
  9719. }
  9720. }
  9721. },
  9722. "description": "Read one file relative to the requested location.",
  9723. "summary": "Read file",
  9724. "x-codeSamples": [
  9725. {
  9726. "lang": "js",
  9727. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  9728. }
  9729. ]
  9730. }
  9731. },
  9732. "/api/fs/list": {
  9733. "get": {
  9734. "tags": ["v2 filesystem"],
  9735. "operationId": "v2.fs.list",
  9736. "parameters": [
  9737. {
  9738. "name": "location",
  9739. "in": "query",
  9740. "schema": {
  9741. "type": "object",
  9742. "properties": {
  9743. "directory": {
  9744. "type": "string"
  9745. },
  9746. "workspace": {
  9747. "type": "string"
  9748. }
  9749. },
  9750. "additionalProperties": false
  9751. },
  9752. "required": false,
  9753. "style": "deepObject",
  9754. "explode": true
  9755. },
  9756. {
  9757. "name": "path",
  9758. "in": "query",
  9759. "schema": {
  9760. "type": "string"
  9761. },
  9762. "required": false
  9763. },
  9764. {
  9765. "name": "reference",
  9766. "in": "query",
  9767. "schema": {
  9768. "type": "string"
  9769. },
  9770. "required": false
  9771. }
  9772. ],
  9773. "security": [],
  9774. "responses": {
  9775. "200": {
  9776. "description": "Success",
  9777. "content": {
  9778. "application/json": {
  9779. "schema": {
  9780. "type": "array",
  9781. "items": {
  9782. "$ref": "#/components/schemas/LocationFileSystemEntry"
  9783. }
  9784. }
  9785. }
  9786. }
  9787. },
  9788. "400": {
  9789. "description": "InvalidRequestError",
  9790. "content": {
  9791. "application/json": {
  9792. "schema": {
  9793. "$ref": "#/components/schemas/InvalidRequestError"
  9794. }
  9795. }
  9796. }
  9797. },
  9798. "401": {
  9799. "description": "UnauthorizedError",
  9800. "content": {
  9801. "application/json": {
  9802. "schema": {
  9803. "$ref": "#/components/schemas/UnauthorizedError"
  9804. }
  9805. }
  9806. }
  9807. }
  9808. },
  9809. "description": "List direct children of one directory relative to the requested location.",
  9810. "summary": "List directory",
  9811. "x-codeSamples": [
  9812. {
  9813. "lang": "js",
  9814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  9815. }
  9816. ]
  9817. }
  9818. },
  9819. "/tui/append-prompt": {
  9820. "post": {
  9821. "tags": ["tui"],
  9822. "operationId": "tui.appendPrompt",
  9823. "parameters": [
  9824. {
  9825. "name": "directory",
  9826. "in": "query",
  9827. "schema": {
  9828. "type": "string"
  9829. },
  9830. "required": false
  9831. },
  9832. {
  9833. "name": "workspace",
  9834. "in": "query",
  9835. "schema": {
  9836. "type": "string"
  9837. },
  9838. "required": false
  9839. }
  9840. ],
  9841. "responses": {
  9842. "200": {
  9843. "description": "Prompt processed successfully",
  9844. "content": {
  9845. "application/json": {
  9846. "schema": {
  9847. "type": "boolean",
  9848. "description": "Prompt processed successfully"
  9849. }
  9850. }
  9851. }
  9852. },
  9853. "400": {
  9854. "description": "BadRequest | InvalidRequestError",
  9855. "content": {
  9856. "application/json": {
  9857. "schema": {
  9858. "anyOf": [
  9859. {
  9860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9861. },
  9862. {
  9863. "$ref": "#/components/schemas/InvalidRequestError"
  9864. }
  9865. ]
  9866. }
  9867. }
  9868. }
  9869. }
  9870. },
  9871. "description": "Append prompt to the TUI.",
  9872. "summary": "Append TUI prompt",
  9873. "requestBody": {
  9874. "content": {
  9875. "application/json": {
  9876. "schema": {
  9877. "type": "object",
  9878. "properties": {
  9879. "text": {
  9880. "type": "string"
  9881. }
  9882. },
  9883. "required": ["text"],
  9884. "additionalProperties": false
  9885. }
  9886. }
  9887. }
  9888. },
  9889. "x-codeSamples": [
  9890. {
  9891. "lang": "js",
  9892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9893. }
  9894. ]
  9895. }
  9896. },
  9897. "/tui/open-help": {
  9898. "post": {
  9899. "tags": ["tui"],
  9900. "operationId": "tui.openHelp",
  9901. "parameters": [
  9902. {
  9903. "name": "directory",
  9904. "in": "query",
  9905. "schema": {
  9906. "type": "string"
  9907. },
  9908. "required": false
  9909. },
  9910. {
  9911. "name": "workspace",
  9912. "in": "query",
  9913. "schema": {
  9914. "type": "string"
  9915. },
  9916. "required": false
  9917. }
  9918. ],
  9919. "responses": {
  9920. "200": {
  9921. "description": "Help dialog opened successfully",
  9922. "content": {
  9923. "application/json": {
  9924. "schema": {
  9925. "type": "boolean",
  9926. "description": "Help dialog opened successfully"
  9927. }
  9928. }
  9929. }
  9930. },
  9931. "400": {
  9932. "description": "Bad request",
  9933. "content": {
  9934. "application/json": {
  9935. "schema": {
  9936. "$ref": "#/components/schemas/BadRequestError"
  9937. }
  9938. }
  9939. }
  9940. }
  9941. },
  9942. "description": "Open the help dialog in the TUI to display user assistance information.",
  9943. "summary": "Open help dialog",
  9944. "x-codeSamples": [
  9945. {
  9946. "lang": "js",
  9947. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9948. }
  9949. ]
  9950. }
  9951. },
  9952. "/tui/open-sessions": {
  9953. "post": {
  9954. "tags": ["tui"],
  9955. "operationId": "tui.openSessions",
  9956. "parameters": [
  9957. {
  9958. "name": "directory",
  9959. "in": "query",
  9960. "schema": {
  9961. "type": "string"
  9962. },
  9963. "required": false
  9964. },
  9965. {
  9966. "name": "workspace",
  9967. "in": "query",
  9968. "schema": {
  9969. "type": "string"
  9970. },
  9971. "required": false
  9972. }
  9973. ],
  9974. "responses": {
  9975. "200": {
  9976. "description": "Session dialog opened successfully",
  9977. "content": {
  9978. "application/json": {
  9979. "schema": {
  9980. "type": "boolean",
  9981. "description": "Session dialog opened successfully"
  9982. }
  9983. }
  9984. }
  9985. },
  9986. "400": {
  9987. "description": "Bad request",
  9988. "content": {
  9989. "application/json": {
  9990. "schema": {
  9991. "$ref": "#/components/schemas/BadRequestError"
  9992. }
  9993. }
  9994. }
  9995. }
  9996. },
  9997. "description": "Open the session dialog.",
  9998. "summary": "Open sessions dialog",
  9999. "x-codeSamples": [
  10000. {
  10001. "lang": "js",
  10002. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  10003. }
  10004. ]
  10005. }
  10006. },
  10007. "/tui/open-themes": {
  10008. "post": {
  10009. "tags": ["tui"],
  10010. "operationId": "tui.openThemes",
  10011. "parameters": [
  10012. {
  10013. "name": "directory",
  10014. "in": "query",
  10015. "schema": {
  10016. "type": "string"
  10017. },
  10018. "required": false
  10019. },
  10020. {
  10021. "name": "workspace",
  10022. "in": "query",
  10023. "schema": {
  10024. "type": "string"
  10025. },
  10026. "required": false
  10027. }
  10028. ],
  10029. "responses": {
  10030. "200": {
  10031. "description": "Theme dialog opened successfully",
  10032. "content": {
  10033. "application/json": {
  10034. "schema": {
  10035. "type": "boolean",
  10036. "description": "Theme dialog opened successfully"
  10037. }
  10038. }
  10039. }
  10040. },
  10041. "400": {
  10042. "description": "Bad request",
  10043. "content": {
  10044. "application/json": {
  10045. "schema": {
  10046. "$ref": "#/components/schemas/BadRequestError"
  10047. }
  10048. }
  10049. }
  10050. }
  10051. },
  10052. "description": "Open the theme dialog.",
  10053. "summary": "Open themes dialog",
  10054. "x-codeSamples": [
  10055. {
  10056. "lang": "js",
  10057. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  10058. }
  10059. ]
  10060. }
  10061. },
  10062. "/tui/open-models": {
  10063. "post": {
  10064. "tags": ["tui"],
  10065. "operationId": "tui.openModels",
  10066. "parameters": [
  10067. {
  10068. "name": "directory",
  10069. "in": "query",
  10070. "schema": {
  10071. "type": "string"
  10072. },
  10073. "required": false
  10074. },
  10075. {
  10076. "name": "workspace",
  10077. "in": "query",
  10078. "schema": {
  10079. "type": "string"
  10080. },
  10081. "required": false
  10082. }
  10083. ],
  10084. "responses": {
  10085. "200": {
  10086. "description": "Model dialog opened successfully",
  10087. "content": {
  10088. "application/json": {
  10089. "schema": {
  10090. "type": "boolean",
  10091. "description": "Model dialog opened successfully"
  10092. }
  10093. }
  10094. }
  10095. },
  10096. "400": {
  10097. "description": "Bad request",
  10098. "content": {
  10099. "application/json": {
  10100. "schema": {
  10101. "$ref": "#/components/schemas/BadRequestError"
  10102. }
  10103. }
  10104. }
  10105. }
  10106. },
  10107. "description": "Open the model dialog.",
  10108. "summary": "Open models dialog",
  10109. "x-codeSamples": [
  10110. {
  10111. "lang": "js",
  10112. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  10113. }
  10114. ]
  10115. }
  10116. },
  10117. "/tui/submit-prompt": {
  10118. "post": {
  10119. "tags": ["tui"],
  10120. "operationId": "tui.submitPrompt",
  10121. "parameters": [
  10122. {
  10123. "name": "directory",
  10124. "in": "query",
  10125. "schema": {
  10126. "type": "string"
  10127. },
  10128. "required": false
  10129. },
  10130. {
  10131. "name": "workspace",
  10132. "in": "query",
  10133. "schema": {
  10134. "type": "string"
  10135. },
  10136. "required": false
  10137. }
  10138. ],
  10139. "responses": {
  10140. "200": {
  10141. "description": "Prompt submitted successfully",
  10142. "content": {
  10143. "application/json": {
  10144. "schema": {
  10145. "type": "boolean",
  10146. "description": "Prompt submitted successfully"
  10147. }
  10148. }
  10149. }
  10150. },
  10151. "400": {
  10152. "description": "Bad request",
  10153. "content": {
  10154. "application/json": {
  10155. "schema": {
  10156. "$ref": "#/components/schemas/BadRequestError"
  10157. }
  10158. }
  10159. }
  10160. }
  10161. },
  10162. "description": "Submit the prompt.",
  10163. "summary": "Submit TUI prompt",
  10164. "x-codeSamples": [
  10165. {
  10166. "lang": "js",
  10167. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  10168. }
  10169. ]
  10170. }
  10171. },
  10172. "/tui/clear-prompt": {
  10173. "post": {
  10174. "tags": ["tui"],
  10175. "operationId": "tui.clearPrompt",
  10176. "parameters": [
  10177. {
  10178. "name": "directory",
  10179. "in": "query",
  10180. "schema": {
  10181. "type": "string"
  10182. },
  10183. "required": false
  10184. },
  10185. {
  10186. "name": "workspace",
  10187. "in": "query",
  10188. "schema": {
  10189. "type": "string"
  10190. },
  10191. "required": false
  10192. }
  10193. ],
  10194. "responses": {
  10195. "200": {
  10196. "description": "Prompt cleared successfully",
  10197. "content": {
  10198. "application/json": {
  10199. "schema": {
  10200. "type": "boolean",
  10201. "description": "Prompt cleared successfully"
  10202. }
  10203. }
  10204. }
  10205. },
  10206. "400": {
  10207. "description": "Bad request",
  10208. "content": {
  10209. "application/json": {
  10210. "schema": {
  10211. "$ref": "#/components/schemas/BadRequestError"
  10212. }
  10213. }
  10214. }
  10215. }
  10216. },
  10217. "description": "Clear the prompt.",
  10218. "summary": "Clear TUI prompt",
  10219. "x-codeSamples": [
  10220. {
  10221. "lang": "js",
  10222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  10223. }
  10224. ]
  10225. }
  10226. },
  10227. "/tui/execute-command": {
  10228. "post": {
  10229. "tags": ["tui"],
  10230. "operationId": "tui.executeCommand",
  10231. "parameters": [
  10232. {
  10233. "name": "directory",
  10234. "in": "query",
  10235. "schema": {
  10236. "type": "string"
  10237. },
  10238. "required": false
  10239. },
  10240. {
  10241. "name": "workspace",
  10242. "in": "query",
  10243. "schema": {
  10244. "type": "string"
  10245. },
  10246. "required": false
  10247. }
  10248. ],
  10249. "responses": {
  10250. "200": {
  10251. "description": "Command executed successfully",
  10252. "content": {
  10253. "application/json": {
  10254. "schema": {
  10255. "type": "boolean",
  10256. "description": "Command executed successfully"
  10257. }
  10258. }
  10259. }
  10260. },
  10261. "400": {
  10262. "description": "BadRequest | InvalidRequestError",
  10263. "content": {
  10264. "application/json": {
  10265. "schema": {
  10266. "anyOf": [
  10267. {
  10268. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10269. },
  10270. {
  10271. "$ref": "#/components/schemas/InvalidRequestError"
  10272. }
  10273. ]
  10274. }
  10275. }
  10276. }
  10277. }
  10278. },
  10279. "description": "Execute a TUI command.",
  10280. "summary": "Execute TUI command",
  10281. "requestBody": {
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "type": "object",
  10286. "properties": {
  10287. "command": {
  10288. "type": "string"
  10289. }
  10290. },
  10291. "required": ["command"],
  10292. "additionalProperties": false
  10293. }
  10294. }
  10295. }
  10296. },
  10297. "x-codeSamples": [
  10298. {
  10299. "lang": "js",
  10300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  10301. }
  10302. ]
  10303. }
  10304. },
  10305. "/tui/show-toast": {
  10306. "post": {
  10307. "tags": ["tui"],
  10308. "operationId": "tui.showToast",
  10309. "parameters": [
  10310. {
  10311. "name": "directory",
  10312. "in": "query",
  10313. "schema": {
  10314. "type": "string"
  10315. },
  10316. "required": false
  10317. },
  10318. {
  10319. "name": "workspace",
  10320. "in": "query",
  10321. "schema": {
  10322. "type": "string"
  10323. },
  10324. "required": false
  10325. }
  10326. ],
  10327. "responses": {
  10328. "200": {
  10329. "description": "Toast notification shown successfully",
  10330. "content": {
  10331. "application/json": {
  10332. "schema": {
  10333. "type": "boolean",
  10334. "description": "Toast notification shown successfully"
  10335. }
  10336. }
  10337. }
  10338. },
  10339. "400": {
  10340. "description": "Bad request",
  10341. "content": {
  10342. "application/json": {
  10343. "schema": {
  10344. "$ref": "#/components/schemas/BadRequestError"
  10345. }
  10346. }
  10347. }
  10348. }
  10349. },
  10350. "description": "Show a toast notification in the TUI.",
  10351. "summary": "Show TUI toast",
  10352. "requestBody": {
  10353. "content": {
  10354. "application/json": {
  10355. "schema": {
  10356. "type": "object",
  10357. "properties": {
  10358. "title": {
  10359. "type": "string"
  10360. },
  10361. "message": {
  10362. "type": "string"
  10363. },
  10364. "variant": {
  10365. "type": "string",
  10366. "enum": ["info", "success", "warning", "error"]
  10367. },
  10368. "duration": {
  10369. "type": "integer",
  10370. "exclusiveMinimum": 0
  10371. }
  10372. },
  10373. "required": ["message", "variant"],
  10374. "additionalProperties": false
  10375. }
  10376. }
  10377. }
  10378. },
  10379. "x-codeSamples": [
  10380. {
  10381. "lang": "js",
  10382. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  10383. }
  10384. ]
  10385. }
  10386. },
  10387. "/tui/publish": {
  10388. "post": {
  10389. "tags": ["tui"],
  10390. "operationId": "tui.publish",
  10391. "parameters": [
  10392. {
  10393. "name": "directory",
  10394. "in": "query",
  10395. "schema": {
  10396. "type": "string"
  10397. },
  10398. "required": false
  10399. },
  10400. {
  10401. "name": "workspace",
  10402. "in": "query",
  10403. "schema": {
  10404. "type": "string"
  10405. },
  10406. "required": false
  10407. }
  10408. ],
  10409. "responses": {
  10410. "200": {
  10411. "description": "Event published successfully",
  10412. "content": {
  10413. "application/json": {
  10414. "schema": {
  10415. "type": "boolean",
  10416. "description": "Event published successfully"
  10417. }
  10418. }
  10419. }
  10420. },
  10421. "400": {
  10422. "description": "BadRequest | InvalidRequestError",
  10423. "content": {
  10424. "application/json": {
  10425. "schema": {
  10426. "anyOf": [
  10427. {
  10428. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10429. },
  10430. {
  10431. "$ref": "#/components/schemas/InvalidRequestError"
  10432. }
  10433. ]
  10434. }
  10435. }
  10436. }
  10437. }
  10438. },
  10439. "description": "Publish a TUI event.",
  10440. "summary": "Publish TUI event",
  10441. "requestBody": {
  10442. "content": {
  10443. "application/json": {
  10444. "schema": {
  10445. "anyOf": [
  10446. {
  10447. "$ref": "#/components/schemas/EventTuiPromptAppend"
  10448. },
  10449. {
  10450. "$ref": "#/components/schemas/EventTuiCommandExecute"
  10451. },
  10452. {
  10453. "$ref": "#/components/schemas/EventTuiToastShow"
  10454. },
  10455. {
  10456. "$ref": "#/components/schemas/EventTuiSessionSelect"
  10457. }
  10458. ]
  10459. }
  10460. }
  10461. }
  10462. },
  10463. "x-codeSamples": [
  10464. {
  10465. "lang": "js",
  10466. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  10467. }
  10468. ]
  10469. }
  10470. },
  10471. "/tui/select-session": {
  10472. "post": {
  10473. "tags": ["tui"],
  10474. "operationId": "tui.selectSession",
  10475. "parameters": [
  10476. {
  10477. "name": "directory",
  10478. "in": "query",
  10479. "schema": {
  10480. "type": "string"
  10481. },
  10482. "required": false
  10483. },
  10484. {
  10485. "name": "workspace",
  10486. "in": "query",
  10487. "schema": {
  10488. "type": "string"
  10489. },
  10490. "required": false
  10491. }
  10492. ],
  10493. "responses": {
  10494. "200": {
  10495. "description": "Session selected successfully",
  10496. "content": {
  10497. "application/json": {
  10498. "schema": {
  10499. "type": "boolean",
  10500. "description": "Session selected successfully"
  10501. }
  10502. }
  10503. }
  10504. },
  10505. "400": {
  10506. "description": "BadRequest | InvalidRequestError",
  10507. "content": {
  10508. "application/json": {
  10509. "schema": {
  10510. "anyOf": [
  10511. {
  10512. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10513. },
  10514. {
  10515. "$ref": "#/components/schemas/InvalidRequestError"
  10516. }
  10517. ]
  10518. }
  10519. }
  10520. }
  10521. },
  10522. "404": {
  10523. "description": "NotFoundError",
  10524. "content": {
  10525. "application/json": {
  10526. "schema": {
  10527. "$ref": "#/components/schemas/NotFoundError"
  10528. }
  10529. }
  10530. }
  10531. }
  10532. },
  10533. "description": "Navigate the TUI to display the specified session.",
  10534. "summary": "Select session",
  10535. "requestBody": {
  10536. "content": {
  10537. "application/json": {
  10538. "schema": {
  10539. "type": "object",
  10540. "properties": {
  10541. "sessionID": {
  10542. "type": "string",
  10543. "pattern": "^ses",
  10544. "description": "Session ID to navigate to"
  10545. }
  10546. },
  10547. "required": ["sessionID"],
  10548. "additionalProperties": false
  10549. }
  10550. }
  10551. }
  10552. },
  10553. "x-codeSamples": [
  10554. {
  10555. "lang": "js",
  10556. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  10557. }
  10558. ]
  10559. }
  10560. },
  10561. "/tui/control/next": {
  10562. "get": {
  10563. "tags": ["tui"],
  10564. "operationId": "tui.control.next",
  10565. "parameters": [
  10566. {
  10567. "name": "directory",
  10568. "in": "query",
  10569. "schema": {
  10570. "type": "string"
  10571. },
  10572. "required": false
  10573. },
  10574. {
  10575. "name": "workspace",
  10576. "in": "query",
  10577. "schema": {
  10578. "type": "string"
  10579. },
  10580. "required": false
  10581. }
  10582. ],
  10583. "responses": {
  10584. "200": {
  10585. "description": "Next TUI request",
  10586. "content": {
  10587. "application/json": {
  10588. "schema": {
  10589. "type": "object",
  10590. "properties": {
  10591. "path": {
  10592. "type": "string"
  10593. },
  10594. "body": {}
  10595. },
  10596. "required": ["path", "body"],
  10597. "additionalProperties": false,
  10598. "description": "Next TUI request"
  10599. }
  10600. }
  10601. }
  10602. },
  10603. "400": {
  10604. "description": "Bad request",
  10605. "content": {
  10606. "application/json": {
  10607. "schema": {
  10608. "$ref": "#/components/schemas/BadRequestError"
  10609. }
  10610. }
  10611. }
  10612. }
  10613. },
  10614. "description": "Retrieve the next TUI request from the queue for processing.",
  10615. "summary": "Get next TUI request",
  10616. "x-codeSamples": [
  10617. {
  10618. "lang": "js",
  10619. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  10620. }
  10621. ]
  10622. }
  10623. },
  10624. "/tui/control/response": {
  10625. "post": {
  10626. "tags": ["tui"],
  10627. "operationId": "tui.control.response",
  10628. "parameters": [
  10629. {
  10630. "name": "directory",
  10631. "in": "query",
  10632. "schema": {
  10633. "type": "string"
  10634. },
  10635. "required": false
  10636. },
  10637. {
  10638. "name": "workspace",
  10639. "in": "query",
  10640. "schema": {
  10641. "type": "string"
  10642. },
  10643. "required": false
  10644. }
  10645. ],
  10646. "responses": {
  10647. "200": {
  10648. "description": "Response submitted successfully",
  10649. "content": {
  10650. "application/json": {
  10651. "schema": {
  10652. "type": "boolean",
  10653. "description": "Response submitted successfully"
  10654. }
  10655. }
  10656. }
  10657. },
  10658. "400": {
  10659. "description": "Bad request",
  10660. "content": {
  10661. "application/json": {
  10662. "schema": {
  10663. "$ref": "#/components/schemas/BadRequestError"
  10664. }
  10665. }
  10666. }
  10667. }
  10668. },
  10669. "description": "Submit a response to the TUI request queue to complete a pending request.",
  10670. "summary": "Submit TUI response",
  10671. "requestBody": {
  10672. "content": {
  10673. "application/json": {
  10674. "schema": {}
  10675. }
  10676. }
  10677. },
  10678. "x-codeSamples": [
  10679. {
  10680. "lang": "js",
  10681. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  10682. }
  10683. ]
  10684. }
  10685. },
  10686. "/experimental/workspace/adapter": {
  10687. "get": {
  10688. "tags": ["workspace"],
  10689. "operationId": "experimental.workspace.adapter.list",
  10690. "parameters": [
  10691. {
  10692. "name": "directory",
  10693. "in": "query",
  10694. "schema": {
  10695. "type": "string"
  10696. },
  10697. "required": false
  10698. },
  10699. {
  10700. "name": "workspace",
  10701. "in": "query",
  10702. "schema": {
  10703. "type": "string"
  10704. },
  10705. "required": false
  10706. }
  10707. ],
  10708. "responses": {
  10709. "200": {
  10710. "description": "Workspace adapters",
  10711. "content": {
  10712. "application/json": {
  10713. "schema": {
  10714. "type": "array",
  10715. "items": {
  10716. "type": "object",
  10717. "properties": {
  10718. "type": {
  10719. "type": "string"
  10720. },
  10721. "name": {
  10722. "type": "string"
  10723. },
  10724. "description": {
  10725. "type": "string"
  10726. }
  10727. },
  10728. "required": ["type", "name", "description"],
  10729. "additionalProperties": false
  10730. },
  10731. "description": "Workspace adapters"
  10732. }
  10733. }
  10734. }
  10735. },
  10736. "400": {
  10737. "description": "Bad request",
  10738. "content": {
  10739. "application/json": {
  10740. "schema": {
  10741. "$ref": "#/components/schemas/BadRequestError"
  10742. }
  10743. }
  10744. }
  10745. }
  10746. },
  10747. "description": "List all available workspace adapters for the current project.",
  10748. "summary": "List workspace adapters",
  10749. "x-codeSamples": [
  10750. {
  10751. "lang": "js",
  10752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  10753. }
  10754. ]
  10755. }
  10756. },
  10757. "/experimental/workspace": {
  10758. "get": {
  10759. "tags": ["workspace"],
  10760. "operationId": "experimental.workspace.list",
  10761. "parameters": [
  10762. {
  10763. "name": "directory",
  10764. "in": "query",
  10765. "schema": {
  10766. "type": "string"
  10767. },
  10768. "required": false
  10769. },
  10770. {
  10771. "name": "workspace",
  10772. "in": "query",
  10773. "schema": {
  10774. "type": "string"
  10775. },
  10776. "required": false
  10777. }
  10778. ],
  10779. "responses": {
  10780. "200": {
  10781. "description": "Workspaces",
  10782. "content": {
  10783. "application/json": {
  10784. "schema": {
  10785. "type": "array",
  10786. "items": {
  10787. "$ref": "#/components/schemas/Workspace"
  10788. },
  10789. "description": "Workspaces"
  10790. }
  10791. }
  10792. }
  10793. },
  10794. "400": {
  10795. "description": "Bad request",
  10796. "content": {
  10797. "application/json": {
  10798. "schema": {
  10799. "$ref": "#/components/schemas/BadRequestError"
  10800. }
  10801. }
  10802. }
  10803. }
  10804. },
  10805. "description": "List all workspaces.",
  10806. "summary": "List workspaces",
  10807. "x-codeSamples": [
  10808. {
  10809. "lang": "js",
  10810. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  10811. }
  10812. ]
  10813. },
  10814. "post": {
  10815. "tags": ["workspace"],
  10816. "operationId": "experimental.workspace.create",
  10817. "parameters": [
  10818. {
  10819. "name": "directory",
  10820. "in": "query",
  10821. "schema": {
  10822. "type": "string"
  10823. },
  10824. "required": false
  10825. },
  10826. {
  10827. "name": "workspace",
  10828. "in": "query",
  10829. "schema": {
  10830. "type": "string"
  10831. },
  10832. "required": false
  10833. }
  10834. ],
  10835. "responses": {
  10836. "200": {
  10837. "description": "Workspace created",
  10838. "content": {
  10839. "application/json": {
  10840. "schema": {
  10841. "$ref": "#/components/schemas/Workspace"
  10842. }
  10843. }
  10844. }
  10845. },
  10846. "400": {
  10847. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  10848. "content": {
  10849. "application/json": {
  10850. "schema": {
  10851. "anyOf": [
  10852. {
  10853. "$ref": "#/components/schemas/WorkspaceCreateError"
  10854. },
  10855. {
  10856. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10857. },
  10858. {
  10859. "$ref": "#/components/schemas/InvalidRequestError"
  10860. }
  10861. ]
  10862. }
  10863. }
  10864. }
  10865. }
  10866. },
  10867. "description": "Create a workspace for the current project.",
  10868. "summary": "Create workspace",
  10869. "requestBody": {
  10870. "content": {
  10871. "application/json": {
  10872. "schema": {
  10873. "type": "object",
  10874. "properties": {
  10875. "id": {
  10876. "type": "string",
  10877. "pattern": "^wrk"
  10878. },
  10879. "type": {
  10880. "type": "string"
  10881. },
  10882. "branch": {
  10883. "anyOf": [
  10884. {
  10885. "type": "string"
  10886. },
  10887. {
  10888. "type": "null"
  10889. }
  10890. ]
  10891. },
  10892. "extra": {
  10893. "anyOf": [
  10894. {},
  10895. {
  10896. "type": "null"
  10897. }
  10898. ]
  10899. }
  10900. },
  10901. "required": ["type"],
  10902. "additionalProperties": false
  10903. }
  10904. }
  10905. }
  10906. },
  10907. "x-codeSamples": [
  10908. {
  10909. "lang": "js",
  10910. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10911. }
  10912. ]
  10913. }
  10914. },
  10915. "/experimental/workspace/sync-list": {
  10916. "post": {
  10917. "tags": ["workspace"],
  10918. "operationId": "experimental.workspace.syncList",
  10919. "parameters": [
  10920. {
  10921. "name": "directory",
  10922. "in": "query",
  10923. "schema": {
  10924. "type": "string"
  10925. },
  10926. "required": false
  10927. },
  10928. {
  10929. "name": "workspace",
  10930. "in": "query",
  10931. "schema": {
  10932. "type": "string"
  10933. },
  10934. "required": false
  10935. }
  10936. ],
  10937. "responses": {
  10938. "204": {
  10939. "description": "Workspace list synced"
  10940. },
  10941. "400": {
  10942. "description": "Bad request",
  10943. "content": {
  10944. "application/json": {
  10945. "schema": {
  10946. "$ref": "#/components/schemas/BadRequestError"
  10947. }
  10948. }
  10949. }
  10950. }
  10951. },
  10952. "description": "Register missing workspaces returned by workspace adapters.",
  10953. "summary": "Sync workspace list",
  10954. "x-codeSamples": [
  10955. {
  10956. "lang": "js",
  10957. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10958. }
  10959. ]
  10960. }
  10961. },
  10962. "/experimental/workspace/status": {
  10963. "get": {
  10964. "tags": ["workspace"],
  10965. "operationId": "experimental.workspace.status",
  10966. "parameters": [
  10967. {
  10968. "name": "directory",
  10969. "in": "query",
  10970. "schema": {
  10971. "type": "string"
  10972. },
  10973. "required": false
  10974. },
  10975. {
  10976. "name": "workspace",
  10977. "in": "query",
  10978. "schema": {
  10979. "type": "string"
  10980. },
  10981. "required": false
  10982. }
  10983. ],
  10984. "responses": {
  10985. "200": {
  10986. "description": "Workspace status",
  10987. "content": {
  10988. "application/json": {
  10989. "schema": {
  10990. "type": "array",
  10991. "items": {
  10992. "type": "object",
  10993. "properties": {
  10994. "workspaceID": {
  10995. "type": "string",
  10996. "pattern": "^wrk"
  10997. },
  10998. "status": {
  10999. "type": "string",
  11000. "enum": ["connected", "connecting", "disconnected", "error"]
  11001. }
  11002. },
  11003. "required": ["workspaceID", "status"],
  11004. "additionalProperties": false
  11005. },
  11006. "description": "Workspace status"
  11007. }
  11008. }
  11009. }
  11010. },
  11011. "400": {
  11012. "description": "Bad request",
  11013. "content": {
  11014. "application/json": {
  11015. "schema": {
  11016. "$ref": "#/components/schemas/BadRequestError"
  11017. }
  11018. }
  11019. }
  11020. }
  11021. },
  11022. "description": "Get connection status for workspaces in the current project.",
  11023. "summary": "Workspace status",
  11024. "x-codeSamples": [
  11025. {
  11026. "lang": "js",
  11027. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  11028. }
  11029. ]
  11030. }
  11031. },
  11032. "/experimental/workspace/{id}": {
  11033. "delete": {
  11034. "tags": ["workspace"],
  11035. "operationId": "experimental.workspace.remove",
  11036. "parameters": [
  11037. {
  11038. "name": "id",
  11039. "in": "path",
  11040. "schema": {
  11041. "type": "string",
  11042. "pattern": "^wrk"
  11043. },
  11044. "required": true
  11045. },
  11046. {
  11047. "name": "directory",
  11048. "in": "query",
  11049. "schema": {
  11050. "type": "string"
  11051. },
  11052. "required": false
  11053. },
  11054. {
  11055. "name": "workspace",
  11056. "in": "query",
  11057. "schema": {
  11058. "type": "string"
  11059. },
  11060. "required": false
  11061. }
  11062. ],
  11063. "responses": {
  11064. "200": {
  11065. "description": "Workspace removed",
  11066. "content": {
  11067. "application/json": {
  11068. "schema": {
  11069. "$ref": "#/components/schemas/Workspace"
  11070. }
  11071. }
  11072. }
  11073. },
  11074. "400": {
  11075. "description": "BadRequest | InvalidRequestError",
  11076. "content": {
  11077. "application/json": {
  11078. "schema": {
  11079. "anyOf": [
  11080. {
  11081. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  11082. },
  11083. {
  11084. "$ref": "#/components/schemas/InvalidRequestError"
  11085. }
  11086. ]
  11087. }
  11088. }
  11089. }
  11090. }
  11091. },
  11092. "description": "Remove an existing workspace.",
  11093. "summary": "Remove workspace",
  11094. "x-codeSamples": [
  11095. {
  11096. "lang": "js",
  11097. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  11098. }
  11099. ]
  11100. }
  11101. },
  11102. "/experimental/workspace/warp": {
  11103. "post": {
  11104. "tags": ["workspace"],
  11105. "operationId": "experimental.workspace.warp",
  11106. "parameters": [
  11107. {
  11108. "name": "directory",
  11109. "in": "query",
  11110. "schema": {
  11111. "type": "string"
  11112. },
  11113. "required": false
  11114. },
  11115. {
  11116. "name": "workspace",
  11117. "in": "query",
  11118. "schema": {
  11119. "type": "string"
  11120. },
  11121. "required": false
  11122. }
  11123. ],
  11124. "responses": {
  11125. "204": {
  11126. "description": "Session warped"
  11127. },
  11128. "400": {
  11129. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  11130. "content": {
  11131. "application/json": {
  11132. "schema": {
  11133. "anyOf": [
  11134. {
  11135. "$ref": "#/components/schemas/WorkspaceWarpError"
  11136. },
  11137. {
  11138. "$ref": "#/components/schemas/VcsApplyError"
  11139. },
  11140. {
  11141. "$ref": "#/components/schemas/InvalidRequestError"
  11142. }
  11143. ]
  11144. }
  11145. }
  11146. }
  11147. },
  11148. "404": {
  11149. "description": "NotFoundError",
  11150. "content": {
  11151. "application/json": {
  11152. "schema": {
  11153. "$ref": "#/components/schemas/NotFoundError"
  11154. }
  11155. }
  11156. }
  11157. }
  11158. },
  11159. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  11160. "summary": "Warp session into workspace",
  11161. "requestBody": {
  11162. "content": {
  11163. "application/json": {
  11164. "schema": {
  11165. "type": "object",
  11166. "properties": {
  11167. "id": {
  11168. "anyOf": [
  11169. {
  11170. "type": "string",
  11171. "pattern": "^wrk"
  11172. },
  11173. {
  11174. "type": "null"
  11175. }
  11176. ]
  11177. },
  11178. "sessionID": {
  11179. "type": "string",
  11180. "pattern": "^ses"
  11181. },
  11182. "copyChanges": {
  11183. "type": "boolean"
  11184. }
  11185. },
  11186. "required": ["id", "sessionID"],
  11187. "additionalProperties": false
  11188. }
  11189. }
  11190. }
  11191. },
  11192. "x-codeSamples": [
  11193. {
  11194. "lang": "js",
  11195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  11196. }
  11197. ]
  11198. }
  11199. },
  11200. "/pty/{ptyID}/connect": {
  11201. "get": {
  11202. "tags": ["pty"],
  11203. "operationId": "pty.connect",
  11204. "parameters": [
  11205. {
  11206. "name": "ptyID",
  11207. "in": "path",
  11208. "schema": {
  11209. "type": "string",
  11210. "pattern": "^pty"
  11211. },
  11212. "required": true
  11213. },
  11214. {
  11215. "in": "query",
  11216. "name": "directory",
  11217. "schema": {
  11218. "type": "string"
  11219. }
  11220. },
  11221. {
  11222. "in": "query",
  11223. "name": "workspace",
  11224. "schema": {
  11225. "type": "string"
  11226. }
  11227. },
  11228. {
  11229. "in": "query",
  11230. "name": "cursor",
  11231. "schema": {
  11232. "type": "string"
  11233. }
  11234. },
  11235. {
  11236. "in": "query",
  11237. "name": "ticket",
  11238. "schema": {
  11239. "type": "string"
  11240. }
  11241. }
  11242. ],
  11243. "responses": {
  11244. "200": {
  11245. "description": "Connected session",
  11246. "content": {
  11247. "application/json": {
  11248. "schema": {
  11249. "type": "boolean",
  11250. "description": "Connected session"
  11251. }
  11252. }
  11253. }
  11254. },
  11255. "403": {
  11256. "description": "Forbidden",
  11257. "content": {
  11258. "application/json": {
  11259. "schema": {
  11260. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  11261. }
  11262. }
  11263. }
  11264. },
  11265. "404": {
  11266. "description": "Not found",
  11267. "content": {
  11268. "application/json": {
  11269. "schema": {
  11270. "$ref": "#/components/schemas/NotFoundError"
  11271. }
  11272. }
  11273. }
  11274. }
  11275. },
  11276. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  11277. "summary": "Connect to PTY session",
  11278. "x-codeSamples": [
  11279. {
  11280. "lang": "js",
  11281. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  11282. }
  11283. ]
  11284. }
  11285. }
  11286. },
  11287. "components": {
  11288. "schemas": {
  11289. "Event": {
  11290. "anyOf": [
  11291. {
  11292. "$ref": "#/components/schemas/EventModels-devRefreshed"
  11293. },
  11294. {
  11295. "$ref": "#/components/schemas/EventPluginAdded"
  11296. },
  11297. {
  11298. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  11299. },
  11300. {
  11301. "$ref": "#/components/schemas/EventSessionCreated"
  11302. },
  11303. {
  11304. "$ref": "#/components/schemas/EventSessionUpdated"
  11305. },
  11306. {
  11307. "$ref": "#/components/schemas/EventSessionDeleted"
  11308. },
  11309. {
  11310. "$ref": "#/components/schemas/EventMessageUpdated"
  11311. },
  11312. {
  11313. "$ref": "#/components/schemas/EventMessageRemoved"
  11314. },
  11315. {
  11316. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11317. },
  11318. {
  11319. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11320. },
  11321. {
  11322. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11323. },
  11324. {
  11325. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11326. },
  11327. {
  11328. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11329. },
  11330. {
  11331. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11332. },
  11333. {
  11334. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11335. },
  11336. {
  11337. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11338. },
  11339. {
  11340. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11341. },
  11342. {
  11343. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11344. },
  11345. {
  11346. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11347. },
  11348. {
  11349. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11350. },
  11351. {
  11352. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11353. },
  11354. {
  11355. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11356. },
  11357. {
  11358. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11359. },
  11360. {
  11361. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11362. },
  11363. {
  11364. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11365. },
  11366. {
  11367. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11368. },
  11369. {
  11370. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11371. },
  11372. {
  11373. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11374. },
  11375. {
  11376. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11377. },
  11378. {
  11379. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11380. },
  11381. {
  11382. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11383. },
  11384. {
  11385. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11386. },
  11387. {
  11388. "$ref": "#/components/schemas/EventSessionNextRetried"
  11389. },
  11390. {
  11391. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11392. },
  11393. {
  11394. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11395. },
  11396. {
  11397. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11398. },
  11399. {
  11400. "$ref": "#/components/schemas/EventMessagePartDelta"
  11401. },
  11402. {
  11403. "$ref": "#/components/schemas/EventSessionDiff"
  11404. },
  11405. {
  11406. "$ref": "#/components/schemas/EventSessionError"
  11407. },
  11408. {
  11409. "$ref": "#/components/schemas/EventInstallationUpdated"
  11410. },
  11411. {
  11412. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11413. },
  11414. {
  11415. "$ref": "#/components/schemas/EventPermissionV2Asked"
  11416. },
  11417. {
  11418. "$ref": "#/components/schemas/EventPermissionV2Replied"
  11419. },
  11420. {
  11421. "$ref": "#/components/schemas/EventFileEdited"
  11422. },
  11423. {
  11424. "$ref": "#/components/schemas/EventAccountAdded"
  11425. },
  11426. {
  11427. "$ref": "#/components/schemas/EventAccountRemoved"
  11428. },
  11429. {
  11430. "$ref": "#/components/schemas/EventAccountSwitched"
  11431. },
  11432. {
  11433. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11434. },
  11435. {
  11436. "$ref": "#/components/schemas/EventPtyCreated"
  11437. },
  11438. {
  11439. "$ref": "#/components/schemas/EventPtyUpdated"
  11440. },
  11441. {
  11442. "$ref": "#/components/schemas/EventPtyExited"
  11443. },
  11444. {
  11445. "$ref": "#/components/schemas/EventPtyDeleted"
  11446. },
  11447. {
  11448. "$ref": "#/components/schemas/EventLspUpdated"
  11449. },
  11450. {
  11451. "$ref": "#/components/schemas/EventPermissionAsked"
  11452. },
  11453. {
  11454. "$ref": "#/components/schemas/EventPermissionReplied"
  11455. },
  11456. {
  11457. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11458. },
  11459. {
  11460. "$ref": "#/components/schemas/Event.tui.command.execute"
  11461. },
  11462. {
  11463. "$ref": "#/components/schemas/Event.tui.toast.show"
  11464. },
  11465. {
  11466. "$ref": "#/components/schemas/Event.tui.session.select"
  11467. },
  11468. {
  11469. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11470. },
  11471. {
  11472. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11473. },
  11474. {
  11475. "$ref": "#/components/schemas/EventCommandExecuted"
  11476. },
  11477. {
  11478. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  11479. },
  11480. {
  11481. "$ref": "#/components/schemas/EventProjectUpdated"
  11482. },
  11483. {
  11484. "$ref": "#/components/schemas/EventQuestionAsked"
  11485. },
  11486. {
  11487. "$ref": "#/components/schemas/EventQuestionReplied"
  11488. },
  11489. {
  11490. "$ref": "#/components/schemas/EventQuestionRejected"
  11491. },
  11492. {
  11493. "$ref": "#/components/schemas/EventSessionStatus"
  11494. },
  11495. {
  11496. "$ref": "#/components/schemas/EventSessionIdle"
  11497. },
  11498. {
  11499. "$ref": "#/components/schemas/EventSessionCompacted"
  11500. },
  11501. {
  11502. "$ref": "#/components/schemas/EventTodoUpdated"
  11503. },
  11504. {
  11505. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11506. },
  11507. {
  11508. "$ref": "#/components/schemas/EventWorktreeReady"
  11509. },
  11510. {
  11511. "$ref": "#/components/schemas/EventWorktreeFailed"
  11512. },
  11513. {
  11514. "$ref": "#/components/schemas/EventWorkspaceReady"
  11515. },
  11516. {
  11517. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11518. },
  11519. {
  11520. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11521. },
  11522. {
  11523. "$ref": "#/components/schemas/EventServerConnected"
  11524. },
  11525. {
  11526. "$ref": "#/components/schemas/EventGlobalDisposed"
  11527. },
  11528. {
  11529. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11530. }
  11531. ]
  11532. },
  11533. "QuestionReplied": {
  11534. "type": "object",
  11535. "properties": {
  11536. "sessionID": {
  11537. "type": "string",
  11538. "pattern": "^ses"
  11539. },
  11540. "requestID": {
  11541. "type": "string",
  11542. "pattern": "^que"
  11543. },
  11544. "answers": {
  11545. "type": "array",
  11546. "items": {
  11547. "$ref": "#/components/schemas/QuestionAnswer"
  11548. }
  11549. }
  11550. },
  11551. "required": ["sessionID", "requestID", "answers"],
  11552. "additionalProperties": false
  11553. },
  11554. "QuestionRejected": {
  11555. "type": "object",
  11556. "properties": {
  11557. "sessionID": {
  11558. "type": "string",
  11559. "pattern": "^ses"
  11560. },
  11561. "requestID": {
  11562. "type": "string",
  11563. "pattern": "^que"
  11564. }
  11565. },
  11566. "required": ["sessionID", "requestID"],
  11567. "additionalProperties": false
  11568. },
  11569. "OAuth": {
  11570. "type": "object",
  11571. "properties": {
  11572. "type": {
  11573. "type": "string",
  11574. "enum": ["oauth"]
  11575. },
  11576. "refresh": {
  11577. "type": "string"
  11578. },
  11579. "access": {
  11580. "type": "string"
  11581. },
  11582. "expires": {
  11583. "type": "integer",
  11584. "minimum": 0
  11585. },
  11586. "accountId": {
  11587. "type": "string"
  11588. },
  11589. "enterpriseUrl": {
  11590. "type": "string"
  11591. }
  11592. },
  11593. "required": ["type", "refresh", "access", "expires"],
  11594. "additionalProperties": false
  11595. },
  11596. "ApiAuth": {
  11597. "type": "object",
  11598. "properties": {
  11599. "type": {
  11600. "type": "string",
  11601. "enum": ["api"]
  11602. },
  11603. "key": {
  11604. "type": "string"
  11605. },
  11606. "metadata": {
  11607. "type": "object",
  11608. "additionalProperties": {
  11609. "type": "string"
  11610. }
  11611. }
  11612. },
  11613. "required": ["type", "key"],
  11614. "additionalProperties": false
  11615. },
  11616. "WellKnownAuth": {
  11617. "type": "object",
  11618. "properties": {
  11619. "type": {
  11620. "type": "string",
  11621. "enum": ["wellknown"]
  11622. },
  11623. "key": {
  11624. "type": "string"
  11625. },
  11626. "token": {
  11627. "type": "string"
  11628. }
  11629. },
  11630. "required": ["type", "key", "token"],
  11631. "additionalProperties": false
  11632. },
  11633. "Auth": {
  11634. "anyOf": [
  11635. {
  11636. "$ref": "#/components/schemas/OAuth"
  11637. },
  11638. {
  11639. "$ref": "#/components/schemas/ApiAuth"
  11640. },
  11641. {
  11642. "$ref": "#/components/schemas/WellKnownAuth"
  11643. }
  11644. ]
  11645. },
  11646. "effect_HttpApiError_BadRequest": {
  11647. "type": "object",
  11648. "properties": {
  11649. "_tag": {
  11650. "type": "string",
  11651. "enum": ["BadRequest"]
  11652. }
  11653. },
  11654. "required": ["_tag"],
  11655. "additionalProperties": false
  11656. },
  11657. "InvalidRequestError": {
  11658. "type": "object",
  11659. "properties": {
  11660. "_tag": {
  11661. "type": "string",
  11662. "enum": ["InvalidRequestError"]
  11663. },
  11664. "message": {
  11665. "type": "string"
  11666. },
  11667. "kind": {
  11668. "type": "string"
  11669. },
  11670. "field": {
  11671. "type": "string"
  11672. }
  11673. },
  11674. "required": ["_tag", "message"],
  11675. "additionalProperties": false
  11676. },
  11677. "SnapshotFileDiff": {
  11678. "type": "object",
  11679. "properties": {
  11680. "file": {
  11681. "type": "string"
  11682. },
  11683. "patch": {
  11684. "type": "string"
  11685. },
  11686. "additions": {
  11687. "type": "number"
  11688. },
  11689. "deletions": {
  11690. "type": "number"
  11691. },
  11692. "status": {
  11693. "type": "string",
  11694. "enum": ["added", "deleted", "modified"]
  11695. }
  11696. },
  11697. "required": ["additions", "deletions"],
  11698. "additionalProperties": false
  11699. },
  11700. "PermissionAction": {
  11701. "type": "string",
  11702. "enum": ["allow", "deny", "ask"]
  11703. },
  11704. "PermissionRule": {
  11705. "type": "object",
  11706. "properties": {
  11707. "permission": {
  11708. "type": "string"
  11709. },
  11710. "pattern": {
  11711. "type": "string"
  11712. },
  11713. "action": {
  11714. "$ref": "#/components/schemas/PermissionAction"
  11715. }
  11716. },
  11717. "required": ["permission", "pattern", "action"],
  11718. "additionalProperties": false
  11719. },
  11720. "PermissionRuleset": {
  11721. "type": "array",
  11722. "items": {
  11723. "$ref": "#/components/schemas/PermissionRule"
  11724. }
  11725. },
  11726. "Session": {
  11727. "type": "object",
  11728. "properties": {
  11729. "id": {
  11730. "type": "string",
  11731. "pattern": "^ses"
  11732. },
  11733. "slug": {
  11734. "type": "string"
  11735. },
  11736. "projectID": {
  11737. "type": "string"
  11738. },
  11739. "workspaceID": {
  11740. "type": "string",
  11741. "pattern": "^wrk"
  11742. },
  11743. "directory": {
  11744. "type": "string"
  11745. },
  11746. "path": {
  11747. "type": "string"
  11748. },
  11749. "parentID": {
  11750. "type": "string",
  11751. "pattern": "^ses"
  11752. },
  11753. "summary": {
  11754. "type": "object",
  11755. "properties": {
  11756. "additions": {
  11757. "type": "number"
  11758. },
  11759. "deletions": {
  11760. "type": "number"
  11761. },
  11762. "files": {
  11763. "type": "number"
  11764. },
  11765. "diffs": {
  11766. "type": "array",
  11767. "items": {
  11768. "$ref": "#/components/schemas/SnapshotFileDiff"
  11769. }
  11770. }
  11771. },
  11772. "required": ["additions", "deletions", "files"],
  11773. "additionalProperties": false
  11774. },
  11775. "cost": {
  11776. "type": "number"
  11777. },
  11778. "tokens": {
  11779. "type": "object",
  11780. "properties": {
  11781. "input": {
  11782. "type": "number"
  11783. },
  11784. "output": {
  11785. "type": "number"
  11786. },
  11787. "reasoning": {
  11788. "type": "number"
  11789. },
  11790. "cache": {
  11791. "type": "object",
  11792. "properties": {
  11793. "read": {
  11794. "type": "number"
  11795. },
  11796. "write": {
  11797. "type": "number"
  11798. }
  11799. },
  11800. "required": ["read", "write"],
  11801. "additionalProperties": false
  11802. }
  11803. },
  11804. "required": ["input", "output", "reasoning", "cache"],
  11805. "additionalProperties": false
  11806. },
  11807. "share": {
  11808. "type": "object",
  11809. "properties": {
  11810. "url": {
  11811. "type": "string"
  11812. }
  11813. },
  11814. "required": ["url"],
  11815. "additionalProperties": false
  11816. },
  11817. "title": {
  11818. "type": "string"
  11819. },
  11820. "agent": {
  11821. "type": "string"
  11822. },
  11823. "model": {
  11824. "type": "object",
  11825. "properties": {
  11826. "id": {
  11827. "type": "string"
  11828. },
  11829. "providerID": {
  11830. "type": "string"
  11831. },
  11832. "variant": {
  11833. "type": "string"
  11834. }
  11835. },
  11836. "required": ["id", "providerID"],
  11837. "additionalProperties": false
  11838. },
  11839. "version": {
  11840. "type": "string"
  11841. },
  11842. "metadata": {
  11843. "type": "object"
  11844. },
  11845. "time": {
  11846. "type": "object",
  11847. "properties": {
  11848. "created": {
  11849. "type": "integer",
  11850. "minimum": 0
  11851. },
  11852. "updated": {
  11853. "type": "integer",
  11854. "minimum": 0
  11855. },
  11856. "compacting": {
  11857. "type": "integer",
  11858. "minimum": 0
  11859. },
  11860. "archived": {
  11861. "type": "number"
  11862. }
  11863. },
  11864. "required": ["created", "updated"],
  11865. "additionalProperties": false
  11866. },
  11867. "permission": {
  11868. "$ref": "#/components/schemas/PermissionRuleset"
  11869. },
  11870. "revert": {
  11871. "type": "object",
  11872. "properties": {
  11873. "messageID": {
  11874. "type": "string",
  11875. "pattern": "^msg"
  11876. },
  11877. "partID": {
  11878. "type": "string",
  11879. "pattern": "^prt"
  11880. },
  11881. "snapshot": {
  11882. "type": "string"
  11883. },
  11884. "diff": {
  11885. "type": "string"
  11886. }
  11887. },
  11888. "required": ["messageID"],
  11889. "additionalProperties": false
  11890. }
  11891. },
  11892. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11893. "additionalProperties": false
  11894. },
  11895. "OutputFormatText": {
  11896. "type": "object",
  11897. "properties": {
  11898. "type": {
  11899. "type": "string",
  11900. "enum": ["text"]
  11901. }
  11902. },
  11903. "required": ["type"],
  11904. "additionalProperties": false
  11905. },
  11906. "JSONSchema": {
  11907. "type": "object"
  11908. },
  11909. "OutputFormatJsonSchema": {
  11910. "type": "object",
  11911. "properties": {
  11912. "type": {
  11913. "type": "string",
  11914. "enum": ["json_schema"]
  11915. },
  11916. "schema": {
  11917. "$ref": "#/components/schemas/JSONSchema"
  11918. },
  11919. "retryCount": {
  11920. "type": "integer",
  11921. "minimum": 0
  11922. }
  11923. },
  11924. "required": ["type", "schema"],
  11925. "additionalProperties": false
  11926. },
  11927. "OutputFormat": {
  11928. "anyOf": [
  11929. {
  11930. "$ref": "#/components/schemas/OutputFormatText"
  11931. },
  11932. {
  11933. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11934. }
  11935. ]
  11936. },
  11937. "UserMessage": {
  11938. "type": "object",
  11939. "properties": {
  11940. "id": {
  11941. "type": "string",
  11942. "pattern": "^msg"
  11943. },
  11944. "sessionID": {
  11945. "type": "string",
  11946. "pattern": "^ses"
  11947. },
  11948. "role": {
  11949. "type": "string",
  11950. "enum": ["user"]
  11951. },
  11952. "time": {
  11953. "type": "object",
  11954. "properties": {
  11955. "created": {
  11956. "type": "integer",
  11957. "minimum": 0
  11958. }
  11959. },
  11960. "required": ["created"],
  11961. "additionalProperties": false
  11962. },
  11963. "format": {
  11964. "$ref": "#/components/schemas/OutputFormat"
  11965. },
  11966. "summary": {
  11967. "type": "object",
  11968. "properties": {
  11969. "title": {
  11970. "type": "string"
  11971. },
  11972. "body": {
  11973. "type": "string"
  11974. },
  11975. "diffs": {
  11976. "type": "array",
  11977. "items": {
  11978. "$ref": "#/components/schemas/SnapshotFileDiff"
  11979. }
  11980. }
  11981. },
  11982. "required": ["diffs"],
  11983. "additionalProperties": false
  11984. },
  11985. "agent": {
  11986. "type": "string"
  11987. },
  11988. "model": {
  11989. "type": "object",
  11990. "properties": {
  11991. "providerID": {
  11992. "type": "string"
  11993. },
  11994. "modelID": {
  11995. "type": "string"
  11996. },
  11997. "variant": {
  11998. "type": "string"
  11999. }
  12000. },
  12001. "required": ["providerID", "modelID"],
  12002. "additionalProperties": false
  12003. },
  12004. "system": {
  12005. "type": "string"
  12006. },
  12007. "tools": {
  12008. "type": "object",
  12009. "additionalProperties": {
  12010. "type": "boolean"
  12011. }
  12012. }
  12013. },
  12014. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  12015. "additionalProperties": false
  12016. },
  12017. "ProviderAuthError": {
  12018. "type": "object",
  12019. "properties": {
  12020. "name": {
  12021. "type": "string",
  12022. "enum": ["ProviderAuthError"]
  12023. },
  12024. "data": {
  12025. "type": "object",
  12026. "properties": {
  12027. "providerID": {
  12028. "type": "string"
  12029. },
  12030. "message": {
  12031. "type": "string"
  12032. }
  12033. },
  12034. "required": ["providerID", "message"],
  12035. "additionalProperties": false
  12036. }
  12037. },
  12038. "required": ["name", "data"],
  12039. "additionalProperties": false
  12040. },
  12041. "UnknownError": {
  12042. "type": "object",
  12043. "properties": {
  12044. "name": {
  12045. "type": "string",
  12046. "enum": ["UnknownError"]
  12047. },
  12048. "data": {
  12049. "type": "object",
  12050. "properties": {
  12051. "message": {
  12052. "type": "string"
  12053. },
  12054. "ref": {
  12055. "type": "string"
  12056. }
  12057. },
  12058. "required": ["message"],
  12059. "additionalProperties": false
  12060. }
  12061. },
  12062. "required": ["name", "data"],
  12063. "additionalProperties": false
  12064. },
  12065. "MessageOutputLengthError": {
  12066. "type": "object",
  12067. "properties": {
  12068. "name": {
  12069. "type": "string",
  12070. "enum": ["MessageOutputLengthError"]
  12071. },
  12072. "data": {
  12073. "type": "object",
  12074. "properties": {}
  12075. }
  12076. },
  12077. "required": ["name", "data"],
  12078. "additionalProperties": false
  12079. },
  12080. "MessageAbortedError": {
  12081. "type": "object",
  12082. "properties": {
  12083. "name": {
  12084. "type": "string",
  12085. "enum": ["MessageAbortedError"]
  12086. },
  12087. "data": {
  12088. "type": "object",
  12089. "properties": {
  12090. "message": {
  12091. "type": "string"
  12092. }
  12093. },
  12094. "required": ["message"],
  12095. "additionalProperties": false
  12096. }
  12097. },
  12098. "required": ["name", "data"],
  12099. "additionalProperties": false
  12100. },
  12101. "StructuredOutputError": {
  12102. "type": "object",
  12103. "properties": {
  12104. "name": {
  12105. "type": "string",
  12106. "enum": ["StructuredOutputError"]
  12107. },
  12108. "data": {
  12109. "type": "object",
  12110. "properties": {
  12111. "message": {
  12112. "type": "string"
  12113. },
  12114. "retries": {
  12115. "type": "integer",
  12116. "minimum": 0
  12117. }
  12118. },
  12119. "required": ["message", "retries"],
  12120. "additionalProperties": false
  12121. }
  12122. },
  12123. "required": ["name", "data"],
  12124. "additionalProperties": false
  12125. },
  12126. "ContextOverflowError": {
  12127. "type": "object",
  12128. "properties": {
  12129. "name": {
  12130. "type": "string",
  12131. "enum": ["ContextOverflowError"]
  12132. },
  12133. "data": {
  12134. "type": "object",
  12135. "properties": {
  12136. "message": {
  12137. "type": "string"
  12138. },
  12139. "responseBody": {
  12140. "type": "string"
  12141. }
  12142. },
  12143. "required": ["message"],
  12144. "additionalProperties": false
  12145. }
  12146. },
  12147. "required": ["name", "data"],
  12148. "additionalProperties": false
  12149. },
  12150. "APIError": {
  12151. "type": "object",
  12152. "properties": {
  12153. "name": {
  12154. "type": "string",
  12155. "enum": ["APIError"]
  12156. },
  12157. "data": {
  12158. "type": "object",
  12159. "properties": {
  12160. "message": {
  12161. "type": "string"
  12162. },
  12163. "statusCode": {
  12164. "type": "integer",
  12165. "minimum": 0
  12166. },
  12167. "isRetryable": {
  12168. "type": "boolean"
  12169. },
  12170. "responseHeaders": {
  12171. "type": "object",
  12172. "additionalProperties": {
  12173. "type": "string"
  12174. }
  12175. },
  12176. "responseBody": {
  12177. "type": "string"
  12178. },
  12179. "metadata": {
  12180. "type": "object",
  12181. "additionalProperties": {
  12182. "type": "string"
  12183. }
  12184. }
  12185. },
  12186. "required": ["message", "isRetryable"],
  12187. "additionalProperties": false
  12188. }
  12189. },
  12190. "required": ["name", "data"],
  12191. "additionalProperties": false
  12192. },
  12193. "AssistantMessage": {
  12194. "type": "object",
  12195. "properties": {
  12196. "id": {
  12197. "type": "string",
  12198. "pattern": "^msg"
  12199. },
  12200. "sessionID": {
  12201. "type": "string",
  12202. "pattern": "^ses"
  12203. },
  12204. "role": {
  12205. "type": "string",
  12206. "enum": ["assistant"]
  12207. },
  12208. "time": {
  12209. "type": "object",
  12210. "properties": {
  12211. "created": {
  12212. "type": "integer",
  12213. "minimum": 0
  12214. },
  12215. "completed": {
  12216. "type": "integer",
  12217. "minimum": 0
  12218. }
  12219. },
  12220. "required": ["created"],
  12221. "additionalProperties": false
  12222. },
  12223. "error": {
  12224. "anyOf": [
  12225. {
  12226. "$ref": "#/components/schemas/ProviderAuthError"
  12227. },
  12228. {
  12229. "$ref": "#/components/schemas/UnknownError"
  12230. },
  12231. {
  12232. "$ref": "#/components/schemas/MessageOutputLengthError"
  12233. },
  12234. {
  12235. "$ref": "#/components/schemas/MessageAbortedError"
  12236. },
  12237. {
  12238. "$ref": "#/components/schemas/StructuredOutputError"
  12239. },
  12240. {
  12241. "$ref": "#/components/schemas/ContextOverflowError"
  12242. },
  12243. {
  12244. "$ref": "#/components/schemas/APIError"
  12245. }
  12246. ]
  12247. },
  12248. "parentID": {
  12249. "type": "string",
  12250. "pattern": "^msg"
  12251. },
  12252. "modelID": {
  12253. "type": "string"
  12254. },
  12255. "providerID": {
  12256. "type": "string"
  12257. },
  12258. "mode": {
  12259. "type": "string"
  12260. },
  12261. "agent": {
  12262. "type": "string"
  12263. },
  12264. "path": {
  12265. "type": "object",
  12266. "properties": {
  12267. "cwd": {
  12268. "type": "string"
  12269. },
  12270. "root": {
  12271. "type": "string"
  12272. }
  12273. },
  12274. "required": ["cwd", "root"],
  12275. "additionalProperties": false
  12276. },
  12277. "summary": {
  12278. "type": "boolean"
  12279. },
  12280. "cost": {
  12281. "type": "number"
  12282. },
  12283. "tokens": {
  12284. "type": "object",
  12285. "properties": {
  12286. "total": {
  12287. "type": "number"
  12288. },
  12289. "input": {
  12290. "type": "number"
  12291. },
  12292. "output": {
  12293. "type": "number"
  12294. },
  12295. "reasoning": {
  12296. "type": "number"
  12297. },
  12298. "cache": {
  12299. "type": "object",
  12300. "properties": {
  12301. "read": {
  12302. "type": "number"
  12303. },
  12304. "write": {
  12305. "type": "number"
  12306. }
  12307. },
  12308. "required": ["read", "write"],
  12309. "additionalProperties": false
  12310. }
  12311. },
  12312. "required": ["input", "output", "reasoning", "cache"],
  12313. "additionalProperties": false
  12314. },
  12315. "structured": {},
  12316. "variant": {
  12317. "type": "string"
  12318. },
  12319. "finish": {
  12320. "type": "string"
  12321. }
  12322. },
  12323. "required": [
  12324. "id",
  12325. "sessionID",
  12326. "role",
  12327. "time",
  12328. "parentID",
  12329. "modelID",
  12330. "providerID",
  12331. "mode",
  12332. "agent",
  12333. "path",
  12334. "cost",
  12335. "tokens"
  12336. ],
  12337. "additionalProperties": false
  12338. },
  12339. "Message": {
  12340. "anyOf": [
  12341. {
  12342. "$ref": "#/components/schemas/UserMessage"
  12343. },
  12344. {
  12345. "$ref": "#/components/schemas/AssistantMessage"
  12346. }
  12347. ]
  12348. },
  12349. "TextPart": {
  12350. "type": "object",
  12351. "properties": {
  12352. "id": {
  12353. "type": "string",
  12354. "pattern": "^prt"
  12355. },
  12356. "sessionID": {
  12357. "type": "string",
  12358. "pattern": "^ses"
  12359. },
  12360. "messageID": {
  12361. "type": "string",
  12362. "pattern": "^msg"
  12363. },
  12364. "type": {
  12365. "type": "string",
  12366. "enum": ["text"]
  12367. },
  12368. "text": {
  12369. "type": "string"
  12370. },
  12371. "synthetic": {
  12372. "type": "boolean"
  12373. },
  12374. "ignored": {
  12375. "type": "boolean"
  12376. },
  12377. "time": {
  12378. "type": "object",
  12379. "properties": {
  12380. "start": {
  12381. "type": "integer",
  12382. "minimum": 0
  12383. },
  12384. "end": {
  12385. "type": "integer",
  12386. "minimum": 0
  12387. }
  12388. },
  12389. "required": ["start"],
  12390. "additionalProperties": false
  12391. },
  12392. "metadata": {
  12393. "type": "object"
  12394. }
  12395. },
  12396. "required": ["id", "sessionID", "messageID", "type", "text"],
  12397. "additionalProperties": false
  12398. },
  12399. "SubtaskPart": {
  12400. "type": "object",
  12401. "properties": {
  12402. "id": {
  12403. "type": "string",
  12404. "pattern": "^prt"
  12405. },
  12406. "sessionID": {
  12407. "type": "string",
  12408. "pattern": "^ses"
  12409. },
  12410. "messageID": {
  12411. "type": "string",
  12412. "pattern": "^msg"
  12413. },
  12414. "type": {
  12415. "type": "string",
  12416. "enum": ["subtask"]
  12417. },
  12418. "prompt": {
  12419. "type": "string"
  12420. },
  12421. "description": {
  12422. "type": "string"
  12423. },
  12424. "agent": {
  12425. "type": "string"
  12426. },
  12427. "model": {
  12428. "type": "object",
  12429. "properties": {
  12430. "providerID": {
  12431. "type": "string"
  12432. },
  12433. "modelID": {
  12434. "type": "string"
  12435. }
  12436. },
  12437. "required": ["providerID", "modelID"],
  12438. "additionalProperties": false
  12439. },
  12440. "command": {
  12441. "type": "string"
  12442. }
  12443. },
  12444. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  12445. "additionalProperties": false
  12446. },
  12447. "ReasoningPart": {
  12448. "type": "object",
  12449. "properties": {
  12450. "id": {
  12451. "type": "string",
  12452. "pattern": "^prt"
  12453. },
  12454. "sessionID": {
  12455. "type": "string",
  12456. "pattern": "^ses"
  12457. },
  12458. "messageID": {
  12459. "type": "string",
  12460. "pattern": "^msg"
  12461. },
  12462. "type": {
  12463. "type": "string",
  12464. "enum": ["reasoning"]
  12465. },
  12466. "text": {
  12467. "type": "string"
  12468. },
  12469. "metadata": {
  12470. "type": "object"
  12471. },
  12472. "time": {
  12473. "type": "object",
  12474. "properties": {
  12475. "start": {
  12476. "type": "integer",
  12477. "minimum": 0
  12478. },
  12479. "end": {
  12480. "type": "integer",
  12481. "minimum": 0
  12482. }
  12483. },
  12484. "required": ["start"],
  12485. "additionalProperties": false
  12486. }
  12487. },
  12488. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  12489. "additionalProperties": false
  12490. },
  12491. "FilePartSourceText": {
  12492. "type": "object",
  12493. "properties": {
  12494. "value": {
  12495. "type": "string"
  12496. },
  12497. "start": {
  12498. "type": "number"
  12499. },
  12500. "end": {
  12501. "type": "number"
  12502. }
  12503. },
  12504. "required": ["value", "start", "end"],
  12505. "additionalProperties": false
  12506. },
  12507. "FileSource": {
  12508. "type": "object",
  12509. "properties": {
  12510. "text": {
  12511. "$ref": "#/components/schemas/FilePartSourceText"
  12512. },
  12513. "type": {
  12514. "type": "string",
  12515. "enum": ["file"]
  12516. },
  12517. "path": {
  12518. "type": "string"
  12519. }
  12520. },
  12521. "required": ["text", "type", "path"],
  12522. "additionalProperties": false
  12523. },
  12524. "Range": {
  12525. "type": "object",
  12526. "properties": {
  12527. "start": {
  12528. "type": "object",
  12529. "properties": {
  12530. "line": {
  12531. "type": "integer",
  12532. "minimum": 0
  12533. },
  12534. "character": {
  12535. "type": "integer",
  12536. "minimum": 0
  12537. }
  12538. },
  12539. "required": ["line", "character"],
  12540. "additionalProperties": false
  12541. },
  12542. "end": {
  12543. "type": "object",
  12544. "properties": {
  12545. "line": {
  12546. "type": "integer",
  12547. "minimum": 0
  12548. },
  12549. "character": {
  12550. "type": "integer",
  12551. "minimum": 0
  12552. }
  12553. },
  12554. "required": ["line", "character"],
  12555. "additionalProperties": false
  12556. }
  12557. },
  12558. "required": ["start", "end"],
  12559. "additionalProperties": false
  12560. },
  12561. "SymbolSource": {
  12562. "type": "object",
  12563. "properties": {
  12564. "text": {
  12565. "$ref": "#/components/schemas/FilePartSourceText"
  12566. },
  12567. "type": {
  12568. "type": "string",
  12569. "enum": ["symbol"]
  12570. },
  12571. "path": {
  12572. "type": "string"
  12573. },
  12574. "range": {
  12575. "$ref": "#/components/schemas/Range"
  12576. },
  12577. "name": {
  12578. "type": "string"
  12579. },
  12580. "kind": {
  12581. "type": "integer",
  12582. "minimum": 0
  12583. }
  12584. },
  12585. "required": ["text", "type", "path", "range", "name", "kind"],
  12586. "additionalProperties": false
  12587. },
  12588. "ResourceSource": {
  12589. "type": "object",
  12590. "properties": {
  12591. "text": {
  12592. "$ref": "#/components/schemas/FilePartSourceText"
  12593. },
  12594. "type": {
  12595. "type": "string",
  12596. "enum": ["resource"]
  12597. },
  12598. "clientName": {
  12599. "type": "string"
  12600. },
  12601. "uri": {
  12602. "type": "string"
  12603. }
  12604. },
  12605. "required": ["text", "type", "clientName", "uri"],
  12606. "additionalProperties": false
  12607. },
  12608. "FilePartSource": {
  12609. "anyOf": [
  12610. {
  12611. "$ref": "#/components/schemas/FileSource"
  12612. },
  12613. {
  12614. "$ref": "#/components/schemas/SymbolSource"
  12615. },
  12616. {
  12617. "$ref": "#/components/schemas/ResourceSource"
  12618. }
  12619. ]
  12620. },
  12621. "FilePart": {
  12622. "type": "object",
  12623. "properties": {
  12624. "id": {
  12625. "type": "string",
  12626. "pattern": "^prt"
  12627. },
  12628. "sessionID": {
  12629. "type": "string",
  12630. "pattern": "^ses"
  12631. },
  12632. "messageID": {
  12633. "type": "string",
  12634. "pattern": "^msg"
  12635. },
  12636. "type": {
  12637. "type": "string",
  12638. "enum": ["file"]
  12639. },
  12640. "mime": {
  12641. "type": "string"
  12642. },
  12643. "filename": {
  12644. "type": "string"
  12645. },
  12646. "url": {
  12647. "type": "string"
  12648. },
  12649. "source": {
  12650. "$ref": "#/components/schemas/FilePartSource"
  12651. }
  12652. },
  12653. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12654. "additionalProperties": false
  12655. },
  12656. "ToolStatePending": {
  12657. "type": "object",
  12658. "properties": {
  12659. "status": {
  12660. "type": "string",
  12661. "enum": ["pending"]
  12662. },
  12663. "input": {
  12664. "type": "object"
  12665. },
  12666. "raw": {
  12667. "type": "string"
  12668. }
  12669. },
  12670. "required": ["status", "input", "raw"],
  12671. "additionalProperties": false
  12672. },
  12673. "ToolStateRunning": {
  12674. "type": "object",
  12675. "properties": {
  12676. "status": {
  12677. "type": "string",
  12678. "enum": ["running"]
  12679. },
  12680. "input": {
  12681. "type": "object"
  12682. },
  12683. "title": {
  12684. "type": "string"
  12685. },
  12686. "metadata": {
  12687. "type": "object"
  12688. },
  12689. "time": {
  12690. "type": "object",
  12691. "properties": {
  12692. "start": {
  12693. "type": "integer",
  12694. "minimum": 0
  12695. }
  12696. },
  12697. "required": ["start"],
  12698. "additionalProperties": false
  12699. }
  12700. },
  12701. "required": ["status", "input", "time"],
  12702. "additionalProperties": false
  12703. },
  12704. "ToolStateCompleted": {
  12705. "type": "object",
  12706. "properties": {
  12707. "status": {
  12708. "type": "string",
  12709. "enum": ["completed"]
  12710. },
  12711. "input": {
  12712. "type": "object"
  12713. },
  12714. "output": {
  12715. "type": "string"
  12716. },
  12717. "title": {
  12718. "type": "string"
  12719. },
  12720. "metadata": {
  12721. "type": "object"
  12722. },
  12723. "time": {
  12724. "type": "object",
  12725. "properties": {
  12726. "start": {
  12727. "type": "integer",
  12728. "minimum": 0
  12729. },
  12730. "end": {
  12731. "type": "integer",
  12732. "minimum": 0
  12733. },
  12734. "compacted": {
  12735. "type": "integer",
  12736. "minimum": 0
  12737. }
  12738. },
  12739. "required": ["start", "end"],
  12740. "additionalProperties": false
  12741. },
  12742. "attachments": {
  12743. "type": "array",
  12744. "items": {
  12745. "$ref": "#/components/schemas/FilePart"
  12746. }
  12747. }
  12748. },
  12749. "required": ["status", "input", "output", "title", "metadata", "time"],
  12750. "additionalProperties": false
  12751. },
  12752. "ToolStateError": {
  12753. "type": "object",
  12754. "properties": {
  12755. "status": {
  12756. "type": "string",
  12757. "enum": ["error"]
  12758. },
  12759. "input": {
  12760. "type": "object"
  12761. },
  12762. "error": {
  12763. "type": "string"
  12764. },
  12765. "metadata": {
  12766. "type": "object"
  12767. },
  12768. "time": {
  12769. "type": "object",
  12770. "properties": {
  12771. "start": {
  12772. "type": "integer",
  12773. "minimum": 0
  12774. },
  12775. "end": {
  12776. "type": "integer",
  12777. "minimum": 0
  12778. }
  12779. },
  12780. "required": ["start", "end"],
  12781. "additionalProperties": false
  12782. }
  12783. },
  12784. "required": ["status", "input", "error", "time"],
  12785. "additionalProperties": false
  12786. },
  12787. "ToolState": {
  12788. "anyOf": [
  12789. {
  12790. "$ref": "#/components/schemas/ToolStatePending"
  12791. },
  12792. {
  12793. "$ref": "#/components/schemas/ToolStateRunning"
  12794. },
  12795. {
  12796. "$ref": "#/components/schemas/ToolStateCompleted"
  12797. },
  12798. {
  12799. "$ref": "#/components/schemas/ToolStateError"
  12800. }
  12801. ]
  12802. },
  12803. "ToolPart": {
  12804. "type": "object",
  12805. "properties": {
  12806. "id": {
  12807. "type": "string",
  12808. "pattern": "^prt"
  12809. },
  12810. "sessionID": {
  12811. "type": "string",
  12812. "pattern": "^ses"
  12813. },
  12814. "messageID": {
  12815. "type": "string",
  12816. "pattern": "^msg"
  12817. },
  12818. "type": {
  12819. "type": "string",
  12820. "enum": ["tool"]
  12821. },
  12822. "callID": {
  12823. "type": "string"
  12824. },
  12825. "tool": {
  12826. "type": "string"
  12827. },
  12828. "state": {
  12829. "$ref": "#/components/schemas/ToolState"
  12830. },
  12831. "metadata": {
  12832. "type": "object"
  12833. }
  12834. },
  12835. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12836. "additionalProperties": false
  12837. },
  12838. "StepStartPart": {
  12839. "type": "object",
  12840. "properties": {
  12841. "id": {
  12842. "type": "string",
  12843. "pattern": "^prt"
  12844. },
  12845. "sessionID": {
  12846. "type": "string",
  12847. "pattern": "^ses"
  12848. },
  12849. "messageID": {
  12850. "type": "string",
  12851. "pattern": "^msg"
  12852. },
  12853. "type": {
  12854. "type": "string",
  12855. "enum": ["step-start"]
  12856. },
  12857. "snapshot": {
  12858. "type": "string"
  12859. }
  12860. },
  12861. "required": ["id", "sessionID", "messageID", "type"],
  12862. "additionalProperties": false
  12863. },
  12864. "StepFinishPart": {
  12865. "type": "object",
  12866. "properties": {
  12867. "id": {
  12868. "type": "string",
  12869. "pattern": "^prt"
  12870. },
  12871. "sessionID": {
  12872. "type": "string",
  12873. "pattern": "^ses"
  12874. },
  12875. "messageID": {
  12876. "type": "string",
  12877. "pattern": "^msg"
  12878. },
  12879. "type": {
  12880. "type": "string",
  12881. "enum": ["step-finish"]
  12882. },
  12883. "reason": {
  12884. "type": "string"
  12885. },
  12886. "snapshot": {
  12887. "type": "string"
  12888. },
  12889. "cost": {
  12890. "type": "number"
  12891. },
  12892. "tokens": {
  12893. "type": "object",
  12894. "properties": {
  12895. "total": {
  12896. "type": "number"
  12897. },
  12898. "input": {
  12899. "type": "number"
  12900. },
  12901. "output": {
  12902. "type": "number"
  12903. },
  12904. "reasoning": {
  12905. "type": "number"
  12906. },
  12907. "cache": {
  12908. "type": "object",
  12909. "properties": {
  12910. "read": {
  12911. "type": "number"
  12912. },
  12913. "write": {
  12914. "type": "number"
  12915. }
  12916. },
  12917. "required": ["read", "write"],
  12918. "additionalProperties": false
  12919. }
  12920. },
  12921. "required": ["input", "output", "reasoning", "cache"],
  12922. "additionalProperties": false
  12923. }
  12924. },
  12925. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12926. "additionalProperties": false
  12927. },
  12928. "SnapshotPart": {
  12929. "type": "object",
  12930. "properties": {
  12931. "id": {
  12932. "type": "string",
  12933. "pattern": "^prt"
  12934. },
  12935. "sessionID": {
  12936. "type": "string",
  12937. "pattern": "^ses"
  12938. },
  12939. "messageID": {
  12940. "type": "string",
  12941. "pattern": "^msg"
  12942. },
  12943. "type": {
  12944. "type": "string",
  12945. "enum": ["snapshot"]
  12946. },
  12947. "snapshot": {
  12948. "type": "string"
  12949. }
  12950. },
  12951. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12952. "additionalProperties": false
  12953. },
  12954. "PatchPart": {
  12955. "type": "object",
  12956. "properties": {
  12957. "id": {
  12958. "type": "string",
  12959. "pattern": "^prt"
  12960. },
  12961. "sessionID": {
  12962. "type": "string",
  12963. "pattern": "^ses"
  12964. },
  12965. "messageID": {
  12966. "type": "string",
  12967. "pattern": "^msg"
  12968. },
  12969. "type": {
  12970. "type": "string",
  12971. "enum": ["patch"]
  12972. },
  12973. "hash": {
  12974. "type": "string"
  12975. },
  12976. "files": {
  12977. "type": "array",
  12978. "items": {
  12979. "type": "string"
  12980. }
  12981. }
  12982. },
  12983. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12984. "additionalProperties": false
  12985. },
  12986. "AgentPart": {
  12987. "type": "object",
  12988. "properties": {
  12989. "id": {
  12990. "type": "string",
  12991. "pattern": "^prt"
  12992. },
  12993. "sessionID": {
  12994. "type": "string",
  12995. "pattern": "^ses"
  12996. },
  12997. "messageID": {
  12998. "type": "string",
  12999. "pattern": "^msg"
  13000. },
  13001. "type": {
  13002. "type": "string",
  13003. "enum": ["agent"]
  13004. },
  13005. "name": {
  13006. "type": "string"
  13007. },
  13008. "source": {
  13009. "type": "object",
  13010. "properties": {
  13011. "value": {
  13012. "type": "string"
  13013. },
  13014. "start": {
  13015. "type": "integer",
  13016. "minimum": 0
  13017. },
  13018. "end": {
  13019. "type": "integer",
  13020. "minimum": 0
  13021. }
  13022. },
  13023. "required": ["value", "start", "end"],
  13024. "additionalProperties": false
  13025. }
  13026. },
  13027. "required": ["id", "sessionID", "messageID", "type", "name"],
  13028. "additionalProperties": false
  13029. },
  13030. "RetryPart": {
  13031. "type": "object",
  13032. "properties": {
  13033. "id": {
  13034. "type": "string",
  13035. "pattern": "^prt"
  13036. },
  13037. "sessionID": {
  13038. "type": "string",
  13039. "pattern": "^ses"
  13040. },
  13041. "messageID": {
  13042. "type": "string",
  13043. "pattern": "^msg"
  13044. },
  13045. "type": {
  13046. "type": "string",
  13047. "enum": ["retry"]
  13048. },
  13049. "attempt": {
  13050. "type": "integer",
  13051. "minimum": 0
  13052. },
  13053. "error": {
  13054. "$ref": "#/components/schemas/APIError"
  13055. },
  13056. "time": {
  13057. "type": "object",
  13058. "properties": {
  13059. "created": {
  13060. "type": "integer",
  13061. "minimum": 0
  13062. }
  13063. },
  13064. "required": ["created"],
  13065. "additionalProperties": false
  13066. }
  13067. },
  13068. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  13069. "additionalProperties": false
  13070. },
  13071. "CompactionPart": {
  13072. "type": "object",
  13073. "properties": {
  13074. "id": {
  13075. "type": "string",
  13076. "pattern": "^prt"
  13077. },
  13078. "sessionID": {
  13079. "type": "string",
  13080. "pattern": "^ses"
  13081. },
  13082. "messageID": {
  13083. "type": "string",
  13084. "pattern": "^msg"
  13085. },
  13086. "type": {
  13087. "type": "string",
  13088. "enum": ["compaction"]
  13089. },
  13090. "auto": {
  13091. "type": "boolean"
  13092. },
  13093. "overflow": {
  13094. "type": "boolean"
  13095. },
  13096. "tail_start_id": {
  13097. "type": "string",
  13098. "pattern": "^msg"
  13099. }
  13100. },
  13101. "required": ["id", "sessionID", "messageID", "type", "auto"],
  13102. "additionalProperties": false
  13103. },
  13104. "Part": {
  13105. "anyOf": [
  13106. {
  13107. "$ref": "#/components/schemas/TextPart"
  13108. },
  13109. {
  13110. "$ref": "#/components/schemas/SubtaskPart"
  13111. },
  13112. {
  13113. "$ref": "#/components/schemas/ReasoningPart"
  13114. },
  13115. {
  13116. "$ref": "#/components/schemas/FilePart"
  13117. },
  13118. {
  13119. "$ref": "#/components/schemas/ToolPart"
  13120. },
  13121. {
  13122. "$ref": "#/components/schemas/StepStartPart"
  13123. },
  13124. {
  13125. "$ref": "#/components/schemas/StepFinishPart"
  13126. },
  13127. {
  13128. "$ref": "#/components/schemas/SnapshotPart"
  13129. },
  13130. {
  13131. "$ref": "#/components/schemas/PatchPart"
  13132. },
  13133. {
  13134. "$ref": "#/components/schemas/AgentPart"
  13135. },
  13136. {
  13137. "$ref": "#/components/schemas/RetryPart"
  13138. },
  13139. {
  13140. "$ref": "#/components/schemas/CompactionPart"
  13141. }
  13142. ]
  13143. },
  13144. "Prompt": {
  13145. "type": "object",
  13146. "properties": {
  13147. "text": {
  13148. "type": "string"
  13149. },
  13150. "files": {
  13151. "type": "array",
  13152. "items": {
  13153. "$ref": "#/components/schemas/PromptFileAttachment"
  13154. }
  13155. },
  13156. "agents": {
  13157. "type": "array",
  13158. "items": {
  13159. "$ref": "#/components/schemas/PromptAgentAttachment"
  13160. }
  13161. },
  13162. "references": {
  13163. "type": "array",
  13164. "items": {
  13165. "$ref": "#/components/schemas/PromptReferenceAttachment"
  13166. }
  13167. }
  13168. },
  13169. "required": ["text"],
  13170. "additionalProperties": false
  13171. },
  13172. "Pty": {
  13173. "type": "object",
  13174. "properties": {
  13175. "id": {
  13176. "type": "string",
  13177. "pattern": "^pty"
  13178. },
  13179. "title": {
  13180. "type": "string"
  13181. },
  13182. "command": {
  13183. "type": "string"
  13184. },
  13185. "args": {
  13186. "type": "array",
  13187. "items": {
  13188. "type": "string"
  13189. }
  13190. },
  13191. "cwd": {
  13192. "type": "string"
  13193. },
  13194. "status": {
  13195. "type": "string",
  13196. "enum": ["running", "exited"]
  13197. },
  13198. "pid": {
  13199. "type": "integer",
  13200. "minimum": 0
  13201. }
  13202. },
  13203. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  13204. "additionalProperties": false
  13205. },
  13206. "QuestionOption": {
  13207. "type": "object",
  13208. "properties": {
  13209. "label": {
  13210. "type": "string",
  13211. "description": "Display text (1-5 words, concise)"
  13212. },
  13213. "description": {
  13214. "type": "string",
  13215. "description": "Explanation of choice"
  13216. }
  13217. },
  13218. "required": ["label", "description"],
  13219. "additionalProperties": false
  13220. },
  13221. "QuestionInfo": {
  13222. "type": "object",
  13223. "properties": {
  13224. "question": {
  13225. "type": "string",
  13226. "description": "Complete question"
  13227. },
  13228. "header": {
  13229. "type": "string",
  13230. "description": "Very short label (max 30 chars)"
  13231. },
  13232. "options": {
  13233. "type": "array",
  13234. "items": {
  13235. "$ref": "#/components/schemas/QuestionOption"
  13236. },
  13237. "description": "Available choices"
  13238. },
  13239. "multiple": {
  13240. "type": "boolean"
  13241. },
  13242. "custom": {
  13243. "type": "boolean"
  13244. }
  13245. },
  13246. "required": ["question", "header", "options"],
  13247. "additionalProperties": false
  13248. },
  13249. "QuestionTool": {
  13250. "type": "object",
  13251. "properties": {
  13252. "messageID": {
  13253. "type": "string",
  13254. "pattern": "^msg"
  13255. },
  13256. "callID": {
  13257. "type": "string"
  13258. }
  13259. },
  13260. "required": ["messageID", "callID"],
  13261. "additionalProperties": false
  13262. },
  13263. "QuestionAnswer": {
  13264. "type": "array",
  13265. "items": {
  13266. "type": "string"
  13267. }
  13268. },
  13269. "SessionStatus": {
  13270. "anyOf": [
  13271. {
  13272. "type": "object",
  13273. "properties": {
  13274. "type": {
  13275. "type": "string",
  13276. "enum": ["idle"]
  13277. }
  13278. },
  13279. "required": ["type"],
  13280. "additionalProperties": false
  13281. },
  13282. {
  13283. "type": "object",
  13284. "properties": {
  13285. "type": {
  13286. "type": "string",
  13287. "enum": ["retry"]
  13288. },
  13289. "attempt": {
  13290. "type": "integer",
  13291. "minimum": 0
  13292. },
  13293. "message": {
  13294. "type": "string"
  13295. },
  13296. "action": {
  13297. "type": "object",
  13298. "properties": {
  13299. "reason": {
  13300. "type": "string"
  13301. },
  13302. "provider": {
  13303. "type": "string"
  13304. },
  13305. "title": {
  13306. "type": "string"
  13307. },
  13308. "message": {
  13309. "type": "string"
  13310. },
  13311. "label": {
  13312. "type": "string"
  13313. },
  13314. "link": {
  13315. "type": "string"
  13316. }
  13317. },
  13318. "required": ["reason", "provider", "title", "message", "label"],
  13319. "additionalProperties": false
  13320. },
  13321. "next": {
  13322. "type": "integer",
  13323. "minimum": 0
  13324. }
  13325. },
  13326. "required": ["type", "attempt", "message", "next"],
  13327. "additionalProperties": false
  13328. },
  13329. {
  13330. "type": "object",
  13331. "properties": {
  13332. "type": {
  13333. "type": "string",
  13334. "enum": ["busy"]
  13335. }
  13336. },
  13337. "required": ["type"],
  13338. "additionalProperties": false
  13339. }
  13340. ]
  13341. },
  13342. "Todo": {
  13343. "type": "object",
  13344. "properties": {
  13345. "content": {
  13346. "type": "string",
  13347. "description": "Brief description of the task"
  13348. },
  13349. "status": {
  13350. "type": "string",
  13351. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  13352. },
  13353. "priority": {
  13354. "type": "string",
  13355. "description": "Priority level of the task: high, medium, low"
  13356. }
  13357. },
  13358. "required": ["content", "status", "priority"],
  13359. "additionalProperties": false
  13360. },
  13361. "GlobalEvent": {
  13362. "type": "object",
  13363. "properties": {
  13364. "directory": {
  13365. "type": "string"
  13366. },
  13367. "project": {
  13368. "type": "string"
  13369. },
  13370. "workspace": {
  13371. "type": "string"
  13372. },
  13373. "payload": {
  13374. "anyOf": [
  13375. {
  13376. "type": "object",
  13377. "properties": {
  13378. "id": {
  13379. "type": "string"
  13380. },
  13381. "type": {
  13382. "type": "string",
  13383. "enum": ["models-dev.refreshed"]
  13384. },
  13385. "properties": {
  13386. "type": "object",
  13387. "properties": {}
  13388. }
  13389. },
  13390. "required": ["id", "type", "properties"],
  13391. "additionalProperties": false
  13392. },
  13393. {
  13394. "type": "object",
  13395. "properties": {
  13396. "id": {
  13397. "type": "string"
  13398. },
  13399. "type": {
  13400. "type": "string",
  13401. "enum": ["plugin.added"]
  13402. },
  13403. "properties": {
  13404. "type": "object",
  13405. "properties": {
  13406. "id": {
  13407. "type": "string"
  13408. }
  13409. },
  13410. "required": ["id"],
  13411. "additionalProperties": false
  13412. }
  13413. },
  13414. "required": ["id", "type", "properties"],
  13415. "additionalProperties": false
  13416. },
  13417. {
  13418. "type": "object",
  13419. "properties": {
  13420. "id": {
  13421. "type": "string"
  13422. },
  13423. "type": {
  13424. "type": "string",
  13425. "enum": ["catalog.model.updated"]
  13426. },
  13427. "properties": {
  13428. "type": "object",
  13429. "properties": {
  13430. "model": {
  13431. "$ref": "#/components/schemas/ModelV2Info"
  13432. }
  13433. },
  13434. "required": ["model"],
  13435. "additionalProperties": false
  13436. }
  13437. },
  13438. "required": ["id", "type", "properties"],
  13439. "additionalProperties": false
  13440. },
  13441. {
  13442. "type": "object",
  13443. "properties": {
  13444. "id": {
  13445. "type": "string"
  13446. },
  13447. "type": {
  13448. "type": "string",
  13449. "enum": ["session.created"]
  13450. },
  13451. "properties": {
  13452. "type": "object",
  13453. "properties": {
  13454. "sessionID": {
  13455. "type": "string",
  13456. "pattern": "^ses"
  13457. },
  13458. "info": {
  13459. "$ref": "#/components/schemas/Session"
  13460. }
  13461. },
  13462. "required": ["sessionID", "info"],
  13463. "additionalProperties": false
  13464. }
  13465. },
  13466. "required": ["id", "type", "properties"],
  13467. "additionalProperties": false
  13468. },
  13469. {
  13470. "type": "object",
  13471. "properties": {
  13472. "id": {
  13473. "type": "string"
  13474. },
  13475. "type": {
  13476. "type": "string",
  13477. "enum": ["session.updated"]
  13478. },
  13479. "properties": {
  13480. "type": "object",
  13481. "properties": {
  13482. "sessionID": {
  13483. "type": "string",
  13484. "pattern": "^ses"
  13485. },
  13486. "info": {
  13487. "$ref": "#/components/schemas/Session"
  13488. }
  13489. },
  13490. "required": ["sessionID", "info"],
  13491. "additionalProperties": false
  13492. }
  13493. },
  13494. "required": ["id", "type", "properties"],
  13495. "additionalProperties": false
  13496. },
  13497. {
  13498. "type": "object",
  13499. "properties": {
  13500. "id": {
  13501. "type": "string"
  13502. },
  13503. "type": {
  13504. "type": "string",
  13505. "enum": ["session.deleted"]
  13506. },
  13507. "properties": {
  13508. "type": "object",
  13509. "properties": {
  13510. "sessionID": {
  13511. "type": "string",
  13512. "pattern": "^ses"
  13513. },
  13514. "info": {
  13515. "$ref": "#/components/schemas/Session"
  13516. }
  13517. },
  13518. "required": ["sessionID", "info"],
  13519. "additionalProperties": false
  13520. }
  13521. },
  13522. "required": ["id", "type", "properties"],
  13523. "additionalProperties": false
  13524. },
  13525. {
  13526. "type": "object",
  13527. "properties": {
  13528. "id": {
  13529. "type": "string"
  13530. },
  13531. "type": {
  13532. "type": "string",
  13533. "enum": ["message.updated"]
  13534. },
  13535. "properties": {
  13536. "type": "object",
  13537. "properties": {
  13538. "sessionID": {
  13539. "type": "string",
  13540. "pattern": "^ses"
  13541. },
  13542. "info": {
  13543. "$ref": "#/components/schemas/Message"
  13544. }
  13545. },
  13546. "required": ["sessionID", "info"],
  13547. "additionalProperties": false
  13548. }
  13549. },
  13550. "required": ["id", "type", "properties"],
  13551. "additionalProperties": false
  13552. },
  13553. {
  13554. "type": "object",
  13555. "properties": {
  13556. "id": {
  13557. "type": "string"
  13558. },
  13559. "type": {
  13560. "type": "string",
  13561. "enum": ["message.removed"]
  13562. },
  13563. "properties": {
  13564. "type": "object",
  13565. "properties": {
  13566. "sessionID": {
  13567. "type": "string",
  13568. "pattern": "^ses"
  13569. },
  13570. "messageID": {
  13571. "type": "string",
  13572. "pattern": "^msg"
  13573. }
  13574. },
  13575. "required": ["sessionID", "messageID"],
  13576. "additionalProperties": false
  13577. }
  13578. },
  13579. "required": ["id", "type", "properties"],
  13580. "additionalProperties": false
  13581. },
  13582. {
  13583. "type": "object",
  13584. "properties": {
  13585. "id": {
  13586. "type": "string"
  13587. },
  13588. "type": {
  13589. "type": "string",
  13590. "enum": ["message.part.updated"]
  13591. },
  13592. "properties": {
  13593. "type": "object",
  13594. "properties": {
  13595. "sessionID": {
  13596. "type": "string",
  13597. "pattern": "^ses"
  13598. },
  13599. "part": {
  13600. "$ref": "#/components/schemas/Part"
  13601. },
  13602. "time": {
  13603. "type": "number"
  13604. }
  13605. },
  13606. "required": ["sessionID", "part", "time"],
  13607. "additionalProperties": false
  13608. }
  13609. },
  13610. "required": ["id", "type", "properties"],
  13611. "additionalProperties": false
  13612. },
  13613. {
  13614. "type": "object",
  13615. "properties": {
  13616. "id": {
  13617. "type": "string"
  13618. },
  13619. "type": {
  13620. "type": "string",
  13621. "enum": ["message.part.removed"]
  13622. },
  13623. "properties": {
  13624. "type": "object",
  13625. "properties": {
  13626. "sessionID": {
  13627. "type": "string",
  13628. "pattern": "^ses"
  13629. },
  13630. "messageID": {
  13631. "type": "string",
  13632. "pattern": "^msg"
  13633. },
  13634. "partID": {
  13635. "type": "string",
  13636. "pattern": "^prt"
  13637. }
  13638. },
  13639. "required": ["sessionID", "messageID", "partID"],
  13640. "additionalProperties": false
  13641. }
  13642. },
  13643. "required": ["id", "type", "properties"],
  13644. "additionalProperties": false
  13645. },
  13646. {
  13647. "type": "object",
  13648. "properties": {
  13649. "id": {
  13650. "type": "string"
  13651. },
  13652. "type": {
  13653. "type": "string",
  13654. "enum": ["session.next.agent.switched"]
  13655. },
  13656. "properties": {
  13657. "type": "object",
  13658. "properties": {
  13659. "timestamp": {
  13660. "type": "number"
  13661. },
  13662. "sessionID": {
  13663. "type": "string",
  13664. "pattern": "^ses"
  13665. },
  13666. "agent": {
  13667. "type": "string"
  13668. }
  13669. },
  13670. "required": ["timestamp", "sessionID", "agent"],
  13671. "additionalProperties": false
  13672. }
  13673. },
  13674. "required": ["id", "type", "properties"],
  13675. "additionalProperties": false
  13676. },
  13677. {
  13678. "type": "object",
  13679. "properties": {
  13680. "id": {
  13681. "type": "string"
  13682. },
  13683. "type": {
  13684. "type": "string",
  13685. "enum": ["session.next.model.switched"]
  13686. },
  13687. "properties": {
  13688. "type": "object",
  13689. "properties": {
  13690. "timestamp": {
  13691. "type": "number"
  13692. },
  13693. "sessionID": {
  13694. "type": "string",
  13695. "pattern": "^ses"
  13696. },
  13697. "model": {
  13698. "type": "object",
  13699. "properties": {
  13700. "id": {
  13701. "type": "string"
  13702. },
  13703. "providerID": {
  13704. "type": "string"
  13705. },
  13706. "variant": {
  13707. "type": "string"
  13708. }
  13709. },
  13710. "required": ["id", "providerID"],
  13711. "additionalProperties": false
  13712. }
  13713. },
  13714. "required": ["timestamp", "sessionID", "model"],
  13715. "additionalProperties": false
  13716. }
  13717. },
  13718. "required": ["id", "type", "properties"],
  13719. "additionalProperties": false
  13720. },
  13721. {
  13722. "type": "object",
  13723. "properties": {
  13724. "id": {
  13725. "type": "string"
  13726. },
  13727. "type": {
  13728. "type": "string",
  13729. "enum": ["session.next.prompted"]
  13730. },
  13731. "properties": {
  13732. "type": "object",
  13733. "properties": {
  13734. "timestamp": {
  13735. "type": "number"
  13736. },
  13737. "sessionID": {
  13738. "type": "string",
  13739. "pattern": "^ses"
  13740. },
  13741. "prompt": {
  13742. "$ref": "#/components/schemas/Prompt"
  13743. }
  13744. },
  13745. "required": ["timestamp", "sessionID", "prompt"],
  13746. "additionalProperties": false
  13747. }
  13748. },
  13749. "required": ["id", "type", "properties"],
  13750. "additionalProperties": false
  13751. },
  13752. {
  13753. "type": "object",
  13754. "properties": {
  13755. "id": {
  13756. "type": "string"
  13757. },
  13758. "type": {
  13759. "type": "string",
  13760. "enum": ["session.next.synthetic"]
  13761. },
  13762. "properties": {
  13763. "type": "object",
  13764. "properties": {
  13765. "timestamp": {
  13766. "type": "number"
  13767. },
  13768. "sessionID": {
  13769. "type": "string",
  13770. "pattern": "^ses"
  13771. },
  13772. "text": {
  13773. "type": "string"
  13774. }
  13775. },
  13776. "required": ["timestamp", "sessionID", "text"],
  13777. "additionalProperties": false
  13778. }
  13779. },
  13780. "required": ["id", "type", "properties"],
  13781. "additionalProperties": false
  13782. },
  13783. {
  13784. "type": "object",
  13785. "properties": {
  13786. "id": {
  13787. "type": "string"
  13788. },
  13789. "type": {
  13790. "type": "string",
  13791. "enum": ["session.next.shell.started"]
  13792. },
  13793. "properties": {
  13794. "type": "object",
  13795. "properties": {
  13796. "timestamp": {
  13797. "type": "number"
  13798. },
  13799. "sessionID": {
  13800. "type": "string",
  13801. "pattern": "^ses"
  13802. },
  13803. "callID": {
  13804. "type": "string"
  13805. },
  13806. "command": {
  13807. "type": "string"
  13808. }
  13809. },
  13810. "required": ["timestamp", "sessionID", "callID", "command"],
  13811. "additionalProperties": false
  13812. }
  13813. },
  13814. "required": ["id", "type", "properties"],
  13815. "additionalProperties": false
  13816. },
  13817. {
  13818. "type": "object",
  13819. "properties": {
  13820. "id": {
  13821. "type": "string"
  13822. },
  13823. "type": {
  13824. "type": "string",
  13825. "enum": ["session.next.shell.ended"]
  13826. },
  13827. "properties": {
  13828. "type": "object",
  13829. "properties": {
  13830. "timestamp": {
  13831. "type": "number"
  13832. },
  13833. "sessionID": {
  13834. "type": "string",
  13835. "pattern": "^ses"
  13836. },
  13837. "callID": {
  13838. "type": "string"
  13839. },
  13840. "output": {
  13841. "type": "string"
  13842. }
  13843. },
  13844. "required": ["timestamp", "sessionID", "callID", "output"],
  13845. "additionalProperties": false
  13846. }
  13847. },
  13848. "required": ["id", "type", "properties"],
  13849. "additionalProperties": false
  13850. },
  13851. {
  13852. "type": "object",
  13853. "properties": {
  13854. "id": {
  13855. "type": "string"
  13856. },
  13857. "type": {
  13858. "type": "string",
  13859. "enum": ["session.next.step.started"]
  13860. },
  13861. "properties": {
  13862. "type": "object",
  13863. "properties": {
  13864. "timestamp": {
  13865. "type": "number"
  13866. },
  13867. "sessionID": {
  13868. "type": "string",
  13869. "pattern": "^ses"
  13870. },
  13871. "agent": {
  13872. "type": "string"
  13873. },
  13874. "model": {
  13875. "type": "object",
  13876. "properties": {
  13877. "id": {
  13878. "type": "string"
  13879. },
  13880. "providerID": {
  13881. "type": "string"
  13882. },
  13883. "variant": {
  13884. "type": "string"
  13885. }
  13886. },
  13887. "required": ["id", "providerID"],
  13888. "additionalProperties": false
  13889. },
  13890. "snapshot": {
  13891. "type": "string"
  13892. }
  13893. },
  13894. "required": ["timestamp", "sessionID", "agent", "model"],
  13895. "additionalProperties": false
  13896. }
  13897. },
  13898. "required": ["id", "type", "properties"],
  13899. "additionalProperties": false
  13900. },
  13901. {
  13902. "type": "object",
  13903. "properties": {
  13904. "id": {
  13905. "type": "string"
  13906. },
  13907. "type": {
  13908. "type": "string",
  13909. "enum": ["session.next.step.ended"]
  13910. },
  13911. "properties": {
  13912. "type": "object",
  13913. "properties": {
  13914. "timestamp": {
  13915. "type": "number"
  13916. },
  13917. "sessionID": {
  13918. "type": "string",
  13919. "pattern": "^ses"
  13920. },
  13921. "finish": {
  13922. "type": "string"
  13923. },
  13924. "cost": {
  13925. "type": "number"
  13926. },
  13927. "tokens": {
  13928. "type": "object",
  13929. "properties": {
  13930. "input": {
  13931. "type": "number"
  13932. },
  13933. "output": {
  13934. "type": "number"
  13935. },
  13936. "reasoning": {
  13937. "type": "number"
  13938. },
  13939. "cache": {
  13940. "type": "object",
  13941. "properties": {
  13942. "read": {
  13943. "type": "number"
  13944. },
  13945. "write": {
  13946. "type": "number"
  13947. }
  13948. },
  13949. "required": ["read", "write"],
  13950. "additionalProperties": false
  13951. }
  13952. },
  13953. "required": ["input", "output", "reasoning", "cache"],
  13954. "additionalProperties": false
  13955. },
  13956. "snapshot": {
  13957. "type": "string"
  13958. }
  13959. },
  13960. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  13961. "additionalProperties": false
  13962. }
  13963. },
  13964. "required": ["id", "type", "properties"],
  13965. "additionalProperties": false
  13966. },
  13967. {
  13968. "type": "object",
  13969. "properties": {
  13970. "id": {
  13971. "type": "string"
  13972. },
  13973. "type": {
  13974. "type": "string",
  13975. "enum": ["session.next.step.failed"]
  13976. },
  13977. "properties": {
  13978. "type": "object",
  13979. "properties": {
  13980. "timestamp": {
  13981. "type": "number"
  13982. },
  13983. "sessionID": {
  13984. "type": "string",
  13985. "pattern": "^ses"
  13986. },
  13987. "error": {
  13988. "$ref": "#/components/schemas/SessionErrorUnknown"
  13989. }
  13990. },
  13991. "required": ["timestamp", "sessionID", "error"],
  13992. "additionalProperties": false
  13993. }
  13994. },
  13995. "required": ["id", "type", "properties"],
  13996. "additionalProperties": false
  13997. },
  13998. {
  13999. "type": "object",
  14000. "properties": {
  14001. "id": {
  14002. "type": "string"
  14003. },
  14004. "type": {
  14005. "type": "string",
  14006. "enum": ["session.next.text.started"]
  14007. },
  14008. "properties": {
  14009. "type": "object",
  14010. "properties": {
  14011. "timestamp": {
  14012. "type": "number"
  14013. },
  14014. "sessionID": {
  14015. "type": "string",
  14016. "pattern": "^ses"
  14017. }
  14018. },
  14019. "required": ["timestamp", "sessionID"],
  14020. "additionalProperties": false
  14021. }
  14022. },
  14023. "required": ["id", "type", "properties"],
  14024. "additionalProperties": false
  14025. },
  14026. {
  14027. "type": "object",
  14028. "properties": {
  14029. "id": {
  14030. "type": "string"
  14031. },
  14032. "type": {
  14033. "type": "string",
  14034. "enum": ["session.next.text.delta"]
  14035. },
  14036. "properties": {
  14037. "type": "object",
  14038. "properties": {
  14039. "timestamp": {
  14040. "type": "number"
  14041. },
  14042. "sessionID": {
  14043. "type": "string",
  14044. "pattern": "^ses"
  14045. },
  14046. "delta": {
  14047. "type": "string"
  14048. }
  14049. },
  14050. "required": ["timestamp", "sessionID", "delta"],
  14051. "additionalProperties": false
  14052. }
  14053. },
  14054. "required": ["id", "type", "properties"],
  14055. "additionalProperties": false
  14056. },
  14057. {
  14058. "type": "object",
  14059. "properties": {
  14060. "id": {
  14061. "type": "string"
  14062. },
  14063. "type": {
  14064. "type": "string",
  14065. "enum": ["session.next.text.ended"]
  14066. },
  14067. "properties": {
  14068. "type": "object",
  14069. "properties": {
  14070. "timestamp": {
  14071. "type": "number"
  14072. },
  14073. "sessionID": {
  14074. "type": "string",
  14075. "pattern": "^ses"
  14076. },
  14077. "text": {
  14078. "type": "string"
  14079. }
  14080. },
  14081. "required": ["timestamp", "sessionID", "text"],
  14082. "additionalProperties": false
  14083. }
  14084. },
  14085. "required": ["id", "type", "properties"],
  14086. "additionalProperties": false
  14087. },
  14088. {
  14089. "type": "object",
  14090. "properties": {
  14091. "id": {
  14092. "type": "string"
  14093. },
  14094. "type": {
  14095. "type": "string",
  14096. "enum": ["session.next.reasoning.started"]
  14097. },
  14098. "properties": {
  14099. "type": "object",
  14100. "properties": {
  14101. "timestamp": {
  14102. "type": "number"
  14103. },
  14104. "sessionID": {
  14105. "type": "string",
  14106. "pattern": "^ses"
  14107. },
  14108. "reasoningID": {
  14109. "type": "string"
  14110. }
  14111. },
  14112. "required": ["timestamp", "sessionID", "reasoningID"],
  14113. "additionalProperties": false
  14114. }
  14115. },
  14116. "required": ["id", "type", "properties"],
  14117. "additionalProperties": false
  14118. },
  14119. {
  14120. "type": "object",
  14121. "properties": {
  14122. "id": {
  14123. "type": "string"
  14124. },
  14125. "type": {
  14126. "type": "string",
  14127. "enum": ["session.next.reasoning.delta"]
  14128. },
  14129. "properties": {
  14130. "type": "object",
  14131. "properties": {
  14132. "timestamp": {
  14133. "type": "number"
  14134. },
  14135. "sessionID": {
  14136. "type": "string",
  14137. "pattern": "^ses"
  14138. },
  14139. "reasoningID": {
  14140. "type": "string"
  14141. },
  14142. "delta": {
  14143. "type": "string"
  14144. }
  14145. },
  14146. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  14147. "additionalProperties": false
  14148. }
  14149. },
  14150. "required": ["id", "type", "properties"],
  14151. "additionalProperties": false
  14152. },
  14153. {
  14154. "type": "object",
  14155. "properties": {
  14156. "id": {
  14157. "type": "string"
  14158. },
  14159. "type": {
  14160. "type": "string",
  14161. "enum": ["session.next.reasoning.ended"]
  14162. },
  14163. "properties": {
  14164. "type": "object",
  14165. "properties": {
  14166. "timestamp": {
  14167. "type": "number"
  14168. },
  14169. "sessionID": {
  14170. "type": "string",
  14171. "pattern": "^ses"
  14172. },
  14173. "reasoningID": {
  14174. "type": "string"
  14175. },
  14176. "text": {
  14177. "type": "string"
  14178. }
  14179. },
  14180. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  14181. "additionalProperties": false
  14182. }
  14183. },
  14184. "required": ["id", "type", "properties"],
  14185. "additionalProperties": false
  14186. },
  14187. {
  14188. "type": "object",
  14189. "properties": {
  14190. "id": {
  14191. "type": "string"
  14192. },
  14193. "type": {
  14194. "type": "string",
  14195. "enum": ["session.next.tool.input.started"]
  14196. },
  14197. "properties": {
  14198. "type": "object",
  14199. "properties": {
  14200. "timestamp": {
  14201. "type": "number"
  14202. },
  14203. "sessionID": {
  14204. "type": "string",
  14205. "pattern": "^ses"
  14206. },
  14207. "callID": {
  14208. "type": "string"
  14209. },
  14210. "name": {
  14211. "type": "string"
  14212. }
  14213. },
  14214. "required": ["timestamp", "sessionID", "callID", "name"],
  14215. "additionalProperties": false
  14216. }
  14217. },
  14218. "required": ["id", "type", "properties"],
  14219. "additionalProperties": false
  14220. },
  14221. {
  14222. "type": "object",
  14223. "properties": {
  14224. "id": {
  14225. "type": "string"
  14226. },
  14227. "type": {
  14228. "type": "string",
  14229. "enum": ["session.next.tool.input.delta"]
  14230. },
  14231. "properties": {
  14232. "type": "object",
  14233. "properties": {
  14234. "timestamp": {
  14235. "type": "number"
  14236. },
  14237. "sessionID": {
  14238. "type": "string",
  14239. "pattern": "^ses"
  14240. },
  14241. "callID": {
  14242. "type": "string"
  14243. },
  14244. "delta": {
  14245. "type": "string"
  14246. }
  14247. },
  14248. "required": ["timestamp", "sessionID", "callID", "delta"],
  14249. "additionalProperties": false
  14250. }
  14251. },
  14252. "required": ["id", "type", "properties"],
  14253. "additionalProperties": false
  14254. },
  14255. {
  14256. "type": "object",
  14257. "properties": {
  14258. "id": {
  14259. "type": "string"
  14260. },
  14261. "type": {
  14262. "type": "string",
  14263. "enum": ["session.next.tool.input.ended"]
  14264. },
  14265. "properties": {
  14266. "type": "object",
  14267. "properties": {
  14268. "timestamp": {
  14269. "type": "number"
  14270. },
  14271. "sessionID": {
  14272. "type": "string",
  14273. "pattern": "^ses"
  14274. },
  14275. "callID": {
  14276. "type": "string"
  14277. },
  14278. "text": {
  14279. "type": "string"
  14280. }
  14281. },
  14282. "required": ["timestamp", "sessionID", "callID", "text"],
  14283. "additionalProperties": false
  14284. }
  14285. },
  14286. "required": ["id", "type", "properties"],
  14287. "additionalProperties": false
  14288. },
  14289. {
  14290. "type": "object",
  14291. "properties": {
  14292. "id": {
  14293. "type": "string"
  14294. },
  14295. "type": {
  14296. "type": "string",
  14297. "enum": ["session.next.tool.called"]
  14298. },
  14299. "properties": {
  14300. "type": "object",
  14301. "properties": {
  14302. "timestamp": {
  14303. "type": "number"
  14304. },
  14305. "sessionID": {
  14306. "type": "string",
  14307. "pattern": "^ses"
  14308. },
  14309. "callID": {
  14310. "type": "string"
  14311. },
  14312. "tool": {
  14313. "type": "string"
  14314. },
  14315. "input": {
  14316. "type": "object"
  14317. },
  14318. "provider": {
  14319. "type": "object",
  14320. "properties": {
  14321. "executed": {
  14322. "type": "boolean"
  14323. },
  14324. "metadata": {
  14325. "type": "object"
  14326. }
  14327. },
  14328. "required": ["executed"],
  14329. "additionalProperties": false
  14330. }
  14331. },
  14332. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  14333. "additionalProperties": false
  14334. }
  14335. },
  14336. "required": ["id", "type", "properties"],
  14337. "additionalProperties": false
  14338. },
  14339. {
  14340. "type": "object",
  14341. "properties": {
  14342. "id": {
  14343. "type": "string"
  14344. },
  14345. "type": {
  14346. "type": "string",
  14347. "enum": ["session.next.tool.progress"]
  14348. },
  14349. "properties": {
  14350. "type": "object",
  14351. "properties": {
  14352. "timestamp": {
  14353. "type": "number"
  14354. },
  14355. "sessionID": {
  14356. "type": "string",
  14357. "pattern": "^ses"
  14358. },
  14359. "callID": {
  14360. "type": "string"
  14361. },
  14362. "structured": {
  14363. "type": "object"
  14364. },
  14365. "content": {
  14366. "type": "array",
  14367. "items": {
  14368. "anyOf": [
  14369. {
  14370. "$ref": "#/components/schemas/ToolTextContent"
  14371. },
  14372. {
  14373. "$ref": "#/components/schemas/ToolFileContent"
  14374. }
  14375. ]
  14376. }
  14377. }
  14378. },
  14379. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  14380. "additionalProperties": false
  14381. }
  14382. },
  14383. "required": ["id", "type", "properties"],
  14384. "additionalProperties": false
  14385. },
  14386. {
  14387. "type": "object",
  14388. "properties": {
  14389. "id": {
  14390. "type": "string"
  14391. },
  14392. "type": {
  14393. "type": "string",
  14394. "enum": ["session.next.tool.success"]
  14395. },
  14396. "properties": {
  14397. "type": "object",
  14398. "properties": {
  14399. "timestamp": {
  14400. "type": "number"
  14401. },
  14402. "sessionID": {
  14403. "type": "string",
  14404. "pattern": "^ses"
  14405. },
  14406. "callID": {
  14407. "type": "string"
  14408. },
  14409. "structured": {
  14410. "type": "object"
  14411. },
  14412. "content": {
  14413. "type": "array",
  14414. "items": {
  14415. "anyOf": [
  14416. {
  14417. "$ref": "#/components/schemas/ToolTextContent"
  14418. },
  14419. {
  14420. "$ref": "#/components/schemas/ToolFileContent"
  14421. }
  14422. ]
  14423. }
  14424. },
  14425. "provider": {
  14426. "type": "object",
  14427. "properties": {
  14428. "executed": {
  14429. "type": "boolean"
  14430. },
  14431. "metadata": {
  14432. "type": "object"
  14433. }
  14434. },
  14435. "required": ["executed"],
  14436. "additionalProperties": false
  14437. }
  14438. },
  14439. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  14440. "additionalProperties": false
  14441. }
  14442. },
  14443. "required": ["id", "type", "properties"],
  14444. "additionalProperties": false
  14445. },
  14446. {
  14447. "type": "object",
  14448. "properties": {
  14449. "id": {
  14450. "type": "string"
  14451. },
  14452. "type": {
  14453. "type": "string",
  14454. "enum": ["session.next.tool.failed"]
  14455. },
  14456. "properties": {
  14457. "type": "object",
  14458. "properties": {
  14459. "timestamp": {
  14460. "type": "number"
  14461. },
  14462. "sessionID": {
  14463. "type": "string",
  14464. "pattern": "^ses"
  14465. },
  14466. "callID": {
  14467. "type": "string"
  14468. },
  14469. "error": {
  14470. "$ref": "#/components/schemas/SessionErrorUnknown"
  14471. },
  14472. "provider": {
  14473. "type": "object",
  14474. "properties": {
  14475. "executed": {
  14476. "type": "boolean"
  14477. },
  14478. "metadata": {
  14479. "type": "object"
  14480. }
  14481. },
  14482. "required": ["executed"],
  14483. "additionalProperties": false
  14484. }
  14485. },
  14486. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  14487. "additionalProperties": false
  14488. }
  14489. },
  14490. "required": ["id", "type", "properties"],
  14491. "additionalProperties": false
  14492. },
  14493. {
  14494. "type": "object",
  14495. "properties": {
  14496. "id": {
  14497. "type": "string"
  14498. },
  14499. "type": {
  14500. "type": "string",
  14501. "enum": ["session.next.retried"]
  14502. },
  14503. "properties": {
  14504. "type": "object",
  14505. "properties": {
  14506. "timestamp": {
  14507. "type": "number"
  14508. },
  14509. "sessionID": {
  14510. "type": "string",
  14511. "pattern": "^ses"
  14512. },
  14513. "attempt": {
  14514. "type": "number"
  14515. },
  14516. "error": {
  14517. "$ref": "#/components/schemas/SessionNextRetry_error"
  14518. }
  14519. },
  14520. "required": ["timestamp", "sessionID", "attempt", "error"],
  14521. "additionalProperties": false
  14522. }
  14523. },
  14524. "required": ["id", "type", "properties"],
  14525. "additionalProperties": false
  14526. },
  14527. {
  14528. "type": "object",
  14529. "properties": {
  14530. "id": {
  14531. "type": "string"
  14532. },
  14533. "type": {
  14534. "type": "string",
  14535. "enum": ["session.next.compaction.started"]
  14536. },
  14537. "properties": {
  14538. "type": "object",
  14539. "properties": {
  14540. "timestamp": {
  14541. "type": "number"
  14542. },
  14543. "sessionID": {
  14544. "type": "string",
  14545. "pattern": "^ses"
  14546. },
  14547. "reason": {
  14548. "type": "string",
  14549. "enum": ["auto", "manual"]
  14550. }
  14551. },
  14552. "required": ["timestamp", "sessionID", "reason"],
  14553. "additionalProperties": false
  14554. }
  14555. },
  14556. "required": ["id", "type", "properties"],
  14557. "additionalProperties": false
  14558. },
  14559. {
  14560. "type": "object",
  14561. "properties": {
  14562. "id": {
  14563. "type": "string"
  14564. },
  14565. "type": {
  14566. "type": "string",
  14567. "enum": ["session.next.compaction.delta"]
  14568. },
  14569. "properties": {
  14570. "type": "object",
  14571. "properties": {
  14572. "timestamp": {
  14573. "type": "number"
  14574. },
  14575. "sessionID": {
  14576. "type": "string",
  14577. "pattern": "^ses"
  14578. },
  14579. "text": {
  14580. "type": "string"
  14581. }
  14582. },
  14583. "required": ["timestamp", "sessionID", "text"],
  14584. "additionalProperties": false
  14585. }
  14586. },
  14587. "required": ["id", "type", "properties"],
  14588. "additionalProperties": false
  14589. },
  14590. {
  14591. "type": "object",
  14592. "properties": {
  14593. "id": {
  14594. "type": "string"
  14595. },
  14596. "type": {
  14597. "type": "string",
  14598. "enum": ["session.next.compaction.ended"]
  14599. },
  14600. "properties": {
  14601. "type": "object",
  14602. "properties": {
  14603. "timestamp": {
  14604. "type": "number"
  14605. },
  14606. "sessionID": {
  14607. "type": "string",
  14608. "pattern": "^ses"
  14609. },
  14610. "text": {
  14611. "type": "string"
  14612. },
  14613. "include": {
  14614. "type": "string"
  14615. }
  14616. },
  14617. "required": ["timestamp", "sessionID", "text"],
  14618. "additionalProperties": false
  14619. }
  14620. },
  14621. "required": ["id", "type", "properties"],
  14622. "additionalProperties": false
  14623. },
  14624. {
  14625. "type": "object",
  14626. "properties": {
  14627. "id": {
  14628. "type": "string"
  14629. },
  14630. "type": {
  14631. "type": "string",
  14632. "enum": ["message.part.delta"]
  14633. },
  14634. "properties": {
  14635. "type": "object",
  14636. "properties": {
  14637. "sessionID": {
  14638. "type": "string",
  14639. "pattern": "^ses"
  14640. },
  14641. "messageID": {
  14642. "type": "string",
  14643. "pattern": "^msg"
  14644. },
  14645. "partID": {
  14646. "type": "string",
  14647. "pattern": "^prt"
  14648. },
  14649. "field": {
  14650. "type": "string"
  14651. },
  14652. "delta": {
  14653. "type": "string"
  14654. }
  14655. },
  14656. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  14657. "additionalProperties": false
  14658. }
  14659. },
  14660. "required": ["id", "type", "properties"],
  14661. "additionalProperties": false
  14662. },
  14663. {
  14664. "type": "object",
  14665. "properties": {
  14666. "id": {
  14667. "type": "string"
  14668. },
  14669. "type": {
  14670. "type": "string",
  14671. "enum": ["session.diff"]
  14672. },
  14673. "properties": {
  14674. "type": "object",
  14675. "properties": {
  14676. "sessionID": {
  14677. "type": "string",
  14678. "pattern": "^ses"
  14679. },
  14680. "diff": {
  14681. "type": "array",
  14682. "items": {
  14683. "$ref": "#/components/schemas/SnapshotFileDiff"
  14684. }
  14685. }
  14686. },
  14687. "required": ["sessionID", "diff"],
  14688. "additionalProperties": false
  14689. }
  14690. },
  14691. "required": ["id", "type", "properties"],
  14692. "additionalProperties": false
  14693. },
  14694. {
  14695. "type": "object",
  14696. "properties": {
  14697. "id": {
  14698. "type": "string"
  14699. },
  14700. "type": {
  14701. "type": "string",
  14702. "enum": ["session.error"]
  14703. },
  14704. "properties": {
  14705. "type": "object",
  14706. "properties": {
  14707. "sessionID": {
  14708. "type": "string",
  14709. "pattern": "^ses"
  14710. },
  14711. "error": {
  14712. "anyOf": [
  14713. {
  14714. "$ref": "#/components/schemas/ProviderAuthError"
  14715. },
  14716. {
  14717. "$ref": "#/components/schemas/UnknownError"
  14718. },
  14719. {
  14720. "$ref": "#/components/schemas/MessageOutputLengthError"
  14721. },
  14722. {
  14723. "$ref": "#/components/schemas/MessageAbortedError"
  14724. },
  14725. {
  14726. "$ref": "#/components/schemas/StructuredOutputError"
  14727. },
  14728. {
  14729. "$ref": "#/components/schemas/ContextOverflowError"
  14730. },
  14731. {
  14732. "$ref": "#/components/schemas/APIError"
  14733. }
  14734. ]
  14735. }
  14736. },
  14737. "additionalProperties": false
  14738. }
  14739. },
  14740. "required": ["id", "type", "properties"],
  14741. "additionalProperties": false
  14742. },
  14743. {
  14744. "type": "object",
  14745. "properties": {
  14746. "id": {
  14747. "type": "string"
  14748. },
  14749. "type": {
  14750. "type": "string",
  14751. "enum": ["installation.updated"]
  14752. },
  14753. "properties": {
  14754. "type": "object",
  14755. "properties": {
  14756. "version": {
  14757. "type": "string"
  14758. }
  14759. },
  14760. "required": ["version"],
  14761. "additionalProperties": false
  14762. }
  14763. },
  14764. "required": ["id", "type", "properties"],
  14765. "additionalProperties": false
  14766. },
  14767. {
  14768. "type": "object",
  14769. "properties": {
  14770. "id": {
  14771. "type": "string"
  14772. },
  14773. "type": {
  14774. "type": "string",
  14775. "enum": ["installation.update-available"]
  14776. },
  14777. "properties": {
  14778. "type": "object",
  14779. "properties": {
  14780. "version": {
  14781. "type": "string"
  14782. }
  14783. },
  14784. "required": ["version"],
  14785. "additionalProperties": false
  14786. }
  14787. },
  14788. "required": ["id", "type", "properties"],
  14789. "additionalProperties": false
  14790. },
  14791. {
  14792. "type": "object",
  14793. "properties": {
  14794. "id": {
  14795. "type": "string"
  14796. },
  14797. "type": {
  14798. "type": "string",
  14799. "enum": ["permission.v2.asked"]
  14800. },
  14801. "properties": {
  14802. "type": "object",
  14803. "properties": {
  14804. "id": {
  14805. "type": "string",
  14806. "pattern": "^per"
  14807. },
  14808. "sessionID": {
  14809. "type": "string",
  14810. "pattern": "^ses"
  14811. },
  14812. "action": {
  14813. "type": "string"
  14814. },
  14815. "resources": {
  14816. "type": "array",
  14817. "items": {
  14818. "type": "string"
  14819. }
  14820. },
  14821. "save": {
  14822. "type": "array",
  14823. "items": {
  14824. "type": "string"
  14825. }
  14826. },
  14827. "metadata": {
  14828. "type": "object"
  14829. },
  14830. "source": {
  14831. "$ref": "#/components/schemas/PermissionV2Source"
  14832. }
  14833. },
  14834. "required": ["id", "sessionID", "action", "resources"],
  14835. "additionalProperties": false
  14836. }
  14837. },
  14838. "required": ["id", "type", "properties"],
  14839. "additionalProperties": false
  14840. },
  14841. {
  14842. "type": "object",
  14843. "properties": {
  14844. "id": {
  14845. "type": "string"
  14846. },
  14847. "type": {
  14848. "type": "string",
  14849. "enum": ["permission.v2.replied"]
  14850. },
  14851. "properties": {
  14852. "type": "object",
  14853. "properties": {
  14854. "sessionID": {
  14855. "type": "string",
  14856. "pattern": "^ses"
  14857. },
  14858. "requestID": {
  14859. "type": "string",
  14860. "pattern": "^per"
  14861. },
  14862. "reply": {
  14863. "$ref": "#/components/schemas/PermissionV2Reply"
  14864. }
  14865. },
  14866. "required": ["sessionID", "requestID", "reply"],
  14867. "additionalProperties": false
  14868. }
  14869. },
  14870. "required": ["id", "type", "properties"],
  14871. "additionalProperties": false
  14872. },
  14873. {
  14874. "type": "object",
  14875. "properties": {
  14876. "id": {
  14877. "type": "string"
  14878. },
  14879. "type": {
  14880. "type": "string",
  14881. "enum": ["file.edited"]
  14882. },
  14883. "properties": {
  14884. "type": "object",
  14885. "properties": {
  14886. "file": {
  14887. "type": "string"
  14888. }
  14889. },
  14890. "required": ["file"],
  14891. "additionalProperties": false
  14892. }
  14893. },
  14894. "required": ["id", "type", "properties"],
  14895. "additionalProperties": false
  14896. },
  14897. {
  14898. "type": "object",
  14899. "properties": {
  14900. "id": {
  14901. "type": "string"
  14902. },
  14903. "type": {
  14904. "type": "string",
  14905. "enum": ["account.added"]
  14906. },
  14907. "properties": {
  14908. "type": "object",
  14909. "properties": {
  14910. "account": {
  14911. "$ref": "#/components/schemas/AuthInfo"
  14912. }
  14913. },
  14914. "required": ["account"],
  14915. "additionalProperties": false
  14916. }
  14917. },
  14918. "required": ["id", "type", "properties"],
  14919. "additionalProperties": false
  14920. },
  14921. {
  14922. "type": "object",
  14923. "properties": {
  14924. "id": {
  14925. "type": "string"
  14926. },
  14927. "type": {
  14928. "type": "string",
  14929. "enum": ["account.removed"]
  14930. },
  14931. "properties": {
  14932. "type": "object",
  14933. "properties": {
  14934. "account": {
  14935. "$ref": "#/components/schemas/AuthInfo"
  14936. }
  14937. },
  14938. "required": ["account"],
  14939. "additionalProperties": false
  14940. }
  14941. },
  14942. "required": ["id", "type", "properties"],
  14943. "additionalProperties": false
  14944. },
  14945. {
  14946. "type": "object",
  14947. "properties": {
  14948. "id": {
  14949. "type": "string"
  14950. },
  14951. "type": {
  14952. "type": "string",
  14953. "enum": ["account.switched"]
  14954. },
  14955. "properties": {
  14956. "type": "object",
  14957. "properties": {
  14958. "serviceID": {
  14959. "type": "string"
  14960. },
  14961. "from": {
  14962. "type": "string"
  14963. },
  14964. "to": {
  14965. "type": "string"
  14966. }
  14967. },
  14968. "required": ["serviceID"],
  14969. "additionalProperties": false
  14970. }
  14971. },
  14972. "required": ["id", "type", "properties"],
  14973. "additionalProperties": false
  14974. },
  14975. {
  14976. "type": "object",
  14977. "properties": {
  14978. "id": {
  14979. "type": "string"
  14980. },
  14981. "type": {
  14982. "type": "string",
  14983. "enum": ["file.watcher.updated"]
  14984. },
  14985. "properties": {
  14986. "type": "object",
  14987. "properties": {
  14988. "file": {
  14989. "type": "string"
  14990. },
  14991. "event": {
  14992. "type": "string",
  14993. "enum": ["add", "change", "unlink"]
  14994. }
  14995. },
  14996. "required": ["file", "event"],
  14997. "additionalProperties": false
  14998. }
  14999. },
  15000. "required": ["id", "type", "properties"],
  15001. "additionalProperties": false
  15002. },
  15003. {
  15004. "type": "object",
  15005. "properties": {
  15006. "id": {
  15007. "type": "string"
  15008. },
  15009. "type": {
  15010. "type": "string",
  15011. "enum": ["pty.created"]
  15012. },
  15013. "properties": {
  15014. "type": "object",
  15015. "properties": {
  15016. "info": {
  15017. "$ref": "#/components/schemas/Pty"
  15018. }
  15019. },
  15020. "required": ["info"],
  15021. "additionalProperties": false
  15022. }
  15023. },
  15024. "required": ["id", "type", "properties"],
  15025. "additionalProperties": false
  15026. },
  15027. {
  15028. "type": "object",
  15029. "properties": {
  15030. "id": {
  15031. "type": "string"
  15032. },
  15033. "type": {
  15034. "type": "string",
  15035. "enum": ["pty.updated"]
  15036. },
  15037. "properties": {
  15038. "type": "object",
  15039. "properties": {
  15040. "info": {
  15041. "$ref": "#/components/schemas/Pty"
  15042. }
  15043. },
  15044. "required": ["info"],
  15045. "additionalProperties": false
  15046. }
  15047. },
  15048. "required": ["id", "type", "properties"],
  15049. "additionalProperties": false
  15050. },
  15051. {
  15052. "type": "object",
  15053. "properties": {
  15054. "id": {
  15055. "type": "string"
  15056. },
  15057. "type": {
  15058. "type": "string",
  15059. "enum": ["pty.exited"]
  15060. },
  15061. "properties": {
  15062. "type": "object",
  15063. "properties": {
  15064. "id": {
  15065. "type": "string",
  15066. "pattern": "^pty"
  15067. },
  15068. "exitCode": {
  15069. "type": "integer",
  15070. "minimum": 0
  15071. }
  15072. },
  15073. "required": ["id", "exitCode"],
  15074. "additionalProperties": false
  15075. }
  15076. },
  15077. "required": ["id", "type", "properties"],
  15078. "additionalProperties": false
  15079. },
  15080. {
  15081. "type": "object",
  15082. "properties": {
  15083. "id": {
  15084. "type": "string"
  15085. },
  15086. "type": {
  15087. "type": "string",
  15088. "enum": ["pty.deleted"]
  15089. },
  15090. "properties": {
  15091. "type": "object",
  15092. "properties": {
  15093. "id": {
  15094. "type": "string",
  15095. "pattern": "^pty"
  15096. }
  15097. },
  15098. "required": ["id"],
  15099. "additionalProperties": false
  15100. }
  15101. },
  15102. "required": ["id", "type", "properties"],
  15103. "additionalProperties": false
  15104. },
  15105. {
  15106. "type": "object",
  15107. "properties": {
  15108. "id": {
  15109. "type": "string"
  15110. },
  15111. "type": {
  15112. "type": "string",
  15113. "enum": ["lsp.updated"]
  15114. },
  15115. "properties": {
  15116. "type": "object",
  15117. "properties": {}
  15118. }
  15119. },
  15120. "required": ["id", "type", "properties"],
  15121. "additionalProperties": false
  15122. },
  15123. {
  15124. "type": "object",
  15125. "properties": {
  15126. "id": {
  15127. "type": "string"
  15128. },
  15129. "type": {
  15130. "type": "string",
  15131. "enum": ["permission.asked"]
  15132. },
  15133. "properties": {
  15134. "type": "object",
  15135. "properties": {
  15136. "id": {
  15137. "type": "string",
  15138. "pattern": "^per"
  15139. },
  15140. "sessionID": {
  15141. "type": "string",
  15142. "pattern": "^ses"
  15143. },
  15144. "permission": {
  15145. "type": "string"
  15146. },
  15147. "patterns": {
  15148. "type": "array",
  15149. "items": {
  15150. "type": "string"
  15151. }
  15152. },
  15153. "metadata": {
  15154. "type": "object"
  15155. },
  15156. "always": {
  15157. "type": "array",
  15158. "items": {
  15159. "type": "string"
  15160. }
  15161. },
  15162. "tool": {
  15163. "type": "object",
  15164. "properties": {
  15165. "messageID": {
  15166. "type": "string"
  15167. },
  15168. "callID": {
  15169. "type": "string"
  15170. }
  15171. },
  15172. "required": ["messageID", "callID"],
  15173. "additionalProperties": false
  15174. }
  15175. },
  15176. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  15177. "additionalProperties": false
  15178. }
  15179. },
  15180. "required": ["id", "type", "properties"],
  15181. "additionalProperties": false
  15182. },
  15183. {
  15184. "type": "object",
  15185. "properties": {
  15186. "id": {
  15187. "type": "string"
  15188. },
  15189. "type": {
  15190. "type": "string",
  15191. "enum": ["permission.replied"]
  15192. },
  15193. "properties": {
  15194. "type": "object",
  15195. "properties": {
  15196. "sessionID": {
  15197. "type": "string",
  15198. "pattern": "^ses"
  15199. },
  15200. "requestID": {
  15201. "type": "string",
  15202. "pattern": "^per"
  15203. },
  15204. "reply": {
  15205. "type": "string",
  15206. "enum": ["once", "always", "reject"]
  15207. }
  15208. },
  15209. "required": ["sessionID", "requestID", "reply"],
  15210. "additionalProperties": false
  15211. }
  15212. },
  15213. "required": ["id", "type", "properties"],
  15214. "additionalProperties": false
  15215. },
  15216. {
  15217. "type": "object",
  15218. "properties": {
  15219. "id": {
  15220. "type": "string"
  15221. },
  15222. "type": {
  15223. "type": "string",
  15224. "enum": ["tui.prompt.append"]
  15225. },
  15226. "properties": {
  15227. "type": "object",
  15228. "properties": {
  15229. "text": {
  15230. "type": "string"
  15231. }
  15232. },
  15233. "required": ["text"],
  15234. "additionalProperties": false
  15235. }
  15236. },
  15237. "required": ["id", "type", "properties"],
  15238. "additionalProperties": false
  15239. },
  15240. {
  15241. "type": "object",
  15242. "properties": {
  15243. "id": {
  15244. "type": "string"
  15245. },
  15246. "type": {
  15247. "type": "string",
  15248. "enum": ["tui.command.execute"]
  15249. },
  15250. "properties": {
  15251. "type": "object",
  15252. "properties": {
  15253. "command": {
  15254. "anyOf": [
  15255. {
  15256. "type": "string",
  15257. "enum": [
  15258. "session.list",
  15259. "session.new",
  15260. "session.share",
  15261. "session.interrupt",
  15262. "session.compact",
  15263. "session.page.up",
  15264. "session.page.down",
  15265. "session.line.up",
  15266. "session.line.down",
  15267. "session.half.page.up",
  15268. "session.half.page.down",
  15269. "session.first",
  15270. "session.last",
  15271. "prompt.clear",
  15272. "prompt.submit",
  15273. "agent.cycle"
  15274. ]
  15275. },
  15276. {
  15277. "type": "string"
  15278. }
  15279. ]
  15280. }
  15281. },
  15282. "required": ["command"],
  15283. "additionalProperties": false
  15284. }
  15285. },
  15286. "required": ["id", "type", "properties"],
  15287. "additionalProperties": false
  15288. },
  15289. {
  15290. "type": "object",
  15291. "properties": {
  15292. "id": {
  15293. "type": "string"
  15294. },
  15295. "type": {
  15296. "type": "string",
  15297. "enum": ["tui.toast.show"]
  15298. },
  15299. "properties": {
  15300. "type": "object",
  15301. "properties": {
  15302. "title": {
  15303. "type": "string"
  15304. },
  15305. "message": {
  15306. "type": "string"
  15307. },
  15308. "variant": {
  15309. "type": "string",
  15310. "enum": ["info", "success", "warning", "error"]
  15311. },
  15312. "duration": {
  15313. "type": "integer",
  15314. "exclusiveMinimum": 0
  15315. }
  15316. },
  15317. "required": ["message", "variant"],
  15318. "additionalProperties": false
  15319. }
  15320. },
  15321. "required": ["id", "type", "properties"],
  15322. "additionalProperties": false
  15323. },
  15324. {
  15325. "type": "object",
  15326. "properties": {
  15327. "id": {
  15328. "type": "string"
  15329. },
  15330. "type": {
  15331. "type": "string",
  15332. "enum": ["tui.session.select"]
  15333. },
  15334. "properties": {
  15335. "type": "object",
  15336. "properties": {
  15337. "sessionID": {
  15338. "type": "string",
  15339. "pattern": "^ses",
  15340. "description": "Session ID to navigate to"
  15341. }
  15342. },
  15343. "required": ["sessionID"],
  15344. "additionalProperties": false
  15345. }
  15346. },
  15347. "required": ["id", "type", "properties"],
  15348. "additionalProperties": false
  15349. },
  15350. {
  15351. "type": "object",
  15352. "properties": {
  15353. "id": {
  15354. "type": "string"
  15355. },
  15356. "type": {
  15357. "type": "string",
  15358. "enum": ["mcp.tools.changed"]
  15359. },
  15360. "properties": {
  15361. "type": "object",
  15362. "properties": {
  15363. "server": {
  15364. "type": "string"
  15365. }
  15366. },
  15367. "required": ["server"],
  15368. "additionalProperties": false
  15369. }
  15370. },
  15371. "required": ["id", "type", "properties"],
  15372. "additionalProperties": false
  15373. },
  15374. {
  15375. "type": "object",
  15376. "properties": {
  15377. "id": {
  15378. "type": "string"
  15379. },
  15380. "type": {
  15381. "type": "string",
  15382. "enum": ["mcp.browser.open.failed"]
  15383. },
  15384. "properties": {
  15385. "type": "object",
  15386. "properties": {
  15387. "mcpName": {
  15388. "type": "string"
  15389. },
  15390. "url": {
  15391. "type": "string"
  15392. }
  15393. },
  15394. "required": ["mcpName", "url"],
  15395. "additionalProperties": false
  15396. }
  15397. },
  15398. "required": ["id", "type", "properties"],
  15399. "additionalProperties": false
  15400. },
  15401. {
  15402. "type": "object",
  15403. "properties": {
  15404. "id": {
  15405. "type": "string"
  15406. },
  15407. "type": {
  15408. "type": "string",
  15409. "enum": ["command.executed"]
  15410. },
  15411. "properties": {
  15412. "type": "object",
  15413. "properties": {
  15414. "name": {
  15415. "type": "string"
  15416. },
  15417. "sessionID": {
  15418. "type": "string",
  15419. "pattern": "^ses"
  15420. },
  15421. "arguments": {
  15422. "type": "string"
  15423. },
  15424. "messageID": {
  15425. "type": "string",
  15426. "pattern": "^msg"
  15427. }
  15428. },
  15429. "required": ["name", "sessionID", "arguments", "messageID"],
  15430. "additionalProperties": false
  15431. }
  15432. },
  15433. "required": ["id", "type", "properties"],
  15434. "additionalProperties": false
  15435. },
  15436. {
  15437. "type": "object",
  15438. "properties": {
  15439. "id": {
  15440. "type": "string"
  15441. },
  15442. "type": {
  15443. "type": "string",
  15444. "enum": ["project.directories.updated"]
  15445. },
  15446. "properties": {
  15447. "type": "object",
  15448. "properties": {
  15449. "projectID": {
  15450. "type": "string"
  15451. }
  15452. },
  15453. "required": ["projectID"],
  15454. "additionalProperties": false
  15455. }
  15456. },
  15457. "required": ["id", "type", "properties"],
  15458. "additionalProperties": false
  15459. },
  15460. {
  15461. "type": "object",
  15462. "properties": {
  15463. "id": {
  15464. "type": "string"
  15465. },
  15466. "type": {
  15467. "type": "string",
  15468. "enum": ["project.updated"]
  15469. },
  15470. "properties": {
  15471. "type": "object",
  15472. "properties": {
  15473. "id": {
  15474. "type": "string"
  15475. },
  15476. "worktree": {
  15477. "type": "string"
  15478. },
  15479. "vcs": {
  15480. "type": "string",
  15481. "enum": ["git"]
  15482. },
  15483. "name": {
  15484. "type": "string"
  15485. },
  15486. "icon": {
  15487. "type": "object",
  15488. "properties": {
  15489. "url": {
  15490. "type": "string"
  15491. },
  15492. "override": {
  15493. "type": "string"
  15494. },
  15495. "color": {
  15496. "type": "string"
  15497. }
  15498. },
  15499. "additionalProperties": false
  15500. },
  15501. "commands": {
  15502. "type": "object",
  15503. "properties": {
  15504. "start": {
  15505. "type": "string",
  15506. "description": "Startup script to run when creating a new workspace (worktree)"
  15507. }
  15508. },
  15509. "additionalProperties": false
  15510. },
  15511. "time": {
  15512. "type": "object",
  15513. "properties": {
  15514. "created": {
  15515. "type": "integer",
  15516. "minimum": 0
  15517. },
  15518. "updated": {
  15519. "type": "integer",
  15520. "minimum": 0
  15521. },
  15522. "initialized": {
  15523. "type": "integer",
  15524. "minimum": 0
  15525. }
  15526. },
  15527. "required": ["created", "updated"],
  15528. "additionalProperties": false
  15529. },
  15530. "sandboxes": {
  15531. "type": "array",
  15532. "items": {
  15533. "type": "string"
  15534. }
  15535. }
  15536. },
  15537. "required": ["id", "worktree", "time", "sandboxes"],
  15538. "additionalProperties": false
  15539. }
  15540. },
  15541. "required": ["id", "type", "properties"],
  15542. "additionalProperties": false
  15543. },
  15544. {
  15545. "type": "object",
  15546. "properties": {
  15547. "id": {
  15548. "type": "string"
  15549. },
  15550. "type": {
  15551. "type": "string",
  15552. "enum": ["question.asked"]
  15553. },
  15554. "properties": {
  15555. "type": "object",
  15556. "properties": {
  15557. "id": {
  15558. "type": "string",
  15559. "pattern": "^que"
  15560. },
  15561. "sessionID": {
  15562. "type": "string",
  15563. "pattern": "^ses"
  15564. },
  15565. "questions": {
  15566. "type": "array",
  15567. "items": {
  15568. "$ref": "#/components/schemas/QuestionInfo"
  15569. },
  15570. "description": "Questions to ask"
  15571. },
  15572. "tool": {
  15573. "$ref": "#/components/schemas/QuestionTool"
  15574. }
  15575. },
  15576. "required": ["id", "sessionID", "questions"],
  15577. "additionalProperties": false
  15578. }
  15579. },
  15580. "required": ["id", "type", "properties"],
  15581. "additionalProperties": false
  15582. },
  15583. {
  15584. "type": "object",
  15585. "properties": {
  15586. "id": {
  15587. "type": "string"
  15588. },
  15589. "type": {
  15590. "type": "string",
  15591. "enum": ["question.replied"]
  15592. },
  15593. "properties": {
  15594. "type": "object",
  15595. "properties": {
  15596. "sessionID": {
  15597. "type": "string",
  15598. "pattern": "^ses"
  15599. },
  15600. "requestID": {
  15601. "type": "string",
  15602. "pattern": "^que"
  15603. },
  15604. "answers": {
  15605. "type": "array",
  15606. "items": {
  15607. "$ref": "#/components/schemas/QuestionAnswer"
  15608. }
  15609. }
  15610. },
  15611. "required": ["sessionID", "requestID", "answers"],
  15612. "additionalProperties": false
  15613. }
  15614. },
  15615. "required": ["id", "type", "properties"],
  15616. "additionalProperties": false
  15617. },
  15618. {
  15619. "type": "object",
  15620. "properties": {
  15621. "id": {
  15622. "type": "string"
  15623. },
  15624. "type": {
  15625. "type": "string",
  15626. "enum": ["question.rejected"]
  15627. },
  15628. "properties": {
  15629. "type": "object",
  15630. "properties": {
  15631. "sessionID": {
  15632. "type": "string",
  15633. "pattern": "^ses"
  15634. },
  15635. "requestID": {
  15636. "type": "string",
  15637. "pattern": "^que"
  15638. }
  15639. },
  15640. "required": ["sessionID", "requestID"],
  15641. "additionalProperties": false
  15642. }
  15643. },
  15644. "required": ["id", "type", "properties"],
  15645. "additionalProperties": false
  15646. },
  15647. {
  15648. "type": "object",
  15649. "properties": {
  15650. "id": {
  15651. "type": "string"
  15652. },
  15653. "type": {
  15654. "type": "string",
  15655. "enum": ["session.status"]
  15656. },
  15657. "properties": {
  15658. "type": "object",
  15659. "properties": {
  15660. "sessionID": {
  15661. "type": "string",
  15662. "pattern": "^ses"
  15663. },
  15664. "status": {
  15665. "$ref": "#/components/schemas/SessionStatus"
  15666. }
  15667. },
  15668. "required": ["sessionID", "status"],
  15669. "additionalProperties": false
  15670. }
  15671. },
  15672. "required": ["id", "type", "properties"],
  15673. "additionalProperties": false
  15674. },
  15675. {
  15676. "type": "object",
  15677. "properties": {
  15678. "id": {
  15679. "type": "string"
  15680. },
  15681. "type": {
  15682. "type": "string",
  15683. "enum": ["session.idle"]
  15684. },
  15685. "properties": {
  15686. "type": "object",
  15687. "properties": {
  15688. "sessionID": {
  15689. "type": "string",
  15690. "pattern": "^ses"
  15691. }
  15692. },
  15693. "required": ["sessionID"],
  15694. "additionalProperties": false
  15695. }
  15696. },
  15697. "required": ["id", "type", "properties"],
  15698. "additionalProperties": false
  15699. },
  15700. {
  15701. "type": "object",
  15702. "properties": {
  15703. "id": {
  15704. "type": "string"
  15705. },
  15706. "type": {
  15707. "type": "string",
  15708. "enum": ["session.compacted"]
  15709. },
  15710. "properties": {
  15711. "type": "object",
  15712. "properties": {
  15713. "sessionID": {
  15714. "type": "string",
  15715. "pattern": "^ses"
  15716. }
  15717. },
  15718. "required": ["sessionID"],
  15719. "additionalProperties": false
  15720. }
  15721. },
  15722. "required": ["id", "type", "properties"],
  15723. "additionalProperties": false
  15724. },
  15725. {
  15726. "type": "object",
  15727. "properties": {
  15728. "id": {
  15729. "type": "string"
  15730. },
  15731. "type": {
  15732. "type": "string",
  15733. "enum": ["todo.updated"]
  15734. },
  15735. "properties": {
  15736. "type": "object",
  15737. "properties": {
  15738. "sessionID": {
  15739. "type": "string",
  15740. "pattern": "^ses"
  15741. },
  15742. "todos": {
  15743. "type": "array",
  15744. "items": {
  15745. "$ref": "#/components/schemas/Todo"
  15746. }
  15747. }
  15748. },
  15749. "required": ["sessionID", "todos"],
  15750. "additionalProperties": false
  15751. }
  15752. },
  15753. "required": ["id", "type", "properties"],
  15754. "additionalProperties": false
  15755. },
  15756. {
  15757. "type": "object",
  15758. "properties": {
  15759. "id": {
  15760. "type": "string"
  15761. },
  15762. "type": {
  15763. "type": "string",
  15764. "enum": ["vcs.branch.updated"]
  15765. },
  15766. "properties": {
  15767. "type": "object",
  15768. "properties": {
  15769. "branch": {
  15770. "type": "string"
  15771. }
  15772. },
  15773. "additionalProperties": false
  15774. }
  15775. },
  15776. "required": ["id", "type", "properties"],
  15777. "additionalProperties": false
  15778. },
  15779. {
  15780. "type": "object",
  15781. "properties": {
  15782. "id": {
  15783. "type": "string"
  15784. },
  15785. "type": {
  15786. "type": "string",
  15787. "enum": ["worktree.ready"]
  15788. },
  15789. "properties": {
  15790. "type": "object",
  15791. "properties": {
  15792. "name": {
  15793. "type": "string"
  15794. },
  15795. "branch": {
  15796. "type": "string"
  15797. }
  15798. },
  15799. "required": ["name"],
  15800. "additionalProperties": false
  15801. }
  15802. },
  15803. "required": ["id", "type", "properties"],
  15804. "additionalProperties": false
  15805. },
  15806. {
  15807. "type": "object",
  15808. "properties": {
  15809. "id": {
  15810. "type": "string"
  15811. },
  15812. "type": {
  15813. "type": "string",
  15814. "enum": ["worktree.failed"]
  15815. },
  15816. "properties": {
  15817. "type": "object",
  15818. "properties": {
  15819. "message": {
  15820. "type": "string"
  15821. }
  15822. },
  15823. "required": ["message"],
  15824. "additionalProperties": false
  15825. }
  15826. },
  15827. "required": ["id", "type", "properties"],
  15828. "additionalProperties": false
  15829. },
  15830. {
  15831. "type": "object",
  15832. "properties": {
  15833. "id": {
  15834. "type": "string"
  15835. },
  15836. "type": {
  15837. "type": "string",
  15838. "enum": ["workspace.ready"]
  15839. },
  15840. "properties": {
  15841. "type": "object",
  15842. "properties": {
  15843. "name": {
  15844. "type": "string"
  15845. }
  15846. },
  15847. "required": ["name"],
  15848. "additionalProperties": false
  15849. }
  15850. },
  15851. "required": ["id", "type", "properties"],
  15852. "additionalProperties": false
  15853. },
  15854. {
  15855. "type": "object",
  15856. "properties": {
  15857. "id": {
  15858. "type": "string"
  15859. },
  15860. "type": {
  15861. "type": "string",
  15862. "enum": ["workspace.failed"]
  15863. },
  15864. "properties": {
  15865. "type": "object",
  15866. "properties": {
  15867. "message": {
  15868. "type": "string"
  15869. }
  15870. },
  15871. "required": ["message"],
  15872. "additionalProperties": false
  15873. }
  15874. },
  15875. "required": ["id", "type", "properties"],
  15876. "additionalProperties": false
  15877. },
  15878. {
  15879. "type": "object",
  15880. "properties": {
  15881. "id": {
  15882. "type": "string"
  15883. },
  15884. "type": {
  15885. "type": "string",
  15886. "enum": ["workspace.status"]
  15887. },
  15888. "properties": {
  15889. "type": "object",
  15890. "properties": {
  15891. "workspaceID": {
  15892. "type": "string",
  15893. "pattern": "^wrk"
  15894. },
  15895. "status": {
  15896. "type": "string",
  15897. "enum": ["connected", "connecting", "disconnected", "error"]
  15898. }
  15899. },
  15900. "required": ["workspaceID", "status"],
  15901. "additionalProperties": false
  15902. }
  15903. },
  15904. "required": ["id", "type", "properties"],
  15905. "additionalProperties": false
  15906. },
  15907. {
  15908. "type": "object",
  15909. "properties": {
  15910. "id": {
  15911. "type": "string"
  15912. },
  15913. "type": {
  15914. "type": "string",
  15915. "enum": ["server.connected"]
  15916. },
  15917. "properties": {
  15918. "type": "object",
  15919. "properties": {}
  15920. }
  15921. },
  15922. "required": ["id", "type", "properties"],
  15923. "additionalProperties": false
  15924. },
  15925. {
  15926. "type": "object",
  15927. "properties": {
  15928. "id": {
  15929. "type": "string"
  15930. },
  15931. "type": {
  15932. "type": "string",
  15933. "enum": ["global.disposed"]
  15934. },
  15935. "properties": {
  15936. "type": "object",
  15937. "properties": {}
  15938. }
  15939. },
  15940. "required": ["id", "type", "properties"],
  15941. "additionalProperties": false
  15942. },
  15943. {
  15944. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15945. },
  15946. {
  15947. "$ref": "#/components/schemas/SyncEventSessionCreated"
  15948. },
  15949. {
  15950. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  15951. },
  15952. {
  15953. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  15954. },
  15955. {
  15956. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  15957. },
  15958. {
  15959. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  15960. },
  15961. {
  15962. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  15963. },
  15964. {
  15965. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  15966. },
  15967. {
  15968. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  15969. },
  15970. {
  15971. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  15972. },
  15973. {
  15974. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  15975. },
  15976. {
  15977. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  15978. },
  15979. {
  15980. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  15981. },
  15982. {
  15983. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  15984. },
  15985. {
  15986. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  15987. },
  15988. {
  15989. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  15990. },
  15991. {
  15992. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  15993. },
  15994. {
  15995. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  15996. },
  15997. {
  15998. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  15999. },
  16000. {
  16001. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  16002. },
  16003. {
  16004. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  16005. },
  16006. {
  16007. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  16008. },
  16009. {
  16010. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  16011. },
  16012. {
  16013. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  16014. },
  16015. {
  16016. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  16017. },
  16018. {
  16019. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  16020. },
  16021. {
  16022. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  16023. },
  16024. {
  16025. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  16026. },
  16027. {
  16028. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  16029. },
  16030. {
  16031. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  16032. },
  16033. {
  16034. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  16035. },
  16036. {
  16037. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  16038. },
  16039. {
  16040. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  16041. },
  16042. {
  16043. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  16044. }
  16045. ]
  16046. }
  16047. },
  16048. "required": ["directory", "payload"],
  16049. "additionalProperties": false
  16050. },
  16051. "LogLevel": {
  16052. "type": "string",
  16053. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  16054. "description": "Log level"
  16055. },
  16056. "ServerConfig": {
  16057. "type": "object",
  16058. "properties": {
  16059. "port": {
  16060. "type": "integer",
  16061. "exclusiveMinimum": 0
  16062. },
  16063. "hostname": {
  16064. "type": "string"
  16065. },
  16066. "mdns": {
  16067. "type": "boolean"
  16068. },
  16069. "mdnsDomain": {
  16070. "type": "string"
  16071. },
  16072. "cors": {
  16073. "type": "array",
  16074. "items": {
  16075. "type": "string"
  16076. }
  16077. }
  16078. },
  16079. "additionalProperties": false,
  16080. "description": "Server configuration for opencode serve and web commands"
  16081. },
  16082. "ReferenceConfigEntry": {
  16083. "anyOf": [
  16084. {
  16085. "type": "string"
  16086. },
  16087. {
  16088. "type": "object",
  16089. "properties": {
  16090. "repository": {
  16091. "type": "string",
  16092. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  16093. },
  16094. "branch": {
  16095. "type": "string"
  16096. }
  16097. },
  16098. "required": ["repository"],
  16099. "additionalProperties": false
  16100. },
  16101. {
  16102. "type": "object",
  16103. "properties": {
  16104. "path": {
  16105. "type": "string",
  16106. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  16107. }
  16108. },
  16109. "required": ["path"],
  16110. "additionalProperties": false
  16111. }
  16112. ]
  16113. },
  16114. "ReferenceConfig": {
  16115. "type": "object",
  16116. "additionalProperties": {
  16117. "$ref": "#/components/schemas/ReferenceConfigEntry"
  16118. }
  16119. },
  16120. "PermissionActionConfig": {
  16121. "type": "string",
  16122. "enum": ["ask", "allow", "deny"]
  16123. },
  16124. "PermissionObjectConfig": {
  16125. "type": "object",
  16126. "additionalProperties": {
  16127. "$ref": "#/components/schemas/PermissionActionConfig"
  16128. }
  16129. },
  16130. "PermissionRuleConfig": {
  16131. "anyOf": [
  16132. {
  16133. "$ref": "#/components/schemas/PermissionActionConfig"
  16134. },
  16135. {
  16136. "$ref": "#/components/schemas/PermissionObjectConfig"
  16137. }
  16138. ]
  16139. },
  16140. "PermissionConfig": {
  16141. "anyOf": [
  16142. {
  16143. "$ref": "#/components/schemas/PermissionActionConfig"
  16144. },
  16145. {
  16146. "type": "object",
  16147. "properties": {
  16148. "read": {
  16149. "$ref": "#/components/schemas/PermissionRuleConfig"
  16150. },
  16151. "edit": {
  16152. "$ref": "#/components/schemas/PermissionRuleConfig"
  16153. },
  16154. "glob": {
  16155. "$ref": "#/components/schemas/PermissionRuleConfig"
  16156. },
  16157. "grep": {
  16158. "$ref": "#/components/schemas/PermissionRuleConfig"
  16159. },
  16160. "list": {
  16161. "$ref": "#/components/schemas/PermissionRuleConfig"
  16162. },
  16163. "bash": {
  16164. "$ref": "#/components/schemas/PermissionRuleConfig"
  16165. },
  16166. "task": {
  16167. "$ref": "#/components/schemas/PermissionRuleConfig"
  16168. },
  16169. "external_directory": {
  16170. "$ref": "#/components/schemas/PermissionRuleConfig"
  16171. },
  16172. "todowrite": {
  16173. "$ref": "#/components/schemas/PermissionActionConfig"
  16174. },
  16175. "question": {
  16176. "$ref": "#/components/schemas/PermissionActionConfig"
  16177. },
  16178. "webfetch": {
  16179. "$ref": "#/components/schemas/PermissionActionConfig"
  16180. },
  16181. "websearch": {
  16182. "$ref": "#/components/schemas/PermissionActionConfig"
  16183. },
  16184. "lsp": {
  16185. "$ref": "#/components/schemas/PermissionRuleConfig"
  16186. },
  16187. "doom_loop": {
  16188. "$ref": "#/components/schemas/PermissionActionConfig"
  16189. },
  16190. "skill": {
  16191. "$ref": "#/components/schemas/PermissionRuleConfig"
  16192. }
  16193. },
  16194. "additionalProperties": {
  16195. "$ref": "#/components/schemas/PermissionRuleConfig"
  16196. }
  16197. }
  16198. ]
  16199. },
  16200. "AgentConfig": {
  16201. "type": "object",
  16202. "properties": {
  16203. "model": {
  16204. "type": "string"
  16205. },
  16206. "variant": {
  16207. "type": "string"
  16208. },
  16209. "temperature": {
  16210. "type": "number"
  16211. },
  16212. "top_p": {
  16213. "type": "number"
  16214. },
  16215. "prompt": {
  16216. "type": "string"
  16217. },
  16218. "tools": {
  16219. "type": "object",
  16220. "additionalProperties": {
  16221. "type": "boolean"
  16222. }
  16223. },
  16224. "disable": {
  16225. "type": "boolean"
  16226. },
  16227. "description": {
  16228. "type": "string"
  16229. },
  16230. "mode": {
  16231. "type": "string",
  16232. "enum": ["subagent", "primary", "all"]
  16233. },
  16234. "hidden": {
  16235. "type": "boolean"
  16236. },
  16237. "options": {
  16238. "type": "object"
  16239. },
  16240. "color": {
  16241. "anyOf": [
  16242. {
  16243. "type": "string",
  16244. "pattern": "^#[0-9a-fA-F]{6}$"
  16245. },
  16246. {
  16247. "type": "string",
  16248. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  16249. }
  16250. ],
  16251. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  16252. },
  16253. "steps": {
  16254. "type": "integer",
  16255. "exclusiveMinimum": 0
  16256. },
  16257. "maxSteps": {
  16258. "type": "integer",
  16259. "exclusiveMinimum": 0
  16260. },
  16261. "permission": {
  16262. "$ref": "#/components/schemas/PermissionConfig"
  16263. }
  16264. },
  16265. "additionalProperties": {}
  16266. },
  16267. "ProviderConfig": {
  16268. "type": "object",
  16269. "properties": {
  16270. "api": {
  16271. "type": "string"
  16272. },
  16273. "name": {
  16274. "type": "string"
  16275. },
  16276. "env": {
  16277. "type": "array",
  16278. "items": {
  16279. "type": "string"
  16280. }
  16281. },
  16282. "id": {
  16283. "type": "string"
  16284. },
  16285. "npm": {
  16286. "type": "string"
  16287. },
  16288. "whitelist": {
  16289. "type": "array",
  16290. "items": {
  16291. "type": "string"
  16292. }
  16293. },
  16294. "blacklist": {
  16295. "type": "array",
  16296. "items": {
  16297. "type": "string"
  16298. }
  16299. },
  16300. "options": {
  16301. "type": "object",
  16302. "properties": {
  16303. "apiKey": {
  16304. "type": "string"
  16305. },
  16306. "baseURL": {
  16307. "type": "string"
  16308. },
  16309. "enterpriseUrl": {
  16310. "type": "string"
  16311. },
  16312. "setCacheKey": {
  16313. "type": "boolean"
  16314. },
  16315. "timeout": {
  16316. "anyOf": [
  16317. {
  16318. "type": "integer",
  16319. "exclusiveMinimum": 0
  16320. },
  16321. {
  16322. "type": "boolean",
  16323. "enum": [false]
  16324. }
  16325. ],
  16326. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  16327. },
  16328. "headerTimeout": {
  16329. "anyOf": [
  16330. {
  16331. "type": "integer",
  16332. "exclusiveMinimum": 0
  16333. },
  16334. {
  16335. "type": "boolean",
  16336. "enum": [false]
  16337. }
  16338. ],
  16339. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  16340. },
  16341. "chunkTimeout": {
  16342. "type": "integer",
  16343. "exclusiveMinimum": 0
  16344. }
  16345. },
  16346. "additionalProperties": {}
  16347. },
  16348. "models": {
  16349. "type": "object",
  16350. "additionalProperties": {
  16351. "type": "object",
  16352. "properties": {
  16353. "id": {
  16354. "type": "string"
  16355. },
  16356. "name": {
  16357. "type": "string"
  16358. },
  16359. "family": {
  16360. "type": "string"
  16361. },
  16362. "release_date": {
  16363. "type": "string"
  16364. },
  16365. "attachment": {
  16366. "type": "boolean"
  16367. },
  16368. "reasoning": {
  16369. "type": "boolean"
  16370. },
  16371. "temperature": {
  16372. "type": "boolean"
  16373. },
  16374. "tool_call": {
  16375. "type": "boolean"
  16376. },
  16377. "interleaved": {
  16378. "anyOf": [
  16379. {
  16380. "type": "boolean",
  16381. "enum": [true]
  16382. },
  16383. {
  16384. "type": "object",
  16385. "properties": {
  16386. "field": {
  16387. "type": "string",
  16388. "enum": ["reasoning_content", "reasoning_details"]
  16389. }
  16390. },
  16391. "required": ["field"],
  16392. "additionalProperties": false
  16393. }
  16394. ]
  16395. },
  16396. "cost": {
  16397. "type": "object",
  16398. "properties": {
  16399. "input": {
  16400. "type": "number"
  16401. },
  16402. "output": {
  16403. "type": "number"
  16404. },
  16405. "cache_read": {
  16406. "type": "number"
  16407. },
  16408. "cache_write": {
  16409. "type": "number"
  16410. },
  16411. "context_over_200k": {
  16412. "type": "object",
  16413. "properties": {
  16414. "input": {
  16415. "type": "number"
  16416. },
  16417. "output": {
  16418. "type": "number"
  16419. },
  16420. "cache_read": {
  16421. "type": "number"
  16422. },
  16423. "cache_write": {
  16424. "type": "number"
  16425. }
  16426. },
  16427. "required": ["input", "output"],
  16428. "additionalProperties": false
  16429. }
  16430. },
  16431. "required": ["input", "output"],
  16432. "additionalProperties": false
  16433. },
  16434. "limit": {
  16435. "type": "object",
  16436. "properties": {
  16437. "context": {
  16438. "type": "number"
  16439. },
  16440. "input": {
  16441. "type": "number"
  16442. },
  16443. "output": {
  16444. "type": "number"
  16445. }
  16446. },
  16447. "required": ["context", "output"],
  16448. "additionalProperties": false
  16449. },
  16450. "modalities": {
  16451. "type": "object",
  16452. "properties": {
  16453. "input": {
  16454. "type": "array",
  16455. "items": {
  16456. "type": "string",
  16457. "enum": ["text", "audio", "image", "video", "pdf"]
  16458. }
  16459. },
  16460. "output": {
  16461. "type": "array",
  16462. "items": {
  16463. "type": "string",
  16464. "enum": ["text", "audio", "image", "video", "pdf"]
  16465. }
  16466. }
  16467. },
  16468. "additionalProperties": false
  16469. },
  16470. "experimental": {
  16471. "type": "boolean"
  16472. },
  16473. "status": {
  16474. "type": "string",
  16475. "enum": ["alpha", "beta", "deprecated", "active"]
  16476. },
  16477. "provider": {
  16478. "type": "object",
  16479. "properties": {
  16480. "npm": {
  16481. "type": "string"
  16482. },
  16483. "api": {
  16484. "type": "string"
  16485. }
  16486. },
  16487. "additionalProperties": false
  16488. },
  16489. "options": {
  16490. "type": "object"
  16491. },
  16492. "headers": {
  16493. "type": "object",
  16494. "additionalProperties": {
  16495. "type": "string"
  16496. }
  16497. },
  16498. "variants": {
  16499. "type": "object",
  16500. "additionalProperties": {
  16501. "type": "object",
  16502. "properties": {
  16503. "disabled": {
  16504. "type": "boolean"
  16505. }
  16506. },
  16507. "additionalProperties": {}
  16508. },
  16509. "description": "Variant-specific configuration"
  16510. }
  16511. },
  16512. "additionalProperties": false
  16513. }
  16514. }
  16515. },
  16516. "additionalProperties": false
  16517. },
  16518. "McpLocalConfig": {
  16519. "type": "object",
  16520. "properties": {
  16521. "type": {
  16522. "type": "string",
  16523. "enum": ["local"],
  16524. "description": "Type of MCP server connection"
  16525. },
  16526. "command": {
  16527. "type": "array",
  16528. "items": {
  16529. "type": "string"
  16530. },
  16531. "description": "Command and arguments to run the MCP server"
  16532. },
  16533. "environment": {
  16534. "type": "object",
  16535. "additionalProperties": {
  16536. "type": "string"
  16537. }
  16538. },
  16539. "enabled": {
  16540. "type": "boolean"
  16541. },
  16542. "timeout": {
  16543. "type": "integer",
  16544. "exclusiveMinimum": 0
  16545. }
  16546. },
  16547. "required": ["type", "command"],
  16548. "additionalProperties": false
  16549. },
  16550. "McpOAuthConfig": {
  16551. "type": "object",
  16552. "properties": {
  16553. "clientId": {
  16554. "type": "string"
  16555. },
  16556. "clientSecret": {
  16557. "type": "string"
  16558. },
  16559. "scope": {
  16560. "type": "string"
  16561. },
  16562. "callbackPort": {
  16563. "type": "integer",
  16564. "minimum": 1,
  16565. "maximum": 65535
  16566. },
  16567. "redirectUri": {
  16568. "type": "string"
  16569. }
  16570. },
  16571. "additionalProperties": false
  16572. },
  16573. "McpRemoteConfig": {
  16574. "type": "object",
  16575. "properties": {
  16576. "type": {
  16577. "type": "string",
  16578. "enum": ["remote"],
  16579. "description": "Type of MCP server connection"
  16580. },
  16581. "url": {
  16582. "type": "string",
  16583. "description": "URL of the remote MCP server"
  16584. },
  16585. "enabled": {
  16586. "type": "boolean"
  16587. },
  16588. "headers": {
  16589. "type": "object",
  16590. "additionalProperties": {
  16591. "type": "string"
  16592. }
  16593. },
  16594. "oauth": {
  16595. "anyOf": [
  16596. {
  16597. "$ref": "#/components/schemas/McpOAuthConfig"
  16598. },
  16599. {
  16600. "type": "boolean",
  16601. "enum": [false]
  16602. }
  16603. ],
  16604. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  16605. },
  16606. "timeout": {
  16607. "type": "integer",
  16608. "exclusiveMinimum": 0
  16609. }
  16610. },
  16611. "required": ["type", "url"],
  16612. "additionalProperties": false
  16613. },
  16614. "LayoutConfig": {
  16615. "type": "string",
  16616. "enum": ["auto", "stretch"],
  16617. "description": "@deprecated Always uses stretch layout."
  16618. },
  16619. "ImageAttachmentConfig": {
  16620. "type": "object",
  16621. "properties": {
  16622. "auto_resize": {
  16623. "type": "boolean"
  16624. },
  16625. "max_width": {
  16626. "type": "integer",
  16627. "exclusiveMinimum": 0
  16628. },
  16629. "max_height": {
  16630. "type": "integer",
  16631. "exclusiveMinimum": 0
  16632. },
  16633. "max_base64_bytes": {
  16634. "type": "integer",
  16635. "exclusiveMinimum": 0
  16636. }
  16637. },
  16638. "additionalProperties": false
  16639. },
  16640. "AttachmentConfig": {
  16641. "type": "object",
  16642. "properties": {
  16643. "image": {
  16644. "$ref": "#/components/schemas/ImageAttachmentConfig"
  16645. }
  16646. },
  16647. "additionalProperties": false
  16648. },
  16649. "Config": {
  16650. "type": "object",
  16651. "properties": {
  16652. "$schema": {
  16653. "type": "string"
  16654. },
  16655. "shell": {
  16656. "type": "string"
  16657. },
  16658. "logLevel": {
  16659. "$ref": "#/components/schemas/LogLevel"
  16660. },
  16661. "server": {
  16662. "$ref": "#/components/schemas/ServerConfig"
  16663. },
  16664. "command": {
  16665. "type": "object",
  16666. "additionalProperties": {
  16667. "type": "object",
  16668. "properties": {
  16669. "template": {
  16670. "type": "string"
  16671. },
  16672. "description": {
  16673. "type": "string"
  16674. },
  16675. "agent": {
  16676. "type": "string"
  16677. },
  16678. "model": {
  16679. "type": "string"
  16680. },
  16681. "subtask": {
  16682. "type": "boolean"
  16683. }
  16684. },
  16685. "required": ["template"],
  16686. "additionalProperties": false
  16687. }
  16688. },
  16689. "skills": {
  16690. "type": "object",
  16691. "properties": {
  16692. "paths": {
  16693. "type": "array",
  16694. "items": {
  16695. "type": "string"
  16696. }
  16697. },
  16698. "urls": {
  16699. "type": "array",
  16700. "items": {
  16701. "type": "string"
  16702. }
  16703. }
  16704. },
  16705. "additionalProperties": false
  16706. },
  16707. "reference": {
  16708. "$ref": "#/components/schemas/ReferenceConfig"
  16709. },
  16710. "watcher": {
  16711. "type": "object",
  16712. "properties": {
  16713. "ignore": {
  16714. "type": "array",
  16715. "items": {
  16716. "type": "string"
  16717. }
  16718. }
  16719. },
  16720. "additionalProperties": false
  16721. },
  16722. "snapshot": {
  16723. "type": "boolean"
  16724. },
  16725. "plugin": {
  16726. "type": "array",
  16727. "items": {
  16728. "anyOf": [
  16729. {
  16730. "type": "string"
  16731. },
  16732. {
  16733. "type": "array",
  16734. "prefixItems": [
  16735. {
  16736. "type": "string"
  16737. },
  16738. {
  16739. "type": "object"
  16740. }
  16741. ],
  16742. "maxItems": 2,
  16743. "minItems": 2
  16744. }
  16745. ]
  16746. }
  16747. },
  16748. "share": {
  16749. "type": "string",
  16750. "enum": ["manual", "auto", "disabled"]
  16751. },
  16752. "autoshare": {
  16753. "type": "boolean"
  16754. },
  16755. "autoupdate": {
  16756. "anyOf": [
  16757. {
  16758. "type": "boolean"
  16759. },
  16760. {
  16761. "type": "string",
  16762. "enum": ["notify"]
  16763. }
  16764. ],
  16765. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  16766. },
  16767. "disabled_providers": {
  16768. "type": "array",
  16769. "items": {
  16770. "type": "string"
  16771. }
  16772. },
  16773. "enabled_providers": {
  16774. "type": "array",
  16775. "items": {
  16776. "type": "string"
  16777. }
  16778. },
  16779. "model": {
  16780. "type": "string"
  16781. },
  16782. "small_model": {
  16783. "type": "string"
  16784. },
  16785. "default_agent": {
  16786. "type": "string"
  16787. },
  16788. "username": {
  16789. "type": "string"
  16790. },
  16791. "mode": {
  16792. "type": "object",
  16793. "properties": {
  16794. "build": {
  16795. "$ref": "#/components/schemas/AgentConfig"
  16796. },
  16797. "plan": {
  16798. "$ref": "#/components/schemas/AgentConfig"
  16799. }
  16800. },
  16801. "additionalProperties": {
  16802. "$ref": "#/components/schemas/AgentConfig"
  16803. }
  16804. },
  16805. "agent": {
  16806. "type": "object",
  16807. "properties": {
  16808. "plan": {
  16809. "$ref": "#/components/schemas/AgentConfig"
  16810. },
  16811. "build": {
  16812. "$ref": "#/components/schemas/AgentConfig"
  16813. },
  16814. "general": {
  16815. "$ref": "#/components/schemas/AgentConfig"
  16816. },
  16817. "explore": {
  16818. "$ref": "#/components/schemas/AgentConfig"
  16819. },
  16820. "title": {
  16821. "$ref": "#/components/schemas/AgentConfig"
  16822. },
  16823. "summary": {
  16824. "$ref": "#/components/schemas/AgentConfig"
  16825. },
  16826. "compaction": {
  16827. "$ref": "#/components/schemas/AgentConfig"
  16828. }
  16829. },
  16830. "additionalProperties": {
  16831. "$ref": "#/components/schemas/AgentConfig"
  16832. }
  16833. },
  16834. "provider": {
  16835. "type": "object",
  16836. "additionalProperties": {
  16837. "$ref": "#/components/schemas/ProviderConfig"
  16838. }
  16839. },
  16840. "mcp": {
  16841. "type": "object",
  16842. "additionalProperties": {
  16843. "anyOf": [
  16844. {
  16845. "$ref": "#/components/schemas/McpLocalConfig"
  16846. },
  16847. {
  16848. "$ref": "#/components/schemas/McpRemoteConfig"
  16849. },
  16850. {
  16851. "type": "object",
  16852. "properties": {
  16853. "enabled": {
  16854. "type": "boolean"
  16855. }
  16856. },
  16857. "required": ["enabled"],
  16858. "additionalProperties": false
  16859. }
  16860. ]
  16861. }
  16862. },
  16863. "formatter": {
  16864. "anyOf": [
  16865. {
  16866. "type": "boolean"
  16867. },
  16868. {
  16869. "type": "object",
  16870. "additionalProperties": {
  16871. "type": "object",
  16872. "properties": {
  16873. "disabled": {
  16874. "type": "boolean"
  16875. },
  16876. "command": {
  16877. "type": "array",
  16878. "items": {
  16879. "type": "string"
  16880. }
  16881. },
  16882. "environment": {
  16883. "type": "object",
  16884. "additionalProperties": {
  16885. "type": "string"
  16886. }
  16887. },
  16888. "extensions": {
  16889. "type": "array",
  16890. "items": {
  16891. "type": "string"
  16892. }
  16893. }
  16894. },
  16895. "additionalProperties": false
  16896. }
  16897. }
  16898. ],
  16899. "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."
  16900. },
  16901. "lsp": {
  16902. "anyOf": [
  16903. {
  16904. "type": "boolean"
  16905. },
  16906. {
  16907. "type": "object",
  16908. "additionalProperties": {
  16909. "anyOf": [
  16910. {
  16911. "type": "object",
  16912. "properties": {
  16913. "disabled": {
  16914. "type": "boolean",
  16915. "enum": [true]
  16916. }
  16917. },
  16918. "required": ["disabled"],
  16919. "additionalProperties": false
  16920. },
  16921. {
  16922. "type": "object",
  16923. "properties": {
  16924. "command": {
  16925. "type": "array",
  16926. "items": {
  16927. "type": "string"
  16928. }
  16929. },
  16930. "extensions": {
  16931. "type": "array",
  16932. "items": {
  16933. "type": "string"
  16934. }
  16935. },
  16936. "disabled": {
  16937. "type": "boolean"
  16938. },
  16939. "env": {
  16940. "type": "object",
  16941. "additionalProperties": {
  16942. "type": "string"
  16943. }
  16944. },
  16945. "initialization": {
  16946. "type": "object"
  16947. }
  16948. },
  16949. "required": ["command"],
  16950. "additionalProperties": false
  16951. }
  16952. ]
  16953. }
  16954. }
  16955. ],
  16956. "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."
  16957. },
  16958. "instructions": {
  16959. "type": "array",
  16960. "items": {
  16961. "type": "string"
  16962. }
  16963. },
  16964. "layout": {
  16965. "$ref": "#/components/schemas/LayoutConfig"
  16966. },
  16967. "permission": {
  16968. "$ref": "#/components/schemas/PermissionConfig"
  16969. },
  16970. "tools": {
  16971. "type": "object",
  16972. "additionalProperties": {
  16973. "type": "boolean"
  16974. }
  16975. },
  16976. "attachment": {
  16977. "$ref": "#/components/schemas/AttachmentConfig"
  16978. },
  16979. "enterprise": {
  16980. "type": "object",
  16981. "properties": {
  16982. "url": {
  16983. "type": "string"
  16984. }
  16985. },
  16986. "additionalProperties": false
  16987. },
  16988. "tool_output": {
  16989. "type": "object",
  16990. "properties": {
  16991. "max_lines": {
  16992. "type": "integer",
  16993. "exclusiveMinimum": 0
  16994. },
  16995. "max_bytes": {
  16996. "type": "integer",
  16997. "exclusiveMinimum": 0
  16998. }
  16999. },
  17000. "additionalProperties": false
  17001. },
  17002. "compaction": {
  17003. "type": "object",
  17004. "properties": {
  17005. "auto": {
  17006. "type": "boolean"
  17007. },
  17008. "prune": {
  17009. "type": "boolean"
  17010. },
  17011. "tail_turns": {
  17012. "type": "integer",
  17013. "minimum": 0
  17014. },
  17015. "preserve_recent_tokens": {
  17016. "type": "integer",
  17017. "minimum": 0
  17018. },
  17019. "reserved": {
  17020. "type": "integer",
  17021. "minimum": 0
  17022. }
  17023. },
  17024. "additionalProperties": false
  17025. },
  17026. "experimental": {
  17027. "type": "object",
  17028. "properties": {
  17029. "disable_paste_summary": {
  17030. "type": "boolean"
  17031. },
  17032. "batch_tool": {
  17033. "type": "boolean"
  17034. },
  17035. "openTelemetry": {
  17036. "type": "boolean"
  17037. },
  17038. "primary_tools": {
  17039. "type": "array",
  17040. "items": {
  17041. "type": "string"
  17042. }
  17043. },
  17044. "continue_loop_on_deny": {
  17045. "type": "boolean"
  17046. },
  17047. "mcp_timeout": {
  17048. "type": "integer",
  17049. "exclusiveMinimum": 0
  17050. },
  17051. "policies": {
  17052. "type": "array",
  17053. "items": {
  17054. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  17055. }
  17056. }
  17057. },
  17058. "additionalProperties": false
  17059. }
  17060. },
  17061. "additionalProperties": false
  17062. },
  17063. "Model": {
  17064. "type": "object",
  17065. "properties": {
  17066. "id": {
  17067. "type": "string"
  17068. },
  17069. "providerID": {
  17070. "type": "string"
  17071. },
  17072. "api": {
  17073. "type": "object",
  17074. "properties": {
  17075. "id": {
  17076. "type": "string"
  17077. },
  17078. "url": {
  17079. "type": "string"
  17080. },
  17081. "npm": {
  17082. "type": "string"
  17083. }
  17084. },
  17085. "required": ["id", "url", "npm"],
  17086. "additionalProperties": false
  17087. },
  17088. "name": {
  17089. "type": "string"
  17090. },
  17091. "family": {
  17092. "type": "string"
  17093. },
  17094. "capabilities": {
  17095. "type": "object",
  17096. "properties": {
  17097. "temperature": {
  17098. "type": "boolean"
  17099. },
  17100. "reasoning": {
  17101. "type": "boolean"
  17102. },
  17103. "attachment": {
  17104. "type": "boolean"
  17105. },
  17106. "toolcall": {
  17107. "type": "boolean"
  17108. },
  17109. "input": {
  17110. "type": "object",
  17111. "properties": {
  17112. "text": {
  17113. "type": "boolean"
  17114. },
  17115. "audio": {
  17116. "type": "boolean"
  17117. },
  17118. "image": {
  17119. "type": "boolean"
  17120. },
  17121. "video": {
  17122. "type": "boolean"
  17123. },
  17124. "pdf": {
  17125. "type": "boolean"
  17126. }
  17127. },
  17128. "required": ["text", "audio", "image", "video", "pdf"],
  17129. "additionalProperties": false
  17130. },
  17131. "output": {
  17132. "type": "object",
  17133. "properties": {
  17134. "text": {
  17135. "type": "boolean"
  17136. },
  17137. "audio": {
  17138. "type": "boolean"
  17139. },
  17140. "image": {
  17141. "type": "boolean"
  17142. },
  17143. "video": {
  17144. "type": "boolean"
  17145. },
  17146. "pdf": {
  17147. "type": "boolean"
  17148. }
  17149. },
  17150. "required": ["text", "audio", "image", "video", "pdf"],
  17151. "additionalProperties": false
  17152. },
  17153. "interleaved": {
  17154. "anyOf": [
  17155. {
  17156. "type": "boolean"
  17157. },
  17158. {
  17159. "type": "object",
  17160. "properties": {
  17161. "field": {
  17162. "type": "string",
  17163. "enum": ["reasoning_content", "reasoning_details"]
  17164. }
  17165. },
  17166. "required": ["field"],
  17167. "additionalProperties": false
  17168. }
  17169. ]
  17170. }
  17171. },
  17172. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  17173. "additionalProperties": false
  17174. },
  17175. "cost": {
  17176. "type": "object",
  17177. "properties": {
  17178. "input": {
  17179. "type": "number"
  17180. },
  17181. "output": {
  17182. "type": "number"
  17183. },
  17184. "cache": {
  17185. "type": "object",
  17186. "properties": {
  17187. "read": {
  17188. "type": "number"
  17189. },
  17190. "write": {
  17191. "type": "number"
  17192. }
  17193. },
  17194. "required": ["read", "write"],
  17195. "additionalProperties": false
  17196. },
  17197. "tiers": {
  17198. "type": "array",
  17199. "items": {
  17200. "type": "object",
  17201. "properties": {
  17202. "input": {
  17203. "type": "number"
  17204. },
  17205. "output": {
  17206. "type": "number"
  17207. },
  17208. "cache": {
  17209. "type": "object",
  17210. "properties": {
  17211. "read": {
  17212. "type": "number"
  17213. },
  17214. "write": {
  17215. "type": "number"
  17216. }
  17217. },
  17218. "required": ["read", "write"],
  17219. "additionalProperties": false
  17220. },
  17221. "tier": {
  17222. "type": "object",
  17223. "properties": {
  17224. "type": {
  17225. "type": "string",
  17226. "enum": ["context"]
  17227. },
  17228. "size": {
  17229. "type": "number"
  17230. }
  17231. },
  17232. "required": ["type", "size"],
  17233. "additionalProperties": false
  17234. }
  17235. },
  17236. "required": ["input", "output", "cache", "tier"],
  17237. "additionalProperties": false
  17238. }
  17239. },
  17240. "experimentalOver200K": {
  17241. "type": "object",
  17242. "properties": {
  17243. "input": {
  17244. "type": "number"
  17245. },
  17246. "output": {
  17247. "type": "number"
  17248. },
  17249. "cache": {
  17250. "type": "object",
  17251. "properties": {
  17252. "read": {
  17253. "type": "number"
  17254. },
  17255. "write": {
  17256. "type": "number"
  17257. }
  17258. },
  17259. "required": ["read", "write"],
  17260. "additionalProperties": false
  17261. }
  17262. },
  17263. "required": ["input", "output", "cache"],
  17264. "additionalProperties": false
  17265. }
  17266. },
  17267. "required": ["input", "output", "cache"],
  17268. "additionalProperties": false
  17269. },
  17270. "limit": {
  17271. "type": "object",
  17272. "properties": {
  17273. "context": {
  17274. "type": "number"
  17275. },
  17276. "input": {
  17277. "type": "number"
  17278. },
  17279. "output": {
  17280. "type": "number"
  17281. }
  17282. },
  17283. "required": ["context", "output"],
  17284. "additionalProperties": false
  17285. },
  17286. "status": {
  17287. "type": "string",
  17288. "enum": ["alpha", "beta", "deprecated", "active"]
  17289. },
  17290. "options": {
  17291. "type": "object"
  17292. },
  17293. "headers": {
  17294. "type": "object",
  17295. "additionalProperties": {
  17296. "type": "string"
  17297. }
  17298. },
  17299. "release_date": {
  17300. "type": "string"
  17301. },
  17302. "variants": {
  17303. "type": "object",
  17304. "additionalProperties": {
  17305. "type": "object"
  17306. }
  17307. }
  17308. },
  17309. "required": [
  17310. "id",
  17311. "providerID",
  17312. "api",
  17313. "name",
  17314. "capabilities",
  17315. "cost",
  17316. "limit",
  17317. "status",
  17318. "options",
  17319. "headers",
  17320. "release_date"
  17321. ],
  17322. "additionalProperties": false
  17323. },
  17324. "Provider": {
  17325. "type": "object",
  17326. "properties": {
  17327. "id": {
  17328. "type": "string"
  17329. },
  17330. "name": {
  17331. "type": "string"
  17332. },
  17333. "source": {
  17334. "type": "string",
  17335. "enum": ["env", "config", "custom", "api"]
  17336. },
  17337. "env": {
  17338. "type": "array",
  17339. "items": {
  17340. "type": "string"
  17341. }
  17342. },
  17343. "key": {
  17344. "type": "string"
  17345. },
  17346. "options": {
  17347. "type": "object"
  17348. },
  17349. "models": {
  17350. "type": "object",
  17351. "additionalProperties": {
  17352. "$ref": "#/components/schemas/Model"
  17353. }
  17354. }
  17355. },
  17356. "required": ["id", "name", "source", "env", "options", "models"],
  17357. "additionalProperties": false
  17358. },
  17359. "ConsoleState": {
  17360. "type": "object",
  17361. "properties": {
  17362. "consoleManagedProviders": {
  17363. "type": "array",
  17364. "items": {
  17365. "type": "string"
  17366. }
  17367. },
  17368. "activeOrgName": {
  17369. "type": "string"
  17370. },
  17371. "switchableOrgCount": {
  17372. "type": "integer",
  17373. "minimum": 0
  17374. }
  17375. },
  17376. "required": ["consoleManagedProviders", "switchableOrgCount"],
  17377. "additionalProperties": false
  17378. },
  17379. "effect_HttpApiError_InternalServerError": {
  17380. "type": "object",
  17381. "properties": {
  17382. "_tag": {
  17383. "type": "string",
  17384. "enum": ["InternalServerError"]
  17385. }
  17386. },
  17387. "required": ["_tag"],
  17388. "additionalProperties": false
  17389. },
  17390. "ToolListItem": {
  17391. "type": "object",
  17392. "properties": {
  17393. "id": {
  17394. "type": "string"
  17395. },
  17396. "description": {
  17397. "type": "string"
  17398. },
  17399. "parameters": {}
  17400. },
  17401. "required": ["id", "description", "parameters"],
  17402. "additionalProperties": false
  17403. },
  17404. "ToolList": {
  17405. "type": "array",
  17406. "items": {
  17407. "$ref": "#/components/schemas/ToolListItem"
  17408. }
  17409. },
  17410. "ToolIDs": {
  17411. "type": "array",
  17412. "items": {
  17413. "type": "string"
  17414. }
  17415. },
  17416. "WorktreeError": {
  17417. "type": "object",
  17418. "properties": {
  17419. "name": {
  17420. "type": "string",
  17421. "enum": [
  17422. "WorktreeNotGitError",
  17423. "WorktreeNameGenerationFailedError",
  17424. "WorktreeCreateFailedError",
  17425. "WorktreeStartCommandFailedError",
  17426. "WorktreeRemoveFailedError",
  17427. "WorktreeResetFailedError",
  17428. "WorktreeListFailedError"
  17429. ]
  17430. },
  17431. "data": {
  17432. "type": "object",
  17433. "properties": {
  17434. "message": {
  17435. "type": "string"
  17436. }
  17437. },
  17438. "required": ["message"],
  17439. "additionalProperties": false
  17440. }
  17441. },
  17442. "required": ["name", "data"],
  17443. "additionalProperties": false
  17444. },
  17445. "WorktreeCreateInput": {
  17446. "type": "object",
  17447. "properties": {
  17448. "name": {
  17449. "type": "string"
  17450. },
  17451. "startCommand": {
  17452. "type": "string",
  17453. "description": "Additional startup script to run after the project's start command"
  17454. }
  17455. },
  17456. "additionalProperties": false
  17457. },
  17458. "Worktree": {
  17459. "type": "object",
  17460. "properties": {
  17461. "name": {
  17462. "type": "string"
  17463. },
  17464. "branch": {
  17465. "type": "string"
  17466. },
  17467. "directory": {
  17468. "type": "string"
  17469. }
  17470. },
  17471. "required": ["name", "directory"],
  17472. "additionalProperties": false
  17473. },
  17474. "WorktreeRemoveInput": {
  17475. "type": "object",
  17476. "properties": {
  17477. "directory": {
  17478. "type": "string"
  17479. }
  17480. },
  17481. "required": ["directory"],
  17482. "additionalProperties": false
  17483. },
  17484. "WorktreeResetInput": {
  17485. "type": "object",
  17486. "properties": {
  17487. "directory": {
  17488. "type": "string"
  17489. }
  17490. },
  17491. "required": ["directory"],
  17492. "additionalProperties": false
  17493. },
  17494. "ProjectSummary": {
  17495. "type": "object",
  17496. "properties": {
  17497. "id": {
  17498. "type": "string"
  17499. },
  17500. "name": {
  17501. "type": "string"
  17502. },
  17503. "worktree": {
  17504. "type": "string"
  17505. }
  17506. },
  17507. "required": ["id", "worktree"],
  17508. "additionalProperties": false
  17509. },
  17510. "GlobalSession": {
  17511. "type": "object",
  17512. "properties": {
  17513. "id": {
  17514. "type": "string",
  17515. "pattern": "^ses"
  17516. },
  17517. "slug": {
  17518. "type": "string"
  17519. },
  17520. "projectID": {
  17521. "type": "string"
  17522. },
  17523. "workspaceID": {
  17524. "type": "string",
  17525. "pattern": "^wrk"
  17526. },
  17527. "directory": {
  17528. "type": "string"
  17529. },
  17530. "path": {
  17531. "type": "string"
  17532. },
  17533. "parentID": {
  17534. "type": "string",
  17535. "pattern": "^ses"
  17536. },
  17537. "summary": {
  17538. "type": "object",
  17539. "properties": {
  17540. "additions": {
  17541. "type": "number"
  17542. },
  17543. "deletions": {
  17544. "type": "number"
  17545. },
  17546. "files": {
  17547. "type": "number"
  17548. },
  17549. "diffs": {
  17550. "type": "array",
  17551. "items": {
  17552. "$ref": "#/components/schemas/SnapshotFileDiff"
  17553. }
  17554. }
  17555. },
  17556. "required": ["additions", "deletions", "files"],
  17557. "additionalProperties": false
  17558. },
  17559. "cost": {
  17560. "type": "number"
  17561. },
  17562. "tokens": {
  17563. "type": "object",
  17564. "properties": {
  17565. "input": {
  17566. "type": "number"
  17567. },
  17568. "output": {
  17569. "type": "number"
  17570. },
  17571. "reasoning": {
  17572. "type": "number"
  17573. },
  17574. "cache": {
  17575. "type": "object",
  17576. "properties": {
  17577. "read": {
  17578. "type": "number"
  17579. },
  17580. "write": {
  17581. "type": "number"
  17582. }
  17583. },
  17584. "required": ["read", "write"],
  17585. "additionalProperties": false
  17586. }
  17587. },
  17588. "required": ["input", "output", "reasoning", "cache"],
  17589. "additionalProperties": false
  17590. },
  17591. "share": {
  17592. "type": "object",
  17593. "properties": {
  17594. "url": {
  17595. "type": "string"
  17596. }
  17597. },
  17598. "required": ["url"],
  17599. "additionalProperties": false
  17600. },
  17601. "title": {
  17602. "type": "string"
  17603. },
  17604. "agent": {
  17605. "type": "string"
  17606. },
  17607. "model": {
  17608. "type": "object",
  17609. "properties": {
  17610. "id": {
  17611. "type": "string"
  17612. },
  17613. "providerID": {
  17614. "type": "string"
  17615. },
  17616. "variant": {
  17617. "type": "string"
  17618. }
  17619. },
  17620. "required": ["id", "providerID"],
  17621. "additionalProperties": false
  17622. },
  17623. "version": {
  17624. "type": "string"
  17625. },
  17626. "metadata": {
  17627. "type": "object"
  17628. },
  17629. "time": {
  17630. "type": "object",
  17631. "properties": {
  17632. "created": {
  17633. "type": "integer",
  17634. "minimum": 0
  17635. },
  17636. "updated": {
  17637. "type": "integer",
  17638. "minimum": 0
  17639. },
  17640. "compacting": {
  17641. "type": "integer",
  17642. "minimum": 0
  17643. },
  17644. "archived": {
  17645. "type": "number"
  17646. }
  17647. },
  17648. "required": ["created", "updated"],
  17649. "additionalProperties": false
  17650. },
  17651. "permission": {
  17652. "$ref": "#/components/schemas/PermissionRuleset"
  17653. },
  17654. "revert": {
  17655. "type": "object",
  17656. "properties": {
  17657. "messageID": {
  17658. "type": "string",
  17659. "pattern": "^msg"
  17660. },
  17661. "partID": {
  17662. "type": "string",
  17663. "pattern": "^prt"
  17664. },
  17665. "snapshot": {
  17666. "type": "string"
  17667. },
  17668. "diff": {
  17669. "type": "string"
  17670. }
  17671. },
  17672. "required": ["messageID"],
  17673. "additionalProperties": false
  17674. },
  17675. "project": {
  17676. "anyOf": [
  17677. {
  17678. "$ref": "#/components/schemas/ProjectSummary"
  17679. },
  17680. {
  17681. "type": "null"
  17682. }
  17683. ]
  17684. }
  17685. },
  17686. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  17687. "additionalProperties": false
  17688. },
  17689. "McpResource": {
  17690. "type": "object",
  17691. "properties": {
  17692. "name": {
  17693. "type": "string"
  17694. },
  17695. "uri": {
  17696. "type": "string"
  17697. },
  17698. "description": {
  17699. "type": "string"
  17700. },
  17701. "mimeType": {
  17702. "type": "string"
  17703. },
  17704. "client": {
  17705. "type": "string"
  17706. }
  17707. },
  17708. "required": ["name", "uri", "client"],
  17709. "additionalProperties": false
  17710. },
  17711. "Symbol": {
  17712. "type": "object",
  17713. "properties": {
  17714. "name": {
  17715. "type": "string"
  17716. },
  17717. "kind": {
  17718. "type": "integer",
  17719. "minimum": 0
  17720. },
  17721. "location": {
  17722. "type": "object",
  17723. "properties": {
  17724. "uri": {
  17725. "type": "string"
  17726. },
  17727. "range": {
  17728. "$ref": "#/components/schemas/Range"
  17729. }
  17730. },
  17731. "required": ["uri", "range"],
  17732. "additionalProperties": false
  17733. }
  17734. },
  17735. "required": ["name", "kind", "location"],
  17736. "additionalProperties": false
  17737. },
  17738. "FileNode": {
  17739. "type": "object",
  17740. "properties": {
  17741. "name": {
  17742. "type": "string"
  17743. },
  17744. "path": {
  17745. "type": "string"
  17746. },
  17747. "absolute": {
  17748. "type": "string"
  17749. },
  17750. "type": {
  17751. "type": "string",
  17752. "enum": ["file", "directory"]
  17753. },
  17754. "ignored": {
  17755. "type": "boolean"
  17756. }
  17757. },
  17758. "required": ["name", "path", "absolute", "type", "ignored"],
  17759. "additionalProperties": false
  17760. },
  17761. "FileContent": {
  17762. "type": "object",
  17763. "properties": {
  17764. "type": {
  17765. "type": "string",
  17766. "enum": ["text", "binary"]
  17767. },
  17768. "content": {
  17769. "type": "string"
  17770. },
  17771. "diff": {
  17772. "type": "string"
  17773. },
  17774. "patch": {
  17775. "type": "object",
  17776. "properties": {
  17777. "oldFileName": {
  17778. "type": "string"
  17779. },
  17780. "newFileName": {
  17781. "type": "string"
  17782. },
  17783. "oldHeader": {
  17784. "type": "string"
  17785. },
  17786. "newHeader": {
  17787. "type": "string"
  17788. },
  17789. "hunks": {
  17790. "type": "array",
  17791. "items": {
  17792. "type": "object",
  17793. "properties": {
  17794. "oldStart": {
  17795. "type": "integer",
  17796. "minimum": 0
  17797. },
  17798. "oldLines": {
  17799. "type": "integer",
  17800. "minimum": 0
  17801. },
  17802. "newStart": {
  17803. "type": "integer",
  17804. "minimum": 0
  17805. },
  17806. "newLines": {
  17807. "type": "integer",
  17808. "minimum": 0
  17809. },
  17810. "lines": {
  17811. "type": "array",
  17812. "items": {
  17813. "type": "string"
  17814. }
  17815. }
  17816. },
  17817. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  17818. "additionalProperties": false
  17819. }
  17820. },
  17821. "index": {
  17822. "type": "string"
  17823. }
  17824. },
  17825. "required": ["oldFileName", "newFileName", "hunks"],
  17826. "additionalProperties": false
  17827. },
  17828. "encoding": {
  17829. "type": "string",
  17830. "enum": ["base64"]
  17831. },
  17832. "mimeType": {
  17833. "type": "string"
  17834. }
  17835. },
  17836. "required": ["type", "content"],
  17837. "additionalProperties": false
  17838. },
  17839. "File": {
  17840. "type": "object",
  17841. "properties": {
  17842. "path": {
  17843. "type": "string"
  17844. },
  17845. "added": {
  17846. "type": "integer",
  17847. "minimum": 0
  17848. },
  17849. "removed": {
  17850. "type": "integer",
  17851. "minimum": 0
  17852. },
  17853. "status": {
  17854. "type": "string",
  17855. "enum": ["added", "deleted", "modified"]
  17856. }
  17857. },
  17858. "required": ["path", "added", "removed", "status"],
  17859. "additionalProperties": false
  17860. },
  17861. "Path": {
  17862. "type": "object",
  17863. "properties": {
  17864. "home": {
  17865. "type": "string"
  17866. },
  17867. "state": {
  17868. "type": "string"
  17869. },
  17870. "config": {
  17871. "type": "string"
  17872. },
  17873. "worktree": {
  17874. "type": "string"
  17875. },
  17876. "directory": {
  17877. "type": "string"
  17878. }
  17879. },
  17880. "required": ["home", "state", "config", "worktree", "directory"],
  17881. "additionalProperties": false
  17882. },
  17883. "VcsInfo": {
  17884. "type": "object",
  17885. "properties": {
  17886. "branch": {
  17887. "type": "string"
  17888. },
  17889. "default_branch": {
  17890. "type": "string"
  17891. }
  17892. },
  17893. "additionalProperties": false
  17894. },
  17895. "VcsFileStatus": {
  17896. "type": "object",
  17897. "properties": {
  17898. "file": {
  17899. "type": "string"
  17900. },
  17901. "additions": {
  17902. "type": "number"
  17903. },
  17904. "deletions": {
  17905. "type": "number"
  17906. },
  17907. "status": {
  17908. "type": "string",
  17909. "enum": ["added", "deleted", "modified"]
  17910. }
  17911. },
  17912. "required": ["file", "additions", "deletions", "status"],
  17913. "additionalProperties": false
  17914. },
  17915. "VcsFileDiff": {
  17916. "type": "object",
  17917. "properties": {
  17918. "file": {
  17919. "type": "string"
  17920. },
  17921. "patch": {
  17922. "type": "string"
  17923. },
  17924. "additions": {
  17925. "type": "number"
  17926. },
  17927. "deletions": {
  17928. "type": "number"
  17929. },
  17930. "status": {
  17931. "type": "string",
  17932. "enum": ["added", "deleted", "modified"]
  17933. }
  17934. },
  17935. "required": ["file", "additions", "deletions"],
  17936. "additionalProperties": false
  17937. },
  17938. "VcsApplyError": {
  17939. "type": "object",
  17940. "properties": {
  17941. "name": {
  17942. "type": "string",
  17943. "enum": ["VcsApplyError"]
  17944. },
  17945. "data": {
  17946. "type": "object",
  17947. "properties": {
  17948. "message": {
  17949. "type": "string"
  17950. },
  17951. "reason": {
  17952. "type": "string",
  17953. "enum": ["non-git", "not-clean"]
  17954. }
  17955. },
  17956. "required": ["message", "reason"],
  17957. "additionalProperties": false
  17958. }
  17959. },
  17960. "required": ["name", "data"],
  17961. "additionalProperties": false
  17962. },
  17963. "Command": {
  17964. "type": "object",
  17965. "properties": {
  17966. "name": {
  17967. "type": "string"
  17968. },
  17969. "description": {
  17970. "type": "string"
  17971. },
  17972. "agent": {
  17973. "type": "string"
  17974. },
  17975. "model": {
  17976. "type": "string"
  17977. },
  17978. "source": {
  17979. "type": "string",
  17980. "enum": ["command", "mcp", "skill"]
  17981. },
  17982. "template": {
  17983. "type": "string"
  17984. },
  17985. "subtask": {
  17986. "type": "boolean"
  17987. },
  17988. "hints": {
  17989. "type": "array",
  17990. "items": {
  17991. "type": "string"
  17992. }
  17993. }
  17994. },
  17995. "required": ["name", "template", "hints"],
  17996. "additionalProperties": false
  17997. },
  17998. "Agent": {
  17999. "type": "object",
  18000. "properties": {
  18001. "name": {
  18002. "type": "string"
  18003. },
  18004. "description": {
  18005. "type": "string"
  18006. },
  18007. "mode": {
  18008. "type": "string",
  18009. "enum": ["subagent", "primary", "all"]
  18010. },
  18011. "native": {
  18012. "type": "boolean"
  18013. },
  18014. "hidden": {
  18015. "type": "boolean"
  18016. },
  18017. "topP": {
  18018. "type": "number"
  18019. },
  18020. "temperature": {
  18021. "type": "number"
  18022. },
  18023. "color": {
  18024. "type": "string"
  18025. },
  18026. "permission": {
  18027. "$ref": "#/components/schemas/PermissionRuleset"
  18028. },
  18029. "model": {
  18030. "type": "object",
  18031. "properties": {
  18032. "modelID": {
  18033. "type": "string"
  18034. },
  18035. "providerID": {
  18036. "type": "string"
  18037. }
  18038. },
  18039. "required": ["modelID", "providerID"],
  18040. "additionalProperties": false
  18041. },
  18042. "variant": {
  18043. "type": "string"
  18044. },
  18045. "prompt": {
  18046. "type": "string"
  18047. },
  18048. "options": {
  18049. "type": "object"
  18050. },
  18051. "steps": {
  18052. "type": "number"
  18053. }
  18054. },
  18055. "required": ["name", "mode", "permission", "options"],
  18056. "additionalProperties": false
  18057. },
  18058. "LSPStatus": {
  18059. "type": "object",
  18060. "properties": {
  18061. "id": {
  18062. "type": "string"
  18063. },
  18064. "name": {
  18065. "type": "string"
  18066. },
  18067. "root": {
  18068. "type": "string"
  18069. },
  18070. "status": {
  18071. "type": "string",
  18072. "enum": ["connected", "error"]
  18073. }
  18074. },
  18075. "required": ["id", "name", "root", "status"],
  18076. "additionalProperties": false
  18077. },
  18078. "FormatterStatus": {
  18079. "type": "object",
  18080. "properties": {
  18081. "name": {
  18082. "type": "string"
  18083. },
  18084. "extensions": {
  18085. "type": "array",
  18086. "items": {
  18087. "type": "string"
  18088. }
  18089. },
  18090. "enabled": {
  18091. "type": "boolean"
  18092. }
  18093. },
  18094. "required": ["name", "extensions", "enabled"],
  18095. "additionalProperties": false
  18096. },
  18097. "MCPStatusConnected": {
  18098. "type": "object",
  18099. "properties": {
  18100. "status": {
  18101. "type": "string",
  18102. "enum": ["connected"]
  18103. }
  18104. },
  18105. "required": ["status"],
  18106. "additionalProperties": false
  18107. },
  18108. "MCPStatusDisabled": {
  18109. "type": "object",
  18110. "properties": {
  18111. "status": {
  18112. "type": "string",
  18113. "enum": ["disabled"]
  18114. }
  18115. },
  18116. "required": ["status"],
  18117. "additionalProperties": false
  18118. },
  18119. "MCPStatusFailed": {
  18120. "type": "object",
  18121. "properties": {
  18122. "status": {
  18123. "type": "string",
  18124. "enum": ["failed"]
  18125. },
  18126. "error": {
  18127. "type": "string"
  18128. }
  18129. },
  18130. "required": ["status", "error"],
  18131. "additionalProperties": false
  18132. },
  18133. "MCPStatusNeedsAuth": {
  18134. "type": "object",
  18135. "properties": {
  18136. "status": {
  18137. "type": "string",
  18138. "enum": ["needs_auth"]
  18139. }
  18140. },
  18141. "required": ["status"],
  18142. "additionalProperties": false
  18143. },
  18144. "MCPStatusNeedsClientRegistration": {
  18145. "type": "object",
  18146. "properties": {
  18147. "status": {
  18148. "type": "string",
  18149. "enum": ["needs_client_registration"]
  18150. },
  18151. "error": {
  18152. "type": "string"
  18153. }
  18154. },
  18155. "required": ["status", "error"],
  18156. "additionalProperties": false
  18157. },
  18158. "MCPStatus": {
  18159. "anyOf": [
  18160. {
  18161. "$ref": "#/components/schemas/MCPStatusConnected"
  18162. },
  18163. {
  18164. "$ref": "#/components/schemas/MCPStatusDisabled"
  18165. },
  18166. {
  18167. "$ref": "#/components/schemas/MCPStatusFailed"
  18168. },
  18169. {
  18170. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  18171. },
  18172. {
  18173. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  18174. }
  18175. ]
  18176. },
  18177. "McpUnsupportedOAuthError": {
  18178. "type": "object",
  18179. "properties": {
  18180. "error": {
  18181. "type": "string"
  18182. }
  18183. },
  18184. "required": ["error"],
  18185. "additionalProperties": false
  18186. },
  18187. "McpServerNotFoundError": {
  18188. "type": "object",
  18189. "properties": {
  18190. "_tag": {
  18191. "type": "string",
  18192. "enum": ["McpServerNotFoundError"]
  18193. },
  18194. "name": {
  18195. "type": "string"
  18196. },
  18197. "message": {
  18198. "type": "string"
  18199. }
  18200. },
  18201. "required": ["_tag", "name", "message"],
  18202. "additionalProperties": false
  18203. },
  18204. "Project": {
  18205. "type": "object",
  18206. "properties": {
  18207. "id": {
  18208. "type": "string"
  18209. },
  18210. "worktree": {
  18211. "type": "string"
  18212. },
  18213. "vcs": {
  18214. "type": "string",
  18215. "enum": ["git"]
  18216. },
  18217. "name": {
  18218. "type": "string"
  18219. },
  18220. "icon": {
  18221. "type": "object",
  18222. "properties": {
  18223. "url": {
  18224. "type": "string"
  18225. },
  18226. "override": {
  18227. "type": "string"
  18228. },
  18229. "color": {
  18230. "type": "string"
  18231. }
  18232. },
  18233. "additionalProperties": false
  18234. },
  18235. "commands": {
  18236. "type": "object",
  18237. "properties": {
  18238. "start": {
  18239. "type": "string",
  18240. "description": "Startup script to run when creating a new workspace (worktree)"
  18241. }
  18242. },
  18243. "additionalProperties": false
  18244. },
  18245. "time": {
  18246. "type": "object",
  18247. "properties": {
  18248. "created": {
  18249. "type": "integer",
  18250. "minimum": 0
  18251. },
  18252. "updated": {
  18253. "type": "integer",
  18254. "minimum": 0
  18255. },
  18256. "initialized": {
  18257. "type": "integer",
  18258. "minimum": 0
  18259. }
  18260. },
  18261. "required": ["created", "updated"],
  18262. "additionalProperties": false
  18263. },
  18264. "sandboxes": {
  18265. "type": "array",
  18266. "items": {
  18267. "type": "string"
  18268. }
  18269. }
  18270. },
  18271. "required": ["id", "worktree", "time", "sandboxes"],
  18272. "additionalProperties": false
  18273. },
  18274. "ProjectNotFoundError": {
  18275. "type": "object",
  18276. "properties": {
  18277. "_tag": {
  18278. "type": "string",
  18279. "enum": ["ProjectNotFoundError"]
  18280. },
  18281. "projectID": {
  18282. "type": "string"
  18283. },
  18284. "message": {
  18285. "type": "string"
  18286. }
  18287. },
  18288. "required": ["_tag", "projectID", "message"],
  18289. "additionalProperties": false
  18290. },
  18291. "PtyNotFoundError": {
  18292. "type": "object",
  18293. "properties": {
  18294. "_tag": {
  18295. "type": "string",
  18296. "enum": ["PtyNotFoundError"]
  18297. },
  18298. "ptyID": {
  18299. "type": "string"
  18300. },
  18301. "message": {
  18302. "type": "string"
  18303. }
  18304. },
  18305. "required": ["_tag", "ptyID", "message"],
  18306. "additionalProperties": false
  18307. },
  18308. "PtyForbiddenError": {
  18309. "type": "object",
  18310. "properties": {
  18311. "_tag": {
  18312. "type": "string",
  18313. "enum": ["PtyForbiddenError"]
  18314. },
  18315. "message": {
  18316. "type": "string"
  18317. }
  18318. },
  18319. "required": ["_tag", "message"],
  18320. "additionalProperties": false
  18321. },
  18322. "QuestionRequest": {
  18323. "type": "object",
  18324. "properties": {
  18325. "id": {
  18326. "type": "string",
  18327. "pattern": "^que"
  18328. },
  18329. "sessionID": {
  18330. "type": "string",
  18331. "pattern": "^ses"
  18332. },
  18333. "questions": {
  18334. "type": "array",
  18335. "items": {
  18336. "$ref": "#/components/schemas/QuestionInfo"
  18337. },
  18338. "description": "Questions to ask"
  18339. },
  18340. "tool": {
  18341. "$ref": "#/components/schemas/QuestionTool"
  18342. }
  18343. },
  18344. "required": ["id", "sessionID", "questions"],
  18345. "additionalProperties": false
  18346. },
  18347. "QuestionNotFoundError": {
  18348. "type": "object",
  18349. "properties": {
  18350. "_tag": {
  18351. "type": "string",
  18352. "enum": ["QuestionNotFoundError"]
  18353. },
  18354. "requestID": {
  18355. "type": "string"
  18356. },
  18357. "message": {
  18358. "type": "string"
  18359. }
  18360. },
  18361. "required": ["_tag", "requestID", "message"],
  18362. "additionalProperties": false
  18363. },
  18364. "PermissionRequest": {
  18365. "type": "object",
  18366. "properties": {
  18367. "id": {
  18368. "type": "string",
  18369. "pattern": "^per"
  18370. },
  18371. "sessionID": {
  18372. "type": "string",
  18373. "pattern": "^ses"
  18374. },
  18375. "permission": {
  18376. "type": "string"
  18377. },
  18378. "patterns": {
  18379. "type": "array",
  18380. "items": {
  18381. "type": "string"
  18382. }
  18383. },
  18384. "metadata": {
  18385. "type": "object"
  18386. },
  18387. "always": {
  18388. "type": "array",
  18389. "items": {
  18390. "type": "string"
  18391. }
  18392. },
  18393. "tool": {
  18394. "type": "object",
  18395. "properties": {
  18396. "messageID": {
  18397. "type": "string"
  18398. },
  18399. "callID": {
  18400. "type": "string"
  18401. }
  18402. },
  18403. "required": ["messageID", "callID"],
  18404. "additionalProperties": false
  18405. }
  18406. },
  18407. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  18408. "additionalProperties": false
  18409. },
  18410. "PermissionNotFoundError": {
  18411. "type": "object",
  18412. "properties": {
  18413. "_tag": {
  18414. "type": "string",
  18415. "enum": ["PermissionNotFoundError"]
  18416. },
  18417. "requestID": {
  18418. "type": "string"
  18419. },
  18420. "message": {
  18421. "type": "string"
  18422. }
  18423. },
  18424. "required": ["_tag", "requestID", "message"],
  18425. "additionalProperties": false
  18426. },
  18427. "ProviderAuthMethod": {
  18428. "type": "object",
  18429. "properties": {
  18430. "type": {
  18431. "type": "string",
  18432. "enum": ["oauth", "api"]
  18433. },
  18434. "label": {
  18435. "type": "string"
  18436. },
  18437. "prompts": {
  18438. "type": "array",
  18439. "items": {
  18440. "anyOf": [
  18441. {
  18442. "type": "object",
  18443. "properties": {
  18444. "type": {
  18445. "type": "string",
  18446. "enum": ["text"]
  18447. },
  18448. "key": {
  18449. "type": "string"
  18450. },
  18451. "message": {
  18452. "type": "string"
  18453. },
  18454. "placeholder": {
  18455. "type": "string"
  18456. },
  18457. "when": {
  18458. "type": "object",
  18459. "properties": {
  18460. "key": {
  18461. "type": "string"
  18462. },
  18463. "op": {
  18464. "type": "string",
  18465. "enum": ["eq", "neq"]
  18466. },
  18467. "value": {
  18468. "type": "string"
  18469. }
  18470. },
  18471. "required": ["key", "op", "value"],
  18472. "additionalProperties": false
  18473. }
  18474. },
  18475. "required": ["type", "key", "message"],
  18476. "additionalProperties": false
  18477. },
  18478. {
  18479. "type": "object",
  18480. "properties": {
  18481. "type": {
  18482. "type": "string",
  18483. "enum": ["select"]
  18484. },
  18485. "key": {
  18486. "type": "string"
  18487. },
  18488. "message": {
  18489. "type": "string"
  18490. },
  18491. "options": {
  18492. "type": "array",
  18493. "items": {
  18494. "type": "object",
  18495. "properties": {
  18496. "label": {
  18497. "type": "string"
  18498. },
  18499. "value": {
  18500. "type": "string"
  18501. },
  18502. "hint": {
  18503. "type": "string"
  18504. }
  18505. },
  18506. "required": ["label", "value"],
  18507. "additionalProperties": false
  18508. }
  18509. },
  18510. "when": {
  18511. "type": "object",
  18512. "properties": {
  18513. "key": {
  18514. "type": "string"
  18515. },
  18516. "op": {
  18517. "type": "string",
  18518. "enum": ["eq", "neq"]
  18519. },
  18520. "value": {
  18521. "type": "string"
  18522. }
  18523. },
  18524. "required": ["key", "op", "value"],
  18525. "additionalProperties": false
  18526. }
  18527. },
  18528. "required": ["type", "key", "message", "options"],
  18529. "additionalProperties": false
  18530. }
  18531. ]
  18532. }
  18533. }
  18534. },
  18535. "required": ["type", "label"],
  18536. "additionalProperties": false
  18537. },
  18538. "ProviderAuthAuthorization": {
  18539. "type": "object",
  18540. "properties": {
  18541. "url": {
  18542. "type": "string"
  18543. },
  18544. "method": {
  18545. "type": "string",
  18546. "enum": ["auto", "code"]
  18547. },
  18548. "instructions": {
  18549. "type": "string"
  18550. }
  18551. },
  18552. "required": ["url", "method", "instructions"],
  18553. "additionalProperties": false
  18554. },
  18555. "ProviderAuthError1": {
  18556. "type": "object",
  18557. "properties": {
  18558. "name": {
  18559. "type": "string",
  18560. "enum": [
  18561. "BadRequest",
  18562. "ProviderAuthOauthMissing",
  18563. "ProviderAuthOauthCodeMissing",
  18564. "ProviderAuthOauthCallbackFailed",
  18565. "ProviderAuthValidationFailed"
  18566. ]
  18567. },
  18568. "data": {
  18569. "type": "object",
  18570. "properties": {
  18571. "providerID": {
  18572. "type": "string"
  18573. },
  18574. "field": {
  18575. "type": "string"
  18576. },
  18577. "message": {
  18578. "type": "string"
  18579. },
  18580. "kind": {
  18581. "type": "string"
  18582. }
  18583. },
  18584. "additionalProperties": false
  18585. }
  18586. },
  18587. "required": ["name", "data"],
  18588. "additionalProperties": false
  18589. },
  18590. "NotFoundError": {
  18591. "type": "object",
  18592. "required": ["name", "data"],
  18593. "properties": {
  18594. "name": {
  18595. "type": "string",
  18596. "enum": ["NotFoundError"]
  18597. },
  18598. "data": {
  18599. "type": "object",
  18600. "required": ["message"],
  18601. "properties": {
  18602. "message": {
  18603. "type": "string"
  18604. }
  18605. }
  18606. }
  18607. }
  18608. },
  18609. "TextPartInput": {
  18610. "type": "object",
  18611. "properties": {
  18612. "id": {
  18613. "type": "string",
  18614. "pattern": "^prt"
  18615. },
  18616. "type": {
  18617. "type": "string",
  18618. "enum": ["text"]
  18619. },
  18620. "text": {
  18621. "type": "string"
  18622. },
  18623. "synthetic": {
  18624. "type": "boolean"
  18625. },
  18626. "ignored": {
  18627. "type": "boolean"
  18628. },
  18629. "time": {
  18630. "type": "object",
  18631. "properties": {
  18632. "start": {
  18633. "type": "integer",
  18634. "minimum": 0
  18635. },
  18636. "end": {
  18637. "type": "integer",
  18638. "minimum": 0
  18639. }
  18640. },
  18641. "required": ["start"],
  18642. "additionalProperties": false
  18643. },
  18644. "metadata": {
  18645. "type": "object"
  18646. }
  18647. },
  18648. "required": ["type", "text"],
  18649. "additionalProperties": false
  18650. },
  18651. "FilePartInput": {
  18652. "type": "object",
  18653. "properties": {
  18654. "id": {
  18655. "type": "string",
  18656. "pattern": "^prt"
  18657. },
  18658. "type": {
  18659. "type": "string",
  18660. "enum": ["file"]
  18661. },
  18662. "mime": {
  18663. "type": "string"
  18664. },
  18665. "filename": {
  18666. "type": "string"
  18667. },
  18668. "url": {
  18669. "type": "string"
  18670. },
  18671. "source": {
  18672. "$ref": "#/components/schemas/FilePartSource"
  18673. }
  18674. },
  18675. "required": ["type", "mime", "url"],
  18676. "additionalProperties": false
  18677. },
  18678. "AgentPartInput": {
  18679. "type": "object",
  18680. "properties": {
  18681. "id": {
  18682. "type": "string",
  18683. "pattern": "^prt"
  18684. },
  18685. "type": {
  18686. "type": "string",
  18687. "enum": ["agent"]
  18688. },
  18689. "name": {
  18690. "type": "string"
  18691. },
  18692. "source": {
  18693. "type": "object",
  18694. "properties": {
  18695. "value": {
  18696. "type": "string"
  18697. },
  18698. "start": {
  18699. "type": "integer",
  18700. "minimum": 0
  18701. },
  18702. "end": {
  18703. "type": "integer",
  18704. "minimum": 0
  18705. }
  18706. },
  18707. "required": ["value", "start", "end"],
  18708. "additionalProperties": false
  18709. }
  18710. },
  18711. "required": ["type", "name"],
  18712. "additionalProperties": false
  18713. },
  18714. "SubtaskPartInput": {
  18715. "type": "object",
  18716. "properties": {
  18717. "id": {
  18718. "type": "string",
  18719. "pattern": "^prt"
  18720. },
  18721. "type": {
  18722. "type": "string",
  18723. "enum": ["subtask"]
  18724. },
  18725. "prompt": {
  18726. "type": "string"
  18727. },
  18728. "description": {
  18729. "type": "string"
  18730. },
  18731. "agent": {
  18732. "type": "string"
  18733. },
  18734. "model": {
  18735. "type": "object",
  18736. "properties": {
  18737. "providerID": {
  18738. "type": "string"
  18739. },
  18740. "modelID": {
  18741. "type": "string"
  18742. }
  18743. },
  18744. "required": ["providerID", "modelID"],
  18745. "additionalProperties": false
  18746. },
  18747. "command": {
  18748. "type": "string"
  18749. }
  18750. },
  18751. "required": ["type", "prompt", "description", "agent"],
  18752. "additionalProperties": false
  18753. },
  18754. "SessionBusyError": {
  18755. "type": "object",
  18756. "properties": {
  18757. "_tag": {
  18758. "type": "string",
  18759. "enum": ["SessionBusyError"]
  18760. },
  18761. "sessionID": {
  18762. "type": "string"
  18763. },
  18764. "message": {
  18765. "type": "string"
  18766. }
  18767. },
  18768. "required": ["_tag", "sessionID", "message"],
  18769. "additionalProperties": false
  18770. },
  18771. "V2SessionsResponse": {
  18772. "type": "object",
  18773. "properties": {
  18774. "items": {
  18775. "type": "array",
  18776. "items": {
  18777. "$ref": "#/components/schemas/SessionV2Info"
  18778. }
  18779. },
  18780. "cursor": {
  18781. "type": "object",
  18782. "properties": {
  18783. "previous": {
  18784. "type": "string"
  18785. },
  18786. "next": {
  18787. "type": "string"
  18788. }
  18789. },
  18790. "additionalProperties": false
  18791. }
  18792. },
  18793. "required": ["items", "cursor"],
  18794. "additionalProperties": false
  18795. },
  18796. "InvalidCursorError": {
  18797. "type": "object",
  18798. "properties": {
  18799. "_tag": {
  18800. "type": "string",
  18801. "enum": ["InvalidCursorError"]
  18802. },
  18803. "message": {
  18804. "type": "string"
  18805. }
  18806. },
  18807. "required": ["_tag", "message"],
  18808. "additionalProperties": false
  18809. },
  18810. "UnauthorizedError": {
  18811. "type": "object",
  18812. "properties": {
  18813. "_tag": {
  18814. "type": "string",
  18815. "enum": ["UnauthorizedError"]
  18816. },
  18817. "message": {
  18818. "type": "string"
  18819. }
  18820. },
  18821. "required": ["_tag", "message"],
  18822. "additionalProperties": false
  18823. },
  18824. "SessionNotFoundError": {
  18825. "type": "object",
  18826. "properties": {
  18827. "_tag": {
  18828. "type": "string",
  18829. "enum": ["SessionNotFoundError"]
  18830. },
  18831. "sessionID": {
  18832. "type": "string"
  18833. },
  18834. "message": {
  18835. "type": "string"
  18836. }
  18837. },
  18838. "required": ["_tag", "sessionID", "message"],
  18839. "additionalProperties": false
  18840. },
  18841. "ServiceUnavailableError": {
  18842. "type": "object",
  18843. "properties": {
  18844. "_tag": {
  18845. "type": "string",
  18846. "enum": ["ServiceUnavailableError"]
  18847. },
  18848. "message": {
  18849. "type": "string"
  18850. },
  18851. "service": {
  18852. "type": "string"
  18853. }
  18854. },
  18855. "required": ["_tag", "message"],
  18856. "additionalProperties": false
  18857. },
  18858. "UnknownError1": {
  18859. "type": "object",
  18860. "properties": {
  18861. "_tag": {
  18862. "type": "string",
  18863. "enum": ["UnknownError"]
  18864. },
  18865. "message": {
  18866. "type": "string"
  18867. },
  18868. "ref": {
  18869. "type": "string"
  18870. }
  18871. },
  18872. "required": ["_tag", "message"],
  18873. "additionalProperties": false
  18874. },
  18875. "V2SessionMessagesResponse": {
  18876. "type": "object",
  18877. "properties": {
  18878. "items": {
  18879. "type": "array",
  18880. "items": {
  18881. "$ref": "#/components/schemas/SessionMessage"
  18882. }
  18883. },
  18884. "cursor": {
  18885. "type": "object",
  18886. "properties": {
  18887. "previous": {
  18888. "type": "string"
  18889. },
  18890. "next": {
  18891. "type": "string"
  18892. }
  18893. },
  18894. "additionalProperties": false
  18895. }
  18896. },
  18897. "required": ["items", "cursor"],
  18898. "additionalProperties": false
  18899. },
  18900. "ProviderNotFoundError": {
  18901. "type": "object",
  18902. "properties": {
  18903. "_tag": {
  18904. "type": "string",
  18905. "enum": ["ProviderNotFoundError"]
  18906. },
  18907. "providerID": {
  18908. "type": "string"
  18909. },
  18910. "message": {
  18911. "type": "string"
  18912. }
  18913. },
  18914. "required": ["_tag", "providerID", "message"],
  18915. "additionalProperties": false
  18916. },
  18917. "EventTuiPromptAppend": {
  18918. "type": "object",
  18919. "properties": {
  18920. "type": {
  18921. "type": "string",
  18922. "enum": ["tui.prompt.append"]
  18923. },
  18924. "properties": {
  18925. "type": "object",
  18926. "properties": {
  18927. "text": {
  18928. "type": "string"
  18929. }
  18930. },
  18931. "required": ["text"],
  18932. "additionalProperties": false
  18933. }
  18934. },
  18935. "required": ["type", "properties"],
  18936. "additionalProperties": false
  18937. },
  18938. "EventTuiCommandExecute": {
  18939. "type": "object",
  18940. "properties": {
  18941. "type": {
  18942. "type": "string",
  18943. "enum": ["tui.command.execute"]
  18944. },
  18945. "properties": {
  18946. "type": "object",
  18947. "properties": {
  18948. "command": {
  18949. "anyOf": [
  18950. {
  18951. "type": "string",
  18952. "enum": [
  18953. "session.list",
  18954. "session.new",
  18955. "session.share",
  18956. "session.interrupt",
  18957. "session.compact",
  18958. "session.page.up",
  18959. "session.page.down",
  18960. "session.line.up",
  18961. "session.line.down",
  18962. "session.half.page.up",
  18963. "session.half.page.down",
  18964. "session.first",
  18965. "session.last",
  18966. "prompt.clear",
  18967. "prompt.submit",
  18968. "agent.cycle"
  18969. ]
  18970. },
  18971. {
  18972. "type": "string"
  18973. }
  18974. ]
  18975. }
  18976. },
  18977. "required": ["command"],
  18978. "additionalProperties": false
  18979. }
  18980. },
  18981. "required": ["type", "properties"],
  18982. "additionalProperties": false
  18983. },
  18984. "EventTuiToastShow": {
  18985. "type": "object",
  18986. "properties": {
  18987. "type": {
  18988. "type": "string",
  18989. "enum": ["tui.toast.show"]
  18990. },
  18991. "properties": {
  18992. "type": "object",
  18993. "properties": {
  18994. "title": {
  18995. "type": "string"
  18996. },
  18997. "message": {
  18998. "type": "string"
  18999. },
  19000. "variant": {
  19001. "type": "string",
  19002. "enum": ["info", "success", "warning", "error"]
  19003. },
  19004. "duration": {
  19005. "type": "integer",
  19006. "exclusiveMinimum": 0
  19007. }
  19008. },
  19009. "required": ["message", "variant"],
  19010. "additionalProperties": false
  19011. }
  19012. },
  19013. "required": ["type", "properties"],
  19014. "additionalProperties": false
  19015. },
  19016. "EventTuiSessionSelect": {
  19017. "type": "object",
  19018. "properties": {
  19019. "type": {
  19020. "type": "string",
  19021. "enum": ["tui.session.select"]
  19022. },
  19023. "properties": {
  19024. "type": "object",
  19025. "properties": {
  19026. "sessionID": {
  19027. "type": "string",
  19028. "pattern": "^ses",
  19029. "description": "Session ID to navigate to"
  19030. }
  19031. },
  19032. "required": ["sessionID"],
  19033. "additionalProperties": false
  19034. }
  19035. },
  19036. "required": ["type", "properties"],
  19037. "additionalProperties": false
  19038. },
  19039. "Workspace": {
  19040. "type": "object",
  19041. "properties": {
  19042. "id": {
  19043. "type": "string",
  19044. "pattern": "^wrk"
  19045. },
  19046. "type": {
  19047. "type": "string"
  19048. },
  19049. "name": {
  19050. "type": "string"
  19051. },
  19052. "branch": {
  19053. "anyOf": [
  19054. {
  19055. "type": "string"
  19056. },
  19057. {
  19058. "type": "null"
  19059. }
  19060. ]
  19061. },
  19062. "directory": {
  19063. "anyOf": [
  19064. {
  19065. "type": "string"
  19066. },
  19067. {
  19068. "type": "null"
  19069. }
  19070. ]
  19071. },
  19072. "extra": {
  19073. "anyOf": [
  19074. {},
  19075. {
  19076. "type": "null"
  19077. }
  19078. ]
  19079. },
  19080. "projectID": {
  19081. "type": "string"
  19082. },
  19083. "timeUsed": {
  19084. "anyOf": [
  19085. {
  19086. "type": "number"
  19087. },
  19088. {
  19089. "type": "string",
  19090. "enum": ["NaN"]
  19091. },
  19092. {
  19093. "type": "string",
  19094. "enum": ["Infinity"]
  19095. },
  19096. {
  19097. "type": "string",
  19098. "enum": ["-Infinity"]
  19099. },
  19100. {
  19101. "type": "string",
  19102. "enum": ["Infinity", "-Infinity", "NaN"]
  19103. }
  19104. ]
  19105. }
  19106. },
  19107. "required": ["id", "type", "name", "projectID", "timeUsed"],
  19108. "additionalProperties": false
  19109. },
  19110. "WorkspaceCreateError": {
  19111. "type": "object",
  19112. "properties": {
  19113. "name": {
  19114. "type": "string",
  19115. "enum": ["WorkspaceCreateError"]
  19116. },
  19117. "data": {
  19118. "type": "object",
  19119. "properties": {
  19120. "message": {
  19121. "type": "string"
  19122. }
  19123. },
  19124. "required": ["message"],
  19125. "additionalProperties": false
  19126. }
  19127. },
  19128. "required": ["name", "data"],
  19129. "additionalProperties": false
  19130. },
  19131. "WorkspaceWarpError": {
  19132. "type": "object",
  19133. "properties": {
  19134. "name": {
  19135. "type": "string",
  19136. "enum": ["WorkspaceWarpError"]
  19137. },
  19138. "data": {
  19139. "type": "object",
  19140. "properties": {
  19141. "message": {
  19142. "type": "string"
  19143. }
  19144. },
  19145. "required": ["message"],
  19146. "additionalProperties": false
  19147. }
  19148. },
  19149. "required": ["name", "data"],
  19150. "additionalProperties": false
  19151. },
  19152. "effect_HttpApiError_Forbidden": {
  19153. "type": "object",
  19154. "properties": {
  19155. "_tag": {
  19156. "type": "string",
  19157. "enum": ["Forbidden"]
  19158. }
  19159. },
  19160. "required": ["_tag"],
  19161. "additionalProperties": false
  19162. },
  19163. "Event.tui.prompt.append": {
  19164. "type": "object",
  19165. "properties": {
  19166. "id": {
  19167. "type": "string"
  19168. },
  19169. "type": {
  19170. "type": "string",
  19171. "enum": ["tui.prompt.append"]
  19172. },
  19173. "properties": {
  19174. "type": "object",
  19175. "properties": {
  19176. "text": {
  19177. "type": "string"
  19178. }
  19179. },
  19180. "required": ["text"],
  19181. "additionalProperties": false
  19182. }
  19183. },
  19184. "required": ["id", "type", "properties"],
  19185. "additionalProperties": false
  19186. },
  19187. "Event.tui.command.execute": {
  19188. "type": "object",
  19189. "properties": {
  19190. "id": {
  19191. "type": "string"
  19192. },
  19193. "type": {
  19194. "type": "string",
  19195. "enum": ["tui.command.execute"]
  19196. },
  19197. "properties": {
  19198. "type": "object",
  19199. "properties": {
  19200. "command": {
  19201. "anyOf": [
  19202. {
  19203. "type": "string",
  19204. "enum": [
  19205. "session.list",
  19206. "session.new",
  19207. "session.share",
  19208. "session.interrupt",
  19209. "session.compact",
  19210. "session.page.up",
  19211. "session.page.down",
  19212. "session.line.up",
  19213. "session.line.down",
  19214. "session.half.page.up",
  19215. "session.half.page.down",
  19216. "session.first",
  19217. "session.last",
  19218. "prompt.clear",
  19219. "prompt.submit",
  19220. "agent.cycle"
  19221. ]
  19222. },
  19223. {
  19224. "type": "string"
  19225. }
  19226. ]
  19227. }
  19228. },
  19229. "required": ["command"],
  19230. "additionalProperties": false
  19231. }
  19232. },
  19233. "required": ["id", "type", "properties"],
  19234. "additionalProperties": false
  19235. },
  19236. "Event.tui.toast.show": {
  19237. "type": "object",
  19238. "properties": {
  19239. "id": {
  19240. "type": "string"
  19241. },
  19242. "type": {
  19243. "type": "string",
  19244. "enum": ["tui.toast.show"]
  19245. },
  19246. "properties": {
  19247. "type": "object",
  19248. "properties": {
  19249. "title": {
  19250. "type": "string"
  19251. },
  19252. "message": {
  19253. "type": "string"
  19254. },
  19255. "variant": {
  19256. "type": "string",
  19257. "enum": ["info", "success", "warning", "error"]
  19258. },
  19259. "duration": {
  19260. "type": "integer",
  19261. "exclusiveMinimum": 0
  19262. }
  19263. },
  19264. "required": ["message", "variant"],
  19265. "additionalProperties": false
  19266. }
  19267. },
  19268. "required": ["id", "type", "properties"],
  19269. "additionalProperties": false
  19270. },
  19271. "Event.tui.session.select": {
  19272. "type": "object",
  19273. "properties": {
  19274. "id": {
  19275. "type": "string"
  19276. },
  19277. "type": {
  19278. "type": "string",
  19279. "enum": ["tui.session.select"]
  19280. },
  19281. "properties": {
  19282. "type": "object",
  19283. "properties": {
  19284. "sessionID": {
  19285. "type": "string",
  19286. "pattern": "^ses",
  19287. "description": "Session ID to navigate to"
  19288. }
  19289. },
  19290. "required": ["sessionID"],
  19291. "additionalProperties": false
  19292. }
  19293. },
  19294. "required": ["id", "type", "properties"],
  19295. "additionalProperties": false
  19296. },
  19297. "ModelV2Info": {
  19298. "type": "object",
  19299. "properties": {
  19300. "id": {
  19301. "type": "string"
  19302. },
  19303. "providerID": {
  19304. "type": "string"
  19305. },
  19306. "family": {
  19307. "type": "string"
  19308. },
  19309. "name": {
  19310. "type": "string"
  19311. },
  19312. "api": {
  19313. "anyOf": [
  19314. {
  19315. "type": "object",
  19316. "properties": {
  19317. "id": {
  19318. "type": "string"
  19319. },
  19320. "type": {
  19321. "type": "string",
  19322. "enum": ["aisdk"]
  19323. },
  19324. "package": {
  19325. "type": "string"
  19326. },
  19327. "url": {
  19328. "type": "string"
  19329. },
  19330. "settings": {
  19331. "type": "object"
  19332. }
  19333. },
  19334. "required": ["id", "type", "package"],
  19335. "additionalProperties": false
  19336. },
  19337. {
  19338. "type": "object",
  19339. "properties": {
  19340. "id": {
  19341. "type": "string"
  19342. },
  19343. "type": {
  19344. "type": "string",
  19345. "enum": ["native"]
  19346. },
  19347. "url": {
  19348. "type": "string"
  19349. },
  19350. "settings": {
  19351. "type": "object"
  19352. }
  19353. },
  19354. "required": ["id", "type", "settings"],
  19355. "additionalProperties": false
  19356. }
  19357. ]
  19358. },
  19359. "capabilities": {
  19360. "type": "object",
  19361. "properties": {
  19362. "tools": {
  19363. "type": "boolean"
  19364. },
  19365. "input": {
  19366. "type": "array",
  19367. "items": {
  19368. "type": "string"
  19369. }
  19370. },
  19371. "output": {
  19372. "type": "array",
  19373. "items": {
  19374. "type": "string"
  19375. }
  19376. }
  19377. },
  19378. "required": ["tools", "input", "output"],
  19379. "additionalProperties": false
  19380. },
  19381. "request": {
  19382. "type": "object",
  19383. "properties": {
  19384. "headers": {
  19385. "type": "object",
  19386. "additionalProperties": {
  19387. "type": "string"
  19388. }
  19389. },
  19390. "body": {
  19391. "type": "object"
  19392. },
  19393. "variant": {
  19394. "type": "string"
  19395. }
  19396. },
  19397. "required": ["headers", "body"],
  19398. "additionalProperties": false
  19399. },
  19400. "variants": {
  19401. "type": "array",
  19402. "items": {
  19403. "type": "object",
  19404. "properties": {
  19405. "id": {
  19406. "type": "string"
  19407. },
  19408. "headers": {
  19409. "type": "object",
  19410. "additionalProperties": {
  19411. "type": "string"
  19412. }
  19413. },
  19414. "body": {
  19415. "type": "object"
  19416. }
  19417. },
  19418. "required": ["id", "headers", "body"],
  19419. "additionalProperties": false
  19420. }
  19421. },
  19422. "time": {
  19423. "type": "object",
  19424. "properties": {
  19425. "released": {
  19426. "anyOf": [
  19427. {
  19428. "type": "number"
  19429. },
  19430. {
  19431. "type": "string",
  19432. "enum": ["NaN"]
  19433. },
  19434. {
  19435. "type": "string",
  19436. "enum": ["Infinity"]
  19437. },
  19438. {
  19439. "type": "string",
  19440. "enum": ["-Infinity"]
  19441. },
  19442. {
  19443. "type": "string",
  19444. "enum": ["Infinity", "-Infinity", "NaN"]
  19445. }
  19446. ]
  19447. }
  19448. },
  19449. "required": ["released"],
  19450. "additionalProperties": false
  19451. },
  19452. "cost": {
  19453. "type": "array",
  19454. "items": {
  19455. "type": "object",
  19456. "properties": {
  19457. "tier": {
  19458. "type": "object",
  19459. "properties": {
  19460. "type": {
  19461. "type": "string",
  19462. "enum": ["context"]
  19463. },
  19464. "size": {
  19465. "type": "integer"
  19466. }
  19467. },
  19468. "required": ["type", "size"],
  19469. "additionalProperties": false
  19470. },
  19471. "input": {
  19472. "type": "number"
  19473. },
  19474. "output": {
  19475. "type": "number"
  19476. },
  19477. "cache": {
  19478. "type": "object",
  19479. "properties": {
  19480. "read": {
  19481. "type": "number"
  19482. },
  19483. "write": {
  19484. "type": "number"
  19485. }
  19486. },
  19487. "required": ["read", "write"],
  19488. "additionalProperties": false
  19489. }
  19490. },
  19491. "required": ["input", "output", "cache"],
  19492. "additionalProperties": false
  19493. }
  19494. },
  19495. "status": {
  19496. "type": "string",
  19497. "enum": ["alpha", "beta", "deprecated", "active"]
  19498. },
  19499. "enabled": {
  19500. "type": "boolean"
  19501. },
  19502. "limit": {
  19503. "type": "object",
  19504. "properties": {
  19505. "context": {
  19506. "type": "integer"
  19507. },
  19508. "input": {
  19509. "type": "integer"
  19510. },
  19511. "output": {
  19512. "type": "integer"
  19513. }
  19514. },
  19515. "required": ["context", "output"],
  19516. "additionalProperties": false
  19517. }
  19518. },
  19519. "required": [
  19520. "id",
  19521. "providerID",
  19522. "name",
  19523. "api",
  19524. "capabilities",
  19525. "request",
  19526. "variants",
  19527. "time",
  19528. "cost",
  19529. "status",
  19530. "enabled",
  19531. "limit"
  19532. ],
  19533. "additionalProperties": false
  19534. },
  19535. "PromptSource": {
  19536. "type": "object",
  19537. "properties": {
  19538. "start": {
  19539. "type": "number"
  19540. },
  19541. "end": {
  19542. "type": "number"
  19543. },
  19544. "text": {
  19545. "type": "string"
  19546. }
  19547. },
  19548. "required": ["start", "end", "text"],
  19549. "additionalProperties": false
  19550. },
  19551. "PromptFileAttachment": {
  19552. "type": "object",
  19553. "properties": {
  19554. "uri": {
  19555. "type": "string"
  19556. },
  19557. "mime": {
  19558. "type": "string"
  19559. },
  19560. "name": {
  19561. "type": "string"
  19562. },
  19563. "description": {
  19564. "type": "string"
  19565. },
  19566. "source": {
  19567. "$ref": "#/components/schemas/PromptSource"
  19568. }
  19569. },
  19570. "required": ["uri", "mime"],
  19571. "additionalProperties": false
  19572. },
  19573. "PromptAgentAttachment": {
  19574. "type": "object",
  19575. "properties": {
  19576. "name": {
  19577. "type": "string"
  19578. },
  19579. "source": {
  19580. "$ref": "#/components/schemas/PromptSource"
  19581. }
  19582. },
  19583. "required": ["name"],
  19584. "additionalProperties": false
  19585. },
  19586. "PromptReferenceAttachment": {
  19587. "type": "object",
  19588. "properties": {
  19589. "name": {
  19590. "type": "string"
  19591. },
  19592. "kind": {
  19593. "type": "string",
  19594. "enum": ["local", "git", "invalid"]
  19595. },
  19596. "uri": {
  19597. "type": "string"
  19598. },
  19599. "repository": {
  19600. "type": "string"
  19601. },
  19602. "branch": {
  19603. "type": "string"
  19604. },
  19605. "target": {
  19606. "type": "string"
  19607. },
  19608. "targetUri": {
  19609. "type": "string"
  19610. },
  19611. "problem": {
  19612. "type": "string"
  19613. },
  19614. "source": {
  19615. "$ref": "#/components/schemas/PromptSource"
  19616. }
  19617. },
  19618. "required": ["name", "kind"],
  19619. "additionalProperties": false
  19620. },
  19621. "SessionErrorUnknown": {
  19622. "type": "object",
  19623. "properties": {
  19624. "type": {
  19625. "type": "string",
  19626. "enum": ["unknown"]
  19627. },
  19628. "message": {
  19629. "type": "string"
  19630. }
  19631. },
  19632. "required": ["type", "message"],
  19633. "additionalProperties": false
  19634. },
  19635. "ToolTextContent": {
  19636. "type": "object",
  19637. "properties": {
  19638. "type": {
  19639. "type": "string",
  19640. "enum": ["text"]
  19641. },
  19642. "text": {
  19643. "type": "string"
  19644. }
  19645. },
  19646. "required": ["type", "text"],
  19647. "additionalProperties": false
  19648. },
  19649. "ToolFileContent": {
  19650. "type": "object",
  19651. "properties": {
  19652. "type": {
  19653. "type": "string",
  19654. "enum": ["file"]
  19655. },
  19656. "uri": {
  19657. "type": "string"
  19658. },
  19659. "mime": {
  19660. "type": "string"
  19661. },
  19662. "name": {
  19663. "type": "string"
  19664. }
  19665. },
  19666. "required": ["type", "uri", "mime"],
  19667. "additionalProperties": false
  19668. },
  19669. "SessionNextRetry_error": {
  19670. "type": "object",
  19671. "properties": {
  19672. "message": {
  19673. "type": "string"
  19674. },
  19675. "statusCode": {
  19676. "type": "number"
  19677. },
  19678. "isRetryable": {
  19679. "type": "boolean"
  19680. },
  19681. "responseHeaders": {
  19682. "type": "object",
  19683. "additionalProperties": {
  19684. "type": "string"
  19685. }
  19686. },
  19687. "responseBody": {
  19688. "type": "string"
  19689. },
  19690. "metadata": {
  19691. "type": "object",
  19692. "additionalProperties": {
  19693. "type": "string"
  19694. }
  19695. }
  19696. },
  19697. "required": ["message", "isRetryable"],
  19698. "additionalProperties": false
  19699. },
  19700. "PermissionV2Source": {
  19701. "type": "object",
  19702. "properties": {
  19703. "type": {
  19704. "type": "string",
  19705. "enum": ["tool"]
  19706. },
  19707. "messageID": {
  19708. "type": "string"
  19709. },
  19710. "callID": {
  19711. "type": "string"
  19712. }
  19713. },
  19714. "required": ["type", "messageID", "callID"],
  19715. "additionalProperties": false
  19716. },
  19717. "PermissionV2Reply": {
  19718. "type": "string",
  19719. "enum": ["once", "always", "reject"]
  19720. },
  19721. "AuthOAuthCredential": {
  19722. "type": "object",
  19723. "properties": {
  19724. "type": {
  19725. "type": "string",
  19726. "enum": ["oauth"]
  19727. },
  19728. "refresh": {
  19729. "type": "string"
  19730. },
  19731. "access": {
  19732. "type": "string"
  19733. },
  19734. "expires": {
  19735. "type": "integer",
  19736. "minimum": 0
  19737. }
  19738. },
  19739. "required": ["type", "refresh", "access", "expires"],
  19740. "additionalProperties": false
  19741. },
  19742. "AuthApiKeyCredential": {
  19743. "type": "object",
  19744. "properties": {
  19745. "type": {
  19746. "type": "string",
  19747. "enum": ["api"]
  19748. },
  19749. "key": {
  19750. "type": "string"
  19751. },
  19752. "metadata": {
  19753. "type": "object",
  19754. "additionalProperties": {
  19755. "type": "string"
  19756. }
  19757. }
  19758. },
  19759. "required": ["type", "key"],
  19760. "additionalProperties": false
  19761. },
  19762. "AuthCredential": {
  19763. "anyOf": [
  19764. {
  19765. "$ref": "#/components/schemas/AuthOAuthCredential"
  19766. },
  19767. {
  19768. "$ref": "#/components/schemas/AuthApiKeyCredential"
  19769. }
  19770. ]
  19771. },
  19772. "AuthInfo": {
  19773. "type": "object",
  19774. "properties": {
  19775. "id": {
  19776. "type": "string"
  19777. },
  19778. "serviceID": {
  19779. "type": "string"
  19780. },
  19781. "description": {
  19782. "type": "string"
  19783. },
  19784. "credential": {
  19785. "$ref": "#/components/schemas/AuthCredential"
  19786. }
  19787. },
  19788. "required": ["id", "serviceID", "description", "credential"],
  19789. "additionalProperties": false
  19790. },
  19791. "EventServerInstanceDisposed": {
  19792. "type": "object",
  19793. "properties": {
  19794. "id": {
  19795. "type": "string"
  19796. },
  19797. "type": {
  19798. "type": "string",
  19799. "enum": ["server.instance.disposed"]
  19800. },
  19801. "properties": {
  19802. "type": "object",
  19803. "properties": {
  19804. "directory": {
  19805. "type": "string"
  19806. }
  19807. },
  19808. "required": ["directory"],
  19809. "additionalProperties": false
  19810. }
  19811. },
  19812. "required": ["id", "type", "properties"],
  19813. "additionalProperties": false
  19814. },
  19815. "SyncEventSessionCreated": {
  19816. "type": "object",
  19817. "properties": {
  19818. "type": {
  19819. "type": "string",
  19820. "enum": ["sync"]
  19821. },
  19822. "name": {
  19823. "type": "string",
  19824. "enum": ["session.created.1"]
  19825. },
  19826. "id": {
  19827. "type": "string"
  19828. },
  19829. "seq": {
  19830. "type": "number"
  19831. },
  19832. "aggregateID": {
  19833. "type": "string",
  19834. "enum": ["sessionID"]
  19835. },
  19836. "data": {
  19837. "type": "object",
  19838. "properties": {
  19839. "sessionID": {
  19840. "type": "string",
  19841. "pattern": "^ses"
  19842. },
  19843. "info": {
  19844. "$ref": "#/components/schemas/Session"
  19845. }
  19846. },
  19847. "required": ["sessionID", "info"],
  19848. "additionalProperties": false
  19849. }
  19850. },
  19851. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19852. "additionalProperties": false
  19853. },
  19854. "SyncEventSessionUpdated": {
  19855. "type": "object",
  19856. "properties": {
  19857. "type": {
  19858. "type": "string",
  19859. "enum": ["sync"]
  19860. },
  19861. "name": {
  19862. "type": "string",
  19863. "enum": ["session.updated.1"]
  19864. },
  19865. "id": {
  19866. "type": "string"
  19867. },
  19868. "seq": {
  19869. "type": "number"
  19870. },
  19871. "aggregateID": {
  19872. "type": "string",
  19873. "enum": ["sessionID"]
  19874. },
  19875. "data": {
  19876. "type": "object",
  19877. "properties": {
  19878. "sessionID": {
  19879. "type": "string",
  19880. "pattern": "^ses"
  19881. },
  19882. "info": {
  19883. "$ref": "#/components/schemas/Session"
  19884. }
  19885. },
  19886. "required": ["sessionID", "info"],
  19887. "additionalProperties": false
  19888. }
  19889. },
  19890. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19891. "additionalProperties": false
  19892. },
  19893. "SyncEventSessionDeleted": {
  19894. "type": "object",
  19895. "properties": {
  19896. "type": {
  19897. "type": "string",
  19898. "enum": ["sync"]
  19899. },
  19900. "name": {
  19901. "type": "string",
  19902. "enum": ["session.deleted.1"]
  19903. },
  19904. "id": {
  19905. "type": "string"
  19906. },
  19907. "seq": {
  19908. "type": "number"
  19909. },
  19910. "aggregateID": {
  19911. "type": "string",
  19912. "enum": ["sessionID"]
  19913. },
  19914. "data": {
  19915. "type": "object",
  19916. "properties": {
  19917. "sessionID": {
  19918. "type": "string",
  19919. "pattern": "^ses"
  19920. },
  19921. "info": {
  19922. "$ref": "#/components/schemas/Session"
  19923. }
  19924. },
  19925. "required": ["sessionID", "info"],
  19926. "additionalProperties": false
  19927. }
  19928. },
  19929. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19930. "additionalProperties": false
  19931. },
  19932. "SyncEventMessageUpdated": {
  19933. "type": "object",
  19934. "properties": {
  19935. "type": {
  19936. "type": "string",
  19937. "enum": ["sync"]
  19938. },
  19939. "name": {
  19940. "type": "string",
  19941. "enum": ["message.updated.1"]
  19942. },
  19943. "id": {
  19944. "type": "string"
  19945. },
  19946. "seq": {
  19947. "type": "number"
  19948. },
  19949. "aggregateID": {
  19950. "type": "string",
  19951. "enum": ["sessionID"]
  19952. },
  19953. "data": {
  19954. "type": "object",
  19955. "properties": {
  19956. "sessionID": {
  19957. "type": "string",
  19958. "pattern": "^ses"
  19959. },
  19960. "info": {
  19961. "$ref": "#/components/schemas/Message"
  19962. }
  19963. },
  19964. "required": ["sessionID", "info"],
  19965. "additionalProperties": false
  19966. }
  19967. },
  19968. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19969. "additionalProperties": false
  19970. },
  19971. "SyncEventMessageRemoved": {
  19972. "type": "object",
  19973. "properties": {
  19974. "type": {
  19975. "type": "string",
  19976. "enum": ["sync"]
  19977. },
  19978. "name": {
  19979. "type": "string",
  19980. "enum": ["message.removed.1"]
  19981. },
  19982. "id": {
  19983. "type": "string"
  19984. },
  19985. "seq": {
  19986. "type": "number"
  19987. },
  19988. "aggregateID": {
  19989. "type": "string",
  19990. "enum": ["sessionID"]
  19991. },
  19992. "data": {
  19993. "type": "object",
  19994. "properties": {
  19995. "sessionID": {
  19996. "type": "string",
  19997. "pattern": "^ses"
  19998. },
  19999. "messageID": {
  20000. "type": "string",
  20001. "pattern": "^msg"
  20002. }
  20003. },
  20004. "required": ["sessionID", "messageID"],
  20005. "additionalProperties": false
  20006. }
  20007. },
  20008. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20009. "additionalProperties": false
  20010. },
  20011. "SyncEventMessagePartUpdated": {
  20012. "type": "object",
  20013. "properties": {
  20014. "type": {
  20015. "type": "string",
  20016. "enum": ["sync"]
  20017. },
  20018. "name": {
  20019. "type": "string",
  20020. "enum": ["message.part.updated.1"]
  20021. },
  20022. "id": {
  20023. "type": "string"
  20024. },
  20025. "seq": {
  20026. "type": "number"
  20027. },
  20028. "aggregateID": {
  20029. "type": "string",
  20030. "enum": ["sessionID"]
  20031. },
  20032. "data": {
  20033. "type": "object",
  20034. "properties": {
  20035. "sessionID": {
  20036. "type": "string",
  20037. "pattern": "^ses"
  20038. },
  20039. "part": {
  20040. "$ref": "#/components/schemas/Part"
  20041. },
  20042. "time": {
  20043. "type": "number"
  20044. }
  20045. },
  20046. "required": ["sessionID", "part", "time"],
  20047. "additionalProperties": false
  20048. }
  20049. },
  20050. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20051. "additionalProperties": false
  20052. },
  20053. "SyncEventMessagePartRemoved": {
  20054. "type": "object",
  20055. "properties": {
  20056. "type": {
  20057. "type": "string",
  20058. "enum": ["sync"]
  20059. },
  20060. "name": {
  20061. "type": "string",
  20062. "enum": ["message.part.removed.1"]
  20063. },
  20064. "id": {
  20065. "type": "string"
  20066. },
  20067. "seq": {
  20068. "type": "number"
  20069. },
  20070. "aggregateID": {
  20071. "type": "string",
  20072. "enum": ["sessionID"]
  20073. },
  20074. "data": {
  20075. "type": "object",
  20076. "properties": {
  20077. "sessionID": {
  20078. "type": "string",
  20079. "pattern": "^ses"
  20080. },
  20081. "messageID": {
  20082. "type": "string",
  20083. "pattern": "^msg"
  20084. },
  20085. "partID": {
  20086. "type": "string",
  20087. "pattern": "^prt"
  20088. }
  20089. },
  20090. "required": ["sessionID", "messageID", "partID"],
  20091. "additionalProperties": false
  20092. }
  20093. },
  20094. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20095. "additionalProperties": false
  20096. },
  20097. "SyncEventSessionNextAgentSwitched": {
  20098. "type": "object",
  20099. "properties": {
  20100. "type": {
  20101. "type": "string",
  20102. "enum": ["sync"]
  20103. },
  20104. "name": {
  20105. "type": "string",
  20106. "enum": ["session.next.agent.switched.1"]
  20107. },
  20108. "id": {
  20109. "type": "string"
  20110. },
  20111. "seq": {
  20112. "type": "number"
  20113. },
  20114. "aggregateID": {
  20115. "type": "string",
  20116. "enum": ["sessionID"]
  20117. },
  20118. "data": {
  20119. "type": "object",
  20120. "properties": {
  20121. "timestamp": {
  20122. "type": "number"
  20123. },
  20124. "sessionID": {
  20125. "type": "string",
  20126. "pattern": "^ses"
  20127. },
  20128. "agent": {
  20129. "type": "string"
  20130. }
  20131. },
  20132. "required": ["timestamp", "sessionID", "agent"],
  20133. "additionalProperties": false
  20134. }
  20135. },
  20136. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20137. "additionalProperties": false
  20138. },
  20139. "SyncEventSessionNextModelSwitched": {
  20140. "type": "object",
  20141. "properties": {
  20142. "type": {
  20143. "type": "string",
  20144. "enum": ["sync"]
  20145. },
  20146. "name": {
  20147. "type": "string",
  20148. "enum": ["session.next.model.switched.1"]
  20149. },
  20150. "id": {
  20151. "type": "string"
  20152. },
  20153. "seq": {
  20154. "type": "number"
  20155. },
  20156. "aggregateID": {
  20157. "type": "string",
  20158. "enum": ["sessionID"]
  20159. },
  20160. "data": {
  20161. "type": "object",
  20162. "properties": {
  20163. "timestamp": {
  20164. "type": "number"
  20165. },
  20166. "sessionID": {
  20167. "type": "string",
  20168. "pattern": "^ses"
  20169. },
  20170. "model": {
  20171. "type": "object",
  20172. "properties": {
  20173. "id": {
  20174. "type": "string"
  20175. },
  20176. "providerID": {
  20177. "type": "string"
  20178. },
  20179. "variant": {
  20180. "type": "string"
  20181. }
  20182. },
  20183. "required": ["id", "providerID"],
  20184. "additionalProperties": false
  20185. }
  20186. },
  20187. "required": ["timestamp", "sessionID", "model"],
  20188. "additionalProperties": false
  20189. }
  20190. },
  20191. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20192. "additionalProperties": false
  20193. },
  20194. "SyncEventSessionNextPrompted": {
  20195. "type": "object",
  20196. "properties": {
  20197. "type": {
  20198. "type": "string",
  20199. "enum": ["sync"]
  20200. },
  20201. "name": {
  20202. "type": "string",
  20203. "enum": ["session.next.prompted.1"]
  20204. },
  20205. "id": {
  20206. "type": "string"
  20207. },
  20208. "seq": {
  20209. "type": "number"
  20210. },
  20211. "aggregateID": {
  20212. "type": "string",
  20213. "enum": ["sessionID"]
  20214. },
  20215. "data": {
  20216. "type": "object",
  20217. "properties": {
  20218. "timestamp": {
  20219. "type": "number"
  20220. },
  20221. "sessionID": {
  20222. "type": "string",
  20223. "pattern": "^ses"
  20224. },
  20225. "prompt": {
  20226. "$ref": "#/components/schemas/Prompt"
  20227. }
  20228. },
  20229. "required": ["timestamp", "sessionID", "prompt"],
  20230. "additionalProperties": false
  20231. }
  20232. },
  20233. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20234. "additionalProperties": false
  20235. },
  20236. "SyncEventSessionNextSynthetic": {
  20237. "type": "object",
  20238. "properties": {
  20239. "type": {
  20240. "type": "string",
  20241. "enum": ["sync"]
  20242. },
  20243. "name": {
  20244. "type": "string",
  20245. "enum": ["session.next.synthetic.1"]
  20246. },
  20247. "id": {
  20248. "type": "string"
  20249. },
  20250. "seq": {
  20251. "type": "number"
  20252. },
  20253. "aggregateID": {
  20254. "type": "string",
  20255. "enum": ["sessionID"]
  20256. },
  20257. "data": {
  20258. "type": "object",
  20259. "properties": {
  20260. "timestamp": {
  20261. "type": "number"
  20262. },
  20263. "sessionID": {
  20264. "type": "string",
  20265. "pattern": "^ses"
  20266. },
  20267. "text": {
  20268. "type": "string"
  20269. }
  20270. },
  20271. "required": ["timestamp", "sessionID", "text"],
  20272. "additionalProperties": false
  20273. }
  20274. },
  20275. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20276. "additionalProperties": false
  20277. },
  20278. "SyncEventSessionNextShellStarted": {
  20279. "type": "object",
  20280. "properties": {
  20281. "type": {
  20282. "type": "string",
  20283. "enum": ["sync"]
  20284. },
  20285. "name": {
  20286. "type": "string",
  20287. "enum": ["session.next.shell.started.1"]
  20288. },
  20289. "id": {
  20290. "type": "string"
  20291. },
  20292. "seq": {
  20293. "type": "number"
  20294. },
  20295. "aggregateID": {
  20296. "type": "string",
  20297. "enum": ["sessionID"]
  20298. },
  20299. "data": {
  20300. "type": "object",
  20301. "properties": {
  20302. "timestamp": {
  20303. "type": "number"
  20304. },
  20305. "sessionID": {
  20306. "type": "string",
  20307. "pattern": "^ses"
  20308. },
  20309. "callID": {
  20310. "type": "string"
  20311. },
  20312. "command": {
  20313. "type": "string"
  20314. }
  20315. },
  20316. "required": ["timestamp", "sessionID", "callID", "command"],
  20317. "additionalProperties": false
  20318. }
  20319. },
  20320. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20321. "additionalProperties": false
  20322. },
  20323. "SyncEventSessionNextShellEnded": {
  20324. "type": "object",
  20325. "properties": {
  20326. "type": {
  20327. "type": "string",
  20328. "enum": ["sync"]
  20329. },
  20330. "name": {
  20331. "type": "string",
  20332. "enum": ["session.next.shell.ended.1"]
  20333. },
  20334. "id": {
  20335. "type": "string"
  20336. },
  20337. "seq": {
  20338. "type": "number"
  20339. },
  20340. "aggregateID": {
  20341. "type": "string",
  20342. "enum": ["sessionID"]
  20343. },
  20344. "data": {
  20345. "type": "object",
  20346. "properties": {
  20347. "timestamp": {
  20348. "type": "number"
  20349. },
  20350. "sessionID": {
  20351. "type": "string",
  20352. "pattern": "^ses"
  20353. },
  20354. "callID": {
  20355. "type": "string"
  20356. },
  20357. "output": {
  20358. "type": "string"
  20359. }
  20360. },
  20361. "required": ["timestamp", "sessionID", "callID", "output"],
  20362. "additionalProperties": false
  20363. }
  20364. },
  20365. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20366. "additionalProperties": false
  20367. },
  20368. "SyncEventSessionNextStepStarted": {
  20369. "type": "object",
  20370. "properties": {
  20371. "type": {
  20372. "type": "string",
  20373. "enum": ["sync"]
  20374. },
  20375. "name": {
  20376. "type": "string",
  20377. "enum": ["session.next.step.started.1"]
  20378. },
  20379. "id": {
  20380. "type": "string"
  20381. },
  20382. "seq": {
  20383. "type": "number"
  20384. },
  20385. "aggregateID": {
  20386. "type": "string",
  20387. "enum": ["sessionID"]
  20388. },
  20389. "data": {
  20390. "type": "object",
  20391. "properties": {
  20392. "timestamp": {
  20393. "type": "number"
  20394. },
  20395. "sessionID": {
  20396. "type": "string",
  20397. "pattern": "^ses"
  20398. },
  20399. "agent": {
  20400. "type": "string"
  20401. },
  20402. "model": {
  20403. "type": "object",
  20404. "properties": {
  20405. "id": {
  20406. "type": "string"
  20407. },
  20408. "providerID": {
  20409. "type": "string"
  20410. },
  20411. "variant": {
  20412. "type": "string"
  20413. }
  20414. },
  20415. "required": ["id", "providerID"],
  20416. "additionalProperties": false
  20417. },
  20418. "snapshot": {
  20419. "type": "string"
  20420. }
  20421. },
  20422. "required": ["timestamp", "sessionID", "agent", "model"],
  20423. "additionalProperties": false
  20424. }
  20425. },
  20426. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20427. "additionalProperties": false
  20428. },
  20429. "SyncEventSessionNextStepEnded": {
  20430. "type": "object",
  20431. "properties": {
  20432. "type": {
  20433. "type": "string",
  20434. "enum": ["sync"]
  20435. },
  20436. "name": {
  20437. "type": "string",
  20438. "enum": ["session.next.step.ended.1"]
  20439. },
  20440. "id": {
  20441. "type": "string"
  20442. },
  20443. "seq": {
  20444. "type": "number"
  20445. },
  20446. "aggregateID": {
  20447. "type": "string",
  20448. "enum": ["sessionID"]
  20449. },
  20450. "data": {
  20451. "type": "object",
  20452. "properties": {
  20453. "timestamp": {
  20454. "type": "number"
  20455. },
  20456. "sessionID": {
  20457. "type": "string",
  20458. "pattern": "^ses"
  20459. },
  20460. "finish": {
  20461. "type": "string"
  20462. },
  20463. "cost": {
  20464. "type": "number"
  20465. },
  20466. "tokens": {
  20467. "type": "object",
  20468. "properties": {
  20469. "input": {
  20470. "type": "number"
  20471. },
  20472. "output": {
  20473. "type": "number"
  20474. },
  20475. "reasoning": {
  20476. "type": "number"
  20477. },
  20478. "cache": {
  20479. "type": "object",
  20480. "properties": {
  20481. "read": {
  20482. "type": "number"
  20483. },
  20484. "write": {
  20485. "type": "number"
  20486. }
  20487. },
  20488. "required": ["read", "write"],
  20489. "additionalProperties": false
  20490. }
  20491. },
  20492. "required": ["input", "output", "reasoning", "cache"],
  20493. "additionalProperties": false
  20494. },
  20495. "snapshot": {
  20496. "type": "string"
  20497. }
  20498. },
  20499. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  20500. "additionalProperties": false
  20501. }
  20502. },
  20503. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20504. "additionalProperties": false
  20505. },
  20506. "SyncEventSessionNextStepFailed": {
  20507. "type": "object",
  20508. "properties": {
  20509. "type": {
  20510. "type": "string",
  20511. "enum": ["sync"]
  20512. },
  20513. "name": {
  20514. "type": "string",
  20515. "enum": ["session.next.step.failed.1"]
  20516. },
  20517. "id": {
  20518. "type": "string"
  20519. },
  20520. "seq": {
  20521. "type": "number"
  20522. },
  20523. "aggregateID": {
  20524. "type": "string",
  20525. "enum": ["sessionID"]
  20526. },
  20527. "data": {
  20528. "type": "object",
  20529. "properties": {
  20530. "timestamp": {
  20531. "type": "number"
  20532. },
  20533. "sessionID": {
  20534. "type": "string",
  20535. "pattern": "^ses"
  20536. },
  20537. "error": {
  20538. "$ref": "#/components/schemas/SessionErrorUnknown"
  20539. }
  20540. },
  20541. "required": ["timestamp", "sessionID", "error"],
  20542. "additionalProperties": false
  20543. }
  20544. },
  20545. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20546. "additionalProperties": false
  20547. },
  20548. "SyncEventSessionNextTextStarted": {
  20549. "type": "object",
  20550. "properties": {
  20551. "type": {
  20552. "type": "string",
  20553. "enum": ["sync"]
  20554. },
  20555. "name": {
  20556. "type": "string",
  20557. "enum": ["session.next.text.started.1"]
  20558. },
  20559. "id": {
  20560. "type": "string"
  20561. },
  20562. "seq": {
  20563. "type": "number"
  20564. },
  20565. "aggregateID": {
  20566. "type": "string",
  20567. "enum": ["sessionID"]
  20568. },
  20569. "data": {
  20570. "type": "object",
  20571. "properties": {
  20572. "timestamp": {
  20573. "type": "number"
  20574. },
  20575. "sessionID": {
  20576. "type": "string",
  20577. "pattern": "^ses"
  20578. }
  20579. },
  20580. "required": ["timestamp", "sessionID"],
  20581. "additionalProperties": false
  20582. }
  20583. },
  20584. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20585. "additionalProperties": false
  20586. },
  20587. "SyncEventSessionNextTextDelta": {
  20588. "type": "object",
  20589. "properties": {
  20590. "type": {
  20591. "type": "string",
  20592. "enum": ["sync"]
  20593. },
  20594. "name": {
  20595. "type": "string",
  20596. "enum": ["session.next.text.delta.1"]
  20597. },
  20598. "id": {
  20599. "type": "string"
  20600. },
  20601. "seq": {
  20602. "type": "number"
  20603. },
  20604. "aggregateID": {
  20605. "type": "string",
  20606. "enum": ["sessionID"]
  20607. },
  20608. "data": {
  20609. "type": "object",
  20610. "properties": {
  20611. "timestamp": {
  20612. "type": "number"
  20613. },
  20614. "sessionID": {
  20615. "type": "string",
  20616. "pattern": "^ses"
  20617. },
  20618. "delta": {
  20619. "type": "string"
  20620. }
  20621. },
  20622. "required": ["timestamp", "sessionID", "delta"],
  20623. "additionalProperties": false
  20624. }
  20625. },
  20626. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20627. "additionalProperties": false
  20628. },
  20629. "SyncEventSessionNextTextEnded": {
  20630. "type": "object",
  20631. "properties": {
  20632. "type": {
  20633. "type": "string",
  20634. "enum": ["sync"]
  20635. },
  20636. "name": {
  20637. "type": "string",
  20638. "enum": ["session.next.text.ended.1"]
  20639. },
  20640. "id": {
  20641. "type": "string"
  20642. },
  20643. "seq": {
  20644. "type": "number"
  20645. },
  20646. "aggregateID": {
  20647. "type": "string",
  20648. "enum": ["sessionID"]
  20649. },
  20650. "data": {
  20651. "type": "object",
  20652. "properties": {
  20653. "timestamp": {
  20654. "type": "number"
  20655. },
  20656. "sessionID": {
  20657. "type": "string",
  20658. "pattern": "^ses"
  20659. },
  20660. "text": {
  20661. "type": "string"
  20662. }
  20663. },
  20664. "required": ["timestamp", "sessionID", "text"],
  20665. "additionalProperties": false
  20666. }
  20667. },
  20668. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20669. "additionalProperties": false
  20670. },
  20671. "SyncEventSessionNextReasoningStarted": {
  20672. "type": "object",
  20673. "properties": {
  20674. "type": {
  20675. "type": "string",
  20676. "enum": ["sync"]
  20677. },
  20678. "name": {
  20679. "type": "string",
  20680. "enum": ["session.next.reasoning.started.1"]
  20681. },
  20682. "id": {
  20683. "type": "string"
  20684. },
  20685. "seq": {
  20686. "type": "number"
  20687. },
  20688. "aggregateID": {
  20689. "type": "string",
  20690. "enum": ["sessionID"]
  20691. },
  20692. "data": {
  20693. "type": "object",
  20694. "properties": {
  20695. "timestamp": {
  20696. "type": "number"
  20697. },
  20698. "sessionID": {
  20699. "type": "string",
  20700. "pattern": "^ses"
  20701. },
  20702. "reasoningID": {
  20703. "type": "string"
  20704. }
  20705. },
  20706. "required": ["timestamp", "sessionID", "reasoningID"],
  20707. "additionalProperties": false
  20708. }
  20709. },
  20710. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20711. "additionalProperties": false
  20712. },
  20713. "SyncEventSessionNextReasoningDelta": {
  20714. "type": "object",
  20715. "properties": {
  20716. "type": {
  20717. "type": "string",
  20718. "enum": ["sync"]
  20719. },
  20720. "name": {
  20721. "type": "string",
  20722. "enum": ["session.next.reasoning.delta.1"]
  20723. },
  20724. "id": {
  20725. "type": "string"
  20726. },
  20727. "seq": {
  20728. "type": "number"
  20729. },
  20730. "aggregateID": {
  20731. "type": "string",
  20732. "enum": ["sessionID"]
  20733. },
  20734. "data": {
  20735. "type": "object",
  20736. "properties": {
  20737. "timestamp": {
  20738. "type": "number"
  20739. },
  20740. "sessionID": {
  20741. "type": "string",
  20742. "pattern": "^ses"
  20743. },
  20744. "reasoningID": {
  20745. "type": "string"
  20746. },
  20747. "delta": {
  20748. "type": "string"
  20749. }
  20750. },
  20751. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  20752. "additionalProperties": false
  20753. }
  20754. },
  20755. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20756. "additionalProperties": false
  20757. },
  20758. "SyncEventSessionNextReasoningEnded": {
  20759. "type": "object",
  20760. "properties": {
  20761. "type": {
  20762. "type": "string",
  20763. "enum": ["sync"]
  20764. },
  20765. "name": {
  20766. "type": "string",
  20767. "enum": ["session.next.reasoning.ended.1"]
  20768. },
  20769. "id": {
  20770. "type": "string"
  20771. },
  20772. "seq": {
  20773. "type": "number"
  20774. },
  20775. "aggregateID": {
  20776. "type": "string",
  20777. "enum": ["sessionID"]
  20778. },
  20779. "data": {
  20780. "type": "object",
  20781. "properties": {
  20782. "timestamp": {
  20783. "type": "number"
  20784. },
  20785. "sessionID": {
  20786. "type": "string",
  20787. "pattern": "^ses"
  20788. },
  20789. "reasoningID": {
  20790. "type": "string"
  20791. },
  20792. "text": {
  20793. "type": "string"
  20794. }
  20795. },
  20796. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  20797. "additionalProperties": false
  20798. }
  20799. },
  20800. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20801. "additionalProperties": false
  20802. },
  20803. "SyncEventSessionNextToolInputStarted": {
  20804. "type": "object",
  20805. "properties": {
  20806. "type": {
  20807. "type": "string",
  20808. "enum": ["sync"]
  20809. },
  20810. "name": {
  20811. "type": "string",
  20812. "enum": ["session.next.tool.input.started.1"]
  20813. },
  20814. "id": {
  20815. "type": "string"
  20816. },
  20817. "seq": {
  20818. "type": "number"
  20819. },
  20820. "aggregateID": {
  20821. "type": "string",
  20822. "enum": ["sessionID"]
  20823. },
  20824. "data": {
  20825. "type": "object",
  20826. "properties": {
  20827. "timestamp": {
  20828. "type": "number"
  20829. },
  20830. "sessionID": {
  20831. "type": "string",
  20832. "pattern": "^ses"
  20833. },
  20834. "callID": {
  20835. "type": "string"
  20836. },
  20837. "name": {
  20838. "type": "string"
  20839. }
  20840. },
  20841. "required": ["timestamp", "sessionID", "callID", "name"],
  20842. "additionalProperties": false
  20843. }
  20844. },
  20845. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20846. "additionalProperties": false
  20847. },
  20848. "SyncEventSessionNextToolInputDelta": {
  20849. "type": "object",
  20850. "properties": {
  20851. "type": {
  20852. "type": "string",
  20853. "enum": ["sync"]
  20854. },
  20855. "name": {
  20856. "type": "string",
  20857. "enum": ["session.next.tool.input.delta.1"]
  20858. },
  20859. "id": {
  20860. "type": "string"
  20861. },
  20862. "seq": {
  20863. "type": "number"
  20864. },
  20865. "aggregateID": {
  20866. "type": "string",
  20867. "enum": ["sessionID"]
  20868. },
  20869. "data": {
  20870. "type": "object",
  20871. "properties": {
  20872. "timestamp": {
  20873. "type": "number"
  20874. },
  20875. "sessionID": {
  20876. "type": "string",
  20877. "pattern": "^ses"
  20878. },
  20879. "callID": {
  20880. "type": "string"
  20881. },
  20882. "delta": {
  20883. "type": "string"
  20884. }
  20885. },
  20886. "required": ["timestamp", "sessionID", "callID", "delta"],
  20887. "additionalProperties": false
  20888. }
  20889. },
  20890. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20891. "additionalProperties": false
  20892. },
  20893. "SyncEventSessionNextToolInputEnded": {
  20894. "type": "object",
  20895. "properties": {
  20896. "type": {
  20897. "type": "string",
  20898. "enum": ["sync"]
  20899. },
  20900. "name": {
  20901. "type": "string",
  20902. "enum": ["session.next.tool.input.ended.1"]
  20903. },
  20904. "id": {
  20905. "type": "string"
  20906. },
  20907. "seq": {
  20908. "type": "number"
  20909. },
  20910. "aggregateID": {
  20911. "type": "string",
  20912. "enum": ["sessionID"]
  20913. },
  20914. "data": {
  20915. "type": "object",
  20916. "properties": {
  20917. "timestamp": {
  20918. "type": "number"
  20919. },
  20920. "sessionID": {
  20921. "type": "string",
  20922. "pattern": "^ses"
  20923. },
  20924. "callID": {
  20925. "type": "string"
  20926. },
  20927. "text": {
  20928. "type": "string"
  20929. }
  20930. },
  20931. "required": ["timestamp", "sessionID", "callID", "text"],
  20932. "additionalProperties": false
  20933. }
  20934. },
  20935. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20936. "additionalProperties": false
  20937. },
  20938. "SyncEventSessionNextToolCalled": {
  20939. "type": "object",
  20940. "properties": {
  20941. "type": {
  20942. "type": "string",
  20943. "enum": ["sync"]
  20944. },
  20945. "name": {
  20946. "type": "string",
  20947. "enum": ["session.next.tool.called.1"]
  20948. },
  20949. "id": {
  20950. "type": "string"
  20951. },
  20952. "seq": {
  20953. "type": "number"
  20954. },
  20955. "aggregateID": {
  20956. "type": "string",
  20957. "enum": ["sessionID"]
  20958. },
  20959. "data": {
  20960. "type": "object",
  20961. "properties": {
  20962. "timestamp": {
  20963. "type": "number"
  20964. },
  20965. "sessionID": {
  20966. "type": "string",
  20967. "pattern": "^ses"
  20968. },
  20969. "callID": {
  20970. "type": "string"
  20971. },
  20972. "tool": {
  20973. "type": "string"
  20974. },
  20975. "input": {
  20976. "type": "object"
  20977. },
  20978. "provider": {
  20979. "type": "object",
  20980. "properties": {
  20981. "executed": {
  20982. "type": "boolean"
  20983. },
  20984. "metadata": {
  20985. "type": "object"
  20986. }
  20987. },
  20988. "required": ["executed"],
  20989. "additionalProperties": false
  20990. }
  20991. },
  20992. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  20993. "additionalProperties": false
  20994. }
  20995. },
  20996. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20997. "additionalProperties": false
  20998. },
  20999. "SyncEventSessionNextToolProgress": {
  21000. "type": "object",
  21001. "properties": {
  21002. "type": {
  21003. "type": "string",
  21004. "enum": ["sync"]
  21005. },
  21006. "name": {
  21007. "type": "string",
  21008. "enum": ["session.next.tool.progress.1"]
  21009. },
  21010. "id": {
  21011. "type": "string"
  21012. },
  21013. "seq": {
  21014. "type": "number"
  21015. },
  21016. "aggregateID": {
  21017. "type": "string",
  21018. "enum": ["sessionID"]
  21019. },
  21020. "data": {
  21021. "type": "object",
  21022. "properties": {
  21023. "timestamp": {
  21024. "type": "number"
  21025. },
  21026. "sessionID": {
  21027. "type": "string",
  21028. "pattern": "^ses"
  21029. },
  21030. "callID": {
  21031. "type": "string"
  21032. },
  21033. "structured": {
  21034. "type": "object"
  21035. },
  21036. "content": {
  21037. "type": "array",
  21038. "items": {
  21039. "anyOf": [
  21040. {
  21041. "$ref": "#/components/schemas/ToolTextContent"
  21042. },
  21043. {
  21044. "$ref": "#/components/schemas/ToolFileContent"
  21045. }
  21046. ]
  21047. }
  21048. }
  21049. },
  21050. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  21051. "additionalProperties": false
  21052. }
  21053. },
  21054. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21055. "additionalProperties": false
  21056. },
  21057. "SyncEventSessionNextToolSuccess": {
  21058. "type": "object",
  21059. "properties": {
  21060. "type": {
  21061. "type": "string",
  21062. "enum": ["sync"]
  21063. },
  21064. "name": {
  21065. "type": "string",
  21066. "enum": ["session.next.tool.success.1"]
  21067. },
  21068. "id": {
  21069. "type": "string"
  21070. },
  21071. "seq": {
  21072. "type": "number"
  21073. },
  21074. "aggregateID": {
  21075. "type": "string",
  21076. "enum": ["sessionID"]
  21077. },
  21078. "data": {
  21079. "type": "object",
  21080. "properties": {
  21081. "timestamp": {
  21082. "type": "number"
  21083. },
  21084. "sessionID": {
  21085. "type": "string",
  21086. "pattern": "^ses"
  21087. },
  21088. "callID": {
  21089. "type": "string"
  21090. },
  21091. "structured": {
  21092. "type": "object"
  21093. },
  21094. "content": {
  21095. "type": "array",
  21096. "items": {
  21097. "anyOf": [
  21098. {
  21099. "$ref": "#/components/schemas/ToolTextContent"
  21100. },
  21101. {
  21102. "$ref": "#/components/schemas/ToolFileContent"
  21103. }
  21104. ]
  21105. }
  21106. },
  21107. "provider": {
  21108. "type": "object",
  21109. "properties": {
  21110. "executed": {
  21111. "type": "boolean"
  21112. },
  21113. "metadata": {
  21114. "type": "object"
  21115. }
  21116. },
  21117. "required": ["executed"],
  21118. "additionalProperties": false
  21119. }
  21120. },
  21121. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  21122. "additionalProperties": false
  21123. }
  21124. },
  21125. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21126. "additionalProperties": false
  21127. },
  21128. "SyncEventSessionNextToolFailed": {
  21129. "type": "object",
  21130. "properties": {
  21131. "type": {
  21132. "type": "string",
  21133. "enum": ["sync"]
  21134. },
  21135. "name": {
  21136. "type": "string",
  21137. "enum": ["session.next.tool.failed.1"]
  21138. },
  21139. "id": {
  21140. "type": "string"
  21141. },
  21142. "seq": {
  21143. "type": "number"
  21144. },
  21145. "aggregateID": {
  21146. "type": "string",
  21147. "enum": ["sessionID"]
  21148. },
  21149. "data": {
  21150. "type": "object",
  21151. "properties": {
  21152. "timestamp": {
  21153. "type": "number"
  21154. },
  21155. "sessionID": {
  21156. "type": "string",
  21157. "pattern": "^ses"
  21158. },
  21159. "callID": {
  21160. "type": "string"
  21161. },
  21162. "error": {
  21163. "$ref": "#/components/schemas/SessionErrorUnknown"
  21164. },
  21165. "provider": {
  21166. "type": "object",
  21167. "properties": {
  21168. "executed": {
  21169. "type": "boolean"
  21170. },
  21171. "metadata": {
  21172. "type": "object"
  21173. }
  21174. },
  21175. "required": ["executed"],
  21176. "additionalProperties": false
  21177. }
  21178. },
  21179. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  21180. "additionalProperties": false
  21181. }
  21182. },
  21183. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21184. "additionalProperties": false
  21185. },
  21186. "SyncEventSessionNextRetried": {
  21187. "type": "object",
  21188. "properties": {
  21189. "type": {
  21190. "type": "string",
  21191. "enum": ["sync"]
  21192. },
  21193. "name": {
  21194. "type": "string",
  21195. "enum": ["session.next.retried.1"]
  21196. },
  21197. "id": {
  21198. "type": "string"
  21199. },
  21200. "seq": {
  21201. "type": "number"
  21202. },
  21203. "aggregateID": {
  21204. "type": "string",
  21205. "enum": ["sessionID"]
  21206. },
  21207. "data": {
  21208. "type": "object",
  21209. "properties": {
  21210. "timestamp": {
  21211. "type": "number"
  21212. },
  21213. "sessionID": {
  21214. "type": "string",
  21215. "pattern": "^ses"
  21216. },
  21217. "attempt": {
  21218. "type": "number"
  21219. },
  21220. "error": {
  21221. "$ref": "#/components/schemas/SessionNextRetry_error"
  21222. }
  21223. },
  21224. "required": ["timestamp", "sessionID", "attempt", "error"],
  21225. "additionalProperties": false
  21226. }
  21227. },
  21228. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21229. "additionalProperties": false
  21230. },
  21231. "SyncEventSessionNextCompactionStarted": {
  21232. "type": "object",
  21233. "properties": {
  21234. "type": {
  21235. "type": "string",
  21236. "enum": ["sync"]
  21237. },
  21238. "name": {
  21239. "type": "string",
  21240. "enum": ["session.next.compaction.started.1"]
  21241. },
  21242. "id": {
  21243. "type": "string"
  21244. },
  21245. "seq": {
  21246. "type": "number"
  21247. },
  21248. "aggregateID": {
  21249. "type": "string",
  21250. "enum": ["sessionID"]
  21251. },
  21252. "data": {
  21253. "type": "object",
  21254. "properties": {
  21255. "timestamp": {
  21256. "type": "number"
  21257. },
  21258. "sessionID": {
  21259. "type": "string",
  21260. "pattern": "^ses"
  21261. },
  21262. "reason": {
  21263. "type": "string",
  21264. "enum": ["auto", "manual"]
  21265. }
  21266. },
  21267. "required": ["timestamp", "sessionID", "reason"],
  21268. "additionalProperties": false
  21269. }
  21270. },
  21271. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21272. "additionalProperties": false
  21273. },
  21274. "SyncEventSessionNextCompactionDelta": {
  21275. "type": "object",
  21276. "properties": {
  21277. "type": {
  21278. "type": "string",
  21279. "enum": ["sync"]
  21280. },
  21281. "name": {
  21282. "type": "string",
  21283. "enum": ["session.next.compaction.delta.1"]
  21284. },
  21285. "id": {
  21286. "type": "string"
  21287. },
  21288. "seq": {
  21289. "type": "number"
  21290. },
  21291. "aggregateID": {
  21292. "type": "string",
  21293. "enum": ["sessionID"]
  21294. },
  21295. "data": {
  21296. "type": "object",
  21297. "properties": {
  21298. "timestamp": {
  21299. "type": "number"
  21300. },
  21301. "sessionID": {
  21302. "type": "string",
  21303. "pattern": "^ses"
  21304. },
  21305. "text": {
  21306. "type": "string"
  21307. }
  21308. },
  21309. "required": ["timestamp", "sessionID", "text"],
  21310. "additionalProperties": false
  21311. }
  21312. },
  21313. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21314. "additionalProperties": false
  21315. },
  21316. "SyncEventSessionNextCompactionEnded": {
  21317. "type": "object",
  21318. "properties": {
  21319. "type": {
  21320. "type": "string",
  21321. "enum": ["sync"]
  21322. },
  21323. "name": {
  21324. "type": "string",
  21325. "enum": ["session.next.compaction.ended.1"]
  21326. },
  21327. "id": {
  21328. "type": "string"
  21329. },
  21330. "seq": {
  21331. "type": "number"
  21332. },
  21333. "aggregateID": {
  21334. "type": "string",
  21335. "enum": ["sessionID"]
  21336. },
  21337. "data": {
  21338. "type": "object",
  21339. "properties": {
  21340. "timestamp": {
  21341. "type": "number"
  21342. },
  21343. "sessionID": {
  21344. "type": "string",
  21345. "pattern": "^ses"
  21346. },
  21347. "text": {
  21348. "type": "string"
  21349. },
  21350. "include": {
  21351. "type": "string"
  21352. }
  21353. },
  21354. "required": ["timestamp", "sessionID", "text"],
  21355. "additionalProperties": false
  21356. }
  21357. },
  21358. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21359. "additionalProperties": false
  21360. },
  21361. "PolicyEffect": {
  21362. "type": "string",
  21363. "enum": ["allow", "deny"]
  21364. },
  21365. "ConfigV2ExperimentalPolicy": {
  21366. "type": "object",
  21367. "properties": {
  21368. "action": {
  21369. "type": "string",
  21370. "enum": ["provider.use"]
  21371. },
  21372. "effect": {
  21373. "$ref": "#/components/schemas/PolicyEffect"
  21374. },
  21375. "resource": {
  21376. "type": "string"
  21377. }
  21378. },
  21379. "required": ["action", "effect", "resource"],
  21380. "additionalProperties": false
  21381. },
  21382. "ProjectDirectories": {
  21383. "type": "array",
  21384. "items": {
  21385. "type": "string"
  21386. }
  21387. },
  21388. "ProjectCopyCopy": {
  21389. "type": "object",
  21390. "properties": {
  21391. "directory": {
  21392. "type": "string"
  21393. }
  21394. },
  21395. "required": ["directory"],
  21396. "additionalProperties": false
  21397. },
  21398. "LocationRef": {
  21399. "type": "object",
  21400. "properties": {
  21401. "directory": {
  21402. "type": "string"
  21403. },
  21404. "workspaceID": {
  21405. "type": "string"
  21406. }
  21407. },
  21408. "required": ["directory"],
  21409. "additionalProperties": false
  21410. },
  21411. "SessionV2Info": {
  21412. "type": "object",
  21413. "properties": {
  21414. "id": {
  21415. "type": "string",
  21416. "pattern": "^ses"
  21417. },
  21418. "parentID": {
  21419. "type": "string",
  21420. "pattern": "^ses"
  21421. },
  21422. "projectID": {
  21423. "type": "string"
  21424. },
  21425. "agent": {
  21426. "type": "string"
  21427. },
  21428. "model": {
  21429. "type": "object",
  21430. "properties": {
  21431. "id": {
  21432. "type": "string"
  21433. },
  21434. "providerID": {
  21435. "type": "string"
  21436. },
  21437. "variant": {
  21438. "type": "string"
  21439. }
  21440. },
  21441. "required": ["id", "providerID"],
  21442. "additionalProperties": false
  21443. },
  21444. "cost": {
  21445. "type": "number"
  21446. },
  21447. "tokens": {
  21448. "type": "object",
  21449. "properties": {
  21450. "input": {
  21451. "type": "number"
  21452. },
  21453. "output": {
  21454. "type": "number"
  21455. },
  21456. "reasoning": {
  21457. "type": "number"
  21458. },
  21459. "cache": {
  21460. "type": "object",
  21461. "properties": {
  21462. "read": {
  21463. "type": "number"
  21464. },
  21465. "write": {
  21466. "type": "number"
  21467. }
  21468. },
  21469. "required": ["read", "write"],
  21470. "additionalProperties": false
  21471. }
  21472. },
  21473. "required": ["input", "output", "reasoning", "cache"],
  21474. "additionalProperties": false
  21475. },
  21476. "time": {
  21477. "type": "object",
  21478. "properties": {
  21479. "created": {
  21480. "type": "number"
  21481. },
  21482. "updated": {
  21483. "type": "number"
  21484. },
  21485. "archived": {
  21486. "type": "number"
  21487. }
  21488. },
  21489. "required": ["created", "updated"],
  21490. "additionalProperties": false
  21491. },
  21492. "title": {
  21493. "type": "string"
  21494. },
  21495. "location": {
  21496. "$ref": "#/components/schemas/LocationRef"
  21497. },
  21498. "subpath": {
  21499. "type": "string"
  21500. }
  21501. },
  21502. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  21503. "additionalProperties": false
  21504. },
  21505. "SessionDelivery": {
  21506. "type": "string",
  21507. "enum": ["immediate", "deferred"]
  21508. },
  21509. "SessionMessageAgentSwitched": {
  21510. "type": "object",
  21511. "properties": {
  21512. "id": {
  21513. "type": "string"
  21514. },
  21515. "metadata": {
  21516. "type": "object"
  21517. },
  21518. "time": {
  21519. "type": "object",
  21520. "properties": {
  21521. "created": {
  21522. "type": "number"
  21523. }
  21524. },
  21525. "required": ["created"],
  21526. "additionalProperties": false
  21527. },
  21528. "type": {
  21529. "type": "string",
  21530. "enum": ["agent-switched"]
  21531. },
  21532. "agent": {
  21533. "type": "string"
  21534. }
  21535. },
  21536. "required": ["id", "time", "type", "agent"],
  21537. "additionalProperties": false
  21538. },
  21539. "SessionMessageModelSwitched": {
  21540. "type": "object",
  21541. "properties": {
  21542. "id": {
  21543. "type": "string"
  21544. },
  21545. "metadata": {
  21546. "type": "object"
  21547. },
  21548. "time": {
  21549. "type": "object",
  21550. "properties": {
  21551. "created": {
  21552. "type": "number"
  21553. }
  21554. },
  21555. "required": ["created"],
  21556. "additionalProperties": false
  21557. },
  21558. "type": {
  21559. "type": "string",
  21560. "enum": ["model-switched"]
  21561. },
  21562. "model": {
  21563. "type": "object",
  21564. "properties": {
  21565. "id": {
  21566. "type": "string"
  21567. },
  21568. "providerID": {
  21569. "type": "string"
  21570. },
  21571. "variant": {
  21572. "type": "string"
  21573. }
  21574. },
  21575. "required": ["id", "providerID"],
  21576. "additionalProperties": false
  21577. }
  21578. },
  21579. "required": ["id", "time", "type", "model"],
  21580. "additionalProperties": false
  21581. },
  21582. "SessionMessageUser": {
  21583. "type": "object",
  21584. "properties": {
  21585. "id": {
  21586. "type": "string"
  21587. },
  21588. "metadata": {
  21589. "type": "object"
  21590. },
  21591. "time": {
  21592. "type": "object",
  21593. "properties": {
  21594. "created": {
  21595. "type": "number"
  21596. }
  21597. },
  21598. "required": ["created"],
  21599. "additionalProperties": false
  21600. },
  21601. "text": {
  21602. "type": "string"
  21603. },
  21604. "files": {
  21605. "type": "array",
  21606. "items": {
  21607. "$ref": "#/components/schemas/PromptFileAttachment"
  21608. }
  21609. },
  21610. "agents": {
  21611. "type": "array",
  21612. "items": {
  21613. "$ref": "#/components/schemas/PromptAgentAttachment"
  21614. }
  21615. },
  21616. "references": {
  21617. "type": "array",
  21618. "items": {
  21619. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21620. }
  21621. },
  21622. "type": {
  21623. "type": "string",
  21624. "enum": ["user"]
  21625. }
  21626. },
  21627. "required": ["id", "time", "text", "type"],
  21628. "additionalProperties": false
  21629. },
  21630. "SessionMessageSynthetic": {
  21631. "type": "object",
  21632. "properties": {
  21633. "id": {
  21634. "type": "string"
  21635. },
  21636. "metadata": {
  21637. "type": "object"
  21638. },
  21639. "time": {
  21640. "type": "object",
  21641. "properties": {
  21642. "created": {
  21643. "type": "number"
  21644. }
  21645. },
  21646. "required": ["created"],
  21647. "additionalProperties": false
  21648. },
  21649. "sessionID": {
  21650. "type": "string",
  21651. "pattern": "^ses"
  21652. },
  21653. "text": {
  21654. "type": "string"
  21655. },
  21656. "type": {
  21657. "type": "string",
  21658. "enum": ["synthetic"]
  21659. }
  21660. },
  21661. "required": ["id", "time", "sessionID", "text", "type"],
  21662. "additionalProperties": false
  21663. },
  21664. "SessionMessageShell": {
  21665. "type": "object",
  21666. "properties": {
  21667. "id": {
  21668. "type": "string"
  21669. },
  21670. "metadata": {
  21671. "type": "object"
  21672. },
  21673. "time": {
  21674. "type": "object",
  21675. "properties": {
  21676. "created": {
  21677. "type": "number"
  21678. },
  21679. "completed": {
  21680. "type": "number"
  21681. }
  21682. },
  21683. "required": ["created"],
  21684. "additionalProperties": false
  21685. },
  21686. "type": {
  21687. "type": "string",
  21688. "enum": ["shell"]
  21689. },
  21690. "callID": {
  21691. "type": "string"
  21692. },
  21693. "command": {
  21694. "type": "string"
  21695. },
  21696. "output": {
  21697. "type": "string"
  21698. }
  21699. },
  21700. "required": ["id", "time", "type", "callID", "command", "output"],
  21701. "additionalProperties": false
  21702. },
  21703. "SessionMessageAssistantText": {
  21704. "type": "object",
  21705. "properties": {
  21706. "type": {
  21707. "type": "string",
  21708. "enum": ["text"]
  21709. },
  21710. "text": {
  21711. "type": "string"
  21712. }
  21713. },
  21714. "required": ["type", "text"],
  21715. "additionalProperties": false
  21716. },
  21717. "SessionMessageAssistantReasoning": {
  21718. "type": "object",
  21719. "properties": {
  21720. "type": {
  21721. "type": "string",
  21722. "enum": ["reasoning"]
  21723. },
  21724. "id": {
  21725. "type": "string"
  21726. },
  21727. "text": {
  21728. "type": "string"
  21729. }
  21730. },
  21731. "required": ["type", "id", "text"],
  21732. "additionalProperties": false
  21733. },
  21734. "SessionMessageToolStatePending": {
  21735. "type": "object",
  21736. "properties": {
  21737. "status": {
  21738. "type": "string",
  21739. "enum": ["pending"]
  21740. },
  21741. "input": {
  21742. "type": "string"
  21743. }
  21744. },
  21745. "required": ["status", "input"],
  21746. "additionalProperties": false
  21747. },
  21748. "SessionMessageToolStateRunning": {
  21749. "type": "object",
  21750. "properties": {
  21751. "status": {
  21752. "type": "string",
  21753. "enum": ["running"]
  21754. },
  21755. "input": {
  21756. "type": "object"
  21757. },
  21758. "structured": {
  21759. "type": "object"
  21760. },
  21761. "content": {
  21762. "type": "array",
  21763. "items": {
  21764. "anyOf": [
  21765. {
  21766. "$ref": "#/components/schemas/ToolTextContent"
  21767. },
  21768. {
  21769. "$ref": "#/components/schemas/ToolFileContent"
  21770. }
  21771. ]
  21772. }
  21773. }
  21774. },
  21775. "required": ["status", "input", "structured", "content"],
  21776. "additionalProperties": false
  21777. },
  21778. "SessionMessageToolStateCompleted": {
  21779. "type": "object",
  21780. "properties": {
  21781. "status": {
  21782. "type": "string",
  21783. "enum": ["completed"]
  21784. },
  21785. "input": {
  21786. "type": "object"
  21787. },
  21788. "attachments": {
  21789. "type": "array",
  21790. "items": {
  21791. "$ref": "#/components/schemas/PromptFileAttachment"
  21792. }
  21793. },
  21794. "content": {
  21795. "type": "array",
  21796. "items": {
  21797. "anyOf": [
  21798. {
  21799. "$ref": "#/components/schemas/ToolTextContent"
  21800. },
  21801. {
  21802. "$ref": "#/components/schemas/ToolFileContent"
  21803. }
  21804. ]
  21805. }
  21806. },
  21807. "structured": {
  21808. "type": "object"
  21809. }
  21810. },
  21811. "required": ["status", "input", "content", "structured"],
  21812. "additionalProperties": false
  21813. },
  21814. "SessionMessageToolStateError": {
  21815. "type": "object",
  21816. "properties": {
  21817. "status": {
  21818. "type": "string",
  21819. "enum": ["error"]
  21820. },
  21821. "input": {
  21822. "type": "object"
  21823. },
  21824. "content": {
  21825. "type": "array",
  21826. "items": {
  21827. "anyOf": [
  21828. {
  21829. "$ref": "#/components/schemas/ToolTextContent"
  21830. },
  21831. {
  21832. "$ref": "#/components/schemas/ToolFileContent"
  21833. }
  21834. ]
  21835. }
  21836. },
  21837. "structured": {
  21838. "type": "object"
  21839. },
  21840. "error": {
  21841. "$ref": "#/components/schemas/SessionErrorUnknown"
  21842. }
  21843. },
  21844. "required": ["status", "input", "content", "structured", "error"],
  21845. "additionalProperties": false
  21846. },
  21847. "SessionMessageAssistantTool": {
  21848. "type": "object",
  21849. "properties": {
  21850. "type": {
  21851. "type": "string",
  21852. "enum": ["tool"]
  21853. },
  21854. "id": {
  21855. "type": "string"
  21856. },
  21857. "name": {
  21858. "type": "string"
  21859. },
  21860. "provider": {
  21861. "type": "object",
  21862. "properties": {
  21863. "executed": {
  21864. "type": "boolean"
  21865. },
  21866. "metadata": {
  21867. "type": "object"
  21868. }
  21869. },
  21870. "required": ["executed"],
  21871. "additionalProperties": false
  21872. },
  21873. "state": {
  21874. "anyOf": [
  21875. {
  21876. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21877. },
  21878. {
  21879. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21880. },
  21881. {
  21882. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21883. },
  21884. {
  21885. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21886. }
  21887. ]
  21888. },
  21889. "time": {
  21890. "type": "object",
  21891. "properties": {
  21892. "created": {
  21893. "type": "number"
  21894. },
  21895. "ran": {
  21896. "type": "number"
  21897. },
  21898. "completed": {
  21899. "type": "number"
  21900. },
  21901. "pruned": {
  21902. "type": "number"
  21903. }
  21904. },
  21905. "required": ["created"],
  21906. "additionalProperties": false
  21907. }
  21908. },
  21909. "required": ["type", "id", "name", "state", "time"],
  21910. "additionalProperties": false
  21911. },
  21912. "SessionMessageAssistant": {
  21913. "type": "object",
  21914. "properties": {
  21915. "id": {
  21916. "type": "string"
  21917. },
  21918. "metadata": {
  21919. "type": "object"
  21920. },
  21921. "time": {
  21922. "type": "object",
  21923. "properties": {
  21924. "created": {
  21925. "type": "number"
  21926. },
  21927. "completed": {
  21928. "type": "number"
  21929. }
  21930. },
  21931. "required": ["created"],
  21932. "additionalProperties": false
  21933. },
  21934. "type": {
  21935. "type": "string",
  21936. "enum": ["assistant"]
  21937. },
  21938. "agent": {
  21939. "type": "string"
  21940. },
  21941. "model": {
  21942. "type": "object",
  21943. "properties": {
  21944. "id": {
  21945. "type": "string"
  21946. },
  21947. "providerID": {
  21948. "type": "string"
  21949. },
  21950. "variant": {
  21951. "type": "string"
  21952. }
  21953. },
  21954. "required": ["id", "providerID"],
  21955. "additionalProperties": false
  21956. },
  21957. "content": {
  21958. "type": "array",
  21959. "items": {
  21960. "anyOf": [
  21961. {
  21962. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21963. },
  21964. {
  21965. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21966. },
  21967. {
  21968. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21969. }
  21970. ]
  21971. }
  21972. },
  21973. "snapshot": {
  21974. "type": "object",
  21975. "properties": {
  21976. "start": {
  21977. "type": "string"
  21978. },
  21979. "end": {
  21980. "type": "string"
  21981. }
  21982. },
  21983. "additionalProperties": false
  21984. },
  21985. "finish": {
  21986. "type": "string"
  21987. },
  21988. "cost": {
  21989. "type": "number"
  21990. },
  21991. "tokens": {
  21992. "type": "object",
  21993. "properties": {
  21994. "input": {
  21995. "type": "number"
  21996. },
  21997. "output": {
  21998. "type": "number"
  21999. },
  22000. "reasoning": {
  22001. "type": "number"
  22002. },
  22003. "cache": {
  22004. "type": "object",
  22005. "properties": {
  22006. "read": {
  22007. "type": "number"
  22008. },
  22009. "write": {
  22010. "type": "number"
  22011. }
  22012. },
  22013. "required": ["read", "write"],
  22014. "additionalProperties": false
  22015. }
  22016. },
  22017. "required": ["input", "output", "reasoning", "cache"],
  22018. "additionalProperties": false
  22019. },
  22020. "error": {
  22021. "$ref": "#/components/schemas/SessionErrorUnknown"
  22022. }
  22023. },
  22024. "required": ["id", "time", "type", "agent", "model", "content"],
  22025. "additionalProperties": false
  22026. },
  22027. "SessionMessageCompaction": {
  22028. "type": "object",
  22029. "properties": {
  22030. "type": {
  22031. "type": "string",
  22032. "enum": ["compaction"]
  22033. },
  22034. "reason": {
  22035. "type": "string",
  22036. "enum": ["auto", "manual"]
  22037. },
  22038. "summary": {
  22039. "type": "string"
  22040. },
  22041. "include": {
  22042. "type": "string"
  22043. },
  22044. "id": {
  22045. "type": "string"
  22046. },
  22047. "metadata": {
  22048. "type": "object"
  22049. },
  22050. "time": {
  22051. "type": "object",
  22052. "properties": {
  22053. "created": {
  22054. "type": "number"
  22055. }
  22056. },
  22057. "required": ["created"],
  22058. "additionalProperties": false
  22059. }
  22060. },
  22061. "required": ["type", "reason", "summary", "id", "time"],
  22062. "additionalProperties": false
  22063. },
  22064. "SessionMessage": {
  22065. "anyOf": [
  22066. {
  22067. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  22068. },
  22069. {
  22070. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  22071. },
  22072. {
  22073. "$ref": "#/components/schemas/SessionMessageUser"
  22074. },
  22075. {
  22076. "$ref": "#/components/schemas/SessionMessageSynthetic"
  22077. },
  22078. {
  22079. "$ref": "#/components/schemas/SessionMessageShell"
  22080. },
  22081. {
  22082. "$ref": "#/components/schemas/SessionMessageAssistant"
  22083. },
  22084. {
  22085. "$ref": "#/components/schemas/SessionMessageCompaction"
  22086. }
  22087. ]
  22088. },
  22089. "ProviderV2Info": {
  22090. "type": "object",
  22091. "properties": {
  22092. "id": {
  22093. "type": "string"
  22094. },
  22095. "name": {
  22096. "type": "string"
  22097. },
  22098. "enabled": {
  22099. "anyOf": [
  22100. {
  22101. "type": "boolean",
  22102. "enum": [false]
  22103. },
  22104. {
  22105. "type": "object",
  22106. "properties": {
  22107. "via": {
  22108. "type": "string",
  22109. "enum": ["env"]
  22110. },
  22111. "name": {
  22112. "type": "string"
  22113. }
  22114. },
  22115. "required": ["via", "name"],
  22116. "additionalProperties": false
  22117. },
  22118. {
  22119. "type": "object",
  22120. "properties": {
  22121. "via": {
  22122. "type": "string",
  22123. "enum": ["account"]
  22124. },
  22125. "service": {
  22126. "type": "string"
  22127. }
  22128. },
  22129. "required": ["via", "service"],
  22130. "additionalProperties": false
  22131. },
  22132. {
  22133. "type": "object",
  22134. "properties": {
  22135. "via": {
  22136. "type": "string",
  22137. "enum": ["custom"]
  22138. },
  22139. "data": {
  22140. "type": "object"
  22141. }
  22142. },
  22143. "required": ["via", "data"],
  22144. "additionalProperties": false
  22145. }
  22146. ]
  22147. },
  22148. "env": {
  22149. "type": "array",
  22150. "items": {
  22151. "type": "string"
  22152. }
  22153. },
  22154. "api": {
  22155. "anyOf": [
  22156. {
  22157. "type": "object",
  22158. "properties": {
  22159. "type": {
  22160. "type": "string",
  22161. "enum": ["aisdk"]
  22162. },
  22163. "package": {
  22164. "type": "string"
  22165. },
  22166. "url": {
  22167. "type": "string"
  22168. },
  22169. "settings": {
  22170. "type": "object"
  22171. }
  22172. },
  22173. "required": ["type", "package"],
  22174. "additionalProperties": false
  22175. },
  22176. {
  22177. "type": "object",
  22178. "properties": {
  22179. "type": {
  22180. "type": "string",
  22181. "enum": ["native"]
  22182. },
  22183. "url": {
  22184. "type": "string"
  22185. },
  22186. "settings": {
  22187. "type": "object"
  22188. }
  22189. },
  22190. "required": ["type", "settings"],
  22191. "additionalProperties": false
  22192. }
  22193. ]
  22194. },
  22195. "request": {
  22196. "type": "object",
  22197. "properties": {
  22198. "headers": {
  22199. "type": "object",
  22200. "additionalProperties": {
  22201. "type": "string"
  22202. }
  22203. },
  22204. "body": {
  22205. "type": "object"
  22206. }
  22207. },
  22208. "required": ["headers", "body"],
  22209. "additionalProperties": false
  22210. }
  22211. },
  22212. "required": ["id", "name", "enabled", "env", "api", "request"],
  22213. "additionalProperties": false
  22214. },
  22215. "PermissionV2Request": {
  22216. "type": "object",
  22217. "properties": {
  22218. "id": {
  22219. "type": "string",
  22220. "pattern": "^per"
  22221. },
  22222. "sessionID": {
  22223. "type": "string",
  22224. "pattern": "^ses"
  22225. },
  22226. "action": {
  22227. "type": "string"
  22228. },
  22229. "resources": {
  22230. "type": "array",
  22231. "items": {
  22232. "type": "string"
  22233. }
  22234. },
  22235. "save": {
  22236. "type": "array",
  22237. "items": {
  22238. "type": "string"
  22239. }
  22240. },
  22241. "metadata": {
  22242. "type": "object"
  22243. },
  22244. "source": {
  22245. "$ref": "#/components/schemas/PermissionV2Source"
  22246. }
  22247. },
  22248. "required": ["id", "sessionID", "action", "resources"],
  22249. "additionalProperties": false
  22250. },
  22251. "PermissionSavedInfo": {
  22252. "type": "object",
  22253. "properties": {
  22254. "id": {
  22255. "type": "string"
  22256. },
  22257. "projectID": {
  22258. "type": "string"
  22259. },
  22260. "action": {
  22261. "type": "string"
  22262. },
  22263. "resource": {
  22264. "type": "string"
  22265. }
  22266. },
  22267. "required": ["id", "projectID", "action", "resource"],
  22268. "additionalProperties": false
  22269. },
  22270. "LocationFileSystemTextContent": {
  22271. "type": "object",
  22272. "properties": {
  22273. "type": {
  22274. "type": "string",
  22275. "enum": ["text"]
  22276. },
  22277. "content": {
  22278. "type": "string"
  22279. },
  22280. "mime": {
  22281. "type": "string"
  22282. }
  22283. },
  22284. "required": ["type", "content", "mime"],
  22285. "additionalProperties": false
  22286. },
  22287. "LocationFileSystemBinaryContent": {
  22288. "type": "object",
  22289. "properties": {
  22290. "type": {
  22291. "type": "string",
  22292. "enum": ["binary"]
  22293. },
  22294. "content": {
  22295. "type": "string"
  22296. },
  22297. "encoding": {
  22298. "type": "string",
  22299. "enum": ["base64"]
  22300. },
  22301. "mime": {
  22302. "type": "string"
  22303. }
  22304. },
  22305. "required": ["type", "content", "encoding", "mime"],
  22306. "additionalProperties": false
  22307. },
  22308. "LocationFileSystemEntry": {
  22309. "type": "object",
  22310. "properties": {
  22311. "path": {
  22312. "type": "string"
  22313. },
  22314. "uri": {
  22315. "type": "string"
  22316. },
  22317. "type": {
  22318. "type": "string",
  22319. "enum": ["file", "directory"]
  22320. },
  22321. "mime": {
  22322. "type": "string"
  22323. }
  22324. },
  22325. "required": ["path", "uri", "type", "mime"],
  22326. "additionalProperties": false
  22327. },
  22328. "EventModels-devRefreshed": {
  22329. "type": "object",
  22330. "properties": {
  22331. "id": {
  22332. "type": "string"
  22333. },
  22334. "type": {
  22335. "type": "string",
  22336. "enum": ["models-dev.refreshed"]
  22337. },
  22338. "properties": {
  22339. "type": "object",
  22340. "properties": {}
  22341. }
  22342. },
  22343. "required": ["id", "type", "properties"],
  22344. "additionalProperties": false
  22345. },
  22346. "EventPluginAdded": {
  22347. "type": "object",
  22348. "properties": {
  22349. "id": {
  22350. "type": "string"
  22351. },
  22352. "type": {
  22353. "type": "string",
  22354. "enum": ["plugin.added"]
  22355. },
  22356. "properties": {
  22357. "type": "object",
  22358. "properties": {
  22359. "id": {
  22360. "type": "string"
  22361. }
  22362. },
  22363. "required": ["id"],
  22364. "additionalProperties": false
  22365. }
  22366. },
  22367. "required": ["id", "type", "properties"],
  22368. "additionalProperties": false
  22369. },
  22370. "ModelV2Info1": {
  22371. "type": "object",
  22372. "properties": {
  22373. "id": {
  22374. "type": "string"
  22375. },
  22376. "providerID": {
  22377. "type": "string"
  22378. },
  22379. "family": {
  22380. "type": "string"
  22381. },
  22382. "name": {
  22383. "type": "string"
  22384. },
  22385. "api": {
  22386. "anyOf": [
  22387. {
  22388. "type": "object",
  22389. "properties": {
  22390. "id": {
  22391. "type": "string"
  22392. },
  22393. "type": {
  22394. "type": "string",
  22395. "enum": ["aisdk"]
  22396. },
  22397. "package": {
  22398. "type": "string"
  22399. },
  22400. "url": {
  22401. "type": "string"
  22402. },
  22403. "settings": {
  22404. "type": "object"
  22405. }
  22406. },
  22407. "required": ["id", "type", "package"],
  22408. "additionalProperties": false
  22409. },
  22410. {
  22411. "type": "object",
  22412. "properties": {
  22413. "id": {
  22414. "type": "string"
  22415. },
  22416. "type": {
  22417. "type": "string",
  22418. "enum": ["native"]
  22419. },
  22420. "url": {
  22421. "type": "string"
  22422. },
  22423. "settings": {
  22424. "type": "object"
  22425. }
  22426. },
  22427. "required": ["id", "type", "settings"],
  22428. "additionalProperties": false
  22429. }
  22430. ]
  22431. },
  22432. "capabilities": {
  22433. "type": "object",
  22434. "properties": {
  22435. "tools": {
  22436. "type": "boolean"
  22437. },
  22438. "input": {
  22439. "type": "array",
  22440. "items": {
  22441. "type": "string"
  22442. }
  22443. },
  22444. "output": {
  22445. "type": "array",
  22446. "items": {
  22447. "type": "string"
  22448. }
  22449. }
  22450. },
  22451. "required": ["tools", "input", "output"],
  22452. "additionalProperties": false
  22453. },
  22454. "request": {
  22455. "type": "object",
  22456. "properties": {
  22457. "headers": {
  22458. "type": "object",
  22459. "additionalProperties": {
  22460. "type": "string"
  22461. }
  22462. },
  22463. "body": {
  22464. "type": "object"
  22465. },
  22466. "variant": {
  22467. "type": "string"
  22468. }
  22469. },
  22470. "required": ["headers", "body"],
  22471. "additionalProperties": false
  22472. },
  22473. "variants": {
  22474. "type": "array",
  22475. "items": {
  22476. "type": "object",
  22477. "properties": {
  22478. "id": {
  22479. "type": "string"
  22480. },
  22481. "headers": {
  22482. "type": "object",
  22483. "additionalProperties": {
  22484. "type": "string"
  22485. }
  22486. },
  22487. "body": {
  22488. "type": "object"
  22489. }
  22490. },
  22491. "required": ["id", "headers", "body"],
  22492. "additionalProperties": false
  22493. }
  22494. },
  22495. "time": {
  22496. "type": "object",
  22497. "properties": {
  22498. "released": {
  22499. "anyOf": [
  22500. {
  22501. "type": "number"
  22502. },
  22503. {
  22504. "type": "string",
  22505. "enum": ["NaN"]
  22506. },
  22507. {
  22508. "type": "string",
  22509. "enum": ["Infinity"]
  22510. },
  22511. {
  22512. "type": "string",
  22513. "enum": ["-Infinity"]
  22514. }
  22515. ]
  22516. }
  22517. },
  22518. "required": ["released"],
  22519. "additionalProperties": false
  22520. },
  22521. "cost": {
  22522. "type": "array",
  22523. "items": {
  22524. "type": "object",
  22525. "properties": {
  22526. "tier": {
  22527. "type": "object",
  22528. "properties": {
  22529. "type": {
  22530. "type": "string",
  22531. "enum": ["context"]
  22532. },
  22533. "size": {
  22534. "type": "integer"
  22535. }
  22536. },
  22537. "required": ["type", "size"],
  22538. "additionalProperties": false
  22539. },
  22540. "input": {
  22541. "type": "number"
  22542. },
  22543. "output": {
  22544. "type": "number"
  22545. },
  22546. "cache": {
  22547. "type": "object",
  22548. "properties": {
  22549. "read": {
  22550. "type": "number"
  22551. },
  22552. "write": {
  22553. "type": "number"
  22554. }
  22555. },
  22556. "required": ["read", "write"],
  22557. "additionalProperties": false
  22558. }
  22559. },
  22560. "required": ["input", "output", "cache"],
  22561. "additionalProperties": false
  22562. }
  22563. },
  22564. "status": {
  22565. "type": "string",
  22566. "enum": ["alpha", "beta", "deprecated", "active"]
  22567. },
  22568. "enabled": {
  22569. "type": "boolean"
  22570. },
  22571. "limit": {
  22572. "type": "object",
  22573. "properties": {
  22574. "context": {
  22575. "type": "integer"
  22576. },
  22577. "input": {
  22578. "type": "integer"
  22579. },
  22580. "output": {
  22581. "type": "integer"
  22582. }
  22583. },
  22584. "required": ["context", "output"],
  22585. "additionalProperties": false
  22586. }
  22587. },
  22588. "required": [
  22589. "id",
  22590. "providerID",
  22591. "name",
  22592. "api",
  22593. "capabilities",
  22594. "request",
  22595. "variants",
  22596. "time",
  22597. "cost",
  22598. "status",
  22599. "enabled",
  22600. "limit"
  22601. ],
  22602. "additionalProperties": false
  22603. },
  22604. "EventCatalogModelUpdated": {
  22605. "type": "object",
  22606. "properties": {
  22607. "id": {
  22608. "type": "string"
  22609. },
  22610. "type": {
  22611. "type": "string",
  22612. "enum": ["catalog.model.updated"]
  22613. },
  22614. "properties": {
  22615. "type": "object",
  22616. "properties": {
  22617. "model": {
  22618. "$ref": "#/components/schemas/ModelV2Info1"
  22619. }
  22620. },
  22621. "required": ["model"],
  22622. "additionalProperties": false
  22623. }
  22624. },
  22625. "required": ["id", "type", "properties"],
  22626. "additionalProperties": false
  22627. },
  22628. "EventSessionCreated": {
  22629. "type": "object",
  22630. "properties": {
  22631. "id": {
  22632. "type": "string"
  22633. },
  22634. "type": {
  22635. "type": "string",
  22636. "enum": ["session.created"]
  22637. },
  22638. "properties": {
  22639. "type": "object",
  22640. "properties": {
  22641. "sessionID": {
  22642. "type": "string",
  22643. "pattern": "^ses"
  22644. },
  22645. "info": {
  22646. "$ref": "#/components/schemas/Session"
  22647. }
  22648. },
  22649. "required": ["sessionID", "info"],
  22650. "additionalProperties": false
  22651. }
  22652. },
  22653. "required": ["id", "type", "properties"],
  22654. "additionalProperties": false
  22655. },
  22656. "EventSessionUpdated": {
  22657. "type": "object",
  22658. "properties": {
  22659. "id": {
  22660. "type": "string"
  22661. },
  22662. "type": {
  22663. "type": "string",
  22664. "enum": ["session.updated"]
  22665. },
  22666. "properties": {
  22667. "type": "object",
  22668. "properties": {
  22669. "sessionID": {
  22670. "type": "string",
  22671. "pattern": "^ses"
  22672. },
  22673. "info": {
  22674. "$ref": "#/components/schemas/Session"
  22675. }
  22676. },
  22677. "required": ["sessionID", "info"],
  22678. "additionalProperties": false
  22679. }
  22680. },
  22681. "required": ["id", "type", "properties"],
  22682. "additionalProperties": false
  22683. },
  22684. "EventSessionDeleted": {
  22685. "type": "object",
  22686. "properties": {
  22687. "id": {
  22688. "type": "string"
  22689. },
  22690. "type": {
  22691. "type": "string",
  22692. "enum": ["session.deleted"]
  22693. },
  22694. "properties": {
  22695. "type": "object",
  22696. "properties": {
  22697. "sessionID": {
  22698. "type": "string",
  22699. "pattern": "^ses"
  22700. },
  22701. "info": {
  22702. "$ref": "#/components/schemas/Session"
  22703. }
  22704. },
  22705. "required": ["sessionID", "info"],
  22706. "additionalProperties": false
  22707. }
  22708. },
  22709. "required": ["id", "type", "properties"],
  22710. "additionalProperties": false
  22711. },
  22712. "EventMessageUpdated": {
  22713. "type": "object",
  22714. "properties": {
  22715. "id": {
  22716. "type": "string"
  22717. },
  22718. "type": {
  22719. "type": "string",
  22720. "enum": ["message.updated"]
  22721. },
  22722. "properties": {
  22723. "type": "object",
  22724. "properties": {
  22725. "sessionID": {
  22726. "type": "string",
  22727. "pattern": "^ses"
  22728. },
  22729. "info": {
  22730. "$ref": "#/components/schemas/Message"
  22731. }
  22732. },
  22733. "required": ["sessionID", "info"],
  22734. "additionalProperties": false
  22735. }
  22736. },
  22737. "required": ["id", "type", "properties"],
  22738. "additionalProperties": false
  22739. },
  22740. "EventMessageRemoved": {
  22741. "type": "object",
  22742. "properties": {
  22743. "id": {
  22744. "type": "string"
  22745. },
  22746. "type": {
  22747. "type": "string",
  22748. "enum": ["message.removed"]
  22749. },
  22750. "properties": {
  22751. "type": "object",
  22752. "properties": {
  22753. "sessionID": {
  22754. "type": "string",
  22755. "pattern": "^ses"
  22756. },
  22757. "messageID": {
  22758. "type": "string",
  22759. "pattern": "^msg"
  22760. }
  22761. },
  22762. "required": ["sessionID", "messageID"],
  22763. "additionalProperties": false
  22764. }
  22765. },
  22766. "required": ["id", "type", "properties"],
  22767. "additionalProperties": false
  22768. },
  22769. "EventMessagePartUpdated": {
  22770. "type": "object",
  22771. "properties": {
  22772. "id": {
  22773. "type": "string"
  22774. },
  22775. "type": {
  22776. "type": "string",
  22777. "enum": ["message.part.updated"]
  22778. },
  22779. "properties": {
  22780. "type": "object",
  22781. "properties": {
  22782. "sessionID": {
  22783. "type": "string",
  22784. "pattern": "^ses"
  22785. },
  22786. "part": {
  22787. "$ref": "#/components/schemas/Part"
  22788. },
  22789. "time": {
  22790. "type": "number"
  22791. }
  22792. },
  22793. "required": ["sessionID", "part", "time"],
  22794. "additionalProperties": false
  22795. }
  22796. },
  22797. "required": ["id", "type", "properties"],
  22798. "additionalProperties": false
  22799. },
  22800. "EventMessagePartRemoved": {
  22801. "type": "object",
  22802. "properties": {
  22803. "id": {
  22804. "type": "string"
  22805. },
  22806. "type": {
  22807. "type": "string",
  22808. "enum": ["message.part.removed"]
  22809. },
  22810. "properties": {
  22811. "type": "object",
  22812. "properties": {
  22813. "sessionID": {
  22814. "type": "string",
  22815. "pattern": "^ses"
  22816. },
  22817. "messageID": {
  22818. "type": "string",
  22819. "pattern": "^msg"
  22820. },
  22821. "partID": {
  22822. "type": "string",
  22823. "pattern": "^prt"
  22824. }
  22825. },
  22826. "required": ["sessionID", "messageID", "partID"],
  22827. "additionalProperties": false
  22828. }
  22829. },
  22830. "required": ["id", "type", "properties"],
  22831. "additionalProperties": false
  22832. },
  22833. "EventSessionNextAgentSwitched": {
  22834. "type": "object",
  22835. "properties": {
  22836. "id": {
  22837. "type": "string"
  22838. },
  22839. "type": {
  22840. "type": "string",
  22841. "enum": ["session.next.agent.switched"]
  22842. },
  22843. "properties": {
  22844. "type": "object",
  22845. "properties": {
  22846. "timestamp": {
  22847. "type": "number"
  22848. },
  22849. "sessionID": {
  22850. "type": "string",
  22851. "pattern": "^ses"
  22852. },
  22853. "agent": {
  22854. "type": "string"
  22855. }
  22856. },
  22857. "required": ["timestamp", "sessionID", "agent"],
  22858. "additionalProperties": false
  22859. }
  22860. },
  22861. "required": ["id", "type", "properties"],
  22862. "additionalProperties": false
  22863. },
  22864. "EventSessionNextModelSwitched": {
  22865. "type": "object",
  22866. "properties": {
  22867. "id": {
  22868. "type": "string"
  22869. },
  22870. "type": {
  22871. "type": "string",
  22872. "enum": ["session.next.model.switched"]
  22873. },
  22874. "properties": {
  22875. "type": "object",
  22876. "properties": {
  22877. "timestamp": {
  22878. "type": "number"
  22879. },
  22880. "sessionID": {
  22881. "type": "string",
  22882. "pattern": "^ses"
  22883. },
  22884. "model": {
  22885. "type": "object",
  22886. "properties": {
  22887. "id": {
  22888. "type": "string"
  22889. },
  22890. "providerID": {
  22891. "type": "string"
  22892. },
  22893. "variant": {
  22894. "type": "string"
  22895. }
  22896. },
  22897. "required": ["id", "providerID"],
  22898. "additionalProperties": false
  22899. }
  22900. },
  22901. "required": ["timestamp", "sessionID", "model"],
  22902. "additionalProperties": false
  22903. }
  22904. },
  22905. "required": ["id", "type", "properties"],
  22906. "additionalProperties": false
  22907. },
  22908. "EventSessionNextPrompted": {
  22909. "type": "object",
  22910. "properties": {
  22911. "id": {
  22912. "type": "string"
  22913. },
  22914. "type": {
  22915. "type": "string",
  22916. "enum": ["session.next.prompted"]
  22917. },
  22918. "properties": {
  22919. "type": "object",
  22920. "properties": {
  22921. "timestamp": {
  22922. "type": "number"
  22923. },
  22924. "sessionID": {
  22925. "type": "string",
  22926. "pattern": "^ses"
  22927. },
  22928. "prompt": {
  22929. "$ref": "#/components/schemas/Prompt"
  22930. }
  22931. },
  22932. "required": ["timestamp", "sessionID", "prompt"],
  22933. "additionalProperties": false
  22934. }
  22935. },
  22936. "required": ["id", "type", "properties"],
  22937. "additionalProperties": false
  22938. },
  22939. "EventSessionNextSynthetic": {
  22940. "type": "object",
  22941. "properties": {
  22942. "id": {
  22943. "type": "string"
  22944. },
  22945. "type": {
  22946. "type": "string",
  22947. "enum": ["session.next.synthetic"]
  22948. },
  22949. "properties": {
  22950. "type": "object",
  22951. "properties": {
  22952. "timestamp": {
  22953. "type": "number"
  22954. },
  22955. "sessionID": {
  22956. "type": "string",
  22957. "pattern": "^ses"
  22958. },
  22959. "text": {
  22960. "type": "string"
  22961. }
  22962. },
  22963. "required": ["timestamp", "sessionID", "text"],
  22964. "additionalProperties": false
  22965. }
  22966. },
  22967. "required": ["id", "type", "properties"],
  22968. "additionalProperties": false
  22969. },
  22970. "EventSessionNextShellStarted": {
  22971. "type": "object",
  22972. "properties": {
  22973. "id": {
  22974. "type": "string"
  22975. },
  22976. "type": {
  22977. "type": "string",
  22978. "enum": ["session.next.shell.started"]
  22979. },
  22980. "properties": {
  22981. "type": "object",
  22982. "properties": {
  22983. "timestamp": {
  22984. "type": "number"
  22985. },
  22986. "sessionID": {
  22987. "type": "string",
  22988. "pattern": "^ses"
  22989. },
  22990. "callID": {
  22991. "type": "string"
  22992. },
  22993. "command": {
  22994. "type": "string"
  22995. }
  22996. },
  22997. "required": ["timestamp", "sessionID", "callID", "command"],
  22998. "additionalProperties": false
  22999. }
  23000. },
  23001. "required": ["id", "type", "properties"],
  23002. "additionalProperties": false
  23003. },
  23004. "EventSessionNextShellEnded": {
  23005. "type": "object",
  23006. "properties": {
  23007. "id": {
  23008. "type": "string"
  23009. },
  23010. "type": {
  23011. "type": "string",
  23012. "enum": ["session.next.shell.ended"]
  23013. },
  23014. "properties": {
  23015. "type": "object",
  23016. "properties": {
  23017. "timestamp": {
  23018. "type": "number"
  23019. },
  23020. "sessionID": {
  23021. "type": "string",
  23022. "pattern": "^ses"
  23023. },
  23024. "callID": {
  23025. "type": "string"
  23026. },
  23027. "output": {
  23028. "type": "string"
  23029. }
  23030. },
  23031. "required": ["timestamp", "sessionID", "callID", "output"],
  23032. "additionalProperties": false
  23033. }
  23034. },
  23035. "required": ["id", "type", "properties"],
  23036. "additionalProperties": false
  23037. },
  23038. "EventSessionNextStepStarted": {
  23039. "type": "object",
  23040. "properties": {
  23041. "id": {
  23042. "type": "string"
  23043. },
  23044. "type": {
  23045. "type": "string",
  23046. "enum": ["session.next.step.started"]
  23047. },
  23048. "properties": {
  23049. "type": "object",
  23050. "properties": {
  23051. "timestamp": {
  23052. "type": "number"
  23053. },
  23054. "sessionID": {
  23055. "type": "string",
  23056. "pattern": "^ses"
  23057. },
  23058. "agent": {
  23059. "type": "string"
  23060. },
  23061. "model": {
  23062. "type": "object",
  23063. "properties": {
  23064. "id": {
  23065. "type": "string"
  23066. },
  23067. "providerID": {
  23068. "type": "string"
  23069. },
  23070. "variant": {
  23071. "type": "string"
  23072. }
  23073. },
  23074. "required": ["id", "providerID"],
  23075. "additionalProperties": false
  23076. },
  23077. "snapshot": {
  23078. "type": "string"
  23079. }
  23080. },
  23081. "required": ["timestamp", "sessionID", "agent", "model"],
  23082. "additionalProperties": false
  23083. }
  23084. },
  23085. "required": ["id", "type", "properties"],
  23086. "additionalProperties": false
  23087. },
  23088. "EventSessionNextStepEnded": {
  23089. "type": "object",
  23090. "properties": {
  23091. "id": {
  23092. "type": "string"
  23093. },
  23094. "type": {
  23095. "type": "string",
  23096. "enum": ["session.next.step.ended"]
  23097. },
  23098. "properties": {
  23099. "type": "object",
  23100. "properties": {
  23101. "timestamp": {
  23102. "type": "number"
  23103. },
  23104. "sessionID": {
  23105. "type": "string",
  23106. "pattern": "^ses"
  23107. },
  23108. "finish": {
  23109. "type": "string"
  23110. },
  23111. "cost": {
  23112. "type": "number"
  23113. },
  23114. "tokens": {
  23115. "type": "object",
  23116. "properties": {
  23117. "input": {
  23118. "type": "number"
  23119. },
  23120. "output": {
  23121. "type": "number"
  23122. },
  23123. "reasoning": {
  23124. "type": "number"
  23125. },
  23126. "cache": {
  23127. "type": "object",
  23128. "properties": {
  23129. "read": {
  23130. "type": "number"
  23131. },
  23132. "write": {
  23133. "type": "number"
  23134. }
  23135. },
  23136. "required": ["read", "write"],
  23137. "additionalProperties": false
  23138. }
  23139. },
  23140. "required": ["input", "output", "reasoning", "cache"],
  23141. "additionalProperties": false
  23142. },
  23143. "snapshot": {
  23144. "type": "string"
  23145. }
  23146. },
  23147. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  23148. "additionalProperties": false
  23149. }
  23150. },
  23151. "required": ["id", "type", "properties"],
  23152. "additionalProperties": false
  23153. },
  23154. "EventSessionNextStepFailed": {
  23155. "type": "object",
  23156. "properties": {
  23157. "id": {
  23158. "type": "string"
  23159. },
  23160. "type": {
  23161. "type": "string",
  23162. "enum": ["session.next.step.failed"]
  23163. },
  23164. "properties": {
  23165. "type": "object",
  23166. "properties": {
  23167. "timestamp": {
  23168. "type": "number"
  23169. },
  23170. "sessionID": {
  23171. "type": "string",
  23172. "pattern": "^ses"
  23173. },
  23174. "error": {
  23175. "$ref": "#/components/schemas/SessionErrorUnknown"
  23176. }
  23177. },
  23178. "required": ["timestamp", "sessionID", "error"],
  23179. "additionalProperties": false
  23180. }
  23181. },
  23182. "required": ["id", "type", "properties"],
  23183. "additionalProperties": false
  23184. },
  23185. "EventSessionNextTextStarted": {
  23186. "type": "object",
  23187. "properties": {
  23188. "id": {
  23189. "type": "string"
  23190. },
  23191. "type": {
  23192. "type": "string",
  23193. "enum": ["session.next.text.started"]
  23194. },
  23195. "properties": {
  23196. "type": "object",
  23197. "properties": {
  23198. "timestamp": {
  23199. "type": "number"
  23200. },
  23201. "sessionID": {
  23202. "type": "string",
  23203. "pattern": "^ses"
  23204. }
  23205. },
  23206. "required": ["timestamp", "sessionID"],
  23207. "additionalProperties": false
  23208. }
  23209. },
  23210. "required": ["id", "type", "properties"],
  23211. "additionalProperties": false
  23212. },
  23213. "EventSessionNextTextDelta": {
  23214. "type": "object",
  23215. "properties": {
  23216. "id": {
  23217. "type": "string"
  23218. },
  23219. "type": {
  23220. "type": "string",
  23221. "enum": ["session.next.text.delta"]
  23222. },
  23223. "properties": {
  23224. "type": "object",
  23225. "properties": {
  23226. "timestamp": {
  23227. "type": "number"
  23228. },
  23229. "sessionID": {
  23230. "type": "string",
  23231. "pattern": "^ses"
  23232. },
  23233. "delta": {
  23234. "type": "string"
  23235. }
  23236. },
  23237. "required": ["timestamp", "sessionID", "delta"],
  23238. "additionalProperties": false
  23239. }
  23240. },
  23241. "required": ["id", "type", "properties"],
  23242. "additionalProperties": false
  23243. },
  23244. "EventSessionNextTextEnded": {
  23245. "type": "object",
  23246. "properties": {
  23247. "id": {
  23248. "type": "string"
  23249. },
  23250. "type": {
  23251. "type": "string",
  23252. "enum": ["session.next.text.ended"]
  23253. },
  23254. "properties": {
  23255. "type": "object",
  23256. "properties": {
  23257. "timestamp": {
  23258. "type": "number"
  23259. },
  23260. "sessionID": {
  23261. "type": "string",
  23262. "pattern": "^ses"
  23263. },
  23264. "text": {
  23265. "type": "string"
  23266. }
  23267. },
  23268. "required": ["timestamp", "sessionID", "text"],
  23269. "additionalProperties": false
  23270. }
  23271. },
  23272. "required": ["id", "type", "properties"],
  23273. "additionalProperties": false
  23274. },
  23275. "EventSessionNextReasoningStarted": {
  23276. "type": "object",
  23277. "properties": {
  23278. "id": {
  23279. "type": "string"
  23280. },
  23281. "type": {
  23282. "type": "string",
  23283. "enum": ["session.next.reasoning.started"]
  23284. },
  23285. "properties": {
  23286. "type": "object",
  23287. "properties": {
  23288. "timestamp": {
  23289. "type": "number"
  23290. },
  23291. "sessionID": {
  23292. "type": "string",
  23293. "pattern": "^ses"
  23294. },
  23295. "reasoningID": {
  23296. "type": "string"
  23297. }
  23298. },
  23299. "required": ["timestamp", "sessionID", "reasoningID"],
  23300. "additionalProperties": false
  23301. }
  23302. },
  23303. "required": ["id", "type", "properties"],
  23304. "additionalProperties": false
  23305. },
  23306. "EventSessionNextReasoningDelta": {
  23307. "type": "object",
  23308. "properties": {
  23309. "id": {
  23310. "type": "string"
  23311. },
  23312. "type": {
  23313. "type": "string",
  23314. "enum": ["session.next.reasoning.delta"]
  23315. },
  23316. "properties": {
  23317. "type": "object",
  23318. "properties": {
  23319. "timestamp": {
  23320. "type": "number"
  23321. },
  23322. "sessionID": {
  23323. "type": "string",
  23324. "pattern": "^ses"
  23325. },
  23326. "reasoningID": {
  23327. "type": "string"
  23328. },
  23329. "delta": {
  23330. "type": "string"
  23331. }
  23332. },
  23333. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  23334. "additionalProperties": false
  23335. }
  23336. },
  23337. "required": ["id", "type", "properties"],
  23338. "additionalProperties": false
  23339. },
  23340. "EventSessionNextReasoningEnded": {
  23341. "type": "object",
  23342. "properties": {
  23343. "id": {
  23344. "type": "string"
  23345. },
  23346. "type": {
  23347. "type": "string",
  23348. "enum": ["session.next.reasoning.ended"]
  23349. },
  23350. "properties": {
  23351. "type": "object",
  23352. "properties": {
  23353. "timestamp": {
  23354. "type": "number"
  23355. },
  23356. "sessionID": {
  23357. "type": "string",
  23358. "pattern": "^ses"
  23359. },
  23360. "reasoningID": {
  23361. "type": "string"
  23362. },
  23363. "text": {
  23364. "type": "string"
  23365. }
  23366. },
  23367. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  23368. "additionalProperties": false
  23369. }
  23370. },
  23371. "required": ["id", "type", "properties"],
  23372. "additionalProperties": false
  23373. },
  23374. "EventSessionNextToolInputStarted": {
  23375. "type": "object",
  23376. "properties": {
  23377. "id": {
  23378. "type": "string"
  23379. },
  23380. "type": {
  23381. "type": "string",
  23382. "enum": ["session.next.tool.input.started"]
  23383. },
  23384. "properties": {
  23385. "type": "object",
  23386. "properties": {
  23387. "timestamp": {
  23388. "type": "number"
  23389. },
  23390. "sessionID": {
  23391. "type": "string",
  23392. "pattern": "^ses"
  23393. },
  23394. "callID": {
  23395. "type": "string"
  23396. },
  23397. "name": {
  23398. "type": "string"
  23399. }
  23400. },
  23401. "required": ["timestamp", "sessionID", "callID", "name"],
  23402. "additionalProperties": false
  23403. }
  23404. },
  23405. "required": ["id", "type", "properties"],
  23406. "additionalProperties": false
  23407. },
  23408. "EventSessionNextToolInputDelta": {
  23409. "type": "object",
  23410. "properties": {
  23411. "id": {
  23412. "type": "string"
  23413. },
  23414. "type": {
  23415. "type": "string",
  23416. "enum": ["session.next.tool.input.delta"]
  23417. },
  23418. "properties": {
  23419. "type": "object",
  23420. "properties": {
  23421. "timestamp": {
  23422. "type": "number"
  23423. },
  23424. "sessionID": {
  23425. "type": "string",
  23426. "pattern": "^ses"
  23427. },
  23428. "callID": {
  23429. "type": "string"
  23430. },
  23431. "delta": {
  23432. "type": "string"
  23433. }
  23434. },
  23435. "required": ["timestamp", "sessionID", "callID", "delta"],
  23436. "additionalProperties": false
  23437. }
  23438. },
  23439. "required": ["id", "type", "properties"],
  23440. "additionalProperties": false
  23441. },
  23442. "EventSessionNextToolInputEnded": {
  23443. "type": "object",
  23444. "properties": {
  23445. "id": {
  23446. "type": "string"
  23447. },
  23448. "type": {
  23449. "type": "string",
  23450. "enum": ["session.next.tool.input.ended"]
  23451. },
  23452. "properties": {
  23453. "type": "object",
  23454. "properties": {
  23455. "timestamp": {
  23456. "type": "number"
  23457. },
  23458. "sessionID": {
  23459. "type": "string",
  23460. "pattern": "^ses"
  23461. },
  23462. "callID": {
  23463. "type": "string"
  23464. },
  23465. "text": {
  23466. "type": "string"
  23467. }
  23468. },
  23469. "required": ["timestamp", "sessionID", "callID", "text"],
  23470. "additionalProperties": false
  23471. }
  23472. },
  23473. "required": ["id", "type", "properties"],
  23474. "additionalProperties": false
  23475. },
  23476. "EventSessionNextToolCalled": {
  23477. "type": "object",
  23478. "properties": {
  23479. "id": {
  23480. "type": "string"
  23481. },
  23482. "type": {
  23483. "type": "string",
  23484. "enum": ["session.next.tool.called"]
  23485. },
  23486. "properties": {
  23487. "type": "object",
  23488. "properties": {
  23489. "timestamp": {
  23490. "type": "number"
  23491. },
  23492. "sessionID": {
  23493. "type": "string",
  23494. "pattern": "^ses"
  23495. },
  23496. "callID": {
  23497. "type": "string"
  23498. },
  23499. "tool": {
  23500. "type": "string"
  23501. },
  23502. "input": {
  23503. "type": "object"
  23504. },
  23505. "provider": {
  23506. "type": "object",
  23507. "properties": {
  23508. "executed": {
  23509. "type": "boolean"
  23510. },
  23511. "metadata": {
  23512. "type": "object"
  23513. }
  23514. },
  23515. "required": ["executed"],
  23516. "additionalProperties": false
  23517. }
  23518. },
  23519. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  23520. "additionalProperties": false
  23521. }
  23522. },
  23523. "required": ["id", "type", "properties"],
  23524. "additionalProperties": false
  23525. },
  23526. "EventSessionNextToolProgress": {
  23527. "type": "object",
  23528. "properties": {
  23529. "id": {
  23530. "type": "string"
  23531. },
  23532. "type": {
  23533. "type": "string",
  23534. "enum": ["session.next.tool.progress"]
  23535. },
  23536. "properties": {
  23537. "type": "object",
  23538. "properties": {
  23539. "timestamp": {
  23540. "type": "number"
  23541. },
  23542. "sessionID": {
  23543. "type": "string",
  23544. "pattern": "^ses"
  23545. },
  23546. "callID": {
  23547. "type": "string"
  23548. },
  23549. "structured": {
  23550. "type": "object"
  23551. },
  23552. "content": {
  23553. "type": "array",
  23554. "items": {
  23555. "anyOf": [
  23556. {
  23557. "$ref": "#/components/schemas/ToolTextContent"
  23558. },
  23559. {
  23560. "$ref": "#/components/schemas/ToolFileContent"
  23561. }
  23562. ]
  23563. }
  23564. }
  23565. },
  23566. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  23567. "additionalProperties": false
  23568. }
  23569. },
  23570. "required": ["id", "type", "properties"],
  23571. "additionalProperties": false
  23572. },
  23573. "EventSessionNextToolSuccess": {
  23574. "type": "object",
  23575. "properties": {
  23576. "id": {
  23577. "type": "string"
  23578. },
  23579. "type": {
  23580. "type": "string",
  23581. "enum": ["session.next.tool.success"]
  23582. },
  23583. "properties": {
  23584. "type": "object",
  23585. "properties": {
  23586. "timestamp": {
  23587. "type": "number"
  23588. },
  23589. "sessionID": {
  23590. "type": "string",
  23591. "pattern": "^ses"
  23592. },
  23593. "callID": {
  23594. "type": "string"
  23595. },
  23596. "structured": {
  23597. "type": "object"
  23598. },
  23599. "content": {
  23600. "type": "array",
  23601. "items": {
  23602. "anyOf": [
  23603. {
  23604. "$ref": "#/components/schemas/ToolTextContent"
  23605. },
  23606. {
  23607. "$ref": "#/components/schemas/ToolFileContent"
  23608. }
  23609. ]
  23610. }
  23611. },
  23612. "provider": {
  23613. "type": "object",
  23614. "properties": {
  23615. "executed": {
  23616. "type": "boolean"
  23617. },
  23618. "metadata": {
  23619. "type": "object"
  23620. }
  23621. },
  23622. "required": ["executed"],
  23623. "additionalProperties": false
  23624. }
  23625. },
  23626. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  23627. "additionalProperties": false
  23628. }
  23629. },
  23630. "required": ["id", "type", "properties"],
  23631. "additionalProperties": false
  23632. },
  23633. "EventSessionNextToolFailed": {
  23634. "type": "object",
  23635. "properties": {
  23636. "id": {
  23637. "type": "string"
  23638. },
  23639. "type": {
  23640. "type": "string",
  23641. "enum": ["session.next.tool.failed"]
  23642. },
  23643. "properties": {
  23644. "type": "object",
  23645. "properties": {
  23646. "timestamp": {
  23647. "type": "number"
  23648. },
  23649. "sessionID": {
  23650. "type": "string",
  23651. "pattern": "^ses"
  23652. },
  23653. "callID": {
  23654. "type": "string"
  23655. },
  23656. "error": {
  23657. "$ref": "#/components/schemas/SessionErrorUnknown"
  23658. },
  23659. "provider": {
  23660. "type": "object",
  23661. "properties": {
  23662. "executed": {
  23663. "type": "boolean"
  23664. },
  23665. "metadata": {
  23666. "type": "object"
  23667. }
  23668. },
  23669. "required": ["executed"],
  23670. "additionalProperties": false
  23671. }
  23672. },
  23673. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  23674. "additionalProperties": false
  23675. }
  23676. },
  23677. "required": ["id", "type", "properties"],
  23678. "additionalProperties": false
  23679. },
  23680. "EventSessionNextRetried": {
  23681. "type": "object",
  23682. "properties": {
  23683. "id": {
  23684. "type": "string"
  23685. },
  23686. "type": {
  23687. "type": "string",
  23688. "enum": ["session.next.retried"]
  23689. },
  23690. "properties": {
  23691. "type": "object",
  23692. "properties": {
  23693. "timestamp": {
  23694. "type": "number"
  23695. },
  23696. "sessionID": {
  23697. "type": "string",
  23698. "pattern": "^ses"
  23699. },
  23700. "attempt": {
  23701. "type": "number"
  23702. },
  23703. "error": {
  23704. "$ref": "#/components/schemas/SessionNextRetry_error"
  23705. }
  23706. },
  23707. "required": ["timestamp", "sessionID", "attempt", "error"],
  23708. "additionalProperties": false
  23709. }
  23710. },
  23711. "required": ["id", "type", "properties"],
  23712. "additionalProperties": false
  23713. },
  23714. "EventSessionNextCompactionStarted": {
  23715. "type": "object",
  23716. "properties": {
  23717. "id": {
  23718. "type": "string"
  23719. },
  23720. "type": {
  23721. "type": "string",
  23722. "enum": ["session.next.compaction.started"]
  23723. },
  23724. "properties": {
  23725. "type": "object",
  23726. "properties": {
  23727. "timestamp": {
  23728. "type": "number"
  23729. },
  23730. "sessionID": {
  23731. "type": "string",
  23732. "pattern": "^ses"
  23733. },
  23734. "reason": {
  23735. "type": "string",
  23736. "enum": ["auto", "manual"]
  23737. }
  23738. },
  23739. "required": ["timestamp", "sessionID", "reason"],
  23740. "additionalProperties": false
  23741. }
  23742. },
  23743. "required": ["id", "type", "properties"],
  23744. "additionalProperties": false
  23745. },
  23746. "EventSessionNextCompactionDelta": {
  23747. "type": "object",
  23748. "properties": {
  23749. "id": {
  23750. "type": "string"
  23751. },
  23752. "type": {
  23753. "type": "string",
  23754. "enum": ["session.next.compaction.delta"]
  23755. },
  23756. "properties": {
  23757. "type": "object",
  23758. "properties": {
  23759. "timestamp": {
  23760. "type": "number"
  23761. },
  23762. "sessionID": {
  23763. "type": "string",
  23764. "pattern": "^ses"
  23765. },
  23766. "text": {
  23767. "type": "string"
  23768. }
  23769. },
  23770. "required": ["timestamp", "sessionID", "text"],
  23771. "additionalProperties": false
  23772. }
  23773. },
  23774. "required": ["id", "type", "properties"],
  23775. "additionalProperties": false
  23776. },
  23777. "EventSessionNextCompactionEnded": {
  23778. "type": "object",
  23779. "properties": {
  23780. "id": {
  23781. "type": "string"
  23782. },
  23783. "type": {
  23784. "type": "string",
  23785. "enum": ["session.next.compaction.ended"]
  23786. },
  23787. "properties": {
  23788. "type": "object",
  23789. "properties": {
  23790. "timestamp": {
  23791. "type": "number"
  23792. },
  23793. "sessionID": {
  23794. "type": "string",
  23795. "pattern": "^ses"
  23796. },
  23797. "text": {
  23798. "type": "string"
  23799. },
  23800. "include": {
  23801. "type": "string"
  23802. }
  23803. },
  23804. "required": ["timestamp", "sessionID", "text"],
  23805. "additionalProperties": false
  23806. }
  23807. },
  23808. "required": ["id", "type", "properties"],
  23809. "additionalProperties": false
  23810. },
  23811. "EventMessagePartDelta": {
  23812. "type": "object",
  23813. "properties": {
  23814. "id": {
  23815. "type": "string"
  23816. },
  23817. "type": {
  23818. "type": "string",
  23819. "enum": ["message.part.delta"]
  23820. },
  23821. "properties": {
  23822. "type": "object",
  23823. "properties": {
  23824. "sessionID": {
  23825. "type": "string",
  23826. "pattern": "^ses"
  23827. },
  23828. "messageID": {
  23829. "type": "string",
  23830. "pattern": "^msg"
  23831. },
  23832. "partID": {
  23833. "type": "string",
  23834. "pattern": "^prt"
  23835. },
  23836. "field": {
  23837. "type": "string"
  23838. },
  23839. "delta": {
  23840. "type": "string"
  23841. }
  23842. },
  23843. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  23844. "additionalProperties": false
  23845. }
  23846. },
  23847. "required": ["id", "type", "properties"],
  23848. "additionalProperties": false
  23849. },
  23850. "EventSessionDiff": {
  23851. "type": "object",
  23852. "properties": {
  23853. "id": {
  23854. "type": "string"
  23855. },
  23856. "type": {
  23857. "type": "string",
  23858. "enum": ["session.diff"]
  23859. },
  23860. "properties": {
  23861. "type": "object",
  23862. "properties": {
  23863. "sessionID": {
  23864. "type": "string",
  23865. "pattern": "^ses"
  23866. },
  23867. "diff": {
  23868. "type": "array",
  23869. "items": {
  23870. "$ref": "#/components/schemas/SnapshotFileDiff"
  23871. }
  23872. }
  23873. },
  23874. "required": ["sessionID", "diff"],
  23875. "additionalProperties": false
  23876. }
  23877. },
  23878. "required": ["id", "type", "properties"],
  23879. "additionalProperties": false
  23880. },
  23881. "EventSessionError": {
  23882. "type": "object",
  23883. "properties": {
  23884. "id": {
  23885. "type": "string"
  23886. },
  23887. "type": {
  23888. "type": "string",
  23889. "enum": ["session.error"]
  23890. },
  23891. "properties": {
  23892. "type": "object",
  23893. "properties": {
  23894. "sessionID": {
  23895. "type": "string",
  23896. "pattern": "^ses"
  23897. },
  23898. "error": {
  23899. "anyOf": [
  23900. {
  23901. "$ref": "#/components/schemas/ProviderAuthError"
  23902. },
  23903. {
  23904. "$ref": "#/components/schemas/UnknownError"
  23905. },
  23906. {
  23907. "$ref": "#/components/schemas/MessageOutputLengthError"
  23908. },
  23909. {
  23910. "$ref": "#/components/schemas/MessageAbortedError"
  23911. },
  23912. {
  23913. "$ref": "#/components/schemas/StructuredOutputError"
  23914. },
  23915. {
  23916. "$ref": "#/components/schemas/ContextOverflowError"
  23917. },
  23918. {
  23919. "$ref": "#/components/schemas/APIError"
  23920. }
  23921. ]
  23922. }
  23923. },
  23924. "additionalProperties": false
  23925. }
  23926. },
  23927. "required": ["id", "type", "properties"],
  23928. "additionalProperties": false
  23929. },
  23930. "EventInstallationUpdated": {
  23931. "type": "object",
  23932. "properties": {
  23933. "id": {
  23934. "type": "string"
  23935. },
  23936. "type": {
  23937. "type": "string",
  23938. "enum": ["installation.updated"]
  23939. },
  23940. "properties": {
  23941. "type": "object",
  23942. "properties": {
  23943. "version": {
  23944. "type": "string"
  23945. }
  23946. },
  23947. "required": ["version"],
  23948. "additionalProperties": false
  23949. }
  23950. },
  23951. "required": ["id", "type", "properties"],
  23952. "additionalProperties": false
  23953. },
  23954. "EventInstallationUpdate-available": {
  23955. "type": "object",
  23956. "properties": {
  23957. "id": {
  23958. "type": "string"
  23959. },
  23960. "type": {
  23961. "type": "string",
  23962. "enum": ["installation.update-available"]
  23963. },
  23964. "properties": {
  23965. "type": "object",
  23966. "properties": {
  23967. "version": {
  23968. "type": "string"
  23969. }
  23970. },
  23971. "required": ["version"],
  23972. "additionalProperties": false
  23973. }
  23974. },
  23975. "required": ["id", "type", "properties"],
  23976. "additionalProperties": false
  23977. },
  23978. "EventPermissionV2Asked": {
  23979. "type": "object",
  23980. "properties": {
  23981. "id": {
  23982. "type": "string"
  23983. },
  23984. "type": {
  23985. "type": "string",
  23986. "enum": ["permission.v2.asked"]
  23987. },
  23988. "properties": {
  23989. "type": "object",
  23990. "properties": {
  23991. "id": {
  23992. "type": "string",
  23993. "pattern": "^per"
  23994. },
  23995. "sessionID": {
  23996. "type": "string",
  23997. "pattern": "^ses"
  23998. },
  23999. "action": {
  24000. "type": "string"
  24001. },
  24002. "resources": {
  24003. "type": "array",
  24004. "items": {
  24005. "type": "string"
  24006. }
  24007. },
  24008. "save": {
  24009. "type": "array",
  24010. "items": {
  24011. "type": "string"
  24012. }
  24013. },
  24014. "metadata": {
  24015. "type": "object"
  24016. },
  24017. "source": {
  24018. "$ref": "#/components/schemas/PermissionV2Source"
  24019. }
  24020. },
  24021. "required": ["id", "sessionID", "action", "resources"],
  24022. "additionalProperties": false
  24023. }
  24024. },
  24025. "required": ["id", "type", "properties"],
  24026. "additionalProperties": false
  24027. },
  24028. "EventPermissionV2Replied": {
  24029. "type": "object",
  24030. "properties": {
  24031. "id": {
  24032. "type": "string"
  24033. },
  24034. "type": {
  24035. "type": "string",
  24036. "enum": ["permission.v2.replied"]
  24037. },
  24038. "properties": {
  24039. "type": "object",
  24040. "properties": {
  24041. "sessionID": {
  24042. "type": "string",
  24043. "pattern": "^ses"
  24044. },
  24045. "requestID": {
  24046. "type": "string",
  24047. "pattern": "^per"
  24048. },
  24049. "reply": {
  24050. "$ref": "#/components/schemas/PermissionV2Reply"
  24051. }
  24052. },
  24053. "required": ["sessionID", "requestID", "reply"],
  24054. "additionalProperties": false
  24055. }
  24056. },
  24057. "required": ["id", "type", "properties"],
  24058. "additionalProperties": false
  24059. },
  24060. "EventFileEdited": {
  24061. "type": "object",
  24062. "properties": {
  24063. "id": {
  24064. "type": "string"
  24065. },
  24066. "type": {
  24067. "type": "string",
  24068. "enum": ["file.edited"]
  24069. },
  24070. "properties": {
  24071. "type": "object",
  24072. "properties": {
  24073. "file": {
  24074. "type": "string"
  24075. }
  24076. },
  24077. "required": ["file"],
  24078. "additionalProperties": false
  24079. }
  24080. },
  24081. "required": ["id", "type", "properties"],
  24082. "additionalProperties": false
  24083. },
  24084. "EventAccountAdded": {
  24085. "type": "object",
  24086. "properties": {
  24087. "id": {
  24088. "type": "string"
  24089. },
  24090. "type": {
  24091. "type": "string",
  24092. "enum": ["account.added"]
  24093. },
  24094. "properties": {
  24095. "type": "object",
  24096. "properties": {
  24097. "account": {
  24098. "$ref": "#/components/schemas/AuthInfo"
  24099. }
  24100. },
  24101. "required": ["account"],
  24102. "additionalProperties": false
  24103. }
  24104. },
  24105. "required": ["id", "type", "properties"],
  24106. "additionalProperties": false
  24107. },
  24108. "EventAccountRemoved": {
  24109. "type": "object",
  24110. "properties": {
  24111. "id": {
  24112. "type": "string"
  24113. },
  24114. "type": {
  24115. "type": "string",
  24116. "enum": ["account.removed"]
  24117. },
  24118. "properties": {
  24119. "type": "object",
  24120. "properties": {
  24121. "account": {
  24122. "$ref": "#/components/schemas/AuthInfo"
  24123. }
  24124. },
  24125. "required": ["account"],
  24126. "additionalProperties": false
  24127. }
  24128. },
  24129. "required": ["id", "type", "properties"],
  24130. "additionalProperties": false
  24131. },
  24132. "EventAccountSwitched": {
  24133. "type": "object",
  24134. "properties": {
  24135. "id": {
  24136. "type": "string"
  24137. },
  24138. "type": {
  24139. "type": "string",
  24140. "enum": ["account.switched"]
  24141. },
  24142. "properties": {
  24143. "type": "object",
  24144. "properties": {
  24145. "serviceID": {
  24146. "type": "string"
  24147. },
  24148. "from": {
  24149. "type": "string"
  24150. },
  24151. "to": {
  24152. "type": "string"
  24153. }
  24154. },
  24155. "required": ["serviceID"],
  24156. "additionalProperties": false
  24157. }
  24158. },
  24159. "required": ["id", "type", "properties"],
  24160. "additionalProperties": false
  24161. },
  24162. "EventFileWatcherUpdated": {
  24163. "type": "object",
  24164. "properties": {
  24165. "id": {
  24166. "type": "string"
  24167. },
  24168. "type": {
  24169. "type": "string",
  24170. "enum": ["file.watcher.updated"]
  24171. },
  24172. "properties": {
  24173. "type": "object",
  24174. "properties": {
  24175. "file": {
  24176. "type": "string"
  24177. },
  24178. "event": {
  24179. "type": "string",
  24180. "enum": ["add", "change", "unlink"]
  24181. }
  24182. },
  24183. "required": ["file", "event"],
  24184. "additionalProperties": false
  24185. }
  24186. },
  24187. "required": ["id", "type", "properties"],
  24188. "additionalProperties": false
  24189. },
  24190. "EventPtyCreated": {
  24191. "type": "object",
  24192. "properties": {
  24193. "id": {
  24194. "type": "string"
  24195. },
  24196. "type": {
  24197. "type": "string",
  24198. "enum": ["pty.created"]
  24199. },
  24200. "properties": {
  24201. "type": "object",
  24202. "properties": {
  24203. "info": {
  24204. "$ref": "#/components/schemas/Pty"
  24205. }
  24206. },
  24207. "required": ["info"],
  24208. "additionalProperties": false
  24209. }
  24210. },
  24211. "required": ["id", "type", "properties"],
  24212. "additionalProperties": false
  24213. },
  24214. "EventPtyUpdated": {
  24215. "type": "object",
  24216. "properties": {
  24217. "id": {
  24218. "type": "string"
  24219. },
  24220. "type": {
  24221. "type": "string",
  24222. "enum": ["pty.updated"]
  24223. },
  24224. "properties": {
  24225. "type": "object",
  24226. "properties": {
  24227. "info": {
  24228. "$ref": "#/components/schemas/Pty"
  24229. }
  24230. },
  24231. "required": ["info"],
  24232. "additionalProperties": false
  24233. }
  24234. },
  24235. "required": ["id", "type", "properties"],
  24236. "additionalProperties": false
  24237. },
  24238. "EventPtyExited": {
  24239. "type": "object",
  24240. "properties": {
  24241. "id": {
  24242. "type": "string"
  24243. },
  24244. "type": {
  24245. "type": "string",
  24246. "enum": ["pty.exited"]
  24247. },
  24248. "properties": {
  24249. "type": "object",
  24250. "properties": {
  24251. "id": {
  24252. "type": "string",
  24253. "pattern": "^pty"
  24254. },
  24255. "exitCode": {
  24256. "type": "integer",
  24257. "minimum": 0
  24258. }
  24259. },
  24260. "required": ["id", "exitCode"],
  24261. "additionalProperties": false
  24262. }
  24263. },
  24264. "required": ["id", "type", "properties"],
  24265. "additionalProperties": false
  24266. },
  24267. "EventPtyDeleted": {
  24268. "type": "object",
  24269. "properties": {
  24270. "id": {
  24271. "type": "string"
  24272. },
  24273. "type": {
  24274. "type": "string",
  24275. "enum": ["pty.deleted"]
  24276. },
  24277. "properties": {
  24278. "type": "object",
  24279. "properties": {
  24280. "id": {
  24281. "type": "string",
  24282. "pattern": "^pty"
  24283. }
  24284. },
  24285. "required": ["id"],
  24286. "additionalProperties": false
  24287. }
  24288. },
  24289. "required": ["id", "type", "properties"],
  24290. "additionalProperties": false
  24291. },
  24292. "EventLspUpdated": {
  24293. "type": "object",
  24294. "properties": {
  24295. "id": {
  24296. "type": "string"
  24297. },
  24298. "type": {
  24299. "type": "string",
  24300. "enum": ["lsp.updated"]
  24301. },
  24302. "properties": {
  24303. "type": "object",
  24304. "properties": {}
  24305. }
  24306. },
  24307. "required": ["id", "type", "properties"],
  24308. "additionalProperties": false
  24309. },
  24310. "EventPermissionAsked": {
  24311. "type": "object",
  24312. "properties": {
  24313. "id": {
  24314. "type": "string"
  24315. },
  24316. "type": {
  24317. "type": "string",
  24318. "enum": ["permission.asked"]
  24319. },
  24320. "properties": {
  24321. "type": "object",
  24322. "properties": {
  24323. "id": {
  24324. "type": "string",
  24325. "pattern": "^per"
  24326. },
  24327. "sessionID": {
  24328. "type": "string",
  24329. "pattern": "^ses"
  24330. },
  24331. "permission": {
  24332. "type": "string"
  24333. },
  24334. "patterns": {
  24335. "type": "array",
  24336. "items": {
  24337. "type": "string"
  24338. }
  24339. },
  24340. "metadata": {
  24341. "type": "object"
  24342. },
  24343. "always": {
  24344. "type": "array",
  24345. "items": {
  24346. "type": "string"
  24347. }
  24348. },
  24349. "tool": {
  24350. "type": "object",
  24351. "properties": {
  24352. "messageID": {
  24353. "type": "string"
  24354. },
  24355. "callID": {
  24356. "type": "string"
  24357. }
  24358. },
  24359. "required": ["messageID", "callID"],
  24360. "additionalProperties": false
  24361. }
  24362. },
  24363. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  24364. "additionalProperties": false
  24365. }
  24366. },
  24367. "required": ["id", "type", "properties"],
  24368. "additionalProperties": false
  24369. },
  24370. "EventPermissionReplied": {
  24371. "type": "object",
  24372. "properties": {
  24373. "id": {
  24374. "type": "string"
  24375. },
  24376. "type": {
  24377. "type": "string",
  24378. "enum": ["permission.replied"]
  24379. },
  24380. "properties": {
  24381. "type": "object",
  24382. "properties": {
  24383. "sessionID": {
  24384. "type": "string",
  24385. "pattern": "^ses"
  24386. },
  24387. "requestID": {
  24388. "type": "string",
  24389. "pattern": "^per"
  24390. },
  24391. "reply": {
  24392. "type": "string",
  24393. "enum": ["once", "always", "reject"]
  24394. }
  24395. },
  24396. "required": ["sessionID", "requestID", "reply"],
  24397. "additionalProperties": false
  24398. }
  24399. },
  24400. "required": ["id", "type", "properties"],
  24401. "additionalProperties": false
  24402. },
  24403. "EventMcpToolsChanged": {
  24404. "type": "object",
  24405. "properties": {
  24406. "id": {
  24407. "type": "string"
  24408. },
  24409. "type": {
  24410. "type": "string",
  24411. "enum": ["mcp.tools.changed"]
  24412. },
  24413. "properties": {
  24414. "type": "object",
  24415. "properties": {
  24416. "server": {
  24417. "type": "string"
  24418. }
  24419. },
  24420. "required": ["server"],
  24421. "additionalProperties": false
  24422. }
  24423. },
  24424. "required": ["id", "type", "properties"],
  24425. "additionalProperties": false
  24426. },
  24427. "EventMcpBrowserOpenFailed": {
  24428. "type": "object",
  24429. "properties": {
  24430. "id": {
  24431. "type": "string"
  24432. },
  24433. "type": {
  24434. "type": "string",
  24435. "enum": ["mcp.browser.open.failed"]
  24436. },
  24437. "properties": {
  24438. "type": "object",
  24439. "properties": {
  24440. "mcpName": {
  24441. "type": "string"
  24442. },
  24443. "url": {
  24444. "type": "string"
  24445. }
  24446. },
  24447. "required": ["mcpName", "url"],
  24448. "additionalProperties": false
  24449. }
  24450. },
  24451. "required": ["id", "type", "properties"],
  24452. "additionalProperties": false
  24453. },
  24454. "EventCommandExecuted": {
  24455. "type": "object",
  24456. "properties": {
  24457. "id": {
  24458. "type": "string"
  24459. },
  24460. "type": {
  24461. "type": "string",
  24462. "enum": ["command.executed"]
  24463. },
  24464. "properties": {
  24465. "type": "object",
  24466. "properties": {
  24467. "name": {
  24468. "type": "string"
  24469. },
  24470. "sessionID": {
  24471. "type": "string",
  24472. "pattern": "^ses"
  24473. },
  24474. "arguments": {
  24475. "type": "string"
  24476. },
  24477. "messageID": {
  24478. "type": "string",
  24479. "pattern": "^msg"
  24480. }
  24481. },
  24482. "required": ["name", "sessionID", "arguments", "messageID"],
  24483. "additionalProperties": false
  24484. }
  24485. },
  24486. "required": ["id", "type", "properties"],
  24487. "additionalProperties": false
  24488. },
  24489. "EventProjectDirectoriesUpdated": {
  24490. "type": "object",
  24491. "properties": {
  24492. "id": {
  24493. "type": "string"
  24494. },
  24495. "type": {
  24496. "type": "string",
  24497. "enum": ["project.directories.updated"]
  24498. },
  24499. "properties": {
  24500. "type": "object",
  24501. "properties": {
  24502. "projectID": {
  24503. "type": "string"
  24504. }
  24505. },
  24506. "required": ["projectID"],
  24507. "additionalProperties": false
  24508. }
  24509. },
  24510. "required": ["id", "type", "properties"],
  24511. "additionalProperties": false
  24512. },
  24513. "EventProjectUpdated": {
  24514. "type": "object",
  24515. "properties": {
  24516. "id": {
  24517. "type": "string"
  24518. },
  24519. "type": {
  24520. "type": "string",
  24521. "enum": ["project.updated"]
  24522. },
  24523. "properties": {
  24524. "type": "object",
  24525. "properties": {
  24526. "id": {
  24527. "type": "string"
  24528. },
  24529. "worktree": {
  24530. "type": "string"
  24531. },
  24532. "vcs": {
  24533. "type": "string",
  24534. "enum": ["git"]
  24535. },
  24536. "name": {
  24537. "type": "string"
  24538. },
  24539. "icon": {
  24540. "type": "object",
  24541. "properties": {
  24542. "url": {
  24543. "type": "string"
  24544. },
  24545. "override": {
  24546. "type": "string"
  24547. },
  24548. "color": {
  24549. "type": "string"
  24550. }
  24551. },
  24552. "additionalProperties": false
  24553. },
  24554. "commands": {
  24555. "type": "object",
  24556. "properties": {
  24557. "start": {
  24558. "type": "string",
  24559. "description": "Startup script to run when creating a new workspace (worktree)"
  24560. }
  24561. },
  24562. "additionalProperties": false
  24563. },
  24564. "time": {
  24565. "type": "object",
  24566. "properties": {
  24567. "created": {
  24568. "type": "integer",
  24569. "minimum": 0
  24570. },
  24571. "updated": {
  24572. "type": "integer",
  24573. "minimum": 0
  24574. },
  24575. "initialized": {
  24576. "type": "integer",
  24577. "minimum": 0
  24578. }
  24579. },
  24580. "required": ["created", "updated"],
  24581. "additionalProperties": false
  24582. },
  24583. "sandboxes": {
  24584. "type": "array",
  24585. "items": {
  24586. "type": "string"
  24587. }
  24588. }
  24589. },
  24590. "required": ["id", "worktree", "time", "sandboxes"],
  24591. "additionalProperties": false
  24592. }
  24593. },
  24594. "required": ["id", "type", "properties"],
  24595. "additionalProperties": false
  24596. },
  24597. "EventQuestionAsked": {
  24598. "type": "object",
  24599. "properties": {
  24600. "id": {
  24601. "type": "string"
  24602. },
  24603. "type": {
  24604. "type": "string",
  24605. "enum": ["question.asked"]
  24606. },
  24607. "properties": {
  24608. "type": "object",
  24609. "properties": {
  24610. "id": {
  24611. "type": "string",
  24612. "pattern": "^que"
  24613. },
  24614. "sessionID": {
  24615. "type": "string",
  24616. "pattern": "^ses"
  24617. },
  24618. "questions": {
  24619. "type": "array",
  24620. "items": {
  24621. "$ref": "#/components/schemas/QuestionInfo"
  24622. },
  24623. "description": "Questions to ask"
  24624. },
  24625. "tool": {
  24626. "$ref": "#/components/schemas/QuestionTool"
  24627. }
  24628. },
  24629. "required": ["id", "sessionID", "questions"],
  24630. "additionalProperties": false
  24631. }
  24632. },
  24633. "required": ["id", "type", "properties"],
  24634. "additionalProperties": false
  24635. },
  24636. "EventQuestionReplied": {
  24637. "type": "object",
  24638. "properties": {
  24639. "id": {
  24640. "type": "string"
  24641. },
  24642. "type": {
  24643. "type": "string",
  24644. "enum": ["question.replied"]
  24645. },
  24646. "properties": {
  24647. "type": "object",
  24648. "properties": {
  24649. "sessionID": {
  24650. "type": "string",
  24651. "pattern": "^ses"
  24652. },
  24653. "requestID": {
  24654. "type": "string",
  24655. "pattern": "^que"
  24656. },
  24657. "answers": {
  24658. "type": "array",
  24659. "items": {
  24660. "$ref": "#/components/schemas/QuestionAnswer"
  24661. }
  24662. }
  24663. },
  24664. "required": ["sessionID", "requestID", "answers"],
  24665. "additionalProperties": false
  24666. }
  24667. },
  24668. "required": ["id", "type", "properties"],
  24669. "additionalProperties": false
  24670. },
  24671. "EventQuestionRejected": {
  24672. "type": "object",
  24673. "properties": {
  24674. "id": {
  24675. "type": "string"
  24676. },
  24677. "type": {
  24678. "type": "string",
  24679. "enum": ["question.rejected"]
  24680. },
  24681. "properties": {
  24682. "type": "object",
  24683. "properties": {
  24684. "sessionID": {
  24685. "type": "string",
  24686. "pattern": "^ses"
  24687. },
  24688. "requestID": {
  24689. "type": "string",
  24690. "pattern": "^que"
  24691. }
  24692. },
  24693. "required": ["sessionID", "requestID"],
  24694. "additionalProperties": false
  24695. }
  24696. },
  24697. "required": ["id", "type", "properties"],
  24698. "additionalProperties": false
  24699. },
  24700. "EventSessionStatus": {
  24701. "type": "object",
  24702. "properties": {
  24703. "id": {
  24704. "type": "string"
  24705. },
  24706. "type": {
  24707. "type": "string",
  24708. "enum": ["session.status"]
  24709. },
  24710. "properties": {
  24711. "type": "object",
  24712. "properties": {
  24713. "sessionID": {
  24714. "type": "string",
  24715. "pattern": "^ses"
  24716. },
  24717. "status": {
  24718. "$ref": "#/components/schemas/SessionStatus"
  24719. }
  24720. },
  24721. "required": ["sessionID", "status"],
  24722. "additionalProperties": false
  24723. }
  24724. },
  24725. "required": ["id", "type", "properties"],
  24726. "additionalProperties": false
  24727. },
  24728. "EventSessionIdle": {
  24729. "type": "object",
  24730. "properties": {
  24731. "id": {
  24732. "type": "string"
  24733. },
  24734. "type": {
  24735. "type": "string",
  24736. "enum": ["session.idle"]
  24737. },
  24738. "properties": {
  24739. "type": "object",
  24740. "properties": {
  24741. "sessionID": {
  24742. "type": "string",
  24743. "pattern": "^ses"
  24744. }
  24745. },
  24746. "required": ["sessionID"],
  24747. "additionalProperties": false
  24748. }
  24749. },
  24750. "required": ["id", "type", "properties"],
  24751. "additionalProperties": false
  24752. },
  24753. "EventSessionCompacted": {
  24754. "type": "object",
  24755. "properties": {
  24756. "id": {
  24757. "type": "string"
  24758. },
  24759. "type": {
  24760. "type": "string",
  24761. "enum": ["session.compacted"]
  24762. },
  24763. "properties": {
  24764. "type": "object",
  24765. "properties": {
  24766. "sessionID": {
  24767. "type": "string",
  24768. "pattern": "^ses"
  24769. }
  24770. },
  24771. "required": ["sessionID"],
  24772. "additionalProperties": false
  24773. }
  24774. },
  24775. "required": ["id", "type", "properties"],
  24776. "additionalProperties": false
  24777. },
  24778. "EventTodoUpdated": {
  24779. "type": "object",
  24780. "properties": {
  24781. "id": {
  24782. "type": "string"
  24783. },
  24784. "type": {
  24785. "type": "string",
  24786. "enum": ["todo.updated"]
  24787. },
  24788. "properties": {
  24789. "type": "object",
  24790. "properties": {
  24791. "sessionID": {
  24792. "type": "string",
  24793. "pattern": "^ses"
  24794. },
  24795. "todos": {
  24796. "type": "array",
  24797. "items": {
  24798. "$ref": "#/components/schemas/Todo"
  24799. }
  24800. }
  24801. },
  24802. "required": ["sessionID", "todos"],
  24803. "additionalProperties": false
  24804. }
  24805. },
  24806. "required": ["id", "type", "properties"],
  24807. "additionalProperties": false
  24808. },
  24809. "EventVcsBranchUpdated": {
  24810. "type": "object",
  24811. "properties": {
  24812. "id": {
  24813. "type": "string"
  24814. },
  24815. "type": {
  24816. "type": "string",
  24817. "enum": ["vcs.branch.updated"]
  24818. },
  24819. "properties": {
  24820. "type": "object",
  24821. "properties": {
  24822. "branch": {
  24823. "type": "string"
  24824. }
  24825. },
  24826. "additionalProperties": false
  24827. }
  24828. },
  24829. "required": ["id", "type", "properties"],
  24830. "additionalProperties": false
  24831. },
  24832. "EventWorktreeReady": {
  24833. "type": "object",
  24834. "properties": {
  24835. "id": {
  24836. "type": "string"
  24837. },
  24838. "type": {
  24839. "type": "string",
  24840. "enum": ["worktree.ready"]
  24841. },
  24842. "properties": {
  24843. "type": "object",
  24844. "properties": {
  24845. "name": {
  24846. "type": "string"
  24847. },
  24848. "branch": {
  24849. "type": "string"
  24850. }
  24851. },
  24852. "required": ["name"],
  24853. "additionalProperties": false
  24854. }
  24855. },
  24856. "required": ["id", "type", "properties"],
  24857. "additionalProperties": false
  24858. },
  24859. "EventWorktreeFailed": {
  24860. "type": "object",
  24861. "properties": {
  24862. "id": {
  24863. "type": "string"
  24864. },
  24865. "type": {
  24866. "type": "string",
  24867. "enum": ["worktree.failed"]
  24868. },
  24869. "properties": {
  24870. "type": "object",
  24871. "properties": {
  24872. "message": {
  24873. "type": "string"
  24874. }
  24875. },
  24876. "required": ["message"],
  24877. "additionalProperties": false
  24878. }
  24879. },
  24880. "required": ["id", "type", "properties"],
  24881. "additionalProperties": false
  24882. },
  24883. "EventWorkspaceReady": {
  24884. "type": "object",
  24885. "properties": {
  24886. "id": {
  24887. "type": "string"
  24888. },
  24889. "type": {
  24890. "type": "string",
  24891. "enum": ["workspace.ready"]
  24892. },
  24893. "properties": {
  24894. "type": "object",
  24895. "properties": {
  24896. "name": {
  24897. "type": "string"
  24898. }
  24899. },
  24900. "required": ["name"],
  24901. "additionalProperties": false
  24902. }
  24903. },
  24904. "required": ["id", "type", "properties"],
  24905. "additionalProperties": false
  24906. },
  24907. "EventWorkspaceFailed": {
  24908. "type": "object",
  24909. "properties": {
  24910. "id": {
  24911. "type": "string"
  24912. },
  24913. "type": {
  24914. "type": "string",
  24915. "enum": ["workspace.failed"]
  24916. },
  24917. "properties": {
  24918. "type": "object",
  24919. "properties": {
  24920. "message": {
  24921. "type": "string"
  24922. }
  24923. },
  24924. "required": ["message"],
  24925. "additionalProperties": false
  24926. }
  24927. },
  24928. "required": ["id", "type", "properties"],
  24929. "additionalProperties": false
  24930. },
  24931. "EventWorkspaceStatus": {
  24932. "type": "object",
  24933. "properties": {
  24934. "id": {
  24935. "type": "string"
  24936. },
  24937. "type": {
  24938. "type": "string",
  24939. "enum": ["workspace.status"]
  24940. },
  24941. "properties": {
  24942. "type": "object",
  24943. "properties": {
  24944. "workspaceID": {
  24945. "type": "string",
  24946. "pattern": "^wrk"
  24947. },
  24948. "status": {
  24949. "type": "string",
  24950. "enum": ["connected", "connecting", "disconnected", "error"]
  24951. }
  24952. },
  24953. "required": ["workspaceID", "status"],
  24954. "additionalProperties": false
  24955. }
  24956. },
  24957. "required": ["id", "type", "properties"],
  24958. "additionalProperties": false
  24959. },
  24960. "EventServerConnected": {
  24961. "type": "object",
  24962. "properties": {
  24963. "id": {
  24964. "type": "string"
  24965. },
  24966. "type": {
  24967. "type": "string",
  24968. "enum": ["server.connected"]
  24969. },
  24970. "properties": {
  24971. "type": "object",
  24972. "properties": {}
  24973. }
  24974. },
  24975. "required": ["id", "type", "properties"],
  24976. "additionalProperties": false
  24977. },
  24978. "EventGlobalDisposed": {
  24979. "type": "object",
  24980. "properties": {
  24981. "id": {
  24982. "type": "string"
  24983. },
  24984. "type": {
  24985. "type": "string",
  24986. "enum": ["global.disposed"]
  24987. },
  24988. "properties": {
  24989. "type": "object",
  24990. "properties": {}
  24991. }
  24992. },
  24993. "required": ["id", "type", "properties"],
  24994. "additionalProperties": false
  24995. },
  24996. "BadRequestError": {
  24997. "type": "object",
  24998. "required": ["name", "data"],
  24999. "properties": {
  25000. "name": {
  25001. "type": "string",
  25002. "enum": ["BadRequest"]
  25003. },
  25004. "data": {
  25005. "type": "object",
  25006. "required": ["message"],
  25007. "properties": {
  25008. "message": {
  25009. "type": "string"
  25010. },
  25011. "kind": {
  25012. "type": "string",
  25013. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  25014. }
  25015. }
  25016. }
  25017. }
  25018. }
  25019. }
  25020. },
  25021. "security": [],
  25022. "tags": [
  25023. {
  25024. "name": "control",
  25025. "description": "Control plane routes."
  25026. },
  25027. {
  25028. "name": "global",
  25029. "description": "Global server routes."
  25030. },
  25031. {
  25032. "name": "event",
  25033. "description": "Instance event stream route."
  25034. },
  25035. {
  25036. "name": "config",
  25037. "description": "Experimental HttpApi config routes."
  25038. },
  25039. {
  25040. "name": "experimental",
  25041. "description": "Experimental HttpApi read-only routes."
  25042. },
  25043. {
  25044. "name": "file",
  25045. "description": "Experimental HttpApi file routes."
  25046. },
  25047. {
  25048. "name": "instance",
  25049. "description": "Experimental HttpApi instance read routes."
  25050. },
  25051. {
  25052. "name": "mcp",
  25053. "description": "Experimental HttpApi MCP routes."
  25054. },
  25055. {
  25056. "name": "project",
  25057. "description": "Experimental HttpApi project routes."
  25058. },
  25059. {
  25060. "name": "projectCopy",
  25061. "description": "Project copy management routes."
  25062. },
  25063. {
  25064. "name": "pty",
  25065. "description": "Experimental HttpApi PTY routes."
  25066. },
  25067. {
  25068. "name": "question",
  25069. "description": "Question routes."
  25070. },
  25071. {
  25072. "name": "permission",
  25073. "description": "Experimental HttpApi permission routes."
  25074. },
  25075. {
  25076. "name": "provider",
  25077. "description": "Experimental HttpApi provider routes."
  25078. },
  25079. {
  25080. "name": "session",
  25081. "description": "Experimental HttpApi session routes."
  25082. },
  25083. {
  25084. "name": "sync",
  25085. "description": "Experimental HttpApi sync routes."
  25086. },
  25087. {
  25088. "name": "v2",
  25089. "description": "Experimental v2 routes."
  25090. },
  25091. {
  25092. "name": "v2 messages",
  25093. "description": "Experimental v2 message routes."
  25094. },
  25095. {
  25096. "name": "v2 models",
  25097. "description": "Experimental v2 model routes."
  25098. },
  25099. {
  25100. "name": "v2 providers",
  25101. "description": "Experimental v2 provider routes."
  25102. },
  25103. {
  25104. "name": "v2 permissions",
  25105. "description": "Experimental v2 permission routes."
  25106. },
  25107. {
  25108. "name": "v2 session permissions",
  25109. "description": "Experimental v2 session permission routes."
  25110. },
  25111. {
  25112. "name": "v2 saved permissions",
  25113. "description": "Experimental v2 saved permission routes."
  25114. },
  25115. {
  25116. "name": "v2 filesystem",
  25117. "description": "Experimental v2 location-scoped filesystem routes."
  25118. },
  25119. {
  25120. "name": "tui",
  25121. "description": "Experimental HttpApi TUI routes."
  25122. },
  25123. {
  25124. "name": "workspace",
  25125. "description": "Experimental HttpApi workspace routes."
  25126. },
  25127. {
  25128. "name": "pty",
  25129. "description": "PTY websocket route."
  25130. }
  25131. ]
  25132. }