openapi.json 709 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379
  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/EventLspUpdated"
  11437. },
  11438. {
  11439. "$ref": "#/components/schemas/EventPermissionAsked"
  11440. },
  11441. {
  11442. "$ref": "#/components/schemas/EventPermissionReplied"
  11443. },
  11444. {
  11445. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11446. },
  11447. {
  11448. "$ref": "#/components/schemas/Event.tui.command.execute"
  11449. },
  11450. {
  11451. "$ref": "#/components/schemas/Event.tui.toast.show"
  11452. },
  11453. {
  11454. "$ref": "#/components/schemas/Event.tui.session.select"
  11455. },
  11456. {
  11457. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11458. },
  11459. {
  11460. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11461. },
  11462. {
  11463. "$ref": "#/components/schemas/EventCommandExecuted"
  11464. },
  11465. {
  11466. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  11467. },
  11468. {
  11469. "$ref": "#/components/schemas/EventProjectUpdated"
  11470. },
  11471. {
  11472. "$ref": "#/components/schemas/EventPtyCreated"
  11473. },
  11474. {
  11475. "$ref": "#/components/schemas/EventPtyUpdated"
  11476. },
  11477. {
  11478. "$ref": "#/components/schemas/EventPtyExited"
  11479. },
  11480. {
  11481. "$ref": "#/components/schemas/EventPtyDeleted"
  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": ["lsp.updated"]
  15012. },
  15013. "properties": {
  15014. "type": "object",
  15015. "properties": {}
  15016. }
  15017. },
  15018. "required": ["id", "type", "properties"],
  15019. "additionalProperties": false
  15020. },
  15021. {
  15022. "type": "object",
  15023. "properties": {
  15024. "id": {
  15025. "type": "string"
  15026. },
  15027. "type": {
  15028. "type": "string",
  15029. "enum": ["permission.asked"]
  15030. },
  15031. "properties": {
  15032. "type": "object",
  15033. "properties": {
  15034. "id": {
  15035. "type": "string",
  15036. "pattern": "^per"
  15037. },
  15038. "sessionID": {
  15039. "type": "string",
  15040. "pattern": "^ses"
  15041. },
  15042. "permission": {
  15043. "type": "string"
  15044. },
  15045. "patterns": {
  15046. "type": "array",
  15047. "items": {
  15048. "type": "string"
  15049. }
  15050. },
  15051. "metadata": {
  15052. "type": "object"
  15053. },
  15054. "always": {
  15055. "type": "array",
  15056. "items": {
  15057. "type": "string"
  15058. }
  15059. },
  15060. "tool": {
  15061. "type": "object",
  15062. "properties": {
  15063. "messageID": {
  15064. "type": "string"
  15065. },
  15066. "callID": {
  15067. "type": "string"
  15068. }
  15069. },
  15070. "required": ["messageID", "callID"],
  15071. "additionalProperties": false
  15072. }
  15073. },
  15074. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  15075. "additionalProperties": false
  15076. }
  15077. },
  15078. "required": ["id", "type", "properties"],
  15079. "additionalProperties": false
  15080. },
  15081. {
  15082. "type": "object",
  15083. "properties": {
  15084. "id": {
  15085. "type": "string"
  15086. },
  15087. "type": {
  15088. "type": "string",
  15089. "enum": ["permission.replied"]
  15090. },
  15091. "properties": {
  15092. "type": "object",
  15093. "properties": {
  15094. "sessionID": {
  15095. "type": "string",
  15096. "pattern": "^ses"
  15097. },
  15098. "requestID": {
  15099. "type": "string",
  15100. "pattern": "^per"
  15101. },
  15102. "reply": {
  15103. "type": "string",
  15104. "enum": ["once", "always", "reject"]
  15105. }
  15106. },
  15107. "required": ["sessionID", "requestID", "reply"],
  15108. "additionalProperties": false
  15109. }
  15110. },
  15111. "required": ["id", "type", "properties"],
  15112. "additionalProperties": false
  15113. },
  15114. {
  15115. "type": "object",
  15116. "properties": {
  15117. "id": {
  15118. "type": "string"
  15119. },
  15120. "type": {
  15121. "type": "string",
  15122. "enum": ["tui.prompt.append"]
  15123. },
  15124. "properties": {
  15125. "type": "object",
  15126. "properties": {
  15127. "text": {
  15128. "type": "string"
  15129. }
  15130. },
  15131. "required": ["text"],
  15132. "additionalProperties": false
  15133. }
  15134. },
  15135. "required": ["id", "type", "properties"],
  15136. "additionalProperties": false
  15137. },
  15138. {
  15139. "type": "object",
  15140. "properties": {
  15141. "id": {
  15142. "type": "string"
  15143. },
  15144. "type": {
  15145. "type": "string",
  15146. "enum": ["tui.command.execute"]
  15147. },
  15148. "properties": {
  15149. "type": "object",
  15150. "properties": {
  15151. "command": {
  15152. "anyOf": [
  15153. {
  15154. "type": "string",
  15155. "enum": [
  15156. "session.list",
  15157. "session.new",
  15158. "session.share",
  15159. "session.interrupt",
  15160. "session.compact",
  15161. "session.page.up",
  15162. "session.page.down",
  15163. "session.line.up",
  15164. "session.line.down",
  15165. "session.half.page.up",
  15166. "session.half.page.down",
  15167. "session.first",
  15168. "session.last",
  15169. "prompt.clear",
  15170. "prompt.submit",
  15171. "agent.cycle"
  15172. ]
  15173. },
  15174. {
  15175. "type": "string"
  15176. }
  15177. ]
  15178. }
  15179. },
  15180. "required": ["command"],
  15181. "additionalProperties": false
  15182. }
  15183. },
  15184. "required": ["id", "type", "properties"],
  15185. "additionalProperties": false
  15186. },
  15187. {
  15188. "type": "object",
  15189. "properties": {
  15190. "id": {
  15191. "type": "string"
  15192. },
  15193. "type": {
  15194. "type": "string",
  15195. "enum": ["tui.toast.show"]
  15196. },
  15197. "properties": {
  15198. "type": "object",
  15199. "properties": {
  15200. "title": {
  15201. "type": "string"
  15202. },
  15203. "message": {
  15204. "type": "string"
  15205. },
  15206. "variant": {
  15207. "type": "string",
  15208. "enum": ["info", "success", "warning", "error"]
  15209. },
  15210. "duration": {
  15211. "type": "integer",
  15212. "exclusiveMinimum": 0
  15213. }
  15214. },
  15215. "required": ["message", "variant"],
  15216. "additionalProperties": false
  15217. }
  15218. },
  15219. "required": ["id", "type", "properties"],
  15220. "additionalProperties": false
  15221. },
  15222. {
  15223. "type": "object",
  15224. "properties": {
  15225. "id": {
  15226. "type": "string"
  15227. },
  15228. "type": {
  15229. "type": "string",
  15230. "enum": ["tui.session.select"]
  15231. },
  15232. "properties": {
  15233. "type": "object",
  15234. "properties": {
  15235. "sessionID": {
  15236. "type": "string",
  15237. "pattern": "^ses",
  15238. "description": "Session ID to navigate to"
  15239. }
  15240. },
  15241. "required": ["sessionID"],
  15242. "additionalProperties": false
  15243. }
  15244. },
  15245. "required": ["id", "type", "properties"],
  15246. "additionalProperties": false
  15247. },
  15248. {
  15249. "type": "object",
  15250. "properties": {
  15251. "id": {
  15252. "type": "string"
  15253. },
  15254. "type": {
  15255. "type": "string",
  15256. "enum": ["mcp.tools.changed"]
  15257. },
  15258. "properties": {
  15259. "type": "object",
  15260. "properties": {
  15261. "server": {
  15262. "type": "string"
  15263. }
  15264. },
  15265. "required": ["server"],
  15266. "additionalProperties": false
  15267. }
  15268. },
  15269. "required": ["id", "type", "properties"],
  15270. "additionalProperties": false
  15271. },
  15272. {
  15273. "type": "object",
  15274. "properties": {
  15275. "id": {
  15276. "type": "string"
  15277. },
  15278. "type": {
  15279. "type": "string",
  15280. "enum": ["mcp.browser.open.failed"]
  15281. },
  15282. "properties": {
  15283. "type": "object",
  15284. "properties": {
  15285. "mcpName": {
  15286. "type": "string"
  15287. },
  15288. "url": {
  15289. "type": "string"
  15290. }
  15291. },
  15292. "required": ["mcpName", "url"],
  15293. "additionalProperties": false
  15294. }
  15295. },
  15296. "required": ["id", "type", "properties"],
  15297. "additionalProperties": false
  15298. },
  15299. {
  15300. "type": "object",
  15301. "properties": {
  15302. "id": {
  15303. "type": "string"
  15304. },
  15305. "type": {
  15306. "type": "string",
  15307. "enum": ["command.executed"]
  15308. },
  15309. "properties": {
  15310. "type": "object",
  15311. "properties": {
  15312. "name": {
  15313. "type": "string"
  15314. },
  15315. "sessionID": {
  15316. "type": "string",
  15317. "pattern": "^ses"
  15318. },
  15319. "arguments": {
  15320. "type": "string"
  15321. },
  15322. "messageID": {
  15323. "type": "string",
  15324. "pattern": "^msg"
  15325. }
  15326. },
  15327. "required": ["name", "sessionID", "arguments", "messageID"],
  15328. "additionalProperties": false
  15329. }
  15330. },
  15331. "required": ["id", "type", "properties"],
  15332. "additionalProperties": false
  15333. },
  15334. {
  15335. "type": "object",
  15336. "properties": {
  15337. "id": {
  15338. "type": "string"
  15339. },
  15340. "type": {
  15341. "type": "string",
  15342. "enum": ["project.directories.updated"]
  15343. },
  15344. "properties": {
  15345. "type": "object",
  15346. "properties": {
  15347. "projectID": {
  15348. "type": "string"
  15349. }
  15350. },
  15351. "required": ["projectID"],
  15352. "additionalProperties": false
  15353. }
  15354. },
  15355. "required": ["id", "type", "properties"],
  15356. "additionalProperties": false
  15357. },
  15358. {
  15359. "type": "object",
  15360. "properties": {
  15361. "id": {
  15362. "type": "string"
  15363. },
  15364. "type": {
  15365. "type": "string",
  15366. "enum": ["project.updated"]
  15367. },
  15368. "properties": {
  15369. "type": "object",
  15370. "properties": {
  15371. "id": {
  15372. "type": "string"
  15373. },
  15374. "worktree": {
  15375. "type": "string"
  15376. },
  15377. "vcs": {
  15378. "type": "string",
  15379. "enum": ["git"]
  15380. },
  15381. "name": {
  15382. "type": "string"
  15383. },
  15384. "icon": {
  15385. "type": "object",
  15386. "properties": {
  15387. "url": {
  15388. "type": "string"
  15389. },
  15390. "override": {
  15391. "type": "string"
  15392. },
  15393. "color": {
  15394. "type": "string"
  15395. }
  15396. },
  15397. "additionalProperties": false
  15398. },
  15399. "commands": {
  15400. "type": "object",
  15401. "properties": {
  15402. "start": {
  15403. "type": "string",
  15404. "description": "Startup script to run when creating a new workspace (worktree)"
  15405. }
  15406. },
  15407. "additionalProperties": false
  15408. },
  15409. "time": {
  15410. "type": "object",
  15411. "properties": {
  15412. "created": {
  15413. "type": "integer",
  15414. "minimum": 0
  15415. },
  15416. "updated": {
  15417. "type": "integer",
  15418. "minimum": 0
  15419. },
  15420. "initialized": {
  15421. "type": "integer",
  15422. "minimum": 0
  15423. }
  15424. },
  15425. "required": ["created", "updated"],
  15426. "additionalProperties": false
  15427. },
  15428. "sandboxes": {
  15429. "type": "array",
  15430. "items": {
  15431. "type": "string"
  15432. }
  15433. }
  15434. },
  15435. "required": ["id", "worktree", "time", "sandboxes"],
  15436. "additionalProperties": false
  15437. }
  15438. },
  15439. "required": ["id", "type", "properties"],
  15440. "additionalProperties": false
  15441. },
  15442. {
  15443. "type": "object",
  15444. "properties": {
  15445. "id": {
  15446. "type": "string"
  15447. },
  15448. "type": {
  15449. "type": "string",
  15450. "enum": ["pty.created"]
  15451. },
  15452. "properties": {
  15453. "type": "object",
  15454. "properties": {
  15455. "info": {
  15456. "$ref": "#/components/schemas/Pty"
  15457. }
  15458. },
  15459. "required": ["info"],
  15460. "additionalProperties": false
  15461. }
  15462. },
  15463. "required": ["id", "type", "properties"],
  15464. "additionalProperties": false
  15465. },
  15466. {
  15467. "type": "object",
  15468. "properties": {
  15469. "id": {
  15470. "type": "string"
  15471. },
  15472. "type": {
  15473. "type": "string",
  15474. "enum": ["pty.updated"]
  15475. },
  15476. "properties": {
  15477. "type": "object",
  15478. "properties": {
  15479. "info": {
  15480. "$ref": "#/components/schemas/Pty"
  15481. }
  15482. },
  15483. "required": ["info"],
  15484. "additionalProperties": false
  15485. }
  15486. },
  15487. "required": ["id", "type", "properties"],
  15488. "additionalProperties": false
  15489. },
  15490. {
  15491. "type": "object",
  15492. "properties": {
  15493. "id": {
  15494. "type": "string"
  15495. },
  15496. "type": {
  15497. "type": "string",
  15498. "enum": ["pty.exited"]
  15499. },
  15500. "properties": {
  15501. "type": "object",
  15502. "properties": {
  15503. "id": {
  15504. "type": "string",
  15505. "pattern": "^pty"
  15506. },
  15507. "exitCode": {
  15508. "type": "integer",
  15509. "minimum": 0
  15510. }
  15511. },
  15512. "required": ["id", "exitCode"],
  15513. "additionalProperties": false
  15514. }
  15515. },
  15516. "required": ["id", "type", "properties"],
  15517. "additionalProperties": false
  15518. },
  15519. {
  15520. "type": "object",
  15521. "properties": {
  15522. "id": {
  15523. "type": "string"
  15524. },
  15525. "type": {
  15526. "type": "string",
  15527. "enum": ["pty.deleted"]
  15528. },
  15529. "properties": {
  15530. "type": "object",
  15531. "properties": {
  15532. "id": {
  15533. "type": "string",
  15534. "pattern": "^pty"
  15535. }
  15536. },
  15537. "required": ["id"],
  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. "apiID": {
  19304. "type": "string"
  19305. },
  19306. "providerID": {
  19307. "type": "string"
  19308. },
  19309. "family": {
  19310. "type": "string"
  19311. },
  19312. "name": {
  19313. "type": "string"
  19314. },
  19315. "endpoint": {
  19316. "anyOf": [
  19317. {
  19318. "type": "object",
  19319. "properties": {
  19320. "type": {
  19321. "type": "string",
  19322. "enum": ["unknown"]
  19323. }
  19324. },
  19325. "required": ["type"],
  19326. "additionalProperties": false
  19327. },
  19328. {
  19329. "type": "object",
  19330. "properties": {
  19331. "type": {
  19332. "type": "string",
  19333. "enum": ["openai/responses"]
  19334. },
  19335. "url": {
  19336. "type": "string"
  19337. },
  19338. "websocket": {
  19339. "type": "boolean"
  19340. }
  19341. },
  19342. "required": ["type", "url"],
  19343. "additionalProperties": false
  19344. },
  19345. {
  19346. "type": "object",
  19347. "properties": {
  19348. "type": {
  19349. "type": "string",
  19350. "enum": ["openai/completions"]
  19351. },
  19352. "url": {
  19353. "type": "string"
  19354. },
  19355. "reasoning": {
  19356. "anyOf": [
  19357. {
  19358. "type": "object",
  19359. "properties": {
  19360. "type": {
  19361. "type": "string",
  19362. "enum": ["reasoning_content"]
  19363. }
  19364. },
  19365. "required": ["type"],
  19366. "additionalProperties": false
  19367. },
  19368. {
  19369. "type": "object",
  19370. "properties": {
  19371. "type": {
  19372. "type": "string",
  19373. "enum": ["reasoning_details"]
  19374. }
  19375. },
  19376. "required": ["type"],
  19377. "additionalProperties": false
  19378. }
  19379. ]
  19380. }
  19381. },
  19382. "required": ["type", "url"],
  19383. "additionalProperties": false
  19384. },
  19385. {
  19386. "type": "object",
  19387. "properties": {
  19388. "type": {
  19389. "type": "string",
  19390. "enum": ["anthropic/messages"]
  19391. },
  19392. "url": {
  19393. "type": "string"
  19394. }
  19395. },
  19396. "required": ["type", "url"],
  19397. "additionalProperties": false
  19398. },
  19399. {
  19400. "type": "object",
  19401. "properties": {
  19402. "type": {
  19403. "type": "string",
  19404. "enum": ["aisdk"]
  19405. },
  19406. "package": {
  19407. "type": "string"
  19408. },
  19409. "url": {
  19410. "type": "string"
  19411. }
  19412. },
  19413. "required": ["type", "package"],
  19414. "additionalProperties": false
  19415. }
  19416. ]
  19417. },
  19418. "capabilities": {
  19419. "type": "object",
  19420. "properties": {
  19421. "tools": {
  19422. "type": "boolean"
  19423. },
  19424. "input": {
  19425. "type": "array",
  19426. "items": {
  19427. "type": "string"
  19428. }
  19429. },
  19430. "output": {
  19431. "type": "array",
  19432. "items": {
  19433. "type": "string"
  19434. }
  19435. }
  19436. },
  19437. "required": ["tools", "input", "output"],
  19438. "additionalProperties": false
  19439. },
  19440. "options": {
  19441. "type": "object",
  19442. "properties": {
  19443. "headers": {
  19444. "type": "object",
  19445. "additionalProperties": {
  19446. "type": "string"
  19447. }
  19448. },
  19449. "body": {
  19450. "type": "object"
  19451. },
  19452. "aisdk": {
  19453. "type": "object",
  19454. "properties": {
  19455. "provider": {
  19456. "type": "object"
  19457. },
  19458. "request": {
  19459. "type": "object"
  19460. }
  19461. },
  19462. "required": ["provider", "request"],
  19463. "additionalProperties": false
  19464. },
  19465. "variant": {
  19466. "type": "string"
  19467. }
  19468. },
  19469. "required": ["headers", "body", "aisdk"],
  19470. "additionalProperties": false
  19471. },
  19472. "variants": {
  19473. "type": "array",
  19474. "items": {
  19475. "type": "object",
  19476. "properties": {
  19477. "id": {
  19478. "type": "string"
  19479. },
  19480. "headers": {
  19481. "type": "object",
  19482. "additionalProperties": {
  19483. "type": "string"
  19484. }
  19485. },
  19486. "body": {
  19487. "type": "object"
  19488. },
  19489. "aisdk": {
  19490. "type": "object",
  19491. "properties": {
  19492. "provider": {
  19493. "type": "object"
  19494. },
  19495. "request": {
  19496. "type": "object"
  19497. }
  19498. },
  19499. "required": ["provider", "request"],
  19500. "additionalProperties": false
  19501. }
  19502. },
  19503. "required": ["id", "headers", "body", "aisdk"],
  19504. "additionalProperties": false
  19505. }
  19506. },
  19507. "time": {
  19508. "type": "object",
  19509. "properties": {
  19510. "released": {
  19511. "anyOf": [
  19512. {
  19513. "type": "number"
  19514. },
  19515. {
  19516. "type": "string",
  19517. "enum": ["NaN"]
  19518. },
  19519. {
  19520. "type": "string",
  19521. "enum": ["Infinity"]
  19522. },
  19523. {
  19524. "type": "string",
  19525. "enum": ["-Infinity"]
  19526. },
  19527. {
  19528. "type": "string",
  19529. "enum": ["Infinity", "-Infinity", "NaN"]
  19530. }
  19531. ]
  19532. }
  19533. },
  19534. "required": ["released"],
  19535. "additionalProperties": false
  19536. },
  19537. "cost": {
  19538. "type": "array",
  19539. "items": {
  19540. "type": "object",
  19541. "properties": {
  19542. "tier": {
  19543. "type": "object",
  19544. "properties": {
  19545. "type": {
  19546. "type": "string",
  19547. "enum": ["context"]
  19548. },
  19549. "size": {
  19550. "type": "integer"
  19551. }
  19552. },
  19553. "required": ["type", "size"],
  19554. "additionalProperties": false
  19555. },
  19556. "input": {
  19557. "type": "number"
  19558. },
  19559. "output": {
  19560. "type": "number"
  19561. },
  19562. "cache": {
  19563. "type": "object",
  19564. "properties": {
  19565. "read": {
  19566. "type": "number"
  19567. },
  19568. "write": {
  19569. "type": "number"
  19570. }
  19571. },
  19572. "required": ["read", "write"],
  19573. "additionalProperties": false
  19574. }
  19575. },
  19576. "required": ["input", "output", "cache"],
  19577. "additionalProperties": false
  19578. }
  19579. },
  19580. "status": {
  19581. "type": "string",
  19582. "enum": ["alpha", "beta", "deprecated", "active"]
  19583. },
  19584. "enabled": {
  19585. "type": "boolean"
  19586. },
  19587. "limit": {
  19588. "type": "object",
  19589. "properties": {
  19590. "context": {
  19591. "type": "integer"
  19592. },
  19593. "input": {
  19594. "type": "integer"
  19595. },
  19596. "output": {
  19597. "type": "integer"
  19598. }
  19599. },
  19600. "required": ["context", "output"],
  19601. "additionalProperties": false
  19602. }
  19603. },
  19604. "required": [
  19605. "id",
  19606. "apiID",
  19607. "providerID",
  19608. "name",
  19609. "endpoint",
  19610. "capabilities",
  19611. "options",
  19612. "variants",
  19613. "time",
  19614. "cost",
  19615. "status",
  19616. "enabled",
  19617. "limit"
  19618. ],
  19619. "additionalProperties": false
  19620. },
  19621. "PromptSource": {
  19622. "type": "object",
  19623. "properties": {
  19624. "start": {
  19625. "type": "number"
  19626. },
  19627. "end": {
  19628. "type": "number"
  19629. },
  19630. "text": {
  19631. "type": "string"
  19632. }
  19633. },
  19634. "required": ["start", "end", "text"],
  19635. "additionalProperties": false
  19636. },
  19637. "PromptFileAttachment": {
  19638. "type": "object",
  19639. "properties": {
  19640. "uri": {
  19641. "type": "string"
  19642. },
  19643. "mime": {
  19644. "type": "string"
  19645. },
  19646. "name": {
  19647. "type": "string"
  19648. },
  19649. "description": {
  19650. "type": "string"
  19651. },
  19652. "source": {
  19653. "$ref": "#/components/schemas/PromptSource"
  19654. }
  19655. },
  19656. "required": ["uri", "mime"],
  19657. "additionalProperties": false
  19658. },
  19659. "PromptAgentAttachment": {
  19660. "type": "object",
  19661. "properties": {
  19662. "name": {
  19663. "type": "string"
  19664. },
  19665. "source": {
  19666. "$ref": "#/components/schemas/PromptSource"
  19667. }
  19668. },
  19669. "required": ["name"],
  19670. "additionalProperties": false
  19671. },
  19672. "PromptReferenceAttachment": {
  19673. "type": "object",
  19674. "properties": {
  19675. "name": {
  19676. "type": "string"
  19677. },
  19678. "kind": {
  19679. "type": "string",
  19680. "enum": ["local", "git", "invalid"]
  19681. },
  19682. "uri": {
  19683. "type": "string"
  19684. },
  19685. "repository": {
  19686. "type": "string"
  19687. },
  19688. "branch": {
  19689. "type": "string"
  19690. },
  19691. "target": {
  19692. "type": "string"
  19693. },
  19694. "targetUri": {
  19695. "type": "string"
  19696. },
  19697. "problem": {
  19698. "type": "string"
  19699. },
  19700. "source": {
  19701. "$ref": "#/components/schemas/PromptSource"
  19702. }
  19703. },
  19704. "required": ["name", "kind"],
  19705. "additionalProperties": false
  19706. },
  19707. "SessionErrorUnknown": {
  19708. "type": "object",
  19709. "properties": {
  19710. "type": {
  19711. "type": "string",
  19712. "enum": ["unknown"]
  19713. },
  19714. "message": {
  19715. "type": "string"
  19716. }
  19717. },
  19718. "required": ["type", "message"],
  19719. "additionalProperties": false
  19720. },
  19721. "ToolTextContent": {
  19722. "type": "object",
  19723. "properties": {
  19724. "type": {
  19725. "type": "string",
  19726. "enum": ["text"]
  19727. },
  19728. "text": {
  19729. "type": "string"
  19730. }
  19731. },
  19732. "required": ["type", "text"],
  19733. "additionalProperties": false
  19734. },
  19735. "ToolFileContent": {
  19736. "type": "object",
  19737. "properties": {
  19738. "type": {
  19739. "type": "string",
  19740. "enum": ["file"]
  19741. },
  19742. "uri": {
  19743. "type": "string"
  19744. },
  19745. "mime": {
  19746. "type": "string"
  19747. },
  19748. "name": {
  19749. "type": "string"
  19750. }
  19751. },
  19752. "required": ["type", "uri", "mime"],
  19753. "additionalProperties": false
  19754. },
  19755. "SessionNextRetry_error": {
  19756. "type": "object",
  19757. "properties": {
  19758. "message": {
  19759. "type": "string"
  19760. },
  19761. "statusCode": {
  19762. "type": "number"
  19763. },
  19764. "isRetryable": {
  19765. "type": "boolean"
  19766. },
  19767. "responseHeaders": {
  19768. "type": "object",
  19769. "additionalProperties": {
  19770. "type": "string"
  19771. }
  19772. },
  19773. "responseBody": {
  19774. "type": "string"
  19775. },
  19776. "metadata": {
  19777. "type": "object",
  19778. "additionalProperties": {
  19779. "type": "string"
  19780. }
  19781. }
  19782. },
  19783. "required": ["message", "isRetryable"],
  19784. "additionalProperties": false
  19785. },
  19786. "PermissionV2Source": {
  19787. "type": "object",
  19788. "properties": {
  19789. "type": {
  19790. "type": "string",
  19791. "enum": ["tool"]
  19792. },
  19793. "messageID": {
  19794. "type": "string"
  19795. },
  19796. "callID": {
  19797. "type": "string"
  19798. }
  19799. },
  19800. "required": ["type", "messageID", "callID"],
  19801. "additionalProperties": false
  19802. },
  19803. "PermissionV2Reply": {
  19804. "type": "string",
  19805. "enum": ["once", "always", "reject"]
  19806. },
  19807. "AuthOAuthCredential": {
  19808. "type": "object",
  19809. "properties": {
  19810. "type": {
  19811. "type": "string",
  19812. "enum": ["oauth"]
  19813. },
  19814. "refresh": {
  19815. "type": "string"
  19816. },
  19817. "access": {
  19818. "type": "string"
  19819. },
  19820. "expires": {
  19821. "type": "integer",
  19822. "minimum": 0
  19823. }
  19824. },
  19825. "required": ["type", "refresh", "access", "expires"],
  19826. "additionalProperties": false
  19827. },
  19828. "AuthApiKeyCredential": {
  19829. "type": "object",
  19830. "properties": {
  19831. "type": {
  19832. "type": "string",
  19833. "enum": ["api"]
  19834. },
  19835. "key": {
  19836. "type": "string"
  19837. },
  19838. "metadata": {
  19839. "type": "object",
  19840. "additionalProperties": {
  19841. "type": "string"
  19842. }
  19843. }
  19844. },
  19845. "required": ["type", "key"],
  19846. "additionalProperties": false
  19847. },
  19848. "AuthCredential": {
  19849. "anyOf": [
  19850. {
  19851. "$ref": "#/components/schemas/AuthOAuthCredential"
  19852. },
  19853. {
  19854. "$ref": "#/components/schemas/AuthApiKeyCredential"
  19855. }
  19856. ]
  19857. },
  19858. "AuthInfo": {
  19859. "type": "object",
  19860. "properties": {
  19861. "id": {
  19862. "type": "string"
  19863. },
  19864. "serviceID": {
  19865. "type": "string"
  19866. },
  19867. "description": {
  19868. "type": "string"
  19869. },
  19870. "credential": {
  19871. "$ref": "#/components/schemas/AuthCredential"
  19872. }
  19873. },
  19874. "required": ["id", "serviceID", "description", "credential"],
  19875. "additionalProperties": false
  19876. },
  19877. "EventServerInstanceDisposed": {
  19878. "type": "object",
  19879. "properties": {
  19880. "id": {
  19881. "type": "string"
  19882. },
  19883. "type": {
  19884. "type": "string",
  19885. "enum": ["server.instance.disposed"]
  19886. },
  19887. "properties": {
  19888. "type": "object",
  19889. "properties": {
  19890. "directory": {
  19891. "type": "string"
  19892. }
  19893. },
  19894. "required": ["directory"],
  19895. "additionalProperties": false
  19896. }
  19897. },
  19898. "required": ["id", "type", "properties"],
  19899. "additionalProperties": false
  19900. },
  19901. "SyncEventSessionCreated": {
  19902. "type": "object",
  19903. "properties": {
  19904. "type": {
  19905. "type": "string",
  19906. "enum": ["sync"]
  19907. },
  19908. "name": {
  19909. "type": "string",
  19910. "enum": ["session.created.1"]
  19911. },
  19912. "id": {
  19913. "type": "string"
  19914. },
  19915. "seq": {
  19916. "type": "number"
  19917. },
  19918. "aggregateID": {
  19919. "type": "string",
  19920. "enum": ["sessionID"]
  19921. },
  19922. "data": {
  19923. "type": "object",
  19924. "properties": {
  19925. "sessionID": {
  19926. "type": "string",
  19927. "pattern": "^ses"
  19928. },
  19929. "info": {
  19930. "$ref": "#/components/schemas/Session"
  19931. }
  19932. },
  19933. "required": ["sessionID", "info"],
  19934. "additionalProperties": false
  19935. }
  19936. },
  19937. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19938. "additionalProperties": false
  19939. },
  19940. "SyncEventSessionUpdated": {
  19941. "type": "object",
  19942. "properties": {
  19943. "type": {
  19944. "type": "string",
  19945. "enum": ["sync"]
  19946. },
  19947. "name": {
  19948. "type": "string",
  19949. "enum": ["session.updated.1"]
  19950. },
  19951. "id": {
  19952. "type": "string"
  19953. },
  19954. "seq": {
  19955. "type": "number"
  19956. },
  19957. "aggregateID": {
  19958. "type": "string",
  19959. "enum": ["sessionID"]
  19960. },
  19961. "data": {
  19962. "type": "object",
  19963. "properties": {
  19964. "sessionID": {
  19965. "type": "string",
  19966. "pattern": "^ses"
  19967. },
  19968. "info": {
  19969. "$ref": "#/components/schemas/Session"
  19970. }
  19971. },
  19972. "required": ["sessionID", "info"],
  19973. "additionalProperties": false
  19974. }
  19975. },
  19976. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19977. "additionalProperties": false
  19978. },
  19979. "SyncEventSessionDeleted": {
  19980. "type": "object",
  19981. "properties": {
  19982. "type": {
  19983. "type": "string",
  19984. "enum": ["sync"]
  19985. },
  19986. "name": {
  19987. "type": "string",
  19988. "enum": ["session.deleted.1"]
  19989. },
  19990. "id": {
  19991. "type": "string"
  19992. },
  19993. "seq": {
  19994. "type": "number"
  19995. },
  19996. "aggregateID": {
  19997. "type": "string",
  19998. "enum": ["sessionID"]
  19999. },
  20000. "data": {
  20001. "type": "object",
  20002. "properties": {
  20003. "sessionID": {
  20004. "type": "string",
  20005. "pattern": "^ses"
  20006. },
  20007. "info": {
  20008. "$ref": "#/components/schemas/Session"
  20009. }
  20010. },
  20011. "required": ["sessionID", "info"],
  20012. "additionalProperties": false
  20013. }
  20014. },
  20015. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20016. "additionalProperties": false
  20017. },
  20018. "SyncEventMessageUpdated": {
  20019. "type": "object",
  20020. "properties": {
  20021. "type": {
  20022. "type": "string",
  20023. "enum": ["sync"]
  20024. },
  20025. "name": {
  20026. "type": "string",
  20027. "enum": ["message.updated.1"]
  20028. },
  20029. "id": {
  20030. "type": "string"
  20031. },
  20032. "seq": {
  20033. "type": "number"
  20034. },
  20035. "aggregateID": {
  20036. "type": "string",
  20037. "enum": ["sessionID"]
  20038. },
  20039. "data": {
  20040. "type": "object",
  20041. "properties": {
  20042. "sessionID": {
  20043. "type": "string",
  20044. "pattern": "^ses"
  20045. },
  20046. "info": {
  20047. "$ref": "#/components/schemas/Message"
  20048. }
  20049. },
  20050. "required": ["sessionID", "info"],
  20051. "additionalProperties": false
  20052. }
  20053. },
  20054. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20055. "additionalProperties": false
  20056. },
  20057. "SyncEventMessageRemoved": {
  20058. "type": "object",
  20059. "properties": {
  20060. "type": {
  20061. "type": "string",
  20062. "enum": ["sync"]
  20063. },
  20064. "name": {
  20065. "type": "string",
  20066. "enum": ["message.removed.1"]
  20067. },
  20068. "id": {
  20069. "type": "string"
  20070. },
  20071. "seq": {
  20072. "type": "number"
  20073. },
  20074. "aggregateID": {
  20075. "type": "string",
  20076. "enum": ["sessionID"]
  20077. },
  20078. "data": {
  20079. "type": "object",
  20080. "properties": {
  20081. "sessionID": {
  20082. "type": "string",
  20083. "pattern": "^ses"
  20084. },
  20085. "messageID": {
  20086. "type": "string",
  20087. "pattern": "^msg"
  20088. }
  20089. },
  20090. "required": ["sessionID", "messageID"],
  20091. "additionalProperties": false
  20092. }
  20093. },
  20094. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20095. "additionalProperties": false
  20096. },
  20097. "SyncEventMessagePartUpdated": {
  20098. "type": "object",
  20099. "properties": {
  20100. "type": {
  20101. "type": "string",
  20102. "enum": ["sync"]
  20103. },
  20104. "name": {
  20105. "type": "string",
  20106. "enum": ["message.part.updated.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. "sessionID": {
  20122. "type": "string",
  20123. "pattern": "^ses"
  20124. },
  20125. "part": {
  20126. "$ref": "#/components/schemas/Part"
  20127. },
  20128. "time": {
  20129. "type": "number"
  20130. }
  20131. },
  20132. "required": ["sessionID", "part", "time"],
  20133. "additionalProperties": false
  20134. }
  20135. },
  20136. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20137. "additionalProperties": false
  20138. },
  20139. "SyncEventMessagePartRemoved": {
  20140. "type": "object",
  20141. "properties": {
  20142. "type": {
  20143. "type": "string",
  20144. "enum": ["sync"]
  20145. },
  20146. "name": {
  20147. "type": "string",
  20148. "enum": ["message.part.removed.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. "sessionID": {
  20164. "type": "string",
  20165. "pattern": "^ses"
  20166. },
  20167. "messageID": {
  20168. "type": "string",
  20169. "pattern": "^msg"
  20170. },
  20171. "partID": {
  20172. "type": "string",
  20173. "pattern": "^prt"
  20174. }
  20175. },
  20176. "required": ["sessionID", "messageID", "partID"],
  20177. "additionalProperties": false
  20178. }
  20179. },
  20180. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20181. "additionalProperties": false
  20182. },
  20183. "SyncEventSessionNextAgentSwitched": {
  20184. "type": "object",
  20185. "properties": {
  20186. "type": {
  20187. "type": "string",
  20188. "enum": ["sync"]
  20189. },
  20190. "name": {
  20191. "type": "string",
  20192. "enum": ["session.next.agent.switched.1"]
  20193. },
  20194. "id": {
  20195. "type": "string"
  20196. },
  20197. "seq": {
  20198. "type": "number"
  20199. },
  20200. "aggregateID": {
  20201. "type": "string",
  20202. "enum": ["sessionID"]
  20203. },
  20204. "data": {
  20205. "type": "object",
  20206. "properties": {
  20207. "timestamp": {
  20208. "type": "number"
  20209. },
  20210. "sessionID": {
  20211. "type": "string",
  20212. "pattern": "^ses"
  20213. },
  20214. "agent": {
  20215. "type": "string"
  20216. }
  20217. },
  20218. "required": ["timestamp", "sessionID", "agent"],
  20219. "additionalProperties": false
  20220. }
  20221. },
  20222. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20223. "additionalProperties": false
  20224. },
  20225. "SyncEventSessionNextModelSwitched": {
  20226. "type": "object",
  20227. "properties": {
  20228. "type": {
  20229. "type": "string",
  20230. "enum": ["sync"]
  20231. },
  20232. "name": {
  20233. "type": "string",
  20234. "enum": ["session.next.model.switched.1"]
  20235. },
  20236. "id": {
  20237. "type": "string"
  20238. },
  20239. "seq": {
  20240. "type": "number"
  20241. },
  20242. "aggregateID": {
  20243. "type": "string",
  20244. "enum": ["sessionID"]
  20245. },
  20246. "data": {
  20247. "type": "object",
  20248. "properties": {
  20249. "timestamp": {
  20250. "type": "number"
  20251. },
  20252. "sessionID": {
  20253. "type": "string",
  20254. "pattern": "^ses"
  20255. },
  20256. "model": {
  20257. "type": "object",
  20258. "properties": {
  20259. "id": {
  20260. "type": "string"
  20261. },
  20262. "providerID": {
  20263. "type": "string"
  20264. },
  20265. "variant": {
  20266. "type": "string"
  20267. }
  20268. },
  20269. "required": ["id", "providerID"],
  20270. "additionalProperties": false
  20271. }
  20272. },
  20273. "required": ["timestamp", "sessionID", "model"],
  20274. "additionalProperties": false
  20275. }
  20276. },
  20277. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20278. "additionalProperties": false
  20279. },
  20280. "SyncEventSessionNextPrompted": {
  20281. "type": "object",
  20282. "properties": {
  20283. "type": {
  20284. "type": "string",
  20285. "enum": ["sync"]
  20286. },
  20287. "name": {
  20288. "type": "string",
  20289. "enum": ["session.next.prompted.1"]
  20290. },
  20291. "id": {
  20292. "type": "string"
  20293. },
  20294. "seq": {
  20295. "type": "number"
  20296. },
  20297. "aggregateID": {
  20298. "type": "string",
  20299. "enum": ["sessionID"]
  20300. },
  20301. "data": {
  20302. "type": "object",
  20303. "properties": {
  20304. "timestamp": {
  20305. "type": "number"
  20306. },
  20307. "sessionID": {
  20308. "type": "string",
  20309. "pattern": "^ses"
  20310. },
  20311. "prompt": {
  20312. "$ref": "#/components/schemas/Prompt"
  20313. }
  20314. },
  20315. "required": ["timestamp", "sessionID", "prompt"],
  20316. "additionalProperties": false
  20317. }
  20318. },
  20319. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20320. "additionalProperties": false
  20321. },
  20322. "SyncEventSessionNextSynthetic": {
  20323. "type": "object",
  20324. "properties": {
  20325. "type": {
  20326. "type": "string",
  20327. "enum": ["sync"]
  20328. },
  20329. "name": {
  20330. "type": "string",
  20331. "enum": ["session.next.synthetic.1"]
  20332. },
  20333. "id": {
  20334. "type": "string"
  20335. },
  20336. "seq": {
  20337. "type": "number"
  20338. },
  20339. "aggregateID": {
  20340. "type": "string",
  20341. "enum": ["sessionID"]
  20342. },
  20343. "data": {
  20344. "type": "object",
  20345. "properties": {
  20346. "timestamp": {
  20347. "type": "number"
  20348. },
  20349. "sessionID": {
  20350. "type": "string",
  20351. "pattern": "^ses"
  20352. },
  20353. "text": {
  20354. "type": "string"
  20355. }
  20356. },
  20357. "required": ["timestamp", "sessionID", "text"],
  20358. "additionalProperties": false
  20359. }
  20360. },
  20361. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20362. "additionalProperties": false
  20363. },
  20364. "SyncEventSessionNextShellStarted": {
  20365. "type": "object",
  20366. "properties": {
  20367. "type": {
  20368. "type": "string",
  20369. "enum": ["sync"]
  20370. },
  20371. "name": {
  20372. "type": "string",
  20373. "enum": ["session.next.shell.started.1"]
  20374. },
  20375. "id": {
  20376. "type": "string"
  20377. },
  20378. "seq": {
  20379. "type": "number"
  20380. },
  20381. "aggregateID": {
  20382. "type": "string",
  20383. "enum": ["sessionID"]
  20384. },
  20385. "data": {
  20386. "type": "object",
  20387. "properties": {
  20388. "timestamp": {
  20389. "type": "number"
  20390. },
  20391. "sessionID": {
  20392. "type": "string",
  20393. "pattern": "^ses"
  20394. },
  20395. "callID": {
  20396. "type": "string"
  20397. },
  20398. "command": {
  20399. "type": "string"
  20400. }
  20401. },
  20402. "required": ["timestamp", "sessionID", "callID", "command"],
  20403. "additionalProperties": false
  20404. }
  20405. },
  20406. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20407. "additionalProperties": false
  20408. },
  20409. "SyncEventSessionNextShellEnded": {
  20410. "type": "object",
  20411. "properties": {
  20412. "type": {
  20413. "type": "string",
  20414. "enum": ["sync"]
  20415. },
  20416. "name": {
  20417. "type": "string",
  20418. "enum": ["session.next.shell.ended.1"]
  20419. },
  20420. "id": {
  20421. "type": "string"
  20422. },
  20423. "seq": {
  20424. "type": "number"
  20425. },
  20426. "aggregateID": {
  20427. "type": "string",
  20428. "enum": ["sessionID"]
  20429. },
  20430. "data": {
  20431. "type": "object",
  20432. "properties": {
  20433. "timestamp": {
  20434. "type": "number"
  20435. },
  20436. "sessionID": {
  20437. "type": "string",
  20438. "pattern": "^ses"
  20439. },
  20440. "callID": {
  20441. "type": "string"
  20442. },
  20443. "output": {
  20444. "type": "string"
  20445. }
  20446. },
  20447. "required": ["timestamp", "sessionID", "callID", "output"],
  20448. "additionalProperties": false
  20449. }
  20450. },
  20451. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20452. "additionalProperties": false
  20453. },
  20454. "SyncEventSessionNextStepStarted": {
  20455. "type": "object",
  20456. "properties": {
  20457. "type": {
  20458. "type": "string",
  20459. "enum": ["sync"]
  20460. },
  20461. "name": {
  20462. "type": "string",
  20463. "enum": ["session.next.step.started.1"]
  20464. },
  20465. "id": {
  20466. "type": "string"
  20467. },
  20468. "seq": {
  20469. "type": "number"
  20470. },
  20471. "aggregateID": {
  20472. "type": "string",
  20473. "enum": ["sessionID"]
  20474. },
  20475. "data": {
  20476. "type": "object",
  20477. "properties": {
  20478. "timestamp": {
  20479. "type": "number"
  20480. },
  20481. "sessionID": {
  20482. "type": "string",
  20483. "pattern": "^ses"
  20484. },
  20485. "agent": {
  20486. "type": "string"
  20487. },
  20488. "model": {
  20489. "type": "object",
  20490. "properties": {
  20491. "id": {
  20492. "type": "string"
  20493. },
  20494. "providerID": {
  20495. "type": "string"
  20496. },
  20497. "variant": {
  20498. "type": "string"
  20499. }
  20500. },
  20501. "required": ["id", "providerID"],
  20502. "additionalProperties": false
  20503. },
  20504. "snapshot": {
  20505. "type": "string"
  20506. }
  20507. },
  20508. "required": ["timestamp", "sessionID", "agent", "model"],
  20509. "additionalProperties": false
  20510. }
  20511. },
  20512. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20513. "additionalProperties": false
  20514. },
  20515. "SyncEventSessionNextStepEnded": {
  20516. "type": "object",
  20517. "properties": {
  20518. "type": {
  20519. "type": "string",
  20520. "enum": ["sync"]
  20521. },
  20522. "name": {
  20523. "type": "string",
  20524. "enum": ["session.next.step.ended.1"]
  20525. },
  20526. "id": {
  20527. "type": "string"
  20528. },
  20529. "seq": {
  20530. "type": "number"
  20531. },
  20532. "aggregateID": {
  20533. "type": "string",
  20534. "enum": ["sessionID"]
  20535. },
  20536. "data": {
  20537. "type": "object",
  20538. "properties": {
  20539. "timestamp": {
  20540. "type": "number"
  20541. },
  20542. "sessionID": {
  20543. "type": "string",
  20544. "pattern": "^ses"
  20545. },
  20546. "finish": {
  20547. "type": "string"
  20548. },
  20549. "cost": {
  20550. "type": "number"
  20551. },
  20552. "tokens": {
  20553. "type": "object",
  20554. "properties": {
  20555. "input": {
  20556. "type": "number"
  20557. },
  20558. "output": {
  20559. "type": "number"
  20560. },
  20561. "reasoning": {
  20562. "type": "number"
  20563. },
  20564. "cache": {
  20565. "type": "object",
  20566. "properties": {
  20567. "read": {
  20568. "type": "number"
  20569. },
  20570. "write": {
  20571. "type": "number"
  20572. }
  20573. },
  20574. "required": ["read", "write"],
  20575. "additionalProperties": false
  20576. }
  20577. },
  20578. "required": ["input", "output", "reasoning", "cache"],
  20579. "additionalProperties": false
  20580. },
  20581. "snapshot": {
  20582. "type": "string"
  20583. }
  20584. },
  20585. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  20586. "additionalProperties": false
  20587. }
  20588. },
  20589. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20590. "additionalProperties": false
  20591. },
  20592. "SyncEventSessionNextStepFailed": {
  20593. "type": "object",
  20594. "properties": {
  20595. "type": {
  20596. "type": "string",
  20597. "enum": ["sync"]
  20598. },
  20599. "name": {
  20600. "type": "string",
  20601. "enum": ["session.next.step.failed.1"]
  20602. },
  20603. "id": {
  20604. "type": "string"
  20605. },
  20606. "seq": {
  20607. "type": "number"
  20608. },
  20609. "aggregateID": {
  20610. "type": "string",
  20611. "enum": ["sessionID"]
  20612. },
  20613. "data": {
  20614. "type": "object",
  20615. "properties": {
  20616. "timestamp": {
  20617. "type": "number"
  20618. },
  20619. "sessionID": {
  20620. "type": "string",
  20621. "pattern": "^ses"
  20622. },
  20623. "error": {
  20624. "$ref": "#/components/schemas/SessionErrorUnknown"
  20625. }
  20626. },
  20627. "required": ["timestamp", "sessionID", "error"],
  20628. "additionalProperties": false
  20629. }
  20630. },
  20631. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20632. "additionalProperties": false
  20633. },
  20634. "SyncEventSessionNextTextStarted": {
  20635. "type": "object",
  20636. "properties": {
  20637. "type": {
  20638. "type": "string",
  20639. "enum": ["sync"]
  20640. },
  20641. "name": {
  20642. "type": "string",
  20643. "enum": ["session.next.text.started.1"]
  20644. },
  20645. "id": {
  20646. "type": "string"
  20647. },
  20648. "seq": {
  20649. "type": "number"
  20650. },
  20651. "aggregateID": {
  20652. "type": "string",
  20653. "enum": ["sessionID"]
  20654. },
  20655. "data": {
  20656. "type": "object",
  20657. "properties": {
  20658. "timestamp": {
  20659. "type": "number"
  20660. },
  20661. "sessionID": {
  20662. "type": "string",
  20663. "pattern": "^ses"
  20664. }
  20665. },
  20666. "required": ["timestamp", "sessionID"],
  20667. "additionalProperties": false
  20668. }
  20669. },
  20670. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20671. "additionalProperties": false
  20672. },
  20673. "SyncEventSessionNextTextDelta": {
  20674. "type": "object",
  20675. "properties": {
  20676. "type": {
  20677. "type": "string",
  20678. "enum": ["sync"]
  20679. },
  20680. "name": {
  20681. "type": "string",
  20682. "enum": ["session.next.text.delta.1"]
  20683. },
  20684. "id": {
  20685. "type": "string"
  20686. },
  20687. "seq": {
  20688. "type": "number"
  20689. },
  20690. "aggregateID": {
  20691. "type": "string",
  20692. "enum": ["sessionID"]
  20693. },
  20694. "data": {
  20695. "type": "object",
  20696. "properties": {
  20697. "timestamp": {
  20698. "type": "number"
  20699. },
  20700. "sessionID": {
  20701. "type": "string",
  20702. "pattern": "^ses"
  20703. },
  20704. "delta": {
  20705. "type": "string"
  20706. }
  20707. },
  20708. "required": ["timestamp", "sessionID", "delta"],
  20709. "additionalProperties": false
  20710. }
  20711. },
  20712. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20713. "additionalProperties": false
  20714. },
  20715. "SyncEventSessionNextTextEnded": {
  20716. "type": "object",
  20717. "properties": {
  20718. "type": {
  20719. "type": "string",
  20720. "enum": ["sync"]
  20721. },
  20722. "name": {
  20723. "type": "string",
  20724. "enum": ["session.next.text.ended.1"]
  20725. },
  20726. "id": {
  20727. "type": "string"
  20728. },
  20729. "seq": {
  20730. "type": "number"
  20731. },
  20732. "aggregateID": {
  20733. "type": "string",
  20734. "enum": ["sessionID"]
  20735. },
  20736. "data": {
  20737. "type": "object",
  20738. "properties": {
  20739. "timestamp": {
  20740. "type": "number"
  20741. },
  20742. "sessionID": {
  20743. "type": "string",
  20744. "pattern": "^ses"
  20745. },
  20746. "text": {
  20747. "type": "string"
  20748. }
  20749. },
  20750. "required": ["timestamp", "sessionID", "text"],
  20751. "additionalProperties": false
  20752. }
  20753. },
  20754. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20755. "additionalProperties": false
  20756. },
  20757. "SyncEventSessionNextReasoningStarted": {
  20758. "type": "object",
  20759. "properties": {
  20760. "type": {
  20761. "type": "string",
  20762. "enum": ["sync"]
  20763. },
  20764. "name": {
  20765. "type": "string",
  20766. "enum": ["session.next.reasoning.started.1"]
  20767. },
  20768. "id": {
  20769. "type": "string"
  20770. },
  20771. "seq": {
  20772. "type": "number"
  20773. },
  20774. "aggregateID": {
  20775. "type": "string",
  20776. "enum": ["sessionID"]
  20777. },
  20778. "data": {
  20779. "type": "object",
  20780. "properties": {
  20781. "timestamp": {
  20782. "type": "number"
  20783. },
  20784. "sessionID": {
  20785. "type": "string",
  20786. "pattern": "^ses"
  20787. },
  20788. "reasoningID": {
  20789. "type": "string"
  20790. }
  20791. },
  20792. "required": ["timestamp", "sessionID", "reasoningID"],
  20793. "additionalProperties": false
  20794. }
  20795. },
  20796. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20797. "additionalProperties": false
  20798. },
  20799. "SyncEventSessionNextReasoningDelta": {
  20800. "type": "object",
  20801. "properties": {
  20802. "type": {
  20803. "type": "string",
  20804. "enum": ["sync"]
  20805. },
  20806. "name": {
  20807. "type": "string",
  20808. "enum": ["session.next.reasoning.delta.1"]
  20809. },
  20810. "id": {
  20811. "type": "string"
  20812. },
  20813. "seq": {
  20814. "type": "number"
  20815. },
  20816. "aggregateID": {
  20817. "type": "string",
  20818. "enum": ["sessionID"]
  20819. },
  20820. "data": {
  20821. "type": "object",
  20822. "properties": {
  20823. "timestamp": {
  20824. "type": "number"
  20825. },
  20826. "sessionID": {
  20827. "type": "string",
  20828. "pattern": "^ses"
  20829. },
  20830. "reasoningID": {
  20831. "type": "string"
  20832. },
  20833. "delta": {
  20834. "type": "string"
  20835. }
  20836. },
  20837. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  20838. "additionalProperties": false
  20839. }
  20840. },
  20841. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20842. "additionalProperties": false
  20843. },
  20844. "SyncEventSessionNextReasoningEnded": {
  20845. "type": "object",
  20846. "properties": {
  20847. "type": {
  20848. "type": "string",
  20849. "enum": ["sync"]
  20850. },
  20851. "name": {
  20852. "type": "string",
  20853. "enum": ["session.next.reasoning.ended.1"]
  20854. },
  20855. "id": {
  20856. "type": "string"
  20857. },
  20858. "seq": {
  20859. "type": "number"
  20860. },
  20861. "aggregateID": {
  20862. "type": "string",
  20863. "enum": ["sessionID"]
  20864. },
  20865. "data": {
  20866. "type": "object",
  20867. "properties": {
  20868. "timestamp": {
  20869. "type": "number"
  20870. },
  20871. "sessionID": {
  20872. "type": "string",
  20873. "pattern": "^ses"
  20874. },
  20875. "reasoningID": {
  20876. "type": "string"
  20877. },
  20878. "text": {
  20879. "type": "string"
  20880. }
  20881. },
  20882. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  20883. "additionalProperties": false
  20884. }
  20885. },
  20886. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20887. "additionalProperties": false
  20888. },
  20889. "SyncEventSessionNextToolInputStarted": {
  20890. "type": "object",
  20891. "properties": {
  20892. "type": {
  20893. "type": "string",
  20894. "enum": ["sync"]
  20895. },
  20896. "name": {
  20897. "type": "string",
  20898. "enum": ["session.next.tool.input.started.1"]
  20899. },
  20900. "id": {
  20901. "type": "string"
  20902. },
  20903. "seq": {
  20904. "type": "number"
  20905. },
  20906. "aggregateID": {
  20907. "type": "string",
  20908. "enum": ["sessionID"]
  20909. },
  20910. "data": {
  20911. "type": "object",
  20912. "properties": {
  20913. "timestamp": {
  20914. "type": "number"
  20915. },
  20916. "sessionID": {
  20917. "type": "string",
  20918. "pattern": "^ses"
  20919. },
  20920. "callID": {
  20921. "type": "string"
  20922. },
  20923. "name": {
  20924. "type": "string"
  20925. }
  20926. },
  20927. "required": ["timestamp", "sessionID", "callID", "name"],
  20928. "additionalProperties": false
  20929. }
  20930. },
  20931. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20932. "additionalProperties": false
  20933. },
  20934. "SyncEventSessionNextToolInputDelta": {
  20935. "type": "object",
  20936. "properties": {
  20937. "type": {
  20938. "type": "string",
  20939. "enum": ["sync"]
  20940. },
  20941. "name": {
  20942. "type": "string",
  20943. "enum": ["session.next.tool.input.delta.1"]
  20944. },
  20945. "id": {
  20946. "type": "string"
  20947. },
  20948. "seq": {
  20949. "type": "number"
  20950. },
  20951. "aggregateID": {
  20952. "type": "string",
  20953. "enum": ["sessionID"]
  20954. },
  20955. "data": {
  20956. "type": "object",
  20957. "properties": {
  20958. "timestamp": {
  20959. "type": "number"
  20960. },
  20961. "sessionID": {
  20962. "type": "string",
  20963. "pattern": "^ses"
  20964. },
  20965. "callID": {
  20966. "type": "string"
  20967. },
  20968. "delta": {
  20969. "type": "string"
  20970. }
  20971. },
  20972. "required": ["timestamp", "sessionID", "callID", "delta"],
  20973. "additionalProperties": false
  20974. }
  20975. },
  20976. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20977. "additionalProperties": false
  20978. },
  20979. "SyncEventSessionNextToolInputEnded": {
  20980. "type": "object",
  20981. "properties": {
  20982. "type": {
  20983. "type": "string",
  20984. "enum": ["sync"]
  20985. },
  20986. "name": {
  20987. "type": "string",
  20988. "enum": ["session.next.tool.input.ended.1"]
  20989. },
  20990. "id": {
  20991. "type": "string"
  20992. },
  20993. "seq": {
  20994. "type": "number"
  20995. },
  20996. "aggregateID": {
  20997. "type": "string",
  20998. "enum": ["sessionID"]
  20999. },
  21000. "data": {
  21001. "type": "object",
  21002. "properties": {
  21003. "timestamp": {
  21004. "type": "number"
  21005. },
  21006. "sessionID": {
  21007. "type": "string",
  21008. "pattern": "^ses"
  21009. },
  21010. "callID": {
  21011. "type": "string"
  21012. },
  21013. "text": {
  21014. "type": "string"
  21015. }
  21016. },
  21017. "required": ["timestamp", "sessionID", "callID", "text"],
  21018. "additionalProperties": false
  21019. }
  21020. },
  21021. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21022. "additionalProperties": false
  21023. },
  21024. "SyncEventSessionNextToolCalled": {
  21025. "type": "object",
  21026. "properties": {
  21027. "type": {
  21028. "type": "string",
  21029. "enum": ["sync"]
  21030. },
  21031. "name": {
  21032. "type": "string",
  21033. "enum": ["session.next.tool.called.1"]
  21034. },
  21035. "id": {
  21036. "type": "string"
  21037. },
  21038. "seq": {
  21039. "type": "number"
  21040. },
  21041. "aggregateID": {
  21042. "type": "string",
  21043. "enum": ["sessionID"]
  21044. },
  21045. "data": {
  21046. "type": "object",
  21047. "properties": {
  21048. "timestamp": {
  21049. "type": "number"
  21050. },
  21051. "sessionID": {
  21052. "type": "string",
  21053. "pattern": "^ses"
  21054. },
  21055. "callID": {
  21056. "type": "string"
  21057. },
  21058. "tool": {
  21059. "type": "string"
  21060. },
  21061. "input": {
  21062. "type": "object"
  21063. },
  21064. "provider": {
  21065. "type": "object",
  21066. "properties": {
  21067. "executed": {
  21068. "type": "boolean"
  21069. },
  21070. "metadata": {
  21071. "type": "object"
  21072. }
  21073. },
  21074. "required": ["executed"],
  21075. "additionalProperties": false
  21076. }
  21077. },
  21078. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  21079. "additionalProperties": false
  21080. }
  21081. },
  21082. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21083. "additionalProperties": false
  21084. },
  21085. "SyncEventSessionNextToolProgress": {
  21086. "type": "object",
  21087. "properties": {
  21088. "type": {
  21089. "type": "string",
  21090. "enum": ["sync"]
  21091. },
  21092. "name": {
  21093. "type": "string",
  21094. "enum": ["session.next.tool.progress.1"]
  21095. },
  21096. "id": {
  21097. "type": "string"
  21098. },
  21099. "seq": {
  21100. "type": "number"
  21101. },
  21102. "aggregateID": {
  21103. "type": "string",
  21104. "enum": ["sessionID"]
  21105. },
  21106. "data": {
  21107. "type": "object",
  21108. "properties": {
  21109. "timestamp": {
  21110. "type": "number"
  21111. },
  21112. "sessionID": {
  21113. "type": "string",
  21114. "pattern": "^ses"
  21115. },
  21116. "callID": {
  21117. "type": "string"
  21118. },
  21119. "structured": {
  21120. "type": "object"
  21121. },
  21122. "content": {
  21123. "type": "array",
  21124. "items": {
  21125. "anyOf": [
  21126. {
  21127. "$ref": "#/components/schemas/ToolTextContent"
  21128. },
  21129. {
  21130. "$ref": "#/components/schemas/ToolFileContent"
  21131. }
  21132. ]
  21133. }
  21134. }
  21135. },
  21136. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  21137. "additionalProperties": false
  21138. }
  21139. },
  21140. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21141. "additionalProperties": false
  21142. },
  21143. "SyncEventSessionNextToolSuccess": {
  21144. "type": "object",
  21145. "properties": {
  21146. "type": {
  21147. "type": "string",
  21148. "enum": ["sync"]
  21149. },
  21150. "name": {
  21151. "type": "string",
  21152. "enum": ["session.next.tool.success.1"]
  21153. },
  21154. "id": {
  21155. "type": "string"
  21156. },
  21157. "seq": {
  21158. "type": "number"
  21159. },
  21160. "aggregateID": {
  21161. "type": "string",
  21162. "enum": ["sessionID"]
  21163. },
  21164. "data": {
  21165. "type": "object",
  21166. "properties": {
  21167. "timestamp": {
  21168. "type": "number"
  21169. },
  21170. "sessionID": {
  21171. "type": "string",
  21172. "pattern": "^ses"
  21173. },
  21174. "callID": {
  21175. "type": "string"
  21176. },
  21177. "structured": {
  21178. "type": "object"
  21179. },
  21180. "content": {
  21181. "type": "array",
  21182. "items": {
  21183. "anyOf": [
  21184. {
  21185. "$ref": "#/components/schemas/ToolTextContent"
  21186. },
  21187. {
  21188. "$ref": "#/components/schemas/ToolFileContent"
  21189. }
  21190. ]
  21191. }
  21192. },
  21193. "provider": {
  21194. "type": "object",
  21195. "properties": {
  21196. "executed": {
  21197. "type": "boolean"
  21198. },
  21199. "metadata": {
  21200. "type": "object"
  21201. }
  21202. },
  21203. "required": ["executed"],
  21204. "additionalProperties": false
  21205. }
  21206. },
  21207. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  21208. "additionalProperties": false
  21209. }
  21210. },
  21211. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21212. "additionalProperties": false
  21213. },
  21214. "SyncEventSessionNextToolFailed": {
  21215. "type": "object",
  21216. "properties": {
  21217. "type": {
  21218. "type": "string",
  21219. "enum": ["sync"]
  21220. },
  21221. "name": {
  21222. "type": "string",
  21223. "enum": ["session.next.tool.failed.1"]
  21224. },
  21225. "id": {
  21226. "type": "string"
  21227. },
  21228. "seq": {
  21229. "type": "number"
  21230. },
  21231. "aggregateID": {
  21232. "type": "string",
  21233. "enum": ["sessionID"]
  21234. },
  21235. "data": {
  21236. "type": "object",
  21237. "properties": {
  21238. "timestamp": {
  21239. "type": "number"
  21240. },
  21241. "sessionID": {
  21242. "type": "string",
  21243. "pattern": "^ses"
  21244. },
  21245. "callID": {
  21246. "type": "string"
  21247. },
  21248. "error": {
  21249. "$ref": "#/components/schemas/SessionErrorUnknown"
  21250. },
  21251. "provider": {
  21252. "type": "object",
  21253. "properties": {
  21254. "executed": {
  21255. "type": "boolean"
  21256. },
  21257. "metadata": {
  21258. "type": "object"
  21259. }
  21260. },
  21261. "required": ["executed"],
  21262. "additionalProperties": false
  21263. }
  21264. },
  21265. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  21266. "additionalProperties": false
  21267. }
  21268. },
  21269. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21270. "additionalProperties": false
  21271. },
  21272. "SyncEventSessionNextRetried": {
  21273. "type": "object",
  21274. "properties": {
  21275. "type": {
  21276. "type": "string",
  21277. "enum": ["sync"]
  21278. },
  21279. "name": {
  21280. "type": "string",
  21281. "enum": ["session.next.retried.1"]
  21282. },
  21283. "id": {
  21284. "type": "string"
  21285. },
  21286. "seq": {
  21287. "type": "number"
  21288. },
  21289. "aggregateID": {
  21290. "type": "string",
  21291. "enum": ["sessionID"]
  21292. },
  21293. "data": {
  21294. "type": "object",
  21295. "properties": {
  21296. "timestamp": {
  21297. "type": "number"
  21298. },
  21299. "sessionID": {
  21300. "type": "string",
  21301. "pattern": "^ses"
  21302. },
  21303. "attempt": {
  21304. "type": "number"
  21305. },
  21306. "error": {
  21307. "$ref": "#/components/schemas/SessionNextRetry_error"
  21308. }
  21309. },
  21310. "required": ["timestamp", "sessionID", "attempt", "error"],
  21311. "additionalProperties": false
  21312. }
  21313. },
  21314. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21315. "additionalProperties": false
  21316. },
  21317. "SyncEventSessionNextCompactionStarted": {
  21318. "type": "object",
  21319. "properties": {
  21320. "type": {
  21321. "type": "string",
  21322. "enum": ["sync"]
  21323. },
  21324. "name": {
  21325. "type": "string",
  21326. "enum": ["session.next.compaction.started.1"]
  21327. },
  21328. "id": {
  21329. "type": "string"
  21330. },
  21331. "seq": {
  21332. "type": "number"
  21333. },
  21334. "aggregateID": {
  21335. "type": "string",
  21336. "enum": ["sessionID"]
  21337. },
  21338. "data": {
  21339. "type": "object",
  21340. "properties": {
  21341. "timestamp": {
  21342. "type": "number"
  21343. },
  21344. "sessionID": {
  21345. "type": "string",
  21346. "pattern": "^ses"
  21347. },
  21348. "reason": {
  21349. "type": "string",
  21350. "enum": ["auto", "manual"]
  21351. }
  21352. },
  21353. "required": ["timestamp", "sessionID", "reason"],
  21354. "additionalProperties": false
  21355. }
  21356. },
  21357. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21358. "additionalProperties": false
  21359. },
  21360. "SyncEventSessionNextCompactionDelta": {
  21361. "type": "object",
  21362. "properties": {
  21363. "type": {
  21364. "type": "string",
  21365. "enum": ["sync"]
  21366. },
  21367. "name": {
  21368. "type": "string",
  21369. "enum": ["session.next.compaction.delta.1"]
  21370. },
  21371. "id": {
  21372. "type": "string"
  21373. },
  21374. "seq": {
  21375. "type": "number"
  21376. },
  21377. "aggregateID": {
  21378. "type": "string",
  21379. "enum": ["sessionID"]
  21380. },
  21381. "data": {
  21382. "type": "object",
  21383. "properties": {
  21384. "timestamp": {
  21385. "type": "number"
  21386. },
  21387. "sessionID": {
  21388. "type": "string",
  21389. "pattern": "^ses"
  21390. },
  21391. "text": {
  21392. "type": "string"
  21393. }
  21394. },
  21395. "required": ["timestamp", "sessionID", "text"],
  21396. "additionalProperties": false
  21397. }
  21398. },
  21399. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21400. "additionalProperties": false
  21401. },
  21402. "SyncEventSessionNextCompactionEnded": {
  21403. "type": "object",
  21404. "properties": {
  21405. "type": {
  21406. "type": "string",
  21407. "enum": ["sync"]
  21408. },
  21409. "name": {
  21410. "type": "string",
  21411. "enum": ["session.next.compaction.ended.1"]
  21412. },
  21413. "id": {
  21414. "type": "string"
  21415. },
  21416. "seq": {
  21417. "type": "number"
  21418. },
  21419. "aggregateID": {
  21420. "type": "string",
  21421. "enum": ["sessionID"]
  21422. },
  21423. "data": {
  21424. "type": "object",
  21425. "properties": {
  21426. "timestamp": {
  21427. "type": "number"
  21428. },
  21429. "sessionID": {
  21430. "type": "string",
  21431. "pattern": "^ses"
  21432. },
  21433. "text": {
  21434. "type": "string"
  21435. },
  21436. "include": {
  21437. "type": "string"
  21438. }
  21439. },
  21440. "required": ["timestamp", "sessionID", "text"],
  21441. "additionalProperties": false
  21442. }
  21443. },
  21444. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21445. "additionalProperties": false
  21446. },
  21447. "PolicyEffect": {
  21448. "type": "string",
  21449. "enum": ["allow", "deny"]
  21450. },
  21451. "ConfigV2ExperimentalPolicy": {
  21452. "type": "object",
  21453. "properties": {
  21454. "action": {
  21455. "type": "string",
  21456. "enum": ["provider.use"]
  21457. },
  21458. "effect": {
  21459. "$ref": "#/components/schemas/PolicyEffect"
  21460. },
  21461. "resource": {
  21462. "type": "string"
  21463. }
  21464. },
  21465. "required": ["action", "effect", "resource"],
  21466. "additionalProperties": false
  21467. },
  21468. "ProjectDirectories": {
  21469. "type": "array",
  21470. "items": {
  21471. "type": "string"
  21472. }
  21473. },
  21474. "ProjectCopyCopy": {
  21475. "type": "object",
  21476. "properties": {
  21477. "directory": {
  21478. "type": "string"
  21479. }
  21480. },
  21481. "required": ["directory"],
  21482. "additionalProperties": false
  21483. },
  21484. "LocationRef": {
  21485. "type": "object",
  21486. "properties": {
  21487. "directory": {
  21488. "type": "string"
  21489. },
  21490. "workspaceID": {
  21491. "type": "string"
  21492. }
  21493. },
  21494. "required": ["directory"],
  21495. "additionalProperties": false
  21496. },
  21497. "SessionV2Info": {
  21498. "type": "object",
  21499. "properties": {
  21500. "id": {
  21501. "type": "string",
  21502. "pattern": "^ses"
  21503. },
  21504. "parentID": {
  21505. "type": "string",
  21506. "pattern": "^ses"
  21507. },
  21508. "projectID": {
  21509. "type": "string"
  21510. },
  21511. "agent": {
  21512. "type": "string"
  21513. },
  21514. "model": {
  21515. "type": "object",
  21516. "properties": {
  21517. "id": {
  21518. "type": "string"
  21519. },
  21520. "providerID": {
  21521. "type": "string"
  21522. },
  21523. "variant": {
  21524. "type": "string"
  21525. }
  21526. },
  21527. "required": ["id", "providerID"],
  21528. "additionalProperties": false
  21529. },
  21530. "cost": {
  21531. "type": "number"
  21532. },
  21533. "tokens": {
  21534. "type": "object",
  21535. "properties": {
  21536. "input": {
  21537. "type": "number"
  21538. },
  21539. "output": {
  21540. "type": "number"
  21541. },
  21542. "reasoning": {
  21543. "type": "number"
  21544. },
  21545. "cache": {
  21546. "type": "object",
  21547. "properties": {
  21548. "read": {
  21549. "type": "number"
  21550. },
  21551. "write": {
  21552. "type": "number"
  21553. }
  21554. },
  21555. "required": ["read", "write"],
  21556. "additionalProperties": false
  21557. }
  21558. },
  21559. "required": ["input", "output", "reasoning", "cache"],
  21560. "additionalProperties": false
  21561. },
  21562. "time": {
  21563. "type": "object",
  21564. "properties": {
  21565. "created": {
  21566. "type": "number"
  21567. },
  21568. "updated": {
  21569. "type": "number"
  21570. },
  21571. "archived": {
  21572. "type": "number"
  21573. }
  21574. },
  21575. "required": ["created", "updated"],
  21576. "additionalProperties": false
  21577. },
  21578. "title": {
  21579. "type": "string"
  21580. },
  21581. "location": {
  21582. "$ref": "#/components/schemas/LocationRef"
  21583. },
  21584. "subpath": {
  21585. "type": "string"
  21586. }
  21587. },
  21588. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  21589. "additionalProperties": false
  21590. },
  21591. "SessionDelivery": {
  21592. "type": "string",
  21593. "enum": ["immediate", "deferred"]
  21594. },
  21595. "SessionMessageAgentSwitched": {
  21596. "type": "object",
  21597. "properties": {
  21598. "id": {
  21599. "type": "string"
  21600. },
  21601. "metadata": {
  21602. "type": "object"
  21603. },
  21604. "time": {
  21605. "type": "object",
  21606. "properties": {
  21607. "created": {
  21608. "type": "number"
  21609. }
  21610. },
  21611. "required": ["created"],
  21612. "additionalProperties": false
  21613. },
  21614. "type": {
  21615. "type": "string",
  21616. "enum": ["agent-switched"]
  21617. },
  21618. "agent": {
  21619. "type": "string"
  21620. }
  21621. },
  21622. "required": ["id", "time", "type", "agent"],
  21623. "additionalProperties": false
  21624. },
  21625. "SessionMessageModelSwitched": {
  21626. "type": "object",
  21627. "properties": {
  21628. "id": {
  21629. "type": "string"
  21630. },
  21631. "metadata": {
  21632. "type": "object"
  21633. },
  21634. "time": {
  21635. "type": "object",
  21636. "properties": {
  21637. "created": {
  21638. "type": "number"
  21639. }
  21640. },
  21641. "required": ["created"],
  21642. "additionalProperties": false
  21643. },
  21644. "type": {
  21645. "type": "string",
  21646. "enum": ["model-switched"]
  21647. },
  21648. "model": {
  21649. "type": "object",
  21650. "properties": {
  21651. "id": {
  21652. "type": "string"
  21653. },
  21654. "providerID": {
  21655. "type": "string"
  21656. },
  21657. "variant": {
  21658. "type": "string"
  21659. }
  21660. },
  21661. "required": ["id", "providerID"],
  21662. "additionalProperties": false
  21663. }
  21664. },
  21665. "required": ["id", "time", "type", "model"],
  21666. "additionalProperties": false
  21667. },
  21668. "SessionMessageUser": {
  21669. "type": "object",
  21670. "properties": {
  21671. "id": {
  21672. "type": "string"
  21673. },
  21674. "metadata": {
  21675. "type": "object"
  21676. },
  21677. "time": {
  21678. "type": "object",
  21679. "properties": {
  21680. "created": {
  21681. "type": "number"
  21682. }
  21683. },
  21684. "required": ["created"],
  21685. "additionalProperties": false
  21686. },
  21687. "text": {
  21688. "type": "string"
  21689. },
  21690. "files": {
  21691. "type": "array",
  21692. "items": {
  21693. "$ref": "#/components/schemas/PromptFileAttachment"
  21694. }
  21695. },
  21696. "agents": {
  21697. "type": "array",
  21698. "items": {
  21699. "$ref": "#/components/schemas/PromptAgentAttachment"
  21700. }
  21701. },
  21702. "references": {
  21703. "type": "array",
  21704. "items": {
  21705. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21706. }
  21707. },
  21708. "type": {
  21709. "type": "string",
  21710. "enum": ["user"]
  21711. }
  21712. },
  21713. "required": ["id", "time", "text", "type"],
  21714. "additionalProperties": false
  21715. },
  21716. "SessionMessageSynthetic": {
  21717. "type": "object",
  21718. "properties": {
  21719. "id": {
  21720. "type": "string"
  21721. },
  21722. "metadata": {
  21723. "type": "object"
  21724. },
  21725. "time": {
  21726. "type": "object",
  21727. "properties": {
  21728. "created": {
  21729. "type": "number"
  21730. }
  21731. },
  21732. "required": ["created"],
  21733. "additionalProperties": false
  21734. },
  21735. "sessionID": {
  21736. "type": "string",
  21737. "pattern": "^ses"
  21738. },
  21739. "text": {
  21740. "type": "string"
  21741. },
  21742. "type": {
  21743. "type": "string",
  21744. "enum": ["synthetic"]
  21745. }
  21746. },
  21747. "required": ["id", "time", "sessionID", "text", "type"],
  21748. "additionalProperties": false
  21749. },
  21750. "SessionMessageShell": {
  21751. "type": "object",
  21752. "properties": {
  21753. "id": {
  21754. "type": "string"
  21755. },
  21756. "metadata": {
  21757. "type": "object"
  21758. },
  21759. "time": {
  21760. "type": "object",
  21761. "properties": {
  21762. "created": {
  21763. "type": "number"
  21764. },
  21765. "completed": {
  21766. "type": "number"
  21767. }
  21768. },
  21769. "required": ["created"],
  21770. "additionalProperties": false
  21771. },
  21772. "type": {
  21773. "type": "string",
  21774. "enum": ["shell"]
  21775. },
  21776. "callID": {
  21777. "type": "string"
  21778. },
  21779. "command": {
  21780. "type": "string"
  21781. },
  21782. "output": {
  21783. "type": "string"
  21784. }
  21785. },
  21786. "required": ["id", "time", "type", "callID", "command", "output"],
  21787. "additionalProperties": false
  21788. },
  21789. "SessionMessageAssistantText": {
  21790. "type": "object",
  21791. "properties": {
  21792. "type": {
  21793. "type": "string",
  21794. "enum": ["text"]
  21795. },
  21796. "text": {
  21797. "type": "string"
  21798. }
  21799. },
  21800. "required": ["type", "text"],
  21801. "additionalProperties": false
  21802. },
  21803. "SessionMessageAssistantReasoning": {
  21804. "type": "object",
  21805. "properties": {
  21806. "type": {
  21807. "type": "string",
  21808. "enum": ["reasoning"]
  21809. },
  21810. "id": {
  21811. "type": "string"
  21812. },
  21813. "text": {
  21814. "type": "string"
  21815. }
  21816. },
  21817. "required": ["type", "id", "text"],
  21818. "additionalProperties": false
  21819. },
  21820. "SessionMessageToolStatePending": {
  21821. "type": "object",
  21822. "properties": {
  21823. "status": {
  21824. "type": "string",
  21825. "enum": ["pending"]
  21826. },
  21827. "input": {
  21828. "type": "string"
  21829. }
  21830. },
  21831. "required": ["status", "input"],
  21832. "additionalProperties": false
  21833. },
  21834. "SessionMessageToolStateRunning": {
  21835. "type": "object",
  21836. "properties": {
  21837. "status": {
  21838. "type": "string",
  21839. "enum": ["running"]
  21840. },
  21841. "input": {
  21842. "type": "object"
  21843. },
  21844. "structured": {
  21845. "type": "object"
  21846. },
  21847. "content": {
  21848. "type": "array",
  21849. "items": {
  21850. "anyOf": [
  21851. {
  21852. "$ref": "#/components/schemas/ToolTextContent"
  21853. },
  21854. {
  21855. "$ref": "#/components/schemas/ToolFileContent"
  21856. }
  21857. ]
  21858. }
  21859. }
  21860. },
  21861. "required": ["status", "input", "structured", "content"],
  21862. "additionalProperties": false
  21863. },
  21864. "SessionMessageToolStateCompleted": {
  21865. "type": "object",
  21866. "properties": {
  21867. "status": {
  21868. "type": "string",
  21869. "enum": ["completed"]
  21870. },
  21871. "input": {
  21872. "type": "object"
  21873. },
  21874. "attachments": {
  21875. "type": "array",
  21876. "items": {
  21877. "$ref": "#/components/schemas/PromptFileAttachment"
  21878. }
  21879. },
  21880. "content": {
  21881. "type": "array",
  21882. "items": {
  21883. "anyOf": [
  21884. {
  21885. "$ref": "#/components/schemas/ToolTextContent"
  21886. },
  21887. {
  21888. "$ref": "#/components/schemas/ToolFileContent"
  21889. }
  21890. ]
  21891. }
  21892. },
  21893. "structured": {
  21894. "type": "object"
  21895. }
  21896. },
  21897. "required": ["status", "input", "content", "structured"],
  21898. "additionalProperties": false
  21899. },
  21900. "SessionMessageToolStateError": {
  21901. "type": "object",
  21902. "properties": {
  21903. "status": {
  21904. "type": "string",
  21905. "enum": ["error"]
  21906. },
  21907. "input": {
  21908. "type": "object"
  21909. },
  21910. "content": {
  21911. "type": "array",
  21912. "items": {
  21913. "anyOf": [
  21914. {
  21915. "$ref": "#/components/schemas/ToolTextContent"
  21916. },
  21917. {
  21918. "$ref": "#/components/schemas/ToolFileContent"
  21919. }
  21920. ]
  21921. }
  21922. },
  21923. "structured": {
  21924. "type": "object"
  21925. },
  21926. "error": {
  21927. "$ref": "#/components/schemas/SessionErrorUnknown"
  21928. }
  21929. },
  21930. "required": ["status", "input", "content", "structured", "error"],
  21931. "additionalProperties": false
  21932. },
  21933. "SessionMessageAssistantTool": {
  21934. "type": "object",
  21935. "properties": {
  21936. "type": {
  21937. "type": "string",
  21938. "enum": ["tool"]
  21939. },
  21940. "id": {
  21941. "type": "string"
  21942. },
  21943. "name": {
  21944. "type": "string"
  21945. },
  21946. "provider": {
  21947. "type": "object",
  21948. "properties": {
  21949. "executed": {
  21950. "type": "boolean"
  21951. },
  21952. "metadata": {
  21953. "type": "object"
  21954. }
  21955. },
  21956. "required": ["executed"],
  21957. "additionalProperties": false
  21958. },
  21959. "state": {
  21960. "anyOf": [
  21961. {
  21962. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21963. },
  21964. {
  21965. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21966. },
  21967. {
  21968. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21969. },
  21970. {
  21971. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21972. }
  21973. ]
  21974. },
  21975. "time": {
  21976. "type": "object",
  21977. "properties": {
  21978. "created": {
  21979. "type": "number"
  21980. },
  21981. "ran": {
  21982. "type": "number"
  21983. },
  21984. "completed": {
  21985. "type": "number"
  21986. },
  21987. "pruned": {
  21988. "type": "number"
  21989. }
  21990. },
  21991. "required": ["created"],
  21992. "additionalProperties": false
  21993. }
  21994. },
  21995. "required": ["type", "id", "name", "state", "time"],
  21996. "additionalProperties": false
  21997. },
  21998. "SessionMessageAssistant": {
  21999. "type": "object",
  22000. "properties": {
  22001. "id": {
  22002. "type": "string"
  22003. },
  22004. "metadata": {
  22005. "type": "object"
  22006. },
  22007. "time": {
  22008. "type": "object",
  22009. "properties": {
  22010. "created": {
  22011. "type": "number"
  22012. },
  22013. "completed": {
  22014. "type": "number"
  22015. }
  22016. },
  22017. "required": ["created"],
  22018. "additionalProperties": false
  22019. },
  22020. "type": {
  22021. "type": "string",
  22022. "enum": ["assistant"]
  22023. },
  22024. "agent": {
  22025. "type": "string"
  22026. },
  22027. "model": {
  22028. "type": "object",
  22029. "properties": {
  22030. "id": {
  22031. "type": "string"
  22032. },
  22033. "providerID": {
  22034. "type": "string"
  22035. },
  22036. "variant": {
  22037. "type": "string"
  22038. }
  22039. },
  22040. "required": ["id", "providerID"],
  22041. "additionalProperties": false
  22042. },
  22043. "content": {
  22044. "type": "array",
  22045. "items": {
  22046. "anyOf": [
  22047. {
  22048. "$ref": "#/components/schemas/SessionMessageAssistantText"
  22049. },
  22050. {
  22051. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  22052. },
  22053. {
  22054. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  22055. }
  22056. ]
  22057. }
  22058. },
  22059. "snapshot": {
  22060. "type": "object",
  22061. "properties": {
  22062. "start": {
  22063. "type": "string"
  22064. },
  22065. "end": {
  22066. "type": "string"
  22067. }
  22068. },
  22069. "additionalProperties": false
  22070. },
  22071. "finish": {
  22072. "type": "string"
  22073. },
  22074. "cost": {
  22075. "type": "number"
  22076. },
  22077. "tokens": {
  22078. "type": "object",
  22079. "properties": {
  22080. "input": {
  22081. "type": "number"
  22082. },
  22083. "output": {
  22084. "type": "number"
  22085. },
  22086. "reasoning": {
  22087. "type": "number"
  22088. },
  22089. "cache": {
  22090. "type": "object",
  22091. "properties": {
  22092. "read": {
  22093. "type": "number"
  22094. },
  22095. "write": {
  22096. "type": "number"
  22097. }
  22098. },
  22099. "required": ["read", "write"],
  22100. "additionalProperties": false
  22101. }
  22102. },
  22103. "required": ["input", "output", "reasoning", "cache"],
  22104. "additionalProperties": false
  22105. },
  22106. "error": {
  22107. "$ref": "#/components/schemas/SessionErrorUnknown"
  22108. }
  22109. },
  22110. "required": ["id", "time", "type", "agent", "model", "content"],
  22111. "additionalProperties": false
  22112. },
  22113. "SessionMessageCompaction": {
  22114. "type": "object",
  22115. "properties": {
  22116. "type": {
  22117. "type": "string",
  22118. "enum": ["compaction"]
  22119. },
  22120. "reason": {
  22121. "type": "string",
  22122. "enum": ["auto", "manual"]
  22123. },
  22124. "summary": {
  22125. "type": "string"
  22126. },
  22127. "include": {
  22128. "type": "string"
  22129. },
  22130. "id": {
  22131. "type": "string"
  22132. },
  22133. "metadata": {
  22134. "type": "object"
  22135. },
  22136. "time": {
  22137. "type": "object",
  22138. "properties": {
  22139. "created": {
  22140. "type": "number"
  22141. }
  22142. },
  22143. "required": ["created"],
  22144. "additionalProperties": false
  22145. }
  22146. },
  22147. "required": ["type", "reason", "summary", "id", "time"],
  22148. "additionalProperties": false
  22149. },
  22150. "SessionMessage": {
  22151. "anyOf": [
  22152. {
  22153. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  22154. },
  22155. {
  22156. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  22157. },
  22158. {
  22159. "$ref": "#/components/schemas/SessionMessageUser"
  22160. },
  22161. {
  22162. "$ref": "#/components/schemas/SessionMessageSynthetic"
  22163. },
  22164. {
  22165. "$ref": "#/components/schemas/SessionMessageShell"
  22166. },
  22167. {
  22168. "$ref": "#/components/schemas/SessionMessageAssistant"
  22169. },
  22170. {
  22171. "$ref": "#/components/schemas/SessionMessageCompaction"
  22172. }
  22173. ]
  22174. },
  22175. "ProviderV2Info": {
  22176. "type": "object",
  22177. "properties": {
  22178. "id": {
  22179. "type": "string"
  22180. },
  22181. "name": {
  22182. "type": "string"
  22183. },
  22184. "enabled": {
  22185. "anyOf": [
  22186. {
  22187. "type": "boolean",
  22188. "enum": [false]
  22189. },
  22190. {
  22191. "type": "object",
  22192. "properties": {
  22193. "via": {
  22194. "type": "string",
  22195. "enum": ["env"]
  22196. },
  22197. "name": {
  22198. "type": "string"
  22199. }
  22200. },
  22201. "required": ["via", "name"],
  22202. "additionalProperties": false
  22203. },
  22204. {
  22205. "type": "object",
  22206. "properties": {
  22207. "via": {
  22208. "type": "string",
  22209. "enum": ["account"]
  22210. },
  22211. "service": {
  22212. "type": "string"
  22213. }
  22214. },
  22215. "required": ["via", "service"],
  22216. "additionalProperties": false
  22217. },
  22218. {
  22219. "type": "object",
  22220. "properties": {
  22221. "via": {
  22222. "type": "string",
  22223. "enum": ["custom"]
  22224. },
  22225. "data": {
  22226. "type": "object"
  22227. }
  22228. },
  22229. "required": ["via", "data"],
  22230. "additionalProperties": false
  22231. }
  22232. ]
  22233. },
  22234. "env": {
  22235. "type": "array",
  22236. "items": {
  22237. "type": "string"
  22238. }
  22239. },
  22240. "endpoint": {
  22241. "anyOf": [
  22242. {
  22243. "type": "object",
  22244. "properties": {
  22245. "type": {
  22246. "type": "string",
  22247. "enum": ["unknown"]
  22248. }
  22249. },
  22250. "required": ["type"],
  22251. "additionalProperties": false
  22252. },
  22253. {
  22254. "type": "object",
  22255. "properties": {
  22256. "type": {
  22257. "type": "string",
  22258. "enum": ["openai/responses"]
  22259. },
  22260. "url": {
  22261. "type": "string"
  22262. },
  22263. "websocket": {
  22264. "type": "boolean"
  22265. }
  22266. },
  22267. "required": ["type", "url"],
  22268. "additionalProperties": false
  22269. },
  22270. {
  22271. "type": "object",
  22272. "properties": {
  22273. "type": {
  22274. "type": "string",
  22275. "enum": ["openai/completions"]
  22276. },
  22277. "url": {
  22278. "type": "string"
  22279. },
  22280. "reasoning": {
  22281. "anyOf": [
  22282. {
  22283. "type": "object",
  22284. "properties": {
  22285. "type": {
  22286. "type": "string",
  22287. "enum": ["reasoning_content"]
  22288. }
  22289. },
  22290. "required": ["type"],
  22291. "additionalProperties": false
  22292. },
  22293. {
  22294. "type": "object",
  22295. "properties": {
  22296. "type": {
  22297. "type": "string",
  22298. "enum": ["reasoning_details"]
  22299. }
  22300. },
  22301. "required": ["type"],
  22302. "additionalProperties": false
  22303. }
  22304. ]
  22305. }
  22306. },
  22307. "required": ["type", "url"],
  22308. "additionalProperties": false
  22309. },
  22310. {
  22311. "type": "object",
  22312. "properties": {
  22313. "type": {
  22314. "type": "string",
  22315. "enum": ["anthropic/messages"]
  22316. },
  22317. "url": {
  22318. "type": "string"
  22319. }
  22320. },
  22321. "required": ["type", "url"],
  22322. "additionalProperties": false
  22323. },
  22324. {
  22325. "type": "object",
  22326. "properties": {
  22327. "type": {
  22328. "type": "string",
  22329. "enum": ["aisdk"]
  22330. },
  22331. "package": {
  22332. "type": "string"
  22333. },
  22334. "url": {
  22335. "type": "string"
  22336. }
  22337. },
  22338. "required": ["type", "package"],
  22339. "additionalProperties": false
  22340. }
  22341. ]
  22342. },
  22343. "options": {
  22344. "type": "object",
  22345. "properties": {
  22346. "headers": {
  22347. "type": "object",
  22348. "additionalProperties": {
  22349. "type": "string"
  22350. }
  22351. },
  22352. "body": {
  22353. "type": "object"
  22354. },
  22355. "aisdk": {
  22356. "type": "object",
  22357. "properties": {
  22358. "provider": {
  22359. "type": "object"
  22360. },
  22361. "request": {
  22362. "type": "object"
  22363. }
  22364. },
  22365. "required": ["provider", "request"],
  22366. "additionalProperties": false
  22367. }
  22368. },
  22369. "required": ["headers", "body", "aisdk"],
  22370. "additionalProperties": false
  22371. }
  22372. },
  22373. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  22374. "additionalProperties": false
  22375. },
  22376. "PermissionV2Request": {
  22377. "type": "object",
  22378. "properties": {
  22379. "id": {
  22380. "type": "string",
  22381. "pattern": "^per"
  22382. },
  22383. "sessionID": {
  22384. "type": "string",
  22385. "pattern": "^ses"
  22386. },
  22387. "action": {
  22388. "type": "string"
  22389. },
  22390. "resources": {
  22391. "type": "array",
  22392. "items": {
  22393. "type": "string"
  22394. }
  22395. },
  22396. "save": {
  22397. "type": "array",
  22398. "items": {
  22399. "type": "string"
  22400. }
  22401. },
  22402. "metadata": {
  22403. "type": "object"
  22404. },
  22405. "source": {
  22406. "$ref": "#/components/schemas/PermissionV2Source"
  22407. }
  22408. },
  22409. "required": ["id", "sessionID", "action", "resources"],
  22410. "additionalProperties": false
  22411. },
  22412. "PermissionSavedInfo": {
  22413. "type": "object",
  22414. "properties": {
  22415. "id": {
  22416. "type": "string"
  22417. },
  22418. "projectID": {
  22419. "type": "string"
  22420. },
  22421. "action": {
  22422. "type": "string"
  22423. },
  22424. "resource": {
  22425. "type": "string"
  22426. }
  22427. },
  22428. "required": ["id", "projectID", "action", "resource"],
  22429. "additionalProperties": false
  22430. },
  22431. "LocationFileSystemTextContent": {
  22432. "type": "object",
  22433. "properties": {
  22434. "type": {
  22435. "type": "string",
  22436. "enum": ["text"]
  22437. },
  22438. "content": {
  22439. "type": "string"
  22440. },
  22441. "mime": {
  22442. "type": "string"
  22443. }
  22444. },
  22445. "required": ["type", "content", "mime"],
  22446. "additionalProperties": false
  22447. },
  22448. "LocationFileSystemBinaryContent": {
  22449. "type": "object",
  22450. "properties": {
  22451. "type": {
  22452. "type": "string",
  22453. "enum": ["binary"]
  22454. },
  22455. "content": {
  22456. "type": "string"
  22457. },
  22458. "encoding": {
  22459. "type": "string",
  22460. "enum": ["base64"]
  22461. },
  22462. "mime": {
  22463. "type": "string"
  22464. }
  22465. },
  22466. "required": ["type", "content", "encoding", "mime"],
  22467. "additionalProperties": false
  22468. },
  22469. "LocationFileSystemEntry": {
  22470. "type": "object",
  22471. "properties": {
  22472. "path": {
  22473. "type": "string"
  22474. },
  22475. "uri": {
  22476. "type": "string"
  22477. },
  22478. "type": {
  22479. "type": "string",
  22480. "enum": ["file", "directory"]
  22481. },
  22482. "mime": {
  22483. "type": "string"
  22484. }
  22485. },
  22486. "required": ["path", "uri", "type", "mime"],
  22487. "additionalProperties": false
  22488. },
  22489. "EventModels-devRefreshed": {
  22490. "type": "object",
  22491. "properties": {
  22492. "id": {
  22493. "type": "string"
  22494. },
  22495. "type": {
  22496. "type": "string",
  22497. "enum": ["models-dev.refreshed"]
  22498. },
  22499. "properties": {
  22500. "type": "object",
  22501. "properties": {}
  22502. }
  22503. },
  22504. "required": ["id", "type", "properties"],
  22505. "additionalProperties": false
  22506. },
  22507. "EventPluginAdded": {
  22508. "type": "object",
  22509. "properties": {
  22510. "id": {
  22511. "type": "string"
  22512. },
  22513. "type": {
  22514. "type": "string",
  22515. "enum": ["plugin.added"]
  22516. },
  22517. "properties": {
  22518. "type": "object",
  22519. "properties": {
  22520. "id": {
  22521. "type": "string"
  22522. }
  22523. },
  22524. "required": ["id"],
  22525. "additionalProperties": false
  22526. }
  22527. },
  22528. "required": ["id", "type", "properties"],
  22529. "additionalProperties": false
  22530. },
  22531. "ModelV2Info1": {
  22532. "type": "object",
  22533. "properties": {
  22534. "id": {
  22535. "type": "string"
  22536. },
  22537. "apiID": {
  22538. "type": "string"
  22539. },
  22540. "providerID": {
  22541. "type": "string"
  22542. },
  22543. "family": {
  22544. "type": "string"
  22545. },
  22546. "name": {
  22547. "type": "string"
  22548. },
  22549. "endpoint": {
  22550. "anyOf": [
  22551. {
  22552. "type": "object",
  22553. "properties": {
  22554. "type": {
  22555. "type": "string",
  22556. "enum": ["unknown"]
  22557. }
  22558. },
  22559. "required": ["type"],
  22560. "additionalProperties": false
  22561. },
  22562. {
  22563. "type": "object",
  22564. "properties": {
  22565. "type": {
  22566. "type": "string",
  22567. "enum": ["openai/responses"]
  22568. },
  22569. "url": {
  22570. "type": "string"
  22571. },
  22572. "websocket": {
  22573. "type": "boolean"
  22574. }
  22575. },
  22576. "required": ["type", "url"],
  22577. "additionalProperties": false
  22578. },
  22579. {
  22580. "type": "object",
  22581. "properties": {
  22582. "type": {
  22583. "type": "string",
  22584. "enum": ["openai/completions"]
  22585. },
  22586. "url": {
  22587. "type": "string"
  22588. },
  22589. "reasoning": {
  22590. "anyOf": [
  22591. {
  22592. "type": "object",
  22593. "properties": {
  22594. "type": {
  22595. "type": "string",
  22596. "enum": ["reasoning_content"]
  22597. }
  22598. },
  22599. "required": ["type"],
  22600. "additionalProperties": false
  22601. },
  22602. {
  22603. "type": "object",
  22604. "properties": {
  22605. "type": {
  22606. "type": "string",
  22607. "enum": ["reasoning_details"]
  22608. }
  22609. },
  22610. "required": ["type"],
  22611. "additionalProperties": false
  22612. }
  22613. ]
  22614. }
  22615. },
  22616. "required": ["type", "url"],
  22617. "additionalProperties": false
  22618. },
  22619. {
  22620. "type": "object",
  22621. "properties": {
  22622. "type": {
  22623. "type": "string",
  22624. "enum": ["anthropic/messages"]
  22625. },
  22626. "url": {
  22627. "type": "string"
  22628. }
  22629. },
  22630. "required": ["type", "url"],
  22631. "additionalProperties": false
  22632. },
  22633. {
  22634. "type": "object",
  22635. "properties": {
  22636. "type": {
  22637. "type": "string",
  22638. "enum": ["aisdk"]
  22639. },
  22640. "package": {
  22641. "type": "string"
  22642. },
  22643. "url": {
  22644. "type": "string"
  22645. }
  22646. },
  22647. "required": ["type", "package"],
  22648. "additionalProperties": false
  22649. }
  22650. ]
  22651. },
  22652. "capabilities": {
  22653. "type": "object",
  22654. "properties": {
  22655. "tools": {
  22656. "type": "boolean"
  22657. },
  22658. "input": {
  22659. "type": "array",
  22660. "items": {
  22661. "type": "string"
  22662. }
  22663. },
  22664. "output": {
  22665. "type": "array",
  22666. "items": {
  22667. "type": "string"
  22668. }
  22669. }
  22670. },
  22671. "required": ["tools", "input", "output"],
  22672. "additionalProperties": false
  22673. },
  22674. "options": {
  22675. "type": "object",
  22676. "properties": {
  22677. "headers": {
  22678. "type": "object",
  22679. "additionalProperties": {
  22680. "type": "string"
  22681. }
  22682. },
  22683. "body": {
  22684. "type": "object"
  22685. },
  22686. "aisdk": {
  22687. "type": "object",
  22688. "properties": {
  22689. "provider": {
  22690. "type": "object"
  22691. },
  22692. "request": {
  22693. "type": "object"
  22694. }
  22695. },
  22696. "required": ["provider", "request"],
  22697. "additionalProperties": false
  22698. },
  22699. "variant": {
  22700. "type": "string"
  22701. }
  22702. },
  22703. "required": ["headers", "body", "aisdk"],
  22704. "additionalProperties": false
  22705. },
  22706. "variants": {
  22707. "type": "array",
  22708. "items": {
  22709. "type": "object",
  22710. "properties": {
  22711. "id": {
  22712. "type": "string"
  22713. },
  22714. "headers": {
  22715. "type": "object",
  22716. "additionalProperties": {
  22717. "type": "string"
  22718. }
  22719. },
  22720. "body": {
  22721. "type": "object"
  22722. },
  22723. "aisdk": {
  22724. "type": "object",
  22725. "properties": {
  22726. "provider": {
  22727. "type": "object"
  22728. },
  22729. "request": {
  22730. "type": "object"
  22731. }
  22732. },
  22733. "required": ["provider", "request"],
  22734. "additionalProperties": false
  22735. }
  22736. },
  22737. "required": ["id", "headers", "body", "aisdk"],
  22738. "additionalProperties": false
  22739. }
  22740. },
  22741. "time": {
  22742. "type": "object",
  22743. "properties": {
  22744. "released": {
  22745. "anyOf": [
  22746. {
  22747. "type": "number"
  22748. },
  22749. {
  22750. "type": "string",
  22751. "enum": ["NaN"]
  22752. },
  22753. {
  22754. "type": "string",
  22755. "enum": ["Infinity"]
  22756. },
  22757. {
  22758. "type": "string",
  22759. "enum": ["-Infinity"]
  22760. }
  22761. ]
  22762. }
  22763. },
  22764. "required": ["released"],
  22765. "additionalProperties": false
  22766. },
  22767. "cost": {
  22768. "type": "array",
  22769. "items": {
  22770. "type": "object",
  22771. "properties": {
  22772. "tier": {
  22773. "type": "object",
  22774. "properties": {
  22775. "type": {
  22776. "type": "string",
  22777. "enum": ["context"]
  22778. },
  22779. "size": {
  22780. "type": "integer"
  22781. }
  22782. },
  22783. "required": ["type", "size"],
  22784. "additionalProperties": false
  22785. },
  22786. "input": {
  22787. "type": "number"
  22788. },
  22789. "output": {
  22790. "type": "number"
  22791. },
  22792. "cache": {
  22793. "type": "object",
  22794. "properties": {
  22795. "read": {
  22796. "type": "number"
  22797. },
  22798. "write": {
  22799. "type": "number"
  22800. }
  22801. },
  22802. "required": ["read", "write"],
  22803. "additionalProperties": false
  22804. }
  22805. },
  22806. "required": ["input", "output", "cache"],
  22807. "additionalProperties": false
  22808. }
  22809. },
  22810. "status": {
  22811. "type": "string",
  22812. "enum": ["alpha", "beta", "deprecated", "active"]
  22813. },
  22814. "enabled": {
  22815. "type": "boolean"
  22816. },
  22817. "limit": {
  22818. "type": "object",
  22819. "properties": {
  22820. "context": {
  22821. "type": "integer"
  22822. },
  22823. "input": {
  22824. "type": "integer"
  22825. },
  22826. "output": {
  22827. "type": "integer"
  22828. }
  22829. },
  22830. "required": ["context", "output"],
  22831. "additionalProperties": false
  22832. }
  22833. },
  22834. "required": [
  22835. "id",
  22836. "apiID",
  22837. "providerID",
  22838. "name",
  22839. "endpoint",
  22840. "capabilities",
  22841. "options",
  22842. "variants",
  22843. "time",
  22844. "cost",
  22845. "status",
  22846. "enabled",
  22847. "limit"
  22848. ],
  22849. "additionalProperties": false
  22850. },
  22851. "EventCatalogModelUpdated": {
  22852. "type": "object",
  22853. "properties": {
  22854. "id": {
  22855. "type": "string"
  22856. },
  22857. "type": {
  22858. "type": "string",
  22859. "enum": ["catalog.model.updated"]
  22860. },
  22861. "properties": {
  22862. "type": "object",
  22863. "properties": {
  22864. "model": {
  22865. "$ref": "#/components/schemas/ModelV2Info1"
  22866. }
  22867. },
  22868. "required": ["model"],
  22869. "additionalProperties": false
  22870. }
  22871. },
  22872. "required": ["id", "type", "properties"],
  22873. "additionalProperties": false
  22874. },
  22875. "EventSessionCreated": {
  22876. "type": "object",
  22877. "properties": {
  22878. "id": {
  22879. "type": "string"
  22880. },
  22881. "type": {
  22882. "type": "string",
  22883. "enum": ["session.created"]
  22884. },
  22885. "properties": {
  22886. "type": "object",
  22887. "properties": {
  22888. "sessionID": {
  22889. "type": "string",
  22890. "pattern": "^ses"
  22891. },
  22892. "info": {
  22893. "$ref": "#/components/schemas/Session"
  22894. }
  22895. },
  22896. "required": ["sessionID", "info"],
  22897. "additionalProperties": false
  22898. }
  22899. },
  22900. "required": ["id", "type", "properties"],
  22901. "additionalProperties": false
  22902. },
  22903. "EventSessionUpdated": {
  22904. "type": "object",
  22905. "properties": {
  22906. "id": {
  22907. "type": "string"
  22908. },
  22909. "type": {
  22910. "type": "string",
  22911. "enum": ["session.updated"]
  22912. },
  22913. "properties": {
  22914. "type": "object",
  22915. "properties": {
  22916. "sessionID": {
  22917. "type": "string",
  22918. "pattern": "^ses"
  22919. },
  22920. "info": {
  22921. "$ref": "#/components/schemas/Session"
  22922. }
  22923. },
  22924. "required": ["sessionID", "info"],
  22925. "additionalProperties": false
  22926. }
  22927. },
  22928. "required": ["id", "type", "properties"],
  22929. "additionalProperties": false
  22930. },
  22931. "EventSessionDeleted": {
  22932. "type": "object",
  22933. "properties": {
  22934. "id": {
  22935. "type": "string"
  22936. },
  22937. "type": {
  22938. "type": "string",
  22939. "enum": ["session.deleted"]
  22940. },
  22941. "properties": {
  22942. "type": "object",
  22943. "properties": {
  22944. "sessionID": {
  22945. "type": "string",
  22946. "pattern": "^ses"
  22947. },
  22948. "info": {
  22949. "$ref": "#/components/schemas/Session"
  22950. }
  22951. },
  22952. "required": ["sessionID", "info"],
  22953. "additionalProperties": false
  22954. }
  22955. },
  22956. "required": ["id", "type", "properties"],
  22957. "additionalProperties": false
  22958. },
  22959. "EventMessageUpdated": {
  22960. "type": "object",
  22961. "properties": {
  22962. "id": {
  22963. "type": "string"
  22964. },
  22965. "type": {
  22966. "type": "string",
  22967. "enum": ["message.updated"]
  22968. },
  22969. "properties": {
  22970. "type": "object",
  22971. "properties": {
  22972. "sessionID": {
  22973. "type": "string",
  22974. "pattern": "^ses"
  22975. },
  22976. "info": {
  22977. "$ref": "#/components/schemas/Message"
  22978. }
  22979. },
  22980. "required": ["sessionID", "info"],
  22981. "additionalProperties": false
  22982. }
  22983. },
  22984. "required": ["id", "type", "properties"],
  22985. "additionalProperties": false
  22986. },
  22987. "EventMessageRemoved": {
  22988. "type": "object",
  22989. "properties": {
  22990. "id": {
  22991. "type": "string"
  22992. },
  22993. "type": {
  22994. "type": "string",
  22995. "enum": ["message.removed"]
  22996. },
  22997. "properties": {
  22998. "type": "object",
  22999. "properties": {
  23000. "sessionID": {
  23001. "type": "string",
  23002. "pattern": "^ses"
  23003. },
  23004. "messageID": {
  23005. "type": "string",
  23006. "pattern": "^msg"
  23007. }
  23008. },
  23009. "required": ["sessionID", "messageID"],
  23010. "additionalProperties": false
  23011. }
  23012. },
  23013. "required": ["id", "type", "properties"],
  23014. "additionalProperties": false
  23015. },
  23016. "EventMessagePartUpdated": {
  23017. "type": "object",
  23018. "properties": {
  23019. "id": {
  23020. "type": "string"
  23021. },
  23022. "type": {
  23023. "type": "string",
  23024. "enum": ["message.part.updated"]
  23025. },
  23026. "properties": {
  23027. "type": "object",
  23028. "properties": {
  23029. "sessionID": {
  23030. "type": "string",
  23031. "pattern": "^ses"
  23032. },
  23033. "part": {
  23034. "$ref": "#/components/schemas/Part"
  23035. },
  23036. "time": {
  23037. "type": "number"
  23038. }
  23039. },
  23040. "required": ["sessionID", "part", "time"],
  23041. "additionalProperties": false
  23042. }
  23043. },
  23044. "required": ["id", "type", "properties"],
  23045. "additionalProperties": false
  23046. },
  23047. "EventMessagePartRemoved": {
  23048. "type": "object",
  23049. "properties": {
  23050. "id": {
  23051. "type": "string"
  23052. },
  23053. "type": {
  23054. "type": "string",
  23055. "enum": ["message.part.removed"]
  23056. },
  23057. "properties": {
  23058. "type": "object",
  23059. "properties": {
  23060. "sessionID": {
  23061. "type": "string",
  23062. "pattern": "^ses"
  23063. },
  23064. "messageID": {
  23065. "type": "string",
  23066. "pattern": "^msg"
  23067. },
  23068. "partID": {
  23069. "type": "string",
  23070. "pattern": "^prt"
  23071. }
  23072. },
  23073. "required": ["sessionID", "messageID", "partID"],
  23074. "additionalProperties": false
  23075. }
  23076. },
  23077. "required": ["id", "type", "properties"],
  23078. "additionalProperties": false
  23079. },
  23080. "EventSessionNextAgentSwitched": {
  23081. "type": "object",
  23082. "properties": {
  23083. "id": {
  23084. "type": "string"
  23085. },
  23086. "type": {
  23087. "type": "string",
  23088. "enum": ["session.next.agent.switched"]
  23089. },
  23090. "properties": {
  23091. "type": "object",
  23092. "properties": {
  23093. "timestamp": {
  23094. "type": "number"
  23095. },
  23096. "sessionID": {
  23097. "type": "string",
  23098. "pattern": "^ses"
  23099. },
  23100. "agent": {
  23101. "type": "string"
  23102. }
  23103. },
  23104. "required": ["timestamp", "sessionID", "agent"],
  23105. "additionalProperties": false
  23106. }
  23107. },
  23108. "required": ["id", "type", "properties"],
  23109. "additionalProperties": false
  23110. },
  23111. "EventSessionNextModelSwitched": {
  23112. "type": "object",
  23113. "properties": {
  23114. "id": {
  23115. "type": "string"
  23116. },
  23117. "type": {
  23118. "type": "string",
  23119. "enum": ["session.next.model.switched"]
  23120. },
  23121. "properties": {
  23122. "type": "object",
  23123. "properties": {
  23124. "timestamp": {
  23125. "type": "number"
  23126. },
  23127. "sessionID": {
  23128. "type": "string",
  23129. "pattern": "^ses"
  23130. },
  23131. "model": {
  23132. "type": "object",
  23133. "properties": {
  23134. "id": {
  23135. "type": "string"
  23136. },
  23137. "providerID": {
  23138. "type": "string"
  23139. },
  23140. "variant": {
  23141. "type": "string"
  23142. }
  23143. },
  23144. "required": ["id", "providerID"],
  23145. "additionalProperties": false
  23146. }
  23147. },
  23148. "required": ["timestamp", "sessionID", "model"],
  23149. "additionalProperties": false
  23150. }
  23151. },
  23152. "required": ["id", "type", "properties"],
  23153. "additionalProperties": false
  23154. },
  23155. "EventSessionNextPrompted": {
  23156. "type": "object",
  23157. "properties": {
  23158. "id": {
  23159. "type": "string"
  23160. },
  23161. "type": {
  23162. "type": "string",
  23163. "enum": ["session.next.prompted"]
  23164. },
  23165. "properties": {
  23166. "type": "object",
  23167. "properties": {
  23168. "timestamp": {
  23169. "type": "number"
  23170. },
  23171. "sessionID": {
  23172. "type": "string",
  23173. "pattern": "^ses"
  23174. },
  23175. "prompt": {
  23176. "$ref": "#/components/schemas/Prompt"
  23177. }
  23178. },
  23179. "required": ["timestamp", "sessionID", "prompt"],
  23180. "additionalProperties": false
  23181. }
  23182. },
  23183. "required": ["id", "type", "properties"],
  23184. "additionalProperties": false
  23185. },
  23186. "EventSessionNextSynthetic": {
  23187. "type": "object",
  23188. "properties": {
  23189. "id": {
  23190. "type": "string"
  23191. },
  23192. "type": {
  23193. "type": "string",
  23194. "enum": ["session.next.synthetic"]
  23195. },
  23196. "properties": {
  23197. "type": "object",
  23198. "properties": {
  23199. "timestamp": {
  23200. "type": "number"
  23201. },
  23202. "sessionID": {
  23203. "type": "string",
  23204. "pattern": "^ses"
  23205. },
  23206. "text": {
  23207. "type": "string"
  23208. }
  23209. },
  23210. "required": ["timestamp", "sessionID", "text"],
  23211. "additionalProperties": false
  23212. }
  23213. },
  23214. "required": ["id", "type", "properties"],
  23215. "additionalProperties": false
  23216. },
  23217. "EventSessionNextShellStarted": {
  23218. "type": "object",
  23219. "properties": {
  23220. "id": {
  23221. "type": "string"
  23222. },
  23223. "type": {
  23224. "type": "string",
  23225. "enum": ["session.next.shell.started"]
  23226. },
  23227. "properties": {
  23228. "type": "object",
  23229. "properties": {
  23230. "timestamp": {
  23231. "type": "number"
  23232. },
  23233. "sessionID": {
  23234. "type": "string",
  23235. "pattern": "^ses"
  23236. },
  23237. "callID": {
  23238. "type": "string"
  23239. },
  23240. "command": {
  23241. "type": "string"
  23242. }
  23243. },
  23244. "required": ["timestamp", "sessionID", "callID", "command"],
  23245. "additionalProperties": false
  23246. }
  23247. },
  23248. "required": ["id", "type", "properties"],
  23249. "additionalProperties": false
  23250. },
  23251. "EventSessionNextShellEnded": {
  23252. "type": "object",
  23253. "properties": {
  23254. "id": {
  23255. "type": "string"
  23256. },
  23257. "type": {
  23258. "type": "string",
  23259. "enum": ["session.next.shell.ended"]
  23260. },
  23261. "properties": {
  23262. "type": "object",
  23263. "properties": {
  23264. "timestamp": {
  23265. "type": "number"
  23266. },
  23267. "sessionID": {
  23268. "type": "string",
  23269. "pattern": "^ses"
  23270. },
  23271. "callID": {
  23272. "type": "string"
  23273. },
  23274. "output": {
  23275. "type": "string"
  23276. }
  23277. },
  23278. "required": ["timestamp", "sessionID", "callID", "output"],
  23279. "additionalProperties": false
  23280. }
  23281. },
  23282. "required": ["id", "type", "properties"],
  23283. "additionalProperties": false
  23284. },
  23285. "EventSessionNextStepStarted": {
  23286. "type": "object",
  23287. "properties": {
  23288. "id": {
  23289. "type": "string"
  23290. },
  23291. "type": {
  23292. "type": "string",
  23293. "enum": ["session.next.step.started"]
  23294. },
  23295. "properties": {
  23296. "type": "object",
  23297. "properties": {
  23298. "timestamp": {
  23299. "type": "number"
  23300. },
  23301. "sessionID": {
  23302. "type": "string",
  23303. "pattern": "^ses"
  23304. },
  23305. "agent": {
  23306. "type": "string"
  23307. },
  23308. "model": {
  23309. "type": "object",
  23310. "properties": {
  23311. "id": {
  23312. "type": "string"
  23313. },
  23314. "providerID": {
  23315. "type": "string"
  23316. },
  23317. "variant": {
  23318. "type": "string"
  23319. }
  23320. },
  23321. "required": ["id", "providerID"],
  23322. "additionalProperties": false
  23323. },
  23324. "snapshot": {
  23325. "type": "string"
  23326. }
  23327. },
  23328. "required": ["timestamp", "sessionID", "agent", "model"],
  23329. "additionalProperties": false
  23330. }
  23331. },
  23332. "required": ["id", "type", "properties"],
  23333. "additionalProperties": false
  23334. },
  23335. "EventSessionNextStepEnded": {
  23336. "type": "object",
  23337. "properties": {
  23338. "id": {
  23339. "type": "string"
  23340. },
  23341. "type": {
  23342. "type": "string",
  23343. "enum": ["session.next.step.ended"]
  23344. },
  23345. "properties": {
  23346. "type": "object",
  23347. "properties": {
  23348. "timestamp": {
  23349. "type": "number"
  23350. },
  23351. "sessionID": {
  23352. "type": "string",
  23353. "pattern": "^ses"
  23354. },
  23355. "finish": {
  23356. "type": "string"
  23357. },
  23358. "cost": {
  23359. "type": "number"
  23360. },
  23361. "tokens": {
  23362. "type": "object",
  23363. "properties": {
  23364. "input": {
  23365. "type": "number"
  23366. },
  23367. "output": {
  23368. "type": "number"
  23369. },
  23370. "reasoning": {
  23371. "type": "number"
  23372. },
  23373. "cache": {
  23374. "type": "object",
  23375. "properties": {
  23376. "read": {
  23377. "type": "number"
  23378. },
  23379. "write": {
  23380. "type": "number"
  23381. }
  23382. },
  23383. "required": ["read", "write"],
  23384. "additionalProperties": false
  23385. }
  23386. },
  23387. "required": ["input", "output", "reasoning", "cache"],
  23388. "additionalProperties": false
  23389. },
  23390. "snapshot": {
  23391. "type": "string"
  23392. }
  23393. },
  23394. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  23395. "additionalProperties": false
  23396. }
  23397. },
  23398. "required": ["id", "type", "properties"],
  23399. "additionalProperties": false
  23400. },
  23401. "EventSessionNextStepFailed": {
  23402. "type": "object",
  23403. "properties": {
  23404. "id": {
  23405. "type": "string"
  23406. },
  23407. "type": {
  23408. "type": "string",
  23409. "enum": ["session.next.step.failed"]
  23410. },
  23411. "properties": {
  23412. "type": "object",
  23413. "properties": {
  23414. "timestamp": {
  23415. "type": "number"
  23416. },
  23417. "sessionID": {
  23418. "type": "string",
  23419. "pattern": "^ses"
  23420. },
  23421. "error": {
  23422. "$ref": "#/components/schemas/SessionErrorUnknown"
  23423. }
  23424. },
  23425. "required": ["timestamp", "sessionID", "error"],
  23426. "additionalProperties": false
  23427. }
  23428. },
  23429. "required": ["id", "type", "properties"],
  23430. "additionalProperties": false
  23431. },
  23432. "EventSessionNextTextStarted": {
  23433. "type": "object",
  23434. "properties": {
  23435. "id": {
  23436. "type": "string"
  23437. },
  23438. "type": {
  23439. "type": "string",
  23440. "enum": ["session.next.text.started"]
  23441. },
  23442. "properties": {
  23443. "type": "object",
  23444. "properties": {
  23445. "timestamp": {
  23446. "type": "number"
  23447. },
  23448. "sessionID": {
  23449. "type": "string",
  23450. "pattern": "^ses"
  23451. }
  23452. },
  23453. "required": ["timestamp", "sessionID"],
  23454. "additionalProperties": false
  23455. }
  23456. },
  23457. "required": ["id", "type", "properties"],
  23458. "additionalProperties": false
  23459. },
  23460. "EventSessionNextTextDelta": {
  23461. "type": "object",
  23462. "properties": {
  23463. "id": {
  23464. "type": "string"
  23465. },
  23466. "type": {
  23467. "type": "string",
  23468. "enum": ["session.next.text.delta"]
  23469. },
  23470. "properties": {
  23471. "type": "object",
  23472. "properties": {
  23473. "timestamp": {
  23474. "type": "number"
  23475. },
  23476. "sessionID": {
  23477. "type": "string",
  23478. "pattern": "^ses"
  23479. },
  23480. "delta": {
  23481. "type": "string"
  23482. }
  23483. },
  23484. "required": ["timestamp", "sessionID", "delta"],
  23485. "additionalProperties": false
  23486. }
  23487. },
  23488. "required": ["id", "type", "properties"],
  23489. "additionalProperties": false
  23490. },
  23491. "EventSessionNextTextEnded": {
  23492. "type": "object",
  23493. "properties": {
  23494. "id": {
  23495. "type": "string"
  23496. },
  23497. "type": {
  23498. "type": "string",
  23499. "enum": ["session.next.text.ended"]
  23500. },
  23501. "properties": {
  23502. "type": "object",
  23503. "properties": {
  23504. "timestamp": {
  23505. "type": "number"
  23506. },
  23507. "sessionID": {
  23508. "type": "string",
  23509. "pattern": "^ses"
  23510. },
  23511. "text": {
  23512. "type": "string"
  23513. }
  23514. },
  23515. "required": ["timestamp", "sessionID", "text"],
  23516. "additionalProperties": false
  23517. }
  23518. },
  23519. "required": ["id", "type", "properties"],
  23520. "additionalProperties": false
  23521. },
  23522. "EventSessionNextReasoningStarted": {
  23523. "type": "object",
  23524. "properties": {
  23525. "id": {
  23526. "type": "string"
  23527. },
  23528. "type": {
  23529. "type": "string",
  23530. "enum": ["session.next.reasoning.started"]
  23531. },
  23532. "properties": {
  23533. "type": "object",
  23534. "properties": {
  23535. "timestamp": {
  23536. "type": "number"
  23537. },
  23538. "sessionID": {
  23539. "type": "string",
  23540. "pattern": "^ses"
  23541. },
  23542. "reasoningID": {
  23543. "type": "string"
  23544. }
  23545. },
  23546. "required": ["timestamp", "sessionID", "reasoningID"],
  23547. "additionalProperties": false
  23548. }
  23549. },
  23550. "required": ["id", "type", "properties"],
  23551. "additionalProperties": false
  23552. },
  23553. "EventSessionNextReasoningDelta": {
  23554. "type": "object",
  23555. "properties": {
  23556. "id": {
  23557. "type": "string"
  23558. },
  23559. "type": {
  23560. "type": "string",
  23561. "enum": ["session.next.reasoning.delta"]
  23562. },
  23563. "properties": {
  23564. "type": "object",
  23565. "properties": {
  23566. "timestamp": {
  23567. "type": "number"
  23568. },
  23569. "sessionID": {
  23570. "type": "string",
  23571. "pattern": "^ses"
  23572. },
  23573. "reasoningID": {
  23574. "type": "string"
  23575. },
  23576. "delta": {
  23577. "type": "string"
  23578. }
  23579. },
  23580. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  23581. "additionalProperties": false
  23582. }
  23583. },
  23584. "required": ["id", "type", "properties"],
  23585. "additionalProperties": false
  23586. },
  23587. "EventSessionNextReasoningEnded": {
  23588. "type": "object",
  23589. "properties": {
  23590. "id": {
  23591. "type": "string"
  23592. },
  23593. "type": {
  23594. "type": "string",
  23595. "enum": ["session.next.reasoning.ended"]
  23596. },
  23597. "properties": {
  23598. "type": "object",
  23599. "properties": {
  23600. "timestamp": {
  23601. "type": "number"
  23602. },
  23603. "sessionID": {
  23604. "type": "string",
  23605. "pattern": "^ses"
  23606. },
  23607. "reasoningID": {
  23608. "type": "string"
  23609. },
  23610. "text": {
  23611. "type": "string"
  23612. }
  23613. },
  23614. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  23615. "additionalProperties": false
  23616. }
  23617. },
  23618. "required": ["id", "type", "properties"],
  23619. "additionalProperties": false
  23620. },
  23621. "EventSessionNextToolInputStarted": {
  23622. "type": "object",
  23623. "properties": {
  23624. "id": {
  23625. "type": "string"
  23626. },
  23627. "type": {
  23628. "type": "string",
  23629. "enum": ["session.next.tool.input.started"]
  23630. },
  23631. "properties": {
  23632. "type": "object",
  23633. "properties": {
  23634. "timestamp": {
  23635. "type": "number"
  23636. },
  23637. "sessionID": {
  23638. "type": "string",
  23639. "pattern": "^ses"
  23640. },
  23641. "callID": {
  23642. "type": "string"
  23643. },
  23644. "name": {
  23645. "type": "string"
  23646. }
  23647. },
  23648. "required": ["timestamp", "sessionID", "callID", "name"],
  23649. "additionalProperties": false
  23650. }
  23651. },
  23652. "required": ["id", "type", "properties"],
  23653. "additionalProperties": false
  23654. },
  23655. "EventSessionNextToolInputDelta": {
  23656. "type": "object",
  23657. "properties": {
  23658. "id": {
  23659. "type": "string"
  23660. },
  23661. "type": {
  23662. "type": "string",
  23663. "enum": ["session.next.tool.input.delta"]
  23664. },
  23665. "properties": {
  23666. "type": "object",
  23667. "properties": {
  23668. "timestamp": {
  23669. "type": "number"
  23670. },
  23671. "sessionID": {
  23672. "type": "string",
  23673. "pattern": "^ses"
  23674. },
  23675. "callID": {
  23676. "type": "string"
  23677. },
  23678. "delta": {
  23679. "type": "string"
  23680. }
  23681. },
  23682. "required": ["timestamp", "sessionID", "callID", "delta"],
  23683. "additionalProperties": false
  23684. }
  23685. },
  23686. "required": ["id", "type", "properties"],
  23687. "additionalProperties": false
  23688. },
  23689. "EventSessionNextToolInputEnded": {
  23690. "type": "object",
  23691. "properties": {
  23692. "id": {
  23693. "type": "string"
  23694. },
  23695. "type": {
  23696. "type": "string",
  23697. "enum": ["session.next.tool.input.ended"]
  23698. },
  23699. "properties": {
  23700. "type": "object",
  23701. "properties": {
  23702. "timestamp": {
  23703. "type": "number"
  23704. },
  23705. "sessionID": {
  23706. "type": "string",
  23707. "pattern": "^ses"
  23708. },
  23709. "callID": {
  23710. "type": "string"
  23711. },
  23712. "text": {
  23713. "type": "string"
  23714. }
  23715. },
  23716. "required": ["timestamp", "sessionID", "callID", "text"],
  23717. "additionalProperties": false
  23718. }
  23719. },
  23720. "required": ["id", "type", "properties"],
  23721. "additionalProperties": false
  23722. },
  23723. "EventSessionNextToolCalled": {
  23724. "type": "object",
  23725. "properties": {
  23726. "id": {
  23727. "type": "string"
  23728. },
  23729. "type": {
  23730. "type": "string",
  23731. "enum": ["session.next.tool.called"]
  23732. },
  23733. "properties": {
  23734. "type": "object",
  23735. "properties": {
  23736. "timestamp": {
  23737. "type": "number"
  23738. },
  23739. "sessionID": {
  23740. "type": "string",
  23741. "pattern": "^ses"
  23742. },
  23743. "callID": {
  23744. "type": "string"
  23745. },
  23746. "tool": {
  23747. "type": "string"
  23748. },
  23749. "input": {
  23750. "type": "object"
  23751. },
  23752. "provider": {
  23753. "type": "object",
  23754. "properties": {
  23755. "executed": {
  23756. "type": "boolean"
  23757. },
  23758. "metadata": {
  23759. "type": "object"
  23760. }
  23761. },
  23762. "required": ["executed"],
  23763. "additionalProperties": false
  23764. }
  23765. },
  23766. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  23767. "additionalProperties": false
  23768. }
  23769. },
  23770. "required": ["id", "type", "properties"],
  23771. "additionalProperties": false
  23772. },
  23773. "EventSessionNextToolProgress": {
  23774. "type": "object",
  23775. "properties": {
  23776. "id": {
  23777. "type": "string"
  23778. },
  23779. "type": {
  23780. "type": "string",
  23781. "enum": ["session.next.tool.progress"]
  23782. },
  23783. "properties": {
  23784. "type": "object",
  23785. "properties": {
  23786. "timestamp": {
  23787. "type": "number"
  23788. },
  23789. "sessionID": {
  23790. "type": "string",
  23791. "pattern": "^ses"
  23792. },
  23793. "callID": {
  23794. "type": "string"
  23795. },
  23796. "structured": {
  23797. "type": "object"
  23798. },
  23799. "content": {
  23800. "type": "array",
  23801. "items": {
  23802. "anyOf": [
  23803. {
  23804. "$ref": "#/components/schemas/ToolTextContent"
  23805. },
  23806. {
  23807. "$ref": "#/components/schemas/ToolFileContent"
  23808. }
  23809. ]
  23810. }
  23811. }
  23812. },
  23813. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  23814. "additionalProperties": false
  23815. }
  23816. },
  23817. "required": ["id", "type", "properties"],
  23818. "additionalProperties": false
  23819. },
  23820. "EventSessionNextToolSuccess": {
  23821. "type": "object",
  23822. "properties": {
  23823. "id": {
  23824. "type": "string"
  23825. },
  23826. "type": {
  23827. "type": "string",
  23828. "enum": ["session.next.tool.success"]
  23829. },
  23830. "properties": {
  23831. "type": "object",
  23832. "properties": {
  23833. "timestamp": {
  23834. "type": "number"
  23835. },
  23836. "sessionID": {
  23837. "type": "string",
  23838. "pattern": "^ses"
  23839. },
  23840. "callID": {
  23841. "type": "string"
  23842. },
  23843. "structured": {
  23844. "type": "object"
  23845. },
  23846. "content": {
  23847. "type": "array",
  23848. "items": {
  23849. "anyOf": [
  23850. {
  23851. "$ref": "#/components/schemas/ToolTextContent"
  23852. },
  23853. {
  23854. "$ref": "#/components/schemas/ToolFileContent"
  23855. }
  23856. ]
  23857. }
  23858. },
  23859. "provider": {
  23860. "type": "object",
  23861. "properties": {
  23862. "executed": {
  23863. "type": "boolean"
  23864. },
  23865. "metadata": {
  23866. "type": "object"
  23867. }
  23868. },
  23869. "required": ["executed"],
  23870. "additionalProperties": false
  23871. }
  23872. },
  23873. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  23874. "additionalProperties": false
  23875. }
  23876. },
  23877. "required": ["id", "type", "properties"],
  23878. "additionalProperties": false
  23879. },
  23880. "EventSessionNextToolFailed": {
  23881. "type": "object",
  23882. "properties": {
  23883. "id": {
  23884. "type": "string"
  23885. },
  23886. "type": {
  23887. "type": "string",
  23888. "enum": ["session.next.tool.failed"]
  23889. },
  23890. "properties": {
  23891. "type": "object",
  23892. "properties": {
  23893. "timestamp": {
  23894. "type": "number"
  23895. },
  23896. "sessionID": {
  23897. "type": "string",
  23898. "pattern": "^ses"
  23899. },
  23900. "callID": {
  23901. "type": "string"
  23902. },
  23903. "error": {
  23904. "$ref": "#/components/schemas/SessionErrorUnknown"
  23905. },
  23906. "provider": {
  23907. "type": "object",
  23908. "properties": {
  23909. "executed": {
  23910. "type": "boolean"
  23911. },
  23912. "metadata": {
  23913. "type": "object"
  23914. }
  23915. },
  23916. "required": ["executed"],
  23917. "additionalProperties": false
  23918. }
  23919. },
  23920. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  23921. "additionalProperties": false
  23922. }
  23923. },
  23924. "required": ["id", "type", "properties"],
  23925. "additionalProperties": false
  23926. },
  23927. "EventSessionNextRetried": {
  23928. "type": "object",
  23929. "properties": {
  23930. "id": {
  23931. "type": "string"
  23932. },
  23933. "type": {
  23934. "type": "string",
  23935. "enum": ["session.next.retried"]
  23936. },
  23937. "properties": {
  23938. "type": "object",
  23939. "properties": {
  23940. "timestamp": {
  23941. "type": "number"
  23942. },
  23943. "sessionID": {
  23944. "type": "string",
  23945. "pattern": "^ses"
  23946. },
  23947. "attempt": {
  23948. "type": "number"
  23949. },
  23950. "error": {
  23951. "$ref": "#/components/schemas/SessionNextRetry_error"
  23952. }
  23953. },
  23954. "required": ["timestamp", "sessionID", "attempt", "error"],
  23955. "additionalProperties": false
  23956. }
  23957. },
  23958. "required": ["id", "type", "properties"],
  23959. "additionalProperties": false
  23960. },
  23961. "EventSessionNextCompactionStarted": {
  23962. "type": "object",
  23963. "properties": {
  23964. "id": {
  23965. "type": "string"
  23966. },
  23967. "type": {
  23968. "type": "string",
  23969. "enum": ["session.next.compaction.started"]
  23970. },
  23971. "properties": {
  23972. "type": "object",
  23973. "properties": {
  23974. "timestamp": {
  23975. "type": "number"
  23976. },
  23977. "sessionID": {
  23978. "type": "string",
  23979. "pattern": "^ses"
  23980. },
  23981. "reason": {
  23982. "type": "string",
  23983. "enum": ["auto", "manual"]
  23984. }
  23985. },
  23986. "required": ["timestamp", "sessionID", "reason"],
  23987. "additionalProperties": false
  23988. }
  23989. },
  23990. "required": ["id", "type", "properties"],
  23991. "additionalProperties": false
  23992. },
  23993. "EventSessionNextCompactionDelta": {
  23994. "type": "object",
  23995. "properties": {
  23996. "id": {
  23997. "type": "string"
  23998. },
  23999. "type": {
  24000. "type": "string",
  24001. "enum": ["session.next.compaction.delta"]
  24002. },
  24003. "properties": {
  24004. "type": "object",
  24005. "properties": {
  24006. "timestamp": {
  24007. "type": "number"
  24008. },
  24009. "sessionID": {
  24010. "type": "string",
  24011. "pattern": "^ses"
  24012. },
  24013. "text": {
  24014. "type": "string"
  24015. }
  24016. },
  24017. "required": ["timestamp", "sessionID", "text"],
  24018. "additionalProperties": false
  24019. }
  24020. },
  24021. "required": ["id", "type", "properties"],
  24022. "additionalProperties": false
  24023. },
  24024. "EventSessionNextCompactionEnded": {
  24025. "type": "object",
  24026. "properties": {
  24027. "id": {
  24028. "type": "string"
  24029. },
  24030. "type": {
  24031. "type": "string",
  24032. "enum": ["session.next.compaction.ended"]
  24033. },
  24034. "properties": {
  24035. "type": "object",
  24036. "properties": {
  24037. "timestamp": {
  24038. "type": "number"
  24039. },
  24040. "sessionID": {
  24041. "type": "string",
  24042. "pattern": "^ses"
  24043. },
  24044. "text": {
  24045. "type": "string"
  24046. },
  24047. "include": {
  24048. "type": "string"
  24049. }
  24050. },
  24051. "required": ["timestamp", "sessionID", "text"],
  24052. "additionalProperties": false
  24053. }
  24054. },
  24055. "required": ["id", "type", "properties"],
  24056. "additionalProperties": false
  24057. },
  24058. "EventMessagePartDelta": {
  24059. "type": "object",
  24060. "properties": {
  24061. "id": {
  24062. "type": "string"
  24063. },
  24064. "type": {
  24065. "type": "string",
  24066. "enum": ["message.part.delta"]
  24067. },
  24068. "properties": {
  24069. "type": "object",
  24070. "properties": {
  24071. "sessionID": {
  24072. "type": "string",
  24073. "pattern": "^ses"
  24074. },
  24075. "messageID": {
  24076. "type": "string",
  24077. "pattern": "^msg"
  24078. },
  24079. "partID": {
  24080. "type": "string",
  24081. "pattern": "^prt"
  24082. },
  24083. "field": {
  24084. "type": "string"
  24085. },
  24086. "delta": {
  24087. "type": "string"
  24088. }
  24089. },
  24090. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  24091. "additionalProperties": false
  24092. }
  24093. },
  24094. "required": ["id", "type", "properties"],
  24095. "additionalProperties": false
  24096. },
  24097. "EventSessionDiff": {
  24098. "type": "object",
  24099. "properties": {
  24100. "id": {
  24101. "type": "string"
  24102. },
  24103. "type": {
  24104. "type": "string",
  24105. "enum": ["session.diff"]
  24106. },
  24107. "properties": {
  24108. "type": "object",
  24109. "properties": {
  24110. "sessionID": {
  24111. "type": "string",
  24112. "pattern": "^ses"
  24113. },
  24114. "diff": {
  24115. "type": "array",
  24116. "items": {
  24117. "$ref": "#/components/schemas/SnapshotFileDiff"
  24118. }
  24119. }
  24120. },
  24121. "required": ["sessionID", "diff"],
  24122. "additionalProperties": false
  24123. }
  24124. },
  24125. "required": ["id", "type", "properties"],
  24126. "additionalProperties": false
  24127. },
  24128. "EventSessionError": {
  24129. "type": "object",
  24130. "properties": {
  24131. "id": {
  24132. "type": "string"
  24133. },
  24134. "type": {
  24135. "type": "string",
  24136. "enum": ["session.error"]
  24137. },
  24138. "properties": {
  24139. "type": "object",
  24140. "properties": {
  24141. "sessionID": {
  24142. "type": "string",
  24143. "pattern": "^ses"
  24144. },
  24145. "error": {
  24146. "anyOf": [
  24147. {
  24148. "$ref": "#/components/schemas/ProviderAuthError"
  24149. },
  24150. {
  24151. "$ref": "#/components/schemas/UnknownError"
  24152. },
  24153. {
  24154. "$ref": "#/components/schemas/MessageOutputLengthError"
  24155. },
  24156. {
  24157. "$ref": "#/components/schemas/MessageAbortedError"
  24158. },
  24159. {
  24160. "$ref": "#/components/schemas/StructuredOutputError"
  24161. },
  24162. {
  24163. "$ref": "#/components/schemas/ContextOverflowError"
  24164. },
  24165. {
  24166. "$ref": "#/components/schemas/APIError"
  24167. }
  24168. ]
  24169. }
  24170. },
  24171. "additionalProperties": false
  24172. }
  24173. },
  24174. "required": ["id", "type", "properties"],
  24175. "additionalProperties": false
  24176. },
  24177. "EventInstallationUpdated": {
  24178. "type": "object",
  24179. "properties": {
  24180. "id": {
  24181. "type": "string"
  24182. },
  24183. "type": {
  24184. "type": "string",
  24185. "enum": ["installation.updated"]
  24186. },
  24187. "properties": {
  24188. "type": "object",
  24189. "properties": {
  24190. "version": {
  24191. "type": "string"
  24192. }
  24193. },
  24194. "required": ["version"],
  24195. "additionalProperties": false
  24196. }
  24197. },
  24198. "required": ["id", "type", "properties"],
  24199. "additionalProperties": false
  24200. },
  24201. "EventInstallationUpdate-available": {
  24202. "type": "object",
  24203. "properties": {
  24204. "id": {
  24205. "type": "string"
  24206. },
  24207. "type": {
  24208. "type": "string",
  24209. "enum": ["installation.update-available"]
  24210. },
  24211. "properties": {
  24212. "type": "object",
  24213. "properties": {
  24214. "version": {
  24215. "type": "string"
  24216. }
  24217. },
  24218. "required": ["version"],
  24219. "additionalProperties": false
  24220. }
  24221. },
  24222. "required": ["id", "type", "properties"],
  24223. "additionalProperties": false
  24224. },
  24225. "EventPermissionV2Asked": {
  24226. "type": "object",
  24227. "properties": {
  24228. "id": {
  24229. "type": "string"
  24230. },
  24231. "type": {
  24232. "type": "string",
  24233. "enum": ["permission.v2.asked"]
  24234. },
  24235. "properties": {
  24236. "type": "object",
  24237. "properties": {
  24238. "id": {
  24239. "type": "string",
  24240. "pattern": "^per"
  24241. },
  24242. "sessionID": {
  24243. "type": "string",
  24244. "pattern": "^ses"
  24245. },
  24246. "action": {
  24247. "type": "string"
  24248. },
  24249. "resources": {
  24250. "type": "array",
  24251. "items": {
  24252. "type": "string"
  24253. }
  24254. },
  24255. "save": {
  24256. "type": "array",
  24257. "items": {
  24258. "type": "string"
  24259. }
  24260. },
  24261. "metadata": {
  24262. "type": "object"
  24263. },
  24264. "source": {
  24265. "$ref": "#/components/schemas/PermissionV2Source"
  24266. }
  24267. },
  24268. "required": ["id", "sessionID", "action", "resources"],
  24269. "additionalProperties": false
  24270. }
  24271. },
  24272. "required": ["id", "type", "properties"],
  24273. "additionalProperties": false
  24274. },
  24275. "EventPermissionV2Replied": {
  24276. "type": "object",
  24277. "properties": {
  24278. "id": {
  24279. "type": "string"
  24280. },
  24281. "type": {
  24282. "type": "string",
  24283. "enum": ["permission.v2.replied"]
  24284. },
  24285. "properties": {
  24286. "type": "object",
  24287. "properties": {
  24288. "sessionID": {
  24289. "type": "string",
  24290. "pattern": "^ses"
  24291. },
  24292. "requestID": {
  24293. "type": "string",
  24294. "pattern": "^per"
  24295. },
  24296. "reply": {
  24297. "$ref": "#/components/schemas/PermissionV2Reply"
  24298. }
  24299. },
  24300. "required": ["sessionID", "requestID", "reply"],
  24301. "additionalProperties": false
  24302. }
  24303. },
  24304. "required": ["id", "type", "properties"],
  24305. "additionalProperties": false
  24306. },
  24307. "EventFileEdited": {
  24308. "type": "object",
  24309. "properties": {
  24310. "id": {
  24311. "type": "string"
  24312. },
  24313. "type": {
  24314. "type": "string",
  24315. "enum": ["file.edited"]
  24316. },
  24317. "properties": {
  24318. "type": "object",
  24319. "properties": {
  24320. "file": {
  24321. "type": "string"
  24322. }
  24323. },
  24324. "required": ["file"],
  24325. "additionalProperties": false
  24326. }
  24327. },
  24328. "required": ["id", "type", "properties"],
  24329. "additionalProperties": false
  24330. },
  24331. "EventAccountAdded": {
  24332. "type": "object",
  24333. "properties": {
  24334. "id": {
  24335. "type": "string"
  24336. },
  24337. "type": {
  24338. "type": "string",
  24339. "enum": ["account.added"]
  24340. },
  24341. "properties": {
  24342. "type": "object",
  24343. "properties": {
  24344. "account": {
  24345. "$ref": "#/components/schemas/AuthInfo"
  24346. }
  24347. },
  24348. "required": ["account"],
  24349. "additionalProperties": false
  24350. }
  24351. },
  24352. "required": ["id", "type", "properties"],
  24353. "additionalProperties": false
  24354. },
  24355. "EventAccountRemoved": {
  24356. "type": "object",
  24357. "properties": {
  24358. "id": {
  24359. "type": "string"
  24360. },
  24361. "type": {
  24362. "type": "string",
  24363. "enum": ["account.removed"]
  24364. },
  24365. "properties": {
  24366. "type": "object",
  24367. "properties": {
  24368. "account": {
  24369. "$ref": "#/components/schemas/AuthInfo"
  24370. }
  24371. },
  24372. "required": ["account"],
  24373. "additionalProperties": false
  24374. }
  24375. },
  24376. "required": ["id", "type", "properties"],
  24377. "additionalProperties": false
  24378. },
  24379. "EventAccountSwitched": {
  24380. "type": "object",
  24381. "properties": {
  24382. "id": {
  24383. "type": "string"
  24384. },
  24385. "type": {
  24386. "type": "string",
  24387. "enum": ["account.switched"]
  24388. },
  24389. "properties": {
  24390. "type": "object",
  24391. "properties": {
  24392. "serviceID": {
  24393. "type": "string"
  24394. },
  24395. "from": {
  24396. "type": "string"
  24397. },
  24398. "to": {
  24399. "type": "string"
  24400. }
  24401. },
  24402. "required": ["serviceID"],
  24403. "additionalProperties": false
  24404. }
  24405. },
  24406. "required": ["id", "type", "properties"],
  24407. "additionalProperties": false
  24408. },
  24409. "EventFileWatcherUpdated": {
  24410. "type": "object",
  24411. "properties": {
  24412. "id": {
  24413. "type": "string"
  24414. },
  24415. "type": {
  24416. "type": "string",
  24417. "enum": ["file.watcher.updated"]
  24418. },
  24419. "properties": {
  24420. "type": "object",
  24421. "properties": {
  24422. "file": {
  24423. "type": "string"
  24424. },
  24425. "event": {
  24426. "type": "string",
  24427. "enum": ["add", "change", "unlink"]
  24428. }
  24429. },
  24430. "required": ["file", "event"],
  24431. "additionalProperties": false
  24432. }
  24433. },
  24434. "required": ["id", "type", "properties"],
  24435. "additionalProperties": false
  24436. },
  24437. "EventLspUpdated": {
  24438. "type": "object",
  24439. "properties": {
  24440. "id": {
  24441. "type": "string"
  24442. },
  24443. "type": {
  24444. "type": "string",
  24445. "enum": ["lsp.updated"]
  24446. },
  24447. "properties": {
  24448. "type": "object",
  24449. "properties": {}
  24450. }
  24451. },
  24452. "required": ["id", "type", "properties"],
  24453. "additionalProperties": false
  24454. },
  24455. "EventPermissionAsked": {
  24456. "type": "object",
  24457. "properties": {
  24458. "id": {
  24459. "type": "string"
  24460. },
  24461. "type": {
  24462. "type": "string",
  24463. "enum": ["permission.asked"]
  24464. },
  24465. "properties": {
  24466. "type": "object",
  24467. "properties": {
  24468. "id": {
  24469. "type": "string",
  24470. "pattern": "^per"
  24471. },
  24472. "sessionID": {
  24473. "type": "string",
  24474. "pattern": "^ses"
  24475. },
  24476. "permission": {
  24477. "type": "string"
  24478. },
  24479. "patterns": {
  24480. "type": "array",
  24481. "items": {
  24482. "type": "string"
  24483. }
  24484. },
  24485. "metadata": {
  24486. "type": "object"
  24487. },
  24488. "always": {
  24489. "type": "array",
  24490. "items": {
  24491. "type": "string"
  24492. }
  24493. },
  24494. "tool": {
  24495. "type": "object",
  24496. "properties": {
  24497. "messageID": {
  24498. "type": "string"
  24499. },
  24500. "callID": {
  24501. "type": "string"
  24502. }
  24503. },
  24504. "required": ["messageID", "callID"],
  24505. "additionalProperties": false
  24506. }
  24507. },
  24508. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  24509. "additionalProperties": false
  24510. }
  24511. },
  24512. "required": ["id", "type", "properties"],
  24513. "additionalProperties": false
  24514. },
  24515. "EventPermissionReplied": {
  24516. "type": "object",
  24517. "properties": {
  24518. "id": {
  24519. "type": "string"
  24520. },
  24521. "type": {
  24522. "type": "string",
  24523. "enum": ["permission.replied"]
  24524. },
  24525. "properties": {
  24526. "type": "object",
  24527. "properties": {
  24528. "sessionID": {
  24529. "type": "string",
  24530. "pattern": "^ses"
  24531. },
  24532. "requestID": {
  24533. "type": "string",
  24534. "pattern": "^per"
  24535. },
  24536. "reply": {
  24537. "type": "string",
  24538. "enum": ["once", "always", "reject"]
  24539. }
  24540. },
  24541. "required": ["sessionID", "requestID", "reply"],
  24542. "additionalProperties": false
  24543. }
  24544. },
  24545. "required": ["id", "type", "properties"],
  24546. "additionalProperties": false
  24547. },
  24548. "EventMcpToolsChanged": {
  24549. "type": "object",
  24550. "properties": {
  24551. "id": {
  24552. "type": "string"
  24553. },
  24554. "type": {
  24555. "type": "string",
  24556. "enum": ["mcp.tools.changed"]
  24557. },
  24558. "properties": {
  24559. "type": "object",
  24560. "properties": {
  24561. "server": {
  24562. "type": "string"
  24563. }
  24564. },
  24565. "required": ["server"],
  24566. "additionalProperties": false
  24567. }
  24568. },
  24569. "required": ["id", "type", "properties"],
  24570. "additionalProperties": false
  24571. },
  24572. "EventMcpBrowserOpenFailed": {
  24573. "type": "object",
  24574. "properties": {
  24575. "id": {
  24576. "type": "string"
  24577. },
  24578. "type": {
  24579. "type": "string",
  24580. "enum": ["mcp.browser.open.failed"]
  24581. },
  24582. "properties": {
  24583. "type": "object",
  24584. "properties": {
  24585. "mcpName": {
  24586. "type": "string"
  24587. },
  24588. "url": {
  24589. "type": "string"
  24590. }
  24591. },
  24592. "required": ["mcpName", "url"],
  24593. "additionalProperties": false
  24594. }
  24595. },
  24596. "required": ["id", "type", "properties"],
  24597. "additionalProperties": false
  24598. },
  24599. "EventCommandExecuted": {
  24600. "type": "object",
  24601. "properties": {
  24602. "id": {
  24603. "type": "string"
  24604. },
  24605. "type": {
  24606. "type": "string",
  24607. "enum": ["command.executed"]
  24608. },
  24609. "properties": {
  24610. "type": "object",
  24611. "properties": {
  24612. "name": {
  24613. "type": "string"
  24614. },
  24615. "sessionID": {
  24616. "type": "string",
  24617. "pattern": "^ses"
  24618. },
  24619. "arguments": {
  24620. "type": "string"
  24621. },
  24622. "messageID": {
  24623. "type": "string",
  24624. "pattern": "^msg"
  24625. }
  24626. },
  24627. "required": ["name", "sessionID", "arguments", "messageID"],
  24628. "additionalProperties": false
  24629. }
  24630. },
  24631. "required": ["id", "type", "properties"],
  24632. "additionalProperties": false
  24633. },
  24634. "EventProjectDirectoriesUpdated": {
  24635. "type": "object",
  24636. "properties": {
  24637. "id": {
  24638. "type": "string"
  24639. },
  24640. "type": {
  24641. "type": "string",
  24642. "enum": ["project.directories.updated"]
  24643. },
  24644. "properties": {
  24645. "type": "object",
  24646. "properties": {
  24647. "projectID": {
  24648. "type": "string"
  24649. }
  24650. },
  24651. "required": ["projectID"],
  24652. "additionalProperties": false
  24653. }
  24654. },
  24655. "required": ["id", "type", "properties"],
  24656. "additionalProperties": false
  24657. },
  24658. "EventProjectUpdated": {
  24659. "type": "object",
  24660. "properties": {
  24661. "id": {
  24662. "type": "string"
  24663. },
  24664. "type": {
  24665. "type": "string",
  24666. "enum": ["project.updated"]
  24667. },
  24668. "properties": {
  24669. "type": "object",
  24670. "properties": {
  24671. "id": {
  24672. "type": "string"
  24673. },
  24674. "worktree": {
  24675. "type": "string"
  24676. },
  24677. "vcs": {
  24678. "type": "string",
  24679. "enum": ["git"]
  24680. },
  24681. "name": {
  24682. "type": "string"
  24683. },
  24684. "icon": {
  24685. "type": "object",
  24686. "properties": {
  24687. "url": {
  24688. "type": "string"
  24689. },
  24690. "override": {
  24691. "type": "string"
  24692. },
  24693. "color": {
  24694. "type": "string"
  24695. }
  24696. },
  24697. "additionalProperties": false
  24698. },
  24699. "commands": {
  24700. "type": "object",
  24701. "properties": {
  24702. "start": {
  24703. "type": "string",
  24704. "description": "Startup script to run when creating a new workspace (worktree)"
  24705. }
  24706. },
  24707. "additionalProperties": false
  24708. },
  24709. "time": {
  24710. "type": "object",
  24711. "properties": {
  24712. "created": {
  24713. "type": "integer",
  24714. "minimum": 0
  24715. },
  24716. "updated": {
  24717. "type": "integer",
  24718. "minimum": 0
  24719. },
  24720. "initialized": {
  24721. "type": "integer",
  24722. "minimum": 0
  24723. }
  24724. },
  24725. "required": ["created", "updated"],
  24726. "additionalProperties": false
  24727. },
  24728. "sandboxes": {
  24729. "type": "array",
  24730. "items": {
  24731. "type": "string"
  24732. }
  24733. }
  24734. },
  24735. "required": ["id", "worktree", "time", "sandboxes"],
  24736. "additionalProperties": false
  24737. }
  24738. },
  24739. "required": ["id", "type", "properties"],
  24740. "additionalProperties": false
  24741. },
  24742. "EventPtyCreated": {
  24743. "type": "object",
  24744. "properties": {
  24745. "id": {
  24746. "type": "string"
  24747. },
  24748. "type": {
  24749. "type": "string",
  24750. "enum": ["pty.created"]
  24751. },
  24752. "properties": {
  24753. "type": "object",
  24754. "properties": {
  24755. "info": {
  24756. "$ref": "#/components/schemas/Pty"
  24757. }
  24758. },
  24759. "required": ["info"],
  24760. "additionalProperties": false
  24761. }
  24762. },
  24763. "required": ["id", "type", "properties"],
  24764. "additionalProperties": false
  24765. },
  24766. "EventPtyUpdated": {
  24767. "type": "object",
  24768. "properties": {
  24769. "id": {
  24770. "type": "string"
  24771. },
  24772. "type": {
  24773. "type": "string",
  24774. "enum": ["pty.updated"]
  24775. },
  24776. "properties": {
  24777. "type": "object",
  24778. "properties": {
  24779. "info": {
  24780. "$ref": "#/components/schemas/Pty"
  24781. }
  24782. },
  24783. "required": ["info"],
  24784. "additionalProperties": false
  24785. }
  24786. },
  24787. "required": ["id", "type", "properties"],
  24788. "additionalProperties": false
  24789. },
  24790. "EventPtyExited": {
  24791. "type": "object",
  24792. "properties": {
  24793. "id": {
  24794. "type": "string"
  24795. },
  24796. "type": {
  24797. "type": "string",
  24798. "enum": ["pty.exited"]
  24799. },
  24800. "properties": {
  24801. "type": "object",
  24802. "properties": {
  24803. "id": {
  24804. "type": "string",
  24805. "pattern": "^pty"
  24806. },
  24807. "exitCode": {
  24808. "type": "integer",
  24809. "minimum": 0
  24810. }
  24811. },
  24812. "required": ["id", "exitCode"],
  24813. "additionalProperties": false
  24814. }
  24815. },
  24816. "required": ["id", "type", "properties"],
  24817. "additionalProperties": false
  24818. },
  24819. "EventPtyDeleted": {
  24820. "type": "object",
  24821. "properties": {
  24822. "id": {
  24823. "type": "string"
  24824. },
  24825. "type": {
  24826. "type": "string",
  24827. "enum": ["pty.deleted"]
  24828. },
  24829. "properties": {
  24830. "type": "object",
  24831. "properties": {
  24832. "id": {
  24833. "type": "string",
  24834. "pattern": "^pty"
  24835. }
  24836. },
  24837. "required": ["id"],
  24838. "additionalProperties": false
  24839. }
  24840. },
  24841. "required": ["id", "type", "properties"],
  24842. "additionalProperties": false
  24843. },
  24844. "EventQuestionAsked": {
  24845. "type": "object",
  24846. "properties": {
  24847. "id": {
  24848. "type": "string"
  24849. },
  24850. "type": {
  24851. "type": "string",
  24852. "enum": ["question.asked"]
  24853. },
  24854. "properties": {
  24855. "type": "object",
  24856. "properties": {
  24857. "id": {
  24858. "type": "string",
  24859. "pattern": "^que"
  24860. },
  24861. "sessionID": {
  24862. "type": "string",
  24863. "pattern": "^ses"
  24864. },
  24865. "questions": {
  24866. "type": "array",
  24867. "items": {
  24868. "$ref": "#/components/schemas/QuestionInfo"
  24869. },
  24870. "description": "Questions to ask"
  24871. },
  24872. "tool": {
  24873. "$ref": "#/components/schemas/QuestionTool"
  24874. }
  24875. },
  24876. "required": ["id", "sessionID", "questions"],
  24877. "additionalProperties": false
  24878. }
  24879. },
  24880. "required": ["id", "type", "properties"],
  24881. "additionalProperties": false
  24882. },
  24883. "EventQuestionReplied": {
  24884. "type": "object",
  24885. "properties": {
  24886. "id": {
  24887. "type": "string"
  24888. },
  24889. "type": {
  24890. "type": "string",
  24891. "enum": ["question.replied"]
  24892. },
  24893. "properties": {
  24894. "type": "object",
  24895. "properties": {
  24896. "sessionID": {
  24897. "type": "string",
  24898. "pattern": "^ses"
  24899. },
  24900. "requestID": {
  24901. "type": "string",
  24902. "pattern": "^que"
  24903. },
  24904. "answers": {
  24905. "type": "array",
  24906. "items": {
  24907. "$ref": "#/components/schemas/QuestionAnswer"
  24908. }
  24909. }
  24910. },
  24911. "required": ["sessionID", "requestID", "answers"],
  24912. "additionalProperties": false
  24913. }
  24914. },
  24915. "required": ["id", "type", "properties"],
  24916. "additionalProperties": false
  24917. },
  24918. "EventQuestionRejected": {
  24919. "type": "object",
  24920. "properties": {
  24921. "id": {
  24922. "type": "string"
  24923. },
  24924. "type": {
  24925. "type": "string",
  24926. "enum": ["question.rejected"]
  24927. },
  24928. "properties": {
  24929. "type": "object",
  24930. "properties": {
  24931. "sessionID": {
  24932. "type": "string",
  24933. "pattern": "^ses"
  24934. },
  24935. "requestID": {
  24936. "type": "string",
  24937. "pattern": "^que"
  24938. }
  24939. },
  24940. "required": ["sessionID", "requestID"],
  24941. "additionalProperties": false
  24942. }
  24943. },
  24944. "required": ["id", "type", "properties"],
  24945. "additionalProperties": false
  24946. },
  24947. "EventSessionStatus": {
  24948. "type": "object",
  24949. "properties": {
  24950. "id": {
  24951. "type": "string"
  24952. },
  24953. "type": {
  24954. "type": "string",
  24955. "enum": ["session.status"]
  24956. },
  24957. "properties": {
  24958. "type": "object",
  24959. "properties": {
  24960. "sessionID": {
  24961. "type": "string",
  24962. "pattern": "^ses"
  24963. },
  24964. "status": {
  24965. "$ref": "#/components/schemas/SessionStatus"
  24966. }
  24967. },
  24968. "required": ["sessionID", "status"],
  24969. "additionalProperties": false
  24970. }
  24971. },
  24972. "required": ["id", "type", "properties"],
  24973. "additionalProperties": false
  24974. },
  24975. "EventSessionIdle": {
  24976. "type": "object",
  24977. "properties": {
  24978. "id": {
  24979. "type": "string"
  24980. },
  24981. "type": {
  24982. "type": "string",
  24983. "enum": ["session.idle"]
  24984. },
  24985. "properties": {
  24986. "type": "object",
  24987. "properties": {
  24988. "sessionID": {
  24989. "type": "string",
  24990. "pattern": "^ses"
  24991. }
  24992. },
  24993. "required": ["sessionID"],
  24994. "additionalProperties": false
  24995. }
  24996. },
  24997. "required": ["id", "type", "properties"],
  24998. "additionalProperties": false
  24999. },
  25000. "EventSessionCompacted": {
  25001. "type": "object",
  25002. "properties": {
  25003. "id": {
  25004. "type": "string"
  25005. },
  25006. "type": {
  25007. "type": "string",
  25008. "enum": ["session.compacted"]
  25009. },
  25010. "properties": {
  25011. "type": "object",
  25012. "properties": {
  25013. "sessionID": {
  25014. "type": "string",
  25015. "pattern": "^ses"
  25016. }
  25017. },
  25018. "required": ["sessionID"],
  25019. "additionalProperties": false
  25020. }
  25021. },
  25022. "required": ["id", "type", "properties"],
  25023. "additionalProperties": false
  25024. },
  25025. "EventTodoUpdated": {
  25026. "type": "object",
  25027. "properties": {
  25028. "id": {
  25029. "type": "string"
  25030. },
  25031. "type": {
  25032. "type": "string",
  25033. "enum": ["todo.updated"]
  25034. },
  25035. "properties": {
  25036. "type": "object",
  25037. "properties": {
  25038. "sessionID": {
  25039. "type": "string",
  25040. "pattern": "^ses"
  25041. },
  25042. "todos": {
  25043. "type": "array",
  25044. "items": {
  25045. "$ref": "#/components/schemas/Todo"
  25046. }
  25047. }
  25048. },
  25049. "required": ["sessionID", "todos"],
  25050. "additionalProperties": false
  25051. }
  25052. },
  25053. "required": ["id", "type", "properties"],
  25054. "additionalProperties": false
  25055. },
  25056. "EventVcsBranchUpdated": {
  25057. "type": "object",
  25058. "properties": {
  25059. "id": {
  25060. "type": "string"
  25061. },
  25062. "type": {
  25063. "type": "string",
  25064. "enum": ["vcs.branch.updated"]
  25065. },
  25066. "properties": {
  25067. "type": "object",
  25068. "properties": {
  25069. "branch": {
  25070. "type": "string"
  25071. }
  25072. },
  25073. "additionalProperties": false
  25074. }
  25075. },
  25076. "required": ["id", "type", "properties"],
  25077. "additionalProperties": false
  25078. },
  25079. "EventWorktreeReady": {
  25080. "type": "object",
  25081. "properties": {
  25082. "id": {
  25083. "type": "string"
  25084. },
  25085. "type": {
  25086. "type": "string",
  25087. "enum": ["worktree.ready"]
  25088. },
  25089. "properties": {
  25090. "type": "object",
  25091. "properties": {
  25092. "name": {
  25093. "type": "string"
  25094. },
  25095. "branch": {
  25096. "type": "string"
  25097. }
  25098. },
  25099. "required": ["name"],
  25100. "additionalProperties": false
  25101. }
  25102. },
  25103. "required": ["id", "type", "properties"],
  25104. "additionalProperties": false
  25105. },
  25106. "EventWorktreeFailed": {
  25107. "type": "object",
  25108. "properties": {
  25109. "id": {
  25110. "type": "string"
  25111. },
  25112. "type": {
  25113. "type": "string",
  25114. "enum": ["worktree.failed"]
  25115. },
  25116. "properties": {
  25117. "type": "object",
  25118. "properties": {
  25119. "message": {
  25120. "type": "string"
  25121. }
  25122. },
  25123. "required": ["message"],
  25124. "additionalProperties": false
  25125. }
  25126. },
  25127. "required": ["id", "type", "properties"],
  25128. "additionalProperties": false
  25129. },
  25130. "EventWorkspaceReady": {
  25131. "type": "object",
  25132. "properties": {
  25133. "id": {
  25134. "type": "string"
  25135. },
  25136. "type": {
  25137. "type": "string",
  25138. "enum": ["workspace.ready"]
  25139. },
  25140. "properties": {
  25141. "type": "object",
  25142. "properties": {
  25143. "name": {
  25144. "type": "string"
  25145. }
  25146. },
  25147. "required": ["name"],
  25148. "additionalProperties": false
  25149. }
  25150. },
  25151. "required": ["id", "type", "properties"],
  25152. "additionalProperties": false
  25153. },
  25154. "EventWorkspaceFailed": {
  25155. "type": "object",
  25156. "properties": {
  25157. "id": {
  25158. "type": "string"
  25159. },
  25160. "type": {
  25161. "type": "string",
  25162. "enum": ["workspace.failed"]
  25163. },
  25164. "properties": {
  25165. "type": "object",
  25166. "properties": {
  25167. "message": {
  25168. "type": "string"
  25169. }
  25170. },
  25171. "required": ["message"],
  25172. "additionalProperties": false
  25173. }
  25174. },
  25175. "required": ["id", "type", "properties"],
  25176. "additionalProperties": false
  25177. },
  25178. "EventWorkspaceStatus": {
  25179. "type": "object",
  25180. "properties": {
  25181. "id": {
  25182. "type": "string"
  25183. },
  25184. "type": {
  25185. "type": "string",
  25186. "enum": ["workspace.status"]
  25187. },
  25188. "properties": {
  25189. "type": "object",
  25190. "properties": {
  25191. "workspaceID": {
  25192. "type": "string",
  25193. "pattern": "^wrk"
  25194. },
  25195. "status": {
  25196. "type": "string",
  25197. "enum": ["connected", "connecting", "disconnected", "error"]
  25198. }
  25199. },
  25200. "required": ["workspaceID", "status"],
  25201. "additionalProperties": false
  25202. }
  25203. },
  25204. "required": ["id", "type", "properties"],
  25205. "additionalProperties": false
  25206. },
  25207. "EventServerConnected": {
  25208. "type": "object",
  25209. "properties": {
  25210. "id": {
  25211. "type": "string"
  25212. },
  25213. "type": {
  25214. "type": "string",
  25215. "enum": ["server.connected"]
  25216. },
  25217. "properties": {
  25218. "type": "object",
  25219. "properties": {}
  25220. }
  25221. },
  25222. "required": ["id", "type", "properties"],
  25223. "additionalProperties": false
  25224. },
  25225. "EventGlobalDisposed": {
  25226. "type": "object",
  25227. "properties": {
  25228. "id": {
  25229. "type": "string"
  25230. },
  25231. "type": {
  25232. "type": "string",
  25233. "enum": ["global.disposed"]
  25234. },
  25235. "properties": {
  25236. "type": "object",
  25237. "properties": {}
  25238. }
  25239. },
  25240. "required": ["id", "type", "properties"],
  25241. "additionalProperties": false
  25242. },
  25243. "BadRequestError": {
  25244. "type": "object",
  25245. "required": ["name", "data"],
  25246. "properties": {
  25247. "name": {
  25248. "type": "string",
  25249. "enum": ["BadRequest"]
  25250. },
  25251. "data": {
  25252. "type": "object",
  25253. "required": ["message"],
  25254. "properties": {
  25255. "message": {
  25256. "type": "string"
  25257. },
  25258. "kind": {
  25259. "type": "string",
  25260. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  25261. }
  25262. }
  25263. }
  25264. }
  25265. }
  25266. }
  25267. },
  25268. "security": [],
  25269. "tags": [
  25270. {
  25271. "name": "control",
  25272. "description": "Control plane routes."
  25273. },
  25274. {
  25275. "name": "global",
  25276. "description": "Global server routes."
  25277. },
  25278. {
  25279. "name": "event",
  25280. "description": "Instance event stream route."
  25281. },
  25282. {
  25283. "name": "config",
  25284. "description": "Experimental HttpApi config routes."
  25285. },
  25286. {
  25287. "name": "experimental",
  25288. "description": "Experimental HttpApi read-only routes."
  25289. },
  25290. {
  25291. "name": "file",
  25292. "description": "Experimental HttpApi file routes."
  25293. },
  25294. {
  25295. "name": "instance",
  25296. "description": "Experimental HttpApi instance read routes."
  25297. },
  25298. {
  25299. "name": "mcp",
  25300. "description": "Experimental HttpApi MCP routes."
  25301. },
  25302. {
  25303. "name": "project",
  25304. "description": "Experimental HttpApi project routes."
  25305. },
  25306. {
  25307. "name": "projectCopy",
  25308. "description": "Project copy management routes."
  25309. },
  25310. {
  25311. "name": "pty",
  25312. "description": "Experimental HttpApi PTY routes."
  25313. },
  25314. {
  25315. "name": "question",
  25316. "description": "Question routes."
  25317. },
  25318. {
  25319. "name": "permission",
  25320. "description": "Experimental HttpApi permission routes."
  25321. },
  25322. {
  25323. "name": "provider",
  25324. "description": "Experimental HttpApi provider routes."
  25325. },
  25326. {
  25327. "name": "session",
  25328. "description": "Experimental HttpApi session routes."
  25329. },
  25330. {
  25331. "name": "sync",
  25332. "description": "Experimental HttpApi sync routes."
  25333. },
  25334. {
  25335. "name": "v2",
  25336. "description": "Experimental v2 routes."
  25337. },
  25338. {
  25339. "name": "v2 messages",
  25340. "description": "Experimental v2 message routes."
  25341. },
  25342. {
  25343. "name": "v2 models",
  25344. "description": "Experimental v2 model routes."
  25345. },
  25346. {
  25347. "name": "v2 providers",
  25348. "description": "Experimental v2 provider routes."
  25349. },
  25350. {
  25351. "name": "v2 permissions",
  25352. "description": "Experimental v2 permission routes."
  25353. },
  25354. {
  25355. "name": "v2 session permissions",
  25356. "description": "Experimental v2 session permission routes."
  25357. },
  25358. {
  25359. "name": "v2 saved permissions",
  25360. "description": "Experimental v2 saved permission routes."
  25361. },
  25362. {
  25363. "name": "v2 filesystem",
  25364. "description": "Experimental v2 location-scoped filesystem routes."
  25365. },
  25366. {
  25367. "name": "tui",
  25368. "description": "Experimental HttpApi TUI routes."
  25369. },
  25370. {
  25371. "name": "workspace",
  25372. "description": "Experimental HttpApi workspace routes."
  25373. },
  25374. {
  25375. "name": "pty",
  25376. "description": "PTY websocket route."
  25377. }
  25378. ]
  25379. }