openapi.json 699 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019
  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. "/pty/shells": {
  3703. "get": {
  3704. "tags": ["pty"],
  3705. "operationId": "pty.shells",
  3706. "parameters": [
  3707. {
  3708. "name": "directory",
  3709. "in": "query",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": false
  3714. },
  3715. {
  3716. "name": "workspace",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. }
  3723. ],
  3724. "responses": {
  3725. "200": {
  3726. "description": "List of shells",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "type": "object",
  3733. "properties": {
  3734. "path": {
  3735. "type": "string"
  3736. },
  3737. "name": {
  3738. "type": "string"
  3739. },
  3740. "acceptable": {
  3741. "type": "boolean"
  3742. }
  3743. },
  3744. "required": ["path", "name", "acceptable"],
  3745. "additionalProperties": false
  3746. },
  3747. "description": "List of shells"
  3748. }
  3749. }
  3750. }
  3751. },
  3752. "400": {
  3753. "description": "Bad request",
  3754. "content": {
  3755. "application/json": {
  3756. "schema": {
  3757. "$ref": "#/components/schemas/BadRequestError"
  3758. }
  3759. }
  3760. }
  3761. }
  3762. },
  3763. "description": "Get a list of available shells on the system.",
  3764. "summary": "List available shells",
  3765. "x-codeSamples": [
  3766. {
  3767. "lang": "js",
  3768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3769. }
  3770. ]
  3771. }
  3772. },
  3773. "/pty": {
  3774. "get": {
  3775. "tags": ["pty"],
  3776. "operationId": "pty.list",
  3777. "parameters": [
  3778. {
  3779. "name": "directory",
  3780. "in": "query",
  3781. "schema": {
  3782. "type": "string"
  3783. },
  3784. "required": false
  3785. },
  3786. {
  3787. "name": "workspace",
  3788. "in": "query",
  3789. "schema": {
  3790. "type": "string"
  3791. },
  3792. "required": false
  3793. }
  3794. ],
  3795. "responses": {
  3796. "200": {
  3797. "description": "List of sessions",
  3798. "content": {
  3799. "application/json": {
  3800. "schema": {
  3801. "type": "array",
  3802. "items": {
  3803. "$ref": "#/components/schemas/Pty"
  3804. },
  3805. "description": "List of sessions"
  3806. }
  3807. }
  3808. }
  3809. },
  3810. "400": {
  3811. "description": "Bad request",
  3812. "content": {
  3813. "application/json": {
  3814. "schema": {
  3815. "$ref": "#/components/schemas/BadRequestError"
  3816. }
  3817. }
  3818. }
  3819. }
  3820. },
  3821. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3822. "summary": "List PTY sessions",
  3823. "x-codeSamples": [
  3824. {
  3825. "lang": "js",
  3826. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3827. }
  3828. ]
  3829. },
  3830. "post": {
  3831. "tags": ["pty"],
  3832. "operationId": "pty.create",
  3833. "parameters": [
  3834. {
  3835. "name": "directory",
  3836. "in": "query",
  3837. "schema": {
  3838. "type": "string"
  3839. },
  3840. "required": false
  3841. },
  3842. {
  3843. "name": "workspace",
  3844. "in": "query",
  3845. "schema": {
  3846. "type": "string"
  3847. },
  3848. "required": false
  3849. }
  3850. ],
  3851. "responses": {
  3852. "200": {
  3853. "description": "Created session",
  3854. "content": {
  3855. "application/json": {
  3856. "schema": {
  3857. "$ref": "#/components/schemas/Pty"
  3858. }
  3859. }
  3860. }
  3861. },
  3862. "400": {
  3863. "description": "BadRequest | InvalidRequestError",
  3864. "content": {
  3865. "application/json": {
  3866. "schema": {
  3867. "anyOf": [
  3868. {
  3869. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3870. },
  3871. {
  3872. "$ref": "#/components/schemas/InvalidRequestError"
  3873. }
  3874. ]
  3875. }
  3876. }
  3877. }
  3878. }
  3879. },
  3880. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3881. "summary": "Create PTY session",
  3882. "requestBody": {
  3883. "content": {
  3884. "application/json": {
  3885. "schema": {
  3886. "type": "object",
  3887. "properties": {
  3888. "command": {
  3889. "type": "string"
  3890. },
  3891. "args": {
  3892. "type": "array",
  3893. "items": {
  3894. "type": "string"
  3895. }
  3896. },
  3897. "cwd": {
  3898. "type": "string"
  3899. },
  3900. "title": {
  3901. "type": "string"
  3902. },
  3903. "env": {
  3904. "type": "object",
  3905. "additionalProperties": {
  3906. "type": "string"
  3907. }
  3908. }
  3909. },
  3910. "additionalProperties": false
  3911. }
  3912. }
  3913. }
  3914. },
  3915. "x-codeSamples": [
  3916. {
  3917. "lang": "js",
  3918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3919. }
  3920. ]
  3921. }
  3922. },
  3923. "/pty/{ptyID}": {
  3924. "get": {
  3925. "tags": ["pty"],
  3926. "operationId": "pty.get",
  3927. "parameters": [
  3928. {
  3929. "name": "ptyID",
  3930. "in": "path",
  3931. "schema": {
  3932. "type": "string",
  3933. "pattern": "^pty"
  3934. },
  3935. "required": true
  3936. },
  3937. {
  3938. "name": "directory",
  3939. "in": "query",
  3940. "schema": {
  3941. "type": "string"
  3942. },
  3943. "required": false
  3944. },
  3945. {
  3946. "name": "workspace",
  3947. "in": "query",
  3948. "schema": {
  3949. "type": "string"
  3950. },
  3951. "required": false
  3952. }
  3953. ],
  3954. "responses": {
  3955. "200": {
  3956. "description": "Session info",
  3957. "content": {
  3958. "application/json": {
  3959. "schema": {
  3960. "$ref": "#/components/schemas/Pty"
  3961. }
  3962. }
  3963. }
  3964. },
  3965. "400": {
  3966. "description": "Bad request",
  3967. "content": {
  3968. "application/json": {
  3969. "schema": {
  3970. "$ref": "#/components/schemas/BadRequestError"
  3971. }
  3972. }
  3973. }
  3974. },
  3975. "404": {
  3976. "description": "PtyNotFoundError",
  3977. "content": {
  3978. "application/json": {
  3979. "schema": {
  3980. "$ref": "#/components/schemas/PtyNotFoundError"
  3981. }
  3982. }
  3983. }
  3984. }
  3985. },
  3986. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3987. "summary": "Get PTY session",
  3988. "x-codeSamples": [
  3989. {
  3990. "lang": "js",
  3991. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3992. }
  3993. ]
  3994. },
  3995. "put": {
  3996. "tags": ["pty"],
  3997. "operationId": "pty.update",
  3998. "parameters": [
  3999. {
  4000. "name": "ptyID",
  4001. "in": "path",
  4002. "schema": {
  4003. "type": "string",
  4004. "pattern": "^pty"
  4005. },
  4006. "required": true
  4007. },
  4008. {
  4009. "name": "directory",
  4010. "in": "query",
  4011. "schema": {
  4012. "type": "string"
  4013. },
  4014. "required": false
  4015. },
  4016. {
  4017. "name": "workspace",
  4018. "in": "query",
  4019. "schema": {
  4020. "type": "string"
  4021. },
  4022. "required": false
  4023. }
  4024. ],
  4025. "responses": {
  4026. "200": {
  4027. "description": "Updated session",
  4028. "content": {
  4029. "application/json": {
  4030. "schema": {
  4031. "$ref": "#/components/schemas/Pty"
  4032. }
  4033. }
  4034. }
  4035. },
  4036. "400": {
  4037. "description": "BadRequest | InvalidRequestError",
  4038. "content": {
  4039. "application/json": {
  4040. "schema": {
  4041. "anyOf": [
  4042. {
  4043. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4044. },
  4045. {
  4046. "$ref": "#/components/schemas/InvalidRequestError"
  4047. }
  4048. ]
  4049. }
  4050. }
  4051. }
  4052. },
  4053. "404": {
  4054. "description": "PtyNotFoundError",
  4055. "content": {
  4056. "application/json": {
  4057. "schema": {
  4058. "$ref": "#/components/schemas/PtyNotFoundError"
  4059. }
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4065. "summary": "Update PTY session",
  4066. "requestBody": {
  4067. "content": {
  4068. "application/json": {
  4069. "schema": {
  4070. "type": "object",
  4071. "properties": {
  4072. "title": {
  4073. "type": "string"
  4074. },
  4075. "size": {
  4076. "type": "object",
  4077. "properties": {
  4078. "rows": {
  4079. "type": "integer",
  4080. "exclusiveMinimum": 0
  4081. },
  4082. "cols": {
  4083. "type": "integer",
  4084. "exclusiveMinimum": 0
  4085. }
  4086. },
  4087. "required": ["rows", "cols"],
  4088. "additionalProperties": false
  4089. }
  4090. },
  4091. "additionalProperties": false
  4092. }
  4093. }
  4094. }
  4095. },
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4100. }
  4101. ]
  4102. },
  4103. "delete": {
  4104. "tags": ["pty"],
  4105. "operationId": "pty.remove",
  4106. "parameters": [
  4107. {
  4108. "name": "ptyID",
  4109. "in": "path",
  4110. "schema": {
  4111. "type": "string",
  4112. "pattern": "^pty"
  4113. },
  4114. "required": true
  4115. },
  4116. {
  4117. "name": "directory",
  4118. "in": "query",
  4119. "schema": {
  4120. "type": "string"
  4121. },
  4122. "required": false
  4123. },
  4124. {
  4125. "name": "workspace",
  4126. "in": "query",
  4127. "schema": {
  4128. "type": "string"
  4129. },
  4130. "required": false
  4131. }
  4132. ],
  4133. "responses": {
  4134. "200": {
  4135. "description": "Session removed",
  4136. "content": {
  4137. "application/json": {
  4138. "schema": {
  4139. "type": "boolean",
  4140. "description": "Session removed"
  4141. }
  4142. }
  4143. }
  4144. },
  4145. "400": {
  4146. "description": "Bad request",
  4147. "content": {
  4148. "application/json": {
  4149. "schema": {
  4150. "$ref": "#/components/schemas/BadRequestError"
  4151. }
  4152. }
  4153. }
  4154. },
  4155. "404": {
  4156. "description": "PtyNotFoundError",
  4157. "content": {
  4158. "application/json": {
  4159. "schema": {
  4160. "$ref": "#/components/schemas/PtyNotFoundError"
  4161. }
  4162. }
  4163. }
  4164. }
  4165. },
  4166. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4167. "summary": "Remove PTY session",
  4168. "x-codeSamples": [
  4169. {
  4170. "lang": "js",
  4171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4172. }
  4173. ]
  4174. }
  4175. },
  4176. "/pty/{ptyID}/connect-token": {
  4177. "post": {
  4178. "tags": ["pty"],
  4179. "operationId": "pty.connectToken",
  4180. "parameters": [
  4181. {
  4182. "name": "ptyID",
  4183. "in": "path",
  4184. "schema": {
  4185. "type": "string",
  4186. "pattern": "^pty"
  4187. },
  4188. "required": true
  4189. },
  4190. {
  4191. "name": "directory",
  4192. "in": "query",
  4193. "schema": {
  4194. "type": "string"
  4195. },
  4196. "required": false
  4197. },
  4198. {
  4199. "name": "workspace",
  4200. "in": "query",
  4201. "schema": {
  4202. "type": "string"
  4203. },
  4204. "required": false
  4205. }
  4206. ],
  4207. "responses": {
  4208. "200": {
  4209. "description": "WebSocket connect token",
  4210. "content": {
  4211. "application/json": {
  4212. "schema": {
  4213. "type": "object",
  4214. "properties": {
  4215. "ticket": {
  4216. "type": "string"
  4217. },
  4218. "expires_in": {
  4219. "type": "integer",
  4220. "exclusiveMinimum": 0
  4221. }
  4222. },
  4223. "required": ["ticket", "expires_in"],
  4224. "additionalProperties": false,
  4225. "description": "WebSocket connect token"
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "400": {
  4231. "description": "Bad request",
  4232. "content": {
  4233. "application/json": {
  4234. "schema": {
  4235. "$ref": "#/components/schemas/BadRequestError"
  4236. }
  4237. }
  4238. }
  4239. },
  4240. "403": {
  4241. "description": "PtyForbiddenError",
  4242. "content": {
  4243. "application/json": {
  4244. "schema": {
  4245. "$ref": "#/components/schemas/PtyForbiddenError"
  4246. }
  4247. }
  4248. }
  4249. },
  4250. "404": {
  4251. "description": "PtyNotFoundError",
  4252. "content": {
  4253. "application/json": {
  4254. "schema": {
  4255. "$ref": "#/components/schemas/PtyNotFoundError"
  4256. }
  4257. }
  4258. }
  4259. }
  4260. },
  4261. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4262. "summary": "Create PTY WebSocket token",
  4263. "x-codeSamples": [
  4264. {
  4265. "lang": "js",
  4266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4267. }
  4268. ]
  4269. }
  4270. },
  4271. "/question": {
  4272. "get": {
  4273. "tags": ["question"],
  4274. "operationId": "question.list",
  4275. "parameters": [
  4276. {
  4277. "name": "directory",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. },
  4284. {
  4285. "name": "workspace",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. }
  4292. ],
  4293. "responses": {
  4294. "200": {
  4295. "description": "List of pending questions",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "array",
  4300. "items": {
  4301. "$ref": "#/components/schemas/QuestionRequest"
  4302. },
  4303. "description": "List of pending questions"
  4304. }
  4305. }
  4306. }
  4307. },
  4308. "400": {
  4309. "description": "Bad request",
  4310. "content": {
  4311. "application/json": {
  4312. "schema": {
  4313. "$ref": "#/components/schemas/BadRequestError"
  4314. }
  4315. }
  4316. }
  4317. }
  4318. },
  4319. "description": "Get all pending question requests across all sessions.",
  4320. "summary": "List pending questions",
  4321. "x-codeSamples": [
  4322. {
  4323. "lang": "js",
  4324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4325. }
  4326. ]
  4327. }
  4328. },
  4329. "/question/{requestID}/reply": {
  4330. "post": {
  4331. "tags": ["question"],
  4332. "operationId": "question.reply",
  4333. "parameters": [
  4334. {
  4335. "name": "requestID",
  4336. "in": "path",
  4337. "schema": {
  4338. "type": "string",
  4339. "pattern": "^que"
  4340. },
  4341. "required": true
  4342. },
  4343. {
  4344. "name": "directory",
  4345. "in": "query",
  4346. "schema": {
  4347. "type": "string"
  4348. },
  4349. "required": false
  4350. },
  4351. {
  4352. "name": "workspace",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. }
  4359. ],
  4360. "responses": {
  4361. "200": {
  4362. "description": "Question answered successfully",
  4363. "content": {
  4364. "application/json": {
  4365. "schema": {
  4366. "type": "boolean",
  4367. "description": "Question answered successfully"
  4368. }
  4369. }
  4370. }
  4371. },
  4372. "400": {
  4373. "description": "BadRequest | InvalidRequestError",
  4374. "content": {
  4375. "application/json": {
  4376. "schema": {
  4377. "anyOf": [
  4378. {
  4379. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4380. },
  4381. {
  4382. "$ref": "#/components/schemas/InvalidRequestError"
  4383. }
  4384. ]
  4385. }
  4386. }
  4387. }
  4388. },
  4389. "404": {
  4390. "description": "QuestionNotFoundError",
  4391. "content": {
  4392. "application/json": {
  4393. "schema": {
  4394. "$ref": "#/components/schemas/QuestionNotFoundError"
  4395. }
  4396. }
  4397. }
  4398. }
  4399. },
  4400. "description": "Provide answers to a question request from the AI assistant.",
  4401. "summary": "Reply to question request",
  4402. "requestBody": {
  4403. "content": {
  4404. "application/json": {
  4405. "schema": {
  4406. "type": "object",
  4407. "properties": {
  4408. "answers": {
  4409. "type": "array",
  4410. "items": {
  4411. "$ref": "#/components/schemas/QuestionAnswer"
  4412. },
  4413. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4414. }
  4415. },
  4416. "required": ["answers"],
  4417. "additionalProperties": false
  4418. }
  4419. }
  4420. }
  4421. },
  4422. "x-codeSamples": [
  4423. {
  4424. "lang": "js",
  4425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4426. }
  4427. ]
  4428. }
  4429. },
  4430. "/question/{requestID}/reject": {
  4431. "post": {
  4432. "tags": ["question"],
  4433. "operationId": "question.reject",
  4434. "parameters": [
  4435. {
  4436. "name": "requestID",
  4437. "in": "path",
  4438. "schema": {
  4439. "type": "string",
  4440. "pattern": "^que"
  4441. },
  4442. "required": true
  4443. },
  4444. {
  4445. "name": "directory",
  4446. "in": "query",
  4447. "schema": {
  4448. "type": "string"
  4449. },
  4450. "required": false
  4451. },
  4452. {
  4453. "name": "workspace",
  4454. "in": "query",
  4455. "schema": {
  4456. "type": "string"
  4457. },
  4458. "required": false
  4459. }
  4460. ],
  4461. "responses": {
  4462. "200": {
  4463. "description": "Question rejected successfully",
  4464. "content": {
  4465. "application/json": {
  4466. "schema": {
  4467. "type": "boolean",
  4468. "description": "Question rejected successfully"
  4469. }
  4470. }
  4471. }
  4472. },
  4473. "400": {
  4474. "description": "BadRequest | InvalidRequestError",
  4475. "content": {
  4476. "application/json": {
  4477. "schema": {
  4478. "anyOf": [
  4479. {
  4480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4481. },
  4482. {
  4483. "$ref": "#/components/schemas/InvalidRequestError"
  4484. }
  4485. ]
  4486. }
  4487. }
  4488. }
  4489. },
  4490. "404": {
  4491. "description": "QuestionNotFoundError",
  4492. "content": {
  4493. "application/json": {
  4494. "schema": {
  4495. "$ref": "#/components/schemas/QuestionNotFoundError"
  4496. }
  4497. }
  4498. }
  4499. }
  4500. },
  4501. "description": "Reject a question request from the AI assistant.",
  4502. "summary": "Reject question request",
  4503. "x-codeSamples": [
  4504. {
  4505. "lang": "js",
  4506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4507. }
  4508. ]
  4509. }
  4510. },
  4511. "/permission": {
  4512. "get": {
  4513. "tags": ["permission"],
  4514. "operationId": "permission.list",
  4515. "parameters": [
  4516. {
  4517. "name": "directory",
  4518. "in": "query",
  4519. "schema": {
  4520. "type": "string"
  4521. },
  4522. "required": false
  4523. },
  4524. {
  4525. "name": "workspace",
  4526. "in": "query",
  4527. "schema": {
  4528. "type": "string"
  4529. },
  4530. "required": false
  4531. }
  4532. ],
  4533. "responses": {
  4534. "200": {
  4535. "description": "List of pending permissions",
  4536. "content": {
  4537. "application/json": {
  4538. "schema": {
  4539. "type": "array",
  4540. "items": {
  4541. "$ref": "#/components/schemas/PermissionRequest"
  4542. },
  4543. "description": "List of pending permissions"
  4544. }
  4545. }
  4546. }
  4547. },
  4548. "400": {
  4549. "description": "Bad request",
  4550. "content": {
  4551. "application/json": {
  4552. "schema": {
  4553. "$ref": "#/components/schemas/BadRequestError"
  4554. }
  4555. }
  4556. }
  4557. }
  4558. },
  4559. "description": "Get all pending permission requests across all sessions.",
  4560. "summary": "List pending permissions",
  4561. "x-codeSamples": [
  4562. {
  4563. "lang": "js",
  4564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4565. }
  4566. ]
  4567. }
  4568. },
  4569. "/permission/{requestID}/reply": {
  4570. "post": {
  4571. "tags": ["permission"],
  4572. "operationId": "permission.reply",
  4573. "parameters": [
  4574. {
  4575. "name": "requestID",
  4576. "in": "path",
  4577. "schema": {
  4578. "type": "string",
  4579. "pattern": "^per"
  4580. },
  4581. "required": true
  4582. },
  4583. {
  4584. "name": "directory",
  4585. "in": "query",
  4586. "schema": {
  4587. "type": "string"
  4588. },
  4589. "required": false
  4590. },
  4591. {
  4592. "name": "workspace",
  4593. "in": "query",
  4594. "schema": {
  4595. "type": "string"
  4596. },
  4597. "required": false
  4598. }
  4599. ],
  4600. "responses": {
  4601. "200": {
  4602. "description": "Permission processed successfully",
  4603. "content": {
  4604. "application/json": {
  4605. "schema": {
  4606. "type": "boolean",
  4607. "description": "Permission processed successfully"
  4608. }
  4609. }
  4610. }
  4611. },
  4612. "400": {
  4613. "description": "BadRequest | InvalidRequestError",
  4614. "content": {
  4615. "application/json": {
  4616. "schema": {
  4617. "anyOf": [
  4618. {
  4619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4620. },
  4621. {
  4622. "$ref": "#/components/schemas/InvalidRequestError"
  4623. }
  4624. ]
  4625. }
  4626. }
  4627. }
  4628. },
  4629. "404": {
  4630. "description": "PermissionNotFoundError",
  4631. "content": {
  4632. "application/json": {
  4633. "schema": {
  4634. "$ref": "#/components/schemas/PermissionNotFoundError"
  4635. }
  4636. }
  4637. }
  4638. }
  4639. },
  4640. "description": "Approve or deny a permission request from the AI assistant.",
  4641. "summary": "Respond to permission request",
  4642. "requestBody": {
  4643. "content": {
  4644. "application/json": {
  4645. "schema": {
  4646. "type": "object",
  4647. "properties": {
  4648. "reply": {
  4649. "type": "string",
  4650. "enum": ["once", "always", "reject"]
  4651. },
  4652. "message": {
  4653. "type": "string"
  4654. }
  4655. },
  4656. "required": ["reply"],
  4657. "additionalProperties": false
  4658. }
  4659. }
  4660. }
  4661. },
  4662. "x-codeSamples": [
  4663. {
  4664. "lang": "js",
  4665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4666. }
  4667. ]
  4668. }
  4669. },
  4670. "/provider": {
  4671. "get": {
  4672. "tags": ["provider"],
  4673. "operationId": "provider.list",
  4674. "parameters": [
  4675. {
  4676. "name": "directory",
  4677. "in": "query",
  4678. "schema": {
  4679. "type": "string"
  4680. },
  4681. "required": false
  4682. },
  4683. {
  4684. "name": "workspace",
  4685. "in": "query",
  4686. "schema": {
  4687. "type": "string"
  4688. },
  4689. "required": false
  4690. }
  4691. ],
  4692. "responses": {
  4693. "200": {
  4694. "description": "List of providers",
  4695. "content": {
  4696. "application/json": {
  4697. "schema": {
  4698. "type": "object",
  4699. "properties": {
  4700. "all": {
  4701. "type": "array",
  4702. "items": {
  4703. "$ref": "#/components/schemas/Provider"
  4704. }
  4705. },
  4706. "default": {
  4707. "type": "object",
  4708. "additionalProperties": {
  4709. "type": "string"
  4710. }
  4711. },
  4712. "connected": {
  4713. "type": "array",
  4714. "items": {
  4715. "type": "string"
  4716. }
  4717. }
  4718. },
  4719. "required": ["all", "default", "connected"],
  4720. "additionalProperties": false,
  4721. "description": "List of providers"
  4722. }
  4723. }
  4724. }
  4725. },
  4726. "400": {
  4727. "description": "Bad request",
  4728. "content": {
  4729. "application/json": {
  4730. "schema": {
  4731. "$ref": "#/components/schemas/BadRequestError"
  4732. }
  4733. }
  4734. }
  4735. }
  4736. },
  4737. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4738. "summary": "List providers",
  4739. "x-codeSamples": [
  4740. {
  4741. "lang": "js",
  4742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4743. }
  4744. ]
  4745. }
  4746. },
  4747. "/provider/auth": {
  4748. "get": {
  4749. "tags": ["provider"],
  4750. "operationId": "provider.auth",
  4751. "parameters": [
  4752. {
  4753. "name": "directory",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. },
  4760. {
  4761. "name": "workspace",
  4762. "in": "query",
  4763. "schema": {
  4764. "type": "string"
  4765. },
  4766. "required": false
  4767. }
  4768. ],
  4769. "responses": {
  4770. "200": {
  4771. "description": "Provider auth methods",
  4772. "content": {
  4773. "application/json": {
  4774. "schema": {
  4775. "type": "object",
  4776. "additionalProperties": {
  4777. "type": "array",
  4778. "items": {
  4779. "$ref": "#/components/schemas/ProviderAuthMethod"
  4780. }
  4781. },
  4782. "description": "Provider auth methods"
  4783. }
  4784. }
  4785. }
  4786. },
  4787. "400": {
  4788. "description": "Bad request",
  4789. "content": {
  4790. "application/json": {
  4791. "schema": {
  4792. "$ref": "#/components/schemas/BadRequestError"
  4793. }
  4794. }
  4795. }
  4796. }
  4797. },
  4798. "description": "Retrieve available authentication methods for all AI providers.",
  4799. "summary": "Get provider auth methods",
  4800. "x-codeSamples": [
  4801. {
  4802. "lang": "js",
  4803. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4804. }
  4805. ]
  4806. }
  4807. },
  4808. "/provider/{providerID}/oauth/authorize": {
  4809. "post": {
  4810. "tags": ["provider"],
  4811. "operationId": "provider.oauth.authorize",
  4812. "parameters": [
  4813. {
  4814. "name": "providerID",
  4815. "in": "path",
  4816. "schema": {
  4817. "type": "string"
  4818. },
  4819. "required": true
  4820. },
  4821. {
  4822. "name": "directory",
  4823. "in": "query",
  4824. "schema": {
  4825. "type": "string"
  4826. },
  4827. "required": false
  4828. },
  4829. {
  4830. "name": "workspace",
  4831. "in": "query",
  4832. "schema": {
  4833. "type": "string"
  4834. },
  4835. "required": false
  4836. }
  4837. ],
  4838. "responses": {
  4839. "200": {
  4840. "description": "Authorization URL and method",
  4841. "content": {
  4842. "application/json": {
  4843. "schema": {
  4844. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4845. }
  4846. }
  4847. }
  4848. },
  4849. "400": {
  4850. "description": "ProviderAuthError | InvalidRequestError",
  4851. "content": {
  4852. "application/json": {
  4853. "schema": {
  4854. "anyOf": [
  4855. {
  4856. "$ref": "#/components/schemas/ProviderAuthError1"
  4857. },
  4858. {
  4859. "$ref": "#/components/schemas/InvalidRequestError"
  4860. }
  4861. ]
  4862. }
  4863. }
  4864. }
  4865. }
  4866. },
  4867. "description": "Start the OAuth authorization flow for a provider.",
  4868. "summary": "Start OAuth authorization",
  4869. "requestBody": {
  4870. "content": {
  4871. "application/json": {
  4872. "schema": {
  4873. "type": "object",
  4874. "properties": {
  4875. "method": {
  4876. "type": "number",
  4877. "description": "Auth method index"
  4878. },
  4879. "inputs": {
  4880. "type": "object",
  4881. "additionalProperties": {
  4882. "type": "string"
  4883. }
  4884. }
  4885. },
  4886. "required": ["method"],
  4887. "additionalProperties": false
  4888. }
  4889. }
  4890. }
  4891. },
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/provider/{providerID}/oauth/callback": {
  4901. "post": {
  4902. "tags": ["provider"],
  4903. "operationId": "provider.oauth.callback",
  4904. "parameters": [
  4905. {
  4906. "name": "providerID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string"
  4910. },
  4911. "required": true
  4912. },
  4913. {
  4914. "name": "directory",
  4915. "in": "query",
  4916. "schema": {
  4917. "type": "string"
  4918. },
  4919. "required": false
  4920. },
  4921. {
  4922. "name": "workspace",
  4923. "in": "query",
  4924. "schema": {
  4925. "type": "string"
  4926. },
  4927. "required": false
  4928. }
  4929. ],
  4930. "responses": {
  4931. "200": {
  4932. "description": "OAuth callback processed successfully",
  4933. "content": {
  4934. "application/json": {
  4935. "schema": {
  4936. "type": "boolean",
  4937. "description": "OAuth callback processed successfully"
  4938. }
  4939. }
  4940. }
  4941. },
  4942. "400": {
  4943. "description": "ProviderAuthError | InvalidRequestError",
  4944. "content": {
  4945. "application/json": {
  4946. "schema": {
  4947. "anyOf": [
  4948. {
  4949. "$ref": "#/components/schemas/ProviderAuthError1"
  4950. },
  4951. {
  4952. "$ref": "#/components/schemas/InvalidRequestError"
  4953. }
  4954. ]
  4955. }
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "description": "Handle the OAuth callback from a provider after user authorization.",
  4961. "summary": "Handle OAuth callback",
  4962. "requestBody": {
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "type": "object",
  4967. "properties": {
  4968. "method": {
  4969. "type": "number",
  4970. "description": "Auth method index"
  4971. },
  4972. "code": {
  4973. "type": "string"
  4974. }
  4975. },
  4976. "required": ["method"],
  4977. "additionalProperties": false
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "x-codeSamples": [
  4983. {
  4984. "lang": "js",
  4985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4986. }
  4987. ]
  4988. }
  4989. },
  4990. "/session": {
  4991. "get": {
  4992. "tags": ["session"],
  4993. "operationId": "session.list",
  4994. "parameters": [
  4995. {
  4996. "name": "directory",
  4997. "in": "query",
  4998. "schema": {
  4999. "type": "string"
  5000. },
  5001. "required": false
  5002. },
  5003. {
  5004. "name": "workspace",
  5005. "in": "query",
  5006. "schema": {
  5007. "type": "string"
  5008. },
  5009. "required": false
  5010. },
  5011. {
  5012. "name": "scope",
  5013. "in": "query",
  5014. "schema": {
  5015. "type": "string",
  5016. "enum": ["project"]
  5017. },
  5018. "required": false
  5019. },
  5020. {
  5021. "name": "path",
  5022. "in": "query",
  5023. "schema": {
  5024. "type": "string"
  5025. },
  5026. "required": false
  5027. },
  5028. {
  5029. "name": "roots",
  5030. "in": "query",
  5031. "schema": {
  5032. "anyOf": [
  5033. {
  5034. "type": "boolean"
  5035. },
  5036. {
  5037. "type": "string",
  5038. "enum": ["true", "false"]
  5039. }
  5040. ]
  5041. },
  5042. "required": false
  5043. },
  5044. {
  5045. "name": "start",
  5046. "in": "query",
  5047. "schema": {
  5048. "type": "number"
  5049. },
  5050. "required": false
  5051. },
  5052. {
  5053. "name": "search",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "limit",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "number"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "List of sessions",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "array",
  5076. "items": {
  5077. "$ref": "#/components/schemas/Session"
  5078. },
  5079. "description": "List of sessions"
  5080. }
  5081. }
  5082. }
  5083. },
  5084. "400": {
  5085. "description": "Bad request",
  5086. "content": {
  5087. "application/json": {
  5088. "schema": {
  5089. "$ref": "#/components/schemas/BadRequestError"
  5090. }
  5091. }
  5092. }
  5093. }
  5094. },
  5095. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5096. "summary": "List sessions",
  5097. "x-codeSamples": [
  5098. {
  5099. "lang": "js",
  5100. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5101. }
  5102. ]
  5103. },
  5104. "post": {
  5105. "tags": ["session"],
  5106. "operationId": "session.create",
  5107. "parameters": [
  5108. {
  5109. "name": "directory",
  5110. "in": "query",
  5111. "schema": {
  5112. "type": "string"
  5113. },
  5114. "required": false
  5115. },
  5116. {
  5117. "name": "workspace",
  5118. "in": "query",
  5119. "schema": {
  5120. "type": "string"
  5121. },
  5122. "required": false
  5123. }
  5124. ],
  5125. "responses": {
  5126. "200": {
  5127. "description": "Successfully created session",
  5128. "content": {
  5129. "application/json": {
  5130. "schema": {
  5131. "$ref": "#/components/schemas/Session"
  5132. }
  5133. }
  5134. }
  5135. },
  5136. "400": {
  5137. "description": "BadRequest | InvalidRequestError",
  5138. "content": {
  5139. "application/json": {
  5140. "schema": {
  5141. "anyOf": [
  5142. {
  5143. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5144. },
  5145. {
  5146. "$ref": "#/components/schemas/InvalidRequestError"
  5147. }
  5148. ]
  5149. }
  5150. }
  5151. }
  5152. }
  5153. },
  5154. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5155. "summary": "Create session",
  5156. "requestBody": {
  5157. "content": {
  5158. "application/json": {
  5159. "schema": {
  5160. "type": "object",
  5161. "properties": {
  5162. "parentID": {
  5163. "type": "string",
  5164. "pattern": "^ses"
  5165. },
  5166. "title": {
  5167. "type": "string"
  5168. },
  5169. "agent": {
  5170. "type": "string"
  5171. },
  5172. "model": {
  5173. "type": "object",
  5174. "properties": {
  5175. "id": {
  5176. "type": "string"
  5177. },
  5178. "providerID": {
  5179. "type": "string"
  5180. },
  5181. "variant": {
  5182. "type": "string"
  5183. }
  5184. },
  5185. "required": ["id", "providerID"],
  5186. "additionalProperties": false
  5187. },
  5188. "metadata": {
  5189. "type": "object"
  5190. },
  5191. "permission": {
  5192. "$ref": "#/components/schemas/PermissionRuleset"
  5193. },
  5194. "workspaceID": {
  5195. "type": "string",
  5196. "pattern": "^wrk"
  5197. }
  5198. },
  5199. "additionalProperties": false
  5200. }
  5201. }
  5202. }
  5203. },
  5204. "x-codeSamples": [
  5205. {
  5206. "lang": "js",
  5207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5208. }
  5209. ]
  5210. }
  5211. },
  5212. "/session/status": {
  5213. "get": {
  5214. "tags": ["session"],
  5215. "operationId": "session.status",
  5216. "parameters": [
  5217. {
  5218. "name": "directory",
  5219. "in": "query",
  5220. "schema": {
  5221. "type": "string"
  5222. },
  5223. "required": false
  5224. },
  5225. {
  5226. "name": "workspace",
  5227. "in": "query",
  5228. "schema": {
  5229. "type": "string"
  5230. },
  5231. "required": false
  5232. }
  5233. ],
  5234. "responses": {
  5235. "200": {
  5236. "description": "Get session status",
  5237. "content": {
  5238. "application/json": {
  5239. "schema": {
  5240. "type": "object",
  5241. "additionalProperties": {
  5242. "$ref": "#/components/schemas/SessionStatus"
  5243. },
  5244. "description": "Get session status"
  5245. }
  5246. }
  5247. }
  5248. },
  5249. "400": {
  5250. "description": "BadRequest | InvalidRequestError",
  5251. "content": {
  5252. "application/json": {
  5253. "schema": {
  5254. "anyOf": [
  5255. {
  5256. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5257. },
  5258. {
  5259. "$ref": "#/components/schemas/InvalidRequestError"
  5260. }
  5261. ]
  5262. }
  5263. }
  5264. }
  5265. }
  5266. },
  5267. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5268. "summary": "Get session status",
  5269. "x-codeSamples": [
  5270. {
  5271. "lang": "js",
  5272. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5273. }
  5274. ]
  5275. }
  5276. },
  5277. "/session/{sessionID}": {
  5278. "get": {
  5279. "tags": ["session"],
  5280. "operationId": "session.get",
  5281. "parameters": [
  5282. {
  5283. "name": "sessionID",
  5284. "in": "path",
  5285. "schema": {
  5286. "type": "string",
  5287. "pattern": "^ses"
  5288. },
  5289. "required": true
  5290. },
  5291. {
  5292. "name": "directory",
  5293. "in": "query",
  5294. "schema": {
  5295. "type": "string"
  5296. },
  5297. "required": false
  5298. },
  5299. {
  5300. "name": "workspace",
  5301. "in": "query",
  5302. "schema": {
  5303. "type": "string"
  5304. },
  5305. "required": false
  5306. }
  5307. ],
  5308. "responses": {
  5309. "200": {
  5310. "description": "Get session",
  5311. "content": {
  5312. "application/json": {
  5313. "schema": {
  5314. "$ref": "#/components/schemas/Session"
  5315. }
  5316. }
  5317. }
  5318. },
  5319. "400": {
  5320. "description": "BadRequest | InvalidRequestError",
  5321. "content": {
  5322. "application/json": {
  5323. "schema": {
  5324. "anyOf": [
  5325. {
  5326. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5327. },
  5328. {
  5329. "$ref": "#/components/schemas/InvalidRequestError"
  5330. }
  5331. ]
  5332. }
  5333. }
  5334. }
  5335. },
  5336. "404": {
  5337. "description": "NotFoundError",
  5338. "content": {
  5339. "application/json": {
  5340. "schema": {
  5341. "$ref": "#/components/schemas/NotFoundError"
  5342. }
  5343. }
  5344. }
  5345. }
  5346. },
  5347. "description": "Retrieve detailed information about a specific OpenCode session.",
  5348. "summary": "Get session",
  5349. "x-codeSamples": [
  5350. {
  5351. "lang": "js",
  5352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5353. }
  5354. ]
  5355. },
  5356. "delete": {
  5357. "tags": ["session"],
  5358. "operationId": "session.delete",
  5359. "parameters": [
  5360. {
  5361. "name": "sessionID",
  5362. "in": "path",
  5363. "schema": {
  5364. "type": "string",
  5365. "pattern": "^ses"
  5366. },
  5367. "required": true
  5368. },
  5369. {
  5370. "name": "directory",
  5371. "in": "query",
  5372. "schema": {
  5373. "type": "string"
  5374. },
  5375. "required": false
  5376. },
  5377. {
  5378. "name": "workspace",
  5379. "in": "query",
  5380. "schema": {
  5381. "type": "string"
  5382. },
  5383. "required": false
  5384. }
  5385. ],
  5386. "responses": {
  5387. "200": {
  5388. "description": "Successfully deleted session",
  5389. "content": {
  5390. "application/json": {
  5391. "schema": {
  5392. "type": "boolean",
  5393. "description": "Successfully deleted session"
  5394. }
  5395. }
  5396. }
  5397. },
  5398. "400": {
  5399. "description": "BadRequest | InvalidRequestError",
  5400. "content": {
  5401. "application/json": {
  5402. "schema": {
  5403. "anyOf": [
  5404. {
  5405. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5406. },
  5407. {
  5408. "$ref": "#/components/schemas/InvalidRequestError"
  5409. }
  5410. ]
  5411. }
  5412. }
  5413. }
  5414. },
  5415. "404": {
  5416. "description": "NotFoundError",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/NotFoundError"
  5421. }
  5422. }
  5423. }
  5424. }
  5425. },
  5426. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5427. "summary": "Delete session",
  5428. "x-codeSamples": [
  5429. {
  5430. "lang": "js",
  5431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5432. }
  5433. ]
  5434. },
  5435. "patch": {
  5436. "tags": ["session"],
  5437. "operationId": "session.update",
  5438. "parameters": [
  5439. {
  5440. "name": "sessionID",
  5441. "in": "path",
  5442. "schema": {
  5443. "type": "string",
  5444. "pattern": "^ses"
  5445. },
  5446. "required": true
  5447. },
  5448. {
  5449. "name": "directory",
  5450. "in": "query",
  5451. "schema": {
  5452. "type": "string"
  5453. },
  5454. "required": false
  5455. },
  5456. {
  5457. "name": "workspace",
  5458. "in": "query",
  5459. "schema": {
  5460. "type": "string"
  5461. },
  5462. "required": false
  5463. }
  5464. ],
  5465. "responses": {
  5466. "200": {
  5467. "description": "Successfully updated session",
  5468. "content": {
  5469. "application/json": {
  5470. "schema": {
  5471. "$ref": "#/components/schemas/Session"
  5472. }
  5473. }
  5474. }
  5475. },
  5476. "400": {
  5477. "description": "BadRequest | InvalidRequestError",
  5478. "content": {
  5479. "application/json": {
  5480. "schema": {
  5481. "anyOf": [
  5482. {
  5483. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5484. },
  5485. {
  5486. "$ref": "#/components/schemas/InvalidRequestError"
  5487. }
  5488. ]
  5489. }
  5490. }
  5491. }
  5492. },
  5493. "404": {
  5494. "description": "NotFoundError",
  5495. "content": {
  5496. "application/json": {
  5497. "schema": {
  5498. "$ref": "#/components/schemas/NotFoundError"
  5499. }
  5500. }
  5501. }
  5502. }
  5503. },
  5504. "description": "Update properties of an existing session, such as title or other metadata.",
  5505. "summary": "Update session",
  5506. "requestBody": {
  5507. "content": {
  5508. "application/json": {
  5509. "schema": {
  5510. "type": "object",
  5511. "properties": {
  5512. "title": {
  5513. "type": "string"
  5514. },
  5515. "metadata": {
  5516. "type": "object"
  5517. },
  5518. "permission": {
  5519. "$ref": "#/components/schemas/PermissionRuleset"
  5520. },
  5521. "time": {
  5522. "type": "object",
  5523. "properties": {
  5524. "archived": {
  5525. "type": "number"
  5526. }
  5527. },
  5528. "additionalProperties": false
  5529. }
  5530. },
  5531. "additionalProperties": false
  5532. }
  5533. }
  5534. }
  5535. },
  5536. "x-codeSamples": [
  5537. {
  5538. "lang": "js",
  5539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5540. }
  5541. ]
  5542. }
  5543. },
  5544. "/session/{sessionID}/children": {
  5545. "get": {
  5546. "tags": ["session"],
  5547. "operationId": "session.children",
  5548. "parameters": [
  5549. {
  5550. "name": "sessionID",
  5551. "in": "path",
  5552. "schema": {
  5553. "type": "string",
  5554. "pattern": "^ses"
  5555. },
  5556. "required": true
  5557. },
  5558. {
  5559. "name": "directory",
  5560. "in": "query",
  5561. "schema": {
  5562. "type": "string"
  5563. },
  5564. "required": false
  5565. },
  5566. {
  5567. "name": "workspace",
  5568. "in": "query",
  5569. "schema": {
  5570. "type": "string"
  5571. },
  5572. "required": false
  5573. }
  5574. ],
  5575. "responses": {
  5576. "200": {
  5577. "description": "List of children",
  5578. "content": {
  5579. "application/json": {
  5580. "schema": {
  5581. "type": "array",
  5582. "items": {
  5583. "$ref": "#/components/schemas/Session"
  5584. },
  5585. "description": "List of children"
  5586. }
  5587. }
  5588. }
  5589. },
  5590. "400": {
  5591. "description": "BadRequest | InvalidRequestError",
  5592. "content": {
  5593. "application/json": {
  5594. "schema": {
  5595. "anyOf": [
  5596. {
  5597. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5598. },
  5599. {
  5600. "$ref": "#/components/schemas/InvalidRequestError"
  5601. }
  5602. ]
  5603. }
  5604. }
  5605. }
  5606. },
  5607. "404": {
  5608. "description": "NotFoundError",
  5609. "content": {
  5610. "application/json": {
  5611. "schema": {
  5612. "$ref": "#/components/schemas/NotFoundError"
  5613. }
  5614. }
  5615. }
  5616. }
  5617. },
  5618. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5619. "summary": "Get session children",
  5620. "x-codeSamples": [
  5621. {
  5622. "lang": "js",
  5623. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5624. }
  5625. ]
  5626. }
  5627. },
  5628. "/session/{sessionID}/todo": {
  5629. "get": {
  5630. "tags": ["session"],
  5631. "operationId": "session.todo",
  5632. "parameters": [
  5633. {
  5634. "name": "sessionID",
  5635. "in": "path",
  5636. "schema": {
  5637. "type": "string",
  5638. "pattern": "^ses"
  5639. },
  5640. "required": true
  5641. },
  5642. {
  5643. "name": "directory",
  5644. "in": "query",
  5645. "schema": {
  5646. "type": "string"
  5647. },
  5648. "required": false
  5649. },
  5650. {
  5651. "name": "workspace",
  5652. "in": "query",
  5653. "schema": {
  5654. "type": "string"
  5655. },
  5656. "required": false
  5657. }
  5658. ],
  5659. "responses": {
  5660. "200": {
  5661. "description": "Todo list",
  5662. "content": {
  5663. "application/json": {
  5664. "schema": {
  5665. "type": "array",
  5666. "items": {
  5667. "$ref": "#/components/schemas/Todo"
  5668. },
  5669. "description": "Todo list"
  5670. }
  5671. }
  5672. }
  5673. },
  5674. "400": {
  5675. "description": "BadRequest | InvalidRequestError",
  5676. "content": {
  5677. "application/json": {
  5678. "schema": {
  5679. "anyOf": [
  5680. {
  5681. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5682. },
  5683. {
  5684. "$ref": "#/components/schemas/InvalidRequestError"
  5685. }
  5686. ]
  5687. }
  5688. }
  5689. }
  5690. },
  5691. "404": {
  5692. "description": "NotFoundError",
  5693. "content": {
  5694. "application/json": {
  5695. "schema": {
  5696. "$ref": "#/components/schemas/NotFoundError"
  5697. }
  5698. }
  5699. }
  5700. }
  5701. },
  5702. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5703. "summary": "Get session todos",
  5704. "x-codeSamples": [
  5705. {
  5706. "lang": "js",
  5707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5708. }
  5709. ]
  5710. }
  5711. },
  5712. "/session/{sessionID}/diff": {
  5713. "get": {
  5714. "tags": ["session"],
  5715. "operationId": "session.diff",
  5716. "parameters": [
  5717. {
  5718. "name": "sessionID",
  5719. "in": "path",
  5720. "schema": {
  5721. "type": "string",
  5722. "pattern": "^ses"
  5723. },
  5724. "required": true
  5725. },
  5726. {
  5727. "name": "directory",
  5728. "in": "query",
  5729. "schema": {
  5730. "type": "string"
  5731. },
  5732. "required": false
  5733. },
  5734. {
  5735. "name": "workspace",
  5736. "in": "query",
  5737. "schema": {
  5738. "type": "string"
  5739. },
  5740. "required": false
  5741. },
  5742. {
  5743. "name": "messageID",
  5744. "in": "query",
  5745. "schema": {
  5746. "type": "string",
  5747. "pattern": "^msg"
  5748. },
  5749. "required": false
  5750. }
  5751. ],
  5752. "responses": {
  5753. "200": {
  5754. "description": "Successfully retrieved diff",
  5755. "content": {
  5756. "application/json": {
  5757. "schema": {
  5758. "type": "array",
  5759. "items": {
  5760. "$ref": "#/components/schemas/SnapshotFileDiff"
  5761. },
  5762. "description": "Successfully retrieved diff"
  5763. }
  5764. }
  5765. }
  5766. },
  5767. "400": {
  5768. "description": "Bad request",
  5769. "content": {
  5770. "application/json": {
  5771. "schema": {
  5772. "$ref": "#/components/schemas/BadRequestError"
  5773. }
  5774. }
  5775. }
  5776. }
  5777. },
  5778. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5779. "summary": "Get message diff",
  5780. "x-codeSamples": [
  5781. {
  5782. "lang": "js",
  5783. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5784. }
  5785. ]
  5786. }
  5787. },
  5788. "/session/{sessionID}/message": {
  5789. "get": {
  5790. "tags": ["session"],
  5791. "operationId": "session.messages",
  5792. "parameters": [
  5793. {
  5794. "name": "sessionID",
  5795. "in": "path",
  5796. "schema": {
  5797. "type": "string",
  5798. "pattern": "^ses"
  5799. },
  5800. "required": true
  5801. },
  5802. {
  5803. "name": "directory",
  5804. "in": "query",
  5805. "schema": {
  5806. "type": "string"
  5807. },
  5808. "required": false
  5809. },
  5810. {
  5811. "name": "workspace",
  5812. "in": "query",
  5813. "schema": {
  5814. "type": "string"
  5815. },
  5816. "required": false
  5817. },
  5818. {
  5819. "name": "limit",
  5820. "in": "query",
  5821. "schema": {
  5822. "type": "integer",
  5823. "minimum": 0,
  5824. "maximum": 9007199254740991
  5825. },
  5826. "required": false
  5827. },
  5828. {
  5829. "name": "before",
  5830. "in": "query",
  5831. "schema": {
  5832. "type": "string"
  5833. },
  5834. "required": false
  5835. }
  5836. ],
  5837. "responses": {
  5838. "200": {
  5839. "description": "List of messages",
  5840. "content": {
  5841. "application/json": {
  5842. "schema": {
  5843. "type": "array",
  5844. "items": {
  5845. "type": "object",
  5846. "properties": {
  5847. "info": {
  5848. "$ref": "#/components/schemas/Message"
  5849. },
  5850. "parts": {
  5851. "type": "array",
  5852. "items": {
  5853. "$ref": "#/components/schemas/Part"
  5854. }
  5855. }
  5856. },
  5857. "required": ["info", "parts"],
  5858. "additionalProperties": false
  5859. },
  5860. "description": "List of messages"
  5861. }
  5862. }
  5863. }
  5864. },
  5865. "400": {
  5866. "description": "BadRequest | InvalidRequestError",
  5867. "content": {
  5868. "application/json": {
  5869. "schema": {
  5870. "anyOf": [
  5871. {
  5872. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5873. },
  5874. {
  5875. "$ref": "#/components/schemas/InvalidRequestError"
  5876. }
  5877. ]
  5878. }
  5879. }
  5880. }
  5881. },
  5882. "404": {
  5883. "description": "NotFoundError",
  5884. "content": {
  5885. "application/json": {
  5886. "schema": {
  5887. "$ref": "#/components/schemas/NotFoundError"
  5888. }
  5889. }
  5890. }
  5891. }
  5892. },
  5893. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5894. "summary": "Get session messages",
  5895. "x-codeSamples": [
  5896. {
  5897. "lang": "js",
  5898. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5899. }
  5900. ]
  5901. },
  5902. "post": {
  5903. "tags": ["session"],
  5904. "operationId": "session.prompt",
  5905. "parameters": [
  5906. {
  5907. "name": "sessionID",
  5908. "in": "path",
  5909. "schema": {
  5910. "type": "string",
  5911. "pattern": "^ses"
  5912. },
  5913. "required": true
  5914. },
  5915. {
  5916. "name": "directory",
  5917. "in": "query",
  5918. "schema": {
  5919. "type": "string"
  5920. },
  5921. "required": false
  5922. },
  5923. {
  5924. "name": "workspace",
  5925. "in": "query",
  5926. "schema": {
  5927. "type": "string"
  5928. },
  5929. "required": false
  5930. }
  5931. ],
  5932. "responses": {
  5933. "200": {
  5934. "description": "Created message",
  5935. "content": {
  5936. "application/json": {
  5937. "schema": {
  5938. "type": "object",
  5939. "required": ["info", "parts"],
  5940. "properties": {
  5941. "info": {
  5942. "$ref": "#/components/schemas/AssistantMessage"
  5943. },
  5944. "parts": {
  5945. "type": "array",
  5946. "items": {
  5947. "$ref": "#/components/schemas/Part"
  5948. }
  5949. }
  5950. }
  5951. }
  5952. }
  5953. }
  5954. },
  5955. "400": {
  5956. "description": "BadRequest | InvalidRequestError",
  5957. "content": {
  5958. "application/json": {
  5959. "schema": {
  5960. "anyOf": [
  5961. {
  5962. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5963. },
  5964. {
  5965. "$ref": "#/components/schemas/InvalidRequestError"
  5966. }
  5967. ]
  5968. }
  5969. }
  5970. }
  5971. },
  5972. "404": {
  5973. "description": "NotFoundError",
  5974. "content": {
  5975. "application/json": {
  5976. "schema": {
  5977. "$ref": "#/components/schemas/NotFoundError"
  5978. }
  5979. }
  5980. }
  5981. }
  5982. },
  5983. "description": "Create and send a new message to a session, streaming the AI response.",
  5984. "summary": "Send message",
  5985. "requestBody": {
  5986. "content": {
  5987. "application/json": {
  5988. "schema": {
  5989. "type": "object",
  5990. "properties": {
  5991. "messageID": {
  5992. "type": "string",
  5993. "pattern": "^msg"
  5994. },
  5995. "model": {
  5996. "type": "object",
  5997. "properties": {
  5998. "providerID": {
  5999. "type": "string"
  6000. },
  6001. "modelID": {
  6002. "type": "string"
  6003. }
  6004. },
  6005. "required": ["providerID", "modelID"],
  6006. "additionalProperties": false
  6007. },
  6008. "agent": {
  6009. "type": "string"
  6010. },
  6011. "noReply": {
  6012. "type": "boolean"
  6013. },
  6014. "tools": {
  6015. "type": "object",
  6016. "additionalProperties": {
  6017. "type": "boolean"
  6018. }
  6019. },
  6020. "format": {
  6021. "$ref": "#/components/schemas/OutputFormat"
  6022. },
  6023. "system": {
  6024. "type": "string"
  6025. },
  6026. "variant": {
  6027. "type": "string"
  6028. },
  6029. "parts": {
  6030. "type": "array",
  6031. "items": {
  6032. "anyOf": [
  6033. {
  6034. "$ref": "#/components/schemas/TextPartInput"
  6035. },
  6036. {
  6037. "$ref": "#/components/schemas/FilePartInput"
  6038. },
  6039. {
  6040. "$ref": "#/components/schemas/AgentPartInput"
  6041. },
  6042. {
  6043. "$ref": "#/components/schemas/SubtaskPartInput"
  6044. }
  6045. ]
  6046. }
  6047. }
  6048. },
  6049. "required": ["parts"],
  6050. "additionalProperties": false
  6051. }
  6052. }
  6053. }
  6054. },
  6055. "x-codeSamples": [
  6056. {
  6057. "lang": "js",
  6058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6059. }
  6060. ]
  6061. }
  6062. },
  6063. "/session/{sessionID}/message/{messageID}": {
  6064. "get": {
  6065. "tags": ["session"],
  6066. "operationId": "session.message",
  6067. "parameters": [
  6068. {
  6069. "name": "sessionID",
  6070. "in": "path",
  6071. "schema": {
  6072. "type": "string",
  6073. "pattern": "^ses"
  6074. },
  6075. "required": true
  6076. },
  6077. {
  6078. "name": "messageID",
  6079. "in": "path",
  6080. "schema": {
  6081. "type": "string",
  6082. "pattern": "^msg"
  6083. },
  6084. "required": true
  6085. },
  6086. {
  6087. "name": "directory",
  6088. "in": "query",
  6089. "schema": {
  6090. "type": "string"
  6091. },
  6092. "required": false
  6093. },
  6094. {
  6095. "name": "workspace",
  6096. "in": "query",
  6097. "schema": {
  6098. "type": "string"
  6099. },
  6100. "required": false
  6101. }
  6102. ],
  6103. "responses": {
  6104. "200": {
  6105. "description": "Message",
  6106. "content": {
  6107. "application/json": {
  6108. "schema": {
  6109. "type": "object",
  6110. "properties": {
  6111. "info": {
  6112. "$ref": "#/components/schemas/Message"
  6113. },
  6114. "parts": {
  6115. "type": "array",
  6116. "items": {
  6117. "$ref": "#/components/schemas/Part"
  6118. }
  6119. }
  6120. },
  6121. "required": ["info", "parts"],
  6122. "additionalProperties": false,
  6123. "description": "Message"
  6124. }
  6125. }
  6126. }
  6127. },
  6128. "400": {
  6129. "description": "BadRequest | InvalidRequestError",
  6130. "content": {
  6131. "application/json": {
  6132. "schema": {
  6133. "anyOf": [
  6134. {
  6135. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6136. },
  6137. {
  6138. "$ref": "#/components/schemas/InvalidRequestError"
  6139. }
  6140. ]
  6141. }
  6142. }
  6143. }
  6144. },
  6145. "404": {
  6146. "description": "NotFoundError",
  6147. "content": {
  6148. "application/json": {
  6149. "schema": {
  6150. "$ref": "#/components/schemas/NotFoundError"
  6151. }
  6152. }
  6153. }
  6154. }
  6155. },
  6156. "description": "Retrieve a specific message from a session by its message ID.",
  6157. "summary": "Get message",
  6158. "x-codeSamples": [
  6159. {
  6160. "lang": "js",
  6161. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6162. }
  6163. ]
  6164. },
  6165. "delete": {
  6166. "tags": ["session"],
  6167. "operationId": "session.deleteMessage",
  6168. "parameters": [
  6169. {
  6170. "name": "sessionID",
  6171. "in": "path",
  6172. "schema": {
  6173. "type": "string",
  6174. "pattern": "^ses"
  6175. },
  6176. "required": true
  6177. },
  6178. {
  6179. "name": "messageID",
  6180. "in": "path",
  6181. "schema": {
  6182. "type": "string",
  6183. "pattern": "^msg"
  6184. },
  6185. "required": true
  6186. },
  6187. {
  6188. "name": "directory",
  6189. "in": "query",
  6190. "schema": {
  6191. "type": "string"
  6192. },
  6193. "required": false
  6194. },
  6195. {
  6196. "name": "workspace",
  6197. "in": "query",
  6198. "schema": {
  6199. "type": "string"
  6200. },
  6201. "required": false
  6202. }
  6203. ],
  6204. "responses": {
  6205. "200": {
  6206. "description": "Successfully deleted message",
  6207. "content": {
  6208. "application/json": {
  6209. "schema": {
  6210. "type": "boolean",
  6211. "description": "Successfully deleted message"
  6212. }
  6213. }
  6214. }
  6215. },
  6216. "400": {
  6217. "description": "BadRequest | InvalidRequestError",
  6218. "content": {
  6219. "application/json": {
  6220. "schema": {
  6221. "anyOf": [
  6222. {
  6223. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6224. },
  6225. {
  6226. "$ref": "#/components/schemas/InvalidRequestError"
  6227. }
  6228. ]
  6229. }
  6230. }
  6231. }
  6232. },
  6233. "404": {
  6234. "description": "NotFoundError",
  6235. "content": {
  6236. "application/json": {
  6237. "schema": {
  6238. "$ref": "#/components/schemas/NotFoundError"
  6239. }
  6240. }
  6241. }
  6242. },
  6243. "409": {
  6244. "description": "SessionBusyError",
  6245. "content": {
  6246. "application/json": {
  6247. "schema": {
  6248. "$ref": "#/components/schemas/SessionBusyError"
  6249. }
  6250. }
  6251. }
  6252. }
  6253. },
  6254. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6255. "summary": "Delete message",
  6256. "x-codeSamples": [
  6257. {
  6258. "lang": "js",
  6259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6260. }
  6261. ]
  6262. }
  6263. },
  6264. "/session/{sessionID}/fork": {
  6265. "post": {
  6266. "tags": ["session"],
  6267. "operationId": "session.fork",
  6268. "parameters": [
  6269. {
  6270. "name": "sessionID",
  6271. "in": "path",
  6272. "schema": {
  6273. "type": "string",
  6274. "pattern": "^ses"
  6275. },
  6276. "required": true
  6277. },
  6278. {
  6279. "name": "directory",
  6280. "in": "query",
  6281. "schema": {
  6282. "type": "string"
  6283. },
  6284. "required": false
  6285. },
  6286. {
  6287. "name": "workspace",
  6288. "in": "query",
  6289. "schema": {
  6290. "type": "string"
  6291. },
  6292. "required": false
  6293. }
  6294. ],
  6295. "responses": {
  6296. "200": {
  6297. "description": "200",
  6298. "content": {
  6299. "application/json": {
  6300. "schema": {
  6301. "$ref": "#/components/schemas/Session"
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "400": {
  6307. "description": "BadRequest | InvalidRequestError",
  6308. "content": {
  6309. "application/json": {
  6310. "schema": {
  6311. "anyOf": [
  6312. {
  6313. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6314. },
  6315. {
  6316. "$ref": "#/components/schemas/InvalidRequestError"
  6317. }
  6318. ]
  6319. }
  6320. }
  6321. }
  6322. },
  6323. "404": {
  6324. "description": "NotFoundError",
  6325. "content": {
  6326. "application/json": {
  6327. "schema": {
  6328. "$ref": "#/components/schemas/NotFoundError"
  6329. }
  6330. }
  6331. }
  6332. }
  6333. },
  6334. "description": "Create a new session by forking an existing session at a specific message point.",
  6335. "summary": "Fork session",
  6336. "requestBody": {
  6337. "content": {
  6338. "application/json": {
  6339. "schema": {
  6340. "type": "object",
  6341. "properties": {
  6342. "messageID": {
  6343. "type": "string",
  6344. "pattern": "^msg"
  6345. }
  6346. },
  6347. "additionalProperties": false
  6348. }
  6349. }
  6350. }
  6351. },
  6352. "x-codeSamples": [
  6353. {
  6354. "lang": "js",
  6355. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6356. }
  6357. ]
  6358. }
  6359. },
  6360. "/session/{sessionID}/abort": {
  6361. "post": {
  6362. "tags": ["session"],
  6363. "operationId": "session.abort",
  6364. "parameters": [
  6365. {
  6366. "name": "sessionID",
  6367. "in": "path",
  6368. "schema": {
  6369. "type": "string",
  6370. "pattern": "^ses"
  6371. },
  6372. "required": true
  6373. },
  6374. {
  6375. "name": "directory",
  6376. "in": "query",
  6377. "schema": {
  6378. "type": "string"
  6379. },
  6380. "required": false
  6381. },
  6382. {
  6383. "name": "workspace",
  6384. "in": "query",
  6385. "schema": {
  6386. "type": "string"
  6387. },
  6388. "required": false
  6389. }
  6390. ],
  6391. "responses": {
  6392. "200": {
  6393. "description": "Aborted session",
  6394. "content": {
  6395. "application/json": {
  6396. "schema": {
  6397. "type": "boolean",
  6398. "description": "Aborted session"
  6399. }
  6400. }
  6401. }
  6402. },
  6403. "400": {
  6404. "description": "BadRequest | InvalidRequestError",
  6405. "content": {
  6406. "application/json": {
  6407. "schema": {
  6408. "anyOf": [
  6409. {
  6410. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6411. },
  6412. {
  6413. "$ref": "#/components/schemas/InvalidRequestError"
  6414. }
  6415. ]
  6416. }
  6417. }
  6418. }
  6419. }
  6420. },
  6421. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6422. "summary": "Abort session",
  6423. "x-codeSamples": [
  6424. {
  6425. "lang": "js",
  6426. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6427. }
  6428. ]
  6429. }
  6430. },
  6431. "/session/{sessionID}/init": {
  6432. "post": {
  6433. "tags": ["session"],
  6434. "operationId": "session.init",
  6435. "parameters": [
  6436. {
  6437. "name": "sessionID",
  6438. "in": "path",
  6439. "schema": {
  6440. "type": "string",
  6441. "pattern": "^ses"
  6442. },
  6443. "required": true
  6444. },
  6445. {
  6446. "name": "directory",
  6447. "in": "query",
  6448. "schema": {
  6449. "type": "string"
  6450. },
  6451. "required": false
  6452. },
  6453. {
  6454. "name": "workspace",
  6455. "in": "query",
  6456. "schema": {
  6457. "type": "string"
  6458. },
  6459. "required": false
  6460. }
  6461. ],
  6462. "responses": {
  6463. "200": {
  6464. "description": "200",
  6465. "content": {
  6466. "application/json": {
  6467. "schema": {
  6468. "type": "boolean",
  6469. "description": "200"
  6470. }
  6471. }
  6472. }
  6473. },
  6474. "400": {
  6475. "description": "BadRequest | InvalidRequestError",
  6476. "content": {
  6477. "application/json": {
  6478. "schema": {
  6479. "anyOf": [
  6480. {
  6481. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6482. },
  6483. {
  6484. "$ref": "#/components/schemas/InvalidRequestError"
  6485. }
  6486. ]
  6487. }
  6488. }
  6489. }
  6490. },
  6491. "404": {
  6492. "description": "NotFoundError",
  6493. "content": {
  6494. "application/json": {
  6495. "schema": {
  6496. "$ref": "#/components/schemas/NotFoundError"
  6497. }
  6498. }
  6499. }
  6500. }
  6501. },
  6502. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6503. "summary": "Initialize session",
  6504. "requestBody": {
  6505. "content": {
  6506. "application/json": {
  6507. "schema": {
  6508. "type": "object",
  6509. "properties": {
  6510. "modelID": {
  6511. "type": "string"
  6512. },
  6513. "providerID": {
  6514. "type": "string"
  6515. },
  6516. "messageID": {
  6517. "type": "string",
  6518. "pattern": "^msg"
  6519. }
  6520. },
  6521. "required": ["modelID", "providerID", "messageID"],
  6522. "additionalProperties": false
  6523. }
  6524. }
  6525. }
  6526. },
  6527. "x-codeSamples": [
  6528. {
  6529. "lang": "js",
  6530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6531. }
  6532. ]
  6533. }
  6534. },
  6535. "/session/{sessionID}/share": {
  6536. "post": {
  6537. "tags": ["session"],
  6538. "operationId": "session.share",
  6539. "parameters": [
  6540. {
  6541. "name": "sessionID",
  6542. "in": "path",
  6543. "schema": {
  6544. "type": "string",
  6545. "pattern": "^ses"
  6546. },
  6547. "required": true
  6548. },
  6549. {
  6550. "name": "directory",
  6551. "in": "query",
  6552. "schema": {
  6553. "type": "string"
  6554. },
  6555. "required": false
  6556. },
  6557. {
  6558. "name": "workspace",
  6559. "in": "query",
  6560. "schema": {
  6561. "type": "string"
  6562. },
  6563. "required": false
  6564. }
  6565. ],
  6566. "responses": {
  6567. "200": {
  6568. "description": "Successfully shared session",
  6569. "content": {
  6570. "application/json": {
  6571. "schema": {
  6572. "$ref": "#/components/schemas/Session"
  6573. }
  6574. }
  6575. }
  6576. },
  6577. "400": {
  6578. "description": "Bad request",
  6579. "content": {
  6580. "application/json": {
  6581. "schema": {
  6582. "$ref": "#/components/schemas/BadRequestError"
  6583. }
  6584. }
  6585. }
  6586. },
  6587. "404": {
  6588. "description": "NotFoundError",
  6589. "content": {
  6590. "application/json": {
  6591. "schema": {
  6592. "$ref": "#/components/schemas/NotFoundError"
  6593. }
  6594. }
  6595. }
  6596. },
  6597. "500": {
  6598. "description": "InternalServerError",
  6599. "content": {
  6600. "application/json": {
  6601. "schema": {
  6602. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6603. }
  6604. }
  6605. }
  6606. }
  6607. },
  6608. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6609. "summary": "Share session",
  6610. "x-codeSamples": [
  6611. {
  6612. "lang": "js",
  6613. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6614. }
  6615. ]
  6616. },
  6617. "delete": {
  6618. "tags": ["session"],
  6619. "operationId": "session.unshare",
  6620. "parameters": [
  6621. {
  6622. "name": "sessionID",
  6623. "in": "path",
  6624. "schema": {
  6625. "type": "string",
  6626. "pattern": "^ses"
  6627. },
  6628. "required": true
  6629. },
  6630. {
  6631. "name": "directory",
  6632. "in": "query",
  6633. "schema": {
  6634. "type": "string"
  6635. },
  6636. "required": false
  6637. },
  6638. {
  6639. "name": "workspace",
  6640. "in": "query",
  6641. "schema": {
  6642. "type": "string"
  6643. },
  6644. "required": false
  6645. }
  6646. ],
  6647. "responses": {
  6648. "200": {
  6649. "description": "Successfully unshared session",
  6650. "content": {
  6651. "application/json": {
  6652. "schema": {
  6653. "$ref": "#/components/schemas/Session"
  6654. }
  6655. }
  6656. }
  6657. },
  6658. "400": {
  6659. "description": "Bad request",
  6660. "content": {
  6661. "application/json": {
  6662. "schema": {
  6663. "$ref": "#/components/schemas/BadRequestError"
  6664. }
  6665. }
  6666. }
  6667. },
  6668. "404": {
  6669. "description": "NotFoundError",
  6670. "content": {
  6671. "application/json": {
  6672. "schema": {
  6673. "$ref": "#/components/schemas/NotFoundError"
  6674. }
  6675. }
  6676. }
  6677. },
  6678. "500": {
  6679. "description": "InternalServerError",
  6680. "content": {
  6681. "application/json": {
  6682. "schema": {
  6683. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6684. }
  6685. }
  6686. }
  6687. }
  6688. },
  6689. "description": "Remove the shareable link for a session, making it private again.",
  6690. "summary": "Unshare session",
  6691. "x-codeSamples": [
  6692. {
  6693. "lang": "js",
  6694. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6695. }
  6696. ]
  6697. }
  6698. },
  6699. "/session/{sessionID}/summarize": {
  6700. "post": {
  6701. "tags": ["session"],
  6702. "operationId": "session.summarize",
  6703. "parameters": [
  6704. {
  6705. "name": "sessionID",
  6706. "in": "path",
  6707. "schema": {
  6708. "type": "string",
  6709. "pattern": "^ses"
  6710. },
  6711. "required": true
  6712. },
  6713. {
  6714. "name": "directory",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. },
  6721. {
  6722. "name": "workspace",
  6723. "in": "query",
  6724. "schema": {
  6725. "type": "string"
  6726. },
  6727. "required": false
  6728. }
  6729. ],
  6730. "responses": {
  6731. "200": {
  6732. "description": "Summarized session",
  6733. "content": {
  6734. "application/json": {
  6735. "schema": {
  6736. "type": "boolean",
  6737. "description": "Summarized session"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "400": {
  6743. "description": "BadRequest | InvalidRequestError",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "anyOf": [
  6748. {
  6749. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6750. },
  6751. {
  6752. "$ref": "#/components/schemas/InvalidRequestError"
  6753. }
  6754. ]
  6755. }
  6756. }
  6757. }
  6758. },
  6759. "404": {
  6760. "description": "NotFoundError",
  6761. "content": {
  6762. "application/json": {
  6763. "schema": {
  6764. "$ref": "#/components/schemas/NotFoundError"
  6765. }
  6766. }
  6767. }
  6768. }
  6769. },
  6770. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6771. "summary": "Summarize session",
  6772. "requestBody": {
  6773. "content": {
  6774. "application/json": {
  6775. "schema": {
  6776. "type": "object",
  6777. "properties": {
  6778. "providerID": {
  6779. "type": "string"
  6780. },
  6781. "modelID": {
  6782. "type": "string"
  6783. },
  6784. "auto": {
  6785. "type": "boolean"
  6786. }
  6787. },
  6788. "required": ["providerID", "modelID"],
  6789. "additionalProperties": false
  6790. }
  6791. }
  6792. }
  6793. },
  6794. "x-codeSamples": [
  6795. {
  6796. "lang": "js",
  6797. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6798. }
  6799. ]
  6800. }
  6801. },
  6802. "/session/{sessionID}/prompt_async": {
  6803. "post": {
  6804. "tags": ["session"],
  6805. "operationId": "session.prompt_async",
  6806. "parameters": [
  6807. {
  6808. "name": "sessionID",
  6809. "in": "path",
  6810. "schema": {
  6811. "type": "string",
  6812. "pattern": "^ses"
  6813. },
  6814. "required": true
  6815. },
  6816. {
  6817. "name": "directory",
  6818. "in": "query",
  6819. "schema": {
  6820. "type": "string"
  6821. },
  6822. "required": false
  6823. },
  6824. {
  6825. "name": "workspace",
  6826. "in": "query",
  6827. "schema": {
  6828. "type": "string"
  6829. },
  6830. "required": false
  6831. }
  6832. ],
  6833. "responses": {
  6834. "204": {
  6835. "description": "Prompt accepted"
  6836. },
  6837. "400": {
  6838. "description": "BadRequest | InvalidRequestError",
  6839. "content": {
  6840. "application/json": {
  6841. "schema": {
  6842. "anyOf": [
  6843. {
  6844. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6845. },
  6846. {
  6847. "$ref": "#/components/schemas/InvalidRequestError"
  6848. }
  6849. ]
  6850. }
  6851. }
  6852. }
  6853. },
  6854. "404": {
  6855. "description": "NotFoundError",
  6856. "content": {
  6857. "application/json": {
  6858. "schema": {
  6859. "$ref": "#/components/schemas/NotFoundError"
  6860. }
  6861. }
  6862. }
  6863. }
  6864. },
  6865. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6866. "summary": "Send async message",
  6867. "requestBody": {
  6868. "content": {
  6869. "application/json": {
  6870. "schema": {
  6871. "type": "object",
  6872. "properties": {
  6873. "messageID": {
  6874. "type": "string",
  6875. "pattern": "^msg"
  6876. },
  6877. "model": {
  6878. "type": "object",
  6879. "properties": {
  6880. "providerID": {
  6881. "type": "string"
  6882. },
  6883. "modelID": {
  6884. "type": "string"
  6885. }
  6886. },
  6887. "required": ["providerID", "modelID"],
  6888. "additionalProperties": false
  6889. },
  6890. "agent": {
  6891. "type": "string"
  6892. },
  6893. "noReply": {
  6894. "type": "boolean"
  6895. },
  6896. "tools": {
  6897. "type": "object",
  6898. "additionalProperties": {
  6899. "type": "boolean"
  6900. }
  6901. },
  6902. "format": {
  6903. "$ref": "#/components/schemas/OutputFormat"
  6904. },
  6905. "system": {
  6906. "type": "string"
  6907. },
  6908. "variant": {
  6909. "type": "string"
  6910. },
  6911. "parts": {
  6912. "type": "array",
  6913. "items": {
  6914. "anyOf": [
  6915. {
  6916. "$ref": "#/components/schemas/TextPartInput"
  6917. },
  6918. {
  6919. "$ref": "#/components/schemas/FilePartInput"
  6920. },
  6921. {
  6922. "$ref": "#/components/schemas/AgentPartInput"
  6923. },
  6924. {
  6925. "$ref": "#/components/schemas/SubtaskPartInput"
  6926. }
  6927. ]
  6928. }
  6929. }
  6930. },
  6931. "required": ["parts"],
  6932. "additionalProperties": false
  6933. }
  6934. }
  6935. }
  6936. },
  6937. "x-codeSamples": [
  6938. {
  6939. "lang": "js",
  6940. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6941. }
  6942. ]
  6943. }
  6944. },
  6945. "/session/{sessionID}/command": {
  6946. "post": {
  6947. "tags": ["session"],
  6948. "operationId": "session.command",
  6949. "parameters": [
  6950. {
  6951. "name": "sessionID",
  6952. "in": "path",
  6953. "schema": {
  6954. "type": "string",
  6955. "pattern": "^ses"
  6956. },
  6957. "required": true
  6958. },
  6959. {
  6960. "name": "directory",
  6961. "in": "query",
  6962. "schema": {
  6963. "type": "string"
  6964. },
  6965. "required": false
  6966. },
  6967. {
  6968. "name": "workspace",
  6969. "in": "query",
  6970. "schema": {
  6971. "type": "string"
  6972. },
  6973. "required": false
  6974. }
  6975. ],
  6976. "responses": {
  6977. "200": {
  6978. "description": "Created message",
  6979. "content": {
  6980. "application/json": {
  6981. "schema": {
  6982. "type": "object",
  6983. "required": ["info", "parts"],
  6984. "properties": {
  6985. "info": {
  6986. "$ref": "#/components/schemas/AssistantMessage"
  6987. },
  6988. "parts": {
  6989. "type": "array",
  6990. "items": {
  6991. "$ref": "#/components/schemas/Part"
  6992. }
  6993. }
  6994. }
  6995. }
  6996. }
  6997. }
  6998. },
  6999. "400": {
  7000. "description": "BadRequest | InvalidRequestError",
  7001. "content": {
  7002. "application/json": {
  7003. "schema": {
  7004. "anyOf": [
  7005. {
  7006. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7007. },
  7008. {
  7009. "$ref": "#/components/schemas/InvalidRequestError"
  7010. }
  7011. ]
  7012. }
  7013. }
  7014. }
  7015. },
  7016. "404": {
  7017. "description": "NotFoundError",
  7018. "content": {
  7019. "application/json": {
  7020. "schema": {
  7021. "$ref": "#/components/schemas/NotFoundError"
  7022. }
  7023. }
  7024. }
  7025. }
  7026. },
  7027. "description": "Send a new command to a session for execution by the AI assistant.",
  7028. "summary": "Send command",
  7029. "requestBody": {
  7030. "content": {
  7031. "application/json": {
  7032. "schema": {
  7033. "type": "object",
  7034. "properties": {
  7035. "messageID": {
  7036. "type": "string",
  7037. "pattern": "^msg"
  7038. },
  7039. "agent": {
  7040. "type": "string"
  7041. },
  7042. "model": {
  7043. "type": "string"
  7044. },
  7045. "arguments": {
  7046. "type": "string"
  7047. },
  7048. "command": {
  7049. "type": "string"
  7050. },
  7051. "variant": {
  7052. "type": "string"
  7053. },
  7054. "parts": {
  7055. "type": "array",
  7056. "items": {
  7057. "type": "object",
  7058. "properties": {
  7059. "id": {
  7060. "type": "string",
  7061. "pattern": "^prt"
  7062. },
  7063. "type": {
  7064. "type": "string",
  7065. "enum": ["file"]
  7066. },
  7067. "mime": {
  7068. "type": "string"
  7069. },
  7070. "filename": {
  7071. "type": "string"
  7072. },
  7073. "url": {
  7074. "type": "string"
  7075. },
  7076. "source": {
  7077. "$ref": "#/components/schemas/FilePartSource"
  7078. }
  7079. },
  7080. "required": ["type", "mime", "url"],
  7081. "additionalProperties": false
  7082. }
  7083. }
  7084. },
  7085. "required": ["arguments", "command"],
  7086. "additionalProperties": false
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "x-codeSamples": [
  7092. {
  7093. "lang": "js",
  7094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7095. }
  7096. ]
  7097. }
  7098. },
  7099. "/session/{sessionID}/shell": {
  7100. "post": {
  7101. "tags": ["session"],
  7102. "operationId": "session.shell",
  7103. "parameters": [
  7104. {
  7105. "name": "sessionID",
  7106. "in": "path",
  7107. "schema": {
  7108. "type": "string",
  7109. "pattern": "^ses"
  7110. },
  7111. "required": true
  7112. },
  7113. {
  7114. "name": "directory",
  7115. "in": "query",
  7116. "schema": {
  7117. "type": "string"
  7118. },
  7119. "required": false
  7120. },
  7121. {
  7122. "name": "workspace",
  7123. "in": "query",
  7124. "schema": {
  7125. "type": "string"
  7126. },
  7127. "required": false
  7128. }
  7129. ],
  7130. "responses": {
  7131. "200": {
  7132. "description": "Created message",
  7133. "content": {
  7134. "application/json": {
  7135. "schema": {
  7136. "type": "object",
  7137. "properties": {
  7138. "info": {
  7139. "$ref": "#/components/schemas/Message"
  7140. },
  7141. "parts": {
  7142. "type": "array",
  7143. "items": {
  7144. "$ref": "#/components/schemas/Part"
  7145. }
  7146. }
  7147. },
  7148. "required": ["info", "parts"],
  7149. "additionalProperties": false,
  7150. "description": "Created message"
  7151. }
  7152. }
  7153. }
  7154. },
  7155. "400": {
  7156. "description": "BadRequest | InvalidRequestError",
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "anyOf": [
  7161. {
  7162. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7163. },
  7164. {
  7165. "$ref": "#/components/schemas/InvalidRequestError"
  7166. }
  7167. ]
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "404": {
  7173. "description": "NotFoundError",
  7174. "content": {
  7175. "application/json": {
  7176. "schema": {
  7177. "$ref": "#/components/schemas/NotFoundError"
  7178. }
  7179. }
  7180. }
  7181. },
  7182. "409": {
  7183. "description": "SessionBusyError",
  7184. "content": {
  7185. "application/json": {
  7186. "schema": {
  7187. "$ref": "#/components/schemas/SessionBusyError"
  7188. }
  7189. }
  7190. }
  7191. }
  7192. },
  7193. "description": "Execute a shell command within the session context and return the AI's response.",
  7194. "summary": "Run shell command",
  7195. "requestBody": {
  7196. "content": {
  7197. "application/json": {
  7198. "schema": {
  7199. "type": "object",
  7200. "properties": {
  7201. "messageID": {
  7202. "type": "string",
  7203. "pattern": "^msg"
  7204. },
  7205. "agent": {
  7206. "type": "string"
  7207. },
  7208. "model": {
  7209. "type": "object",
  7210. "properties": {
  7211. "providerID": {
  7212. "type": "string"
  7213. },
  7214. "modelID": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "required": ["providerID", "modelID"],
  7219. "additionalProperties": false
  7220. },
  7221. "command": {
  7222. "type": "string"
  7223. }
  7224. },
  7225. "required": ["agent", "command"],
  7226. "additionalProperties": false
  7227. }
  7228. }
  7229. }
  7230. },
  7231. "x-codeSamples": [
  7232. {
  7233. "lang": "js",
  7234. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7235. }
  7236. ]
  7237. }
  7238. },
  7239. "/session/{sessionID}/revert": {
  7240. "post": {
  7241. "tags": ["session"],
  7242. "operationId": "session.revert",
  7243. "parameters": [
  7244. {
  7245. "name": "sessionID",
  7246. "in": "path",
  7247. "schema": {
  7248. "type": "string",
  7249. "pattern": "^ses"
  7250. },
  7251. "required": true
  7252. },
  7253. {
  7254. "name": "directory",
  7255. "in": "query",
  7256. "schema": {
  7257. "type": "string"
  7258. },
  7259. "required": false
  7260. },
  7261. {
  7262. "name": "workspace",
  7263. "in": "query",
  7264. "schema": {
  7265. "type": "string"
  7266. },
  7267. "required": false
  7268. }
  7269. ],
  7270. "responses": {
  7271. "200": {
  7272. "description": "Updated session",
  7273. "content": {
  7274. "application/json": {
  7275. "schema": {
  7276. "$ref": "#/components/schemas/Session"
  7277. }
  7278. }
  7279. }
  7280. },
  7281. "400": {
  7282. "description": "BadRequest | InvalidRequestError",
  7283. "content": {
  7284. "application/json": {
  7285. "schema": {
  7286. "anyOf": [
  7287. {
  7288. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7289. },
  7290. {
  7291. "$ref": "#/components/schemas/InvalidRequestError"
  7292. }
  7293. ]
  7294. }
  7295. }
  7296. }
  7297. },
  7298. "404": {
  7299. "description": "NotFoundError",
  7300. "content": {
  7301. "application/json": {
  7302. "schema": {
  7303. "$ref": "#/components/schemas/NotFoundError"
  7304. }
  7305. }
  7306. }
  7307. },
  7308. "409": {
  7309. "description": "SessionBusyError",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "$ref": "#/components/schemas/SessionBusyError"
  7314. }
  7315. }
  7316. }
  7317. }
  7318. },
  7319. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7320. "summary": "Revert message",
  7321. "requestBody": {
  7322. "content": {
  7323. "application/json": {
  7324. "schema": {
  7325. "type": "object",
  7326. "properties": {
  7327. "messageID": {
  7328. "type": "string",
  7329. "pattern": "^msg"
  7330. },
  7331. "partID": {
  7332. "type": "string",
  7333. "pattern": "^prt"
  7334. }
  7335. },
  7336. "required": ["messageID"],
  7337. "additionalProperties": false
  7338. }
  7339. }
  7340. }
  7341. },
  7342. "x-codeSamples": [
  7343. {
  7344. "lang": "js",
  7345. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7346. }
  7347. ]
  7348. }
  7349. },
  7350. "/session/{sessionID}/unrevert": {
  7351. "post": {
  7352. "tags": ["session"],
  7353. "operationId": "session.unrevert",
  7354. "parameters": [
  7355. {
  7356. "name": "sessionID",
  7357. "in": "path",
  7358. "schema": {
  7359. "type": "string",
  7360. "pattern": "^ses"
  7361. },
  7362. "required": true
  7363. },
  7364. {
  7365. "name": "directory",
  7366. "in": "query",
  7367. "schema": {
  7368. "type": "string"
  7369. },
  7370. "required": false
  7371. },
  7372. {
  7373. "name": "workspace",
  7374. "in": "query",
  7375. "schema": {
  7376. "type": "string"
  7377. },
  7378. "required": false
  7379. }
  7380. ],
  7381. "responses": {
  7382. "200": {
  7383. "description": "Updated session",
  7384. "content": {
  7385. "application/json": {
  7386. "schema": {
  7387. "$ref": "#/components/schemas/Session"
  7388. }
  7389. }
  7390. }
  7391. },
  7392. "400": {
  7393. "description": "BadRequest | InvalidRequestError",
  7394. "content": {
  7395. "application/json": {
  7396. "schema": {
  7397. "anyOf": [
  7398. {
  7399. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7400. },
  7401. {
  7402. "$ref": "#/components/schemas/InvalidRequestError"
  7403. }
  7404. ]
  7405. }
  7406. }
  7407. }
  7408. },
  7409. "404": {
  7410. "description": "NotFoundError",
  7411. "content": {
  7412. "application/json": {
  7413. "schema": {
  7414. "$ref": "#/components/schemas/NotFoundError"
  7415. }
  7416. }
  7417. }
  7418. },
  7419. "409": {
  7420. "description": "SessionBusyError",
  7421. "content": {
  7422. "application/json": {
  7423. "schema": {
  7424. "$ref": "#/components/schemas/SessionBusyError"
  7425. }
  7426. }
  7427. }
  7428. }
  7429. },
  7430. "description": "Restore all previously reverted messages in a session.",
  7431. "summary": "Restore reverted messages",
  7432. "x-codeSamples": [
  7433. {
  7434. "lang": "js",
  7435. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7436. }
  7437. ]
  7438. }
  7439. },
  7440. "/session/{sessionID}/permissions/{permissionID}": {
  7441. "post": {
  7442. "tags": ["session"],
  7443. "operationId": "permission.respond",
  7444. "parameters": [
  7445. {
  7446. "name": "sessionID",
  7447. "in": "path",
  7448. "schema": {
  7449. "type": "string",
  7450. "pattern": "^ses"
  7451. },
  7452. "required": true
  7453. },
  7454. {
  7455. "name": "permissionID",
  7456. "in": "path",
  7457. "schema": {
  7458. "type": "string",
  7459. "pattern": "^per"
  7460. },
  7461. "required": true
  7462. },
  7463. {
  7464. "name": "directory",
  7465. "in": "query",
  7466. "schema": {
  7467. "type": "string"
  7468. },
  7469. "required": false
  7470. },
  7471. {
  7472. "name": "workspace",
  7473. "in": "query",
  7474. "schema": {
  7475. "type": "string"
  7476. },
  7477. "required": false
  7478. }
  7479. ],
  7480. "responses": {
  7481. "200": {
  7482. "description": "Permission processed successfully",
  7483. "content": {
  7484. "application/json": {
  7485. "schema": {
  7486. "type": "boolean",
  7487. "description": "Permission processed successfully"
  7488. }
  7489. }
  7490. }
  7491. },
  7492. "400": {
  7493. "description": "BadRequest | InvalidRequestError",
  7494. "content": {
  7495. "application/json": {
  7496. "schema": {
  7497. "anyOf": [
  7498. {
  7499. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7500. },
  7501. {
  7502. "$ref": "#/components/schemas/InvalidRequestError"
  7503. }
  7504. ]
  7505. }
  7506. }
  7507. }
  7508. },
  7509. "404": {
  7510. "description": "NotFoundError | PermissionNotFoundError",
  7511. "content": {
  7512. "application/json": {
  7513. "schema": {
  7514. "anyOf": [
  7515. {
  7516. "$ref": "#/components/schemas/NotFoundError"
  7517. },
  7518. {
  7519. "$ref": "#/components/schemas/PermissionNotFoundError"
  7520. }
  7521. ]
  7522. }
  7523. }
  7524. }
  7525. }
  7526. },
  7527. "description": "Approve or deny a permission request from the AI assistant.",
  7528. "summary": "Respond to permission",
  7529. "deprecated": true,
  7530. "requestBody": {
  7531. "content": {
  7532. "application/json": {
  7533. "schema": {
  7534. "type": "object",
  7535. "properties": {
  7536. "response": {
  7537. "type": "string",
  7538. "enum": ["once", "always", "reject"]
  7539. }
  7540. },
  7541. "required": ["response"],
  7542. "additionalProperties": false
  7543. }
  7544. }
  7545. }
  7546. },
  7547. "x-codeSamples": [
  7548. {
  7549. "lang": "js",
  7550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7551. }
  7552. ]
  7553. }
  7554. },
  7555. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7556. "delete": {
  7557. "tags": ["session"],
  7558. "operationId": "part.delete",
  7559. "parameters": [
  7560. {
  7561. "name": "sessionID",
  7562. "in": "path",
  7563. "schema": {
  7564. "type": "string",
  7565. "pattern": "^ses"
  7566. },
  7567. "required": true
  7568. },
  7569. {
  7570. "name": "messageID",
  7571. "in": "path",
  7572. "schema": {
  7573. "type": "string",
  7574. "pattern": "^msg"
  7575. },
  7576. "required": true
  7577. },
  7578. {
  7579. "name": "partID",
  7580. "in": "path",
  7581. "schema": {
  7582. "type": "string",
  7583. "pattern": "^prt"
  7584. },
  7585. "required": true
  7586. },
  7587. {
  7588. "name": "directory",
  7589. "in": "query",
  7590. "schema": {
  7591. "type": "string"
  7592. },
  7593. "required": false
  7594. },
  7595. {
  7596. "name": "workspace",
  7597. "in": "query",
  7598. "schema": {
  7599. "type": "string"
  7600. },
  7601. "required": false
  7602. }
  7603. ],
  7604. "responses": {
  7605. "200": {
  7606. "description": "Successfully deleted part",
  7607. "content": {
  7608. "application/json": {
  7609. "schema": {
  7610. "type": "boolean",
  7611. "description": "Successfully deleted part"
  7612. }
  7613. }
  7614. }
  7615. },
  7616. "400": {
  7617. "description": "BadRequest | InvalidRequestError",
  7618. "content": {
  7619. "application/json": {
  7620. "schema": {
  7621. "anyOf": [
  7622. {
  7623. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7624. },
  7625. {
  7626. "$ref": "#/components/schemas/InvalidRequestError"
  7627. }
  7628. ]
  7629. }
  7630. }
  7631. }
  7632. },
  7633. "404": {
  7634. "description": "NotFoundError",
  7635. "content": {
  7636. "application/json": {
  7637. "schema": {
  7638. "$ref": "#/components/schemas/NotFoundError"
  7639. }
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "description": "Delete a part from a message.",
  7645. "x-codeSamples": [
  7646. {
  7647. "lang": "js",
  7648. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7649. }
  7650. ]
  7651. },
  7652. "patch": {
  7653. "tags": ["session"],
  7654. "operationId": "part.update",
  7655. "parameters": [
  7656. {
  7657. "name": "sessionID",
  7658. "in": "path",
  7659. "schema": {
  7660. "type": "string",
  7661. "pattern": "^ses"
  7662. },
  7663. "required": true
  7664. },
  7665. {
  7666. "name": "messageID",
  7667. "in": "path",
  7668. "schema": {
  7669. "type": "string",
  7670. "pattern": "^msg"
  7671. },
  7672. "required": true
  7673. },
  7674. {
  7675. "name": "partID",
  7676. "in": "path",
  7677. "schema": {
  7678. "type": "string",
  7679. "pattern": "^prt"
  7680. },
  7681. "required": true
  7682. },
  7683. {
  7684. "name": "directory",
  7685. "in": "query",
  7686. "schema": {
  7687. "type": "string"
  7688. },
  7689. "required": false
  7690. },
  7691. {
  7692. "name": "workspace",
  7693. "in": "query",
  7694. "schema": {
  7695. "type": "string"
  7696. },
  7697. "required": false
  7698. }
  7699. ],
  7700. "responses": {
  7701. "200": {
  7702. "description": "Successfully updated part",
  7703. "content": {
  7704. "application/json": {
  7705. "schema": {
  7706. "$ref": "#/components/schemas/Part"
  7707. }
  7708. }
  7709. }
  7710. },
  7711. "400": {
  7712. "description": "BadRequest | InvalidRequestError",
  7713. "content": {
  7714. "application/json": {
  7715. "schema": {
  7716. "anyOf": [
  7717. {
  7718. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7719. },
  7720. {
  7721. "$ref": "#/components/schemas/InvalidRequestError"
  7722. }
  7723. ]
  7724. }
  7725. }
  7726. }
  7727. },
  7728. "404": {
  7729. "description": "NotFoundError",
  7730. "content": {
  7731. "application/json": {
  7732. "schema": {
  7733. "$ref": "#/components/schemas/NotFoundError"
  7734. }
  7735. }
  7736. }
  7737. }
  7738. },
  7739. "description": "Update a part in a message.",
  7740. "requestBody": {
  7741. "content": {
  7742. "application/json": {
  7743. "schema": {
  7744. "$ref": "#/components/schemas/Part"
  7745. }
  7746. }
  7747. }
  7748. },
  7749. "x-codeSamples": [
  7750. {
  7751. "lang": "js",
  7752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7753. }
  7754. ]
  7755. }
  7756. },
  7757. "/sync/start": {
  7758. "post": {
  7759. "tags": ["sync"],
  7760. "operationId": "sync.start",
  7761. "parameters": [
  7762. {
  7763. "name": "directory",
  7764. "in": "query",
  7765. "schema": {
  7766. "type": "string"
  7767. },
  7768. "required": false
  7769. },
  7770. {
  7771. "name": "workspace",
  7772. "in": "query",
  7773. "schema": {
  7774. "type": "string"
  7775. },
  7776. "required": false
  7777. }
  7778. ],
  7779. "responses": {
  7780. "200": {
  7781. "description": "Workspace sync started",
  7782. "content": {
  7783. "application/json": {
  7784. "schema": {
  7785. "type": "boolean",
  7786. "description": "Workspace sync started"
  7787. }
  7788. }
  7789. }
  7790. },
  7791. "400": {
  7792. "description": "Bad request",
  7793. "content": {
  7794. "application/json": {
  7795. "schema": {
  7796. "$ref": "#/components/schemas/BadRequestError"
  7797. }
  7798. }
  7799. }
  7800. }
  7801. },
  7802. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7803. "summary": "Start workspace sync",
  7804. "x-codeSamples": [
  7805. {
  7806. "lang": "js",
  7807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7808. }
  7809. ]
  7810. }
  7811. },
  7812. "/sync/replay": {
  7813. "post": {
  7814. "tags": ["sync"],
  7815. "operationId": "sync.replay",
  7816. "parameters": [
  7817. {
  7818. "name": "directory",
  7819. "in": "query",
  7820. "schema": {
  7821. "type": "string"
  7822. },
  7823. "required": false
  7824. },
  7825. {
  7826. "name": "workspace",
  7827. "in": "query",
  7828. "schema": {
  7829. "type": "string"
  7830. },
  7831. "required": false
  7832. }
  7833. ],
  7834. "responses": {
  7835. "200": {
  7836. "description": "Replayed sync events",
  7837. "content": {
  7838. "application/json": {
  7839. "schema": {
  7840. "type": "object",
  7841. "properties": {
  7842. "sessionID": {
  7843. "type": "string"
  7844. }
  7845. },
  7846. "required": ["sessionID"],
  7847. "additionalProperties": false,
  7848. "description": "Replayed sync events"
  7849. }
  7850. }
  7851. }
  7852. },
  7853. "400": {
  7854. "description": "BadRequest | InvalidRequestError",
  7855. "content": {
  7856. "application/json": {
  7857. "schema": {
  7858. "anyOf": [
  7859. {
  7860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7861. },
  7862. {
  7863. "$ref": "#/components/schemas/InvalidRequestError"
  7864. }
  7865. ]
  7866. }
  7867. }
  7868. }
  7869. }
  7870. },
  7871. "description": "Validate and replay a complete sync event history.",
  7872. "summary": "Replay sync events",
  7873. "requestBody": {
  7874. "content": {
  7875. "application/json": {
  7876. "schema": {
  7877. "type": "object",
  7878. "properties": {
  7879. "directory": {
  7880. "type": "string"
  7881. },
  7882. "events": {
  7883. "type": "array",
  7884. "minItems": 1,
  7885. "items": {
  7886. "type": "object",
  7887. "properties": {
  7888. "id": {
  7889. "type": "string"
  7890. },
  7891. "aggregateID": {
  7892. "type": "string"
  7893. },
  7894. "seq": {
  7895. "type": "integer",
  7896. "minimum": 0
  7897. },
  7898. "type": {
  7899. "type": "string"
  7900. },
  7901. "data": {
  7902. "type": "object"
  7903. }
  7904. },
  7905. "required": ["id", "aggregateID", "seq", "type", "data"],
  7906. "additionalProperties": false
  7907. }
  7908. }
  7909. },
  7910. "required": ["directory", "events"],
  7911. "additionalProperties": false
  7912. }
  7913. }
  7914. }
  7915. },
  7916. "x-codeSamples": [
  7917. {
  7918. "lang": "js",
  7919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7920. }
  7921. ]
  7922. }
  7923. },
  7924. "/sync/steal": {
  7925. "post": {
  7926. "tags": ["sync"],
  7927. "operationId": "sync.steal",
  7928. "parameters": [
  7929. {
  7930. "name": "directory",
  7931. "in": "query",
  7932. "schema": {
  7933. "type": "string"
  7934. },
  7935. "required": false
  7936. },
  7937. {
  7938. "name": "workspace",
  7939. "in": "query",
  7940. "schema": {
  7941. "type": "string"
  7942. },
  7943. "required": false
  7944. }
  7945. ],
  7946. "responses": {
  7947. "200": {
  7948. "description": "Session stolen into workspace",
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "type": "object",
  7953. "properties": {
  7954. "sessionID": {
  7955. "type": "string",
  7956. "pattern": "^ses"
  7957. }
  7958. },
  7959. "required": ["sessionID"],
  7960. "additionalProperties": false,
  7961. "description": "Session stolen into workspace"
  7962. }
  7963. }
  7964. }
  7965. },
  7966. "400": {
  7967. "description": "BadRequest | InvalidRequestError",
  7968. "content": {
  7969. "application/json": {
  7970. "schema": {
  7971. "anyOf": [
  7972. {
  7973. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7974. },
  7975. {
  7976. "$ref": "#/components/schemas/InvalidRequestError"
  7977. }
  7978. ]
  7979. }
  7980. }
  7981. }
  7982. }
  7983. },
  7984. "description": "Update a session to belong to the current workspace through the sync event system.",
  7985. "summary": "Steal session into workspace",
  7986. "requestBody": {
  7987. "content": {
  7988. "application/json": {
  7989. "schema": {
  7990. "type": "object",
  7991. "properties": {
  7992. "sessionID": {
  7993. "type": "string",
  7994. "pattern": "^ses"
  7995. }
  7996. },
  7997. "required": ["sessionID"],
  7998. "additionalProperties": false
  7999. }
  8000. }
  8001. }
  8002. },
  8003. "x-codeSamples": [
  8004. {
  8005. "lang": "js",
  8006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8007. }
  8008. ]
  8009. }
  8010. },
  8011. "/sync/history": {
  8012. "post": {
  8013. "tags": ["sync"],
  8014. "operationId": "sync.history.list",
  8015. "parameters": [
  8016. {
  8017. "name": "directory",
  8018. "in": "query",
  8019. "schema": {
  8020. "type": "string"
  8021. },
  8022. "required": false
  8023. },
  8024. {
  8025. "name": "workspace",
  8026. "in": "query",
  8027. "schema": {
  8028. "type": "string"
  8029. },
  8030. "required": false
  8031. }
  8032. ],
  8033. "responses": {
  8034. "200": {
  8035. "description": "Sync events",
  8036. "content": {
  8037. "application/json": {
  8038. "schema": {
  8039. "type": "array",
  8040. "items": {
  8041. "type": "object",
  8042. "properties": {
  8043. "id": {
  8044. "type": "string"
  8045. },
  8046. "aggregate_id": {
  8047. "type": "string"
  8048. },
  8049. "seq": {
  8050. "type": "integer",
  8051. "minimum": 0
  8052. },
  8053. "type": {
  8054. "type": "string"
  8055. },
  8056. "data": {
  8057. "type": "object"
  8058. }
  8059. },
  8060. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8061. "additionalProperties": false
  8062. },
  8063. "description": "Sync events"
  8064. }
  8065. }
  8066. }
  8067. },
  8068. "400": {
  8069. "description": "BadRequest | InvalidRequestError",
  8070. "content": {
  8071. "application/json": {
  8072. "schema": {
  8073. "anyOf": [
  8074. {
  8075. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8076. },
  8077. {
  8078. "$ref": "#/components/schemas/InvalidRequestError"
  8079. }
  8080. ]
  8081. }
  8082. }
  8083. }
  8084. }
  8085. },
  8086. "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.",
  8087. "summary": "List sync events",
  8088. "requestBody": {
  8089. "content": {
  8090. "application/json": {
  8091. "schema": {
  8092. "type": "object",
  8093. "additionalProperties": {
  8094. "type": "integer",
  8095. "minimum": 0
  8096. }
  8097. }
  8098. }
  8099. }
  8100. },
  8101. "x-codeSamples": [
  8102. {
  8103. "lang": "js",
  8104. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8105. }
  8106. ]
  8107. }
  8108. },
  8109. "/api/session": {
  8110. "get": {
  8111. "tags": ["v2"],
  8112. "operationId": "v2.session.list",
  8113. "parameters": [
  8114. {
  8115. "name": "workspace",
  8116. "in": "query",
  8117. "schema": {
  8118. "type": "string",
  8119. "pattern": "^wrk"
  8120. },
  8121. "required": false
  8122. },
  8123. {
  8124. "name": "limit",
  8125. "in": "query",
  8126. "schema": {
  8127. "type": "number"
  8128. },
  8129. "required": false
  8130. },
  8131. {
  8132. "name": "order",
  8133. "in": "query",
  8134. "schema": {
  8135. "type": "string",
  8136. "enum": ["asc", "desc"]
  8137. },
  8138. "required": false
  8139. },
  8140. {
  8141. "name": "search",
  8142. "in": "query",
  8143. "schema": {
  8144. "type": "string"
  8145. },
  8146. "required": false
  8147. },
  8148. {
  8149. "name": "directory",
  8150. "in": "query",
  8151. "schema": {
  8152. "type": "string"
  8153. },
  8154. "required": false
  8155. },
  8156. {
  8157. "name": "project",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "string"
  8161. },
  8162. "required": false
  8163. },
  8164. {
  8165. "name": "subpath",
  8166. "in": "query",
  8167. "schema": {
  8168. "type": "string"
  8169. },
  8170. "required": false
  8171. },
  8172. {
  8173. "name": "cursor",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string",
  8177. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  8178. },
  8179. "required": false
  8180. }
  8181. ],
  8182. "security": [],
  8183. "responses": {
  8184. "200": {
  8185. "description": "V2SessionsResponse",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "$ref": "#/components/schemas/V2SessionsResponse"
  8190. }
  8191. }
  8192. }
  8193. },
  8194. "400": {
  8195. "description": "InvalidCursorError | InvalidRequestError",
  8196. "content": {
  8197. "application/json": {
  8198. "schema": {
  8199. "anyOf": [
  8200. {
  8201. "$ref": "#/components/schemas/InvalidCursorError"
  8202. },
  8203. {
  8204. "$ref": "#/components/schemas/InvalidRequestError"
  8205. },
  8206. {
  8207. "$ref": "#/components/schemas/InvalidRequestError"
  8208. }
  8209. ]
  8210. }
  8211. }
  8212. }
  8213. },
  8214. "401": {
  8215. "description": "UnauthorizedError",
  8216. "content": {
  8217. "application/json": {
  8218. "schema": {
  8219. "$ref": "#/components/schemas/UnauthorizedError"
  8220. }
  8221. }
  8222. }
  8223. }
  8224. },
  8225. "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.",
  8226. "summary": "List v2 sessions",
  8227. "x-codeSamples": [
  8228. {
  8229. "lang": "js",
  8230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8231. }
  8232. ]
  8233. }
  8234. },
  8235. "/api/session/{sessionID}/prompt": {
  8236. "post": {
  8237. "tags": ["v2"],
  8238. "operationId": "v2.session.prompt",
  8239. "parameters": [
  8240. {
  8241. "name": "sessionID",
  8242. "in": "path",
  8243. "schema": {
  8244. "type": "string",
  8245. "pattern": "^ses"
  8246. },
  8247. "required": true
  8248. },
  8249. {
  8250. "name": "directory",
  8251. "in": "query",
  8252. "schema": {
  8253. "type": "string"
  8254. },
  8255. "required": false
  8256. },
  8257. {
  8258. "name": "workspace",
  8259. "in": "query",
  8260. "schema": {
  8261. "type": "string"
  8262. },
  8263. "required": false
  8264. }
  8265. ],
  8266. "security": [],
  8267. "responses": {
  8268. "200": {
  8269. "description": "Session.Message",
  8270. "content": {
  8271. "application/json": {
  8272. "schema": {
  8273. "$ref": "#/components/schemas/SessionMessage"
  8274. }
  8275. }
  8276. }
  8277. },
  8278. "400": {
  8279. "description": "InvalidRequestError",
  8280. "content": {
  8281. "application/json": {
  8282. "schema": {
  8283. "$ref": "#/components/schemas/InvalidRequestError"
  8284. }
  8285. }
  8286. }
  8287. },
  8288. "401": {
  8289. "description": "UnauthorizedError",
  8290. "content": {
  8291. "application/json": {
  8292. "schema": {
  8293. "$ref": "#/components/schemas/UnauthorizedError"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "404": {
  8299. "description": "SessionNotFoundError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "$ref": "#/components/schemas/SessionNotFoundError"
  8304. }
  8305. }
  8306. }
  8307. },
  8308. "503": {
  8309. "description": "ServiceUnavailableError",
  8310. "content": {
  8311. "application/json": {
  8312. "schema": {
  8313. "$ref": "#/components/schemas/ServiceUnavailableError"
  8314. }
  8315. }
  8316. }
  8317. }
  8318. },
  8319. "description": "Create a v2 session message and queue it for the agent loop.",
  8320. "summary": "Send v2 message",
  8321. "requestBody": {
  8322. "content": {
  8323. "application/json": {
  8324. "schema": {
  8325. "type": "object",
  8326. "properties": {
  8327. "prompt": {
  8328. "$ref": "#/components/schemas/Prompt"
  8329. },
  8330. "delivery": {
  8331. "$ref": "#/components/schemas/SessionDelivery"
  8332. }
  8333. },
  8334. "required": ["prompt"],
  8335. "additionalProperties": false
  8336. }
  8337. }
  8338. }
  8339. },
  8340. "x-codeSamples": [
  8341. {
  8342. "lang": "js",
  8343. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8344. }
  8345. ]
  8346. }
  8347. },
  8348. "/api/session/{sessionID}/compact": {
  8349. "post": {
  8350. "tags": ["v2"],
  8351. "operationId": "v2.session.compact",
  8352. "parameters": [
  8353. {
  8354. "name": "sessionID",
  8355. "in": "path",
  8356. "schema": {
  8357. "type": "string",
  8358. "pattern": "^ses"
  8359. },
  8360. "required": true
  8361. },
  8362. {
  8363. "name": "directory",
  8364. "in": "query",
  8365. "schema": {
  8366. "type": "string"
  8367. },
  8368. "required": false
  8369. },
  8370. {
  8371. "name": "workspace",
  8372. "in": "query",
  8373. "schema": {
  8374. "type": "string"
  8375. },
  8376. "required": false
  8377. }
  8378. ],
  8379. "security": [],
  8380. "responses": {
  8381. "204": {
  8382. "description": "<No Content>"
  8383. },
  8384. "400": {
  8385. "description": "InvalidRequestError",
  8386. "content": {
  8387. "application/json": {
  8388. "schema": {
  8389. "$ref": "#/components/schemas/InvalidRequestError"
  8390. }
  8391. }
  8392. }
  8393. },
  8394. "401": {
  8395. "description": "UnauthorizedError",
  8396. "content": {
  8397. "application/json": {
  8398. "schema": {
  8399. "$ref": "#/components/schemas/UnauthorizedError"
  8400. }
  8401. }
  8402. }
  8403. },
  8404. "404": {
  8405. "description": "SessionNotFoundError",
  8406. "content": {
  8407. "application/json": {
  8408. "schema": {
  8409. "$ref": "#/components/schemas/SessionNotFoundError"
  8410. }
  8411. }
  8412. }
  8413. },
  8414. "503": {
  8415. "description": "ServiceUnavailableError",
  8416. "content": {
  8417. "application/json": {
  8418. "schema": {
  8419. "$ref": "#/components/schemas/ServiceUnavailableError"
  8420. }
  8421. }
  8422. }
  8423. }
  8424. },
  8425. "description": "Compact a v2 session conversation.",
  8426. "summary": "Compact v2 session",
  8427. "x-codeSamples": [
  8428. {
  8429. "lang": "js",
  8430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8431. }
  8432. ]
  8433. }
  8434. },
  8435. "/api/session/{sessionID}/wait": {
  8436. "post": {
  8437. "tags": ["v2"],
  8438. "operationId": "v2.session.wait",
  8439. "parameters": [
  8440. {
  8441. "name": "sessionID",
  8442. "in": "path",
  8443. "schema": {
  8444. "type": "string",
  8445. "pattern": "^ses"
  8446. },
  8447. "required": true
  8448. },
  8449. {
  8450. "name": "directory",
  8451. "in": "query",
  8452. "schema": {
  8453. "type": "string"
  8454. },
  8455. "required": false
  8456. },
  8457. {
  8458. "name": "workspace",
  8459. "in": "query",
  8460. "schema": {
  8461. "type": "string"
  8462. },
  8463. "required": false
  8464. }
  8465. ],
  8466. "security": [],
  8467. "responses": {
  8468. "204": {
  8469. "description": "<No Content>"
  8470. },
  8471. "400": {
  8472. "description": "InvalidRequestError",
  8473. "content": {
  8474. "application/json": {
  8475. "schema": {
  8476. "$ref": "#/components/schemas/InvalidRequestError"
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "401": {
  8482. "description": "UnauthorizedError",
  8483. "content": {
  8484. "application/json": {
  8485. "schema": {
  8486. "$ref": "#/components/schemas/UnauthorizedError"
  8487. }
  8488. }
  8489. }
  8490. },
  8491. "404": {
  8492. "description": "SessionNotFoundError",
  8493. "content": {
  8494. "application/json": {
  8495. "schema": {
  8496. "$ref": "#/components/schemas/SessionNotFoundError"
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "503": {
  8502. "description": "ServiceUnavailableError",
  8503. "content": {
  8504. "application/json": {
  8505. "schema": {
  8506. "$ref": "#/components/schemas/ServiceUnavailableError"
  8507. }
  8508. }
  8509. }
  8510. }
  8511. },
  8512. "description": "Wait for a v2 session agent loop to become idle.",
  8513. "summary": "Wait for v2 session",
  8514. "x-codeSamples": [
  8515. {
  8516. "lang": "js",
  8517. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8518. }
  8519. ]
  8520. }
  8521. },
  8522. "/api/session/{sessionID}/context": {
  8523. "get": {
  8524. "tags": ["v2"],
  8525. "operationId": "v2.session.context",
  8526. "parameters": [
  8527. {
  8528. "name": "sessionID",
  8529. "in": "path",
  8530. "schema": {
  8531. "type": "string",
  8532. "pattern": "^ses"
  8533. },
  8534. "required": true
  8535. },
  8536. {
  8537. "name": "directory",
  8538. "in": "query",
  8539. "schema": {
  8540. "type": "string"
  8541. },
  8542. "required": false
  8543. },
  8544. {
  8545. "name": "workspace",
  8546. "in": "query",
  8547. "schema": {
  8548. "type": "string"
  8549. },
  8550. "required": false
  8551. }
  8552. ],
  8553. "security": [],
  8554. "responses": {
  8555. "200": {
  8556. "description": "Success",
  8557. "content": {
  8558. "application/json": {
  8559. "schema": {
  8560. "type": "array",
  8561. "items": {
  8562. "$ref": "#/components/schemas/SessionMessage"
  8563. }
  8564. }
  8565. }
  8566. }
  8567. },
  8568. "400": {
  8569. "description": "InvalidRequestError",
  8570. "content": {
  8571. "application/json": {
  8572. "schema": {
  8573. "$ref": "#/components/schemas/InvalidRequestError"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "401": {
  8579. "description": "UnauthorizedError",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/UnauthorizedError"
  8584. }
  8585. }
  8586. }
  8587. },
  8588. "404": {
  8589. "description": "SessionNotFoundError",
  8590. "content": {
  8591. "application/json": {
  8592. "schema": {
  8593. "$ref": "#/components/schemas/SessionNotFoundError"
  8594. }
  8595. }
  8596. }
  8597. },
  8598. "500": {
  8599. "description": "UnknownError",
  8600. "content": {
  8601. "application/json": {
  8602. "schema": {
  8603. "$ref": "#/components/schemas/UnknownError1"
  8604. }
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8610. "summary": "Get v2 session context",
  8611. "x-codeSamples": [
  8612. {
  8613. "lang": "js",
  8614. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8615. }
  8616. ]
  8617. }
  8618. },
  8619. "/api/session/{sessionID}/message": {
  8620. "get": {
  8621. "tags": ["v2 messages"],
  8622. "operationId": "v2.session.messages",
  8623. "parameters": [
  8624. {
  8625. "name": "sessionID",
  8626. "in": "path",
  8627. "schema": {
  8628. "type": "string",
  8629. "pattern": "^ses"
  8630. },
  8631. "required": true
  8632. },
  8633. {
  8634. "name": "directory",
  8635. "in": "query",
  8636. "schema": {
  8637. "type": "string"
  8638. },
  8639. "required": false
  8640. },
  8641. {
  8642. "name": "workspace",
  8643. "in": "query",
  8644. "schema": {
  8645. "type": "string"
  8646. },
  8647. "required": false
  8648. },
  8649. {
  8650. "name": "limit",
  8651. "in": "query",
  8652. "schema": {
  8653. "type": "number"
  8654. },
  8655. "required": false
  8656. },
  8657. {
  8658. "name": "order",
  8659. "in": "query",
  8660. "schema": {
  8661. "type": "string",
  8662. "enum": ["asc", "desc"]
  8663. },
  8664. "required": false
  8665. },
  8666. {
  8667. "name": "cursor",
  8668. "in": "query",
  8669. "schema": {
  8670. "type": "string",
  8671. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8672. },
  8673. "required": false
  8674. }
  8675. ],
  8676. "security": [],
  8677. "responses": {
  8678. "200": {
  8679. "description": "V2SessionMessagesResponse",
  8680. "content": {
  8681. "application/json": {
  8682. "schema": {
  8683. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8684. }
  8685. }
  8686. }
  8687. },
  8688. "400": {
  8689. "description": "InvalidCursorError | InvalidRequestError",
  8690. "content": {
  8691. "application/json": {
  8692. "schema": {
  8693. "anyOf": [
  8694. {
  8695. "$ref": "#/components/schemas/InvalidCursorError"
  8696. },
  8697. {
  8698. "$ref": "#/components/schemas/InvalidRequestError"
  8699. }
  8700. ]
  8701. }
  8702. }
  8703. }
  8704. },
  8705. "401": {
  8706. "description": "UnauthorizedError",
  8707. "content": {
  8708. "application/json": {
  8709. "schema": {
  8710. "$ref": "#/components/schemas/UnauthorizedError"
  8711. }
  8712. }
  8713. }
  8714. },
  8715. "404": {
  8716. "description": "SessionNotFoundError",
  8717. "content": {
  8718. "application/json": {
  8719. "schema": {
  8720. "$ref": "#/components/schemas/SessionNotFoundError"
  8721. }
  8722. }
  8723. }
  8724. },
  8725. "500": {
  8726. "description": "UnknownError",
  8727. "content": {
  8728. "application/json": {
  8729. "schema": {
  8730. "$ref": "#/components/schemas/UnknownError1"
  8731. }
  8732. }
  8733. }
  8734. }
  8735. },
  8736. "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.",
  8737. "summary": "Get v2 session messages",
  8738. "x-codeSamples": [
  8739. {
  8740. "lang": "js",
  8741. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8742. }
  8743. ]
  8744. }
  8745. },
  8746. "/api/model": {
  8747. "get": {
  8748. "tags": ["v2 models"],
  8749. "operationId": "v2.model.list",
  8750. "parameters": [
  8751. {
  8752. "name": "location",
  8753. "in": "query",
  8754. "schema": {
  8755. "type": "object",
  8756. "properties": {
  8757. "directory": {
  8758. "type": "string"
  8759. },
  8760. "workspace": {
  8761. "type": "string"
  8762. }
  8763. },
  8764. "additionalProperties": false
  8765. },
  8766. "required": false,
  8767. "style": "deepObject",
  8768. "explode": true
  8769. }
  8770. ],
  8771. "security": [],
  8772. "responses": {
  8773. "200": {
  8774. "description": "Success",
  8775. "content": {
  8776. "application/json": {
  8777. "schema": {
  8778. "type": "array",
  8779. "items": {
  8780. "$ref": "#/components/schemas/ModelV2Info"
  8781. }
  8782. }
  8783. }
  8784. }
  8785. },
  8786. "400": {
  8787. "description": "InvalidRequestError",
  8788. "content": {
  8789. "application/json": {
  8790. "schema": {
  8791. "$ref": "#/components/schemas/InvalidRequestError"
  8792. }
  8793. }
  8794. }
  8795. },
  8796. "401": {
  8797. "description": "UnauthorizedError",
  8798. "content": {
  8799. "application/json": {
  8800. "schema": {
  8801. "$ref": "#/components/schemas/UnauthorizedError"
  8802. }
  8803. }
  8804. }
  8805. },
  8806. "503": {
  8807. "description": "ServiceUnavailableError",
  8808. "content": {
  8809. "application/json": {
  8810. "schema": {
  8811. "$ref": "#/components/schemas/ServiceUnavailableError"
  8812. }
  8813. }
  8814. }
  8815. }
  8816. },
  8817. "description": "Retrieve available v2 models ordered by release date.",
  8818. "summary": "List v2 models",
  8819. "x-codeSamples": [
  8820. {
  8821. "lang": "js",
  8822. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8823. }
  8824. ]
  8825. }
  8826. },
  8827. "/api/provider": {
  8828. "get": {
  8829. "tags": ["v2 providers"],
  8830. "operationId": "v2.provider.list",
  8831. "parameters": [
  8832. {
  8833. "name": "location",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "object",
  8837. "properties": {
  8838. "directory": {
  8839. "type": "string"
  8840. },
  8841. "workspace": {
  8842. "type": "string"
  8843. }
  8844. },
  8845. "additionalProperties": false
  8846. },
  8847. "required": false,
  8848. "style": "deepObject",
  8849. "explode": true
  8850. }
  8851. ],
  8852. "security": [],
  8853. "responses": {
  8854. "200": {
  8855. "description": "Success",
  8856. "content": {
  8857. "application/json": {
  8858. "schema": {
  8859. "type": "array",
  8860. "items": {
  8861. "$ref": "#/components/schemas/ProviderV2Info"
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "400": {
  8868. "description": "InvalidRequestError",
  8869. "content": {
  8870. "application/json": {
  8871. "schema": {
  8872. "$ref": "#/components/schemas/InvalidRequestError"
  8873. }
  8874. }
  8875. }
  8876. },
  8877. "401": {
  8878. "description": "UnauthorizedError",
  8879. "content": {
  8880. "application/json": {
  8881. "schema": {
  8882. "$ref": "#/components/schemas/UnauthorizedError"
  8883. }
  8884. }
  8885. }
  8886. },
  8887. "503": {
  8888. "description": "ServiceUnavailableError",
  8889. "content": {
  8890. "application/json": {
  8891. "schema": {
  8892. "$ref": "#/components/schemas/ServiceUnavailableError"
  8893. }
  8894. }
  8895. }
  8896. }
  8897. },
  8898. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8899. "summary": "List v2 providers",
  8900. "x-codeSamples": [
  8901. {
  8902. "lang": "js",
  8903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8904. }
  8905. ]
  8906. }
  8907. },
  8908. "/api/provider/{providerID}": {
  8909. "get": {
  8910. "tags": ["v2 providers"],
  8911. "operationId": "v2.provider.get",
  8912. "parameters": [
  8913. {
  8914. "name": "providerID",
  8915. "in": "path",
  8916. "schema": {
  8917. "type": "string"
  8918. },
  8919. "required": true
  8920. },
  8921. {
  8922. "name": "location",
  8923. "in": "query",
  8924. "schema": {
  8925. "type": "object",
  8926. "properties": {
  8927. "directory": {
  8928. "type": "string"
  8929. },
  8930. "workspace": {
  8931. "type": "string"
  8932. }
  8933. },
  8934. "additionalProperties": false
  8935. },
  8936. "required": false,
  8937. "style": "deepObject",
  8938. "explode": true
  8939. }
  8940. ],
  8941. "security": [],
  8942. "responses": {
  8943. "200": {
  8944. "description": "ProviderV2.Info",
  8945. "content": {
  8946. "application/json": {
  8947. "schema": {
  8948. "$ref": "#/components/schemas/ProviderV2Info"
  8949. }
  8950. }
  8951. }
  8952. },
  8953. "400": {
  8954. "description": "InvalidRequestError",
  8955. "content": {
  8956. "application/json": {
  8957. "schema": {
  8958. "$ref": "#/components/schemas/InvalidRequestError"
  8959. }
  8960. }
  8961. }
  8962. },
  8963. "401": {
  8964. "description": "UnauthorizedError",
  8965. "content": {
  8966. "application/json": {
  8967. "schema": {
  8968. "$ref": "#/components/schemas/UnauthorizedError"
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "404": {
  8974. "description": "ProviderNotFoundError",
  8975. "content": {
  8976. "application/json": {
  8977. "schema": {
  8978. "$ref": "#/components/schemas/ProviderNotFoundError"
  8979. }
  8980. }
  8981. }
  8982. },
  8983. "503": {
  8984. "description": "ServiceUnavailableError",
  8985. "content": {
  8986. "application/json": {
  8987. "schema": {
  8988. "$ref": "#/components/schemas/ServiceUnavailableError"
  8989. }
  8990. }
  8991. }
  8992. }
  8993. },
  8994. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  8995. "summary": "Get v2 provider",
  8996. "x-codeSamples": [
  8997. {
  8998. "lang": "js",
  8999. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  9000. }
  9001. ]
  9002. }
  9003. },
  9004. "/api/permission/request": {
  9005. "get": {
  9006. "tags": ["v2 permissions"],
  9007. "operationId": "v2.permission.request.list",
  9008. "parameters": [
  9009. {
  9010. "name": "location",
  9011. "in": "query",
  9012. "schema": {
  9013. "type": "object",
  9014. "properties": {
  9015. "directory": {
  9016. "type": "string"
  9017. },
  9018. "workspace": {
  9019. "type": "string"
  9020. }
  9021. },
  9022. "additionalProperties": false
  9023. },
  9024. "required": false,
  9025. "style": "deepObject",
  9026. "explode": true
  9027. }
  9028. ],
  9029. "security": [],
  9030. "responses": {
  9031. "200": {
  9032. "description": "Success",
  9033. "content": {
  9034. "application/json": {
  9035. "schema": {
  9036. "type": "array",
  9037. "items": {
  9038. "$ref": "#/components/schemas/PermissionV2Request"
  9039. }
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "InvalidRequestError",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "$ref": "#/components/schemas/InvalidRequestError"
  9050. }
  9051. }
  9052. }
  9053. },
  9054. "401": {
  9055. "description": "UnauthorizedError",
  9056. "content": {
  9057. "application/json": {
  9058. "schema": {
  9059. "$ref": "#/components/schemas/UnauthorizedError"
  9060. }
  9061. }
  9062. }
  9063. }
  9064. },
  9065. "description": "Retrieve pending permission requests for a location.",
  9066. "summary": "List pending permission requests",
  9067. "x-codeSamples": [
  9068. {
  9069. "lang": "js",
  9070. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  9071. }
  9072. ]
  9073. }
  9074. },
  9075. "/api/session/{sessionID}/permission/request": {
  9076. "get": {
  9077. "tags": ["v2 session permissions"],
  9078. "operationId": "v2.session.permission.list",
  9079. "parameters": [
  9080. {
  9081. "name": "sessionID",
  9082. "in": "path",
  9083. "schema": {
  9084. "type": "string",
  9085. "pattern": "^ses"
  9086. },
  9087. "required": true
  9088. }
  9089. ],
  9090. "security": [],
  9091. "responses": {
  9092. "200": {
  9093. "description": "Success",
  9094. "content": {
  9095. "application/json": {
  9096. "schema": {
  9097. "type": "array",
  9098. "items": {
  9099. "$ref": "#/components/schemas/PermissionV2Request"
  9100. }
  9101. }
  9102. }
  9103. }
  9104. },
  9105. "400": {
  9106. "description": "InvalidRequestError",
  9107. "content": {
  9108. "application/json": {
  9109. "schema": {
  9110. "$ref": "#/components/schemas/InvalidRequestError"
  9111. }
  9112. }
  9113. }
  9114. },
  9115. "401": {
  9116. "description": "UnauthorizedError",
  9117. "content": {
  9118. "application/json": {
  9119. "schema": {
  9120. "$ref": "#/components/schemas/UnauthorizedError"
  9121. }
  9122. }
  9123. }
  9124. },
  9125. "404": {
  9126. "description": "SessionNotFoundError",
  9127. "content": {
  9128. "application/json": {
  9129. "schema": {
  9130. "$ref": "#/components/schemas/SessionNotFoundError"
  9131. }
  9132. }
  9133. }
  9134. }
  9135. },
  9136. "description": "Retrieve pending permission requests owned by a session.",
  9137. "summary": "List session permission requests",
  9138. "x-codeSamples": [
  9139. {
  9140. "lang": "js",
  9141. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  9142. }
  9143. ]
  9144. }
  9145. },
  9146. "/api/session/{sessionID}/permission/request/{requestID}/reply": {
  9147. "post": {
  9148. "tags": ["v2 session permissions"],
  9149. "operationId": "v2.session.permission.reply",
  9150. "parameters": [
  9151. {
  9152. "name": "sessionID",
  9153. "in": "path",
  9154. "schema": {
  9155. "type": "string",
  9156. "pattern": "^ses"
  9157. },
  9158. "required": true
  9159. },
  9160. {
  9161. "name": "requestID",
  9162. "in": "path",
  9163. "schema": {
  9164. "type": "string",
  9165. "pattern": "^per"
  9166. },
  9167. "required": true
  9168. }
  9169. ],
  9170. "security": [],
  9171. "responses": {
  9172. "204": {
  9173. "description": "<No Content>"
  9174. },
  9175. "400": {
  9176. "description": "InvalidRequestError",
  9177. "content": {
  9178. "application/json": {
  9179. "schema": {
  9180. "$ref": "#/components/schemas/InvalidRequestError"
  9181. }
  9182. }
  9183. }
  9184. },
  9185. "401": {
  9186. "description": "UnauthorizedError",
  9187. "content": {
  9188. "application/json": {
  9189. "schema": {
  9190. "$ref": "#/components/schemas/UnauthorizedError"
  9191. }
  9192. }
  9193. }
  9194. },
  9195. "404": {
  9196. "description": "SessionNotFoundError | PermissionNotFoundError",
  9197. "content": {
  9198. "application/json": {
  9199. "schema": {
  9200. "anyOf": [
  9201. {
  9202. "$ref": "#/components/schemas/SessionNotFoundError"
  9203. },
  9204. {
  9205. "$ref": "#/components/schemas/PermissionNotFoundError"
  9206. }
  9207. ]
  9208. }
  9209. }
  9210. }
  9211. }
  9212. },
  9213. "description": "Respond to a pending permission request owned by a session.",
  9214. "summary": "Reply to pending permission request",
  9215. "requestBody": {
  9216. "content": {
  9217. "application/json": {
  9218. "schema": {
  9219. "type": "object",
  9220. "properties": {
  9221. "reply": {
  9222. "$ref": "#/components/schemas/PermissionV2Reply"
  9223. },
  9224. "message": {
  9225. "type": "string"
  9226. }
  9227. },
  9228. "required": ["reply"],
  9229. "additionalProperties": false
  9230. }
  9231. }
  9232. }
  9233. },
  9234. "x-codeSamples": [
  9235. {
  9236. "lang": "js",
  9237. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  9238. }
  9239. ]
  9240. }
  9241. },
  9242. "/api/permission/saved": {
  9243. "get": {
  9244. "tags": ["v2 saved permissions"],
  9245. "operationId": "v2.permission.saved.list",
  9246. "parameters": [
  9247. {
  9248. "name": "projectID",
  9249. "in": "query",
  9250. "schema": {
  9251. "type": "string"
  9252. },
  9253. "required": false
  9254. }
  9255. ],
  9256. "security": [],
  9257. "responses": {
  9258. "200": {
  9259. "description": "Success",
  9260. "content": {
  9261. "application/json": {
  9262. "schema": {
  9263. "type": "array",
  9264. "items": {
  9265. "$ref": "#/components/schemas/PermissionSavedInfo"
  9266. }
  9267. }
  9268. }
  9269. }
  9270. },
  9271. "400": {
  9272. "description": "InvalidRequestError",
  9273. "content": {
  9274. "application/json": {
  9275. "schema": {
  9276. "$ref": "#/components/schemas/InvalidRequestError"
  9277. }
  9278. }
  9279. }
  9280. },
  9281. "401": {
  9282. "description": "UnauthorizedError",
  9283. "content": {
  9284. "application/json": {
  9285. "schema": {
  9286. "$ref": "#/components/schemas/UnauthorizedError"
  9287. }
  9288. }
  9289. }
  9290. }
  9291. },
  9292. "description": "Retrieve saved permissions, optionally filtered by project.",
  9293. "summary": "List saved permissions",
  9294. "x-codeSamples": [
  9295. {
  9296. "lang": "js",
  9297. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  9298. }
  9299. ]
  9300. }
  9301. },
  9302. "/api/permission/saved/{id}": {
  9303. "delete": {
  9304. "tags": ["v2 saved permissions"],
  9305. "operationId": "v2.permission.saved.remove",
  9306. "parameters": [
  9307. {
  9308. "name": "id",
  9309. "in": "path",
  9310. "schema": {
  9311. "type": "string"
  9312. },
  9313. "required": true
  9314. }
  9315. ],
  9316. "security": [],
  9317. "responses": {
  9318. "204": {
  9319. "description": "<No Content>"
  9320. },
  9321. "400": {
  9322. "description": "InvalidRequestError",
  9323. "content": {
  9324. "application/json": {
  9325. "schema": {
  9326. "$ref": "#/components/schemas/InvalidRequestError"
  9327. }
  9328. }
  9329. }
  9330. },
  9331. "401": {
  9332. "description": "UnauthorizedError",
  9333. "content": {
  9334. "application/json": {
  9335. "schema": {
  9336. "$ref": "#/components/schemas/UnauthorizedError"
  9337. }
  9338. }
  9339. }
  9340. }
  9341. },
  9342. "description": "Remove a saved permission by ID.",
  9343. "summary": "Remove saved permission",
  9344. "x-codeSamples": [
  9345. {
  9346. "lang": "js",
  9347. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  9348. }
  9349. ]
  9350. }
  9351. },
  9352. "/api/fs/read": {
  9353. "get": {
  9354. "tags": ["v2 filesystem"],
  9355. "operationId": "v2.fs.read",
  9356. "parameters": [
  9357. {
  9358. "name": "location",
  9359. "in": "query",
  9360. "schema": {
  9361. "type": "object",
  9362. "properties": {
  9363. "directory": {
  9364. "type": "string"
  9365. },
  9366. "workspace": {
  9367. "type": "string"
  9368. }
  9369. },
  9370. "additionalProperties": false
  9371. },
  9372. "required": false,
  9373. "style": "deepObject",
  9374. "explode": true
  9375. },
  9376. {
  9377. "name": "path",
  9378. "in": "query",
  9379. "schema": {
  9380. "type": "string"
  9381. },
  9382. "required": true
  9383. },
  9384. {
  9385. "name": "reference",
  9386. "in": "query",
  9387. "schema": {
  9388. "type": "string"
  9389. },
  9390. "required": false
  9391. }
  9392. ],
  9393. "security": [],
  9394. "responses": {
  9395. "200": {
  9396. "description": "Success",
  9397. "content": {
  9398. "application/json": {
  9399. "schema": {
  9400. "anyOf": [
  9401. {
  9402. "$ref": "#/components/schemas/LocationFileSystemTextContent"
  9403. },
  9404. {
  9405. "$ref": "#/components/schemas/LocationFileSystemBinaryContent"
  9406. }
  9407. ]
  9408. }
  9409. }
  9410. }
  9411. },
  9412. "400": {
  9413. "description": "InvalidRequestError",
  9414. "content": {
  9415. "application/json": {
  9416. "schema": {
  9417. "$ref": "#/components/schemas/InvalidRequestError"
  9418. }
  9419. }
  9420. }
  9421. },
  9422. "401": {
  9423. "description": "UnauthorizedError",
  9424. "content": {
  9425. "application/json": {
  9426. "schema": {
  9427. "$ref": "#/components/schemas/UnauthorizedError"
  9428. }
  9429. }
  9430. }
  9431. }
  9432. },
  9433. "description": "Read one file relative to the requested location.",
  9434. "summary": "Read file",
  9435. "x-codeSamples": [
  9436. {
  9437. "lang": "js",
  9438. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  9439. }
  9440. ]
  9441. }
  9442. },
  9443. "/api/fs/list": {
  9444. "get": {
  9445. "tags": ["v2 filesystem"],
  9446. "operationId": "v2.fs.list",
  9447. "parameters": [
  9448. {
  9449. "name": "location",
  9450. "in": "query",
  9451. "schema": {
  9452. "type": "object",
  9453. "properties": {
  9454. "directory": {
  9455. "type": "string"
  9456. },
  9457. "workspace": {
  9458. "type": "string"
  9459. }
  9460. },
  9461. "additionalProperties": false
  9462. },
  9463. "required": false,
  9464. "style": "deepObject",
  9465. "explode": true
  9466. },
  9467. {
  9468. "name": "path",
  9469. "in": "query",
  9470. "schema": {
  9471. "type": "string"
  9472. },
  9473. "required": false
  9474. },
  9475. {
  9476. "name": "reference",
  9477. "in": "query",
  9478. "schema": {
  9479. "type": "string"
  9480. },
  9481. "required": false
  9482. }
  9483. ],
  9484. "security": [],
  9485. "responses": {
  9486. "200": {
  9487. "description": "Success",
  9488. "content": {
  9489. "application/json": {
  9490. "schema": {
  9491. "type": "array",
  9492. "items": {
  9493. "$ref": "#/components/schemas/LocationFileSystemEntry"
  9494. }
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "400": {
  9500. "description": "InvalidRequestError",
  9501. "content": {
  9502. "application/json": {
  9503. "schema": {
  9504. "$ref": "#/components/schemas/InvalidRequestError"
  9505. }
  9506. }
  9507. }
  9508. },
  9509. "401": {
  9510. "description": "UnauthorizedError",
  9511. "content": {
  9512. "application/json": {
  9513. "schema": {
  9514. "$ref": "#/components/schemas/UnauthorizedError"
  9515. }
  9516. }
  9517. }
  9518. }
  9519. },
  9520. "description": "List direct children of one directory relative to the requested location.",
  9521. "summary": "List directory",
  9522. "x-codeSamples": [
  9523. {
  9524. "lang": "js",
  9525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  9526. }
  9527. ]
  9528. }
  9529. },
  9530. "/tui/append-prompt": {
  9531. "post": {
  9532. "tags": ["tui"],
  9533. "operationId": "tui.appendPrompt",
  9534. "parameters": [
  9535. {
  9536. "name": "directory",
  9537. "in": "query",
  9538. "schema": {
  9539. "type": "string"
  9540. },
  9541. "required": false
  9542. },
  9543. {
  9544. "name": "workspace",
  9545. "in": "query",
  9546. "schema": {
  9547. "type": "string"
  9548. },
  9549. "required": false
  9550. }
  9551. ],
  9552. "responses": {
  9553. "200": {
  9554. "description": "Prompt processed successfully",
  9555. "content": {
  9556. "application/json": {
  9557. "schema": {
  9558. "type": "boolean",
  9559. "description": "Prompt processed successfully"
  9560. }
  9561. }
  9562. }
  9563. },
  9564. "400": {
  9565. "description": "BadRequest | InvalidRequestError",
  9566. "content": {
  9567. "application/json": {
  9568. "schema": {
  9569. "anyOf": [
  9570. {
  9571. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9572. },
  9573. {
  9574. "$ref": "#/components/schemas/InvalidRequestError"
  9575. }
  9576. ]
  9577. }
  9578. }
  9579. }
  9580. }
  9581. },
  9582. "description": "Append prompt to the TUI.",
  9583. "summary": "Append TUI prompt",
  9584. "requestBody": {
  9585. "content": {
  9586. "application/json": {
  9587. "schema": {
  9588. "type": "object",
  9589. "properties": {
  9590. "text": {
  9591. "type": "string"
  9592. }
  9593. },
  9594. "required": ["text"],
  9595. "additionalProperties": false
  9596. }
  9597. }
  9598. }
  9599. },
  9600. "x-codeSamples": [
  9601. {
  9602. "lang": "js",
  9603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9604. }
  9605. ]
  9606. }
  9607. },
  9608. "/tui/open-help": {
  9609. "post": {
  9610. "tags": ["tui"],
  9611. "operationId": "tui.openHelp",
  9612. "parameters": [
  9613. {
  9614. "name": "directory",
  9615. "in": "query",
  9616. "schema": {
  9617. "type": "string"
  9618. },
  9619. "required": false
  9620. },
  9621. {
  9622. "name": "workspace",
  9623. "in": "query",
  9624. "schema": {
  9625. "type": "string"
  9626. },
  9627. "required": false
  9628. }
  9629. ],
  9630. "responses": {
  9631. "200": {
  9632. "description": "Help dialog opened successfully",
  9633. "content": {
  9634. "application/json": {
  9635. "schema": {
  9636. "type": "boolean",
  9637. "description": "Help dialog opened successfully"
  9638. }
  9639. }
  9640. }
  9641. },
  9642. "400": {
  9643. "description": "Bad request",
  9644. "content": {
  9645. "application/json": {
  9646. "schema": {
  9647. "$ref": "#/components/schemas/BadRequestError"
  9648. }
  9649. }
  9650. }
  9651. }
  9652. },
  9653. "description": "Open the help dialog in the TUI to display user assistance information.",
  9654. "summary": "Open help dialog",
  9655. "x-codeSamples": [
  9656. {
  9657. "lang": "js",
  9658. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9659. }
  9660. ]
  9661. }
  9662. },
  9663. "/tui/open-sessions": {
  9664. "post": {
  9665. "tags": ["tui"],
  9666. "operationId": "tui.openSessions",
  9667. "parameters": [
  9668. {
  9669. "name": "directory",
  9670. "in": "query",
  9671. "schema": {
  9672. "type": "string"
  9673. },
  9674. "required": false
  9675. },
  9676. {
  9677. "name": "workspace",
  9678. "in": "query",
  9679. "schema": {
  9680. "type": "string"
  9681. },
  9682. "required": false
  9683. }
  9684. ],
  9685. "responses": {
  9686. "200": {
  9687. "description": "Session dialog opened successfully",
  9688. "content": {
  9689. "application/json": {
  9690. "schema": {
  9691. "type": "boolean",
  9692. "description": "Session dialog opened successfully"
  9693. }
  9694. }
  9695. }
  9696. },
  9697. "400": {
  9698. "description": "Bad request",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "$ref": "#/components/schemas/BadRequestError"
  9703. }
  9704. }
  9705. }
  9706. }
  9707. },
  9708. "description": "Open the session dialog.",
  9709. "summary": "Open sessions dialog",
  9710. "x-codeSamples": [
  9711. {
  9712. "lang": "js",
  9713. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9714. }
  9715. ]
  9716. }
  9717. },
  9718. "/tui/open-themes": {
  9719. "post": {
  9720. "tags": ["tui"],
  9721. "operationId": "tui.openThemes",
  9722. "parameters": [
  9723. {
  9724. "name": "directory",
  9725. "in": "query",
  9726. "schema": {
  9727. "type": "string"
  9728. },
  9729. "required": false
  9730. },
  9731. {
  9732. "name": "workspace",
  9733. "in": "query",
  9734. "schema": {
  9735. "type": "string"
  9736. },
  9737. "required": false
  9738. }
  9739. ],
  9740. "responses": {
  9741. "200": {
  9742. "description": "Theme dialog opened successfully",
  9743. "content": {
  9744. "application/json": {
  9745. "schema": {
  9746. "type": "boolean",
  9747. "description": "Theme dialog opened successfully"
  9748. }
  9749. }
  9750. }
  9751. },
  9752. "400": {
  9753. "description": "Bad request",
  9754. "content": {
  9755. "application/json": {
  9756. "schema": {
  9757. "$ref": "#/components/schemas/BadRequestError"
  9758. }
  9759. }
  9760. }
  9761. }
  9762. },
  9763. "description": "Open the theme dialog.",
  9764. "summary": "Open themes dialog",
  9765. "x-codeSamples": [
  9766. {
  9767. "lang": "js",
  9768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9769. }
  9770. ]
  9771. }
  9772. },
  9773. "/tui/open-models": {
  9774. "post": {
  9775. "tags": ["tui"],
  9776. "operationId": "tui.openModels",
  9777. "parameters": [
  9778. {
  9779. "name": "directory",
  9780. "in": "query",
  9781. "schema": {
  9782. "type": "string"
  9783. },
  9784. "required": false
  9785. },
  9786. {
  9787. "name": "workspace",
  9788. "in": "query",
  9789. "schema": {
  9790. "type": "string"
  9791. },
  9792. "required": false
  9793. }
  9794. ],
  9795. "responses": {
  9796. "200": {
  9797. "description": "Model dialog opened successfully",
  9798. "content": {
  9799. "application/json": {
  9800. "schema": {
  9801. "type": "boolean",
  9802. "description": "Model dialog opened successfully"
  9803. }
  9804. }
  9805. }
  9806. },
  9807. "400": {
  9808. "description": "Bad request",
  9809. "content": {
  9810. "application/json": {
  9811. "schema": {
  9812. "$ref": "#/components/schemas/BadRequestError"
  9813. }
  9814. }
  9815. }
  9816. }
  9817. },
  9818. "description": "Open the model dialog.",
  9819. "summary": "Open models dialog",
  9820. "x-codeSamples": [
  9821. {
  9822. "lang": "js",
  9823. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9824. }
  9825. ]
  9826. }
  9827. },
  9828. "/tui/submit-prompt": {
  9829. "post": {
  9830. "tags": ["tui"],
  9831. "operationId": "tui.submitPrompt",
  9832. "parameters": [
  9833. {
  9834. "name": "directory",
  9835. "in": "query",
  9836. "schema": {
  9837. "type": "string"
  9838. },
  9839. "required": false
  9840. },
  9841. {
  9842. "name": "workspace",
  9843. "in": "query",
  9844. "schema": {
  9845. "type": "string"
  9846. },
  9847. "required": false
  9848. }
  9849. ],
  9850. "responses": {
  9851. "200": {
  9852. "description": "Prompt submitted successfully",
  9853. "content": {
  9854. "application/json": {
  9855. "schema": {
  9856. "type": "boolean",
  9857. "description": "Prompt submitted successfully"
  9858. }
  9859. }
  9860. }
  9861. },
  9862. "400": {
  9863. "description": "Bad request",
  9864. "content": {
  9865. "application/json": {
  9866. "schema": {
  9867. "$ref": "#/components/schemas/BadRequestError"
  9868. }
  9869. }
  9870. }
  9871. }
  9872. },
  9873. "description": "Submit the prompt.",
  9874. "summary": "Submit TUI prompt",
  9875. "x-codeSamples": [
  9876. {
  9877. "lang": "js",
  9878. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9879. }
  9880. ]
  9881. }
  9882. },
  9883. "/tui/clear-prompt": {
  9884. "post": {
  9885. "tags": ["tui"],
  9886. "operationId": "tui.clearPrompt",
  9887. "parameters": [
  9888. {
  9889. "name": "directory",
  9890. "in": "query",
  9891. "schema": {
  9892. "type": "string"
  9893. },
  9894. "required": false
  9895. },
  9896. {
  9897. "name": "workspace",
  9898. "in": "query",
  9899. "schema": {
  9900. "type": "string"
  9901. },
  9902. "required": false
  9903. }
  9904. ],
  9905. "responses": {
  9906. "200": {
  9907. "description": "Prompt cleared successfully",
  9908. "content": {
  9909. "application/json": {
  9910. "schema": {
  9911. "type": "boolean",
  9912. "description": "Prompt cleared successfully"
  9913. }
  9914. }
  9915. }
  9916. },
  9917. "400": {
  9918. "description": "Bad request",
  9919. "content": {
  9920. "application/json": {
  9921. "schema": {
  9922. "$ref": "#/components/schemas/BadRequestError"
  9923. }
  9924. }
  9925. }
  9926. }
  9927. },
  9928. "description": "Clear the prompt.",
  9929. "summary": "Clear TUI prompt",
  9930. "x-codeSamples": [
  9931. {
  9932. "lang": "js",
  9933. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9934. }
  9935. ]
  9936. }
  9937. },
  9938. "/tui/execute-command": {
  9939. "post": {
  9940. "tags": ["tui"],
  9941. "operationId": "tui.executeCommand",
  9942. "parameters": [
  9943. {
  9944. "name": "directory",
  9945. "in": "query",
  9946. "schema": {
  9947. "type": "string"
  9948. },
  9949. "required": false
  9950. },
  9951. {
  9952. "name": "workspace",
  9953. "in": "query",
  9954. "schema": {
  9955. "type": "string"
  9956. },
  9957. "required": false
  9958. }
  9959. ],
  9960. "responses": {
  9961. "200": {
  9962. "description": "Command executed successfully",
  9963. "content": {
  9964. "application/json": {
  9965. "schema": {
  9966. "type": "boolean",
  9967. "description": "Command executed successfully"
  9968. }
  9969. }
  9970. }
  9971. },
  9972. "400": {
  9973. "description": "BadRequest | InvalidRequestError",
  9974. "content": {
  9975. "application/json": {
  9976. "schema": {
  9977. "anyOf": [
  9978. {
  9979. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9980. },
  9981. {
  9982. "$ref": "#/components/schemas/InvalidRequestError"
  9983. }
  9984. ]
  9985. }
  9986. }
  9987. }
  9988. }
  9989. },
  9990. "description": "Execute a TUI command.",
  9991. "summary": "Execute TUI command",
  9992. "requestBody": {
  9993. "content": {
  9994. "application/json": {
  9995. "schema": {
  9996. "type": "object",
  9997. "properties": {
  9998. "command": {
  9999. "type": "string"
  10000. }
  10001. },
  10002. "required": ["command"],
  10003. "additionalProperties": false
  10004. }
  10005. }
  10006. }
  10007. },
  10008. "x-codeSamples": [
  10009. {
  10010. "lang": "js",
  10011. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  10012. }
  10013. ]
  10014. }
  10015. },
  10016. "/tui/show-toast": {
  10017. "post": {
  10018. "tags": ["tui"],
  10019. "operationId": "tui.showToast",
  10020. "parameters": [
  10021. {
  10022. "name": "directory",
  10023. "in": "query",
  10024. "schema": {
  10025. "type": "string"
  10026. },
  10027. "required": false
  10028. },
  10029. {
  10030. "name": "workspace",
  10031. "in": "query",
  10032. "schema": {
  10033. "type": "string"
  10034. },
  10035. "required": false
  10036. }
  10037. ],
  10038. "responses": {
  10039. "200": {
  10040. "description": "Toast notification shown successfully",
  10041. "content": {
  10042. "application/json": {
  10043. "schema": {
  10044. "type": "boolean",
  10045. "description": "Toast notification shown successfully"
  10046. }
  10047. }
  10048. }
  10049. },
  10050. "400": {
  10051. "description": "Bad request",
  10052. "content": {
  10053. "application/json": {
  10054. "schema": {
  10055. "$ref": "#/components/schemas/BadRequestError"
  10056. }
  10057. }
  10058. }
  10059. }
  10060. },
  10061. "description": "Show a toast notification in the TUI.",
  10062. "summary": "Show TUI toast",
  10063. "requestBody": {
  10064. "content": {
  10065. "application/json": {
  10066. "schema": {
  10067. "type": "object",
  10068. "properties": {
  10069. "title": {
  10070. "type": "string"
  10071. },
  10072. "message": {
  10073. "type": "string"
  10074. },
  10075. "variant": {
  10076. "type": "string",
  10077. "enum": ["info", "success", "warning", "error"]
  10078. },
  10079. "duration": {
  10080. "type": "integer",
  10081. "exclusiveMinimum": 0
  10082. }
  10083. },
  10084. "required": ["message", "variant"],
  10085. "additionalProperties": false
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "x-codeSamples": [
  10091. {
  10092. "lang": "js",
  10093. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  10094. }
  10095. ]
  10096. }
  10097. },
  10098. "/tui/publish": {
  10099. "post": {
  10100. "tags": ["tui"],
  10101. "operationId": "tui.publish",
  10102. "parameters": [
  10103. {
  10104. "name": "directory",
  10105. "in": "query",
  10106. "schema": {
  10107. "type": "string"
  10108. },
  10109. "required": false
  10110. },
  10111. {
  10112. "name": "workspace",
  10113. "in": "query",
  10114. "schema": {
  10115. "type": "string"
  10116. },
  10117. "required": false
  10118. }
  10119. ],
  10120. "responses": {
  10121. "200": {
  10122. "description": "Event published successfully",
  10123. "content": {
  10124. "application/json": {
  10125. "schema": {
  10126. "type": "boolean",
  10127. "description": "Event published successfully"
  10128. }
  10129. }
  10130. }
  10131. },
  10132. "400": {
  10133. "description": "BadRequest | InvalidRequestError",
  10134. "content": {
  10135. "application/json": {
  10136. "schema": {
  10137. "anyOf": [
  10138. {
  10139. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10140. },
  10141. {
  10142. "$ref": "#/components/schemas/InvalidRequestError"
  10143. }
  10144. ]
  10145. }
  10146. }
  10147. }
  10148. }
  10149. },
  10150. "description": "Publish a TUI event.",
  10151. "summary": "Publish TUI event",
  10152. "requestBody": {
  10153. "content": {
  10154. "application/json": {
  10155. "schema": {
  10156. "anyOf": [
  10157. {
  10158. "$ref": "#/components/schemas/EventTuiPromptAppend"
  10159. },
  10160. {
  10161. "$ref": "#/components/schemas/EventTuiCommandExecute"
  10162. },
  10163. {
  10164. "$ref": "#/components/schemas/EventTuiToastShow"
  10165. },
  10166. {
  10167. "$ref": "#/components/schemas/EventTuiSessionSelect"
  10168. }
  10169. ]
  10170. }
  10171. }
  10172. }
  10173. },
  10174. "x-codeSamples": [
  10175. {
  10176. "lang": "js",
  10177. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  10178. }
  10179. ]
  10180. }
  10181. },
  10182. "/tui/select-session": {
  10183. "post": {
  10184. "tags": ["tui"],
  10185. "operationId": "tui.selectSession",
  10186. "parameters": [
  10187. {
  10188. "name": "directory",
  10189. "in": "query",
  10190. "schema": {
  10191. "type": "string"
  10192. },
  10193. "required": false
  10194. },
  10195. {
  10196. "name": "workspace",
  10197. "in": "query",
  10198. "schema": {
  10199. "type": "string"
  10200. },
  10201. "required": false
  10202. }
  10203. ],
  10204. "responses": {
  10205. "200": {
  10206. "description": "Session selected successfully",
  10207. "content": {
  10208. "application/json": {
  10209. "schema": {
  10210. "type": "boolean",
  10211. "description": "Session selected successfully"
  10212. }
  10213. }
  10214. }
  10215. },
  10216. "400": {
  10217. "description": "BadRequest | InvalidRequestError",
  10218. "content": {
  10219. "application/json": {
  10220. "schema": {
  10221. "anyOf": [
  10222. {
  10223. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10224. },
  10225. {
  10226. "$ref": "#/components/schemas/InvalidRequestError"
  10227. }
  10228. ]
  10229. }
  10230. }
  10231. }
  10232. },
  10233. "404": {
  10234. "description": "NotFoundError",
  10235. "content": {
  10236. "application/json": {
  10237. "schema": {
  10238. "$ref": "#/components/schemas/NotFoundError"
  10239. }
  10240. }
  10241. }
  10242. }
  10243. },
  10244. "description": "Navigate the TUI to display the specified session.",
  10245. "summary": "Select session",
  10246. "requestBody": {
  10247. "content": {
  10248. "application/json": {
  10249. "schema": {
  10250. "type": "object",
  10251. "properties": {
  10252. "sessionID": {
  10253. "type": "string",
  10254. "pattern": "^ses",
  10255. "description": "Session ID to navigate to"
  10256. }
  10257. },
  10258. "required": ["sessionID"],
  10259. "additionalProperties": false
  10260. }
  10261. }
  10262. }
  10263. },
  10264. "x-codeSamples": [
  10265. {
  10266. "lang": "js",
  10267. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  10268. }
  10269. ]
  10270. }
  10271. },
  10272. "/tui/control/next": {
  10273. "get": {
  10274. "tags": ["tui"],
  10275. "operationId": "tui.control.next",
  10276. "parameters": [
  10277. {
  10278. "name": "directory",
  10279. "in": "query",
  10280. "schema": {
  10281. "type": "string"
  10282. },
  10283. "required": false
  10284. },
  10285. {
  10286. "name": "workspace",
  10287. "in": "query",
  10288. "schema": {
  10289. "type": "string"
  10290. },
  10291. "required": false
  10292. }
  10293. ],
  10294. "responses": {
  10295. "200": {
  10296. "description": "Next TUI request",
  10297. "content": {
  10298. "application/json": {
  10299. "schema": {
  10300. "type": "object",
  10301. "properties": {
  10302. "path": {
  10303. "type": "string"
  10304. },
  10305. "body": {}
  10306. },
  10307. "required": ["path", "body"],
  10308. "additionalProperties": false,
  10309. "description": "Next TUI request"
  10310. }
  10311. }
  10312. }
  10313. },
  10314. "400": {
  10315. "description": "Bad request",
  10316. "content": {
  10317. "application/json": {
  10318. "schema": {
  10319. "$ref": "#/components/schemas/BadRequestError"
  10320. }
  10321. }
  10322. }
  10323. }
  10324. },
  10325. "description": "Retrieve the next TUI request from the queue for processing.",
  10326. "summary": "Get next TUI request",
  10327. "x-codeSamples": [
  10328. {
  10329. "lang": "js",
  10330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  10331. }
  10332. ]
  10333. }
  10334. },
  10335. "/tui/control/response": {
  10336. "post": {
  10337. "tags": ["tui"],
  10338. "operationId": "tui.control.response",
  10339. "parameters": [
  10340. {
  10341. "name": "directory",
  10342. "in": "query",
  10343. "schema": {
  10344. "type": "string"
  10345. },
  10346. "required": false
  10347. },
  10348. {
  10349. "name": "workspace",
  10350. "in": "query",
  10351. "schema": {
  10352. "type": "string"
  10353. },
  10354. "required": false
  10355. }
  10356. ],
  10357. "responses": {
  10358. "200": {
  10359. "description": "Response submitted successfully",
  10360. "content": {
  10361. "application/json": {
  10362. "schema": {
  10363. "type": "boolean",
  10364. "description": "Response submitted successfully"
  10365. }
  10366. }
  10367. }
  10368. },
  10369. "400": {
  10370. "description": "Bad request",
  10371. "content": {
  10372. "application/json": {
  10373. "schema": {
  10374. "$ref": "#/components/schemas/BadRequestError"
  10375. }
  10376. }
  10377. }
  10378. }
  10379. },
  10380. "description": "Submit a response to the TUI request queue to complete a pending request.",
  10381. "summary": "Submit TUI response",
  10382. "requestBody": {
  10383. "content": {
  10384. "application/json": {
  10385. "schema": {}
  10386. }
  10387. }
  10388. },
  10389. "x-codeSamples": [
  10390. {
  10391. "lang": "js",
  10392. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  10393. }
  10394. ]
  10395. }
  10396. },
  10397. "/experimental/workspace/adapter": {
  10398. "get": {
  10399. "tags": ["workspace"],
  10400. "operationId": "experimental.workspace.adapter.list",
  10401. "parameters": [
  10402. {
  10403. "name": "directory",
  10404. "in": "query",
  10405. "schema": {
  10406. "type": "string"
  10407. },
  10408. "required": false
  10409. },
  10410. {
  10411. "name": "workspace",
  10412. "in": "query",
  10413. "schema": {
  10414. "type": "string"
  10415. },
  10416. "required": false
  10417. }
  10418. ],
  10419. "responses": {
  10420. "200": {
  10421. "description": "Workspace adapters",
  10422. "content": {
  10423. "application/json": {
  10424. "schema": {
  10425. "type": "array",
  10426. "items": {
  10427. "type": "object",
  10428. "properties": {
  10429. "type": {
  10430. "type": "string"
  10431. },
  10432. "name": {
  10433. "type": "string"
  10434. },
  10435. "description": {
  10436. "type": "string"
  10437. }
  10438. },
  10439. "required": ["type", "name", "description"],
  10440. "additionalProperties": false
  10441. },
  10442. "description": "Workspace adapters"
  10443. }
  10444. }
  10445. }
  10446. },
  10447. "400": {
  10448. "description": "Bad request",
  10449. "content": {
  10450. "application/json": {
  10451. "schema": {
  10452. "$ref": "#/components/schemas/BadRequestError"
  10453. }
  10454. }
  10455. }
  10456. }
  10457. },
  10458. "description": "List all available workspace adapters for the current project.",
  10459. "summary": "List workspace adapters",
  10460. "x-codeSamples": [
  10461. {
  10462. "lang": "js",
  10463. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  10464. }
  10465. ]
  10466. }
  10467. },
  10468. "/experimental/workspace": {
  10469. "get": {
  10470. "tags": ["workspace"],
  10471. "operationId": "experimental.workspace.list",
  10472. "parameters": [
  10473. {
  10474. "name": "directory",
  10475. "in": "query",
  10476. "schema": {
  10477. "type": "string"
  10478. },
  10479. "required": false
  10480. },
  10481. {
  10482. "name": "workspace",
  10483. "in": "query",
  10484. "schema": {
  10485. "type": "string"
  10486. },
  10487. "required": false
  10488. }
  10489. ],
  10490. "responses": {
  10491. "200": {
  10492. "description": "Workspaces",
  10493. "content": {
  10494. "application/json": {
  10495. "schema": {
  10496. "type": "array",
  10497. "items": {
  10498. "$ref": "#/components/schemas/Workspace"
  10499. },
  10500. "description": "Workspaces"
  10501. }
  10502. }
  10503. }
  10504. },
  10505. "400": {
  10506. "description": "Bad request",
  10507. "content": {
  10508. "application/json": {
  10509. "schema": {
  10510. "$ref": "#/components/schemas/BadRequestError"
  10511. }
  10512. }
  10513. }
  10514. }
  10515. },
  10516. "description": "List all workspaces.",
  10517. "summary": "List workspaces",
  10518. "x-codeSamples": [
  10519. {
  10520. "lang": "js",
  10521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  10522. }
  10523. ]
  10524. },
  10525. "post": {
  10526. "tags": ["workspace"],
  10527. "operationId": "experimental.workspace.create",
  10528. "parameters": [
  10529. {
  10530. "name": "directory",
  10531. "in": "query",
  10532. "schema": {
  10533. "type": "string"
  10534. },
  10535. "required": false
  10536. },
  10537. {
  10538. "name": "workspace",
  10539. "in": "query",
  10540. "schema": {
  10541. "type": "string"
  10542. },
  10543. "required": false
  10544. }
  10545. ],
  10546. "responses": {
  10547. "200": {
  10548. "description": "Workspace created",
  10549. "content": {
  10550. "application/json": {
  10551. "schema": {
  10552. "$ref": "#/components/schemas/Workspace"
  10553. }
  10554. }
  10555. }
  10556. },
  10557. "400": {
  10558. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  10559. "content": {
  10560. "application/json": {
  10561. "schema": {
  10562. "anyOf": [
  10563. {
  10564. "$ref": "#/components/schemas/WorkspaceCreateError"
  10565. },
  10566. {
  10567. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10568. },
  10569. {
  10570. "$ref": "#/components/schemas/InvalidRequestError"
  10571. }
  10572. ]
  10573. }
  10574. }
  10575. }
  10576. }
  10577. },
  10578. "description": "Create a workspace for the current project.",
  10579. "summary": "Create workspace",
  10580. "requestBody": {
  10581. "content": {
  10582. "application/json": {
  10583. "schema": {
  10584. "type": "object",
  10585. "properties": {
  10586. "id": {
  10587. "type": "string",
  10588. "pattern": "^wrk"
  10589. },
  10590. "type": {
  10591. "type": "string"
  10592. },
  10593. "branch": {
  10594. "anyOf": [
  10595. {
  10596. "type": "string"
  10597. },
  10598. {
  10599. "type": "null"
  10600. }
  10601. ]
  10602. },
  10603. "extra": {
  10604. "anyOf": [
  10605. {},
  10606. {
  10607. "type": "null"
  10608. }
  10609. ]
  10610. }
  10611. },
  10612. "required": ["type"],
  10613. "additionalProperties": false
  10614. }
  10615. }
  10616. }
  10617. },
  10618. "x-codeSamples": [
  10619. {
  10620. "lang": "js",
  10621. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10622. }
  10623. ]
  10624. }
  10625. },
  10626. "/experimental/workspace/sync-list": {
  10627. "post": {
  10628. "tags": ["workspace"],
  10629. "operationId": "experimental.workspace.syncList",
  10630. "parameters": [
  10631. {
  10632. "name": "directory",
  10633. "in": "query",
  10634. "schema": {
  10635. "type": "string"
  10636. },
  10637. "required": false
  10638. },
  10639. {
  10640. "name": "workspace",
  10641. "in": "query",
  10642. "schema": {
  10643. "type": "string"
  10644. },
  10645. "required": false
  10646. }
  10647. ],
  10648. "responses": {
  10649. "204": {
  10650. "description": "Workspace list synced"
  10651. },
  10652. "400": {
  10653. "description": "Bad request",
  10654. "content": {
  10655. "application/json": {
  10656. "schema": {
  10657. "$ref": "#/components/schemas/BadRequestError"
  10658. }
  10659. }
  10660. }
  10661. }
  10662. },
  10663. "description": "Register missing workspaces returned by workspace adapters.",
  10664. "summary": "Sync workspace list",
  10665. "x-codeSamples": [
  10666. {
  10667. "lang": "js",
  10668. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10669. }
  10670. ]
  10671. }
  10672. },
  10673. "/experimental/workspace/status": {
  10674. "get": {
  10675. "tags": ["workspace"],
  10676. "operationId": "experimental.workspace.status",
  10677. "parameters": [
  10678. {
  10679. "name": "directory",
  10680. "in": "query",
  10681. "schema": {
  10682. "type": "string"
  10683. },
  10684. "required": false
  10685. },
  10686. {
  10687. "name": "workspace",
  10688. "in": "query",
  10689. "schema": {
  10690. "type": "string"
  10691. },
  10692. "required": false
  10693. }
  10694. ],
  10695. "responses": {
  10696. "200": {
  10697. "description": "Workspace status",
  10698. "content": {
  10699. "application/json": {
  10700. "schema": {
  10701. "type": "array",
  10702. "items": {
  10703. "type": "object",
  10704. "properties": {
  10705. "workspaceID": {
  10706. "type": "string",
  10707. "pattern": "^wrk"
  10708. },
  10709. "status": {
  10710. "type": "string",
  10711. "enum": ["connected", "connecting", "disconnected", "error"]
  10712. }
  10713. },
  10714. "required": ["workspaceID", "status"],
  10715. "additionalProperties": false
  10716. },
  10717. "description": "Workspace status"
  10718. }
  10719. }
  10720. }
  10721. },
  10722. "400": {
  10723. "description": "Bad request",
  10724. "content": {
  10725. "application/json": {
  10726. "schema": {
  10727. "$ref": "#/components/schemas/BadRequestError"
  10728. }
  10729. }
  10730. }
  10731. }
  10732. },
  10733. "description": "Get connection status for workspaces in the current project.",
  10734. "summary": "Workspace status",
  10735. "x-codeSamples": [
  10736. {
  10737. "lang": "js",
  10738. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10739. }
  10740. ]
  10741. }
  10742. },
  10743. "/experimental/workspace/{id}": {
  10744. "delete": {
  10745. "tags": ["workspace"],
  10746. "operationId": "experimental.workspace.remove",
  10747. "parameters": [
  10748. {
  10749. "name": "id",
  10750. "in": "path",
  10751. "schema": {
  10752. "type": "string",
  10753. "pattern": "^wrk"
  10754. },
  10755. "required": true
  10756. },
  10757. {
  10758. "name": "directory",
  10759. "in": "query",
  10760. "schema": {
  10761. "type": "string"
  10762. },
  10763. "required": false
  10764. },
  10765. {
  10766. "name": "workspace",
  10767. "in": "query",
  10768. "schema": {
  10769. "type": "string"
  10770. },
  10771. "required": false
  10772. }
  10773. ],
  10774. "responses": {
  10775. "200": {
  10776. "description": "Workspace removed",
  10777. "content": {
  10778. "application/json": {
  10779. "schema": {
  10780. "$ref": "#/components/schemas/Workspace"
  10781. }
  10782. }
  10783. }
  10784. },
  10785. "400": {
  10786. "description": "BadRequest | InvalidRequestError",
  10787. "content": {
  10788. "application/json": {
  10789. "schema": {
  10790. "anyOf": [
  10791. {
  10792. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10793. },
  10794. {
  10795. "$ref": "#/components/schemas/InvalidRequestError"
  10796. }
  10797. ]
  10798. }
  10799. }
  10800. }
  10801. }
  10802. },
  10803. "description": "Remove an existing workspace.",
  10804. "summary": "Remove workspace",
  10805. "x-codeSamples": [
  10806. {
  10807. "lang": "js",
  10808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10809. }
  10810. ]
  10811. }
  10812. },
  10813. "/experimental/workspace/warp": {
  10814. "post": {
  10815. "tags": ["workspace"],
  10816. "operationId": "experimental.workspace.warp",
  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. "204": {
  10837. "description": "Session warped"
  10838. },
  10839. "400": {
  10840. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10841. "content": {
  10842. "application/json": {
  10843. "schema": {
  10844. "anyOf": [
  10845. {
  10846. "$ref": "#/components/schemas/WorkspaceWarpError"
  10847. },
  10848. {
  10849. "$ref": "#/components/schemas/VcsApplyError"
  10850. },
  10851. {
  10852. "$ref": "#/components/schemas/InvalidRequestError"
  10853. }
  10854. ]
  10855. }
  10856. }
  10857. }
  10858. },
  10859. "404": {
  10860. "description": "NotFoundError",
  10861. "content": {
  10862. "application/json": {
  10863. "schema": {
  10864. "$ref": "#/components/schemas/NotFoundError"
  10865. }
  10866. }
  10867. }
  10868. }
  10869. },
  10870. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10871. "summary": "Warp session into workspace",
  10872. "requestBody": {
  10873. "content": {
  10874. "application/json": {
  10875. "schema": {
  10876. "type": "object",
  10877. "properties": {
  10878. "id": {
  10879. "anyOf": [
  10880. {
  10881. "type": "string",
  10882. "pattern": "^wrk"
  10883. },
  10884. {
  10885. "type": "null"
  10886. }
  10887. ]
  10888. },
  10889. "sessionID": {
  10890. "type": "string",
  10891. "pattern": "^ses"
  10892. },
  10893. "copyChanges": {
  10894. "type": "boolean"
  10895. }
  10896. },
  10897. "required": ["id", "sessionID"],
  10898. "additionalProperties": false
  10899. }
  10900. }
  10901. }
  10902. },
  10903. "x-codeSamples": [
  10904. {
  10905. "lang": "js",
  10906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10907. }
  10908. ]
  10909. }
  10910. },
  10911. "/pty/{ptyID}/connect": {
  10912. "get": {
  10913. "tags": ["pty"],
  10914. "operationId": "pty.connect",
  10915. "parameters": [
  10916. {
  10917. "name": "ptyID",
  10918. "in": "path",
  10919. "schema": {
  10920. "type": "string",
  10921. "pattern": "^pty"
  10922. },
  10923. "required": true
  10924. },
  10925. {
  10926. "in": "query",
  10927. "name": "directory",
  10928. "schema": {
  10929. "type": "string"
  10930. }
  10931. },
  10932. {
  10933. "in": "query",
  10934. "name": "workspace",
  10935. "schema": {
  10936. "type": "string"
  10937. }
  10938. },
  10939. {
  10940. "in": "query",
  10941. "name": "cursor",
  10942. "schema": {
  10943. "type": "string"
  10944. }
  10945. },
  10946. {
  10947. "in": "query",
  10948. "name": "ticket",
  10949. "schema": {
  10950. "type": "string"
  10951. }
  10952. }
  10953. ],
  10954. "responses": {
  10955. "200": {
  10956. "description": "Connected session",
  10957. "content": {
  10958. "application/json": {
  10959. "schema": {
  10960. "type": "boolean",
  10961. "description": "Connected session"
  10962. }
  10963. }
  10964. }
  10965. },
  10966. "403": {
  10967. "description": "Forbidden",
  10968. "content": {
  10969. "application/json": {
  10970. "schema": {
  10971. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10972. }
  10973. }
  10974. }
  10975. },
  10976. "404": {
  10977. "description": "Not found",
  10978. "content": {
  10979. "application/json": {
  10980. "schema": {
  10981. "$ref": "#/components/schemas/NotFoundError"
  10982. }
  10983. }
  10984. }
  10985. }
  10986. },
  10987. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10988. "summary": "Connect to PTY session",
  10989. "x-codeSamples": [
  10990. {
  10991. "lang": "js",
  10992. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10993. }
  10994. ]
  10995. }
  10996. }
  10997. },
  10998. "components": {
  10999. "schemas": {
  11000. "Event": {
  11001. "anyOf": [
  11002. {
  11003. "$ref": "#/components/schemas/EventModels-devRefreshed"
  11004. },
  11005. {
  11006. "$ref": "#/components/schemas/EventPluginAdded"
  11007. },
  11008. {
  11009. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  11010. },
  11011. {
  11012. "$ref": "#/components/schemas/EventSessionCreated"
  11013. },
  11014. {
  11015. "$ref": "#/components/schemas/EventSessionUpdated"
  11016. },
  11017. {
  11018. "$ref": "#/components/schemas/EventSessionDeleted"
  11019. },
  11020. {
  11021. "$ref": "#/components/schemas/EventMessageUpdated"
  11022. },
  11023. {
  11024. "$ref": "#/components/schemas/EventMessageRemoved"
  11025. },
  11026. {
  11027. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11028. },
  11029. {
  11030. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11031. },
  11032. {
  11033. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11034. },
  11035. {
  11036. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11037. },
  11038. {
  11039. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11040. },
  11041. {
  11042. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11043. },
  11044. {
  11045. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11046. },
  11047. {
  11048. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11049. },
  11050. {
  11051. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11052. },
  11053. {
  11054. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11055. },
  11056. {
  11057. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11058. },
  11059. {
  11060. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11061. },
  11062. {
  11063. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11064. },
  11065. {
  11066. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11067. },
  11068. {
  11069. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11070. },
  11071. {
  11072. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11073. },
  11074. {
  11075. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11076. },
  11077. {
  11078. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11079. },
  11080. {
  11081. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11082. },
  11083. {
  11084. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11085. },
  11086. {
  11087. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11088. },
  11089. {
  11090. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11091. },
  11092. {
  11093. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11094. },
  11095. {
  11096. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11097. },
  11098. {
  11099. "$ref": "#/components/schemas/EventSessionNextRetried"
  11100. },
  11101. {
  11102. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11103. },
  11104. {
  11105. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11106. },
  11107. {
  11108. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11109. },
  11110. {
  11111. "$ref": "#/components/schemas/EventMessagePartDelta"
  11112. },
  11113. {
  11114. "$ref": "#/components/schemas/EventSessionDiff"
  11115. },
  11116. {
  11117. "$ref": "#/components/schemas/EventSessionError"
  11118. },
  11119. {
  11120. "$ref": "#/components/schemas/EventInstallationUpdated"
  11121. },
  11122. {
  11123. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11124. },
  11125. {
  11126. "$ref": "#/components/schemas/EventPermissionV2Asked"
  11127. },
  11128. {
  11129. "$ref": "#/components/schemas/EventPermissionV2Replied"
  11130. },
  11131. {
  11132. "$ref": "#/components/schemas/EventFileEdited"
  11133. },
  11134. {
  11135. "$ref": "#/components/schemas/EventAccountAdded"
  11136. },
  11137. {
  11138. "$ref": "#/components/schemas/EventAccountRemoved"
  11139. },
  11140. {
  11141. "$ref": "#/components/schemas/EventAccountSwitched"
  11142. },
  11143. {
  11144. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11145. },
  11146. {
  11147. "$ref": "#/components/schemas/EventLspUpdated"
  11148. },
  11149. {
  11150. "$ref": "#/components/schemas/EventPermissionAsked"
  11151. },
  11152. {
  11153. "$ref": "#/components/schemas/EventPermissionReplied"
  11154. },
  11155. {
  11156. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11157. },
  11158. {
  11159. "$ref": "#/components/schemas/Event.tui.command.execute"
  11160. },
  11161. {
  11162. "$ref": "#/components/schemas/Event.tui.toast.show"
  11163. },
  11164. {
  11165. "$ref": "#/components/schemas/Event.tui.session.select"
  11166. },
  11167. {
  11168. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11169. },
  11170. {
  11171. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11172. },
  11173. {
  11174. "$ref": "#/components/schemas/EventCommandExecuted"
  11175. },
  11176. {
  11177. "$ref": "#/components/schemas/EventProjectUpdated"
  11178. },
  11179. {
  11180. "$ref": "#/components/schemas/EventPtyCreated"
  11181. },
  11182. {
  11183. "$ref": "#/components/schemas/EventPtyUpdated"
  11184. },
  11185. {
  11186. "$ref": "#/components/schemas/EventPtyExited"
  11187. },
  11188. {
  11189. "$ref": "#/components/schemas/EventPtyDeleted"
  11190. },
  11191. {
  11192. "$ref": "#/components/schemas/EventQuestionAsked"
  11193. },
  11194. {
  11195. "$ref": "#/components/schemas/EventQuestionReplied"
  11196. },
  11197. {
  11198. "$ref": "#/components/schemas/EventQuestionRejected"
  11199. },
  11200. {
  11201. "$ref": "#/components/schemas/EventSessionStatus"
  11202. },
  11203. {
  11204. "$ref": "#/components/schemas/EventSessionIdle"
  11205. },
  11206. {
  11207. "$ref": "#/components/schemas/EventSessionCompacted"
  11208. },
  11209. {
  11210. "$ref": "#/components/schemas/EventTodoUpdated"
  11211. },
  11212. {
  11213. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11214. },
  11215. {
  11216. "$ref": "#/components/schemas/EventWorktreeReady"
  11217. },
  11218. {
  11219. "$ref": "#/components/schemas/EventWorktreeFailed"
  11220. },
  11221. {
  11222. "$ref": "#/components/schemas/EventWorkspaceReady"
  11223. },
  11224. {
  11225. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11226. },
  11227. {
  11228. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11229. },
  11230. {
  11231. "$ref": "#/components/schemas/EventServerConnected"
  11232. },
  11233. {
  11234. "$ref": "#/components/schemas/EventGlobalDisposed"
  11235. },
  11236. {
  11237. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11238. }
  11239. ]
  11240. },
  11241. "QuestionReplied": {
  11242. "type": "object",
  11243. "properties": {
  11244. "sessionID": {
  11245. "type": "string",
  11246. "pattern": "^ses"
  11247. },
  11248. "requestID": {
  11249. "type": "string",
  11250. "pattern": "^que"
  11251. },
  11252. "answers": {
  11253. "type": "array",
  11254. "items": {
  11255. "$ref": "#/components/schemas/QuestionAnswer"
  11256. }
  11257. }
  11258. },
  11259. "required": ["sessionID", "requestID", "answers"],
  11260. "additionalProperties": false
  11261. },
  11262. "QuestionRejected": {
  11263. "type": "object",
  11264. "properties": {
  11265. "sessionID": {
  11266. "type": "string",
  11267. "pattern": "^ses"
  11268. },
  11269. "requestID": {
  11270. "type": "string",
  11271. "pattern": "^que"
  11272. }
  11273. },
  11274. "required": ["sessionID", "requestID"],
  11275. "additionalProperties": false
  11276. },
  11277. "OAuth": {
  11278. "type": "object",
  11279. "properties": {
  11280. "type": {
  11281. "type": "string",
  11282. "enum": ["oauth"]
  11283. },
  11284. "refresh": {
  11285. "type": "string"
  11286. },
  11287. "access": {
  11288. "type": "string"
  11289. },
  11290. "expires": {
  11291. "type": "integer",
  11292. "minimum": 0
  11293. },
  11294. "accountId": {
  11295. "type": "string"
  11296. },
  11297. "enterpriseUrl": {
  11298. "type": "string"
  11299. }
  11300. },
  11301. "required": ["type", "refresh", "access", "expires"],
  11302. "additionalProperties": false
  11303. },
  11304. "ApiAuth": {
  11305. "type": "object",
  11306. "properties": {
  11307. "type": {
  11308. "type": "string",
  11309. "enum": ["api"]
  11310. },
  11311. "key": {
  11312. "type": "string"
  11313. },
  11314. "metadata": {
  11315. "type": "object",
  11316. "additionalProperties": {
  11317. "type": "string"
  11318. }
  11319. }
  11320. },
  11321. "required": ["type", "key"],
  11322. "additionalProperties": false
  11323. },
  11324. "WellKnownAuth": {
  11325. "type": "object",
  11326. "properties": {
  11327. "type": {
  11328. "type": "string",
  11329. "enum": ["wellknown"]
  11330. },
  11331. "key": {
  11332. "type": "string"
  11333. },
  11334. "token": {
  11335. "type": "string"
  11336. }
  11337. },
  11338. "required": ["type", "key", "token"],
  11339. "additionalProperties": false
  11340. },
  11341. "Auth": {
  11342. "anyOf": [
  11343. {
  11344. "$ref": "#/components/schemas/OAuth"
  11345. },
  11346. {
  11347. "$ref": "#/components/schemas/ApiAuth"
  11348. },
  11349. {
  11350. "$ref": "#/components/schemas/WellKnownAuth"
  11351. }
  11352. ]
  11353. },
  11354. "effect_HttpApiError_BadRequest": {
  11355. "type": "object",
  11356. "properties": {
  11357. "_tag": {
  11358. "type": "string",
  11359. "enum": ["BadRequest"]
  11360. }
  11361. },
  11362. "required": ["_tag"],
  11363. "additionalProperties": false
  11364. },
  11365. "InvalidRequestError": {
  11366. "type": "object",
  11367. "properties": {
  11368. "_tag": {
  11369. "type": "string",
  11370. "enum": ["InvalidRequestError"]
  11371. },
  11372. "message": {
  11373. "type": "string"
  11374. },
  11375. "kind": {
  11376. "type": "string"
  11377. },
  11378. "field": {
  11379. "type": "string"
  11380. }
  11381. },
  11382. "required": ["_tag", "message"],
  11383. "additionalProperties": false
  11384. },
  11385. "SnapshotFileDiff": {
  11386. "type": "object",
  11387. "properties": {
  11388. "file": {
  11389. "type": "string"
  11390. },
  11391. "patch": {
  11392. "type": "string"
  11393. },
  11394. "additions": {
  11395. "type": "number"
  11396. },
  11397. "deletions": {
  11398. "type": "number"
  11399. },
  11400. "status": {
  11401. "type": "string",
  11402. "enum": ["added", "deleted", "modified"]
  11403. }
  11404. },
  11405. "required": ["additions", "deletions"],
  11406. "additionalProperties": false
  11407. },
  11408. "PermissionAction": {
  11409. "type": "string",
  11410. "enum": ["allow", "deny", "ask"]
  11411. },
  11412. "PermissionRule": {
  11413. "type": "object",
  11414. "properties": {
  11415. "permission": {
  11416. "type": "string"
  11417. },
  11418. "pattern": {
  11419. "type": "string"
  11420. },
  11421. "action": {
  11422. "$ref": "#/components/schemas/PermissionAction"
  11423. }
  11424. },
  11425. "required": ["permission", "pattern", "action"],
  11426. "additionalProperties": false
  11427. },
  11428. "PermissionRuleset": {
  11429. "type": "array",
  11430. "items": {
  11431. "$ref": "#/components/schemas/PermissionRule"
  11432. }
  11433. },
  11434. "Session": {
  11435. "type": "object",
  11436. "properties": {
  11437. "id": {
  11438. "type": "string",
  11439. "pattern": "^ses"
  11440. },
  11441. "slug": {
  11442. "type": "string"
  11443. },
  11444. "projectID": {
  11445. "type": "string"
  11446. },
  11447. "workspaceID": {
  11448. "type": "string",
  11449. "pattern": "^wrk"
  11450. },
  11451. "directory": {
  11452. "type": "string"
  11453. },
  11454. "path": {
  11455. "type": "string"
  11456. },
  11457. "parentID": {
  11458. "type": "string",
  11459. "pattern": "^ses"
  11460. },
  11461. "summary": {
  11462. "type": "object",
  11463. "properties": {
  11464. "additions": {
  11465. "type": "number"
  11466. },
  11467. "deletions": {
  11468. "type": "number"
  11469. },
  11470. "files": {
  11471. "type": "number"
  11472. },
  11473. "diffs": {
  11474. "type": "array",
  11475. "items": {
  11476. "$ref": "#/components/schemas/SnapshotFileDiff"
  11477. }
  11478. }
  11479. },
  11480. "required": ["additions", "deletions", "files"],
  11481. "additionalProperties": false
  11482. },
  11483. "cost": {
  11484. "type": "number"
  11485. },
  11486. "tokens": {
  11487. "type": "object",
  11488. "properties": {
  11489. "input": {
  11490. "type": "number"
  11491. },
  11492. "output": {
  11493. "type": "number"
  11494. },
  11495. "reasoning": {
  11496. "type": "number"
  11497. },
  11498. "cache": {
  11499. "type": "object",
  11500. "properties": {
  11501. "read": {
  11502. "type": "number"
  11503. },
  11504. "write": {
  11505. "type": "number"
  11506. }
  11507. },
  11508. "required": ["read", "write"],
  11509. "additionalProperties": false
  11510. }
  11511. },
  11512. "required": ["input", "output", "reasoning", "cache"],
  11513. "additionalProperties": false
  11514. },
  11515. "share": {
  11516. "type": "object",
  11517. "properties": {
  11518. "url": {
  11519. "type": "string"
  11520. }
  11521. },
  11522. "required": ["url"],
  11523. "additionalProperties": false
  11524. },
  11525. "title": {
  11526. "type": "string"
  11527. },
  11528. "agent": {
  11529. "type": "string"
  11530. },
  11531. "model": {
  11532. "type": "object",
  11533. "properties": {
  11534. "id": {
  11535. "type": "string"
  11536. },
  11537. "providerID": {
  11538. "type": "string"
  11539. },
  11540. "variant": {
  11541. "type": "string"
  11542. }
  11543. },
  11544. "required": ["id", "providerID"],
  11545. "additionalProperties": false
  11546. },
  11547. "version": {
  11548. "type": "string"
  11549. },
  11550. "metadata": {
  11551. "type": "object"
  11552. },
  11553. "time": {
  11554. "type": "object",
  11555. "properties": {
  11556. "created": {
  11557. "type": "integer",
  11558. "minimum": 0
  11559. },
  11560. "updated": {
  11561. "type": "integer",
  11562. "minimum": 0
  11563. },
  11564. "compacting": {
  11565. "type": "integer",
  11566. "minimum": 0
  11567. },
  11568. "archived": {
  11569. "type": "number"
  11570. }
  11571. },
  11572. "required": ["created", "updated"],
  11573. "additionalProperties": false
  11574. },
  11575. "permission": {
  11576. "$ref": "#/components/schemas/PermissionRuleset"
  11577. },
  11578. "revert": {
  11579. "type": "object",
  11580. "properties": {
  11581. "messageID": {
  11582. "type": "string",
  11583. "pattern": "^msg"
  11584. },
  11585. "partID": {
  11586. "type": "string",
  11587. "pattern": "^prt"
  11588. },
  11589. "snapshot": {
  11590. "type": "string"
  11591. },
  11592. "diff": {
  11593. "type": "string"
  11594. }
  11595. },
  11596. "required": ["messageID"],
  11597. "additionalProperties": false
  11598. }
  11599. },
  11600. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11601. "additionalProperties": false
  11602. },
  11603. "OutputFormatText": {
  11604. "type": "object",
  11605. "properties": {
  11606. "type": {
  11607. "type": "string",
  11608. "enum": ["text"]
  11609. }
  11610. },
  11611. "required": ["type"],
  11612. "additionalProperties": false
  11613. },
  11614. "JSONSchema": {
  11615. "type": "object"
  11616. },
  11617. "OutputFormatJsonSchema": {
  11618. "type": "object",
  11619. "properties": {
  11620. "type": {
  11621. "type": "string",
  11622. "enum": ["json_schema"]
  11623. },
  11624. "schema": {
  11625. "$ref": "#/components/schemas/JSONSchema"
  11626. },
  11627. "retryCount": {
  11628. "type": "integer",
  11629. "minimum": 0
  11630. }
  11631. },
  11632. "required": ["type", "schema"],
  11633. "additionalProperties": false
  11634. },
  11635. "OutputFormat": {
  11636. "anyOf": [
  11637. {
  11638. "$ref": "#/components/schemas/OutputFormatText"
  11639. },
  11640. {
  11641. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11642. }
  11643. ]
  11644. },
  11645. "UserMessage": {
  11646. "type": "object",
  11647. "properties": {
  11648. "id": {
  11649. "type": "string",
  11650. "pattern": "^msg"
  11651. },
  11652. "sessionID": {
  11653. "type": "string",
  11654. "pattern": "^ses"
  11655. },
  11656. "role": {
  11657. "type": "string",
  11658. "enum": ["user"]
  11659. },
  11660. "time": {
  11661. "type": "object",
  11662. "properties": {
  11663. "created": {
  11664. "type": "integer",
  11665. "minimum": 0
  11666. }
  11667. },
  11668. "required": ["created"],
  11669. "additionalProperties": false
  11670. },
  11671. "format": {
  11672. "$ref": "#/components/schemas/OutputFormat"
  11673. },
  11674. "summary": {
  11675. "type": "object",
  11676. "properties": {
  11677. "title": {
  11678. "type": "string"
  11679. },
  11680. "body": {
  11681. "type": "string"
  11682. },
  11683. "diffs": {
  11684. "type": "array",
  11685. "items": {
  11686. "$ref": "#/components/schemas/SnapshotFileDiff"
  11687. }
  11688. }
  11689. },
  11690. "required": ["diffs"],
  11691. "additionalProperties": false
  11692. },
  11693. "agent": {
  11694. "type": "string"
  11695. },
  11696. "model": {
  11697. "type": "object",
  11698. "properties": {
  11699. "providerID": {
  11700. "type": "string"
  11701. },
  11702. "modelID": {
  11703. "type": "string"
  11704. },
  11705. "variant": {
  11706. "type": "string"
  11707. }
  11708. },
  11709. "required": ["providerID", "modelID"],
  11710. "additionalProperties": false
  11711. },
  11712. "system": {
  11713. "type": "string"
  11714. },
  11715. "tools": {
  11716. "type": "object",
  11717. "additionalProperties": {
  11718. "type": "boolean"
  11719. }
  11720. }
  11721. },
  11722. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11723. "additionalProperties": false
  11724. },
  11725. "ProviderAuthError": {
  11726. "type": "object",
  11727. "properties": {
  11728. "name": {
  11729. "type": "string",
  11730. "enum": ["ProviderAuthError"]
  11731. },
  11732. "data": {
  11733. "type": "object",
  11734. "properties": {
  11735. "providerID": {
  11736. "type": "string"
  11737. },
  11738. "message": {
  11739. "type": "string"
  11740. }
  11741. },
  11742. "required": ["providerID", "message"],
  11743. "additionalProperties": false
  11744. }
  11745. },
  11746. "required": ["name", "data"],
  11747. "additionalProperties": false
  11748. },
  11749. "UnknownError": {
  11750. "type": "object",
  11751. "properties": {
  11752. "name": {
  11753. "type": "string",
  11754. "enum": ["UnknownError"]
  11755. },
  11756. "data": {
  11757. "type": "object",
  11758. "properties": {
  11759. "message": {
  11760. "type": "string"
  11761. },
  11762. "ref": {
  11763. "type": "string"
  11764. }
  11765. },
  11766. "required": ["message"],
  11767. "additionalProperties": false
  11768. }
  11769. },
  11770. "required": ["name", "data"],
  11771. "additionalProperties": false
  11772. },
  11773. "MessageOutputLengthError": {
  11774. "type": "object",
  11775. "properties": {
  11776. "name": {
  11777. "type": "string",
  11778. "enum": ["MessageOutputLengthError"]
  11779. },
  11780. "data": {
  11781. "type": "object",
  11782. "properties": {}
  11783. }
  11784. },
  11785. "required": ["name", "data"],
  11786. "additionalProperties": false
  11787. },
  11788. "MessageAbortedError": {
  11789. "type": "object",
  11790. "properties": {
  11791. "name": {
  11792. "type": "string",
  11793. "enum": ["MessageAbortedError"]
  11794. },
  11795. "data": {
  11796. "type": "object",
  11797. "properties": {
  11798. "message": {
  11799. "type": "string"
  11800. }
  11801. },
  11802. "required": ["message"],
  11803. "additionalProperties": false
  11804. }
  11805. },
  11806. "required": ["name", "data"],
  11807. "additionalProperties": false
  11808. },
  11809. "StructuredOutputError": {
  11810. "type": "object",
  11811. "properties": {
  11812. "name": {
  11813. "type": "string",
  11814. "enum": ["StructuredOutputError"]
  11815. },
  11816. "data": {
  11817. "type": "object",
  11818. "properties": {
  11819. "message": {
  11820. "type": "string"
  11821. },
  11822. "retries": {
  11823. "type": "integer",
  11824. "minimum": 0
  11825. }
  11826. },
  11827. "required": ["message", "retries"],
  11828. "additionalProperties": false
  11829. }
  11830. },
  11831. "required": ["name", "data"],
  11832. "additionalProperties": false
  11833. },
  11834. "ContextOverflowError": {
  11835. "type": "object",
  11836. "properties": {
  11837. "name": {
  11838. "type": "string",
  11839. "enum": ["ContextOverflowError"]
  11840. },
  11841. "data": {
  11842. "type": "object",
  11843. "properties": {
  11844. "message": {
  11845. "type": "string"
  11846. },
  11847. "responseBody": {
  11848. "type": "string"
  11849. }
  11850. },
  11851. "required": ["message"],
  11852. "additionalProperties": false
  11853. }
  11854. },
  11855. "required": ["name", "data"],
  11856. "additionalProperties": false
  11857. },
  11858. "APIError": {
  11859. "type": "object",
  11860. "properties": {
  11861. "name": {
  11862. "type": "string",
  11863. "enum": ["APIError"]
  11864. },
  11865. "data": {
  11866. "type": "object",
  11867. "properties": {
  11868. "message": {
  11869. "type": "string"
  11870. },
  11871. "statusCode": {
  11872. "type": "integer",
  11873. "minimum": 0
  11874. },
  11875. "isRetryable": {
  11876. "type": "boolean"
  11877. },
  11878. "responseHeaders": {
  11879. "type": "object",
  11880. "additionalProperties": {
  11881. "type": "string"
  11882. }
  11883. },
  11884. "responseBody": {
  11885. "type": "string"
  11886. },
  11887. "metadata": {
  11888. "type": "object",
  11889. "additionalProperties": {
  11890. "type": "string"
  11891. }
  11892. }
  11893. },
  11894. "required": ["message", "isRetryable"],
  11895. "additionalProperties": false
  11896. }
  11897. },
  11898. "required": ["name", "data"],
  11899. "additionalProperties": false
  11900. },
  11901. "AssistantMessage": {
  11902. "type": "object",
  11903. "properties": {
  11904. "id": {
  11905. "type": "string",
  11906. "pattern": "^msg"
  11907. },
  11908. "sessionID": {
  11909. "type": "string",
  11910. "pattern": "^ses"
  11911. },
  11912. "role": {
  11913. "type": "string",
  11914. "enum": ["assistant"]
  11915. },
  11916. "time": {
  11917. "type": "object",
  11918. "properties": {
  11919. "created": {
  11920. "type": "integer",
  11921. "minimum": 0
  11922. },
  11923. "completed": {
  11924. "type": "integer",
  11925. "minimum": 0
  11926. }
  11927. },
  11928. "required": ["created"],
  11929. "additionalProperties": false
  11930. },
  11931. "error": {
  11932. "anyOf": [
  11933. {
  11934. "$ref": "#/components/schemas/ProviderAuthError"
  11935. },
  11936. {
  11937. "$ref": "#/components/schemas/UnknownError"
  11938. },
  11939. {
  11940. "$ref": "#/components/schemas/MessageOutputLengthError"
  11941. },
  11942. {
  11943. "$ref": "#/components/schemas/MessageAbortedError"
  11944. },
  11945. {
  11946. "$ref": "#/components/schemas/StructuredOutputError"
  11947. },
  11948. {
  11949. "$ref": "#/components/schemas/ContextOverflowError"
  11950. },
  11951. {
  11952. "$ref": "#/components/schemas/APIError"
  11953. }
  11954. ]
  11955. },
  11956. "parentID": {
  11957. "type": "string",
  11958. "pattern": "^msg"
  11959. },
  11960. "modelID": {
  11961. "type": "string"
  11962. },
  11963. "providerID": {
  11964. "type": "string"
  11965. },
  11966. "mode": {
  11967. "type": "string"
  11968. },
  11969. "agent": {
  11970. "type": "string"
  11971. },
  11972. "path": {
  11973. "type": "object",
  11974. "properties": {
  11975. "cwd": {
  11976. "type": "string"
  11977. },
  11978. "root": {
  11979. "type": "string"
  11980. }
  11981. },
  11982. "required": ["cwd", "root"],
  11983. "additionalProperties": false
  11984. },
  11985. "summary": {
  11986. "type": "boolean"
  11987. },
  11988. "cost": {
  11989. "type": "number"
  11990. },
  11991. "tokens": {
  11992. "type": "object",
  11993. "properties": {
  11994. "total": {
  11995. "type": "number"
  11996. },
  11997. "input": {
  11998. "type": "number"
  11999. },
  12000. "output": {
  12001. "type": "number"
  12002. },
  12003. "reasoning": {
  12004. "type": "number"
  12005. },
  12006. "cache": {
  12007. "type": "object",
  12008. "properties": {
  12009. "read": {
  12010. "type": "number"
  12011. },
  12012. "write": {
  12013. "type": "number"
  12014. }
  12015. },
  12016. "required": ["read", "write"],
  12017. "additionalProperties": false
  12018. }
  12019. },
  12020. "required": ["input", "output", "reasoning", "cache"],
  12021. "additionalProperties": false
  12022. },
  12023. "structured": {},
  12024. "variant": {
  12025. "type": "string"
  12026. },
  12027. "finish": {
  12028. "type": "string"
  12029. }
  12030. },
  12031. "required": [
  12032. "id",
  12033. "sessionID",
  12034. "role",
  12035. "time",
  12036. "parentID",
  12037. "modelID",
  12038. "providerID",
  12039. "mode",
  12040. "agent",
  12041. "path",
  12042. "cost",
  12043. "tokens"
  12044. ],
  12045. "additionalProperties": false
  12046. },
  12047. "Message": {
  12048. "anyOf": [
  12049. {
  12050. "$ref": "#/components/schemas/UserMessage"
  12051. },
  12052. {
  12053. "$ref": "#/components/schemas/AssistantMessage"
  12054. }
  12055. ]
  12056. },
  12057. "TextPart": {
  12058. "type": "object",
  12059. "properties": {
  12060. "id": {
  12061. "type": "string",
  12062. "pattern": "^prt"
  12063. },
  12064. "sessionID": {
  12065. "type": "string",
  12066. "pattern": "^ses"
  12067. },
  12068. "messageID": {
  12069. "type": "string",
  12070. "pattern": "^msg"
  12071. },
  12072. "type": {
  12073. "type": "string",
  12074. "enum": ["text"]
  12075. },
  12076. "text": {
  12077. "type": "string"
  12078. },
  12079. "synthetic": {
  12080. "type": "boolean"
  12081. },
  12082. "ignored": {
  12083. "type": "boolean"
  12084. },
  12085. "time": {
  12086. "type": "object",
  12087. "properties": {
  12088. "start": {
  12089. "type": "integer",
  12090. "minimum": 0
  12091. },
  12092. "end": {
  12093. "type": "integer",
  12094. "minimum": 0
  12095. }
  12096. },
  12097. "required": ["start"],
  12098. "additionalProperties": false
  12099. },
  12100. "metadata": {
  12101. "type": "object"
  12102. }
  12103. },
  12104. "required": ["id", "sessionID", "messageID", "type", "text"],
  12105. "additionalProperties": false
  12106. },
  12107. "SubtaskPart": {
  12108. "type": "object",
  12109. "properties": {
  12110. "id": {
  12111. "type": "string",
  12112. "pattern": "^prt"
  12113. },
  12114. "sessionID": {
  12115. "type": "string",
  12116. "pattern": "^ses"
  12117. },
  12118. "messageID": {
  12119. "type": "string",
  12120. "pattern": "^msg"
  12121. },
  12122. "type": {
  12123. "type": "string",
  12124. "enum": ["subtask"]
  12125. },
  12126. "prompt": {
  12127. "type": "string"
  12128. },
  12129. "description": {
  12130. "type": "string"
  12131. },
  12132. "agent": {
  12133. "type": "string"
  12134. },
  12135. "model": {
  12136. "type": "object",
  12137. "properties": {
  12138. "providerID": {
  12139. "type": "string"
  12140. },
  12141. "modelID": {
  12142. "type": "string"
  12143. }
  12144. },
  12145. "required": ["providerID", "modelID"],
  12146. "additionalProperties": false
  12147. },
  12148. "command": {
  12149. "type": "string"
  12150. }
  12151. },
  12152. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  12153. "additionalProperties": false
  12154. },
  12155. "ReasoningPart": {
  12156. "type": "object",
  12157. "properties": {
  12158. "id": {
  12159. "type": "string",
  12160. "pattern": "^prt"
  12161. },
  12162. "sessionID": {
  12163. "type": "string",
  12164. "pattern": "^ses"
  12165. },
  12166. "messageID": {
  12167. "type": "string",
  12168. "pattern": "^msg"
  12169. },
  12170. "type": {
  12171. "type": "string",
  12172. "enum": ["reasoning"]
  12173. },
  12174. "text": {
  12175. "type": "string"
  12176. },
  12177. "metadata": {
  12178. "type": "object"
  12179. },
  12180. "time": {
  12181. "type": "object",
  12182. "properties": {
  12183. "start": {
  12184. "type": "integer",
  12185. "minimum": 0
  12186. },
  12187. "end": {
  12188. "type": "integer",
  12189. "minimum": 0
  12190. }
  12191. },
  12192. "required": ["start"],
  12193. "additionalProperties": false
  12194. }
  12195. },
  12196. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  12197. "additionalProperties": false
  12198. },
  12199. "FilePartSourceText": {
  12200. "type": "object",
  12201. "properties": {
  12202. "value": {
  12203. "type": "string"
  12204. },
  12205. "start": {
  12206. "type": "number"
  12207. },
  12208. "end": {
  12209. "type": "number"
  12210. }
  12211. },
  12212. "required": ["value", "start", "end"],
  12213. "additionalProperties": false
  12214. },
  12215. "FileSource": {
  12216. "type": "object",
  12217. "properties": {
  12218. "text": {
  12219. "$ref": "#/components/schemas/FilePartSourceText"
  12220. },
  12221. "type": {
  12222. "type": "string",
  12223. "enum": ["file"]
  12224. },
  12225. "path": {
  12226. "type": "string"
  12227. }
  12228. },
  12229. "required": ["text", "type", "path"],
  12230. "additionalProperties": false
  12231. },
  12232. "Range": {
  12233. "type": "object",
  12234. "properties": {
  12235. "start": {
  12236. "type": "object",
  12237. "properties": {
  12238. "line": {
  12239. "type": "integer",
  12240. "minimum": 0
  12241. },
  12242. "character": {
  12243. "type": "integer",
  12244. "minimum": 0
  12245. }
  12246. },
  12247. "required": ["line", "character"],
  12248. "additionalProperties": false
  12249. },
  12250. "end": {
  12251. "type": "object",
  12252. "properties": {
  12253. "line": {
  12254. "type": "integer",
  12255. "minimum": 0
  12256. },
  12257. "character": {
  12258. "type": "integer",
  12259. "minimum": 0
  12260. }
  12261. },
  12262. "required": ["line", "character"],
  12263. "additionalProperties": false
  12264. }
  12265. },
  12266. "required": ["start", "end"],
  12267. "additionalProperties": false
  12268. },
  12269. "SymbolSource": {
  12270. "type": "object",
  12271. "properties": {
  12272. "text": {
  12273. "$ref": "#/components/schemas/FilePartSourceText"
  12274. },
  12275. "type": {
  12276. "type": "string",
  12277. "enum": ["symbol"]
  12278. },
  12279. "path": {
  12280. "type": "string"
  12281. },
  12282. "range": {
  12283. "$ref": "#/components/schemas/Range"
  12284. },
  12285. "name": {
  12286. "type": "string"
  12287. },
  12288. "kind": {
  12289. "type": "integer",
  12290. "minimum": 0
  12291. }
  12292. },
  12293. "required": ["text", "type", "path", "range", "name", "kind"],
  12294. "additionalProperties": false
  12295. },
  12296. "ResourceSource": {
  12297. "type": "object",
  12298. "properties": {
  12299. "text": {
  12300. "$ref": "#/components/schemas/FilePartSourceText"
  12301. },
  12302. "type": {
  12303. "type": "string",
  12304. "enum": ["resource"]
  12305. },
  12306. "clientName": {
  12307. "type": "string"
  12308. },
  12309. "uri": {
  12310. "type": "string"
  12311. }
  12312. },
  12313. "required": ["text", "type", "clientName", "uri"],
  12314. "additionalProperties": false
  12315. },
  12316. "FilePartSource": {
  12317. "anyOf": [
  12318. {
  12319. "$ref": "#/components/schemas/FileSource"
  12320. },
  12321. {
  12322. "$ref": "#/components/schemas/SymbolSource"
  12323. },
  12324. {
  12325. "$ref": "#/components/schemas/ResourceSource"
  12326. }
  12327. ]
  12328. },
  12329. "FilePart": {
  12330. "type": "object",
  12331. "properties": {
  12332. "id": {
  12333. "type": "string",
  12334. "pattern": "^prt"
  12335. },
  12336. "sessionID": {
  12337. "type": "string",
  12338. "pattern": "^ses"
  12339. },
  12340. "messageID": {
  12341. "type": "string",
  12342. "pattern": "^msg"
  12343. },
  12344. "type": {
  12345. "type": "string",
  12346. "enum": ["file"]
  12347. },
  12348. "mime": {
  12349. "type": "string"
  12350. },
  12351. "filename": {
  12352. "type": "string"
  12353. },
  12354. "url": {
  12355. "type": "string"
  12356. },
  12357. "source": {
  12358. "$ref": "#/components/schemas/FilePartSource"
  12359. }
  12360. },
  12361. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12362. "additionalProperties": false
  12363. },
  12364. "ToolStatePending": {
  12365. "type": "object",
  12366. "properties": {
  12367. "status": {
  12368. "type": "string",
  12369. "enum": ["pending"]
  12370. },
  12371. "input": {
  12372. "type": "object"
  12373. },
  12374. "raw": {
  12375. "type": "string"
  12376. }
  12377. },
  12378. "required": ["status", "input", "raw"],
  12379. "additionalProperties": false
  12380. },
  12381. "ToolStateRunning": {
  12382. "type": "object",
  12383. "properties": {
  12384. "status": {
  12385. "type": "string",
  12386. "enum": ["running"]
  12387. },
  12388. "input": {
  12389. "type": "object"
  12390. },
  12391. "title": {
  12392. "type": "string"
  12393. },
  12394. "metadata": {
  12395. "type": "object"
  12396. },
  12397. "time": {
  12398. "type": "object",
  12399. "properties": {
  12400. "start": {
  12401. "type": "integer",
  12402. "minimum": 0
  12403. }
  12404. },
  12405. "required": ["start"],
  12406. "additionalProperties": false
  12407. }
  12408. },
  12409. "required": ["status", "input", "time"],
  12410. "additionalProperties": false
  12411. },
  12412. "ToolStateCompleted": {
  12413. "type": "object",
  12414. "properties": {
  12415. "status": {
  12416. "type": "string",
  12417. "enum": ["completed"]
  12418. },
  12419. "input": {
  12420. "type": "object"
  12421. },
  12422. "output": {
  12423. "type": "string"
  12424. },
  12425. "title": {
  12426. "type": "string"
  12427. },
  12428. "metadata": {
  12429. "type": "object"
  12430. },
  12431. "time": {
  12432. "type": "object",
  12433. "properties": {
  12434. "start": {
  12435. "type": "integer",
  12436. "minimum": 0
  12437. },
  12438. "end": {
  12439. "type": "integer",
  12440. "minimum": 0
  12441. },
  12442. "compacted": {
  12443. "type": "integer",
  12444. "minimum": 0
  12445. }
  12446. },
  12447. "required": ["start", "end"],
  12448. "additionalProperties": false
  12449. },
  12450. "attachments": {
  12451. "type": "array",
  12452. "items": {
  12453. "$ref": "#/components/schemas/FilePart"
  12454. }
  12455. }
  12456. },
  12457. "required": ["status", "input", "output", "title", "metadata", "time"],
  12458. "additionalProperties": false
  12459. },
  12460. "ToolStateError": {
  12461. "type": "object",
  12462. "properties": {
  12463. "status": {
  12464. "type": "string",
  12465. "enum": ["error"]
  12466. },
  12467. "input": {
  12468. "type": "object"
  12469. },
  12470. "error": {
  12471. "type": "string"
  12472. },
  12473. "metadata": {
  12474. "type": "object"
  12475. },
  12476. "time": {
  12477. "type": "object",
  12478. "properties": {
  12479. "start": {
  12480. "type": "integer",
  12481. "minimum": 0
  12482. },
  12483. "end": {
  12484. "type": "integer",
  12485. "minimum": 0
  12486. }
  12487. },
  12488. "required": ["start", "end"],
  12489. "additionalProperties": false
  12490. }
  12491. },
  12492. "required": ["status", "input", "error", "time"],
  12493. "additionalProperties": false
  12494. },
  12495. "ToolState": {
  12496. "anyOf": [
  12497. {
  12498. "$ref": "#/components/schemas/ToolStatePending"
  12499. },
  12500. {
  12501. "$ref": "#/components/schemas/ToolStateRunning"
  12502. },
  12503. {
  12504. "$ref": "#/components/schemas/ToolStateCompleted"
  12505. },
  12506. {
  12507. "$ref": "#/components/schemas/ToolStateError"
  12508. }
  12509. ]
  12510. },
  12511. "ToolPart": {
  12512. "type": "object",
  12513. "properties": {
  12514. "id": {
  12515. "type": "string",
  12516. "pattern": "^prt"
  12517. },
  12518. "sessionID": {
  12519. "type": "string",
  12520. "pattern": "^ses"
  12521. },
  12522. "messageID": {
  12523. "type": "string",
  12524. "pattern": "^msg"
  12525. },
  12526. "type": {
  12527. "type": "string",
  12528. "enum": ["tool"]
  12529. },
  12530. "callID": {
  12531. "type": "string"
  12532. },
  12533. "tool": {
  12534. "type": "string"
  12535. },
  12536. "state": {
  12537. "$ref": "#/components/schemas/ToolState"
  12538. },
  12539. "metadata": {
  12540. "type": "object"
  12541. }
  12542. },
  12543. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12544. "additionalProperties": false
  12545. },
  12546. "StepStartPart": {
  12547. "type": "object",
  12548. "properties": {
  12549. "id": {
  12550. "type": "string",
  12551. "pattern": "^prt"
  12552. },
  12553. "sessionID": {
  12554. "type": "string",
  12555. "pattern": "^ses"
  12556. },
  12557. "messageID": {
  12558. "type": "string",
  12559. "pattern": "^msg"
  12560. },
  12561. "type": {
  12562. "type": "string",
  12563. "enum": ["step-start"]
  12564. },
  12565. "snapshot": {
  12566. "type": "string"
  12567. }
  12568. },
  12569. "required": ["id", "sessionID", "messageID", "type"],
  12570. "additionalProperties": false
  12571. },
  12572. "StepFinishPart": {
  12573. "type": "object",
  12574. "properties": {
  12575. "id": {
  12576. "type": "string",
  12577. "pattern": "^prt"
  12578. },
  12579. "sessionID": {
  12580. "type": "string",
  12581. "pattern": "^ses"
  12582. },
  12583. "messageID": {
  12584. "type": "string",
  12585. "pattern": "^msg"
  12586. },
  12587. "type": {
  12588. "type": "string",
  12589. "enum": ["step-finish"]
  12590. },
  12591. "reason": {
  12592. "type": "string"
  12593. },
  12594. "snapshot": {
  12595. "type": "string"
  12596. },
  12597. "cost": {
  12598. "type": "number"
  12599. },
  12600. "tokens": {
  12601. "type": "object",
  12602. "properties": {
  12603. "total": {
  12604. "type": "number"
  12605. },
  12606. "input": {
  12607. "type": "number"
  12608. },
  12609. "output": {
  12610. "type": "number"
  12611. },
  12612. "reasoning": {
  12613. "type": "number"
  12614. },
  12615. "cache": {
  12616. "type": "object",
  12617. "properties": {
  12618. "read": {
  12619. "type": "number"
  12620. },
  12621. "write": {
  12622. "type": "number"
  12623. }
  12624. },
  12625. "required": ["read", "write"],
  12626. "additionalProperties": false
  12627. }
  12628. },
  12629. "required": ["input", "output", "reasoning", "cache"],
  12630. "additionalProperties": false
  12631. }
  12632. },
  12633. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12634. "additionalProperties": false
  12635. },
  12636. "SnapshotPart": {
  12637. "type": "object",
  12638. "properties": {
  12639. "id": {
  12640. "type": "string",
  12641. "pattern": "^prt"
  12642. },
  12643. "sessionID": {
  12644. "type": "string",
  12645. "pattern": "^ses"
  12646. },
  12647. "messageID": {
  12648. "type": "string",
  12649. "pattern": "^msg"
  12650. },
  12651. "type": {
  12652. "type": "string",
  12653. "enum": ["snapshot"]
  12654. },
  12655. "snapshot": {
  12656. "type": "string"
  12657. }
  12658. },
  12659. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12660. "additionalProperties": false
  12661. },
  12662. "PatchPart": {
  12663. "type": "object",
  12664. "properties": {
  12665. "id": {
  12666. "type": "string",
  12667. "pattern": "^prt"
  12668. },
  12669. "sessionID": {
  12670. "type": "string",
  12671. "pattern": "^ses"
  12672. },
  12673. "messageID": {
  12674. "type": "string",
  12675. "pattern": "^msg"
  12676. },
  12677. "type": {
  12678. "type": "string",
  12679. "enum": ["patch"]
  12680. },
  12681. "hash": {
  12682. "type": "string"
  12683. },
  12684. "files": {
  12685. "type": "array",
  12686. "items": {
  12687. "type": "string"
  12688. }
  12689. }
  12690. },
  12691. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12692. "additionalProperties": false
  12693. },
  12694. "AgentPart": {
  12695. "type": "object",
  12696. "properties": {
  12697. "id": {
  12698. "type": "string",
  12699. "pattern": "^prt"
  12700. },
  12701. "sessionID": {
  12702. "type": "string",
  12703. "pattern": "^ses"
  12704. },
  12705. "messageID": {
  12706. "type": "string",
  12707. "pattern": "^msg"
  12708. },
  12709. "type": {
  12710. "type": "string",
  12711. "enum": ["agent"]
  12712. },
  12713. "name": {
  12714. "type": "string"
  12715. },
  12716. "source": {
  12717. "type": "object",
  12718. "properties": {
  12719. "value": {
  12720. "type": "string"
  12721. },
  12722. "start": {
  12723. "type": "integer",
  12724. "minimum": 0
  12725. },
  12726. "end": {
  12727. "type": "integer",
  12728. "minimum": 0
  12729. }
  12730. },
  12731. "required": ["value", "start", "end"],
  12732. "additionalProperties": false
  12733. }
  12734. },
  12735. "required": ["id", "sessionID", "messageID", "type", "name"],
  12736. "additionalProperties": false
  12737. },
  12738. "RetryPart": {
  12739. "type": "object",
  12740. "properties": {
  12741. "id": {
  12742. "type": "string",
  12743. "pattern": "^prt"
  12744. },
  12745. "sessionID": {
  12746. "type": "string",
  12747. "pattern": "^ses"
  12748. },
  12749. "messageID": {
  12750. "type": "string",
  12751. "pattern": "^msg"
  12752. },
  12753. "type": {
  12754. "type": "string",
  12755. "enum": ["retry"]
  12756. },
  12757. "attempt": {
  12758. "type": "integer",
  12759. "minimum": 0
  12760. },
  12761. "error": {
  12762. "$ref": "#/components/schemas/APIError"
  12763. },
  12764. "time": {
  12765. "type": "object",
  12766. "properties": {
  12767. "created": {
  12768. "type": "integer",
  12769. "minimum": 0
  12770. }
  12771. },
  12772. "required": ["created"],
  12773. "additionalProperties": false
  12774. }
  12775. },
  12776. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12777. "additionalProperties": false
  12778. },
  12779. "CompactionPart": {
  12780. "type": "object",
  12781. "properties": {
  12782. "id": {
  12783. "type": "string",
  12784. "pattern": "^prt"
  12785. },
  12786. "sessionID": {
  12787. "type": "string",
  12788. "pattern": "^ses"
  12789. },
  12790. "messageID": {
  12791. "type": "string",
  12792. "pattern": "^msg"
  12793. },
  12794. "type": {
  12795. "type": "string",
  12796. "enum": ["compaction"]
  12797. },
  12798. "auto": {
  12799. "type": "boolean"
  12800. },
  12801. "overflow": {
  12802. "type": "boolean"
  12803. },
  12804. "tail_start_id": {
  12805. "type": "string",
  12806. "pattern": "^msg"
  12807. }
  12808. },
  12809. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12810. "additionalProperties": false
  12811. },
  12812. "Part": {
  12813. "anyOf": [
  12814. {
  12815. "$ref": "#/components/schemas/TextPart"
  12816. },
  12817. {
  12818. "$ref": "#/components/schemas/SubtaskPart"
  12819. },
  12820. {
  12821. "$ref": "#/components/schemas/ReasoningPart"
  12822. },
  12823. {
  12824. "$ref": "#/components/schemas/FilePart"
  12825. },
  12826. {
  12827. "$ref": "#/components/schemas/ToolPart"
  12828. },
  12829. {
  12830. "$ref": "#/components/schemas/StepStartPart"
  12831. },
  12832. {
  12833. "$ref": "#/components/schemas/StepFinishPart"
  12834. },
  12835. {
  12836. "$ref": "#/components/schemas/SnapshotPart"
  12837. },
  12838. {
  12839. "$ref": "#/components/schemas/PatchPart"
  12840. },
  12841. {
  12842. "$ref": "#/components/schemas/AgentPart"
  12843. },
  12844. {
  12845. "$ref": "#/components/schemas/RetryPart"
  12846. },
  12847. {
  12848. "$ref": "#/components/schemas/CompactionPart"
  12849. }
  12850. ]
  12851. },
  12852. "Prompt": {
  12853. "type": "object",
  12854. "properties": {
  12855. "text": {
  12856. "type": "string"
  12857. },
  12858. "files": {
  12859. "type": "array",
  12860. "items": {
  12861. "$ref": "#/components/schemas/PromptFileAttachment"
  12862. }
  12863. },
  12864. "agents": {
  12865. "type": "array",
  12866. "items": {
  12867. "$ref": "#/components/schemas/PromptAgentAttachment"
  12868. }
  12869. },
  12870. "references": {
  12871. "type": "array",
  12872. "items": {
  12873. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12874. }
  12875. }
  12876. },
  12877. "required": ["text"],
  12878. "additionalProperties": false
  12879. },
  12880. "Pty": {
  12881. "type": "object",
  12882. "properties": {
  12883. "id": {
  12884. "type": "string",
  12885. "pattern": "^pty"
  12886. },
  12887. "title": {
  12888. "type": "string"
  12889. },
  12890. "command": {
  12891. "type": "string"
  12892. },
  12893. "args": {
  12894. "type": "array",
  12895. "items": {
  12896. "type": "string"
  12897. }
  12898. },
  12899. "cwd": {
  12900. "type": "string"
  12901. },
  12902. "status": {
  12903. "type": "string",
  12904. "enum": ["running", "exited"]
  12905. },
  12906. "pid": {
  12907. "type": "integer",
  12908. "minimum": 0
  12909. }
  12910. },
  12911. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  12912. "additionalProperties": false
  12913. },
  12914. "QuestionOption": {
  12915. "type": "object",
  12916. "properties": {
  12917. "label": {
  12918. "type": "string",
  12919. "description": "Display text (1-5 words, concise)"
  12920. },
  12921. "description": {
  12922. "type": "string",
  12923. "description": "Explanation of choice"
  12924. }
  12925. },
  12926. "required": ["label", "description"],
  12927. "additionalProperties": false
  12928. },
  12929. "QuestionInfo": {
  12930. "type": "object",
  12931. "properties": {
  12932. "question": {
  12933. "type": "string",
  12934. "description": "Complete question"
  12935. },
  12936. "header": {
  12937. "type": "string",
  12938. "description": "Very short label (max 30 chars)"
  12939. },
  12940. "options": {
  12941. "type": "array",
  12942. "items": {
  12943. "$ref": "#/components/schemas/QuestionOption"
  12944. },
  12945. "description": "Available choices"
  12946. },
  12947. "multiple": {
  12948. "type": "boolean"
  12949. },
  12950. "custom": {
  12951. "type": "boolean"
  12952. }
  12953. },
  12954. "required": ["question", "header", "options"],
  12955. "additionalProperties": false
  12956. },
  12957. "QuestionTool": {
  12958. "type": "object",
  12959. "properties": {
  12960. "messageID": {
  12961. "type": "string",
  12962. "pattern": "^msg"
  12963. },
  12964. "callID": {
  12965. "type": "string"
  12966. }
  12967. },
  12968. "required": ["messageID", "callID"],
  12969. "additionalProperties": false
  12970. },
  12971. "QuestionAnswer": {
  12972. "type": "array",
  12973. "items": {
  12974. "type": "string"
  12975. }
  12976. },
  12977. "SessionStatus": {
  12978. "anyOf": [
  12979. {
  12980. "type": "object",
  12981. "properties": {
  12982. "type": {
  12983. "type": "string",
  12984. "enum": ["idle"]
  12985. }
  12986. },
  12987. "required": ["type"],
  12988. "additionalProperties": false
  12989. },
  12990. {
  12991. "type": "object",
  12992. "properties": {
  12993. "type": {
  12994. "type": "string",
  12995. "enum": ["retry"]
  12996. },
  12997. "attempt": {
  12998. "type": "integer",
  12999. "minimum": 0
  13000. },
  13001. "message": {
  13002. "type": "string"
  13003. },
  13004. "action": {
  13005. "type": "object",
  13006. "properties": {
  13007. "reason": {
  13008. "type": "string"
  13009. },
  13010. "provider": {
  13011. "type": "string"
  13012. },
  13013. "title": {
  13014. "type": "string"
  13015. },
  13016. "message": {
  13017. "type": "string"
  13018. },
  13019. "label": {
  13020. "type": "string"
  13021. },
  13022. "link": {
  13023. "type": "string"
  13024. }
  13025. },
  13026. "required": ["reason", "provider", "title", "message", "label"],
  13027. "additionalProperties": false
  13028. },
  13029. "next": {
  13030. "type": "integer",
  13031. "minimum": 0
  13032. }
  13033. },
  13034. "required": ["type", "attempt", "message", "next"],
  13035. "additionalProperties": false
  13036. },
  13037. {
  13038. "type": "object",
  13039. "properties": {
  13040. "type": {
  13041. "type": "string",
  13042. "enum": ["busy"]
  13043. }
  13044. },
  13045. "required": ["type"],
  13046. "additionalProperties": false
  13047. }
  13048. ]
  13049. },
  13050. "Todo": {
  13051. "type": "object",
  13052. "properties": {
  13053. "content": {
  13054. "type": "string",
  13055. "description": "Brief description of the task"
  13056. },
  13057. "status": {
  13058. "type": "string",
  13059. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  13060. },
  13061. "priority": {
  13062. "type": "string",
  13063. "description": "Priority level of the task: high, medium, low"
  13064. }
  13065. },
  13066. "required": ["content", "status", "priority"],
  13067. "additionalProperties": false
  13068. },
  13069. "GlobalEvent": {
  13070. "type": "object",
  13071. "properties": {
  13072. "directory": {
  13073. "type": "string"
  13074. },
  13075. "project": {
  13076. "type": "string"
  13077. },
  13078. "workspace": {
  13079. "type": "string"
  13080. },
  13081. "payload": {
  13082. "anyOf": [
  13083. {
  13084. "type": "object",
  13085. "properties": {
  13086. "id": {
  13087. "type": "string"
  13088. },
  13089. "type": {
  13090. "type": "string",
  13091. "enum": ["models-dev.refreshed"]
  13092. },
  13093. "properties": {
  13094. "type": "object",
  13095. "properties": {}
  13096. }
  13097. },
  13098. "required": ["id", "type", "properties"],
  13099. "additionalProperties": false
  13100. },
  13101. {
  13102. "type": "object",
  13103. "properties": {
  13104. "id": {
  13105. "type": "string"
  13106. },
  13107. "type": {
  13108. "type": "string",
  13109. "enum": ["plugin.added"]
  13110. },
  13111. "properties": {
  13112. "type": "object",
  13113. "properties": {
  13114. "id": {
  13115. "type": "string"
  13116. }
  13117. },
  13118. "required": ["id"],
  13119. "additionalProperties": false
  13120. }
  13121. },
  13122. "required": ["id", "type", "properties"],
  13123. "additionalProperties": false
  13124. },
  13125. {
  13126. "type": "object",
  13127. "properties": {
  13128. "id": {
  13129. "type": "string"
  13130. },
  13131. "type": {
  13132. "type": "string",
  13133. "enum": ["catalog.model.updated"]
  13134. },
  13135. "properties": {
  13136. "type": "object",
  13137. "properties": {
  13138. "model": {
  13139. "$ref": "#/components/schemas/ModelV2Info"
  13140. }
  13141. },
  13142. "required": ["model"],
  13143. "additionalProperties": false
  13144. }
  13145. },
  13146. "required": ["id", "type", "properties"],
  13147. "additionalProperties": false
  13148. },
  13149. {
  13150. "type": "object",
  13151. "properties": {
  13152. "id": {
  13153. "type": "string"
  13154. },
  13155. "type": {
  13156. "type": "string",
  13157. "enum": ["session.created"]
  13158. },
  13159. "properties": {
  13160. "type": "object",
  13161. "properties": {
  13162. "sessionID": {
  13163. "type": "string",
  13164. "pattern": "^ses"
  13165. },
  13166. "info": {
  13167. "$ref": "#/components/schemas/Session"
  13168. }
  13169. },
  13170. "required": ["sessionID", "info"],
  13171. "additionalProperties": false
  13172. }
  13173. },
  13174. "required": ["id", "type", "properties"],
  13175. "additionalProperties": false
  13176. },
  13177. {
  13178. "type": "object",
  13179. "properties": {
  13180. "id": {
  13181. "type": "string"
  13182. },
  13183. "type": {
  13184. "type": "string",
  13185. "enum": ["session.updated"]
  13186. },
  13187. "properties": {
  13188. "type": "object",
  13189. "properties": {
  13190. "sessionID": {
  13191. "type": "string",
  13192. "pattern": "^ses"
  13193. },
  13194. "info": {
  13195. "$ref": "#/components/schemas/Session"
  13196. }
  13197. },
  13198. "required": ["sessionID", "info"],
  13199. "additionalProperties": false
  13200. }
  13201. },
  13202. "required": ["id", "type", "properties"],
  13203. "additionalProperties": false
  13204. },
  13205. {
  13206. "type": "object",
  13207. "properties": {
  13208. "id": {
  13209. "type": "string"
  13210. },
  13211. "type": {
  13212. "type": "string",
  13213. "enum": ["session.deleted"]
  13214. },
  13215. "properties": {
  13216. "type": "object",
  13217. "properties": {
  13218. "sessionID": {
  13219. "type": "string",
  13220. "pattern": "^ses"
  13221. },
  13222. "info": {
  13223. "$ref": "#/components/schemas/Session"
  13224. }
  13225. },
  13226. "required": ["sessionID", "info"],
  13227. "additionalProperties": false
  13228. }
  13229. },
  13230. "required": ["id", "type", "properties"],
  13231. "additionalProperties": false
  13232. },
  13233. {
  13234. "type": "object",
  13235. "properties": {
  13236. "id": {
  13237. "type": "string"
  13238. },
  13239. "type": {
  13240. "type": "string",
  13241. "enum": ["message.updated"]
  13242. },
  13243. "properties": {
  13244. "type": "object",
  13245. "properties": {
  13246. "sessionID": {
  13247. "type": "string",
  13248. "pattern": "^ses"
  13249. },
  13250. "info": {
  13251. "$ref": "#/components/schemas/Message"
  13252. }
  13253. },
  13254. "required": ["sessionID", "info"],
  13255. "additionalProperties": false
  13256. }
  13257. },
  13258. "required": ["id", "type", "properties"],
  13259. "additionalProperties": false
  13260. },
  13261. {
  13262. "type": "object",
  13263. "properties": {
  13264. "id": {
  13265. "type": "string"
  13266. },
  13267. "type": {
  13268. "type": "string",
  13269. "enum": ["message.removed"]
  13270. },
  13271. "properties": {
  13272. "type": "object",
  13273. "properties": {
  13274. "sessionID": {
  13275. "type": "string",
  13276. "pattern": "^ses"
  13277. },
  13278. "messageID": {
  13279. "type": "string",
  13280. "pattern": "^msg"
  13281. }
  13282. },
  13283. "required": ["sessionID", "messageID"],
  13284. "additionalProperties": false
  13285. }
  13286. },
  13287. "required": ["id", "type", "properties"],
  13288. "additionalProperties": false
  13289. },
  13290. {
  13291. "type": "object",
  13292. "properties": {
  13293. "id": {
  13294. "type": "string"
  13295. },
  13296. "type": {
  13297. "type": "string",
  13298. "enum": ["message.part.updated"]
  13299. },
  13300. "properties": {
  13301. "type": "object",
  13302. "properties": {
  13303. "sessionID": {
  13304. "type": "string",
  13305. "pattern": "^ses"
  13306. },
  13307. "part": {
  13308. "$ref": "#/components/schemas/Part"
  13309. },
  13310. "time": {
  13311. "type": "number"
  13312. }
  13313. },
  13314. "required": ["sessionID", "part", "time"],
  13315. "additionalProperties": false
  13316. }
  13317. },
  13318. "required": ["id", "type", "properties"],
  13319. "additionalProperties": false
  13320. },
  13321. {
  13322. "type": "object",
  13323. "properties": {
  13324. "id": {
  13325. "type": "string"
  13326. },
  13327. "type": {
  13328. "type": "string",
  13329. "enum": ["message.part.removed"]
  13330. },
  13331. "properties": {
  13332. "type": "object",
  13333. "properties": {
  13334. "sessionID": {
  13335. "type": "string",
  13336. "pattern": "^ses"
  13337. },
  13338. "messageID": {
  13339. "type": "string",
  13340. "pattern": "^msg"
  13341. },
  13342. "partID": {
  13343. "type": "string",
  13344. "pattern": "^prt"
  13345. }
  13346. },
  13347. "required": ["sessionID", "messageID", "partID"],
  13348. "additionalProperties": false
  13349. }
  13350. },
  13351. "required": ["id", "type", "properties"],
  13352. "additionalProperties": false
  13353. },
  13354. {
  13355. "type": "object",
  13356. "properties": {
  13357. "id": {
  13358. "type": "string"
  13359. },
  13360. "type": {
  13361. "type": "string",
  13362. "enum": ["session.next.agent.switched"]
  13363. },
  13364. "properties": {
  13365. "type": "object",
  13366. "properties": {
  13367. "timestamp": {
  13368. "type": "number"
  13369. },
  13370. "sessionID": {
  13371. "type": "string",
  13372. "pattern": "^ses"
  13373. },
  13374. "agent": {
  13375. "type": "string"
  13376. }
  13377. },
  13378. "required": ["timestamp", "sessionID", "agent"],
  13379. "additionalProperties": false
  13380. }
  13381. },
  13382. "required": ["id", "type", "properties"],
  13383. "additionalProperties": false
  13384. },
  13385. {
  13386. "type": "object",
  13387. "properties": {
  13388. "id": {
  13389. "type": "string"
  13390. },
  13391. "type": {
  13392. "type": "string",
  13393. "enum": ["session.next.model.switched"]
  13394. },
  13395. "properties": {
  13396. "type": "object",
  13397. "properties": {
  13398. "timestamp": {
  13399. "type": "number"
  13400. },
  13401. "sessionID": {
  13402. "type": "string",
  13403. "pattern": "^ses"
  13404. },
  13405. "model": {
  13406. "type": "object",
  13407. "properties": {
  13408. "id": {
  13409. "type": "string"
  13410. },
  13411. "providerID": {
  13412. "type": "string"
  13413. },
  13414. "variant": {
  13415. "type": "string"
  13416. }
  13417. },
  13418. "required": ["id", "providerID"],
  13419. "additionalProperties": false
  13420. }
  13421. },
  13422. "required": ["timestamp", "sessionID", "model"],
  13423. "additionalProperties": false
  13424. }
  13425. },
  13426. "required": ["id", "type", "properties"],
  13427. "additionalProperties": false
  13428. },
  13429. {
  13430. "type": "object",
  13431. "properties": {
  13432. "id": {
  13433. "type": "string"
  13434. },
  13435. "type": {
  13436. "type": "string",
  13437. "enum": ["session.next.prompted"]
  13438. },
  13439. "properties": {
  13440. "type": "object",
  13441. "properties": {
  13442. "timestamp": {
  13443. "type": "number"
  13444. },
  13445. "sessionID": {
  13446. "type": "string",
  13447. "pattern": "^ses"
  13448. },
  13449. "prompt": {
  13450. "$ref": "#/components/schemas/Prompt"
  13451. }
  13452. },
  13453. "required": ["timestamp", "sessionID", "prompt"],
  13454. "additionalProperties": false
  13455. }
  13456. },
  13457. "required": ["id", "type", "properties"],
  13458. "additionalProperties": false
  13459. },
  13460. {
  13461. "type": "object",
  13462. "properties": {
  13463. "id": {
  13464. "type": "string"
  13465. },
  13466. "type": {
  13467. "type": "string",
  13468. "enum": ["session.next.synthetic"]
  13469. },
  13470. "properties": {
  13471. "type": "object",
  13472. "properties": {
  13473. "timestamp": {
  13474. "type": "number"
  13475. },
  13476. "sessionID": {
  13477. "type": "string",
  13478. "pattern": "^ses"
  13479. },
  13480. "text": {
  13481. "type": "string"
  13482. }
  13483. },
  13484. "required": ["timestamp", "sessionID", "text"],
  13485. "additionalProperties": false
  13486. }
  13487. },
  13488. "required": ["id", "type", "properties"],
  13489. "additionalProperties": false
  13490. },
  13491. {
  13492. "type": "object",
  13493. "properties": {
  13494. "id": {
  13495. "type": "string"
  13496. },
  13497. "type": {
  13498. "type": "string",
  13499. "enum": ["session.next.shell.started"]
  13500. },
  13501. "properties": {
  13502. "type": "object",
  13503. "properties": {
  13504. "timestamp": {
  13505. "type": "number"
  13506. },
  13507. "sessionID": {
  13508. "type": "string",
  13509. "pattern": "^ses"
  13510. },
  13511. "callID": {
  13512. "type": "string"
  13513. },
  13514. "command": {
  13515. "type": "string"
  13516. }
  13517. },
  13518. "required": ["timestamp", "sessionID", "callID", "command"],
  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": ["session.next.shell.ended"]
  13534. },
  13535. "properties": {
  13536. "type": "object",
  13537. "properties": {
  13538. "timestamp": {
  13539. "type": "number"
  13540. },
  13541. "sessionID": {
  13542. "type": "string",
  13543. "pattern": "^ses"
  13544. },
  13545. "callID": {
  13546. "type": "string"
  13547. },
  13548. "output": {
  13549. "type": "string"
  13550. }
  13551. },
  13552. "required": ["timestamp", "sessionID", "callID", "output"],
  13553. "additionalProperties": false
  13554. }
  13555. },
  13556. "required": ["id", "type", "properties"],
  13557. "additionalProperties": false
  13558. },
  13559. {
  13560. "type": "object",
  13561. "properties": {
  13562. "id": {
  13563. "type": "string"
  13564. },
  13565. "type": {
  13566. "type": "string",
  13567. "enum": ["session.next.step.started"]
  13568. },
  13569. "properties": {
  13570. "type": "object",
  13571. "properties": {
  13572. "timestamp": {
  13573. "type": "number"
  13574. },
  13575. "sessionID": {
  13576. "type": "string",
  13577. "pattern": "^ses"
  13578. },
  13579. "agent": {
  13580. "type": "string"
  13581. },
  13582. "model": {
  13583. "type": "object",
  13584. "properties": {
  13585. "id": {
  13586. "type": "string"
  13587. },
  13588. "providerID": {
  13589. "type": "string"
  13590. },
  13591. "variant": {
  13592. "type": "string"
  13593. }
  13594. },
  13595. "required": ["id", "providerID"],
  13596. "additionalProperties": false
  13597. },
  13598. "snapshot": {
  13599. "type": "string"
  13600. }
  13601. },
  13602. "required": ["timestamp", "sessionID", "agent", "model"],
  13603. "additionalProperties": false
  13604. }
  13605. },
  13606. "required": ["id", "type", "properties"],
  13607. "additionalProperties": false
  13608. },
  13609. {
  13610. "type": "object",
  13611. "properties": {
  13612. "id": {
  13613. "type": "string"
  13614. },
  13615. "type": {
  13616. "type": "string",
  13617. "enum": ["session.next.step.ended"]
  13618. },
  13619. "properties": {
  13620. "type": "object",
  13621. "properties": {
  13622. "timestamp": {
  13623. "type": "number"
  13624. },
  13625. "sessionID": {
  13626. "type": "string",
  13627. "pattern": "^ses"
  13628. },
  13629. "finish": {
  13630. "type": "string"
  13631. },
  13632. "cost": {
  13633. "type": "number"
  13634. },
  13635. "tokens": {
  13636. "type": "object",
  13637. "properties": {
  13638. "input": {
  13639. "type": "number"
  13640. },
  13641. "output": {
  13642. "type": "number"
  13643. },
  13644. "reasoning": {
  13645. "type": "number"
  13646. },
  13647. "cache": {
  13648. "type": "object",
  13649. "properties": {
  13650. "read": {
  13651. "type": "number"
  13652. },
  13653. "write": {
  13654. "type": "number"
  13655. }
  13656. },
  13657. "required": ["read", "write"],
  13658. "additionalProperties": false
  13659. }
  13660. },
  13661. "required": ["input", "output", "reasoning", "cache"],
  13662. "additionalProperties": false
  13663. },
  13664. "snapshot": {
  13665. "type": "string"
  13666. }
  13667. },
  13668. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  13669. "additionalProperties": false
  13670. }
  13671. },
  13672. "required": ["id", "type", "properties"],
  13673. "additionalProperties": false
  13674. },
  13675. {
  13676. "type": "object",
  13677. "properties": {
  13678. "id": {
  13679. "type": "string"
  13680. },
  13681. "type": {
  13682. "type": "string",
  13683. "enum": ["session.next.step.failed"]
  13684. },
  13685. "properties": {
  13686. "type": "object",
  13687. "properties": {
  13688. "timestamp": {
  13689. "type": "number"
  13690. },
  13691. "sessionID": {
  13692. "type": "string",
  13693. "pattern": "^ses"
  13694. },
  13695. "error": {
  13696. "$ref": "#/components/schemas/SessionErrorUnknown"
  13697. }
  13698. },
  13699. "required": ["timestamp", "sessionID", "error"],
  13700. "additionalProperties": false
  13701. }
  13702. },
  13703. "required": ["id", "type", "properties"],
  13704. "additionalProperties": false
  13705. },
  13706. {
  13707. "type": "object",
  13708. "properties": {
  13709. "id": {
  13710. "type": "string"
  13711. },
  13712. "type": {
  13713. "type": "string",
  13714. "enum": ["session.next.text.started"]
  13715. },
  13716. "properties": {
  13717. "type": "object",
  13718. "properties": {
  13719. "timestamp": {
  13720. "type": "number"
  13721. },
  13722. "sessionID": {
  13723. "type": "string",
  13724. "pattern": "^ses"
  13725. }
  13726. },
  13727. "required": ["timestamp", "sessionID"],
  13728. "additionalProperties": false
  13729. }
  13730. },
  13731. "required": ["id", "type", "properties"],
  13732. "additionalProperties": false
  13733. },
  13734. {
  13735. "type": "object",
  13736. "properties": {
  13737. "id": {
  13738. "type": "string"
  13739. },
  13740. "type": {
  13741. "type": "string",
  13742. "enum": ["session.next.text.delta"]
  13743. },
  13744. "properties": {
  13745. "type": "object",
  13746. "properties": {
  13747. "timestamp": {
  13748. "type": "number"
  13749. },
  13750. "sessionID": {
  13751. "type": "string",
  13752. "pattern": "^ses"
  13753. },
  13754. "delta": {
  13755. "type": "string"
  13756. }
  13757. },
  13758. "required": ["timestamp", "sessionID", "delta"],
  13759. "additionalProperties": false
  13760. }
  13761. },
  13762. "required": ["id", "type", "properties"],
  13763. "additionalProperties": false
  13764. },
  13765. {
  13766. "type": "object",
  13767. "properties": {
  13768. "id": {
  13769. "type": "string"
  13770. },
  13771. "type": {
  13772. "type": "string",
  13773. "enum": ["session.next.text.ended"]
  13774. },
  13775. "properties": {
  13776. "type": "object",
  13777. "properties": {
  13778. "timestamp": {
  13779. "type": "number"
  13780. },
  13781. "sessionID": {
  13782. "type": "string",
  13783. "pattern": "^ses"
  13784. },
  13785. "text": {
  13786. "type": "string"
  13787. }
  13788. },
  13789. "required": ["timestamp", "sessionID", "text"],
  13790. "additionalProperties": false
  13791. }
  13792. },
  13793. "required": ["id", "type", "properties"],
  13794. "additionalProperties": false
  13795. },
  13796. {
  13797. "type": "object",
  13798. "properties": {
  13799. "id": {
  13800. "type": "string"
  13801. },
  13802. "type": {
  13803. "type": "string",
  13804. "enum": ["session.next.reasoning.started"]
  13805. },
  13806. "properties": {
  13807. "type": "object",
  13808. "properties": {
  13809. "timestamp": {
  13810. "type": "number"
  13811. },
  13812. "sessionID": {
  13813. "type": "string",
  13814. "pattern": "^ses"
  13815. },
  13816. "reasoningID": {
  13817. "type": "string"
  13818. }
  13819. },
  13820. "required": ["timestamp", "sessionID", "reasoningID"],
  13821. "additionalProperties": false
  13822. }
  13823. },
  13824. "required": ["id", "type", "properties"],
  13825. "additionalProperties": false
  13826. },
  13827. {
  13828. "type": "object",
  13829. "properties": {
  13830. "id": {
  13831. "type": "string"
  13832. },
  13833. "type": {
  13834. "type": "string",
  13835. "enum": ["session.next.reasoning.delta"]
  13836. },
  13837. "properties": {
  13838. "type": "object",
  13839. "properties": {
  13840. "timestamp": {
  13841. "type": "number"
  13842. },
  13843. "sessionID": {
  13844. "type": "string",
  13845. "pattern": "^ses"
  13846. },
  13847. "reasoningID": {
  13848. "type": "string"
  13849. },
  13850. "delta": {
  13851. "type": "string"
  13852. }
  13853. },
  13854. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  13855. "additionalProperties": false
  13856. }
  13857. },
  13858. "required": ["id", "type", "properties"],
  13859. "additionalProperties": false
  13860. },
  13861. {
  13862. "type": "object",
  13863. "properties": {
  13864. "id": {
  13865. "type": "string"
  13866. },
  13867. "type": {
  13868. "type": "string",
  13869. "enum": ["session.next.reasoning.ended"]
  13870. },
  13871. "properties": {
  13872. "type": "object",
  13873. "properties": {
  13874. "timestamp": {
  13875. "type": "number"
  13876. },
  13877. "sessionID": {
  13878. "type": "string",
  13879. "pattern": "^ses"
  13880. },
  13881. "reasoningID": {
  13882. "type": "string"
  13883. },
  13884. "text": {
  13885. "type": "string"
  13886. }
  13887. },
  13888. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  13889. "additionalProperties": false
  13890. }
  13891. },
  13892. "required": ["id", "type", "properties"],
  13893. "additionalProperties": false
  13894. },
  13895. {
  13896. "type": "object",
  13897. "properties": {
  13898. "id": {
  13899. "type": "string"
  13900. },
  13901. "type": {
  13902. "type": "string",
  13903. "enum": ["session.next.tool.input.started"]
  13904. },
  13905. "properties": {
  13906. "type": "object",
  13907. "properties": {
  13908. "timestamp": {
  13909. "type": "number"
  13910. },
  13911. "sessionID": {
  13912. "type": "string",
  13913. "pattern": "^ses"
  13914. },
  13915. "callID": {
  13916. "type": "string"
  13917. },
  13918. "name": {
  13919. "type": "string"
  13920. }
  13921. },
  13922. "required": ["timestamp", "sessionID", "callID", "name"],
  13923. "additionalProperties": false
  13924. }
  13925. },
  13926. "required": ["id", "type", "properties"],
  13927. "additionalProperties": false
  13928. },
  13929. {
  13930. "type": "object",
  13931. "properties": {
  13932. "id": {
  13933. "type": "string"
  13934. },
  13935. "type": {
  13936. "type": "string",
  13937. "enum": ["session.next.tool.input.delta"]
  13938. },
  13939. "properties": {
  13940. "type": "object",
  13941. "properties": {
  13942. "timestamp": {
  13943. "type": "number"
  13944. },
  13945. "sessionID": {
  13946. "type": "string",
  13947. "pattern": "^ses"
  13948. },
  13949. "callID": {
  13950. "type": "string"
  13951. },
  13952. "delta": {
  13953. "type": "string"
  13954. }
  13955. },
  13956. "required": ["timestamp", "sessionID", "callID", "delta"],
  13957. "additionalProperties": false
  13958. }
  13959. },
  13960. "required": ["id", "type", "properties"],
  13961. "additionalProperties": false
  13962. },
  13963. {
  13964. "type": "object",
  13965. "properties": {
  13966. "id": {
  13967. "type": "string"
  13968. },
  13969. "type": {
  13970. "type": "string",
  13971. "enum": ["session.next.tool.input.ended"]
  13972. },
  13973. "properties": {
  13974. "type": "object",
  13975. "properties": {
  13976. "timestamp": {
  13977. "type": "number"
  13978. },
  13979. "sessionID": {
  13980. "type": "string",
  13981. "pattern": "^ses"
  13982. },
  13983. "callID": {
  13984. "type": "string"
  13985. },
  13986. "text": {
  13987. "type": "string"
  13988. }
  13989. },
  13990. "required": ["timestamp", "sessionID", "callID", "text"],
  13991. "additionalProperties": false
  13992. }
  13993. },
  13994. "required": ["id", "type", "properties"],
  13995. "additionalProperties": false
  13996. },
  13997. {
  13998. "type": "object",
  13999. "properties": {
  14000. "id": {
  14001. "type": "string"
  14002. },
  14003. "type": {
  14004. "type": "string",
  14005. "enum": ["session.next.tool.called"]
  14006. },
  14007. "properties": {
  14008. "type": "object",
  14009. "properties": {
  14010. "timestamp": {
  14011. "type": "number"
  14012. },
  14013. "sessionID": {
  14014. "type": "string",
  14015. "pattern": "^ses"
  14016. },
  14017. "callID": {
  14018. "type": "string"
  14019. },
  14020. "tool": {
  14021. "type": "string"
  14022. },
  14023. "input": {
  14024. "type": "object"
  14025. },
  14026. "provider": {
  14027. "type": "object",
  14028. "properties": {
  14029. "executed": {
  14030. "type": "boolean"
  14031. },
  14032. "metadata": {
  14033. "type": "object"
  14034. }
  14035. },
  14036. "required": ["executed"],
  14037. "additionalProperties": false
  14038. }
  14039. },
  14040. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  14041. "additionalProperties": false
  14042. }
  14043. },
  14044. "required": ["id", "type", "properties"],
  14045. "additionalProperties": false
  14046. },
  14047. {
  14048. "type": "object",
  14049. "properties": {
  14050. "id": {
  14051. "type": "string"
  14052. },
  14053. "type": {
  14054. "type": "string",
  14055. "enum": ["session.next.tool.progress"]
  14056. },
  14057. "properties": {
  14058. "type": "object",
  14059. "properties": {
  14060. "timestamp": {
  14061. "type": "number"
  14062. },
  14063. "sessionID": {
  14064. "type": "string",
  14065. "pattern": "^ses"
  14066. },
  14067. "callID": {
  14068. "type": "string"
  14069. },
  14070. "structured": {
  14071. "type": "object"
  14072. },
  14073. "content": {
  14074. "type": "array",
  14075. "items": {
  14076. "anyOf": [
  14077. {
  14078. "$ref": "#/components/schemas/ToolTextContent"
  14079. },
  14080. {
  14081. "$ref": "#/components/schemas/ToolFileContent"
  14082. }
  14083. ]
  14084. }
  14085. }
  14086. },
  14087. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  14088. "additionalProperties": false
  14089. }
  14090. },
  14091. "required": ["id", "type", "properties"],
  14092. "additionalProperties": false
  14093. },
  14094. {
  14095. "type": "object",
  14096. "properties": {
  14097. "id": {
  14098. "type": "string"
  14099. },
  14100. "type": {
  14101. "type": "string",
  14102. "enum": ["session.next.tool.success"]
  14103. },
  14104. "properties": {
  14105. "type": "object",
  14106. "properties": {
  14107. "timestamp": {
  14108. "type": "number"
  14109. },
  14110. "sessionID": {
  14111. "type": "string",
  14112. "pattern": "^ses"
  14113. },
  14114. "callID": {
  14115. "type": "string"
  14116. },
  14117. "structured": {
  14118. "type": "object"
  14119. },
  14120. "content": {
  14121. "type": "array",
  14122. "items": {
  14123. "anyOf": [
  14124. {
  14125. "$ref": "#/components/schemas/ToolTextContent"
  14126. },
  14127. {
  14128. "$ref": "#/components/schemas/ToolFileContent"
  14129. }
  14130. ]
  14131. }
  14132. },
  14133. "provider": {
  14134. "type": "object",
  14135. "properties": {
  14136. "executed": {
  14137. "type": "boolean"
  14138. },
  14139. "metadata": {
  14140. "type": "object"
  14141. }
  14142. },
  14143. "required": ["executed"],
  14144. "additionalProperties": false
  14145. }
  14146. },
  14147. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  14148. "additionalProperties": false
  14149. }
  14150. },
  14151. "required": ["id", "type", "properties"],
  14152. "additionalProperties": false
  14153. },
  14154. {
  14155. "type": "object",
  14156. "properties": {
  14157. "id": {
  14158. "type": "string"
  14159. },
  14160. "type": {
  14161. "type": "string",
  14162. "enum": ["session.next.tool.failed"]
  14163. },
  14164. "properties": {
  14165. "type": "object",
  14166. "properties": {
  14167. "timestamp": {
  14168. "type": "number"
  14169. },
  14170. "sessionID": {
  14171. "type": "string",
  14172. "pattern": "^ses"
  14173. },
  14174. "callID": {
  14175. "type": "string"
  14176. },
  14177. "error": {
  14178. "$ref": "#/components/schemas/SessionErrorUnknown"
  14179. },
  14180. "provider": {
  14181. "type": "object",
  14182. "properties": {
  14183. "executed": {
  14184. "type": "boolean"
  14185. },
  14186. "metadata": {
  14187. "type": "object"
  14188. }
  14189. },
  14190. "required": ["executed"],
  14191. "additionalProperties": false
  14192. }
  14193. },
  14194. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  14195. "additionalProperties": false
  14196. }
  14197. },
  14198. "required": ["id", "type", "properties"],
  14199. "additionalProperties": false
  14200. },
  14201. {
  14202. "type": "object",
  14203. "properties": {
  14204. "id": {
  14205. "type": "string"
  14206. },
  14207. "type": {
  14208. "type": "string",
  14209. "enum": ["session.next.retried"]
  14210. },
  14211. "properties": {
  14212. "type": "object",
  14213. "properties": {
  14214. "timestamp": {
  14215. "type": "number"
  14216. },
  14217. "sessionID": {
  14218. "type": "string",
  14219. "pattern": "^ses"
  14220. },
  14221. "attempt": {
  14222. "type": "number"
  14223. },
  14224. "error": {
  14225. "$ref": "#/components/schemas/SessionNextRetry_error"
  14226. }
  14227. },
  14228. "required": ["timestamp", "sessionID", "attempt", "error"],
  14229. "additionalProperties": false
  14230. }
  14231. },
  14232. "required": ["id", "type", "properties"],
  14233. "additionalProperties": false
  14234. },
  14235. {
  14236. "type": "object",
  14237. "properties": {
  14238. "id": {
  14239. "type": "string"
  14240. },
  14241. "type": {
  14242. "type": "string",
  14243. "enum": ["session.next.compaction.started"]
  14244. },
  14245. "properties": {
  14246. "type": "object",
  14247. "properties": {
  14248. "timestamp": {
  14249. "type": "number"
  14250. },
  14251. "sessionID": {
  14252. "type": "string",
  14253. "pattern": "^ses"
  14254. },
  14255. "reason": {
  14256. "type": "string",
  14257. "enum": ["auto", "manual"]
  14258. }
  14259. },
  14260. "required": ["timestamp", "sessionID", "reason"],
  14261. "additionalProperties": false
  14262. }
  14263. },
  14264. "required": ["id", "type", "properties"],
  14265. "additionalProperties": false
  14266. },
  14267. {
  14268. "type": "object",
  14269. "properties": {
  14270. "id": {
  14271. "type": "string"
  14272. },
  14273. "type": {
  14274. "type": "string",
  14275. "enum": ["session.next.compaction.delta"]
  14276. },
  14277. "properties": {
  14278. "type": "object",
  14279. "properties": {
  14280. "timestamp": {
  14281. "type": "number"
  14282. },
  14283. "sessionID": {
  14284. "type": "string",
  14285. "pattern": "^ses"
  14286. },
  14287. "text": {
  14288. "type": "string"
  14289. }
  14290. },
  14291. "required": ["timestamp", "sessionID", "text"],
  14292. "additionalProperties": false
  14293. }
  14294. },
  14295. "required": ["id", "type", "properties"],
  14296. "additionalProperties": false
  14297. },
  14298. {
  14299. "type": "object",
  14300. "properties": {
  14301. "id": {
  14302. "type": "string"
  14303. },
  14304. "type": {
  14305. "type": "string",
  14306. "enum": ["session.next.compaction.ended"]
  14307. },
  14308. "properties": {
  14309. "type": "object",
  14310. "properties": {
  14311. "timestamp": {
  14312. "type": "number"
  14313. },
  14314. "sessionID": {
  14315. "type": "string",
  14316. "pattern": "^ses"
  14317. },
  14318. "text": {
  14319. "type": "string"
  14320. },
  14321. "include": {
  14322. "type": "string"
  14323. }
  14324. },
  14325. "required": ["timestamp", "sessionID", "text"],
  14326. "additionalProperties": false
  14327. }
  14328. },
  14329. "required": ["id", "type", "properties"],
  14330. "additionalProperties": false
  14331. },
  14332. {
  14333. "type": "object",
  14334. "properties": {
  14335. "id": {
  14336. "type": "string"
  14337. },
  14338. "type": {
  14339. "type": "string",
  14340. "enum": ["message.part.delta"]
  14341. },
  14342. "properties": {
  14343. "type": "object",
  14344. "properties": {
  14345. "sessionID": {
  14346. "type": "string",
  14347. "pattern": "^ses"
  14348. },
  14349. "messageID": {
  14350. "type": "string",
  14351. "pattern": "^msg"
  14352. },
  14353. "partID": {
  14354. "type": "string",
  14355. "pattern": "^prt"
  14356. },
  14357. "field": {
  14358. "type": "string"
  14359. },
  14360. "delta": {
  14361. "type": "string"
  14362. }
  14363. },
  14364. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  14365. "additionalProperties": false
  14366. }
  14367. },
  14368. "required": ["id", "type", "properties"],
  14369. "additionalProperties": false
  14370. },
  14371. {
  14372. "type": "object",
  14373. "properties": {
  14374. "id": {
  14375. "type": "string"
  14376. },
  14377. "type": {
  14378. "type": "string",
  14379. "enum": ["session.diff"]
  14380. },
  14381. "properties": {
  14382. "type": "object",
  14383. "properties": {
  14384. "sessionID": {
  14385. "type": "string",
  14386. "pattern": "^ses"
  14387. },
  14388. "diff": {
  14389. "type": "array",
  14390. "items": {
  14391. "$ref": "#/components/schemas/SnapshotFileDiff"
  14392. }
  14393. }
  14394. },
  14395. "required": ["sessionID", "diff"],
  14396. "additionalProperties": false
  14397. }
  14398. },
  14399. "required": ["id", "type", "properties"],
  14400. "additionalProperties": false
  14401. },
  14402. {
  14403. "type": "object",
  14404. "properties": {
  14405. "id": {
  14406. "type": "string"
  14407. },
  14408. "type": {
  14409. "type": "string",
  14410. "enum": ["session.error"]
  14411. },
  14412. "properties": {
  14413. "type": "object",
  14414. "properties": {
  14415. "sessionID": {
  14416. "type": "string",
  14417. "pattern": "^ses"
  14418. },
  14419. "error": {
  14420. "anyOf": [
  14421. {
  14422. "$ref": "#/components/schemas/ProviderAuthError"
  14423. },
  14424. {
  14425. "$ref": "#/components/schemas/UnknownError"
  14426. },
  14427. {
  14428. "$ref": "#/components/schemas/MessageOutputLengthError"
  14429. },
  14430. {
  14431. "$ref": "#/components/schemas/MessageAbortedError"
  14432. },
  14433. {
  14434. "$ref": "#/components/schemas/StructuredOutputError"
  14435. },
  14436. {
  14437. "$ref": "#/components/schemas/ContextOverflowError"
  14438. },
  14439. {
  14440. "$ref": "#/components/schemas/APIError"
  14441. }
  14442. ]
  14443. }
  14444. },
  14445. "additionalProperties": false
  14446. }
  14447. },
  14448. "required": ["id", "type", "properties"],
  14449. "additionalProperties": false
  14450. },
  14451. {
  14452. "type": "object",
  14453. "properties": {
  14454. "id": {
  14455. "type": "string"
  14456. },
  14457. "type": {
  14458. "type": "string",
  14459. "enum": ["installation.updated"]
  14460. },
  14461. "properties": {
  14462. "type": "object",
  14463. "properties": {
  14464. "version": {
  14465. "type": "string"
  14466. }
  14467. },
  14468. "required": ["version"],
  14469. "additionalProperties": false
  14470. }
  14471. },
  14472. "required": ["id", "type", "properties"],
  14473. "additionalProperties": false
  14474. },
  14475. {
  14476. "type": "object",
  14477. "properties": {
  14478. "id": {
  14479. "type": "string"
  14480. },
  14481. "type": {
  14482. "type": "string",
  14483. "enum": ["installation.update-available"]
  14484. },
  14485. "properties": {
  14486. "type": "object",
  14487. "properties": {
  14488. "version": {
  14489. "type": "string"
  14490. }
  14491. },
  14492. "required": ["version"],
  14493. "additionalProperties": false
  14494. }
  14495. },
  14496. "required": ["id", "type", "properties"],
  14497. "additionalProperties": false
  14498. },
  14499. {
  14500. "type": "object",
  14501. "properties": {
  14502. "id": {
  14503. "type": "string"
  14504. },
  14505. "type": {
  14506. "type": "string",
  14507. "enum": ["permission.v2.asked"]
  14508. },
  14509. "properties": {
  14510. "type": "object",
  14511. "properties": {
  14512. "id": {
  14513. "type": "string",
  14514. "pattern": "^per"
  14515. },
  14516. "sessionID": {
  14517. "type": "string",
  14518. "pattern": "^ses"
  14519. },
  14520. "action": {
  14521. "type": "string"
  14522. },
  14523. "resources": {
  14524. "type": "array",
  14525. "items": {
  14526. "type": "string"
  14527. }
  14528. },
  14529. "save": {
  14530. "type": "array",
  14531. "items": {
  14532. "type": "string"
  14533. }
  14534. },
  14535. "metadata": {
  14536. "type": "object"
  14537. },
  14538. "source": {
  14539. "$ref": "#/components/schemas/PermissionV2Source"
  14540. }
  14541. },
  14542. "required": ["id", "sessionID", "action", "resources"],
  14543. "additionalProperties": false
  14544. }
  14545. },
  14546. "required": ["id", "type", "properties"],
  14547. "additionalProperties": false
  14548. },
  14549. {
  14550. "type": "object",
  14551. "properties": {
  14552. "id": {
  14553. "type": "string"
  14554. },
  14555. "type": {
  14556. "type": "string",
  14557. "enum": ["permission.v2.replied"]
  14558. },
  14559. "properties": {
  14560. "type": "object",
  14561. "properties": {
  14562. "sessionID": {
  14563. "type": "string",
  14564. "pattern": "^ses"
  14565. },
  14566. "requestID": {
  14567. "type": "string",
  14568. "pattern": "^per"
  14569. },
  14570. "reply": {
  14571. "$ref": "#/components/schemas/PermissionV2Reply"
  14572. }
  14573. },
  14574. "required": ["sessionID", "requestID", "reply"],
  14575. "additionalProperties": false
  14576. }
  14577. },
  14578. "required": ["id", "type", "properties"],
  14579. "additionalProperties": false
  14580. },
  14581. {
  14582. "type": "object",
  14583. "properties": {
  14584. "id": {
  14585. "type": "string"
  14586. },
  14587. "type": {
  14588. "type": "string",
  14589. "enum": ["file.edited"]
  14590. },
  14591. "properties": {
  14592. "type": "object",
  14593. "properties": {
  14594. "file": {
  14595. "type": "string"
  14596. }
  14597. },
  14598. "required": ["file"],
  14599. "additionalProperties": false
  14600. }
  14601. },
  14602. "required": ["id", "type", "properties"],
  14603. "additionalProperties": false
  14604. },
  14605. {
  14606. "type": "object",
  14607. "properties": {
  14608. "id": {
  14609. "type": "string"
  14610. },
  14611. "type": {
  14612. "type": "string",
  14613. "enum": ["account.added"]
  14614. },
  14615. "properties": {
  14616. "type": "object",
  14617. "properties": {
  14618. "account": {
  14619. "$ref": "#/components/schemas/AuthInfo"
  14620. }
  14621. },
  14622. "required": ["account"],
  14623. "additionalProperties": false
  14624. }
  14625. },
  14626. "required": ["id", "type", "properties"],
  14627. "additionalProperties": false
  14628. },
  14629. {
  14630. "type": "object",
  14631. "properties": {
  14632. "id": {
  14633. "type": "string"
  14634. },
  14635. "type": {
  14636. "type": "string",
  14637. "enum": ["account.removed"]
  14638. },
  14639. "properties": {
  14640. "type": "object",
  14641. "properties": {
  14642. "account": {
  14643. "$ref": "#/components/schemas/AuthInfo"
  14644. }
  14645. },
  14646. "required": ["account"],
  14647. "additionalProperties": false
  14648. }
  14649. },
  14650. "required": ["id", "type", "properties"],
  14651. "additionalProperties": false
  14652. },
  14653. {
  14654. "type": "object",
  14655. "properties": {
  14656. "id": {
  14657. "type": "string"
  14658. },
  14659. "type": {
  14660. "type": "string",
  14661. "enum": ["account.switched"]
  14662. },
  14663. "properties": {
  14664. "type": "object",
  14665. "properties": {
  14666. "serviceID": {
  14667. "type": "string"
  14668. },
  14669. "from": {
  14670. "type": "string"
  14671. },
  14672. "to": {
  14673. "type": "string"
  14674. }
  14675. },
  14676. "required": ["serviceID"],
  14677. "additionalProperties": false
  14678. }
  14679. },
  14680. "required": ["id", "type", "properties"],
  14681. "additionalProperties": false
  14682. },
  14683. {
  14684. "type": "object",
  14685. "properties": {
  14686. "id": {
  14687. "type": "string"
  14688. },
  14689. "type": {
  14690. "type": "string",
  14691. "enum": ["file.watcher.updated"]
  14692. },
  14693. "properties": {
  14694. "type": "object",
  14695. "properties": {
  14696. "file": {
  14697. "type": "string"
  14698. },
  14699. "event": {
  14700. "type": "string",
  14701. "enum": ["add", "change", "unlink"]
  14702. }
  14703. },
  14704. "required": ["file", "event"],
  14705. "additionalProperties": false
  14706. }
  14707. },
  14708. "required": ["id", "type", "properties"],
  14709. "additionalProperties": false
  14710. },
  14711. {
  14712. "type": "object",
  14713. "properties": {
  14714. "id": {
  14715. "type": "string"
  14716. },
  14717. "type": {
  14718. "type": "string",
  14719. "enum": ["lsp.updated"]
  14720. },
  14721. "properties": {
  14722. "type": "object",
  14723. "properties": {}
  14724. }
  14725. },
  14726. "required": ["id", "type", "properties"],
  14727. "additionalProperties": false
  14728. },
  14729. {
  14730. "type": "object",
  14731. "properties": {
  14732. "id": {
  14733. "type": "string"
  14734. },
  14735. "type": {
  14736. "type": "string",
  14737. "enum": ["permission.asked"]
  14738. },
  14739. "properties": {
  14740. "type": "object",
  14741. "properties": {
  14742. "id": {
  14743. "type": "string",
  14744. "pattern": "^per"
  14745. },
  14746. "sessionID": {
  14747. "type": "string",
  14748. "pattern": "^ses"
  14749. },
  14750. "permission": {
  14751. "type": "string"
  14752. },
  14753. "patterns": {
  14754. "type": "array",
  14755. "items": {
  14756. "type": "string"
  14757. }
  14758. },
  14759. "metadata": {
  14760. "type": "object"
  14761. },
  14762. "always": {
  14763. "type": "array",
  14764. "items": {
  14765. "type": "string"
  14766. }
  14767. },
  14768. "tool": {
  14769. "type": "object",
  14770. "properties": {
  14771. "messageID": {
  14772. "type": "string"
  14773. },
  14774. "callID": {
  14775. "type": "string"
  14776. }
  14777. },
  14778. "required": ["messageID", "callID"],
  14779. "additionalProperties": false
  14780. }
  14781. },
  14782. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  14783. "additionalProperties": false
  14784. }
  14785. },
  14786. "required": ["id", "type", "properties"],
  14787. "additionalProperties": false
  14788. },
  14789. {
  14790. "type": "object",
  14791. "properties": {
  14792. "id": {
  14793. "type": "string"
  14794. },
  14795. "type": {
  14796. "type": "string",
  14797. "enum": ["permission.replied"]
  14798. },
  14799. "properties": {
  14800. "type": "object",
  14801. "properties": {
  14802. "sessionID": {
  14803. "type": "string",
  14804. "pattern": "^ses"
  14805. },
  14806. "requestID": {
  14807. "type": "string",
  14808. "pattern": "^per"
  14809. },
  14810. "reply": {
  14811. "type": "string",
  14812. "enum": ["once", "always", "reject"]
  14813. }
  14814. },
  14815. "required": ["sessionID", "requestID", "reply"],
  14816. "additionalProperties": false
  14817. }
  14818. },
  14819. "required": ["id", "type", "properties"],
  14820. "additionalProperties": false
  14821. },
  14822. {
  14823. "type": "object",
  14824. "properties": {
  14825. "id": {
  14826. "type": "string"
  14827. },
  14828. "type": {
  14829. "type": "string",
  14830. "enum": ["tui.prompt.append"]
  14831. },
  14832. "properties": {
  14833. "type": "object",
  14834. "properties": {
  14835. "text": {
  14836. "type": "string"
  14837. }
  14838. },
  14839. "required": ["text"],
  14840. "additionalProperties": false
  14841. }
  14842. },
  14843. "required": ["id", "type", "properties"],
  14844. "additionalProperties": false
  14845. },
  14846. {
  14847. "type": "object",
  14848. "properties": {
  14849. "id": {
  14850. "type": "string"
  14851. },
  14852. "type": {
  14853. "type": "string",
  14854. "enum": ["tui.command.execute"]
  14855. },
  14856. "properties": {
  14857. "type": "object",
  14858. "properties": {
  14859. "command": {
  14860. "anyOf": [
  14861. {
  14862. "type": "string",
  14863. "enum": [
  14864. "session.list",
  14865. "session.new",
  14866. "session.share",
  14867. "session.interrupt",
  14868. "session.compact",
  14869. "session.page.up",
  14870. "session.page.down",
  14871. "session.line.up",
  14872. "session.line.down",
  14873. "session.half.page.up",
  14874. "session.half.page.down",
  14875. "session.first",
  14876. "session.last",
  14877. "prompt.clear",
  14878. "prompt.submit",
  14879. "agent.cycle"
  14880. ]
  14881. },
  14882. {
  14883. "type": "string"
  14884. }
  14885. ]
  14886. }
  14887. },
  14888. "required": ["command"],
  14889. "additionalProperties": false
  14890. }
  14891. },
  14892. "required": ["id", "type", "properties"],
  14893. "additionalProperties": false
  14894. },
  14895. {
  14896. "type": "object",
  14897. "properties": {
  14898. "id": {
  14899. "type": "string"
  14900. },
  14901. "type": {
  14902. "type": "string",
  14903. "enum": ["tui.toast.show"]
  14904. },
  14905. "properties": {
  14906. "type": "object",
  14907. "properties": {
  14908. "title": {
  14909. "type": "string"
  14910. },
  14911. "message": {
  14912. "type": "string"
  14913. },
  14914. "variant": {
  14915. "type": "string",
  14916. "enum": ["info", "success", "warning", "error"]
  14917. },
  14918. "duration": {
  14919. "type": "integer",
  14920. "exclusiveMinimum": 0
  14921. }
  14922. },
  14923. "required": ["message", "variant"],
  14924. "additionalProperties": false
  14925. }
  14926. },
  14927. "required": ["id", "type", "properties"],
  14928. "additionalProperties": false
  14929. },
  14930. {
  14931. "type": "object",
  14932. "properties": {
  14933. "id": {
  14934. "type": "string"
  14935. },
  14936. "type": {
  14937. "type": "string",
  14938. "enum": ["tui.session.select"]
  14939. },
  14940. "properties": {
  14941. "type": "object",
  14942. "properties": {
  14943. "sessionID": {
  14944. "type": "string",
  14945. "pattern": "^ses",
  14946. "description": "Session ID to navigate to"
  14947. }
  14948. },
  14949. "required": ["sessionID"],
  14950. "additionalProperties": false
  14951. }
  14952. },
  14953. "required": ["id", "type", "properties"],
  14954. "additionalProperties": false
  14955. },
  14956. {
  14957. "type": "object",
  14958. "properties": {
  14959. "id": {
  14960. "type": "string"
  14961. },
  14962. "type": {
  14963. "type": "string",
  14964. "enum": ["mcp.tools.changed"]
  14965. },
  14966. "properties": {
  14967. "type": "object",
  14968. "properties": {
  14969. "server": {
  14970. "type": "string"
  14971. }
  14972. },
  14973. "required": ["server"],
  14974. "additionalProperties": false
  14975. }
  14976. },
  14977. "required": ["id", "type", "properties"],
  14978. "additionalProperties": false
  14979. },
  14980. {
  14981. "type": "object",
  14982. "properties": {
  14983. "id": {
  14984. "type": "string"
  14985. },
  14986. "type": {
  14987. "type": "string",
  14988. "enum": ["mcp.browser.open.failed"]
  14989. },
  14990. "properties": {
  14991. "type": "object",
  14992. "properties": {
  14993. "mcpName": {
  14994. "type": "string"
  14995. },
  14996. "url": {
  14997. "type": "string"
  14998. }
  14999. },
  15000. "required": ["mcpName", "url"],
  15001. "additionalProperties": false
  15002. }
  15003. },
  15004. "required": ["id", "type", "properties"],
  15005. "additionalProperties": false
  15006. },
  15007. {
  15008. "type": "object",
  15009. "properties": {
  15010. "id": {
  15011. "type": "string"
  15012. },
  15013. "type": {
  15014. "type": "string",
  15015. "enum": ["command.executed"]
  15016. },
  15017. "properties": {
  15018. "type": "object",
  15019. "properties": {
  15020. "name": {
  15021. "type": "string"
  15022. },
  15023. "sessionID": {
  15024. "type": "string",
  15025. "pattern": "^ses"
  15026. },
  15027. "arguments": {
  15028. "type": "string"
  15029. },
  15030. "messageID": {
  15031. "type": "string",
  15032. "pattern": "^msg"
  15033. }
  15034. },
  15035. "required": ["name", "sessionID", "arguments", "messageID"],
  15036. "additionalProperties": false
  15037. }
  15038. },
  15039. "required": ["id", "type", "properties"],
  15040. "additionalProperties": false
  15041. },
  15042. {
  15043. "type": "object",
  15044. "properties": {
  15045. "id": {
  15046. "type": "string"
  15047. },
  15048. "type": {
  15049. "type": "string",
  15050. "enum": ["project.updated"]
  15051. },
  15052. "properties": {
  15053. "type": "object",
  15054. "properties": {
  15055. "id": {
  15056. "type": "string"
  15057. },
  15058. "worktree": {
  15059. "type": "string"
  15060. },
  15061. "vcs": {
  15062. "type": "string",
  15063. "enum": ["git"]
  15064. },
  15065. "name": {
  15066. "type": "string"
  15067. },
  15068. "icon": {
  15069. "type": "object",
  15070. "properties": {
  15071. "url": {
  15072. "type": "string"
  15073. },
  15074. "override": {
  15075. "type": "string"
  15076. },
  15077. "color": {
  15078. "type": "string"
  15079. }
  15080. },
  15081. "additionalProperties": false
  15082. },
  15083. "commands": {
  15084. "type": "object",
  15085. "properties": {
  15086. "start": {
  15087. "type": "string",
  15088. "description": "Startup script to run when creating a new workspace (worktree)"
  15089. }
  15090. },
  15091. "additionalProperties": false
  15092. },
  15093. "time": {
  15094. "type": "object",
  15095. "properties": {
  15096. "created": {
  15097. "type": "integer",
  15098. "minimum": 0
  15099. },
  15100. "updated": {
  15101. "type": "integer",
  15102. "minimum": 0
  15103. },
  15104. "initialized": {
  15105. "type": "integer",
  15106. "minimum": 0
  15107. }
  15108. },
  15109. "required": ["created", "updated"],
  15110. "additionalProperties": false
  15111. },
  15112. "sandboxes": {
  15113. "type": "array",
  15114. "items": {
  15115. "type": "string"
  15116. }
  15117. }
  15118. },
  15119. "required": ["id", "worktree", "time", "sandboxes"],
  15120. "additionalProperties": false
  15121. }
  15122. },
  15123. "required": ["id", "type", "properties"],
  15124. "additionalProperties": false
  15125. },
  15126. {
  15127. "type": "object",
  15128. "properties": {
  15129. "id": {
  15130. "type": "string"
  15131. },
  15132. "type": {
  15133. "type": "string",
  15134. "enum": ["pty.created"]
  15135. },
  15136. "properties": {
  15137. "type": "object",
  15138. "properties": {
  15139. "info": {
  15140. "$ref": "#/components/schemas/Pty"
  15141. }
  15142. },
  15143. "required": ["info"],
  15144. "additionalProperties": false
  15145. }
  15146. },
  15147. "required": ["id", "type", "properties"],
  15148. "additionalProperties": false
  15149. },
  15150. {
  15151. "type": "object",
  15152. "properties": {
  15153. "id": {
  15154. "type": "string"
  15155. },
  15156. "type": {
  15157. "type": "string",
  15158. "enum": ["pty.updated"]
  15159. },
  15160. "properties": {
  15161. "type": "object",
  15162. "properties": {
  15163. "info": {
  15164. "$ref": "#/components/schemas/Pty"
  15165. }
  15166. },
  15167. "required": ["info"],
  15168. "additionalProperties": false
  15169. }
  15170. },
  15171. "required": ["id", "type", "properties"],
  15172. "additionalProperties": false
  15173. },
  15174. {
  15175. "type": "object",
  15176. "properties": {
  15177. "id": {
  15178. "type": "string"
  15179. },
  15180. "type": {
  15181. "type": "string",
  15182. "enum": ["pty.exited"]
  15183. },
  15184. "properties": {
  15185. "type": "object",
  15186. "properties": {
  15187. "id": {
  15188. "type": "string",
  15189. "pattern": "^pty"
  15190. },
  15191. "exitCode": {
  15192. "type": "integer",
  15193. "minimum": 0
  15194. }
  15195. },
  15196. "required": ["id", "exitCode"],
  15197. "additionalProperties": false
  15198. }
  15199. },
  15200. "required": ["id", "type", "properties"],
  15201. "additionalProperties": false
  15202. },
  15203. {
  15204. "type": "object",
  15205. "properties": {
  15206. "id": {
  15207. "type": "string"
  15208. },
  15209. "type": {
  15210. "type": "string",
  15211. "enum": ["pty.deleted"]
  15212. },
  15213. "properties": {
  15214. "type": "object",
  15215. "properties": {
  15216. "id": {
  15217. "type": "string",
  15218. "pattern": "^pty"
  15219. }
  15220. },
  15221. "required": ["id"],
  15222. "additionalProperties": false
  15223. }
  15224. },
  15225. "required": ["id", "type", "properties"],
  15226. "additionalProperties": false
  15227. },
  15228. {
  15229. "type": "object",
  15230. "properties": {
  15231. "id": {
  15232. "type": "string"
  15233. },
  15234. "type": {
  15235. "type": "string",
  15236. "enum": ["question.asked"]
  15237. },
  15238. "properties": {
  15239. "type": "object",
  15240. "properties": {
  15241. "id": {
  15242. "type": "string",
  15243. "pattern": "^que"
  15244. },
  15245. "sessionID": {
  15246. "type": "string",
  15247. "pattern": "^ses"
  15248. },
  15249. "questions": {
  15250. "type": "array",
  15251. "items": {
  15252. "$ref": "#/components/schemas/QuestionInfo"
  15253. },
  15254. "description": "Questions to ask"
  15255. },
  15256. "tool": {
  15257. "$ref": "#/components/schemas/QuestionTool"
  15258. }
  15259. },
  15260. "required": ["id", "sessionID", "questions"],
  15261. "additionalProperties": false
  15262. }
  15263. },
  15264. "required": ["id", "type", "properties"],
  15265. "additionalProperties": false
  15266. },
  15267. {
  15268. "type": "object",
  15269. "properties": {
  15270. "id": {
  15271. "type": "string"
  15272. },
  15273. "type": {
  15274. "type": "string",
  15275. "enum": ["question.replied"]
  15276. },
  15277. "properties": {
  15278. "type": "object",
  15279. "properties": {
  15280. "sessionID": {
  15281. "type": "string",
  15282. "pattern": "^ses"
  15283. },
  15284. "requestID": {
  15285. "type": "string",
  15286. "pattern": "^que"
  15287. },
  15288. "answers": {
  15289. "type": "array",
  15290. "items": {
  15291. "$ref": "#/components/schemas/QuestionAnswer"
  15292. }
  15293. }
  15294. },
  15295. "required": ["sessionID", "requestID", "answers"],
  15296. "additionalProperties": false
  15297. }
  15298. },
  15299. "required": ["id", "type", "properties"],
  15300. "additionalProperties": false
  15301. },
  15302. {
  15303. "type": "object",
  15304. "properties": {
  15305. "id": {
  15306. "type": "string"
  15307. },
  15308. "type": {
  15309. "type": "string",
  15310. "enum": ["question.rejected"]
  15311. },
  15312. "properties": {
  15313. "type": "object",
  15314. "properties": {
  15315. "sessionID": {
  15316. "type": "string",
  15317. "pattern": "^ses"
  15318. },
  15319. "requestID": {
  15320. "type": "string",
  15321. "pattern": "^que"
  15322. }
  15323. },
  15324. "required": ["sessionID", "requestID"],
  15325. "additionalProperties": false
  15326. }
  15327. },
  15328. "required": ["id", "type", "properties"],
  15329. "additionalProperties": false
  15330. },
  15331. {
  15332. "type": "object",
  15333. "properties": {
  15334. "id": {
  15335. "type": "string"
  15336. },
  15337. "type": {
  15338. "type": "string",
  15339. "enum": ["session.status"]
  15340. },
  15341. "properties": {
  15342. "type": "object",
  15343. "properties": {
  15344. "sessionID": {
  15345. "type": "string",
  15346. "pattern": "^ses"
  15347. },
  15348. "status": {
  15349. "$ref": "#/components/schemas/SessionStatus"
  15350. }
  15351. },
  15352. "required": ["sessionID", "status"],
  15353. "additionalProperties": false
  15354. }
  15355. },
  15356. "required": ["id", "type", "properties"],
  15357. "additionalProperties": false
  15358. },
  15359. {
  15360. "type": "object",
  15361. "properties": {
  15362. "id": {
  15363. "type": "string"
  15364. },
  15365. "type": {
  15366. "type": "string",
  15367. "enum": ["session.idle"]
  15368. },
  15369. "properties": {
  15370. "type": "object",
  15371. "properties": {
  15372. "sessionID": {
  15373. "type": "string",
  15374. "pattern": "^ses"
  15375. }
  15376. },
  15377. "required": ["sessionID"],
  15378. "additionalProperties": false
  15379. }
  15380. },
  15381. "required": ["id", "type", "properties"],
  15382. "additionalProperties": false
  15383. },
  15384. {
  15385. "type": "object",
  15386. "properties": {
  15387. "id": {
  15388. "type": "string"
  15389. },
  15390. "type": {
  15391. "type": "string",
  15392. "enum": ["session.compacted"]
  15393. },
  15394. "properties": {
  15395. "type": "object",
  15396. "properties": {
  15397. "sessionID": {
  15398. "type": "string",
  15399. "pattern": "^ses"
  15400. }
  15401. },
  15402. "required": ["sessionID"],
  15403. "additionalProperties": false
  15404. }
  15405. },
  15406. "required": ["id", "type", "properties"],
  15407. "additionalProperties": false
  15408. },
  15409. {
  15410. "type": "object",
  15411. "properties": {
  15412. "id": {
  15413. "type": "string"
  15414. },
  15415. "type": {
  15416. "type": "string",
  15417. "enum": ["todo.updated"]
  15418. },
  15419. "properties": {
  15420. "type": "object",
  15421. "properties": {
  15422. "sessionID": {
  15423. "type": "string",
  15424. "pattern": "^ses"
  15425. },
  15426. "todos": {
  15427. "type": "array",
  15428. "items": {
  15429. "$ref": "#/components/schemas/Todo"
  15430. }
  15431. }
  15432. },
  15433. "required": ["sessionID", "todos"],
  15434. "additionalProperties": false
  15435. }
  15436. },
  15437. "required": ["id", "type", "properties"],
  15438. "additionalProperties": false
  15439. },
  15440. {
  15441. "type": "object",
  15442. "properties": {
  15443. "id": {
  15444. "type": "string"
  15445. },
  15446. "type": {
  15447. "type": "string",
  15448. "enum": ["vcs.branch.updated"]
  15449. },
  15450. "properties": {
  15451. "type": "object",
  15452. "properties": {
  15453. "branch": {
  15454. "type": "string"
  15455. }
  15456. },
  15457. "additionalProperties": false
  15458. }
  15459. },
  15460. "required": ["id", "type", "properties"],
  15461. "additionalProperties": false
  15462. },
  15463. {
  15464. "type": "object",
  15465. "properties": {
  15466. "id": {
  15467. "type": "string"
  15468. },
  15469. "type": {
  15470. "type": "string",
  15471. "enum": ["worktree.ready"]
  15472. },
  15473. "properties": {
  15474. "type": "object",
  15475. "properties": {
  15476. "name": {
  15477. "type": "string"
  15478. },
  15479. "branch": {
  15480. "type": "string"
  15481. }
  15482. },
  15483. "required": ["name"],
  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": ["worktree.failed"]
  15499. },
  15500. "properties": {
  15501. "type": "object",
  15502. "properties": {
  15503. "message": {
  15504. "type": "string"
  15505. }
  15506. },
  15507. "required": ["message"],
  15508. "additionalProperties": false
  15509. }
  15510. },
  15511. "required": ["id", "type", "properties"],
  15512. "additionalProperties": false
  15513. },
  15514. {
  15515. "type": "object",
  15516. "properties": {
  15517. "id": {
  15518. "type": "string"
  15519. },
  15520. "type": {
  15521. "type": "string",
  15522. "enum": ["workspace.ready"]
  15523. },
  15524. "properties": {
  15525. "type": "object",
  15526. "properties": {
  15527. "name": {
  15528. "type": "string"
  15529. }
  15530. },
  15531. "required": ["name"],
  15532. "additionalProperties": false
  15533. }
  15534. },
  15535. "required": ["id", "type", "properties"],
  15536. "additionalProperties": false
  15537. },
  15538. {
  15539. "type": "object",
  15540. "properties": {
  15541. "id": {
  15542. "type": "string"
  15543. },
  15544. "type": {
  15545. "type": "string",
  15546. "enum": ["workspace.failed"]
  15547. },
  15548. "properties": {
  15549. "type": "object",
  15550. "properties": {
  15551. "message": {
  15552. "type": "string"
  15553. }
  15554. },
  15555. "required": ["message"],
  15556. "additionalProperties": false
  15557. }
  15558. },
  15559. "required": ["id", "type", "properties"],
  15560. "additionalProperties": false
  15561. },
  15562. {
  15563. "type": "object",
  15564. "properties": {
  15565. "id": {
  15566. "type": "string"
  15567. },
  15568. "type": {
  15569. "type": "string",
  15570. "enum": ["workspace.status"]
  15571. },
  15572. "properties": {
  15573. "type": "object",
  15574. "properties": {
  15575. "workspaceID": {
  15576. "type": "string",
  15577. "pattern": "^wrk"
  15578. },
  15579. "status": {
  15580. "type": "string",
  15581. "enum": ["connected", "connecting", "disconnected", "error"]
  15582. }
  15583. },
  15584. "required": ["workspaceID", "status"],
  15585. "additionalProperties": false
  15586. }
  15587. },
  15588. "required": ["id", "type", "properties"],
  15589. "additionalProperties": false
  15590. },
  15591. {
  15592. "type": "object",
  15593. "properties": {
  15594. "id": {
  15595. "type": "string"
  15596. },
  15597. "type": {
  15598. "type": "string",
  15599. "enum": ["server.connected"]
  15600. },
  15601. "properties": {
  15602. "type": "object",
  15603. "properties": {}
  15604. }
  15605. },
  15606. "required": ["id", "type", "properties"],
  15607. "additionalProperties": false
  15608. },
  15609. {
  15610. "type": "object",
  15611. "properties": {
  15612. "id": {
  15613. "type": "string"
  15614. },
  15615. "type": {
  15616. "type": "string",
  15617. "enum": ["global.disposed"]
  15618. },
  15619. "properties": {
  15620. "type": "object",
  15621. "properties": {}
  15622. }
  15623. },
  15624. "required": ["id", "type", "properties"],
  15625. "additionalProperties": false
  15626. },
  15627. {
  15628. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15629. },
  15630. {
  15631. "$ref": "#/components/schemas/SyncEventSessionCreated"
  15632. },
  15633. {
  15634. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  15635. },
  15636. {
  15637. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  15638. },
  15639. {
  15640. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  15641. },
  15642. {
  15643. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  15644. },
  15645. {
  15646. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  15647. },
  15648. {
  15649. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  15650. },
  15651. {
  15652. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  15653. },
  15654. {
  15655. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  15656. },
  15657. {
  15658. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  15659. },
  15660. {
  15661. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  15662. },
  15663. {
  15664. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  15665. },
  15666. {
  15667. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  15668. },
  15669. {
  15670. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  15671. },
  15672. {
  15673. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  15674. },
  15675. {
  15676. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  15677. },
  15678. {
  15679. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  15680. },
  15681. {
  15682. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  15683. },
  15684. {
  15685. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  15686. },
  15687. {
  15688. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  15689. },
  15690. {
  15691. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  15692. },
  15693. {
  15694. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  15695. },
  15696. {
  15697. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  15698. },
  15699. {
  15700. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  15701. },
  15702. {
  15703. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  15704. },
  15705. {
  15706. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  15707. },
  15708. {
  15709. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  15710. },
  15711. {
  15712. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  15713. },
  15714. {
  15715. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  15716. },
  15717. {
  15718. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  15719. },
  15720. {
  15721. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  15722. },
  15723. {
  15724. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  15725. },
  15726. {
  15727. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  15728. }
  15729. ]
  15730. }
  15731. },
  15732. "required": ["directory", "payload"],
  15733. "additionalProperties": false
  15734. },
  15735. "LogLevel": {
  15736. "type": "string",
  15737. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  15738. "description": "Log level"
  15739. },
  15740. "ServerConfig": {
  15741. "type": "object",
  15742. "properties": {
  15743. "port": {
  15744. "type": "integer",
  15745. "exclusiveMinimum": 0
  15746. },
  15747. "hostname": {
  15748. "type": "string"
  15749. },
  15750. "mdns": {
  15751. "type": "boolean"
  15752. },
  15753. "mdnsDomain": {
  15754. "type": "string"
  15755. },
  15756. "cors": {
  15757. "type": "array",
  15758. "items": {
  15759. "type": "string"
  15760. }
  15761. }
  15762. },
  15763. "additionalProperties": false,
  15764. "description": "Server configuration for opencode serve and web commands"
  15765. },
  15766. "ReferenceConfigEntry": {
  15767. "anyOf": [
  15768. {
  15769. "type": "string"
  15770. },
  15771. {
  15772. "type": "object",
  15773. "properties": {
  15774. "repository": {
  15775. "type": "string",
  15776. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  15777. },
  15778. "branch": {
  15779. "type": "string"
  15780. }
  15781. },
  15782. "required": ["repository"],
  15783. "additionalProperties": false
  15784. },
  15785. {
  15786. "type": "object",
  15787. "properties": {
  15788. "path": {
  15789. "type": "string",
  15790. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  15791. }
  15792. },
  15793. "required": ["path"],
  15794. "additionalProperties": false
  15795. }
  15796. ]
  15797. },
  15798. "ReferenceConfig": {
  15799. "type": "object",
  15800. "additionalProperties": {
  15801. "$ref": "#/components/schemas/ReferenceConfigEntry"
  15802. }
  15803. },
  15804. "PermissionActionConfig": {
  15805. "type": "string",
  15806. "enum": ["ask", "allow", "deny"]
  15807. },
  15808. "PermissionObjectConfig": {
  15809. "type": "object",
  15810. "additionalProperties": {
  15811. "$ref": "#/components/schemas/PermissionActionConfig"
  15812. }
  15813. },
  15814. "PermissionRuleConfig": {
  15815. "anyOf": [
  15816. {
  15817. "$ref": "#/components/schemas/PermissionActionConfig"
  15818. },
  15819. {
  15820. "$ref": "#/components/schemas/PermissionObjectConfig"
  15821. }
  15822. ]
  15823. },
  15824. "PermissionConfig": {
  15825. "anyOf": [
  15826. {
  15827. "$ref": "#/components/schemas/PermissionActionConfig"
  15828. },
  15829. {
  15830. "type": "object",
  15831. "properties": {
  15832. "read": {
  15833. "$ref": "#/components/schemas/PermissionRuleConfig"
  15834. },
  15835. "edit": {
  15836. "$ref": "#/components/schemas/PermissionRuleConfig"
  15837. },
  15838. "glob": {
  15839. "$ref": "#/components/schemas/PermissionRuleConfig"
  15840. },
  15841. "grep": {
  15842. "$ref": "#/components/schemas/PermissionRuleConfig"
  15843. },
  15844. "list": {
  15845. "$ref": "#/components/schemas/PermissionRuleConfig"
  15846. },
  15847. "bash": {
  15848. "$ref": "#/components/schemas/PermissionRuleConfig"
  15849. },
  15850. "task": {
  15851. "$ref": "#/components/schemas/PermissionRuleConfig"
  15852. },
  15853. "external_directory": {
  15854. "$ref": "#/components/schemas/PermissionRuleConfig"
  15855. },
  15856. "todowrite": {
  15857. "$ref": "#/components/schemas/PermissionActionConfig"
  15858. },
  15859. "question": {
  15860. "$ref": "#/components/schemas/PermissionActionConfig"
  15861. },
  15862. "webfetch": {
  15863. "$ref": "#/components/schemas/PermissionActionConfig"
  15864. },
  15865. "websearch": {
  15866. "$ref": "#/components/schemas/PermissionActionConfig"
  15867. },
  15868. "lsp": {
  15869. "$ref": "#/components/schemas/PermissionRuleConfig"
  15870. },
  15871. "doom_loop": {
  15872. "$ref": "#/components/schemas/PermissionActionConfig"
  15873. },
  15874. "skill": {
  15875. "$ref": "#/components/schemas/PermissionRuleConfig"
  15876. }
  15877. },
  15878. "additionalProperties": {
  15879. "$ref": "#/components/schemas/PermissionRuleConfig"
  15880. }
  15881. }
  15882. ]
  15883. },
  15884. "AgentConfig": {
  15885. "type": "object",
  15886. "properties": {
  15887. "model": {
  15888. "type": "string"
  15889. },
  15890. "variant": {
  15891. "type": "string"
  15892. },
  15893. "temperature": {
  15894. "type": "number"
  15895. },
  15896. "top_p": {
  15897. "type": "number"
  15898. },
  15899. "prompt": {
  15900. "type": "string"
  15901. },
  15902. "tools": {
  15903. "type": "object",
  15904. "additionalProperties": {
  15905. "type": "boolean"
  15906. }
  15907. },
  15908. "disable": {
  15909. "type": "boolean"
  15910. },
  15911. "description": {
  15912. "type": "string"
  15913. },
  15914. "mode": {
  15915. "type": "string",
  15916. "enum": ["subagent", "primary", "all"]
  15917. },
  15918. "hidden": {
  15919. "type": "boolean"
  15920. },
  15921. "options": {
  15922. "type": "object"
  15923. },
  15924. "color": {
  15925. "anyOf": [
  15926. {
  15927. "type": "string",
  15928. "pattern": "^#[0-9a-fA-F]{6}$"
  15929. },
  15930. {
  15931. "type": "string",
  15932. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  15933. }
  15934. ],
  15935. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  15936. },
  15937. "steps": {
  15938. "type": "integer",
  15939. "exclusiveMinimum": 0
  15940. },
  15941. "maxSteps": {
  15942. "type": "integer",
  15943. "exclusiveMinimum": 0
  15944. },
  15945. "permission": {
  15946. "$ref": "#/components/schemas/PermissionConfig"
  15947. }
  15948. },
  15949. "additionalProperties": {}
  15950. },
  15951. "ProviderConfig": {
  15952. "type": "object",
  15953. "properties": {
  15954. "api": {
  15955. "type": "string"
  15956. },
  15957. "name": {
  15958. "type": "string"
  15959. },
  15960. "env": {
  15961. "type": "array",
  15962. "items": {
  15963. "type": "string"
  15964. }
  15965. },
  15966. "id": {
  15967. "type": "string"
  15968. },
  15969. "npm": {
  15970. "type": "string"
  15971. },
  15972. "whitelist": {
  15973. "type": "array",
  15974. "items": {
  15975. "type": "string"
  15976. }
  15977. },
  15978. "blacklist": {
  15979. "type": "array",
  15980. "items": {
  15981. "type": "string"
  15982. }
  15983. },
  15984. "options": {
  15985. "type": "object",
  15986. "properties": {
  15987. "apiKey": {
  15988. "type": "string"
  15989. },
  15990. "baseURL": {
  15991. "type": "string"
  15992. },
  15993. "enterpriseUrl": {
  15994. "type": "string"
  15995. },
  15996. "setCacheKey": {
  15997. "type": "boolean"
  15998. },
  15999. "timeout": {
  16000. "anyOf": [
  16001. {
  16002. "type": "integer",
  16003. "exclusiveMinimum": 0
  16004. },
  16005. {
  16006. "type": "boolean",
  16007. "enum": [false]
  16008. }
  16009. ],
  16010. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  16011. },
  16012. "headerTimeout": {
  16013. "anyOf": [
  16014. {
  16015. "type": "integer",
  16016. "exclusiveMinimum": 0
  16017. },
  16018. {
  16019. "type": "boolean",
  16020. "enum": [false]
  16021. }
  16022. ],
  16023. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  16024. },
  16025. "chunkTimeout": {
  16026. "type": "integer",
  16027. "exclusiveMinimum": 0
  16028. }
  16029. },
  16030. "additionalProperties": {}
  16031. },
  16032. "models": {
  16033. "type": "object",
  16034. "additionalProperties": {
  16035. "type": "object",
  16036. "properties": {
  16037. "id": {
  16038. "type": "string"
  16039. },
  16040. "name": {
  16041. "type": "string"
  16042. },
  16043. "family": {
  16044. "type": "string"
  16045. },
  16046. "release_date": {
  16047. "type": "string"
  16048. },
  16049. "attachment": {
  16050. "type": "boolean"
  16051. },
  16052. "reasoning": {
  16053. "type": "boolean"
  16054. },
  16055. "temperature": {
  16056. "type": "boolean"
  16057. },
  16058. "tool_call": {
  16059. "type": "boolean"
  16060. },
  16061. "interleaved": {
  16062. "anyOf": [
  16063. {
  16064. "type": "boolean",
  16065. "enum": [true]
  16066. },
  16067. {
  16068. "type": "object",
  16069. "properties": {
  16070. "field": {
  16071. "type": "string",
  16072. "enum": ["reasoning_content", "reasoning_details"]
  16073. }
  16074. },
  16075. "required": ["field"],
  16076. "additionalProperties": false
  16077. }
  16078. ]
  16079. },
  16080. "cost": {
  16081. "type": "object",
  16082. "properties": {
  16083. "input": {
  16084. "type": "number"
  16085. },
  16086. "output": {
  16087. "type": "number"
  16088. },
  16089. "cache_read": {
  16090. "type": "number"
  16091. },
  16092. "cache_write": {
  16093. "type": "number"
  16094. },
  16095. "context_over_200k": {
  16096. "type": "object",
  16097. "properties": {
  16098. "input": {
  16099. "type": "number"
  16100. },
  16101. "output": {
  16102. "type": "number"
  16103. },
  16104. "cache_read": {
  16105. "type": "number"
  16106. },
  16107. "cache_write": {
  16108. "type": "number"
  16109. }
  16110. },
  16111. "required": ["input", "output"],
  16112. "additionalProperties": false
  16113. }
  16114. },
  16115. "required": ["input", "output"],
  16116. "additionalProperties": false
  16117. },
  16118. "limit": {
  16119. "type": "object",
  16120. "properties": {
  16121. "context": {
  16122. "type": "number"
  16123. },
  16124. "input": {
  16125. "type": "number"
  16126. },
  16127. "output": {
  16128. "type": "number"
  16129. }
  16130. },
  16131. "required": ["context", "output"],
  16132. "additionalProperties": false
  16133. },
  16134. "modalities": {
  16135. "type": "object",
  16136. "properties": {
  16137. "input": {
  16138. "type": "array",
  16139. "items": {
  16140. "type": "string",
  16141. "enum": ["text", "audio", "image", "video", "pdf"]
  16142. }
  16143. },
  16144. "output": {
  16145. "type": "array",
  16146. "items": {
  16147. "type": "string",
  16148. "enum": ["text", "audio", "image", "video", "pdf"]
  16149. }
  16150. }
  16151. },
  16152. "additionalProperties": false
  16153. },
  16154. "experimental": {
  16155. "type": "boolean"
  16156. },
  16157. "status": {
  16158. "type": "string",
  16159. "enum": ["alpha", "beta", "deprecated", "active"]
  16160. },
  16161. "provider": {
  16162. "type": "object",
  16163. "properties": {
  16164. "npm": {
  16165. "type": "string"
  16166. },
  16167. "api": {
  16168. "type": "string"
  16169. }
  16170. },
  16171. "additionalProperties": false
  16172. },
  16173. "options": {
  16174. "type": "object"
  16175. },
  16176. "headers": {
  16177. "type": "object",
  16178. "additionalProperties": {
  16179. "type": "string"
  16180. }
  16181. },
  16182. "variants": {
  16183. "type": "object",
  16184. "additionalProperties": {
  16185. "type": "object",
  16186. "properties": {
  16187. "disabled": {
  16188. "type": "boolean"
  16189. }
  16190. },
  16191. "additionalProperties": {}
  16192. },
  16193. "description": "Variant-specific configuration"
  16194. }
  16195. },
  16196. "additionalProperties": false
  16197. }
  16198. }
  16199. },
  16200. "additionalProperties": false
  16201. },
  16202. "McpLocalConfig": {
  16203. "type": "object",
  16204. "properties": {
  16205. "type": {
  16206. "type": "string",
  16207. "enum": ["local"],
  16208. "description": "Type of MCP server connection"
  16209. },
  16210. "command": {
  16211. "type": "array",
  16212. "items": {
  16213. "type": "string"
  16214. },
  16215. "description": "Command and arguments to run the MCP server"
  16216. },
  16217. "environment": {
  16218. "type": "object",
  16219. "additionalProperties": {
  16220. "type": "string"
  16221. }
  16222. },
  16223. "enabled": {
  16224. "type": "boolean"
  16225. },
  16226. "timeout": {
  16227. "type": "integer",
  16228. "exclusiveMinimum": 0
  16229. }
  16230. },
  16231. "required": ["type", "command"],
  16232. "additionalProperties": false
  16233. },
  16234. "McpOAuthConfig": {
  16235. "type": "object",
  16236. "properties": {
  16237. "clientId": {
  16238. "type": "string"
  16239. },
  16240. "clientSecret": {
  16241. "type": "string"
  16242. },
  16243. "scope": {
  16244. "type": "string"
  16245. },
  16246. "callbackPort": {
  16247. "type": "integer",
  16248. "minimum": 1,
  16249. "maximum": 65535
  16250. },
  16251. "redirectUri": {
  16252. "type": "string"
  16253. }
  16254. },
  16255. "additionalProperties": false
  16256. },
  16257. "McpRemoteConfig": {
  16258. "type": "object",
  16259. "properties": {
  16260. "type": {
  16261. "type": "string",
  16262. "enum": ["remote"],
  16263. "description": "Type of MCP server connection"
  16264. },
  16265. "url": {
  16266. "type": "string",
  16267. "description": "URL of the remote MCP server"
  16268. },
  16269. "enabled": {
  16270. "type": "boolean"
  16271. },
  16272. "headers": {
  16273. "type": "object",
  16274. "additionalProperties": {
  16275. "type": "string"
  16276. }
  16277. },
  16278. "oauth": {
  16279. "anyOf": [
  16280. {
  16281. "$ref": "#/components/schemas/McpOAuthConfig"
  16282. },
  16283. {
  16284. "type": "boolean",
  16285. "enum": [false]
  16286. }
  16287. ],
  16288. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  16289. },
  16290. "timeout": {
  16291. "type": "integer",
  16292. "exclusiveMinimum": 0
  16293. }
  16294. },
  16295. "required": ["type", "url"],
  16296. "additionalProperties": false
  16297. },
  16298. "LayoutConfig": {
  16299. "type": "string",
  16300. "enum": ["auto", "stretch"],
  16301. "description": "@deprecated Always uses stretch layout."
  16302. },
  16303. "ImageAttachmentConfig": {
  16304. "type": "object",
  16305. "properties": {
  16306. "auto_resize": {
  16307. "type": "boolean"
  16308. },
  16309. "max_width": {
  16310. "type": "integer",
  16311. "exclusiveMinimum": 0
  16312. },
  16313. "max_height": {
  16314. "type": "integer",
  16315. "exclusiveMinimum": 0
  16316. },
  16317. "max_base64_bytes": {
  16318. "type": "integer",
  16319. "exclusiveMinimum": 0
  16320. }
  16321. },
  16322. "additionalProperties": false
  16323. },
  16324. "AttachmentConfig": {
  16325. "type": "object",
  16326. "properties": {
  16327. "image": {
  16328. "$ref": "#/components/schemas/ImageAttachmentConfig"
  16329. }
  16330. },
  16331. "additionalProperties": false
  16332. },
  16333. "Config": {
  16334. "type": "object",
  16335. "properties": {
  16336. "$schema": {
  16337. "type": "string"
  16338. },
  16339. "shell": {
  16340. "type": "string"
  16341. },
  16342. "logLevel": {
  16343. "$ref": "#/components/schemas/LogLevel"
  16344. },
  16345. "server": {
  16346. "$ref": "#/components/schemas/ServerConfig"
  16347. },
  16348. "command": {
  16349. "type": "object",
  16350. "additionalProperties": {
  16351. "type": "object",
  16352. "properties": {
  16353. "template": {
  16354. "type": "string"
  16355. },
  16356. "description": {
  16357. "type": "string"
  16358. },
  16359. "agent": {
  16360. "type": "string"
  16361. },
  16362. "model": {
  16363. "type": "string"
  16364. },
  16365. "subtask": {
  16366. "type": "boolean"
  16367. }
  16368. },
  16369. "required": ["template"],
  16370. "additionalProperties": false
  16371. }
  16372. },
  16373. "skills": {
  16374. "type": "object",
  16375. "properties": {
  16376. "paths": {
  16377. "type": "array",
  16378. "items": {
  16379. "type": "string"
  16380. }
  16381. },
  16382. "urls": {
  16383. "type": "array",
  16384. "items": {
  16385. "type": "string"
  16386. }
  16387. }
  16388. },
  16389. "additionalProperties": false
  16390. },
  16391. "reference": {
  16392. "$ref": "#/components/schemas/ReferenceConfig"
  16393. },
  16394. "watcher": {
  16395. "type": "object",
  16396. "properties": {
  16397. "ignore": {
  16398. "type": "array",
  16399. "items": {
  16400. "type": "string"
  16401. }
  16402. }
  16403. },
  16404. "additionalProperties": false
  16405. },
  16406. "snapshot": {
  16407. "type": "boolean"
  16408. },
  16409. "plugin": {
  16410. "type": "array",
  16411. "items": {
  16412. "anyOf": [
  16413. {
  16414. "type": "string"
  16415. },
  16416. {
  16417. "type": "array",
  16418. "prefixItems": [
  16419. {
  16420. "type": "string"
  16421. },
  16422. {
  16423. "type": "object"
  16424. }
  16425. ],
  16426. "maxItems": 2,
  16427. "minItems": 2
  16428. }
  16429. ]
  16430. }
  16431. },
  16432. "share": {
  16433. "type": "string",
  16434. "enum": ["manual", "auto", "disabled"]
  16435. },
  16436. "autoshare": {
  16437. "type": "boolean"
  16438. },
  16439. "autoupdate": {
  16440. "anyOf": [
  16441. {
  16442. "type": "boolean"
  16443. },
  16444. {
  16445. "type": "string",
  16446. "enum": ["notify"]
  16447. }
  16448. ],
  16449. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  16450. },
  16451. "disabled_providers": {
  16452. "type": "array",
  16453. "items": {
  16454. "type": "string"
  16455. }
  16456. },
  16457. "enabled_providers": {
  16458. "type": "array",
  16459. "items": {
  16460. "type": "string"
  16461. }
  16462. },
  16463. "model": {
  16464. "type": "string"
  16465. },
  16466. "small_model": {
  16467. "type": "string"
  16468. },
  16469. "default_agent": {
  16470. "type": "string"
  16471. },
  16472. "username": {
  16473. "type": "string"
  16474. },
  16475. "mode": {
  16476. "type": "object",
  16477. "properties": {
  16478. "build": {
  16479. "$ref": "#/components/schemas/AgentConfig"
  16480. },
  16481. "plan": {
  16482. "$ref": "#/components/schemas/AgentConfig"
  16483. }
  16484. },
  16485. "additionalProperties": {
  16486. "$ref": "#/components/schemas/AgentConfig"
  16487. }
  16488. },
  16489. "agent": {
  16490. "type": "object",
  16491. "properties": {
  16492. "plan": {
  16493. "$ref": "#/components/schemas/AgentConfig"
  16494. },
  16495. "build": {
  16496. "$ref": "#/components/schemas/AgentConfig"
  16497. },
  16498. "general": {
  16499. "$ref": "#/components/schemas/AgentConfig"
  16500. },
  16501. "explore": {
  16502. "$ref": "#/components/schemas/AgentConfig"
  16503. },
  16504. "title": {
  16505. "$ref": "#/components/schemas/AgentConfig"
  16506. },
  16507. "summary": {
  16508. "$ref": "#/components/schemas/AgentConfig"
  16509. },
  16510. "compaction": {
  16511. "$ref": "#/components/schemas/AgentConfig"
  16512. }
  16513. },
  16514. "additionalProperties": {
  16515. "$ref": "#/components/schemas/AgentConfig"
  16516. }
  16517. },
  16518. "provider": {
  16519. "type": "object",
  16520. "additionalProperties": {
  16521. "$ref": "#/components/schemas/ProviderConfig"
  16522. }
  16523. },
  16524. "mcp": {
  16525. "type": "object",
  16526. "additionalProperties": {
  16527. "anyOf": [
  16528. {
  16529. "$ref": "#/components/schemas/McpLocalConfig"
  16530. },
  16531. {
  16532. "$ref": "#/components/schemas/McpRemoteConfig"
  16533. },
  16534. {
  16535. "type": "object",
  16536. "properties": {
  16537. "enabled": {
  16538. "type": "boolean"
  16539. }
  16540. },
  16541. "required": ["enabled"],
  16542. "additionalProperties": false
  16543. }
  16544. ]
  16545. }
  16546. },
  16547. "formatter": {
  16548. "anyOf": [
  16549. {
  16550. "type": "boolean"
  16551. },
  16552. {
  16553. "type": "object",
  16554. "additionalProperties": {
  16555. "type": "object",
  16556. "properties": {
  16557. "disabled": {
  16558. "type": "boolean"
  16559. },
  16560. "command": {
  16561. "type": "array",
  16562. "items": {
  16563. "type": "string"
  16564. }
  16565. },
  16566. "environment": {
  16567. "type": "object",
  16568. "additionalProperties": {
  16569. "type": "string"
  16570. }
  16571. },
  16572. "extensions": {
  16573. "type": "array",
  16574. "items": {
  16575. "type": "string"
  16576. }
  16577. }
  16578. },
  16579. "additionalProperties": false
  16580. }
  16581. }
  16582. ],
  16583. "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."
  16584. },
  16585. "lsp": {
  16586. "anyOf": [
  16587. {
  16588. "type": "boolean"
  16589. },
  16590. {
  16591. "type": "object",
  16592. "additionalProperties": {
  16593. "anyOf": [
  16594. {
  16595. "type": "object",
  16596. "properties": {
  16597. "disabled": {
  16598. "type": "boolean",
  16599. "enum": [true]
  16600. }
  16601. },
  16602. "required": ["disabled"],
  16603. "additionalProperties": false
  16604. },
  16605. {
  16606. "type": "object",
  16607. "properties": {
  16608. "command": {
  16609. "type": "array",
  16610. "items": {
  16611. "type": "string"
  16612. }
  16613. },
  16614. "extensions": {
  16615. "type": "array",
  16616. "items": {
  16617. "type": "string"
  16618. }
  16619. },
  16620. "disabled": {
  16621. "type": "boolean"
  16622. },
  16623. "env": {
  16624. "type": "object",
  16625. "additionalProperties": {
  16626. "type": "string"
  16627. }
  16628. },
  16629. "initialization": {
  16630. "type": "object"
  16631. }
  16632. },
  16633. "required": ["command"],
  16634. "additionalProperties": false
  16635. }
  16636. ]
  16637. }
  16638. }
  16639. ],
  16640. "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."
  16641. },
  16642. "instructions": {
  16643. "type": "array",
  16644. "items": {
  16645. "type": "string"
  16646. }
  16647. },
  16648. "layout": {
  16649. "$ref": "#/components/schemas/LayoutConfig"
  16650. },
  16651. "permission": {
  16652. "$ref": "#/components/schemas/PermissionConfig"
  16653. },
  16654. "tools": {
  16655. "type": "object",
  16656. "additionalProperties": {
  16657. "type": "boolean"
  16658. }
  16659. },
  16660. "attachment": {
  16661. "$ref": "#/components/schemas/AttachmentConfig"
  16662. },
  16663. "enterprise": {
  16664. "type": "object",
  16665. "properties": {
  16666. "url": {
  16667. "type": "string"
  16668. }
  16669. },
  16670. "additionalProperties": false
  16671. },
  16672. "tool_output": {
  16673. "type": "object",
  16674. "properties": {
  16675. "max_lines": {
  16676. "type": "integer",
  16677. "exclusiveMinimum": 0
  16678. },
  16679. "max_bytes": {
  16680. "type": "integer",
  16681. "exclusiveMinimum": 0
  16682. }
  16683. },
  16684. "additionalProperties": false
  16685. },
  16686. "compaction": {
  16687. "type": "object",
  16688. "properties": {
  16689. "auto": {
  16690. "type": "boolean"
  16691. },
  16692. "prune": {
  16693. "type": "boolean"
  16694. },
  16695. "tail_turns": {
  16696. "type": "integer",
  16697. "minimum": 0
  16698. },
  16699. "preserve_recent_tokens": {
  16700. "type": "integer",
  16701. "minimum": 0
  16702. },
  16703. "reserved": {
  16704. "type": "integer",
  16705. "minimum": 0
  16706. }
  16707. },
  16708. "additionalProperties": false
  16709. },
  16710. "experimental": {
  16711. "type": "object",
  16712. "properties": {
  16713. "disable_paste_summary": {
  16714. "type": "boolean"
  16715. },
  16716. "batch_tool": {
  16717. "type": "boolean"
  16718. },
  16719. "openTelemetry": {
  16720. "type": "boolean"
  16721. },
  16722. "primary_tools": {
  16723. "type": "array",
  16724. "items": {
  16725. "type": "string"
  16726. }
  16727. },
  16728. "continue_loop_on_deny": {
  16729. "type": "boolean"
  16730. },
  16731. "mcp_timeout": {
  16732. "type": "integer",
  16733. "exclusiveMinimum": 0
  16734. },
  16735. "policies": {
  16736. "type": "array",
  16737. "items": {
  16738. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  16739. }
  16740. }
  16741. },
  16742. "additionalProperties": false
  16743. }
  16744. },
  16745. "additionalProperties": false
  16746. },
  16747. "Model": {
  16748. "type": "object",
  16749. "properties": {
  16750. "id": {
  16751. "type": "string"
  16752. },
  16753. "providerID": {
  16754. "type": "string"
  16755. },
  16756. "api": {
  16757. "type": "object",
  16758. "properties": {
  16759. "id": {
  16760. "type": "string"
  16761. },
  16762. "url": {
  16763. "type": "string"
  16764. },
  16765. "npm": {
  16766. "type": "string"
  16767. }
  16768. },
  16769. "required": ["id", "url", "npm"],
  16770. "additionalProperties": false
  16771. },
  16772. "name": {
  16773. "type": "string"
  16774. },
  16775. "family": {
  16776. "type": "string"
  16777. },
  16778. "capabilities": {
  16779. "type": "object",
  16780. "properties": {
  16781. "temperature": {
  16782. "type": "boolean"
  16783. },
  16784. "reasoning": {
  16785. "type": "boolean"
  16786. },
  16787. "attachment": {
  16788. "type": "boolean"
  16789. },
  16790. "toolcall": {
  16791. "type": "boolean"
  16792. },
  16793. "input": {
  16794. "type": "object",
  16795. "properties": {
  16796. "text": {
  16797. "type": "boolean"
  16798. },
  16799. "audio": {
  16800. "type": "boolean"
  16801. },
  16802. "image": {
  16803. "type": "boolean"
  16804. },
  16805. "video": {
  16806. "type": "boolean"
  16807. },
  16808. "pdf": {
  16809. "type": "boolean"
  16810. }
  16811. },
  16812. "required": ["text", "audio", "image", "video", "pdf"],
  16813. "additionalProperties": false
  16814. },
  16815. "output": {
  16816. "type": "object",
  16817. "properties": {
  16818. "text": {
  16819. "type": "boolean"
  16820. },
  16821. "audio": {
  16822. "type": "boolean"
  16823. },
  16824. "image": {
  16825. "type": "boolean"
  16826. },
  16827. "video": {
  16828. "type": "boolean"
  16829. },
  16830. "pdf": {
  16831. "type": "boolean"
  16832. }
  16833. },
  16834. "required": ["text", "audio", "image", "video", "pdf"],
  16835. "additionalProperties": false
  16836. },
  16837. "interleaved": {
  16838. "anyOf": [
  16839. {
  16840. "type": "boolean"
  16841. },
  16842. {
  16843. "type": "object",
  16844. "properties": {
  16845. "field": {
  16846. "type": "string",
  16847. "enum": ["reasoning_content", "reasoning_details"]
  16848. }
  16849. },
  16850. "required": ["field"],
  16851. "additionalProperties": false
  16852. }
  16853. ]
  16854. }
  16855. },
  16856. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  16857. "additionalProperties": false
  16858. },
  16859. "cost": {
  16860. "type": "object",
  16861. "properties": {
  16862. "input": {
  16863. "type": "number"
  16864. },
  16865. "output": {
  16866. "type": "number"
  16867. },
  16868. "cache": {
  16869. "type": "object",
  16870. "properties": {
  16871. "read": {
  16872. "type": "number"
  16873. },
  16874. "write": {
  16875. "type": "number"
  16876. }
  16877. },
  16878. "required": ["read", "write"],
  16879. "additionalProperties": false
  16880. },
  16881. "tiers": {
  16882. "type": "array",
  16883. "items": {
  16884. "type": "object",
  16885. "properties": {
  16886. "input": {
  16887. "type": "number"
  16888. },
  16889. "output": {
  16890. "type": "number"
  16891. },
  16892. "cache": {
  16893. "type": "object",
  16894. "properties": {
  16895. "read": {
  16896. "type": "number"
  16897. },
  16898. "write": {
  16899. "type": "number"
  16900. }
  16901. },
  16902. "required": ["read", "write"],
  16903. "additionalProperties": false
  16904. },
  16905. "tier": {
  16906. "type": "object",
  16907. "properties": {
  16908. "type": {
  16909. "type": "string",
  16910. "enum": ["context"]
  16911. },
  16912. "size": {
  16913. "type": "number"
  16914. }
  16915. },
  16916. "required": ["type", "size"],
  16917. "additionalProperties": false
  16918. }
  16919. },
  16920. "required": ["input", "output", "cache", "tier"],
  16921. "additionalProperties": false
  16922. }
  16923. },
  16924. "experimentalOver200K": {
  16925. "type": "object",
  16926. "properties": {
  16927. "input": {
  16928. "type": "number"
  16929. },
  16930. "output": {
  16931. "type": "number"
  16932. },
  16933. "cache": {
  16934. "type": "object",
  16935. "properties": {
  16936. "read": {
  16937. "type": "number"
  16938. },
  16939. "write": {
  16940. "type": "number"
  16941. }
  16942. },
  16943. "required": ["read", "write"],
  16944. "additionalProperties": false
  16945. }
  16946. },
  16947. "required": ["input", "output", "cache"],
  16948. "additionalProperties": false
  16949. }
  16950. },
  16951. "required": ["input", "output", "cache"],
  16952. "additionalProperties": false
  16953. },
  16954. "limit": {
  16955. "type": "object",
  16956. "properties": {
  16957. "context": {
  16958. "type": "number"
  16959. },
  16960. "input": {
  16961. "type": "number"
  16962. },
  16963. "output": {
  16964. "type": "number"
  16965. }
  16966. },
  16967. "required": ["context", "output"],
  16968. "additionalProperties": false
  16969. },
  16970. "status": {
  16971. "type": "string",
  16972. "enum": ["alpha", "beta", "deprecated", "active"]
  16973. },
  16974. "options": {
  16975. "type": "object"
  16976. },
  16977. "headers": {
  16978. "type": "object",
  16979. "additionalProperties": {
  16980. "type": "string"
  16981. }
  16982. },
  16983. "release_date": {
  16984. "type": "string"
  16985. },
  16986. "variants": {
  16987. "type": "object",
  16988. "additionalProperties": {
  16989. "type": "object"
  16990. }
  16991. }
  16992. },
  16993. "required": [
  16994. "id",
  16995. "providerID",
  16996. "api",
  16997. "name",
  16998. "capabilities",
  16999. "cost",
  17000. "limit",
  17001. "status",
  17002. "options",
  17003. "headers",
  17004. "release_date"
  17005. ],
  17006. "additionalProperties": false
  17007. },
  17008. "Provider": {
  17009. "type": "object",
  17010. "properties": {
  17011. "id": {
  17012. "type": "string"
  17013. },
  17014. "name": {
  17015. "type": "string"
  17016. },
  17017. "source": {
  17018. "type": "string",
  17019. "enum": ["env", "config", "custom", "api"]
  17020. },
  17021. "env": {
  17022. "type": "array",
  17023. "items": {
  17024. "type": "string"
  17025. }
  17026. },
  17027. "key": {
  17028. "type": "string"
  17029. },
  17030. "options": {
  17031. "type": "object"
  17032. },
  17033. "models": {
  17034. "type": "object",
  17035. "additionalProperties": {
  17036. "$ref": "#/components/schemas/Model"
  17037. }
  17038. }
  17039. },
  17040. "required": ["id", "name", "source", "env", "options", "models"],
  17041. "additionalProperties": false
  17042. },
  17043. "ConsoleState": {
  17044. "type": "object",
  17045. "properties": {
  17046. "consoleManagedProviders": {
  17047. "type": "array",
  17048. "items": {
  17049. "type": "string"
  17050. }
  17051. },
  17052. "activeOrgName": {
  17053. "type": "string"
  17054. },
  17055. "switchableOrgCount": {
  17056. "type": "integer",
  17057. "minimum": 0
  17058. }
  17059. },
  17060. "required": ["consoleManagedProviders", "switchableOrgCount"],
  17061. "additionalProperties": false
  17062. },
  17063. "effect_HttpApiError_InternalServerError": {
  17064. "type": "object",
  17065. "properties": {
  17066. "_tag": {
  17067. "type": "string",
  17068. "enum": ["InternalServerError"]
  17069. }
  17070. },
  17071. "required": ["_tag"],
  17072. "additionalProperties": false
  17073. },
  17074. "ToolListItem": {
  17075. "type": "object",
  17076. "properties": {
  17077. "id": {
  17078. "type": "string"
  17079. },
  17080. "description": {
  17081. "type": "string"
  17082. },
  17083. "parameters": {}
  17084. },
  17085. "required": ["id", "description", "parameters"],
  17086. "additionalProperties": false
  17087. },
  17088. "ToolList": {
  17089. "type": "array",
  17090. "items": {
  17091. "$ref": "#/components/schemas/ToolListItem"
  17092. }
  17093. },
  17094. "ToolIDs": {
  17095. "type": "array",
  17096. "items": {
  17097. "type": "string"
  17098. }
  17099. },
  17100. "WorktreeError": {
  17101. "type": "object",
  17102. "properties": {
  17103. "name": {
  17104. "type": "string",
  17105. "enum": [
  17106. "WorktreeNotGitError",
  17107. "WorktreeNameGenerationFailedError",
  17108. "WorktreeCreateFailedError",
  17109. "WorktreeStartCommandFailedError",
  17110. "WorktreeRemoveFailedError",
  17111. "WorktreeResetFailedError",
  17112. "WorktreeListFailedError"
  17113. ]
  17114. },
  17115. "data": {
  17116. "type": "object",
  17117. "properties": {
  17118. "message": {
  17119. "type": "string"
  17120. }
  17121. },
  17122. "required": ["message"],
  17123. "additionalProperties": false
  17124. }
  17125. },
  17126. "required": ["name", "data"],
  17127. "additionalProperties": false
  17128. },
  17129. "WorktreeCreateInput": {
  17130. "type": "object",
  17131. "properties": {
  17132. "name": {
  17133. "type": "string"
  17134. },
  17135. "startCommand": {
  17136. "type": "string",
  17137. "description": "Additional startup script to run after the project's start command"
  17138. }
  17139. },
  17140. "additionalProperties": false
  17141. },
  17142. "Worktree": {
  17143. "type": "object",
  17144. "properties": {
  17145. "name": {
  17146. "type": "string"
  17147. },
  17148. "branch": {
  17149. "type": "string"
  17150. },
  17151. "directory": {
  17152. "type": "string"
  17153. }
  17154. },
  17155. "required": ["name", "directory"],
  17156. "additionalProperties": false
  17157. },
  17158. "WorktreeRemoveInput": {
  17159. "type": "object",
  17160. "properties": {
  17161. "directory": {
  17162. "type": "string"
  17163. }
  17164. },
  17165. "required": ["directory"],
  17166. "additionalProperties": false
  17167. },
  17168. "WorktreeResetInput": {
  17169. "type": "object",
  17170. "properties": {
  17171. "directory": {
  17172. "type": "string"
  17173. }
  17174. },
  17175. "required": ["directory"],
  17176. "additionalProperties": false
  17177. },
  17178. "ProjectSummary": {
  17179. "type": "object",
  17180. "properties": {
  17181. "id": {
  17182. "type": "string"
  17183. },
  17184. "name": {
  17185. "type": "string"
  17186. },
  17187. "worktree": {
  17188. "type": "string"
  17189. }
  17190. },
  17191. "required": ["id", "worktree"],
  17192. "additionalProperties": false
  17193. },
  17194. "GlobalSession": {
  17195. "type": "object",
  17196. "properties": {
  17197. "id": {
  17198. "type": "string",
  17199. "pattern": "^ses"
  17200. },
  17201. "slug": {
  17202. "type": "string"
  17203. },
  17204. "projectID": {
  17205. "type": "string"
  17206. },
  17207. "workspaceID": {
  17208. "type": "string",
  17209. "pattern": "^wrk"
  17210. },
  17211. "directory": {
  17212. "type": "string"
  17213. },
  17214. "path": {
  17215. "type": "string"
  17216. },
  17217. "parentID": {
  17218. "type": "string",
  17219. "pattern": "^ses"
  17220. },
  17221. "summary": {
  17222. "type": "object",
  17223. "properties": {
  17224. "additions": {
  17225. "type": "number"
  17226. },
  17227. "deletions": {
  17228. "type": "number"
  17229. },
  17230. "files": {
  17231. "type": "number"
  17232. },
  17233. "diffs": {
  17234. "type": "array",
  17235. "items": {
  17236. "$ref": "#/components/schemas/SnapshotFileDiff"
  17237. }
  17238. }
  17239. },
  17240. "required": ["additions", "deletions", "files"],
  17241. "additionalProperties": false
  17242. },
  17243. "cost": {
  17244. "type": "number"
  17245. },
  17246. "tokens": {
  17247. "type": "object",
  17248. "properties": {
  17249. "input": {
  17250. "type": "number"
  17251. },
  17252. "output": {
  17253. "type": "number"
  17254. },
  17255. "reasoning": {
  17256. "type": "number"
  17257. },
  17258. "cache": {
  17259. "type": "object",
  17260. "properties": {
  17261. "read": {
  17262. "type": "number"
  17263. },
  17264. "write": {
  17265. "type": "number"
  17266. }
  17267. },
  17268. "required": ["read", "write"],
  17269. "additionalProperties": false
  17270. }
  17271. },
  17272. "required": ["input", "output", "reasoning", "cache"],
  17273. "additionalProperties": false
  17274. },
  17275. "share": {
  17276. "type": "object",
  17277. "properties": {
  17278. "url": {
  17279. "type": "string"
  17280. }
  17281. },
  17282. "required": ["url"],
  17283. "additionalProperties": false
  17284. },
  17285. "title": {
  17286. "type": "string"
  17287. },
  17288. "agent": {
  17289. "type": "string"
  17290. },
  17291. "model": {
  17292. "type": "object",
  17293. "properties": {
  17294. "id": {
  17295. "type": "string"
  17296. },
  17297. "providerID": {
  17298. "type": "string"
  17299. },
  17300. "variant": {
  17301. "type": "string"
  17302. }
  17303. },
  17304. "required": ["id", "providerID"],
  17305. "additionalProperties": false
  17306. },
  17307. "version": {
  17308. "type": "string"
  17309. },
  17310. "metadata": {
  17311. "type": "object"
  17312. },
  17313. "time": {
  17314. "type": "object",
  17315. "properties": {
  17316. "created": {
  17317. "type": "integer",
  17318. "minimum": 0
  17319. },
  17320. "updated": {
  17321. "type": "integer",
  17322. "minimum": 0
  17323. },
  17324. "compacting": {
  17325. "type": "integer",
  17326. "minimum": 0
  17327. },
  17328. "archived": {
  17329. "type": "number"
  17330. }
  17331. },
  17332. "required": ["created", "updated"],
  17333. "additionalProperties": false
  17334. },
  17335. "permission": {
  17336. "$ref": "#/components/schemas/PermissionRuleset"
  17337. },
  17338. "revert": {
  17339. "type": "object",
  17340. "properties": {
  17341. "messageID": {
  17342. "type": "string",
  17343. "pattern": "^msg"
  17344. },
  17345. "partID": {
  17346. "type": "string",
  17347. "pattern": "^prt"
  17348. },
  17349. "snapshot": {
  17350. "type": "string"
  17351. },
  17352. "diff": {
  17353. "type": "string"
  17354. }
  17355. },
  17356. "required": ["messageID"],
  17357. "additionalProperties": false
  17358. },
  17359. "project": {
  17360. "anyOf": [
  17361. {
  17362. "$ref": "#/components/schemas/ProjectSummary"
  17363. },
  17364. {
  17365. "type": "null"
  17366. }
  17367. ]
  17368. }
  17369. },
  17370. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  17371. "additionalProperties": false
  17372. },
  17373. "McpResource": {
  17374. "type": "object",
  17375. "properties": {
  17376. "name": {
  17377. "type": "string"
  17378. },
  17379. "uri": {
  17380. "type": "string"
  17381. },
  17382. "description": {
  17383. "type": "string"
  17384. },
  17385. "mimeType": {
  17386. "type": "string"
  17387. },
  17388. "client": {
  17389. "type": "string"
  17390. }
  17391. },
  17392. "required": ["name", "uri", "client"],
  17393. "additionalProperties": false
  17394. },
  17395. "Symbol": {
  17396. "type": "object",
  17397. "properties": {
  17398. "name": {
  17399. "type": "string"
  17400. },
  17401. "kind": {
  17402. "type": "integer",
  17403. "minimum": 0
  17404. },
  17405. "location": {
  17406. "type": "object",
  17407. "properties": {
  17408. "uri": {
  17409. "type": "string"
  17410. },
  17411. "range": {
  17412. "$ref": "#/components/schemas/Range"
  17413. }
  17414. },
  17415. "required": ["uri", "range"],
  17416. "additionalProperties": false
  17417. }
  17418. },
  17419. "required": ["name", "kind", "location"],
  17420. "additionalProperties": false
  17421. },
  17422. "FileNode": {
  17423. "type": "object",
  17424. "properties": {
  17425. "name": {
  17426. "type": "string"
  17427. },
  17428. "path": {
  17429. "type": "string"
  17430. },
  17431. "absolute": {
  17432. "type": "string"
  17433. },
  17434. "type": {
  17435. "type": "string",
  17436. "enum": ["file", "directory"]
  17437. },
  17438. "ignored": {
  17439. "type": "boolean"
  17440. }
  17441. },
  17442. "required": ["name", "path", "absolute", "type", "ignored"],
  17443. "additionalProperties": false
  17444. },
  17445. "FileContent": {
  17446. "type": "object",
  17447. "properties": {
  17448. "type": {
  17449. "type": "string",
  17450. "enum": ["text", "binary"]
  17451. },
  17452. "content": {
  17453. "type": "string"
  17454. },
  17455. "diff": {
  17456. "type": "string"
  17457. },
  17458. "patch": {
  17459. "type": "object",
  17460. "properties": {
  17461. "oldFileName": {
  17462. "type": "string"
  17463. },
  17464. "newFileName": {
  17465. "type": "string"
  17466. },
  17467. "oldHeader": {
  17468. "type": "string"
  17469. },
  17470. "newHeader": {
  17471. "type": "string"
  17472. },
  17473. "hunks": {
  17474. "type": "array",
  17475. "items": {
  17476. "type": "object",
  17477. "properties": {
  17478. "oldStart": {
  17479. "type": "integer",
  17480. "minimum": 0
  17481. },
  17482. "oldLines": {
  17483. "type": "integer",
  17484. "minimum": 0
  17485. },
  17486. "newStart": {
  17487. "type": "integer",
  17488. "minimum": 0
  17489. },
  17490. "newLines": {
  17491. "type": "integer",
  17492. "minimum": 0
  17493. },
  17494. "lines": {
  17495. "type": "array",
  17496. "items": {
  17497. "type": "string"
  17498. }
  17499. }
  17500. },
  17501. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  17502. "additionalProperties": false
  17503. }
  17504. },
  17505. "index": {
  17506. "type": "string"
  17507. }
  17508. },
  17509. "required": ["oldFileName", "newFileName", "hunks"],
  17510. "additionalProperties": false
  17511. },
  17512. "encoding": {
  17513. "type": "string",
  17514. "enum": ["base64"]
  17515. },
  17516. "mimeType": {
  17517. "type": "string"
  17518. }
  17519. },
  17520. "required": ["type", "content"],
  17521. "additionalProperties": false
  17522. },
  17523. "File": {
  17524. "type": "object",
  17525. "properties": {
  17526. "path": {
  17527. "type": "string"
  17528. },
  17529. "added": {
  17530. "type": "integer",
  17531. "minimum": 0
  17532. },
  17533. "removed": {
  17534. "type": "integer",
  17535. "minimum": 0
  17536. },
  17537. "status": {
  17538. "type": "string",
  17539. "enum": ["added", "deleted", "modified"]
  17540. }
  17541. },
  17542. "required": ["path", "added", "removed", "status"],
  17543. "additionalProperties": false
  17544. },
  17545. "Path": {
  17546. "type": "object",
  17547. "properties": {
  17548. "home": {
  17549. "type": "string"
  17550. },
  17551. "state": {
  17552. "type": "string"
  17553. },
  17554. "config": {
  17555. "type": "string"
  17556. },
  17557. "worktree": {
  17558. "type": "string"
  17559. },
  17560. "directory": {
  17561. "type": "string"
  17562. }
  17563. },
  17564. "required": ["home", "state", "config", "worktree", "directory"],
  17565. "additionalProperties": false
  17566. },
  17567. "VcsInfo": {
  17568. "type": "object",
  17569. "properties": {
  17570. "branch": {
  17571. "type": "string"
  17572. },
  17573. "default_branch": {
  17574. "type": "string"
  17575. }
  17576. },
  17577. "additionalProperties": false
  17578. },
  17579. "VcsFileStatus": {
  17580. "type": "object",
  17581. "properties": {
  17582. "file": {
  17583. "type": "string"
  17584. },
  17585. "additions": {
  17586. "type": "number"
  17587. },
  17588. "deletions": {
  17589. "type": "number"
  17590. },
  17591. "status": {
  17592. "type": "string",
  17593. "enum": ["added", "deleted", "modified"]
  17594. }
  17595. },
  17596. "required": ["file", "additions", "deletions", "status"],
  17597. "additionalProperties": false
  17598. },
  17599. "VcsFileDiff": {
  17600. "type": "object",
  17601. "properties": {
  17602. "file": {
  17603. "type": "string"
  17604. },
  17605. "patch": {
  17606. "type": "string"
  17607. },
  17608. "additions": {
  17609. "type": "number"
  17610. },
  17611. "deletions": {
  17612. "type": "number"
  17613. },
  17614. "status": {
  17615. "type": "string",
  17616. "enum": ["added", "deleted", "modified"]
  17617. }
  17618. },
  17619. "required": ["file", "additions", "deletions"],
  17620. "additionalProperties": false
  17621. },
  17622. "VcsApplyError": {
  17623. "type": "object",
  17624. "properties": {
  17625. "name": {
  17626. "type": "string",
  17627. "enum": ["VcsApplyError"]
  17628. },
  17629. "data": {
  17630. "type": "object",
  17631. "properties": {
  17632. "message": {
  17633. "type": "string"
  17634. },
  17635. "reason": {
  17636. "type": "string",
  17637. "enum": ["non-git", "not-clean"]
  17638. }
  17639. },
  17640. "required": ["message", "reason"],
  17641. "additionalProperties": false
  17642. }
  17643. },
  17644. "required": ["name", "data"],
  17645. "additionalProperties": false
  17646. },
  17647. "Command": {
  17648. "type": "object",
  17649. "properties": {
  17650. "name": {
  17651. "type": "string"
  17652. },
  17653. "description": {
  17654. "type": "string"
  17655. },
  17656. "agent": {
  17657. "type": "string"
  17658. },
  17659. "model": {
  17660. "type": "string"
  17661. },
  17662. "source": {
  17663. "type": "string",
  17664. "enum": ["command", "mcp", "skill"]
  17665. },
  17666. "template": {
  17667. "type": "string"
  17668. },
  17669. "subtask": {
  17670. "type": "boolean"
  17671. },
  17672. "hints": {
  17673. "type": "array",
  17674. "items": {
  17675. "type": "string"
  17676. }
  17677. }
  17678. },
  17679. "required": ["name", "template", "hints"],
  17680. "additionalProperties": false
  17681. },
  17682. "Agent": {
  17683. "type": "object",
  17684. "properties": {
  17685. "name": {
  17686. "type": "string"
  17687. },
  17688. "description": {
  17689. "type": "string"
  17690. },
  17691. "mode": {
  17692. "type": "string",
  17693. "enum": ["subagent", "primary", "all"]
  17694. },
  17695. "native": {
  17696. "type": "boolean"
  17697. },
  17698. "hidden": {
  17699. "type": "boolean"
  17700. },
  17701. "topP": {
  17702. "type": "number"
  17703. },
  17704. "temperature": {
  17705. "type": "number"
  17706. },
  17707. "color": {
  17708. "type": "string"
  17709. },
  17710. "permission": {
  17711. "$ref": "#/components/schemas/PermissionRuleset"
  17712. },
  17713. "model": {
  17714. "type": "object",
  17715. "properties": {
  17716. "modelID": {
  17717. "type": "string"
  17718. },
  17719. "providerID": {
  17720. "type": "string"
  17721. }
  17722. },
  17723. "required": ["modelID", "providerID"],
  17724. "additionalProperties": false
  17725. },
  17726. "variant": {
  17727. "type": "string"
  17728. },
  17729. "prompt": {
  17730. "type": "string"
  17731. },
  17732. "options": {
  17733. "type": "object"
  17734. },
  17735. "steps": {
  17736. "type": "number"
  17737. }
  17738. },
  17739. "required": ["name", "mode", "permission", "options"],
  17740. "additionalProperties": false
  17741. },
  17742. "LSPStatus": {
  17743. "type": "object",
  17744. "properties": {
  17745. "id": {
  17746. "type": "string"
  17747. },
  17748. "name": {
  17749. "type": "string"
  17750. },
  17751. "root": {
  17752. "type": "string"
  17753. },
  17754. "status": {
  17755. "type": "string",
  17756. "enum": ["connected", "error"]
  17757. }
  17758. },
  17759. "required": ["id", "name", "root", "status"],
  17760. "additionalProperties": false
  17761. },
  17762. "FormatterStatus": {
  17763. "type": "object",
  17764. "properties": {
  17765. "name": {
  17766. "type": "string"
  17767. },
  17768. "extensions": {
  17769. "type": "array",
  17770. "items": {
  17771. "type": "string"
  17772. }
  17773. },
  17774. "enabled": {
  17775. "type": "boolean"
  17776. }
  17777. },
  17778. "required": ["name", "extensions", "enabled"],
  17779. "additionalProperties": false
  17780. },
  17781. "MCPStatusConnected": {
  17782. "type": "object",
  17783. "properties": {
  17784. "status": {
  17785. "type": "string",
  17786. "enum": ["connected"]
  17787. }
  17788. },
  17789. "required": ["status"],
  17790. "additionalProperties": false
  17791. },
  17792. "MCPStatusDisabled": {
  17793. "type": "object",
  17794. "properties": {
  17795. "status": {
  17796. "type": "string",
  17797. "enum": ["disabled"]
  17798. }
  17799. },
  17800. "required": ["status"],
  17801. "additionalProperties": false
  17802. },
  17803. "MCPStatusFailed": {
  17804. "type": "object",
  17805. "properties": {
  17806. "status": {
  17807. "type": "string",
  17808. "enum": ["failed"]
  17809. },
  17810. "error": {
  17811. "type": "string"
  17812. }
  17813. },
  17814. "required": ["status", "error"],
  17815. "additionalProperties": false
  17816. },
  17817. "MCPStatusNeedsAuth": {
  17818. "type": "object",
  17819. "properties": {
  17820. "status": {
  17821. "type": "string",
  17822. "enum": ["needs_auth"]
  17823. }
  17824. },
  17825. "required": ["status"],
  17826. "additionalProperties": false
  17827. },
  17828. "MCPStatusNeedsClientRegistration": {
  17829. "type": "object",
  17830. "properties": {
  17831. "status": {
  17832. "type": "string",
  17833. "enum": ["needs_client_registration"]
  17834. },
  17835. "error": {
  17836. "type": "string"
  17837. }
  17838. },
  17839. "required": ["status", "error"],
  17840. "additionalProperties": false
  17841. },
  17842. "MCPStatus": {
  17843. "anyOf": [
  17844. {
  17845. "$ref": "#/components/schemas/MCPStatusConnected"
  17846. },
  17847. {
  17848. "$ref": "#/components/schemas/MCPStatusDisabled"
  17849. },
  17850. {
  17851. "$ref": "#/components/schemas/MCPStatusFailed"
  17852. },
  17853. {
  17854. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  17855. },
  17856. {
  17857. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  17858. }
  17859. ]
  17860. },
  17861. "McpUnsupportedOAuthError": {
  17862. "type": "object",
  17863. "properties": {
  17864. "error": {
  17865. "type": "string"
  17866. }
  17867. },
  17868. "required": ["error"],
  17869. "additionalProperties": false
  17870. },
  17871. "McpServerNotFoundError": {
  17872. "type": "object",
  17873. "properties": {
  17874. "_tag": {
  17875. "type": "string",
  17876. "enum": ["McpServerNotFoundError"]
  17877. },
  17878. "name": {
  17879. "type": "string"
  17880. },
  17881. "message": {
  17882. "type": "string"
  17883. }
  17884. },
  17885. "required": ["_tag", "name", "message"],
  17886. "additionalProperties": false
  17887. },
  17888. "Project": {
  17889. "type": "object",
  17890. "properties": {
  17891. "id": {
  17892. "type": "string"
  17893. },
  17894. "worktree": {
  17895. "type": "string"
  17896. },
  17897. "vcs": {
  17898. "type": "string",
  17899. "enum": ["git"]
  17900. },
  17901. "name": {
  17902. "type": "string"
  17903. },
  17904. "icon": {
  17905. "type": "object",
  17906. "properties": {
  17907. "url": {
  17908. "type": "string"
  17909. },
  17910. "override": {
  17911. "type": "string"
  17912. },
  17913. "color": {
  17914. "type": "string"
  17915. }
  17916. },
  17917. "additionalProperties": false
  17918. },
  17919. "commands": {
  17920. "type": "object",
  17921. "properties": {
  17922. "start": {
  17923. "type": "string",
  17924. "description": "Startup script to run when creating a new workspace (worktree)"
  17925. }
  17926. },
  17927. "additionalProperties": false
  17928. },
  17929. "time": {
  17930. "type": "object",
  17931. "properties": {
  17932. "created": {
  17933. "type": "integer",
  17934. "minimum": 0
  17935. },
  17936. "updated": {
  17937. "type": "integer",
  17938. "minimum": 0
  17939. },
  17940. "initialized": {
  17941. "type": "integer",
  17942. "minimum": 0
  17943. }
  17944. },
  17945. "required": ["created", "updated"],
  17946. "additionalProperties": false
  17947. },
  17948. "sandboxes": {
  17949. "type": "array",
  17950. "items": {
  17951. "type": "string"
  17952. }
  17953. }
  17954. },
  17955. "required": ["id", "worktree", "time", "sandboxes"],
  17956. "additionalProperties": false
  17957. },
  17958. "ProjectNotFoundError": {
  17959. "type": "object",
  17960. "properties": {
  17961. "_tag": {
  17962. "type": "string",
  17963. "enum": ["ProjectNotFoundError"]
  17964. },
  17965. "projectID": {
  17966. "type": "string"
  17967. },
  17968. "message": {
  17969. "type": "string"
  17970. }
  17971. },
  17972. "required": ["_tag", "projectID", "message"],
  17973. "additionalProperties": false
  17974. },
  17975. "PtyNotFoundError": {
  17976. "type": "object",
  17977. "properties": {
  17978. "_tag": {
  17979. "type": "string",
  17980. "enum": ["PtyNotFoundError"]
  17981. },
  17982. "ptyID": {
  17983. "type": "string"
  17984. },
  17985. "message": {
  17986. "type": "string"
  17987. }
  17988. },
  17989. "required": ["_tag", "ptyID", "message"],
  17990. "additionalProperties": false
  17991. },
  17992. "PtyForbiddenError": {
  17993. "type": "object",
  17994. "properties": {
  17995. "_tag": {
  17996. "type": "string",
  17997. "enum": ["PtyForbiddenError"]
  17998. },
  17999. "message": {
  18000. "type": "string"
  18001. }
  18002. },
  18003. "required": ["_tag", "message"],
  18004. "additionalProperties": false
  18005. },
  18006. "QuestionRequest": {
  18007. "type": "object",
  18008. "properties": {
  18009. "id": {
  18010. "type": "string",
  18011. "pattern": "^que"
  18012. },
  18013. "sessionID": {
  18014. "type": "string",
  18015. "pattern": "^ses"
  18016. },
  18017. "questions": {
  18018. "type": "array",
  18019. "items": {
  18020. "$ref": "#/components/schemas/QuestionInfo"
  18021. },
  18022. "description": "Questions to ask"
  18023. },
  18024. "tool": {
  18025. "$ref": "#/components/schemas/QuestionTool"
  18026. }
  18027. },
  18028. "required": ["id", "sessionID", "questions"],
  18029. "additionalProperties": false
  18030. },
  18031. "QuestionNotFoundError": {
  18032. "type": "object",
  18033. "properties": {
  18034. "_tag": {
  18035. "type": "string",
  18036. "enum": ["QuestionNotFoundError"]
  18037. },
  18038. "requestID": {
  18039. "type": "string"
  18040. },
  18041. "message": {
  18042. "type": "string"
  18043. }
  18044. },
  18045. "required": ["_tag", "requestID", "message"],
  18046. "additionalProperties": false
  18047. },
  18048. "PermissionRequest": {
  18049. "type": "object",
  18050. "properties": {
  18051. "id": {
  18052. "type": "string",
  18053. "pattern": "^per"
  18054. },
  18055. "sessionID": {
  18056. "type": "string",
  18057. "pattern": "^ses"
  18058. },
  18059. "permission": {
  18060. "type": "string"
  18061. },
  18062. "patterns": {
  18063. "type": "array",
  18064. "items": {
  18065. "type": "string"
  18066. }
  18067. },
  18068. "metadata": {
  18069. "type": "object"
  18070. },
  18071. "always": {
  18072. "type": "array",
  18073. "items": {
  18074. "type": "string"
  18075. }
  18076. },
  18077. "tool": {
  18078. "type": "object",
  18079. "properties": {
  18080. "messageID": {
  18081. "type": "string"
  18082. },
  18083. "callID": {
  18084. "type": "string"
  18085. }
  18086. },
  18087. "required": ["messageID", "callID"],
  18088. "additionalProperties": false
  18089. }
  18090. },
  18091. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  18092. "additionalProperties": false
  18093. },
  18094. "PermissionNotFoundError": {
  18095. "type": "object",
  18096. "properties": {
  18097. "_tag": {
  18098. "type": "string",
  18099. "enum": ["PermissionNotFoundError"]
  18100. },
  18101. "requestID": {
  18102. "type": "string"
  18103. },
  18104. "message": {
  18105. "type": "string"
  18106. }
  18107. },
  18108. "required": ["_tag", "requestID", "message"],
  18109. "additionalProperties": false
  18110. },
  18111. "ProviderAuthMethod": {
  18112. "type": "object",
  18113. "properties": {
  18114. "type": {
  18115. "type": "string",
  18116. "enum": ["oauth", "api"]
  18117. },
  18118. "label": {
  18119. "type": "string"
  18120. },
  18121. "prompts": {
  18122. "type": "array",
  18123. "items": {
  18124. "anyOf": [
  18125. {
  18126. "type": "object",
  18127. "properties": {
  18128. "type": {
  18129. "type": "string",
  18130. "enum": ["text"]
  18131. },
  18132. "key": {
  18133. "type": "string"
  18134. },
  18135. "message": {
  18136. "type": "string"
  18137. },
  18138. "placeholder": {
  18139. "type": "string"
  18140. },
  18141. "when": {
  18142. "type": "object",
  18143. "properties": {
  18144. "key": {
  18145. "type": "string"
  18146. },
  18147. "op": {
  18148. "type": "string",
  18149. "enum": ["eq", "neq"]
  18150. },
  18151. "value": {
  18152. "type": "string"
  18153. }
  18154. },
  18155. "required": ["key", "op", "value"],
  18156. "additionalProperties": false
  18157. }
  18158. },
  18159. "required": ["type", "key", "message"],
  18160. "additionalProperties": false
  18161. },
  18162. {
  18163. "type": "object",
  18164. "properties": {
  18165. "type": {
  18166. "type": "string",
  18167. "enum": ["select"]
  18168. },
  18169. "key": {
  18170. "type": "string"
  18171. },
  18172. "message": {
  18173. "type": "string"
  18174. },
  18175. "options": {
  18176. "type": "array",
  18177. "items": {
  18178. "type": "object",
  18179. "properties": {
  18180. "label": {
  18181. "type": "string"
  18182. },
  18183. "value": {
  18184. "type": "string"
  18185. },
  18186. "hint": {
  18187. "type": "string"
  18188. }
  18189. },
  18190. "required": ["label", "value"],
  18191. "additionalProperties": false
  18192. }
  18193. },
  18194. "when": {
  18195. "type": "object",
  18196. "properties": {
  18197. "key": {
  18198. "type": "string"
  18199. },
  18200. "op": {
  18201. "type": "string",
  18202. "enum": ["eq", "neq"]
  18203. },
  18204. "value": {
  18205. "type": "string"
  18206. }
  18207. },
  18208. "required": ["key", "op", "value"],
  18209. "additionalProperties": false
  18210. }
  18211. },
  18212. "required": ["type", "key", "message", "options"],
  18213. "additionalProperties": false
  18214. }
  18215. ]
  18216. }
  18217. }
  18218. },
  18219. "required": ["type", "label"],
  18220. "additionalProperties": false
  18221. },
  18222. "ProviderAuthAuthorization": {
  18223. "type": "object",
  18224. "properties": {
  18225. "url": {
  18226. "type": "string"
  18227. },
  18228. "method": {
  18229. "type": "string",
  18230. "enum": ["auto", "code"]
  18231. },
  18232. "instructions": {
  18233. "type": "string"
  18234. }
  18235. },
  18236. "required": ["url", "method", "instructions"],
  18237. "additionalProperties": false
  18238. },
  18239. "ProviderAuthError1": {
  18240. "type": "object",
  18241. "properties": {
  18242. "name": {
  18243. "type": "string",
  18244. "enum": [
  18245. "BadRequest",
  18246. "ProviderAuthOauthMissing",
  18247. "ProviderAuthOauthCodeMissing",
  18248. "ProviderAuthOauthCallbackFailed",
  18249. "ProviderAuthValidationFailed"
  18250. ]
  18251. },
  18252. "data": {
  18253. "type": "object",
  18254. "properties": {
  18255. "providerID": {
  18256. "type": "string"
  18257. },
  18258. "field": {
  18259. "type": "string"
  18260. },
  18261. "message": {
  18262. "type": "string"
  18263. },
  18264. "kind": {
  18265. "type": "string"
  18266. }
  18267. },
  18268. "additionalProperties": false
  18269. }
  18270. },
  18271. "required": ["name", "data"],
  18272. "additionalProperties": false
  18273. },
  18274. "NotFoundError": {
  18275. "type": "object",
  18276. "required": ["name", "data"],
  18277. "properties": {
  18278. "name": {
  18279. "type": "string",
  18280. "enum": ["NotFoundError"]
  18281. },
  18282. "data": {
  18283. "type": "object",
  18284. "required": ["message"],
  18285. "properties": {
  18286. "message": {
  18287. "type": "string"
  18288. }
  18289. }
  18290. }
  18291. }
  18292. },
  18293. "TextPartInput": {
  18294. "type": "object",
  18295. "properties": {
  18296. "id": {
  18297. "type": "string",
  18298. "pattern": "^prt"
  18299. },
  18300. "type": {
  18301. "type": "string",
  18302. "enum": ["text"]
  18303. },
  18304. "text": {
  18305. "type": "string"
  18306. },
  18307. "synthetic": {
  18308. "type": "boolean"
  18309. },
  18310. "ignored": {
  18311. "type": "boolean"
  18312. },
  18313. "time": {
  18314. "type": "object",
  18315. "properties": {
  18316. "start": {
  18317. "type": "integer",
  18318. "minimum": 0
  18319. },
  18320. "end": {
  18321. "type": "integer",
  18322. "minimum": 0
  18323. }
  18324. },
  18325. "required": ["start"],
  18326. "additionalProperties": false
  18327. },
  18328. "metadata": {
  18329. "type": "object"
  18330. }
  18331. },
  18332. "required": ["type", "text"],
  18333. "additionalProperties": false
  18334. },
  18335. "FilePartInput": {
  18336. "type": "object",
  18337. "properties": {
  18338. "id": {
  18339. "type": "string",
  18340. "pattern": "^prt"
  18341. },
  18342. "type": {
  18343. "type": "string",
  18344. "enum": ["file"]
  18345. },
  18346. "mime": {
  18347. "type": "string"
  18348. },
  18349. "filename": {
  18350. "type": "string"
  18351. },
  18352. "url": {
  18353. "type": "string"
  18354. },
  18355. "source": {
  18356. "$ref": "#/components/schemas/FilePartSource"
  18357. }
  18358. },
  18359. "required": ["type", "mime", "url"],
  18360. "additionalProperties": false
  18361. },
  18362. "AgentPartInput": {
  18363. "type": "object",
  18364. "properties": {
  18365. "id": {
  18366. "type": "string",
  18367. "pattern": "^prt"
  18368. },
  18369. "type": {
  18370. "type": "string",
  18371. "enum": ["agent"]
  18372. },
  18373. "name": {
  18374. "type": "string"
  18375. },
  18376. "source": {
  18377. "type": "object",
  18378. "properties": {
  18379. "value": {
  18380. "type": "string"
  18381. },
  18382. "start": {
  18383. "type": "integer",
  18384. "minimum": 0
  18385. },
  18386. "end": {
  18387. "type": "integer",
  18388. "minimum": 0
  18389. }
  18390. },
  18391. "required": ["value", "start", "end"],
  18392. "additionalProperties": false
  18393. }
  18394. },
  18395. "required": ["type", "name"],
  18396. "additionalProperties": false
  18397. },
  18398. "SubtaskPartInput": {
  18399. "type": "object",
  18400. "properties": {
  18401. "id": {
  18402. "type": "string",
  18403. "pattern": "^prt"
  18404. },
  18405. "type": {
  18406. "type": "string",
  18407. "enum": ["subtask"]
  18408. },
  18409. "prompt": {
  18410. "type": "string"
  18411. },
  18412. "description": {
  18413. "type": "string"
  18414. },
  18415. "agent": {
  18416. "type": "string"
  18417. },
  18418. "model": {
  18419. "type": "object",
  18420. "properties": {
  18421. "providerID": {
  18422. "type": "string"
  18423. },
  18424. "modelID": {
  18425. "type": "string"
  18426. }
  18427. },
  18428. "required": ["providerID", "modelID"],
  18429. "additionalProperties": false
  18430. },
  18431. "command": {
  18432. "type": "string"
  18433. }
  18434. },
  18435. "required": ["type", "prompt", "description", "agent"],
  18436. "additionalProperties": false
  18437. },
  18438. "SessionBusyError": {
  18439. "type": "object",
  18440. "properties": {
  18441. "_tag": {
  18442. "type": "string",
  18443. "enum": ["SessionBusyError"]
  18444. },
  18445. "sessionID": {
  18446. "type": "string"
  18447. },
  18448. "message": {
  18449. "type": "string"
  18450. }
  18451. },
  18452. "required": ["_tag", "sessionID", "message"],
  18453. "additionalProperties": false
  18454. },
  18455. "V2SessionsResponse": {
  18456. "type": "object",
  18457. "properties": {
  18458. "items": {
  18459. "type": "array",
  18460. "items": {
  18461. "$ref": "#/components/schemas/SessionV2Info"
  18462. }
  18463. },
  18464. "cursor": {
  18465. "type": "object",
  18466. "properties": {
  18467. "previous": {
  18468. "type": "string"
  18469. },
  18470. "next": {
  18471. "type": "string"
  18472. }
  18473. },
  18474. "additionalProperties": false
  18475. }
  18476. },
  18477. "required": ["items", "cursor"],
  18478. "additionalProperties": false
  18479. },
  18480. "InvalidCursorError": {
  18481. "type": "object",
  18482. "properties": {
  18483. "_tag": {
  18484. "type": "string",
  18485. "enum": ["InvalidCursorError"]
  18486. },
  18487. "message": {
  18488. "type": "string"
  18489. }
  18490. },
  18491. "required": ["_tag", "message"],
  18492. "additionalProperties": false
  18493. },
  18494. "UnauthorizedError": {
  18495. "type": "object",
  18496. "properties": {
  18497. "_tag": {
  18498. "type": "string",
  18499. "enum": ["UnauthorizedError"]
  18500. },
  18501. "message": {
  18502. "type": "string"
  18503. }
  18504. },
  18505. "required": ["_tag", "message"],
  18506. "additionalProperties": false
  18507. },
  18508. "SessionNotFoundError": {
  18509. "type": "object",
  18510. "properties": {
  18511. "_tag": {
  18512. "type": "string",
  18513. "enum": ["SessionNotFoundError"]
  18514. },
  18515. "sessionID": {
  18516. "type": "string"
  18517. },
  18518. "message": {
  18519. "type": "string"
  18520. }
  18521. },
  18522. "required": ["_tag", "sessionID", "message"],
  18523. "additionalProperties": false
  18524. },
  18525. "ServiceUnavailableError": {
  18526. "type": "object",
  18527. "properties": {
  18528. "_tag": {
  18529. "type": "string",
  18530. "enum": ["ServiceUnavailableError"]
  18531. },
  18532. "message": {
  18533. "type": "string"
  18534. },
  18535. "service": {
  18536. "type": "string"
  18537. }
  18538. },
  18539. "required": ["_tag", "message"],
  18540. "additionalProperties": false
  18541. },
  18542. "UnknownError1": {
  18543. "type": "object",
  18544. "properties": {
  18545. "_tag": {
  18546. "type": "string",
  18547. "enum": ["UnknownError"]
  18548. },
  18549. "message": {
  18550. "type": "string"
  18551. },
  18552. "ref": {
  18553. "type": "string"
  18554. }
  18555. },
  18556. "required": ["_tag", "message"],
  18557. "additionalProperties": false
  18558. },
  18559. "V2SessionMessagesResponse": {
  18560. "type": "object",
  18561. "properties": {
  18562. "items": {
  18563. "type": "array",
  18564. "items": {
  18565. "$ref": "#/components/schemas/SessionMessage"
  18566. }
  18567. },
  18568. "cursor": {
  18569. "type": "object",
  18570. "properties": {
  18571. "previous": {
  18572. "type": "string"
  18573. },
  18574. "next": {
  18575. "type": "string"
  18576. }
  18577. },
  18578. "additionalProperties": false
  18579. }
  18580. },
  18581. "required": ["items", "cursor"],
  18582. "additionalProperties": false
  18583. },
  18584. "ProviderNotFoundError": {
  18585. "type": "object",
  18586. "properties": {
  18587. "_tag": {
  18588. "type": "string",
  18589. "enum": ["ProviderNotFoundError"]
  18590. },
  18591. "providerID": {
  18592. "type": "string"
  18593. },
  18594. "message": {
  18595. "type": "string"
  18596. }
  18597. },
  18598. "required": ["_tag", "providerID", "message"],
  18599. "additionalProperties": false
  18600. },
  18601. "EventTuiPromptAppend": {
  18602. "type": "object",
  18603. "properties": {
  18604. "type": {
  18605. "type": "string",
  18606. "enum": ["tui.prompt.append"]
  18607. },
  18608. "properties": {
  18609. "type": "object",
  18610. "properties": {
  18611. "text": {
  18612. "type": "string"
  18613. }
  18614. },
  18615. "required": ["text"],
  18616. "additionalProperties": false
  18617. }
  18618. },
  18619. "required": ["type", "properties"],
  18620. "additionalProperties": false
  18621. },
  18622. "EventTuiCommandExecute": {
  18623. "type": "object",
  18624. "properties": {
  18625. "type": {
  18626. "type": "string",
  18627. "enum": ["tui.command.execute"]
  18628. },
  18629. "properties": {
  18630. "type": "object",
  18631. "properties": {
  18632. "command": {
  18633. "anyOf": [
  18634. {
  18635. "type": "string",
  18636. "enum": [
  18637. "session.list",
  18638. "session.new",
  18639. "session.share",
  18640. "session.interrupt",
  18641. "session.compact",
  18642. "session.page.up",
  18643. "session.page.down",
  18644. "session.line.up",
  18645. "session.line.down",
  18646. "session.half.page.up",
  18647. "session.half.page.down",
  18648. "session.first",
  18649. "session.last",
  18650. "prompt.clear",
  18651. "prompt.submit",
  18652. "agent.cycle"
  18653. ]
  18654. },
  18655. {
  18656. "type": "string"
  18657. }
  18658. ]
  18659. }
  18660. },
  18661. "required": ["command"],
  18662. "additionalProperties": false
  18663. }
  18664. },
  18665. "required": ["type", "properties"],
  18666. "additionalProperties": false
  18667. },
  18668. "EventTuiToastShow": {
  18669. "type": "object",
  18670. "properties": {
  18671. "type": {
  18672. "type": "string",
  18673. "enum": ["tui.toast.show"]
  18674. },
  18675. "properties": {
  18676. "type": "object",
  18677. "properties": {
  18678. "title": {
  18679. "type": "string"
  18680. },
  18681. "message": {
  18682. "type": "string"
  18683. },
  18684. "variant": {
  18685. "type": "string",
  18686. "enum": ["info", "success", "warning", "error"]
  18687. },
  18688. "duration": {
  18689. "type": "integer",
  18690. "exclusiveMinimum": 0
  18691. }
  18692. },
  18693. "required": ["message", "variant"],
  18694. "additionalProperties": false
  18695. }
  18696. },
  18697. "required": ["type", "properties"],
  18698. "additionalProperties": false
  18699. },
  18700. "EventTuiSessionSelect": {
  18701. "type": "object",
  18702. "properties": {
  18703. "type": {
  18704. "type": "string",
  18705. "enum": ["tui.session.select"]
  18706. },
  18707. "properties": {
  18708. "type": "object",
  18709. "properties": {
  18710. "sessionID": {
  18711. "type": "string",
  18712. "pattern": "^ses",
  18713. "description": "Session ID to navigate to"
  18714. }
  18715. },
  18716. "required": ["sessionID"],
  18717. "additionalProperties": false
  18718. }
  18719. },
  18720. "required": ["type", "properties"],
  18721. "additionalProperties": false
  18722. },
  18723. "Workspace": {
  18724. "type": "object",
  18725. "properties": {
  18726. "id": {
  18727. "type": "string",
  18728. "pattern": "^wrk"
  18729. },
  18730. "type": {
  18731. "type": "string"
  18732. },
  18733. "name": {
  18734. "type": "string"
  18735. },
  18736. "branch": {
  18737. "anyOf": [
  18738. {
  18739. "type": "string"
  18740. },
  18741. {
  18742. "type": "null"
  18743. }
  18744. ]
  18745. },
  18746. "directory": {
  18747. "anyOf": [
  18748. {
  18749. "type": "string"
  18750. },
  18751. {
  18752. "type": "null"
  18753. }
  18754. ]
  18755. },
  18756. "extra": {
  18757. "anyOf": [
  18758. {},
  18759. {
  18760. "type": "null"
  18761. }
  18762. ]
  18763. },
  18764. "projectID": {
  18765. "type": "string"
  18766. },
  18767. "timeUsed": {
  18768. "anyOf": [
  18769. {
  18770. "type": "number"
  18771. },
  18772. {
  18773. "type": "string",
  18774. "enum": ["NaN"]
  18775. },
  18776. {
  18777. "type": "string",
  18778. "enum": ["Infinity"]
  18779. },
  18780. {
  18781. "type": "string",
  18782. "enum": ["-Infinity"]
  18783. },
  18784. {
  18785. "type": "string",
  18786. "enum": ["Infinity", "-Infinity", "NaN"]
  18787. }
  18788. ]
  18789. }
  18790. },
  18791. "required": ["id", "type", "name", "projectID", "timeUsed"],
  18792. "additionalProperties": false
  18793. },
  18794. "WorkspaceCreateError": {
  18795. "type": "object",
  18796. "properties": {
  18797. "name": {
  18798. "type": "string",
  18799. "enum": ["WorkspaceCreateError"]
  18800. },
  18801. "data": {
  18802. "type": "object",
  18803. "properties": {
  18804. "message": {
  18805. "type": "string"
  18806. }
  18807. },
  18808. "required": ["message"],
  18809. "additionalProperties": false
  18810. }
  18811. },
  18812. "required": ["name", "data"],
  18813. "additionalProperties": false
  18814. },
  18815. "WorkspaceWarpError": {
  18816. "type": "object",
  18817. "properties": {
  18818. "name": {
  18819. "type": "string",
  18820. "enum": ["WorkspaceWarpError"]
  18821. },
  18822. "data": {
  18823. "type": "object",
  18824. "properties": {
  18825. "message": {
  18826. "type": "string"
  18827. }
  18828. },
  18829. "required": ["message"],
  18830. "additionalProperties": false
  18831. }
  18832. },
  18833. "required": ["name", "data"],
  18834. "additionalProperties": false
  18835. },
  18836. "effect_HttpApiError_Forbidden": {
  18837. "type": "object",
  18838. "properties": {
  18839. "_tag": {
  18840. "type": "string",
  18841. "enum": ["Forbidden"]
  18842. }
  18843. },
  18844. "required": ["_tag"],
  18845. "additionalProperties": false
  18846. },
  18847. "Event.tui.prompt.append": {
  18848. "type": "object",
  18849. "properties": {
  18850. "id": {
  18851. "type": "string"
  18852. },
  18853. "type": {
  18854. "type": "string",
  18855. "enum": ["tui.prompt.append"]
  18856. },
  18857. "properties": {
  18858. "type": "object",
  18859. "properties": {
  18860. "text": {
  18861. "type": "string"
  18862. }
  18863. },
  18864. "required": ["text"],
  18865. "additionalProperties": false
  18866. }
  18867. },
  18868. "required": ["id", "type", "properties"],
  18869. "additionalProperties": false
  18870. },
  18871. "Event.tui.command.execute": {
  18872. "type": "object",
  18873. "properties": {
  18874. "id": {
  18875. "type": "string"
  18876. },
  18877. "type": {
  18878. "type": "string",
  18879. "enum": ["tui.command.execute"]
  18880. },
  18881. "properties": {
  18882. "type": "object",
  18883. "properties": {
  18884. "command": {
  18885. "anyOf": [
  18886. {
  18887. "type": "string",
  18888. "enum": [
  18889. "session.list",
  18890. "session.new",
  18891. "session.share",
  18892. "session.interrupt",
  18893. "session.compact",
  18894. "session.page.up",
  18895. "session.page.down",
  18896. "session.line.up",
  18897. "session.line.down",
  18898. "session.half.page.up",
  18899. "session.half.page.down",
  18900. "session.first",
  18901. "session.last",
  18902. "prompt.clear",
  18903. "prompt.submit",
  18904. "agent.cycle"
  18905. ]
  18906. },
  18907. {
  18908. "type": "string"
  18909. }
  18910. ]
  18911. }
  18912. },
  18913. "required": ["command"],
  18914. "additionalProperties": false
  18915. }
  18916. },
  18917. "required": ["id", "type", "properties"],
  18918. "additionalProperties": false
  18919. },
  18920. "Event.tui.toast.show": {
  18921. "type": "object",
  18922. "properties": {
  18923. "id": {
  18924. "type": "string"
  18925. },
  18926. "type": {
  18927. "type": "string",
  18928. "enum": ["tui.toast.show"]
  18929. },
  18930. "properties": {
  18931. "type": "object",
  18932. "properties": {
  18933. "title": {
  18934. "type": "string"
  18935. },
  18936. "message": {
  18937. "type": "string"
  18938. },
  18939. "variant": {
  18940. "type": "string",
  18941. "enum": ["info", "success", "warning", "error"]
  18942. },
  18943. "duration": {
  18944. "type": "integer",
  18945. "exclusiveMinimum": 0
  18946. }
  18947. },
  18948. "required": ["message", "variant"],
  18949. "additionalProperties": false
  18950. }
  18951. },
  18952. "required": ["id", "type", "properties"],
  18953. "additionalProperties": false
  18954. },
  18955. "Event.tui.session.select": {
  18956. "type": "object",
  18957. "properties": {
  18958. "id": {
  18959. "type": "string"
  18960. },
  18961. "type": {
  18962. "type": "string",
  18963. "enum": ["tui.session.select"]
  18964. },
  18965. "properties": {
  18966. "type": "object",
  18967. "properties": {
  18968. "sessionID": {
  18969. "type": "string",
  18970. "pattern": "^ses",
  18971. "description": "Session ID to navigate to"
  18972. }
  18973. },
  18974. "required": ["sessionID"],
  18975. "additionalProperties": false
  18976. }
  18977. },
  18978. "required": ["id", "type", "properties"],
  18979. "additionalProperties": false
  18980. },
  18981. "ModelV2Info": {
  18982. "type": "object",
  18983. "properties": {
  18984. "id": {
  18985. "type": "string"
  18986. },
  18987. "apiID": {
  18988. "type": "string"
  18989. },
  18990. "providerID": {
  18991. "type": "string"
  18992. },
  18993. "family": {
  18994. "type": "string"
  18995. },
  18996. "name": {
  18997. "type": "string"
  18998. },
  18999. "endpoint": {
  19000. "anyOf": [
  19001. {
  19002. "type": "object",
  19003. "properties": {
  19004. "type": {
  19005. "type": "string",
  19006. "enum": ["unknown"]
  19007. }
  19008. },
  19009. "required": ["type"],
  19010. "additionalProperties": false
  19011. },
  19012. {
  19013. "type": "object",
  19014. "properties": {
  19015. "type": {
  19016. "type": "string",
  19017. "enum": ["openai/responses"]
  19018. },
  19019. "url": {
  19020. "type": "string"
  19021. },
  19022. "websocket": {
  19023. "type": "boolean"
  19024. }
  19025. },
  19026. "required": ["type", "url"],
  19027. "additionalProperties": false
  19028. },
  19029. {
  19030. "type": "object",
  19031. "properties": {
  19032. "type": {
  19033. "type": "string",
  19034. "enum": ["openai/completions"]
  19035. },
  19036. "url": {
  19037. "type": "string"
  19038. },
  19039. "reasoning": {
  19040. "anyOf": [
  19041. {
  19042. "type": "object",
  19043. "properties": {
  19044. "type": {
  19045. "type": "string",
  19046. "enum": ["reasoning_content"]
  19047. }
  19048. },
  19049. "required": ["type"],
  19050. "additionalProperties": false
  19051. },
  19052. {
  19053. "type": "object",
  19054. "properties": {
  19055. "type": {
  19056. "type": "string",
  19057. "enum": ["reasoning_details"]
  19058. }
  19059. },
  19060. "required": ["type"],
  19061. "additionalProperties": false
  19062. }
  19063. ]
  19064. }
  19065. },
  19066. "required": ["type", "url"],
  19067. "additionalProperties": false
  19068. },
  19069. {
  19070. "type": "object",
  19071. "properties": {
  19072. "type": {
  19073. "type": "string",
  19074. "enum": ["anthropic/messages"]
  19075. },
  19076. "url": {
  19077. "type": "string"
  19078. }
  19079. },
  19080. "required": ["type", "url"],
  19081. "additionalProperties": false
  19082. },
  19083. {
  19084. "type": "object",
  19085. "properties": {
  19086. "type": {
  19087. "type": "string",
  19088. "enum": ["aisdk"]
  19089. },
  19090. "package": {
  19091. "type": "string"
  19092. },
  19093. "url": {
  19094. "type": "string"
  19095. }
  19096. },
  19097. "required": ["type", "package"],
  19098. "additionalProperties": false
  19099. }
  19100. ]
  19101. },
  19102. "capabilities": {
  19103. "type": "object",
  19104. "properties": {
  19105. "tools": {
  19106. "type": "boolean"
  19107. },
  19108. "input": {
  19109. "type": "array",
  19110. "items": {
  19111. "type": "string"
  19112. }
  19113. },
  19114. "output": {
  19115. "type": "array",
  19116. "items": {
  19117. "type": "string"
  19118. }
  19119. }
  19120. },
  19121. "required": ["tools", "input", "output"],
  19122. "additionalProperties": false
  19123. },
  19124. "options": {
  19125. "type": "object",
  19126. "properties": {
  19127. "headers": {
  19128. "type": "object",
  19129. "additionalProperties": {
  19130. "type": "string"
  19131. }
  19132. },
  19133. "body": {
  19134. "type": "object"
  19135. },
  19136. "aisdk": {
  19137. "type": "object",
  19138. "properties": {
  19139. "provider": {
  19140. "type": "object"
  19141. },
  19142. "request": {
  19143. "type": "object"
  19144. }
  19145. },
  19146. "required": ["provider", "request"],
  19147. "additionalProperties": false
  19148. },
  19149. "variant": {
  19150. "type": "string"
  19151. }
  19152. },
  19153. "required": ["headers", "body", "aisdk"],
  19154. "additionalProperties": false
  19155. },
  19156. "variants": {
  19157. "type": "array",
  19158. "items": {
  19159. "type": "object",
  19160. "properties": {
  19161. "id": {
  19162. "type": "string"
  19163. },
  19164. "headers": {
  19165. "type": "object",
  19166. "additionalProperties": {
  19167. "type": "string"
  19168. }
  19169. },
  19170. "body": {
  19171. "type": "object"
  19172. },
  19173. "aisdk": {
  19174. "type": "object",
  19175. "properties": {
  19176. "provider": {
  19177. "type": "object"
  19178. },
  19179. "request": {
  19180. "type": "object"
  19181. }
  19182. },
  19183. "required": ["provider", "request"],
  19184. "additionalProperties": false
  19185. }
  19186. },
  19187. "required": ["id", "headers", "body", "aisdk"],
  19188. "additionalProperties": false
  19189. }
  19190. },
  19191. "time": {
  19192. "type": "object",
  19193. "properties": {
  19194. "released": {
  19195. "anyOf": [
  19196. {
  19197. "type": "number"
  19198. },
  19199. {
  19200. "type": "string",
  19201. "enum": ["NaN"]
  19202. },
  19203. {
  19204. "type": "string",
  19205. "enum": ["Infinity"]
  19206. },
  19207. {
  19208. "type": "string",
  19209. "enum": ["-Infinity"]
  19210. },
  19211. {
  19212. "type": "string",
  19213. "enum": ["Infinity", "-Infinity", "NaN"]
  19214. }
  19215. ]
  19216. }
  19217. },
  19218. "required": ["released"],
  19219. "additionalProperties": false
  19220. },
  19221. "cost": {
  19222. "type": "array",
  19223. "items": {
  19224. "type": "object",
  19225. "properties": {
  19226. "tier": {
  19227. "type": "object",
  19228. "properties": {
  19229. "type": {
  19230. "type": "string",
  19231. "enum": ["context"]
  19232. },
  19233. "size": {
  19234. "type": "integer"
  19235. }
  19236. },
  19237. "required": ["type", "size"],
  19238. "additionalProperties": false
  19239. },
  19240. "input": {
  19241. "type": "number"
  19242. },
  19243. "output": {
  19244. "type": "number"
  19245. },
  19246. "cache": {
  19247. "type": "object",
  19248. "properties": {
  19249. "read": {
  19250. "type": "number"
  19251. },
  19252. "write": {
  19253. "type": "number"
  19254. }
  19255. },
  19256. "required": ["read", "write"],
  19257. "additionalProperties": false
  19258. }
  19259. },
  19260. "required": ["input", "output", "cache"],
  19261. "additionalProperties": false
  19262. }
  19263. },
  19264. "status": {
  19265. "type": "string",
  19266. "enum": ["alpha", "beta", "deprecated", "active"]
  19267. },
  19268. "enabled": {
  19269. "type": "boolean"
  19270. },
  19271. "limit": {
  19272. "type": "object",
  19273. "properties": {
  19274. "context": {
  19275. "type": "integer"
  19276. },
  19277. "input": {
  19278. "type": "integer"
  19279. },
  19280. "output": {
  19281. "type": "integer"
  19282. }
  19283. },
  19284. "required": ["context", "output"],
  19285. "additionalProperties": false
  19286. }
  19287. },
  19288. "required": [
  19289. "id",
  19290. "apiID",
  19291. "providerID",
  19292. "name",
  19293. "endpoint",
  19294. "capabilities",
  19295. "options",
  19296. "variants",
  19297. "time",
  19298. "cost",
  19299. "status",
  19300. "enabled",
  19301. "limit"
  19302. ],
  19303. "additionalProperties": false
  19304. },
  19305. "PromptSource": {
  19306. "type": "object",
  19307. "properties": {
  19308. "start": {
  19309. "type": "number"
  19310. },
  19311. "end": {
  19312. "type": "number"
  19313. },
  19314. "text": {
  19315. "type": "string"
  19316. }
  19317. },
  19318. "required": ["start", "end", "text"],
  19319. "additionalProperties": false
  19320. },
  19321. "PromptFileAttachment": {
  19322. "type": "object",
  19323. "properties": {
  19324. "uri": {
  19325. "type": "string"
  19326. },
  19327. "mime": {
  19328. "type": "string"
  19329. },
  19330. "name": {
  19331. "type": "string"
  19332. },
  19333. "description": {
  19334. "type": "string"
  19335. },
  19336. "source": {
  19337. "$ref": "#/components/schemas/PromptSource"
  19338. }
  19339. },
  19340. "required": ["uri", "mime"],
  19341. "additionalProperties": false
  19342. },
  19343. "PromptAgentAttachment": {
  19344. "type": "object",
  19345. "properties": {
  19346. "name": {
  19347. "type": "string"
  19348. },
  19349. "source": {
  19350. "$ref": "#/components/schemas/PromptSource"
  19351. }
  19352. },
  19353. "required": ["name"],
  19354. "additionalProperties": false
  19355. },
  19356. "PromptReferenceAttachment": {
  19357. "type": "object",
  19358. "properties": {
  19359. "name": {
  19360. "type": "string"
  19361. },
  19362. "kind": {
  19363. "type": "string",
  19364. "enum": ["local", "git", "invalid"]
  19365. },
  19366. "uri": {
  19367. "type": "string"
  19368. },
  19369. "repository": {
  19370. "type": "string"
  19371. },
  19372. "branch": {
  19373. "type": "string"
  19374. },
  19375. "target": {
  19376. "type": "string"
  19377. },
  19378. "targetUri": {
  19379. "type": "string"
  19380. },
  19381. "problem": {
  19382. "type": "string"
  19383. },
  19384. "source": {
  19385. "$ref": "#/components/schemas/PromptSource"
  19386. }
  19387. },
  19388. "required": ["name", "kind"],
  19389. "additionalProperties": false
  19390. },
  19391. "SessionErrorUnknown": {
  19392. "type": "object",
  19393. "properties": {
  19394. "type": {
  19395. "type": "string",
  19396. "enum": ["unknown"]
  19397. },
  19398. "message": {
  19399. "type": "string"
  19400. }
  19401. },
  19402. "required": ["type", "message"],
  19403. "additionalProperties": false
  19404. },
  19405. "ToolTextContent": {
  19406. "type": "object",
  19407. "properties": {
  19408. "type": {
  19409. "type": "string",
  19410. "enum": ["text"]
  19411. },
  19412. "text": {
  19413. "type": "string"
  19414. }
  19415. },
  19416. "required": ["type", "text"],
  19417. "additionalProperties": false
  19418. },
  19419. "ToolFileContent": {
  19420. "type": "object",
  19421. "properties": {
  19422. "type": {
  19423. "type": "string",
  19424. "enum": ["file"]
  19425. },
  19426. "uri": {
  19427. "type": "string"
  19428. },
  19429. "mime": {
  19430. "type": "string"
  19431. },
  19432. "name": {
  19433. "type": "string"
  19434. }
  19435. },
  19436. "required": ["type", "uri", "mime"],
  19437. "additionalProperties": false
  19438. },
  19439. "SessionNextRetry_error": {
  19440. "type": "object",
  19441. "properties": {
  19442. "message": {
  19443. "type": "string"
  19444. },
  19445. "statusCode": {
  19446. "type": "number"
  19447. },
  19448. "isRetryable": {
  19449. "type": "boolean"
  19450. },
  19451. "responseHeaders": {
  19452. "type": "object",
  19453. "additionalProperties": {
  19454. "type": "string"
  19455. }
  19456. },
  19457. "responseBody": {
  19458. "type": "string"
  19459. },
  19460. "metadata": {
  19461. "type": "object",
  19462. "additionalProperties": {
  19463. "type": "string"
  19464. }
  19465. }
  19466. },
  19467. "required": ["message", "isRetryable"],
  19468. "additionalProperties": false
  19469. },
  19470. "PermissionV2Source": {
  19471. "type": "object",
  19472. "properties": {
  19473. "type": {
  19474. "type": "string",
  19475. "enum": ["tool"]
  19476. },
  19477. "messageID": {
  19478. "type": "string"
  19479. },
  19480. "callID": {
  19481. "type": "string"
  19482. }
  19483. },
  19484. "required": ["type", "messageID", "callID"],
  19485. "additionalProperties": false
  19486. },
  19487. "PermissionV2Reply": {
  19488. "type": "string",
  19489. "enum": ["once", "always", "reject"]
  19490. },
  19491. "AuthOAuthCredential": {
  19492. "type": "object",
  19493. "properties": {
  19494. "type": {
  19495. "type": "string",
  19496. "enum": ["oauth"]
  19497. },
  19498. "refresh": {
  19499. "type": "string"
  19500. },
  19501. "access": {
  19502. "type": "string"
  19503. },
  19504. "expires": {
  19505. "type": "integer",
  19506. "minimum": 0
  19507. }
  19508. },
  19509. "required": ["type", "refresh", "access", "expires"],
  19510. "additionalProperties": false
  19511. },
  19512. "AuthApiKeyCredential": {
  19513. "type": "object",
  19514. "properties": {
  19515. "type": {
  19516. "type": "string",
  19517. "enum": ["api"]
  19518. },
  19519. "key": {
  19520. "type": "string"
  19521. },
  19522. "metadata": {
  19523. "type": "object",
  19524. "additionalProperties": {
  19525. "type": "string"
  19526. }
  19527. }
  19528. },
  19529. "required": ["type", "key"],
  19530. "additionalProperties": false
  19531. },
  19532. "AuthCredential": {
  19533. "anyOf": [
  19534. {
  19535. "$ref": "#/components/schemas/AuthOAuthCredential"
  19536. },
  19537. {
  19538. "$ref": "#/components/schemas/AuthApiKeyCredential"
  19539. }
  19540. ]
  19541. },
  19542. "AuthInfo": {
  19543. "type": "object",
  19544. "properties": {
  19545. "id": {
  19546. "type": "string"
  19547. },
  19548. "serviceID": {
  19549. "type": "string"
  19550. },
  19551. "description": {
  19552. "type": "string"
  19553. },
  19554. "credential": {
  19555. "$ref": "#/components/schemas/AuthCredential"
  19556. }
  19557. },
  19558. "required": ["id", "serviceID", "description", "credential"],
  19559. "additionalProperties": false
  19560. },
  19561. "EventServerInstanceDisposed": {
  19562. "type": "object",
  19563. "properties": {
  19564. "id": {
  19565. "type": "string"
  19566. },
  19567. "type": {
  19568. "type": "string",
  19569. "enum": ["server.instance.disposed"]
  19570. },
  19571. "properties": {
  19572. "type": "object",
  19573. "properties": {
  19574. "directory": {
  19575. "type": "string"
  19576. }
  19577. },
  19578. "required": ["directory"],
  19579. "additionalProperties": false
  19580. }
  19581. },
  19582. "required": ["id", "type", "properties"],
  19583. "additionalProperties": false
  19584. },
  19585. "SyncEventSessionCreated": {
  19586. "type": "object",
  19587. "properties": {
  19588. "type": {
  19589. "type": "string",
  19590. "enum": ["sync"]
  19591. },
  19592. "name": {
  19593. "type": "string",
  19594. "enum": ["session.created.1"]
  19595. },
  19596. "id": {
  19597. "type": "string"
  19598. },
  19599. "seq": {
  19600. "type": "number"
  19601. },
  19602. "aggregateID": {
  19603. "type": "string",
  19604. "enum": ["sessionID"]
  19605. },
  19606. "data": {
  19607. "type": "object",
  19608. "properties": {
  19609. "sessionID": {
  19610. "type": "string",
  19611. "pattern": "^ses"
  19612. },
  19613. "info": {
  19614. "$ref": "#/components/schemas/Session"
  19615. }
  19616. },
  19617. "required": ["sessionID", "info"],
  19618. "additionalProperties": false
  19619. }
  19620. },
  19621. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19622. "additionalProperties": false
  19623. },
  19624. "SyncEventSessionUpdated": {
  19625. "type": "object",
  19626. "properties": {
  19627. "type": {
  19628. "type": "string",
  19629. "enum": ["sync"]
  19630. },
  19631. "name": {
  19632. "type": "string",
  19633. "enum": ["session.updated.1"]
  19634. },
  19635. "id": {
  19636. "type": "string"
  19637. },
  19638. "seq": {
  19639. "type": "number"
  19640. },
  19641. "aggregateID": {
  19642. "type": "string",
  19643. "enum": ["sessionID"]
  19644. },
  19645. "data": {
  19646. "type": "object",
  19647. "properties": {
  19648. "sessionID": {
  19649. "type": "string",
  19650. "pattern": "^ses"
  19651. },
  19652. "info": {
  19653. "$ref": "#/components/schemas/Session"
  19654. }
  19655. },
  19656. "required": ["sessionID", "info"],
  19657. "additionalProperties": false
  19658. }
  19659. },
  19660. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19661. "additionalProperties": false
  19662. },
  19663. "SyncEventSessionDeleted": {
  19664. "type": "object",
  19665. "properties": {
  19666. "type": {
  19667. "type": "string",
  19668. "enum": ["sync"]
  19669. },
  19670. "name": {
  19671. "type": "string",
  19672. "enum": ["session.deleted.1"]
  19673. },
  19674. "id": {
  19675. "type": "string"
  19676. },
  19677. "seq": {
  19678. "type": "number"
  19679. },
  19680. "aggregateID": {
  19681. "type": "string",
  19682. "enum": ["sessionID"]
  19683. },
  19684. "data": {
  19685. "type": "object",
  19686. "properties": {
  19687. "sessionID": {
  19688. "type": "string",
  19689. "pattern": "^ses"
  19690. },
  19691. "info": {
  19692. "$ref": "#/components/schemas/Session"
  19693. }
  19694. },
  19695. "required": ["sessionID", "info"],
  19696. "additionalProperties": false
  19697. }
  19698. },
  19699. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19700. "additionalProperties": false
  19701. },
  19702. "SyncEventMessageUpdated": {
  19703. "type": "object",
  19704. "properties": {
  19705. "type": {
  19706. "type": "string",
  19707. "enum": ["sync"]
  19708. },
  19709. "name": {
  19710. "type": "string",
  19711. "enum": ["message.updated.1"]
  19712. },
  19713. "id": {
  19714. "type": "string"
  19715. },
  19716. "seq": {
  19717. "type": "number"
  19718. },
  19719. "aggregateID": {
  19720. "type": "string",
  19721. "enum": ["sessionID"]
  19722. },
  19723. "data": {
  19724. "type": "object",
  19725. "properties": {
  19726. "sessionID": {
  19727. "type": "string",
  19728. "pattern": "^ses"
  19729. },
  19730. "info": {
  19731. "$ref": "#/components/schemas/Message"
  19732. }
  19733. },
  19734. "required": ["sessionID", "info"],
  19735. "additionalProperties": false
  19736. }
  19737. },
  19738. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19739. "additionalProperties": false
  19740. },
  19741. "SyncEventMessageRemoved": {
  19742. "type": "object",
  19743. "properties": {
  19744. "type": {
  19745. "type": "string",
  19746. "enum": ["sync"]
  19747. },
  19748. "name": {
  19749. "type": "string",
  19750. "enum": ["message.removed.1"]
  19751. },
  19752. "id": {
  19753. "type": "string"
  19754. },
  19755. "seq": {
  19756. "type": "number"
  19757. },
  19758. "aggregateID": {
  19759. "type": "string",
  19760. "enum": ["sessionID"]
  19761. },
  19762. "data": {
  19763. "type": "object",
  19764. "properties": {
  19765. "sessionID": {
  19766. "type": "string",
  19767. "pattern": "^ses"
  19768. },
  19769. "messageID": {
  19770. "type": "string",
  19771. "pattern": "^msg"
  19772. }
  19773. },
  19774. "required": ["sessionID", "messageID"],
  19775. "additionalProperties": false
  19776. }
  19777. },
  19778. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19779. "additionalProperties": false
  19780. },
  19781. "SyncEventMessagePartUpdated": {
  19782. "type": "object",
  19783. "properties": {
  19784. "type": {
  19785. "type": "string",
  19786. "enum": ["sync"]
  19787. },
  19788. "name": {
  19789. "type": "string",
  19790. "enum": ["message.part.updated.1"]
  19791. },
  19792. "id": {
  19793. "type": "string"
  19794. },
  19795. "seq": {
  19796. "type": "number"
  19797. },
  19798. "aggregateID": {
  19799. "type": "string",
  19800. "enum": ["sessionID"]
  19801. },
  19802. "data": {
  19803. "type": "object",
  19804. "properties": {
  19805. "sessionID": {
  19806. "type": "string",
  19807. "pattern": "^ses"
  19808. },
  19809. "part": {
  19810. "$ref": "#/components/schemas/Part"
  19811. },
  19812. "time": {
  19813. "type": "number"
  19814. }
  19815. },
  19816. "required": ["sessionID", "part", "time"],
  19817. "additionalProperties": false
  19818. }
  19819. },
  19820. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19821. "additionalProperties": false
  19822. },
  19823. "SyncEventMessagePartRemoved": {
  19824. "type": "object",
  19825. "properties": {
  19826. "type": {
  19827. "type": "string",
  19828. "enum": ["sync"]
  19829. },
  19830. "name": {
  19831. "type": "string",
  19832. "enum": ["message.part.removed.1"]
  19833. },
  19834. "id": {
  19835. "type": "string"
  19836. },
  19837. "seq": {
  19838. "type": "number"
  19839. },
  19840. "aggregateID": {
  19841. "type": "string",
  19842. "enum": ["sessionID"]
  19843. },
  19844. "data": {
  19845. "type": "object",
  19846. "properties": {
  19847. "sessionID": {
  19848. "type": "string",
  19849. "pattern": "^ses"
  19850. },
  19851. "messageID": {
  19852. "type": "string",
  19853. "pattern": "^msg"
  19854. },
  19855. "partID": {
  19856. "type": "string",
  19857. "pattern": "^prt"
  19858. }
  19859. },
  19860. "required": ["sessionID", "messageID", "partID"],
  19861. "additionalProperties": false
  19862. }
  19863. },
  19864. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19865. "additionalProperties": false
  19866. },
  19867. "SyncEventSessionNextAgentSwitched": {
  19868. "type": "object",
  19869. "properties": {
  19870. "type": {
  19871. "type": "string",
  19872. "enum": ["sync"]
  19873. },
  19874. "name": {
  19875. "type": "string",
  19876. "enum": ["session.next.agent.switched.1"]
  19877. },
  19878. "id": {
  19879. "type": "string"
  19880. },
  19881. "seq": {
  19882. "type": "number"
  19883. },
  19884. "aggregateID": {
  19885. "type": "string",
  19886. "enum": ["sessionID"]
  19887. },
  19888. "data": {
  19889. "type": "object",
  19890. "properties": {
  19891. "timestamp": {
  19892. "type": "number"
  19893. },
  19894. "sessionID": {
  19895. "type": "string",
  19896. "pattern": "^ses"
  19897. },
  19898. "agent": {
  19899. "type": "string"
  19900. }
  19901. },
  19902. "required": ["timestamp", "sessionID", "agent"],
  19903. "additionalProperties": false
  19904. }
  19905. },
  19906. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19907. "additionalProperties": false
  19908. },
  19909. "SyncEventSessionNextModelSwitched": {
  19910. "type": "object",
  19911. "properties": {
  19912. "type": {
  19913. "type": "string",
  19914. "enum": ["sync"]
  19915. },
  19916. "name": {
  19917. "type": "string",
  19918. "enum": ["session.next.model.switched.1"]
  19919. },
  19920. "id": {
  19921. "type": "string"
  19922. },
  19923. "seq": {
  19924. "type": "number"
  19925. },
  19926. "aggregateID": {
  19927. "type": "string",
  19928. "enum": ["sessionID"]
  19929. },
  19930. "data": {
  19931. "type": "object",
  19932. "properties": {
  19933. "timestamp": {
  19934. "type": "number"
  19935. },
  19936. "sessionID": {
  19937. "type": "string",
  19938. "pattern": "^ses"
  19939. },
  19940. "model": {
  19941. "type": "object",
  19942. "properties": {
  19943. "id": {
  19944. "type": "string"
  19945. },
  19946. "providerID": {
  19947. "type": "string"
  19948. },
  19949. "variant": {
  19950. "type": "string"
  19951. }
  19952. },
  19953. "required": ["id", "providerID"],
  19954. "additionalProperties": false
  19955. }
  19956. },
  19957. "required": ["timestamp", "sessionID", "model"],
  19958. "additionalProperties": false
  19959. }
  19960. },
  19961. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19962. "additionalProperties": false
  19963. },
  19964. "SyncEventSessionNextPrompted": {
  19965. "type": "object",
  19966. "properties": {
  19967. "type": {
  19968. "type": "string",
  19969. "enum": ["sync"]
  19970. },
  19971. "name": {
  19972. "type": "string",
  19973. "enum": ["session.next.prompted.1"]
  19974. },
  19975. "id": {
  19976. "type": "string"
  19977. },
  19978. "seq": {
  19979. "type": "number"
  19980. },
  19981. "aggregateID": {
  19982. "type": "string",
  19983. "enum": ["sessionID"]
  19984. },
  19985. "data": {
  19986. "type": "object",
  19987. "properties": {
  19988. "timestamp": {
  19989. "type": "number"
  19990. },
  19991. "sessionID": {
  19992. "type": "string",
  19993. "pattern": "^ses"
  19994. },
  19995. "prompt": {
  19996. "$ref": "#/components/schemas/Prompt"
  19997. }
  19998. },
  19999. "required": ["timestamp", "sessionID", "prompt"],
  20000. "additionalProperties": false
  20001. }
  20002. },
  20003. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20004. "additionalProperties": false
  20005. },
  20006. "SyncEventSessionNextSynthetic": {
  20007. "type": "object",
  20008. "properties": {
  20009. "type": {
  20010. "type": "string",
  20011. "enum": ["sync"]
  20012. },
  20013. "name": {
  20014. "type": "string",
  20015. "enum": ["session.next.synthetic.1"]
  20016. },
  20017. "id": {
  20018. "type": "string"
  20019. },
  20020. "seq": {
  20021. "type": "number"
  20022. },
  20023. "aggregateID": {
  20024. "type": "string",
  20025. "enum": ["sessionID"]
  20026. },
  20027. "data": {
  20028. "type": "object",
  20029. "properties": {
  20030. "timestamp": {
  20031. "type": "number"
  20032. },
  20033. "sessionID": {
  20034. "type": "string",
  20035. "pattern": "^ses"
  20036. },
  20037. "text": {
  20038. "type": "string"
  20039. }
  20040. },
  20041. "required": ["timestamp", "sessionID", "text"],
  20042. "additionalProperties": false
  20043. }
  20044. },
  20045. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20046. "additionalProperties": false
  20047. },
  20048. "SyncEventSessionNextShellStarted": {
  20049. "type": "object",
  20050. "properties": {
  20051. "type": {
  20052. "type": "string",
  20053. "enum": ["sync"]
  20054. },
  20055. "name": {
  20056. "type": "string",
  20057. "enum": ["session.next.shell.started.1"]
  20058. },
  20059. "id": {
  20060. "type": "string"
  20061. },
  20062. "seq": {
  20063. "type": "number"
  20064. },
  20065. "aggregateID": {
  20066. "type": "string",
  20067. "enum": ["sessionID"]
  20068. },
  20069. "data": {
  20070. "type": "object",
  20071. "properties": {
  20072. "timestamp": {
  20073. "type": "number"
  20074. },
  20075. "sessionID": {
  20076. "type": "string",
  20077. "pattern": "^ses"
  20078. },
  20079. "callID": {
  20080. "type": "string"
  20081. },
  20082. "command": {
  20083. "type": "string"
  20084. }
  20085. },
  20086. "required": ["timestamp", "sessionID", "callID", "command"],
  20087. "additionalProperties": false
  20088. }
  20089. },
  20090. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20091. "additionalProperties": false
  20092. },
  20093. "SyncEventSessionNextShellEnded": {
  20094. "type": "object",
  20095. "properties": {
  20096. "type": {
  20097. "type": "string",
  20098. "enum": ["sync"]
  20099. },
  20100. "name": {
  20101. "type": "string",
  20102. "enum": ["session.next.shell.ended.1"]
  20103. },
  20104. "id": {
  20105. "type": "string"
  20106. },
  20107. "seq": {
  20108. "type": "number"
  20109. },
  20110. "aggregateID": {
  20111. "type": "string",
  20112. "enum": ["sessionID"]
  20113. },
  20114. "data": {
  20115. "type": "object",
  20116. "properties": {
  20117. "timestamp": {
  20118. "type": "number"
  20119. },
  20120. "sessionID": {
  20121. "type": "string",
  20122. "pattern": "^ses"
  20123. },
  20124. "callID": {
  20125. "type": "string"
  20126. },
  20127. "output": {
  20128. "type": "string"
  20129. }
  20130. },
  20131. "required": ["timestamp", "sessionID", "callID", "output"],
  20132. "additionalProperties": false
  20133. }
  20134. },
  20135. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20136. "additionalProperties": false
  20137. },
  20138. "SyncEventSessionNextStepStarted": {
  20139. "type": "object",
  20140. "properties": {
  20141. "type": {
  20142. "type": "string",
  20143. "enum": ["sync"]
  20144. },
  20145. "name": {
  20146. "type": "string",
  20147. "enum": ["session.next.step.started.1"]
  20148. },
  20149. "id": {
  20150. "type": "string"
  20151. },
  20152. "seq": {
  20153. "type": "number"
  20154. },
  20155. "aggregateID": {
  20156. "type": "string",
  20157. "enum": ["sessionID"]
  20158. },
  20159. "data": {
  20160. "type": "object",
  20161. "properties": {
  20162. "timestamp": {
  20163. "type": "number"
  20164. },
  20165. "sessionID": {
  20166. "type": "string",
  20167. "pattern": "^ses"
  20168. },
  20169. "agent": {
  20170. "type": "string"
  20171. },
  20172. "model": {
  20173. "type": "object",
  20174. "properties": {
  20175. "id": {
  20176. "type": "string"
  20177. },
  20178. "providerID": {
  20179. "type": "string"
  20180. },
  20181. "variant": {
  20182. "type": "string"
  20183. }
  20184. },
  20185. "required": ["id", "providerID"],
  20186. "additionalProperties": false
  20187. },
  20188. "snapshot": {
  20189. "type": "string"
  20190. }
  20191. },
  20192. "required": ["timestamp", "sessionID", "agent", "model"],
  20193. "additionalProperties": false
  20194. }
  20195. },
  20196. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20197. "additionalProperties": false
  20198. },
  20199. "SyncEventSessionNextStepEnded": {
  20200. "type": "object",
  20201. "properties": {
  20202. "type": {
  20203. "type": "string",
  20204. "enum": ["sync"]
  20205. },
  20206. "name": {
  20207. "type": "string",
  20208. "enum": ["session.next.step.ended.1"]
  20209. },
  20210. "id": {
  20211. "type": "string"
  20212. },
  20213. "seq": {
  20214. "type": "number"
  20215. },
  20216. "aggregateID": {
  20217. "type": "string",
  20218. "enum": ["sessionID"]
  20219. },
  20220. "data": {
  20221. "type": "object",
  20222. "properties": {
  20223. "timestamp": {
  20224. "type": "number"
  20225. },
  20226. "sessionID": {
  20227. "type": "string",
  20228. "pattern": "^ses"
  20229. },
  20230. "finish": {
  20231. "type": "string"
  20232. },
  20233. "cost": {
  20234. "type": "number"
  20235. },
  20236. "tokens": {
  20237. "type": "object",
  20238. "properties": {
  20239. "input": {
  20240. "type": "number"
  20241. },
  20242. "output": {
  20243. "type": "number"
  20244. },
  20245. "reasoning": {
  20246. "type": "number"
  20247. },
  20248. "cache": {
  20249. "type": "object",
  20250. "properties": {
  20251. "read": {
  20252. "type": "number"
  20253. },
  20254. "write": {
  20255. "type": "number"
  20256. }
  20257. },
  20258. "required": ["read", "write"],
  20259. "additionalProperties": false
  20260. }
  20261. },
  20262. "required": ["input", "output", "reasoning", "cache"],
  20263. "additionalProperties": false
  20264. },
  20265. "snapshot": {
  20266. "type": "string"
  20267. }
  20268. },
  20269. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  20270. "additionalProperties": false
  20271. }
  20272. },
  20273. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20274. "additionalProperties": false
  20275. },
  20276. "SyncEventSessionNextStepFailed": {
  20277. "type": "object",
  20278. "properties": {
  20279. "type": {
  20280. "type": "string",
  20281. "enum": ["sync"]
  20282. },
  20283. "name": {
  20284. "type": "string",
  20285. "enum": ["session.next.step.failed.1"]
  20286. },
  20287. "id": {
  20288. "type": "string"
  20289. },
  20290. "seq": {
  20291. "type": "number"
  20292. },
  20293. "aggregateID": {
  20294. "type": "string",
  20295. "enum": ["sessionID"]
  20296. },
  20297. "data": {
  20298. "type": "object",
  20299. "properties": {
  20300. "timestamp": {
  20301. "type": "number"
  20302. },
  20303. "sessionID": {
  20304. "type": "string",
  20305. "pattern": "^ses"
  20306. },
  20307. "error": {
  20308. "$ref": "#/components/schemas/SessionErrorUnknown"
  20309. }
  20310. },
  20311. "required": ["timestamp", "sessionID", "error"],
  20312. "additionalProperties": false
  20313. }
  20314. },
  20315. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20316. "additionalProperties": false
  20317. },
  20318. "SyncEventSessionNextTextStarted": {
  20319. "type": "object",
  20320. "properties": {
  20321. "type": {
  20322. "type": "string",
  20323. "enum": ["sync"]
  20324. },
  20325. "name": {
  20326. "type": "string",
  20327. "enum": ["session.next.text.started.1"]
  20328. },
  20329. "id": {
  20330. "type": "string"
  20331. },
  20332. "seq": {
  20333. "type": "number"
  20334. },
  20335. "aggregateID": {
  20336. "type": "string",
  20337. "enum": ["sessionID"]
  20338. },
  20339. "data": {
  20340. "type": "object",
  20341. "properties": {
  20342. "timestamp": {
  20343. "type": "number"
  20344. },
  20345. "sessionID": {
  20346. "type": "string",
  20347. "pattern": "^ses"
  20348. }
  20349. },
  20350. "required": ["timestamp", "sessionID"],
  20351. "additionalProperties": false
  20352. }
  20353. },
  20354. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20355. "additionalProperties": false
  20356. },
  20357. "SyncEventSessionNextTextDelta": {
  20358. "type": "object",
  20359. "properties": {
  20360. "type": {
  20361. "type": "string",
  20362. "enum": ["sync"]
  20363. },
  20364. "name": {
  20365. "type": "string",
  20366. "enum": ["session.next.text.delta.1"]
  20367. },
  20368. "id": {
  20369. "type": "string"
  20370. },
  20371. "seq": {
  20372. "type": "number"
  20373. },
  20374. "aggregateID": {
  20375. "type": "string",
  20376. "enum": ["sessionID"]
  20377. },
  20378. "data": {
  20379. "type": "object",
  20380. "properties": {
  20381. "timestamp": {
  20382. "type": "number"
  20383. },
  20384. "sessionID": {
  20385. "type": "string",
  20386. "pattern": "^ses"
  20387. },
  20388. "delta": {
  20389. "type": "string"
  20390. }
  20391. },
  20392. "required": ["timestamp", "sessionID", "delta"],
  20393. "additionalProperties": false
  20394. }
  20395. },
  20396. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20397. "additionalProperties": false
  20398. },
  20399. "SyncEventSessionNextTextEnded": {
  20400. "type": "object",
  20401. "properties": {
  20402. "type": {
  20403. "type": "string",
  20404. "enum": ["sync"]
  20405. },
  20406. "name": {
  20407. "type": "string",
  20408. "enum": ["session.next.text.ended.1"]
  20409. },
  20410. "id": {
  20411. "type": "string"
  20412. },
  20413. "seq": {
  20414. "type": "number"
  20415. },
  20416. "aggregateID": {
  20417. "type": "string",
  20418. "enum": ["sessionID"]
  20419. },
  20420. "data": {
  20421. "type": "object",
  20422. "properties": {
  20423. "timestamp": {
  20424. "type": "number"
  20425. },
  20426. "sessionID": {
  20427. "type": "string",
  20428. "pattern": "^ses"
  20429. },
  20430. "text": {
  20431. "type": "string"
  20432. }
  20433. },
  20434. "required": ["timestamp", "sessionID", "text"],
  20435. "additionalProperties": false
  20436. }
  20437. },
  20438. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20439. "additionalProperties": false
  20440. },
  20441. "SyncEventSessionNextReasoningStarted": {
  20442. "type": "object",
  20443. "properties": {
  20444. "type": {
  20445. "type": "string",
  20446. "enum": ["sync"]
  20447. },
  20448. "name": {
  20449. "type": "string",
  20450. "enum": ["session.next.reasoning.started.1"]
  20451. },
  20452. "id": {
  20453. "type": "string"
  20454. },
  20455. "seq": {
  20456. "type": "number"
  20457. },
  20458. "aggregateID": {
  20459. "type": "string",
  20460. "enum": ["sessionID"]
  20461. },
  20462. "data": {
  20463. "type": "object",
  20464. "properties": {
  20465. "timestamp": {
  20466. "type": "number"
  20467. },
  20468. "sessionID": {
  20469. "type": "string",
  20470. "pattern": "^ses"
  20471. },
  20472. "reasoningID": {
  20473. "type": "string"
  20474. }
  20475. },
  20476. "required": ["timestamp", "sessionID", "reasoningID"],
  20477. "additionalProperties": false
  20478. }
  20479. },
  20480. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20481. "additionalProperties": false
  20482. },
  20483. "SyncEventSessionNextReasoningDelta": {
  20484. "type": "object",
  20485. "properties": {
  20486. "type": {
  20487. "type": "string",
  20488. "enum": ["sync"]
  20489. },
  20490. "name": {
  20491. "type": "string",
  20492. "enum": ["session.next.reasoning.delta.1"]
  20493. },
  20494. "id": {
  20495. "type": "string"
  20496. },
  20497. "seq": {
  20498. "type": "number"
  20499. },
  20500. "aggregateID": {
  20501. "type": "string",
  20502. "enum": ["sessionID"]
  20503. },
  20504. "data": {
  20505. "type": "object",
  20506. "properties": {
  20507. "timestamp": {
  20508. "type": "number"
  20509. },
  20510. "sessionID": {
  20511. "type": "string",
  20512. "pattern": "^ses"
  20513. },
  20514. "reasoningID": {
  20515. "type": "string"
  20516. },
  20517. "delta": {
  20518. "type": "string"
  20519. }
  20520. },
  20521. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  20522. "additionalProperties": false
  20523. }
  20524. },
  20525. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20526. "additionalProperties": false
  20527. },
  20528. "SyncEventSessionNextReasoningEnded": {
  20529. "type": "object",
  20530. "properties": {
  20531. "type": {
  20532. "type": "string",
  20533. "enum": ["sync"]
  20534. },
  20535. "name": {
  20536. "type": "string",
  20537. "enum": ["session.next.reasoning.ended.1"]
  20538. },
  20539. "id": {
  20540. "type": "string"
  20541. },
  20542. "seq": {
  20543. "type": "number"
  20544. },
  20545. "aggregateID": {
  20546. "type": "string",
  20547. "enum": ["sessionID"]
  20548. },
  20549. "data": {
  20550. "type": "object",
  20551. "properties": {
  20552. "timestamp": {
  20553. "type": "number"
  20554. },
  20555. "sessionID": {
  20556. "type": "string",
  20557. "pattern": "^ses"
  20558. },
  20559. "reasoningID": {
  20560. "type": "string"
  20561. },
  20562. "text": {
  20563. "type": "string"
  20564. }
  20565. },
  20566. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  20567. "additionalProperties": false
  20568. }
  20569. },
  20570. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20571. "additionalProperties": false
  20572. },
  20573. "SyncEventSessionNextToolInputStarted": {
  20574. "type": "object",
  20575. "properties": {
  20576. "type": {
  20577. "type": "string",
  20578. "enum": ["sync"]
  20579. },
  20580. "name": {
  20581. "type": "string",
  20582. "enum": ["session.next.tool.input.started.1"]
  20583. },
  20584. "id": {
  20585. "type": "string"
  20586. },
  20587. "seq": {
  20588. "type": "number"
  20589. },
  20590. "aggregateID": {
  20591. "type": "string",
  20592. "enum": ["sessionID"]
  20593. },
  20594. "data": {
  20595. "type": "object",
  20596. "properties": {
  20597. "timestamp": {
  20598. "type": "number"
  20599. },
  20600. "sessionID": {
  20601. "type": "string",
  20602. "pattern": "^ses"
  20603. },
  20604. "callID": {
  20605. "type": "string"
  20606. },
  20607. "name": {
  20608. "type": "string"
  20609. }
  20610. },
  20611. "required": ["timestamp", "sessionID", "callID", "name"],
  20612. "additionalProperties": false
  20613. }
  20614. },
  20615. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20616. "additionalProperties": false
  20617. },
  20618. "SyncEventSessionNextToolInputDelta": {
  20619. "type": "object",
  20620. "properties": {
  20621. "type": {
  20622. "type": "string",
  20623. "enum": ["sync"]
  20624. },
  20625. "name": {
  20626. "type": "string",
  20627. "enum": ["session.next.tool.input.delta.1"]
  20628. },
  20629. "id": {
  20630. "type": "string"
  20631. },
  20632. "seq": {
  20633. "type": "number"
  20634. },
  20635. "aggregateID": {
  20636. "type": "string",
  20637. "enum": ["sessionID"]
  20638. },
  20639. "data": {
  20640. "type": "object",
  20641. "properties": {
  20642. "timestamp": {
  20643. "type": "number"
  20644. },
  20645. "sessionID": {
  20646. "type": "string",
  20647. "pattern": "^ses"
  20648. },
  20649. "callID": {
  20650. "type": "string"
  20651. },
  20652. "delta": {
  20653. "type": "string"
  20654. }
  20655. },
  20656. "required": ["timestamp", "sessionID", "callID", "delta"],
  20657. "additionalProperties": false
  20658. }
  20659. },
  20660. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20661. "additionalProperties": false
  20662. },
  20663. "SyncEventSessionNextToolInputEnded": {
  20664. "type": "object",
  20665. "properties": {
  20666. "type": {
  20667. "type": "string",
  20668. "enum": ["sync"]
  20669. },
  20670. "name": {
  20671. "type": "string",
  20672. "enum": ["session.next.tool.input.ended.1"]
  20673. },
  20674. "id": {
  20675. "type": "string"
  20676. },
  20677. "seq": {
  20678. "type": "number"
  20679. },
  20680. "aggregateID": {
  20681. "type": "string",
  20682. "enum": ["sessionID"]
  20683. },
  20684. "data": {
  20685. "type": "object",
  20686. "properties": {
  20687. "timestamp": {
  20688. "type": "number"
  20689. },
  20690. "sessionID": {
  20691. "type": "string",
  20692. "pattern": "^ses"
  20693. },
  20694. "callID": {
  20695. "type": "string"
  20696. },
  20697. "text": {
  20698. "type": "string"
  20699. }
  20700. },
  20701. "required": ["timestamp", "sessionID", "callID", "text"],
  20702. "additionalProperties": false
  20703. }
  20704. },
  20705. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20706. "additionalProperties": false
  20707. },
  20708. "SyncEventSessionNextToolCalled": {
  20709. "type": "object",
  20710. "properties": {
  20711. "type": {
  20712. "type": "string",
  20713. "enum": ["sync"]
  20714. },
  20715. "name": {
  20716. "type": "string",
  20717. "enum": ["session.next.tool.called.1"]
  20718. },
  20719. "id": {
  20720. "type": "string"
  20721. },
  20722. "seq": {
  20723. "type": "number"
  20724. },
  20725. "aggregateID": {
  20726. "type": "string",
  20727. "enum": ["sessionID"]
  20728. },
  20729. "data": {
  20730. "type": "object",
  20731. "properties": {
  20732. "timestamp": {
  20733. "type": "number"
  20734. },
  20735. "sessionID": {
  20736. "type": "string",
  20737. "pattern": "^ses"
  20738. },
  20739. "callID": {
  20740. "type": "string"
  20741. },
  20742. "tool": {
  20743. "type": "string"
  20744. },
  20745. "input": {
  20746. "type": "object"
  20747. },
  20748. "provider": {
  20749. "type": "object",
  20750. "properties": {
  20751. "executed": {
  20752. "type": "boolean"
  20753. },
  20754. "metadata": {
  20755. "type": "object"
  20756. }
  20757. },
  20758. "required": ["executed"],
  20759. "additionalProperties": false
  20760. }
  20761. },
  20762. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  20763. "additionalProperties": false
  20764. }
  20765. },
  20766. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20767. "additionalProperties": false
  20768. },
  20769. "SyncEventSessionNextToolProgress": {
  20770. "type": "object",
  20771. "properties": {
  20772. "type": {
  20773. "type": "string",
  20774. "enum": ["sync"]
  20775. },
  20776. "name": {
  20777. "type": "string",
  20778. "enum": ["session.next.tool.progress.1"]
  20779. },
  20780. "id": {
  20781. "type": "string"
  20782. },
  20783. "seq": {
  20784. "type": "number"
  20785. },
  20786. "aggregateID": {
  20787. "type": "string",
  20788. "enum": ["sessionID"]
  20789. },
  20790. "data": {
  20791. "type": "object",
  20792. "properties": {
  20793. "timestamp": {
  20794. "type": "number"
  20795. },
  20796. "sessionID": {
  20797. "type": "string",
  20798. "pattern": "^ses"
  20799. },
  20800. "callID": {
  20801. "type": "string"
  20802. },
  20803. "structured": {
  20804. "type": "object"
  20805. },
  20806. "content": {
  20807. "type": "array",
  20808. "items": {
  20809. "anyOf": [
  20810. {
  20811. "$ref": "#/components/schemas/ToolTextContent"
  20812. },
  20813. {
  20814. "$ref": "#/components/schemas/ToolFileContent"
  20815. }
  20816. ]
  20817. }
  20818. }
  20819. },
  20820. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  20821. "additionalProperties": false
  20822. }
  20823. },
  20824. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20825. "additionalProperties": false
  20826. },
  20827. "SyncEventSessionNextToolSuccess": {
  20828. "type": "object",
  20829. "properties": {
  20830. "type": {
  20831. "type": "string",
  20832. "enum": ["sync"]
  20833. },
  20834. "name": {
  20835. "type": "string",
  20836. "enum": ["session.next.tool.success.1"]
  20837. },
  20838. "id": {
  20839. "type": "string"
  20840. },
  20841. "seq": {
  20842. "type": "number"
  20843. },
  20844. "aggregateID": {
  20845. "type": "string",
  20846. "enum": ["sessionID"]
  20847. },
  20848. "data": {
  20849. "type": "object",
  20850. "properties": {
  20851. "timestamp": {
  20852. "type": "number"
  20853. },
  20854. "sessionID": {
  20855. "type": "string",
  20856. "pattern": "^ses"
  20857. },
  20858. "callID": {
  20859. "type": "string"
  20860. },
  20861. "structured": {
  20862. "type": "object"
  20863. },
  20864. "content": {
  20865. "type": "array",
  20866. "items": {
  20867. "anyOf": [
  20868. {
  20869. "$ref": "#/components/schemas/ToolTextContent"
  20870. },
  20871. {
  20872. "$ref": "#/components/schemas/ToolFileContent"
  20873. }
  20874. ]
  20875. }
  20876. },
  20877. "provider": {
  20878. "type": "object",
  20879. "properties": {
  20880. "executed": {
  20881. "type": "boolean"
  20882. },
  20883. "metadata": {
  20884. "type": "object"
  20885. }
  20886. },
  20887. "required": ["executed"],
  20888. "additionalProperties": false
  20889. }
  20890. },
  20891. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20892. "additionalProperties": false
  20893. }
  20894. },
  20895. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20896. "additionalProperties": false
  20897. },
  20898. "SyncEventSessionNextToolFailed": {
  20899. "type": "object",
  20900. "properties": {
  20901. "type": {
  20902. "type": "string",
  20903. "enum": ["sync"]
  20904. },
  20905. "name": {
  20906. "type": "string",
  20907. "enum": ["session.next.tool.failed.1"]
  20908. },
  20909. "id": {
  20910. "type": "string"
  20911. },
  20912. "seq": {
  20913. "type": "number"
  20914. },
  20915. "aggregateID": {
  20916. "type": "string",
  20917. "enum": ["sessionID"]
  20918. },
  20919. "data": {
  20920. "type": "object",
  20921. "properties": {
  20922. "timestamp": {
  20923. "type": "number"
  20924. },
  20925. "sessionID": {
  20926. "type": "string",
  20927. "pattern": "^ses"
  20928. },
  20929. "callID": {
  20930. "type": "string"
  20931. },
  20932. "error": {
  20933. "$ref": "#/components/schemas/SessionErrorUnknown"
  20934. },
  20935. "provider": {
  20936. "type": "object",
  20937. "properties": {
  20938. "executed": {
  20939. "type": "boolean"
  20940. },
  20941. "metadata": {
  20942. "type": "object"
  20943. }
  20944. },
  20945. "required": ["executed"],
  20946. "additionalProperties": false
  20947. }
  20948. },
  20949. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20950. "additionalProperties": false
  20951. }
  20952. },
  20953. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20954. "additionalProperties": false
  20955. },
  20956. "SyncEventSessionNextRetried": {
  20957. "type": "object",
  20958. "properties": {
  20959. "type": {
  20960. "type": "string",
  20961. "enum": ["sync"]
  20962. },
  20963. "name": {
  20964. "type": "string",
  20965. "enum": ["session.next.retried.1"]
  20966. },
  20967. "id": {
  20968. "type": "string"
  20969. },
  20970. "seq": {
  20971. "type": "number"
  20972. },
  20973. "aggregateID": {
  20974. "type": "string",
  20975. "enum": ["sessionID"]
  20976. },
  20977. "data": {
  20978. "type": "object",
  20979. "properties": {
  20980. "timestamp": {
  20981. "type": "number"
  20982. },
  20983. "sessionID": {
  20984. "type": "string",
  20985. "pattern": "^ses"
  20986. },
  20987. "attempt": {
  20988. "type": "number"
  20989. },
  20990. "error": {
  20991. "$ref": "#/components/schemas/SessionNextRetry_error"
  20992. }
  20993. },
  20994. "required": ["timestamp", "sessionID", "attempt", "error"],
  20995. "additionalProperties": false
  20996. }
  20997. },
  20998. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20999. "additionalProperties": false
  21000. },
  21001. "SyncEventSessionNextCompactionStarted": {
  21002. "type": "object",
  21003. "properties": {
  21004. "type": {
  21005. "type": "string",
  21006. "enum": ["sync"]
  21007. },
  21008. "name": {
  21009. "type": "string",
  21010. "enum": ["session.next.compaction.started.1"]
  21011. },
  21012. "id": {
  21013. "type": "string"
  21014. },
  21015. "seq": {
  21016. "type": "number"
  21017. },
  21018. "aggregateID": {
  21019. "type": "string",
  21020. "enum": ["sessionID"]
  21021. },
  21022. "data": {
  21023. "type": "object",
  21024. "properties": {
  21025. "timestamp": {
  21026. "type": "number"
  21027. },
  21028. "sessionID": {
  21029. "type": "string",
  21030. "pattern": "^ses"
  21031. },
  21032. "reason": {
  21033. "type": "string",
  21034. "enum": ["auto", "manual"]
  21035. }
  21036. },
  21037. "required": ["timestamp", "sessionID", "reason"],
  21038. "additionalProperties": false
  21039. }
  21040. },
  21041. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21042. "additionalProperties": false
  21043. },
  21044. "SyncEventSessionNextCompactionDelta": {
  21045. "type": "object",
  21046. "properties": {
  21047. "type": {
  21048. "type": "string",
  21049. "enum": ["sync"]
  21050. },
  21051. "name": {
  21052. "type": "string",
  21053. "enum": ["session.next.compaction.delta.1"]
  21054. },
  21055. "id": {
  21056. "type": "string"
  21057. },
  21058. "seq": {
  21059. "type": "number"
  21060. },
  21061. "aggregateID": {
  21062. "type": "string",
  21063. "enum": ["sessionID"]
  21064. },
  21065. "data": {
  21066. "type": "object",
  21067. "properties": {
  21068. "timestamp": {
  21069. "type": "number"
  21070. },
  21071. "sessionID": {
  21072. "type": "string",
  21073. "pattern": "^ses"
  21074. },
  21075. "text": {
  21076. "type": "string"
  21077. }
  21078. },
  21079. "required": ["timestamp", "sessionID", "text"],
  21080. "additionalProperties": false
  21081. }
  21082. },
  21083. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21084. "additionalProperties": false
  21085. },
  21086. "SyncEventSessionNextCompactionEnded": {
  21087. "type": "object",
  21088. "properties": {
  21089. "type": {
  21090. "type": "string",
  21091. "enum": ["sync"]
  21092. },
  21093. "name": {
  21094. "type": "string",
  21095. "enum": ["session.next.compaction.ended.1"]
  21096. },
  21097. "id": {
  21098. "type": "string"
  21099. },
  21100. "seq": {
  21101. "type": "number"
  21102. },
  21103. "aggregateID": {
  21104. "type": "string",
  21105. "enum": ["sessionID"]
  21106. },
  21107. "data": {
  21108. "type": "object",
  21109. "properties": {
  21110. "timestamp": {
  21111. "type": "number"
  21112. },
  21113. "sessionID": {
  21114. "type": "string",
  21115. "pattern": "^ses"
  21116. },
  21117. "text": {
  21118. "type": "string"
  21119. },
  21120. "include": {
  21121. "type": "string"
  21122. }
  21123. },
  21124. "required": ["timestamp", "sessionID", "text"],
  21125. "additionalProperties": false
  21126. }
  21127. },
  21128. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21129. "additionalProperties": false
  21130. },
  21131. "PolicyEffect": {
  21132. "type": "string",
  21133. "enum": ["allow", "deny"]
  21134. },
  21135. "ConfigV2ExperimentalPolicy": {
  21136. "type": "object",
  21137. "properties": {
  21138. "action": {
  21139. "type": "string",
  21140. "enum": ["provider.use"]
  21141. },
  21142. "effect": {
  21143. "$ref": "#/components/schemas/PolicyEffect"
  21144. },
  21145. "resource": {
  21146. "type": "string"
  21147. }
  21148. },
  21149. "required": ["action", "effect", "resource"],
  21150. "additionalProperties": false
  21151. },
  21152. "LocationRef": {
  21153. "type": "object",
  21154. "properties": {
  21155. "directory": {
  21156. "type": "string"
  21157. },
  21158. "workspaceID": {
  21159. "type": "string"
  21160. }
  21161. },
  21162. "required": ["directory"],
  21163. "additionalProperties": false
  21164. },
  21165. "SessionV2Info": {
  21166. "type": "object",
  21167. "properties": {
  21168. "id": {
  21169. "type": "string",
  21170. "pattern": "^ses"
  21171. },
  21172. "parentID": {
  21173. "type": "string",
  21174. "pattern": "^ses"
  21175. },
  21176. "projectID": {
  21177. "type": "string"
  21178. },
  21179. "agent": {
  21180. "type": "string"
  21181. },
  21182. "model": {
  21183. "type": "object",
  21184. "properties": {
  21185. "id": {
  21186. "type": "string"
  21187. },
  21188. "providerID": {
  21189. "type": "string"
  21190. },
  21191. "variant": {
  21192. "type": "string"
  21193. }
  21194. },
  21195. "required": ["id", "providerID"],
  21196. "additionalProperties": false
  21197. },
  21198. "cost": {
  21199. "type": "number"
  21200. },
  21201. "tokens": {
  21202. "type": "object",
  21203. "properties": {
  21204. "input": {
  21205. "type": "number"
  21206. },
  21207. "output": {
  21208. "type": "number"
  21209. },
  21210. "reasoning": {
  21211. "type": "number"
  21212. },
  21213. "cache": {
  21214. "type": "object",
  21215. "properties": {
  21216. "read": {
  21217. "type": "number"
  21218. },
  21219. "write": {
  21220. "type": "number"
  21221. }
  21222. },
  21223. "required": ["read", "write"],
  21224. "additionalProperties": false
  21225. }
  21226. },
  21227. "required": ["input", "output", "reasoning", "cache"],
  21228. "additionalProperties": false
  21229. },
  21230. "time": {
  21231. "type": "object",
  21232. "properties": {
  21233. "created": {
  21234. "type": "number"
  21235. },
  21236. "updated": {
  21237. "type": "number"
  21238. },
  21239. "archived": {
  21240. "type": "number"
  21241. }
  21242. },
  21243. "required": ["created", "updated"],
  21244. "additionalProperties": false
  21245. },
  21246. "title": {
  21247. "type": "string"
  21248. },
  21249. "location": {
  21250. "$ref": "#/components/schemas/LocationRef"
  21251. },
  21252. "subpath": {
  21253. "type": "string"
  21254. }
  21255. },
  21256. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  21257. "additionalProperties": false
  21258. },
  21259. "SessionDelivery": {
  21260. "type": "string",
  21261. "enum": ["immediate", "deferred"]
  21262. },
  21263. "SessionMessageAgentSwitched": {
  21264. "type": "object",
  21265. "properties": {
  21266. "id": {
  21267. "type": "string"
  21268. },
  21269. "metadata": {
  21270. "type": "object"
  21271. },
  21272. "time": {
  21273. "type": "object",
  21274. "properties": {
  21275. "created": {
  21276. "type": "number"
  21277. }
  21278. },
  21279. "required": ["created"],
  21280. "additionalProperties": false
  21281. },
  21282. "type": {
  21283. "type": "string",
  21284. "enum": ["agent-switched"]
  21285. },
  21286. "agent": {
  21287. "type": "string"
  21288. }
  21289. },
  21290. "required": ["id", "time", "type", "agent"],
  21291. "additionalProperties": false
  21292. },
  21293. "SessionMessageModelSwitched": {
  21294. "type": "object",
  21295. "properties": {
  21296. "id": {
  21297. "type": "string"
  21298. },
  21299. "metadata": {
  21300. "type": "object"
  21301. },
  21302. "time": {
  21303. "type": "object",
  21304. "properties": {
  21305. "created": {
  21306. "type": "number"
  21307. }
  21308. },
  21309. "required": ["created"],
  21310. "additionalProperties": false
  21311. },
  21312. "type": {
  21313. "type": "string",
  21314. "enum": ["model-switched"]
  21315. },
  21316. "model": {
  21317. "type": "object",
  21318. "properties": {
  21319. "id": {
  21320. "type": "string"
  21321. },
  21322. "providerID": {
  21323. "type": "string"
  21324. },
  21325. "variant": {
  21326. "type": "string"
  21327. }
  21328. },
  21329. "required": ["id", "providerID"],
  21330. "additionalProperties": false
  21331. }
  21332. },
  21333. "required": ["id", "time", "type", "model"],
  21334. "additionalProperties": false
  21335. },
  21336. "SessionMessageUser": {
  21337. "type": "object",
  21338. "properties": {
  21339. "id": {
  21340. "type": "string"
  21341. },
  21342. "metadata": {
  21343. "type": "object"
  21344. },
  21345. "time": {
  21346. "type": "object",
  21347. "properties": {
  21348. "created": {
  21349. "type": "number"
  21350. }
  21351. },
  21352. "required": ["created"],
  21353. "additionalProperties": false
  21354. },
  21355. "text": {
  21356. "type": "string"
  21357. },
  21358. "files": {
  21359. "type": "array",
  21360. "items": {
  21361. "$ref": "#/components/schemas/PromptFileAttachment"
  21362. }
  21363. },
  21364. "agents": {
  21365. "type": "array",
  21366. "items": {
  21367. "$ref": "#/components/schemas/PromptAgentAttachment"
  21368. }
  21369. },
  21370. "references": {
  21371. "type": "array",
  21372. "items": {
  21373. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21374. }
  21375. },
  21376. "type": {
  21377. "type": "string",
  21378. "enum": ["user"]
  21379. }
  21380. },
  21381. "required": ["id", "time", "text", "type"],
  21382. "additionalProperties": false
  21383. },
  21384. "SessionMessageSynthetic": {
  21385. "type": "object",
  21386. "properties": {
  21387. "id": {
  21388. "type": "string"
  21389. },
  21390. "metadata": {
  21391. "type": "object"
  21392. },
  21393. "time": {
  21394. "type": "object",
  21395. "properties": {
  21396. "created": {
  21397. "type": "number"
  21398. }
  21399. },
  21400. "required": ["created"],
  21401. "additionalProperties": false
  21402. },
  21403. "sessionID": {
  21404. "type": "string",
  21405. "pattern": "^ses"
  21406. },
  21407. "text": {
  21408. "type": "string"
  21409. },
  21410. "type": {
  21411. "type": "string",
  21412. "enum": ["synthetic"]
  21413. }
  21414. },
  21415. "required": ["id", "time", "sessionID", "text", "type"],
  21416. "additionalProperties": false
  21417. },
  21418. "SessionMessageShell": {
  21419. "type": "object",
  21420. "properties": {
  21421. "id": {
  21422. "type": "string"
  21423. },
  21424. "metadata": {
  21425. "type": "object"
  21426. },
  21427. "time": {
  21428. "type": "object",
  21429. "properties": {
  21430. "created": {
  21431. "type": "number"
  21432. },
  21433. "completed": {
  21434. "type": "number"
  21435. }
  21436. },
  21437. "required": ["created"],
  21438. "additionalProperties": false
  21439. },
  21440. "type": {
  21441. "type": "string",
  21442. "enum": ["shell"]
  21443. },
  21444. "callID": {
  21445. "type": "string"
  21446. },
  21447. "command": {
  21448. "type": "string"
  21449. },
  21450. "output": {
  21451. "type": "string"
  21452. }
  21453. },
  21454. "required": ["id", "time", "type", "callID", "command", "output"],
  21455. "additionalProperties": false
  21456. },
  21457. "SessionMessageAssistantText": {
  21458. "type": "object",
  21459. "properties": {
  21460. "type": {
  21461. "type": "string",
  21462. "enum": ["text"]
  21463. },
  21464. "text": {
  21465. "type": "string"
  21466. }
  21467. },
  21468. "required": ["type", "text"],
  21469. "additionalProperties": false
  21470. },
  21471. "SessionMessageAssistantReasoning": {
  21472. "type": "object",
  21473. "properties": {
  21474. "type": {
  21475. "type": "string",
  21476. "enum": ["reasoning"]
  21477. },
  21478. "id": {
  21479. "type": "string"
  21480. },
  21481. "text": {
  21482. "type": "string"
  21483. }
  21484. },
  21485. "required": ["type", "id", "text"],
  21486. "additionalProperties": false
  21487. },
  21488. "SessionMessageToolStatePending": {
  21489. "type": "object",
  21490. "properties": {
  21491. "status": {
  21492. "type": "string",
  21493. "enum": ["pending"]
  21494. },
  21495. "input": {
  21496. "type": "string"
  21497. }
  21498. },
  21499. "required": ["status", "input"],
  21500. "additionalProperties": false
  21501. },
  21502. "SessionMessageToolStateRunning": {
  21503. "type": "object",
  21504. "properties": {
  21505. "status": {
  21506. "type": "string",
  21507. "enum": ["running"]
  21508. },
  21509. "input": {
  21510. "type": "object"
  21511. },
  21512. "structured": {
  21513. "type": "object"
  21514. },
  21515. "content": {
  21516. "type": "array",
  21517. "items": {
  21518. "anyOf": [
  21519. {
  21520. "$ref": "#/components/schemas/ToolTextContent"
  21521. },
  21522. {
  21523. "$ref": "#/components/schemas/ToolFileContent"
  21524. }
  21525. ]
  21526. }
  21527. }
  21528. },
  21529. "required": ["status", "input", "structured", "content"],
  21530. "additionalProperties": false
  21531. },
  21532. "SessionMessageToolStateCompleted": {
  21533. "type": "object",
  21534. "properties": {
  21535. "status": {
  21536. "type": "string",
  21537. "enum": ["completed"]
  21538. },
  21539. "input": {
  21540. "type": "object"
  21541. },
  21542. "attachments": {
  21543. "type": "array",
  21544. "items": {
  21545. "$ref": "#/components/schemas/PromptFileAttachment"
  21546. }
  21547. },
  21548. "content": {
  21549. "type": "array",
  21550. "items": {
  21551. "anyOf": [
  21552. {
  21553. "$ref": "#/components/schemas/ToolTextContent"
  21554. },
  21555. {
  21556. "$ref": "#/components/schemas/ToolFileContent"
  21557. }
  21558. ]
  21559. }
  21560. },
  21561. "structured": {
  21562. "type": "object"
  21563. }
  21564. },
  21565. "required": ["status", "input", "content", "structured"],
  21566. "additionalProperties": false
  21567. },
  21568. "SessionMessageToolStateError": {
  21569. "type": "object",
  21570. "properties": {
  21571. "status": {
  21572. "type": "string",
  21573. "enum": ["error"]
  21574. },
  21575. "input": {
  21576. "type": "object"
  21577. },
  21578. "content": {
  21579. "type": "array",
  21580. "items": {
  21581. "anyOf": [
  21582. {
  21583. "$ref": "#/components/schemas/ToolTextContent"
  21584. },
  21585. {
  21586. "$ref": "#/components/schemas/ToolFileContent"
  21587. }
  21588. ]
  21589. }
  21590. },
  21591. "structured": {
  21592. "type": "object"
  21593. },
  21594. "error": {
  21595. "$ref": "#/components/schemas/SessionErrorUnknown"
  21596. }
  21597. },
  21598. "required": ["status", "input", "content", "structured", "error"],
  21599. "additionalProperties": false
  21600. },
  21601. "SessionMessageAssistantTool": {
  21602. "type": "object",
  21603. "properties": {
  21604. "type": {
  21605. "type": "string",
  21606. "enum": ["tool"]
  21607. },
  21608. "id": {
  21609. "type": "string"
  21610. },
  21611. "name": {
  21612. "type": "string"
  21613. },
  21614. "provider": {
  21615. "type": "object",
  21616. "properties": {
  21617. "executed": {
  21618. "type": "boolean"
  21619. },
  21620. "metadata": {
  21621. "type": "object"
  21622. }
  21623. },
  21624. "required": ["executed"],
  21625. "additionalProperties": false
  21626. },
  21627. "state": {
  21628. "anyOf": [
  21629. {
  21630. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21631. },
  21632. {
  21633. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21634. },
  21635. {
  21636. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21637. },
  21638. {
  21639. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21640. }
  21641. ]
  21642. },
  21643. "time": {
  21644. "type": "object",
  21645. "properties": {
  21646. "created": {
  21647. "type": "number"
  21648. },
  21649. "ran": {
  21650. "type": "number"
  21651. },
  21652. "completed": {
  21653. "type": "number"
  21654. },
  21655. "pruned": {
  21656. "type": "number"
  21657. }
  21658. },
  21659. "required": ["created"],
  21660. "additionalProperties": false
  21661. }
  21662. },
  21663. "required": ["type", "id", "name", "state", "time"],
  21664. "additionalProperties": false
  21665. },
  21666. "SessionMessageAssistant": {
  21667. "type": "object",
  21668. "properties": {
  21669. "id": {
  21670. "type": "string"
  21671. },
  21672. "metadata": {
  21673. "type": "object"
  21674. },
  21675. "time": {
  21676. "type": "object",
  21677. "properties": {
  21678. "created": {
  21679. "type": "number"
  21680. },
  21681. "completed": {
  21682. "type": "number"
  21683. }
  21684. },
  21685. "required": ["created"],
  21686. "additionalProperties": false
  21687. },
  21688. "type": {
  21689. "type": "string",
  21690. "enum": ["assistant"]
  21691. },
  21692. "agent": {
  21693. "type": "string"
  21694. },
  21695. "model": {
  21696. "type": "object",
  21697. "properties": {
  21698. "id": {
  21699. "type": "string"
  21700. },
  21701. "providerID": {
  21702. "type": "string"
  21703. },
  21704. "variant": {
  21705. "type": "string"
  21706. }
  21707. },
  21708. "required": ["id", "providerID"],
  21709. "additionalProperties": false
  21710. },
  21711. "content": {
  21712. "type": "array",
  21713. "items": {
  21714. "anyOf": [
  21715. {
  21716. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21717. },
  21718. {
  21719. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21720. },
  21721. {
  21722. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21723. }
  21724. ]
  21725. }
  21726. },
  21727. "snapshot": {
  21728. "type": "object",
  21729. "properties": {
  21730. "start": {
  21731. "type": "string"
  21732. },
  21733. "end": {
  21734. "type": "string"
  21735. }
  21736. },
  21737. "additionalProperties": false
  21738. },
  21739. "finish": {
  21740. "type": "string"
  21741. },
  21742. "cost": {
  21743. "type": "number"
  21744. },
  21745. "tokens": {
  21746. "type": "object",
  21747. "properties": {
  21748. "input": {
  21749. "type": "number"
  21750. },
  21751. "output": {
  21752. "type": "number"
  21753. },
  21754. "reasoning": {
  21755. "type": "number"
  21756. },
  21757. "cache": {
  21758. "type": "object",
  21759. "properties": {
  21760. "read": {
  21761. "type": "number"
  21762. },
  21763. "write": {
  21764. "type": "number"
  21765. }
  21766. },
  21767. "required": ["read", "write"],
  21768. "additionalProperties": false
  21769. }
  21770. },
  21771. "required": ["input", "output", "reasoning", "cache"],
  21772. "additionalProperties": false
  21773. },
  21774. "error": {
  21775. "$ref": "#/components/schemas/SessionErrorUnknown"
  21776. }
  21777. },
  21778. "required": ["id", "time", "type", "agent", "model", "content"],
  21779. "additionalProperties": false
  21780. },
  21781. "SessionMessageCompaction": {
  21782. "type": "object",
  21783. "properties": {
  21784. "type": {
  21785. "type": "string",
  21786. "enum": ["compaction"]
  21787. },
  21788. "reason": {
  21789. "type": "string",
  21790. "enum": ["auto", "manual"]
  21791. },
  21792. "summary": {
  21793. "type": "string"
  21794. },
  21795. "include": {
  21796. "type": "string"
  21797. },
  21798. "id": {
  21799. "type": "string"
  21800. },
  21801. "metadata": {
  21802. "type": "object"
  21803. },
  21804. "time": {
  21805. "type": "object",
  21806. "properties": {
  21807. "created": {
  21808. "type": "number"
  21809. }
  21810. },
  21811. "required": ["created"],
  21812. "additionalProperties": false
  21813. }
  21814. },
  21815. "required": ["type", "reason", "summary", "id", "time"],
  21816. "additionalProperties": false
  21817. },
  21818. "SessionMessage": {
  21819. "anyOf": [
  21820. {
  21821. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21822. },
  21823. {
  21824. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21825. },
  21826. {
  21827. "$ref": "#/components/schemas/SessionMessageUser"
  21828. },
  21829. {
  21830. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21831. },
  21832. {
  21833. "$ref": "#/components/schemas/SessionMessageShell"
  21834. },
  21835. {
  21836. "$ref": "#/components/schemas/SessionMessageAssistant"
  21837. },
  21838. {
  21839. "$ref": "#/components/schemas/SessionMessageCompaction"
  21840. }
  21841. ]
  21842. },
  21843. "ProviderV2Info": {
  21844. "type": "object",
  21845. "properties": {
  21846. "id": {
  21847. "type": "string"
  21848. },
  21849. "name": {
  21850. "type": "string"
  21851. },
  21852. "enabled": {
  21853. "anyOf": [
  21854. {
  21855. "type": "boolean",
  21856. "enum": [false]
  21857. },
  21858. {
  21859. "type": "object",
  21860. "properties": {
  21861. "via": {
  21862. "type": "string",
  21863. "enum": ["env"]
  21864. },
  21865. "name": {
  21866. "type": "string"
  21867. }
  21868. },
  21869. "required": ["via", "name"],
  21870. "additionalProperties": false
  21871. },
  21872. {
  21873. "type": "object",
  21874. "properties": {
  21875. "via": {
  21876. "type": "string",
  21877. "enum": ["account"]
  21878. },
  21879. "service": {
  21880. "type": "string"
  21881. }
  21882. },
  21883. "required": ["via", "service"],
  21884. "additionalProperties": false
  21885. },
  21886. {
  21887. "type": "object",
  21888. "properties": {
  21889. "via": {
  21890. "type": "string",
  21891. "enum": ["custom"]
  21892. },
  21893. "data": {
  21894. "type": "object"
  21895. }
  21896. },
  21897. "required": ["via", "data"],
  21898. "additionalProperties": false
  21899. }
  21900. ]
  21901. },
  21902. "env": {
  21903. "type": "array",
  21904. "items": {
  21905. "type": "string"
  21906. }
  21907. },
  21908. "endpoint": {
  21909. "anyOf": [
  21910. {
  21911. "type": "object",
  21912. "properties": {
  21913. "type": {
  21914. "type": "string",
  21915. "enum": ["unknown"]
  21916. }
  21917. },
  21918. "required": ["type"],
  21919. "additionalProperties": false
  21920. },
  21921. {
  21922. "type": "object",
  21923. "properties": {
  21924. "type": {
  21925. "type": "string",
  21926. "enum": ["openai/responses"]
  21927. },
  21928. "url": {
  21929. "type": "string"
  21930. },
  21931. "websocket": {
  21932. "type": "boolean"
  21933. }
  21934. },
  21935. "required": ["type", "url"],
  21936. "additionalProperties": false
  21937. },
  21938. {
  21939. "type": "object",
  21940. "properties": {
  21941. "type": {
  21942. "type": "string",
  21943. "enum": ["openai/completions"]
  21944. },
  21945. "url": {
  21946. "type": "string"
  21947. },
  21948. "reasoning": {
  21949. "anyOf": [
  21950. {
  21951. "type": "object",
  21952. "properties": {
  21953. "type": {
  21954. "type": "string",
  21955. "enum": ["reasoning_content"]
  21956. }
  21957. },
  21958. "required": ["type"],
  21959. "additionalProperties": false
  21960. },
  21961. {
  21962. "type": "object",
  21963. "properties": {
  21964. "type": {
  21965. "type": "string",
  21966. "enum": ["reasoning_details"]
  21967. }
  21968. },
  21969. "required": ["type"],
  21970. "additionalProperties": false
  21971. }
  21972. ]
  21973. }
  21974. },
  21975. "required": ["type", "url"],
  21976. "additionalProperties": false
  21977. },
  21978. {
  21979. "type": "object",
  21980. "properties": {
  21981. "type": {
  21982. "type": "string",
  21983. "enum": ["anthropic/messages"]
  21984. },
  21985. "url": {
  21986. "type": "string"
  21987. }
  21988. },
  21989. "required": ["type", "url"],
  21990. "additionalProperties": false
  21991. },
  21992. {
  21993. "type": "object",
  21994. "properties": {
  21995. "type": {
  21996. "type": "string",
  21997. "enum": ["aisdk"]
  21998. },
  21999. "package": {
  22000. "type": "string"
  22001. },
  22002. "url": {
  22003. "type": "string"
  22004. }
  22005. },
  22006. "required": ["type", "package"],
  22007. "additionalProperties": false
  22008. }
  22009. ]
  22010. },
  22011. "options": {
  22012. "type": "object",
  22013. "properties": {
  22014. "headers": {
  22015. "type": "object",
  22016. "additionalProperties": {
  22017. "type": "string"
  22018. }
  22019. },
  22020. "body": {
  22021. "type": "object"
  22022. },
  22023. "aisdk": {
  22024. "type": "object",
  22025. "properties": {
  22026. "provider": {
  22027. "type": "object"
  22028. },
  22029. "request": {
  22030. "type": "object"
  22031. }
  22032. },
  22033. "required": ["provider", "request"],
  22034. "additionalProperties": false
  22035. }
  22036. },
  22037. "required": ["headers", "body", "aisdk"],
  22038. "additionalProperties": false
  22039. }
  22040. },
  22041. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  22042. "additionalProperties": false
  22043. },
  22044. "PermissionV2Request": {
  22045. "type": "object",
  22046. "properties": {
  22047. "id": {
  22048. "type": "string",
  22049. "pattern": "^per"
  22050. },
  22051. "sessionID": {
  22052. "type": "string",
  22053. "pattern": "^ses"
  22054. },
  22055. "action": {
  22056. "type": "string"
  22057. },
  22058. "resources": {
  22059. "type": "array",
  22060. "items": {
  22061. "type": "string"
  22062. }
  22063. },
  22064. "save": {
  22065. "type": "array",
  22066. "items": {
  22067. "type": "string"
  22068. }
  22069. },
  22070. "metadata": {
  22071. "type": "object"
  22072. },
  22073. "source": {
  22074. "$ref": "#/components/schemas/PermissionV2Source"
  22075. }
  22076. },
  22077. "required": ["id", "sessionID", "action", "resources"],
  22078. "additionalProperties": false
  22079. },
  22080. "PermissionSavedInfo": {
  22081. "type": "object",
  22082. "properties": {
  22083. "id": {
  22084. "type": "string"
  22085. },
  22086. "projectID": {
  22087. "type": "string"
  22088. },
  22089. "action": {
  22090. "type": "string"
  22091. },
  22092. "resource": {
  22093. "type": "string"
  22094. }
  22095. },
  22096. "required": ["id", "projectID", "action", "resource"],
  22097. "additionalProperties": false
  22098. },
  22099. "LocationFileSystemTextContent": {
  22100. "type": "object",
  22101. "properties": {
  22102. "type": {
  22103. "type": "string",
  22104. "enum": ["text"]
  22105. },
  22106. "content": {
  22107. "type": "string"
  22108. },
  22109. "mime": {
  22110. "type": "string"
  22111. }
  22112. },
  22113. "required": ["type", "content", "mime"],
  22114. "additionalProperties": false
  22115. },
  22116. "LocationFileSystemBinaryContent": {
  22117. "type": "object",
  22118. "properties": {
  22119. "type": {
  22120. "type": "string",
  22121. "enum": ["binary"]
  22122. },
  22123. "content": {
  22124. "type": "string"
  22125. },
  22126. "encoding": {
  22127. "type": "string",
  22128. "enum": ["base64"]
  22129. },
  22130. "mime": {
  22131. "type": "string"
  22132. }
  22133. },
  22134. "required": ["type", "content", "encoding", "mime"],
  22135. "additionalProperties": false
  22136. },
  22137. "LocationFileSystemEntry": {
  22138. "type": "object",
  22139. "properties": {
  22140. "path": {
  22141. "type": "string"
  22142. },
  22143. "uri": {
  22144. "type": "string"
  22145. },
  22146. "type": {
  22147. "type": "string",
  22148. "enum": ["file", "directory"]
  22149. },
  22150. "mime": {
  22151. "type": "string"
  22152. }
  22153. },
  22154. "required": ["path", "uri", "type", "mime"],
  22155. "additionalProperties": false
  22156. },
  22157. "EventModels-devRefreshed": {
  22158. "type": "object",
  22159. "properties": {
  22160. "id": {
  22161. "type": "string"
  22162. },
  22163. "type": {
  22164. "type": "string",
  22165. "enum": ["models-dev.refreshed"]
  22166. },
  22167. "properties": {
  22168. "type": "object",
  22169. "properties": {}
  22170. }
  22171. },
  22172. "required": ["id", "type", "properties"],
  22173. "additionalProperties": false
  22174. },
  22175. "EventPluginAdded": {
  22176. "type": "object",
  22177. "properties": {
  22178. "id": {
  22179. "type": "string"
  22180. },
  22181. "type": {
  22182. "type": "string",
  22183. "enum": ["plugin.added"]
  22184. },
  22185. "properties": {
  22186. "type": "object",
  22187. "properties": {
  22188. "id": {
  22189. "type": "string"
  22190. }
  22191. },
  22192. "required": ["id"],
  22193. "additionalProperties": false
  22194. }
  22195. },
  22196. "required": ["id", "type", "properties"],
  22197. "additionalProperties": false
  22198. },
  22199. "ModelV2Info1": {
  22200. "type": "object",
  22201. "properties": {
  22202. "id": {
  22203. "type": "string"
  22204. },
  22205. "apiID": {
  22206. "type": "string"
  22207. },
  22208. "providerID": {
  22209. "type": "string"
  22210. },
  22211. "family": {
  22212. "type": "string"
  22213. },
  22214. "name": {
  22215. "type": "string"
  22216. },
  22217. "endpoint": {
  22218. "anyOf": [
  22219. {
  22220. "type": "object",
  22221. "properties": {
  22222. "type": {
  22223. "type": "string",
  22224. "enum": ["unknown"]
  22225. }
  22226. },
  22227. "required": ["type"],
  22228. "additionalProperties": false
  22229. },
  22230. {
  22231. "type": "object",
  22232. "properties": {
  22233. "type": {
  22234. "type": "string",
  22235. "enum": ["openai/responses"]
  22236. },
  22237. "url": {
  22238. "type": "string"
  22239. },
  22240. "websocket": {
  22241. "type": "boolean"
  22242. }
  22243. },
  22244. "required": ["type", "url"],
  22245. "additionalProperties": false
  22246. },
  22247. {
  22248. "type": "object",
  22249. "properties": {
  22250. "type": {
  22251. "type": "string",
  22252. "enum": ["openai/completions"]
  22253. },
  22254. "url": {
  22255. "type": "string"
  22256. },
  22257. "reasoning": {
  22258. "anyOf": [
  22259. {
  22260. "type": "object",
  22261. "properties": {
  22262. "type": {
  22263. "type": "string",
  22264. "enum": ["reasoning_content"]
  22265. }
  22266. },
  22267. "required": ["type"],
  22268. "additionalProperties": false
  22269. },
  22270. {
  22271. "type": "object",
  22272. "properties": {
  22273. "type": {
  22274. "type": "string",
  22275. "enum": ["reasoning_details"]
  22276. }
  22277. },
  22278. "required": ["type"],
  22279. "additionalProperties": false
  22280. }
  22281. ]
  22282. }
  22283. },
  22284. "required": ["type", "url"],
  22285. "additionalProperties": false
  22286. },
  22287. {
  22288. "type": "object",
  22289. "properties": {
  22290. "type": {
  22291. "type": "string",
  22292. "enum": ["anthropic/messages"]
  22293. },
  22294. "url": {
  22295. "type": "string"
  22296. }
  22297. },
  22298. "required": ["type", "url"],
  22299. "additionalProperties": false
  22300. },
  22301. {
  22302. "type": "object",
  22303. "properties": {
  22304. "type": {
  22305. "type": "string",
  22306. "enum": ["aisdk"]
  22307. },
  22308. "package": {
  22309. "type": "string"
  22310. },
  22311. "url": {
  22312. "type": "string"
  22313. }
  22314. },
  22315. "required": ["type", "package"],
  22316. "additionalProperties": false
  22317. }
  22318. ]
  22319. },
  22320. "capabilities": {
  22321. "type": "object",
  22322. "properties": {
  22323. "tools": {
  22324. "type": "boolean"
  22325. },
  22326. "input": {
  22327. "type": "array",
  22328. "items": {
  22329. "type": "string"
  22330. }
  22331. },
  22332. "output": {
  22333. "type": "array",
  22334. "items": {
  22335. "type": "string"
  22336. }
  22337. }
  22338. },
  22339. "required": ["tools", "input", "output"],
  22340. "additionalProperties": false
  22341. },
  22342. "options": {
  22343. "type": "object",
  22344. "properties": {
  22345. "headers": {
  22346. "type": "object",
  22347. "additionalProperties": {
  22348. "type": "string"
  22349. }
  22350. },
  22351. "body": {
  22352. "type": "object"
  22353. },
  22354. "aisdk": {
  22355. "type": "object",
  22356. "properties": {
  22357. "provider": {
  22358. "type": "object"
  22359. },
  22360. "request": {
  22361. "type": "object"
  22362. }
  22363. },
  22364. "required": ["provider", "request"],
  22365. "additionalProperties": false
  22366. },
  22367. "variant": {
  22368. "type": "string"
  22369. }
  22370. },
  22371. "required": ["headers", "body", "aisdk"],
  22372. "additionalProperties": false
  22373. },
  22374. "variants": {
  22375. "type": "array",
  22376. "items": {
  22377. "type": "object",
  22378. "properties": {
  22379. "id": {
  22380. "type": "string"
  22381. },
  22382. "headers": {
  22383. "type": "object",
  22384. "additionalProperties": {
  22385. "type": "string"
  22386. }
  22387. },
  22388. "body": {
  22389. "type": "object"
  22390. },
  22391. "aisdk": {
  22392. "type": "object",
  22393. "properties": {
  22394. "provider": {
  22395. "type": "object"
  22396. },
  22397. "request": {
  22398. "type": "object"
  22399. }
  22400. },
  22401. "required": ["provider", "request"],
  22402. "additionalProperties": false
  22403. }
  22404. },
  22405. "required": ["id", "headers", "body", "aisdk"],
  22406. "additionalProperties": false
  22407. }
  22408. },
  22409. "time": {
  22410. "type": "object",
  22411. "properties": {
  22412. "released": {
  22413. "anyOf": [
  22414. {
  22415. "type": "number"
  22416. },
  22417. {
  22418. "type": "string",
  22419. "enum": ["NaN"]
  22420. },
  22421. {
  22422. "type": "string",
  22423. "enum": ["Infinity"]
  22424. },
  22425. {
  22426. "type": "string",
  22427. "enum": ["-Infinity"]
  22428. }
  22429. ]
  22430. }
  22431. },
  22432. "required": ["released"],
  22433. "additionalProperties": false
  22434. },
  22435. "cost": {
  22436. "type": "array",
  22437. "items": {
  22438. "type": "object",
  22439. "properties": {
  22440. "tier": {
  22441. "type": "object",
  22442. "properties": {
  22443. "type": {
  22444. "type": "string",
  22445. "enum": ["context"]
  22446. },
  22447. "size": {
  22448. "type": "integer"
  22449. }
  22450. },
  22451. "required": ["type", "size"],
  22452. "additionalProperties": false
  22453. },
  22454. "input": {
  22455. "type": "number"
  22456. },
  22457. "output": {
  22458. "type": "number"
  22459. },
  22460. "cache": {
  22461. "type": "object",
  22462. "properties": {
  22463. "read": {
  22464. "type": "number"
  22465. },
  22466. "write": {
  22467. "type": "number"
  22468. }
  22469. },
  22470. "required": ["read", "write"],
  22471. "additionalProperties": false
  22472. }
  22473. },
  22474. "required": ["input", "output", "cache"],
  22475. "additionalProperties": false
  22476. }
  22477. },
  22478. "status": {
  22479. "type": "string",
  22480. "enum": ["alpha", "beta", "deprecated", "active"]
  22481. },
  22482. "enabled": {
  22483. "type": "boolean"
  22484. },
  22485. "limit": {
  22486. "type": "object",
  22487. "properties": {
  22488. "context": {
  22489. "type": "integer"
  22490. },
  22491. "input": {
  22492. "type": "integer"
  22493. },
  22494. "output": {
  22495. "type": "integer"
  22496. }
  22497. },
  22498. "required": ["context", "output"],
  22499. "additionalProperties": false
  22500. }
  22501. },
  22502. "required": [
  22503. "id",
  22504. "apiID",
  22505. "providerID",
  22506. "name",
  22507. "endpoint",
  22508. "capabilities",
  22509. "options",
  22510. "variants",
  22511. "time",
  22512. "cost",
  22513. "status",
  22514. "enabled",
  22515. "limit"
  22516. ],
  22517. "additionalProperties": false
  22518. },
  22519. "EventCatalogModelUpdated": {
  22520. "type": "object",
  22521. "properties": {
  22522. "id": {
  22523. "type": "string"
  22524. },
  22525. "type": {
  22526. "type": "string",
  22527. "enum": ["catalog.model.updated"]
  22528. },
  22529. "properties": {
  22530. "type": "object",
  22531. "properties": {
  22532. "model": {
  22533. "$ref": "#/components/schemas/ModelV2Info1"
  22534. }
  22535. },
  22536. "required": ["model"],
  22537. "additionalProperties": false
  22538. }
  22539. },
  22540. "required": ["id", "type", "properties"],
  22541. "additionalProperties": false
  22542. },
  22543. "EventSessionCreated": {
  22544. "type": "object",
  22545. "properties": {
  22546. "id": {
  22547. "type": "string"
  22548. },
  22549. "type": {
  22550. "type": "string",
  22551. "enum": ["session.created"]
  22552. },
  22553. "properties": {
  22554. "type": "object",
  22555. "properties": {
  22556. "sessionID": {
  22557. "type": "string",
  22558. "pattern": "^ses"
  22559. },
  22560. "info": {
  22561. "$ref": "#/components/schemas/Session"
  22562. }
  22563. },
  22564. "required": ["sessionID", "info"],
  22565. "additionalProperties": false
  22566. }
  22567. },
  22568. "required": ["id", "type", "properties"],
  22569. "additionalProperties": false
  22570. },
  22571. "EventSessionUpdated": {
  22572. "type": "object",
  22573. "properties": {
  22574. "id": {
  22575. "type": "string"
  22576. },
  22577. "type": {
  22578. "type": "string",
  22579. "enum": ["session.updated"]
  22580. },
  22581. "properties": {
  22582. "type": "object",
  22583. "properties": {
  22584. "sessionID": {
  22585. "type": "string",
  22586. "pattern": "^ses"
  22587. },
  22588. "info": {
  22589. "$ref": "#/components/schemas/Session"
  22590. }
  22591. },
  22592. "required": ["sessionID", "info"],
  22593. "additionalProperties": false
  22594. }
  22595. },
  22596. "required": ["id", "type", "properties"],
  22597. "additionalProperties": false
  22598. },
  22599. "EventSessionDeleted": {
  22600. "type": "object",
  22601. "properties": {
  22602. "id": {
  22603. "type": "string"
  22604. },
  22605. "type": {
  22606. "type": "string",
  22607. "enum": ["session.deleted"]
  22608. },
  22609. "properties": {
  22610. "type": "object",
  22611. "properties": {
  22612. "sessionID": {
  22613. "type": "string",
  22614. "pattern": "^ses"
  22615. },
  22616. "info": {
  22617. "$ref": "#/components/schemas/Session"
  22618. }
  22619. },
  22620. "required": ["sessionID", "info"],
  22621. "additionalProperties": false
  22622. }
  22623. },
  22624. "required": ["id", "type", "properties"],
  22625. "additionalProperties": false
  22626. },
  22627. "EventMessageUpdated": {
  22628. "type": "object",
  22629. "properties": {
  22630. "id": {
  22631. "type": "string"
  22632. },
  22633. "type": {
  22634. "type": "string",
  22635. "enum": ["message.updated"]
  22636. },
  22637. "properties": {
  22638. "type": "object",
  22639. "properties": {
  22640. "sessionID": {
  22641. "type": "string",
  22642. "pattern": "^ses"
  22643. },
  22644. "info": {
  22645. "$ref": "#/components/schemas/Message"
  22646. }
  22647. },
  22648. "required": ["sessionID", "info"],
  22649. "additionalProperties": false
  22650. }
  22651. },
  22652. "required": ["id", "type", "properties"],
  22653. "additionalProperties": false
  22654. },
  22655. "EventMessageRemoved": {
  22656. "type": "object",
  22657. "properties": {
  22658. "id": {
  22659. "type": "string"
  22660. },
  22661. "type": {
  22662. "type": "string",
  22663. "enum": ["message.removed"]
  22664. },
  22665. "properties": {
  22666. "type": "object",
  22667. "properties": {
  22668. "sessionID": {
  22669. "type": "string",
  22670. "pattern": "^ses"
  22671. },
  22672. "messageID": {
  22673. "type": "string",
  22674. "pattern": "^msg"
  22675. }
  22676. },
  22677. "required": ["sessionID", "messageID"],
  22678. "additionalProperties": false
  22679. }
  22680. },
  22681. "required": ["id", "type", "properties"],
  22682. "additionalProperties": false
  22683. },
  22684. "EventMessagePartUpdated": {
  22685. "type": "object",
  22686. "properties": {
  22687. "id": {
  22688. "type": "string"
  22689. },
  22690. "type": {
  22691. "type": "string",
  22692. "enum": ["message.part.updated"]
  22693. },
  22694. "properties": {
  22695. "type": "object",
  22696. "properties": {
  22697. "sessionID": {
  22698. "type": "string",
  22699. "pattern": "^ses"
  22700. },
  22701. "part": {
  22702. "$ref": "#/components/schemas/Part"
  22703. },
  22704. "time": {
  22705. "type": "number"
  22706. }
  22707. },
  22708. "required": ["sessionID", "part", "time"],
  22709. "additionalProperties": false
  22710. }
  22711. },
  22712. "required": ["id", "type", "properties"],
  22713. "additionalProperties": false
  22714. },
  22715. "EventMessagePartRemoved": {
  22716. "type": "object",
  22717. "properties": {
  22718. "id": {
  22719. "type": "string"
  22720. },
  22721. "type": {
  22722. "type": "string",
  22723. "enum": ["message.part.removed"]
  22724. },
  22725. "properties": {
  22726. "type": "object",
  22727. "properties": {
  22728. "sessionID": {
  22729. "type": "string",
  22730. "pattern": "^ses"
  22731. },
  22732. "messageID": {
  22733. "type": "string",
  22734. "pattern": "^msg"
  22735. },
  22736. "partID": {
  22737. "type": "string",
  22738. "pattern": "^prt"
  22739. }
  22740. },
  22741. "required": ["sessionID", "messageID", "partID"],
  22742. "additionalProperties": false
  22743. }
  22744. },
  22745. "required": ["id", "type", "properties"],
  22746. "additionalProperties": false
  22747. },
  22748. "EventSessionNextAgentSwitched": {
  22749. "type": "object",
  22750. "properties": {
  22751. "id": {
  22752. "type": "string"
  22753. },
  22754. "type": {
  22755. "type": "string",
  22756. "enum": ["session.next.agent.switched"]
  22757. },
  22758. "properties": {
  22759. "type": "object",
  22760. "properties": {
  22761. "timestamp": {
  22762. "type": "number"
  22763. },
  22764. "sessionID": {
  22765. "type": "string",
  22766. "pattern": "^ses"
  22767. },
  22768. "agent": {
  22769. "type": "string"
  22770. }
  22771. },
  22772. "required": ["timestamp", "sessionID", "agent"],
  22773. "additionalProperties": false
  22774. }
  22775. },
  22776. "required": ["id", "type", "properties"],
  22777. "additionalProperties": false
  22778. },
  22779. "EventSessionNextModelSwitched": {
  22780. "type": "object",
  22781. "properties": {
  22782. "id": {
  22783. "type": "string"
  22784. },
  22785. "type": {
  22786. "type": "string",
  22787. "enum": ["session.next.model.switched"]
  22788. },
  22789. "properties": {
  22790. "type": "object",
  22791. "properties": {
  22792. "timestamp": {
  22793. "type": "number"
  22794. },
  22795. "sessionID": {
  22796. "type": "string",
  22797. "pattern": "^ses"
  22798. },
  22799. "model": {
  22800. "type": "object",
  22801. "properties": {
  22802. "id": {
  22803. "type": "string"
  22804. },
  22805. "providerID": {
  22806. "type": "string"
  22807. },
  22808. "variant": {
  22809. "type": "string"
  22810. }
  22811. },
  22812. "required": ["id", "providerID"],
  22813. "additionalProperties": false
  22814. }
  22815. },
  22816. "required": ["timestamp", "sessionID", "model"],
  22817. "additionalProperties": false
  22818. }
  22819. },
  22820. "required": ["id", "type", "properties"],
  22821. "additionalProperties": false
  22822. },
  22823. "EventSessionNextPrompted": {
  22824. "type": "object",
  22825. "properties": {
  22826. "id": {
  22827. "type": "string"
  22828. },
  22829. "type": {
  22830. "type": "string",
  22831. "enum": ["session.next.prompted"]
  22832. },
  22833. "properties": {
  22834. "type": "object",
  22835. "properties": {
  22836. "timestamp": {
  22837. "type": "number"
  22838. },
  22839. "sessionID": {
  22840. "type": "string",
  22841. "pattern": "^ses"
  22842. },
  22843. "prompt": {
  22844. "$ref": "#/components/schemas/Prompt"
  22845. }
  22846. },
  22847. "required": ["timestamp", "sessionID", "prompt"],
  22848. "additionalProperties": false
  22849. }
  22850. },
  22851. "required": ["id", "type", "properties"],
  22852. "additionalProperties": false
  22853. },
  22854. "EventSessionNextSynthetic": {
  22855. "type": "object",
  22856. "properties": {
  22857. "id": {
  22858. "type": "string"
  22859. },
  22860. "type": {
  22861. "type": "string",
  22862. "enum": ["session.next.synthetic"]
  22863. },
  22864. "properties": {
  22865. "type": "object",
  22866. "properties": {
  22867. "timestamp": {
  22868. "type": "number"
  22869. },
  22870. "sessionID": {
  22871. "type": "string",
  22872. "pattern": "^ses"
  22873. },
  22874. "text": {
  22875. "type": "string"
  22876. }
  22877. },
  22878. "required": ["timestamp", "sessionID", "text"],
  22879. "additionalProperties": false
  22880. }
  22881. },
  22882. "required": ["id", "type", "properties"],
  22883. "additionalProperties": false
  22884. },
  22885. "EventSessionNextShellStarted": {
  22886. "type": "object",
  22887. "properties": {
  22888. "id": {
  22889. "type": "string"
  22890. },
  22891. "type": {
  22892. "type": "string",
  22893. "enum": ["session.next.shell.started"]
  22894. },
  22895. "properties": {
  22896. "type": "object",
  22897. "properties": {
  22898. "timestamp": {
  22899. "type": "number"
  22900. },
  22901. "sessionID": {
  22902. "type": "string",
  22903. "pattern": "^ses"
  22904. },
  22905. "callID": {
  22906. "type": "string"
  22907. },
  22908. "command": {
  22909. "type": "string"
  22910. }
  22911. },
  22912. "required": ["timestamp", "sessionID", "callID", "command"],
  22913. "additionalProperties": false
  22914. }
  22915. },
  22916. "required": ["id", "type", "properties"],
  22917. "additionalProperties": false
  22918. },
  22919. "EventSessionNextShellEnded": {
  22920. "type": "object",
  22921. "properties": {
  22922. "id": {
  22923. "type": "string"
  22924. },
  22925. "type": {
  22926. "type": "string",
  22927. "enum": ["session.next.shell.ended"]
  22928. },
  22929. "properties": {
  22930. "type": "object",
  22931. "properties": {
  22932. "timestamp": {
  22933. "type": "number"
  22934. },
  22935. "sessionID": {
  22936. "type": "string",
  22937. "pattern": "^ses"
  22938. },
  22939. "callID": {
  22940. "type": "string"
  22941. },
  22942. "output": {
  22943. "type": "string"
  22944. }
  22945. },
  22946. "required": ["timestamp", "sessionID", "callID", "output"],
  22947. "additionalProperties": false
  22948. }
  22949. },
  22950. "required": ["id", "type", "properties"],
  22951. "additionalProperties": false
  22952. },
  22953. "EventSessionNextStepStarted": {
  22954. "type": "object",
  22955. "properties": {
  22956. "id": {
  22957. "type": "string"
  22958. },
  22959. "type": {
  22960. "type": "string",
  22961. "enum": ["session.next.step.started"]
  22962. },
  22963. "properties": {
  22964. "type": "object",
  22965. "properties": {
  22966. "timestamp": {
  22967. "type": "number"
  22968. },
  22969. "sessionID": {
  22970. "type": "string",
  22971. "pattern": "^ses"
  22972. },
  22973. "agent": {
  22974. "type": "string"
  22975. },
  22976. "model": {
  22977. "type": "object",
  22978. "properties": {
  22979. "id": {
  22980. "type": "string"
  22981. },
  22982. "providerID": {
  22983. "type": "string"
  22984. },
  22985. "variant": {
  22986. "type": "string"
  22987. }
  22988. },
  22989. "required": ["id", "providerID"],
  22990. "additionalProperties": false
  22991. },
  22992. "snapshot": {
  22993. "type": "string"
  22994. }
  22995. },
  22996. "required": ["timestamp", "sessionID", "agent", "model"],
  22997. "additionalProperties": false
  22998. }
  22999. },
  23000. "required": ["id", "type", "properties"],
  23001. "additionalProperties": false
  23002. },
  23003. "EventSessionNextStepEnded": {
  23004. "type": "object",
  23005. "properties": {
  23006. "id": {
  23007. "type": "string"
  23008. },
  23009. "type": {
  23010. "type": "string",
  23011. "enum": ["session.next.step.ended"]
  23012. },
  23013. "properties": {
  23014. "type": "object",
  23015. "properties": {
  23016. "timestamp": {
  23017. "type": "number"
  23018. },
  23019. "sessionID": {
  23020. "type": "string",
  23021. "pattern": "^ses"
  23022. },
  23023. "finish": {
  23024. "type": "string"
  23025. },
  23026. "cost": {
  23027. "type": "number"
  23028. },
  23029. "tokens": {
  23030. "type": "object",
  23031. "properties": {
  23032. "input": {
  23033. "type": "number"
  23034. },
  23035. "output": {
  23036. "type": "number"
  23037. },
  23038. "reasoning": {
  23039. "type": "number"
  23040. },
  23041. "cache": {
  23042. "type": "object",
  23043. "properties": {
  23044. "read": {
  23045. "type": "number"
  23046. },
  23047. "write": {
  23048. "type": "number"
  23049. }
  23050. },
  23051. "required": ["read", "write"],
  23052. "additionalProperties": false
  23053. }
  23054. },
  23055. "required": ["input", "output", "reasoning", "cache"],
  23056. "additionalProperties": false
  23057. },
  23058. "snapshot": {
  23059. "type": "string"
  23060. }
  23061. },
  23062. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  23063. "additionalProperties": false
  23064. }
  23065. },
  23066. "required": ["id", "type", "properties"],
  23067. "additionalProperties": false
  23068. },
  23069. "EventSessionNextStepFailed": {
  23070. "type": "object",
  23071. "properties": {
  23072. "id": {
  23073. "type": "string"
  23074. },
  23075. "type": {
  23076. "type": "string",
  23077. "enum": ["session.next.step.failed"]
  23078. },
  23079. "properties": {
  23080. "type": "object",
  23081. "properties": {
  23082. "timestamp": {
  23083. "type": "number"
  23084. },
  23085. "sessionID": {
  23086. "type": "string",
  23087. "pattern": "^ses"
  23088. },
  23089. "error": {
  23090. "$ref": "#/components/schemas/SessionErrorUnknown"
  23091. }
  23092. },
  23093. "required": ["timestamp", "sessionID", "error"],
  23094. "additionalProperties": false
  23095. }
  23096. },
  23097. "required": ["id", "type", "properties"],
  23098. "additionalProperties": false
  23099. },
  23100. "EventSessionNextTextStarted": {
  23101. "type": "object",
  23102. "properties": {
  23103. "id": {
  23104. "type": "string"
  23105. },
  23106. "type": {
  23107. "type": "string",
  23108. "enum": ["session.next.text.started"]
  23109. },
  23110. "properties": {
  23111. "type": "object",
  23112. "properties": {
  23113. "timestamp": {
  23114. "type": "number"
  23115. },
  23116. "sessionID": {
  23117. "type": "string",
  23118. "pattern": "^ses"
  23119. }
  23120. },
  23121. "required": ["timestamp", "sessionID"],
  23122. "additionalProperties": false
  23123. }
  23124. },
  23125. "required": ["id", "type", "properties"],
  23126. "additionalProperties": false
  23127. },
  23128. "EventSessionNextTextDelta": {
  23129. "type": "object",
  23130. "properties": {
  23131. "id": {
  23132. "type": "string"
  23133. },
  23134. "type": {
  23135. "type": "string",
  23136. "enum": ["session.next.text.delta"]
  23137. },
  23138. "properties": {
  23139. "type": "object",
  23140. "properties": {
  23141. "timestamp": {
  23142. "type": "number"
  23143. },
  23144. "sessionID": {
  23145. "type": "string",
  23146. "pattern": "^ses"
  23147. },
  23148. "delta": {
  23149. "type": "string"
  23150. }
  23151. },
  23152. "required": ["timestamp", "sessionID", "delta"],
  23153. "additionalProperties": false
  23154. }
  23155. },
  23156. "required": ["id", "type", "properties"],
  23157. "additionalProperties": false
  23158. },
  23159. "EventSessionNextTextEnded": {
  23160. "type": "object",
  23161. "properties": {
  23162. "id": {
  23163. "type": "string"
  23164. },
  23165. "type": {
  23166. "type": "string",
  23167. "enum": ["session.next.text.ended"]
  23168. },
  23169. "properties": {
  23170. "type": "object",
  23171. "properties": {
  23172. "timestamp": {
  23173. "type": "number"
  23174. },
  23175. "sessionID": {
  23176. "type": "string",
  23177. "pattern": "^ses"
  23178. },
  23179. "text": {
  23180. "type": "string"
  23181. }
  23182. },
  23183. "required": ["timestamp", "sessionID", "text"],
  23184. "additionalProperties": false
  23185. }
  23186. },
  23187. "required": ["id", "type", "properties"],
  23188. "additionalProperties": false
  23189. },
  23190. "EventSessionNextReasoningStarted": {
  23191. "type": "object",
  23192. "properties": {
  23193. "id": {
  23194. "type": "string"
  23195. },
  23196. "type": {
  23197. "type": "string",
  23198. "enum": ["session.next.reasoning.started"]
  23199. },
  23200. "properties": {
  23201. "type": "object",
  23202. "properties": {
  23203. "timestamp": {
  23204. "type": "number"
  23205. },
  23206. "sessionID": {
  23207. "type": "string",
  23208. "pattern": "^ses"
  23209. },
  23210. "reasoningID": {
  23211. "type": "string"
  23212. }
  23213. },
  23214. "required": ["timestamp", "sessionID", "reasoningID"],
  23215. "additionalProperties": false
  23216. }
  23217. },
  23218. "required": ["id", "type", "properties"],
  23219. "additionalProperties": false
  23220. },
  23221. "EventSessionNextReasoningDelta": {
  23222. "type": "object",
  23223. "properties": {
  23224. "id": {
  23225. "type": "string"
  23226. },
  23227. "type": {
  23228. "type": "string",
  23229. "enum": ["session.next.reasoning.delta"]
  23230. },
  23231. "properties": {
  23232. "type": "object",
  23233. "properties": {
  23234. "timestamp": {
  23235. "type": "number"
  23236. },
  23237. "sessionID": {
  23238. "type": "string",
  23239. "pattern": "^ses"
  23240. },
  23241. "reasoningID": {
  23242. "type": "string"
  23243. },
  23244. "delta": {
  23245. "type": "string"
  23246. }
  23247. },
  23248. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  23249. "additionalProperties": false
  23250. }
  23251. },
  23252. "required": ["id", "type", "properties"],
  23253. "additionalProperties": false
  23254. },
  23255. "EventSessionNextReasoningEnded": {
  23256. "type": "object",
  23257. "properties": {
  23258. "id": {
  23259. "type": "string"
  23260. },
  23261. "type": {
  23262. "type": "string",
  23263. "enum": ["session.next.reasoning.ended"]
  23264. },
  23265. "properties": {
  23266. "type": "object",
  23267. "properties": {
  23268. "timestamp": {
  23269. "type": "number"
  23270. },
  23271. "sessionID": {
  23272. "type": "string",
  23273. "pattern": "^ses"
  23274. },
  23275. "reasoningID": {
  23276. "type": "string"
  23277. },
  23278. "text": {
  23279. "type": "string"
  23280. }
  23281. },
  23282. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  23283. "additionalProperties": false
  23284. }
  23285. },
  23286. "required": ["id", "type", "properties"],
  23287. "additionalProperties": false
  23288. },
  23289. "EventSessionNextToolInputStarted": {
  23290. "type": "object",
  23291. "properties": {
  23292. "id": {
  23293. "type": "string"
  23294. },
  23295. "type": {
  23296. "type": "string",
  23297. "enum": ["session.next.tool.input.started"]
  23298. },
  23299. "properties": {
  23300. "type": "object",
  23301. "properties": {
  23302. "timestamp": {
  23303. "type": "number"
  23304. },
  23305. "sessionID": {
  23306. "type": "string",
  23307. "pattern": "^ses"
  23308. },
  23309. "callID": {
  23310. "type": "string"
  23311. },
  23312. "name": {
  23313. "type": "string"
  23314. }
  23315. },
  23316. "required": ["timestamp", "sessionID", "callID", "name"],
  23317. "additionalProperties": false
  23318. }
  23319. },
  23320. "required": ["id", "type", "properties"],
  23321. "additionalProperties": false
  23322. },
  23323. "EventSessionNextToolInputDelta": {
  23324. "type": "object",
  23325. "properties": {
  23326. "id": {
  23327. "type": "string"
  23328. },
  23329. "type": {
  23330. "type": "string",
  23331. "enum": ["session.next.tool.input.delta"]
  23332. },
  23333. "properties": {
  23334. "type": "object",
  23335. "properties": {
  23336. "timestamp": {
  23337. "type": "number"
  23338. },
  23339. "sessionID": {
  23340. "type": "string",
  23341. "pattern": "^ses"
  23342. },
  23343. "callID": {
  23344. "type": "string"
  23345. },
  23346. "delta": {
  23347. "type": "string"
  23348. }
  23349. },
  23350. "required": ["timestamp", "sessionID", "callID", "delta"],
  23351. "additionalProperties": false
  23352. }
  23353. },
  23354. "required": ["id", "type", "properties"],
  23355. "additionalProperties": false
  23356. },
  23357. "EventSessionNextToolInputEnded": {
  23358. "type": "object",
  23359. "properties": {
  23360. "id": {
  23361. "type": "string"
  23362. },
  23363. "type": {
  23364. "type": "string",
  23365. "enum": ["session.next.tool.input.ended"]
  23366. },
  23367. "properties": {
  23368. "type": "object",
  23369. "properties": {
  23370. "timestamp": {
  23371. "type": "number"
  23372. },
  23373. "sessionID": {
  23374. "type": "string",
  23375. "pattern": "^ses"
  23376. },
  23377. "callID": {
  23378. "type": "string"
  23379. },
  23380. "text": {
  23381. "type": "string"
  23382. }
  23383. },
  23384. "required": ["timestamp", "sessionID", "callID", "text"],
  23385. "additionalProperties": false
  23386. }
  23387. },
  23388. "required": ["id", "type", "properties"],
  23389. "additionalProperties": false
  23390. },
  23391. "EventSessionNextToolCalled": {
  23392. "type": "object",
  23393. "properties": {
  23394. "id": {
  23395. "type": "string"
  23396. },
  23397. "type": {
  23398. "type": "string",
  23399. "enum": ["session.next.tool.called"]
  23400. },
  23401. "properties": {
  23402. "type": "object",
  23403. "properties": {
  23404. "timestamp": {
  23405. "type": "number"
  23406. },
  23407. "sessionID": {
  23408. "type": "string",
  23409. "pattern": "^ses"
  23410. },
  23411. "callID": {
  23412. "type": "string"
  23413. },
  23414. "tool": {
  23415. "type": "string"
  23416. },
  23417. "input": {
  23418. "type": "object"
  23419. },
  23420. "provider": {
  23421. "type": "object",
  23422. "properties": {
  23423. "executed": {
  23424. "type": "boolean"
  23425. },
  23426. "metadata": {
  23427. "type": "object"
  23428. }
  23429. },
  23430. "required": ["executed"],
  23431. "additionalProperties": false
  23432. }
  23433. },
  23434. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  23435. "additionalProperties": false
  23436. }
  23437. },
  23438. "required": ["id", "type", "properties"],
  23439. "additionalProperties": false
  23440. },
  23441. "EventSessionNextToolProgress": {
  23442. "type": "object",
  23443. "properties": {
  23444. "id": {
  23445. "type": "string"
  23446. },
  23447. "type": {
  23448. "type": "string",
  23449. "enum": ["session.next.tool.progress"]
  23450. },
  23451. "properties": {
  23452. "type": "object",
  23453. "properties": {
  23454. "timestamp": {
  23455. "type": "number"
  23456. },
  23457. "sessionID": {
  23458. "type": "string",
  23459. "pattern": "^ses"
  23460. },
  23461. "callID": {
  23462. "type": "string"
  23463. },
  23464. "structured": {
  23465. "type": "object"
  23466. },
  23467. "content": {
  23468. "type": "array",
  23469. "items": {
  23470. "anyOf": [
  23471. {
  23472. "$ref": "#/components/schemas/ToolTextContent"
  23473. },
  23474. {
  23475. "$ref": "#/components/schemas/ToolFileContent"
  23476. }
  23477. ]
  23478. }
  23479. }
  23480. },
  23481. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  23482. "additionalProperties": false
  23483. }
  23484. },
  23485. "required": ["id", "type", "properties"],
  23486. "additionalProperties": false
  23487. },
  23488. "EventSessionNextToolSuccess": {
  23489. "type": "object",
  23490. "properties": {
  23491. "id": {
  23492. "type": "string"
  23493. },
  23494. "type": {
  23495. "type": "string",
  23496. "enum": ["session.next.tool.success"]
  23497. },
  23498. "properties": {
  23499. "type": "object",
  23500. "properties": {
  23501. "timestamp": {
  23502. "type": "number"
  23503. },
  23504. "sessionID": {
  23505. "type": "string",
  23506. "pattern": "^ses"
  23507. },
  23508. "callID": {
  23509. "type": "string"
  23510. },
  23511. "structured": {
  23512. "type": "object"
  23513. },
  23514. "content": {
  23515. "type": "array",
  23516. "items": {
  23517. "anyOf": [
  23518. {
  23519. "$ref": "#/components/schemas/ToolTextContent"
  23520. },
  23521. {
  23522. "$ref": "#/components/schemas/ToolFileContent"
  23523. }
  23524. ]
  23525. }
  23526. },
  23527. "provider": {
  23528. "type": "object",
  23529. "properties": {
  23530. "executed": {
  23531. "type": "boolean"
  23532. },
  23533. "metadata": {
  23534. "type": "object"
  23535. }
  23536. },
  23537. "required": ["executed"],
  23538. "additionalProperties": false
  23539. }
  23540. },
  23541. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  23542. "additionalProperties": false
  23543. }
  23544. },
  23545. "required": ["id", "type", "properties"],
  23546. "additionalProperties": false
  23547. },
  23548. "EventSessionNextToolFailed": {
  23549. "type": "object",
  23550. "properties": {
  23551. "id": {
  23552. "type": "string"
  23553. },
  23554. "type": {
  23555. "type": "string",
  23556. "enum": ["session.next.tool.failed"]
  23557. },
  23558. "properties": {
  23559. "type": "object",
  23560. "properties": {
  23561. "timestamp": {
  23562. "type": "number"
  23563. },
  23564. "sessionID": {
  23565. "type": "string",
  23566. "pattern": "^ses"
  23567. },
  23568. "callID": {
  23569. "type": "string"
  23570. },
  23571. "error": {
  23572. "$ref": "#/components/schemas/SessionErrorUnknown"
  23573. },
  23574. "provider": {
  23575. "type": "object",
  23576. "properties": {
  23577. "executed": {
  23578. "type": "boolean"
  23579. },
  23580. "metadata": {
  23581. "type": "object"
  23582. }
  23583. },
  23584. "required": ["executed"],
  23585. "additionalProperties": false
  23586. }
  23587. },
  23588. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  23589. "additionalProperties": false
  23590. }
  23591. },
  23592. "required": ["id", "type", "properties"],
  23593. "additionalProperties": false
  23594. },
  23595. "EventSessionNextRetried": {
  23596. "type": "object",
  23597. "properties": {
  23598. "id": {
  23599. "type": "string"
  23600. },
  23601. "type": {
  23602. "type": "string",
  23603. "enum": ["session.next.retried"]
  23604. },
  23605. "properties": {
  23606. "type": "object",
  23607. "properties": {
  23608. "timestamp": {
  23609. "type": "number"
  23610. },
  23611. "sessionID": {
  23612. "type": "string",
  23613. "pattern": "^ses"
  23614. },
  23615. "attempt": {
  23616. "type": "number"
  23617. },
  23618. "error": {
  23619. "$ref": "#/components/schemas/SessionNextRetry_error"
  23620. }
  23621. },
  23622. "required": ["timestamp", "sessionID", "attempt", "error"],
  23623. "additionalProperties": false
  23624. }
  23625. },
  23626. "required": ["id", "type", "properties"],
  23627. "additionalProperties": false
  23628. },
  23629. "EventSessionNextCompactionStarted": {
  23630. "type": "object",
  23631. "properties": {
  23632. "id": {
  23633. "type": "string"
  23634. },
  23635. "type": {
  23636. "type": "string",
  23637. "enum": ["session.next.compaction.started"]
  23638. },
  23639. "properties": {
  23640. "type": "object",
  23641. "properties": {
  23642. "timestamp": {
  23643. "type": "number"
  23644. },
  23645. "sessionID": {
  23646. "type": "string",
  23647. "pattern": "^ses"
  23648. },
  23649. "reason": {
  23650. "type": "string",
  23651. "enum": ["auto", "manual"]
  23652. }
  23653. },
  23654. "required": ["timestamp", "sessionID", "reason"],
  23655. "additionalProperties": false
  23656. }
  23657. },
  23658. "required": ["id", "type", "properties"],
  23659. "additionalProperties": false
  23660. },
  23661. "EventSessionNextCompactionDelta": {
  23662. "type": "object",
  23663. "properties": {
  23664. "id": {
  23665. "type": "string"
  23666. },
  23667. "type": {
  23668. "type": "string",
  23669. "enum": ["session.next.compaction.delta"]
  23670. },
  23671. "properties": {
  23672. "type": "object",
  23673. "properties": {
  23674. "timestamp": {
  23675. "type": "number"
  23676. },
  23677. "sessionID": {
  23678. "type": "string",
  23679. "pattern": "^ses"
  23680. },
  23681. "text": {
  23682. "type": "string"
  23683. }
  23684. },
  23685. "required": ["timestamp", "sessionID", "text"],
  23686. "additionalProperties": false
  23687. }
  23688. },
  23689. "required": ["id", "type", "properties"],
  23690. "additionalProperties": false
  23691. },
  23692. "EventSessionNextCompactionEnded": {
  23693. "type": "object",
  23694. "properties": {
  23695. "id": {
  23696. "type": "string"
  23697. },
  23698. "type": {
  23699. "type": "string",
  23700. "enum": ["session.next.compaction.ended"]
  23701. },
  23702. "properties": {
  23703. "type": "object",
  23704. "properties": {
  23705. "timestamp": {
  23706. "type": "number"
  23707. },
  23708. "sessionID": {
  23709. "type": "string",
  23710. "pattern": "^ses"
  23711. },
  23712. "text": {
  23713. "type": "string"
  23714. },
  23715. "include": {
  23716. "type": "string"
  23717. }
  23718. },
  23719. "required": ["timestamp", "sessionID", "text"],
  23720. "additionalProperties": false
  23721. }
  23722. },
  23723. "required": ["id", "type", "properties"],
  23724. "additionalProperties": false
  23725. },
  23726. "EventMessagePartDelta": {
  23727. "type": "object",
  23728. "properties": {
  23729. "id": {
  23730. "type": "string"
  23731. },
  23732. "type": {
  23733. "type": "string",
  23734. "enum": ["message.part.delta"]
  23735. },
  23736. "properties": {
  23737. "type": "object",
  23738. "properties": {
  23739. "sessionID": {
  23740. "type": "string",
  23741. "pattern": "^ses"
  23742. },
  23743. "messageID": {
  23744. "type": "string",
  23745. "pattern": "^msg"
  23746. },
  23747. "partID": {
  23748. "type": "string",
  23749. "pattern": "^prt"
  23750. },
  23751. "field": {
  23752. "type": "string"
  23753. },
  23754. "delta": {
  23755. "type": "string"
  23756. }
  23757. },
  23758. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  23759. "additionalProperties": false
  23760. }
  23761. },
  23762. "required": ["id", "type", "properties"],
  23763. "additionalProperties": false
  23764. },
  23765. "EventSessionDiff": {
  23766. "type": "object",
  23767. "properties": {
  23768. "id": {
  23769. "type": "string"
  23770. },
  23771. "type": {
  23772. "type": "string",
  23773. "enum": ["session.diff"]
  23774. },
  23775. "properties": {
  23776. "type": "object",
  23777. "properties": {
  23778. "sessionID": {
  23779. "type": "string",
  23780. "pattern": "^ses"
  23781. },
  23782. "diff": {
  23783. "type": "array",
  23784. "items": {
  23785. "$ref": "#/components/schemas/SnapshotFileDiff"
  23786. }
  23787. }
  23788. },
  23789. "required": ["sessionID", "diff"],
  23790. "additionalProperties": false
  23791. }
  23792. },
  23793. "required": ["id", "type", "properties"],
  23794. "additionalProperties": false
  23795. },
  23796. "EventSessionError": {
  23797. "type": "object",
  23798. "properties": {
  23799. "id": {
  23800. "type": "string"
  23801. },
  23802. "type": {
  23803. "type": "string",
  23804. "enum": ["session.error"]
  23805. },
  23806. "properties": {
  23807. "type": "object",
  23808. "properties": {
  23809. "sessionID": {
  23810. "type": "string",
  23811. "pattern": "^ses"
  23812. },
  23813. "error": {
  23814. "anyOf": [
  23815. {
  23816. "$ref": "#/components/schemas/ProviderAuthError"
  23817. },
  23818. {
  23819. "$ref": "#/components/schemas/UnknownError"
  23820. },
  23821. {
  23822. "$ref": "#/components/schemas/MessageOutputLengthError"
  23823. },
  23824. {
  23825. "$ref": "#/components/schemas/MessageAbortedError"
  23826. },
  23827. {
  23828. "$ref": "#/components/schemas/StructuredOutputError"
  23829. },
  23830. {
  23831. "$ref": "#/components/schemas/ContextOverflowError"
  23832. },
  23833. {
  23834. "$ref": "#/components/schemas/APIError"
  23835. }
  23836. ]
  23837. }
  23838. },
  23839. "additionalProperties": false
  23840. }
  23841. },
  23842. "required": ["id", "type", "properties"],
  23843. "additionalProperties": false
  23844. },
  23845. "EventInstallationUpdated": {
  23846. "type": "object",
  23847. "properties": {
  23848. "id": {
  23849. "type": "string"
  23850. },
  23851. "type": {
  23852. "type": "string",
  23853. "enum": ["installation.updated"]
  23854. },
  23855. "properties": {
  23856. "type": "object",
  23857. "properties": {
  23858. "version": {
  23859. "type": "string"
  23860. }
  23861. },
  23862. "required": ["version"],
  23863. "additionalProperties": false
  23864. }
  23865. },
  23866. "required": ["id", "type", "properties"],
  23867. "additionalProperties": false
  23868. },
  23869. "EventInstallationUpdate-available": {
  23870. "type": "object",
  23871. "properties": {
  23872. "id": {
  23873. "type": "string"
  23874. },
  23875. "type": {
  23876. "type": "string",
  23877. "enum": ["installation.update-available"]
  23878. },
  23879. "properties": {
  23880. "type": "object",
  23881. "properties": {
  23882. "version": {
  23883. "type": "string"
  23884. }
  23885. },
  23886. "required": ["version"],
  23887. "additionalProperties": false
  23888. }
  23889. },
  23890. "required": ["id", "type", "properties"],
  23891. "additionalProperties": false
  23892. },
  23893. "EventPermissionV2Asked": {
  23894. "type": "object",
  23895. "properties": {
  23896. "id": {
  23897. "type": "string"
  23898. },
  23899. "type": {
  23900. "type": "string",
  23901. "enum": ["permission.v2.asked"]
  23902. },
  23903. "properties": {
  23904. "type": "object",
  23905. "properties": {
  23906. "id": {
  23907. "type": "string",
  23908. "pattern": "^per"
  23909. },
  23910. "sessionID": {
  23911. "type": "string",
  23912. "pattern": "^ses"
  23913. },
  23914. "action": {
  23915. "type": "string"
  23916. },
  23917. "resources": {
  23918. "type": "array",
  23919. "items": {
  23920. "type": "string"
  23921. }
  23922. },
  23923. "save": {
  23924. "type": "array",
  23925. "items": {
  23926. "type": "string"
  23927. }
  23928. },
  23929. "metadata": {
  23930. "type": "object"
  23931. },
  23932. "source": {
  23933. "$ref": "#/components/schemas/PermissionV2Source"
  23934. }
  23935. },
  23936. "required": ["id", "sessionID", "action", "resources"],
  23937. "additionalProperties": false
  23938. }
  23939. },
  23940. "required": ["id", "type", "properties"],
  23941. "additionalProperties": false
  23942. },
  23943. "EventPermissionV2Replied": {
  23944. "type": "object",
  23945. "properties": {
  23946. "id": {
  23947. "type": "string"
  23948. },
  23949. "type": {
  23950. "type": "string",
  23951. "enum": ["permission.v2.replied"]
  23952. },
  23953. "properties": {
  23954. "type": "object",
  23955. "properties": {
  23956. "sessionID": {
  23957. "type": "string",
  23958. "pattern": "^ses"
  23959. },
  23960. "requestID": {
  23961. "type": "string",
  23962. "pattern": "^per"
  23963. },
  23964. "reply": {
  23965. "$ref": "#/components/schemas/PermissionV2Reply"
  23966. }
  23967. },
  23968. "required": ["sessionID", "requestID", "reply"],
  23969. "additionalProperties": false
  23970. }
  23971. },
  23972. "required": ["id", "type", "properties"],
  23973. "additionalProperties": false
  23974. },
  23975. "EventFileEdited": {
  23976. "type": "object",
  23977. "properties": {
  23978. "id": {
  23979. "type": "string"
  23980. },
  23981. "type": {
  23982. "type": "string",
  23983. "enum": ["file.edited"]
  23984. },
  23985. "properties": {
  23986. "type": "object",
  23987. "properties": {
  23988. "file": {
  23989. "type": "string"
  23990. }
  23991. },
  23992. "required": ["file"],
  23993. "additionalProperties": false
  23994. }
  23995. },
  23996. "required": ["id", "type", "properties"],
  23997. "additionalProperties": false
  23998. },
  23999. "EventAccountAdded": {
  24000. "type": "object",
  24001. "properties": {
  24002. "id": {
  24003. "type": "string"
  24004. },
  24005. "type": {
  24006. "type": "string",
  24007. "enum": ["account.added"]
  24008. },
  24009. "properties": {
  24010. "type": "object",
  24011. "properties": {
  24012. "account": {
  24013. "$ref": "#/components/schemas/AuthInfo"
  24014. }
  24015. },
  24016. "required": ["account"],
  24017. "additionalProperties": false
  24018. }
  24019. },
  24020. "required": ["id", "type", "properties"],
  24021. "additionalProperties": false
  24022. },
  24023. "EventAccountRemoved": {
  24024. "type": "object",
  24025. "properties": {
  24026. "id": {
  24027. "type": "string"
  24028. },
  24029. "type": {
  24030. "type": "string",
  24031. "enum": ["account.removed"]
  24032. },
  24033. "properties": {
  24034. "type": "object",
  24035. "properties": {
  24036. "account": {
  24037. "$ref": "#/components/schemas/AuthInfo"
  24038. }
  24039. },
  24040. "required": ["account"],
  24041. "additionalProperties": false
  24042. }
  24043. },
  24044. "required": ["id", "type", "properties"],
  24045. "additionalProperties": false
  24046. },
  24047. "EventAccountSwitched": {
  24048. "type": "object",
  24049. "properties": {
  24050. "id": {
  24051. "type": "string"
  24052. },
  24053. "type": {
  24054. "type": "string",
  24055. "enum": ["account.switched"]
  24056. },
  24057. "properties": {
  24058. "type": "object",
  24059. "properties": {
  24060. "serviceID": {
  24061. "type": "string"
  24062. },
  24063. "from": {
  24064. "type": "string"
  24065. },
  24066. "to": {
  24067. "type": "string"
  24068. }
  24069. },
  24070. "required": ["serviceID"],
  24071. "additionalProperties": false
  24072. }
  24073. },
  24074. "required": ["id", "type", "properties"],
  24075. "additionalProperties": false
  24076. },
  24077. "EventFileWatcherUpdated": {
  24078. "type": "object",
  24079. "properties": {
  24080. "id": {
  24081. "type": "string"
  24082. },
  24083. "type": {
  24084. "type": "string",
  24085. "enum": ["file.watcher.updated"]
  24086. },
  24087. "properties": {
  24088. "type": "object",
  24089. "properties": {
  24090. "file": {
  24091. "type": "string"
  24092. },
  24093. "event": {
  24094. "type": "string",
  24095. "enum": ["add", "change", "unlink"]
  24096. }
  24097. },
  24098. "required": ["file", "event"],
  24099. "additionalProperties": false
  24100. }
  24101. },
  24102. "required": ["id", "type", "properties"],
  24103. "additionalProperties": false
  24104. },
  24105. "EventLspUpdated": {
  24106. "type": "object",
  24107. "properties": {
  24108. "id": {
  24109. "type": "string"
  24110. },
  24111. "type": {
  24112. "type": "string",
  24113. "enum": ["lsp.updated"]
  24114. },
  24115. "properties": {
  24116. "type": "object",
  24117. "properties": {}
  24118. }
  24119. },
  24120. "required": ["id", "type", "properties"],
  24121. "additionalProperties": false
  24122. },
  24123. "EventPermissionAsked": {
  24124. "type": "object",
  24125. "properties": {
  24126. "id": {
  24127. "type": "string"
  24128. },
  24129. "type": {
  24130. "type": "string",
  24131. "enum": ["permission.asked"]
  24132. },
  24133. "properties": {
  24134. "type": "object",
  24135. "properties": {
  24136. "id": {
  24137. "type": "string",
  24138. "pattern": "^per"
  24139. },
  24140. "sessionID": {
  24141. "type": "string",
  24142. "pattern": "^ses"
  24143. },
  24144. "permission": {
  24145. "type": "string"
  24146. },
  24147. "patterns": {
  24148. "type": "array",
  24149. "items": {
  24150. "type": "string"
  24151. }
  24152. },
  24153. "metadata": {
  24154. "type": "object"
  24155. },
  24156. "always": {
  24157. "type": "array",
  24158. "items": {
  24159. "type": "string"
  24160. }
  24161. },
  24162. "tool": {
  24163. "type": "object",
  24164. "properties": {
  24165. "messageID": {
  24166. "type": "string"
  24167. },
  24168. "callID": {
  24169. "type": "string"
  24170. }
  24171. },
  24172. "required": ["messageID", "callID"],
  24173. "additionalProperties": false
  24174. }
  24175. },
  24176. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  24177. "additionalProperties": false
  24178. }
  24179. },
  24180. "required": ["id", "type", "properties"],
  24181. "additionalProperties": false
  24182. },
  24183. "EventPermissionReplied": {
  24184. "type": "object",
  24185. "properties": {
  24186. "id": {
  24187. "type": "string"
  24188. },
  24189. "type": {
  24190. "type": "string",
  24191. "enum": ["permission.replied"]
  24192. },
  24193. "properties": {
  24194. "type": "object",
  24195. "properties": {
  24196. "sessionID": {
  24197. "type": "string",
  24198. "pattern": "^ses"
  24199. },
  24200. "requestID": {
  24201. "type": "string",
  24202. "pattern": "^per"
  24203. },
  24204. "reply": {
  24205. "type": "string",
  24206. "enum": ["once", "always", "reject"]
  24207. }
  24208. },
  24209. "required": ["sessionID", "requestID", "reply"],
  24210. "additionalProperties": false
  24211. }
  24212. },
  24213. "required": ["id", "type", "properties"],
  24214. "additionalProperties": false
  24215. },
  24216. "EventMcpToolsChanged": {
  24217. "type": "object",
  24218. "properties": {
  24219. "id": {
  24220. "type": "string"
  24221. },
  24222. "type": {
  24223. "type": "string",
  24224. "enum": ["mcp.tools.changed"]
  24225. },
  24226. "properties": {
  24227. "type": "object",
  24228. "properties": {
  24229. "server": {
  24230. "type": "string"
  24231. }
  24232. },
  24233. "required": ["server"],
  24234. "additionalProperties": false
  24235. }
  24236. },
  24237. "required": ["id", "type", "properties"],
  24238. "additionalProperties": false
  24239. },
  24240. "EventMcpBrowserOpenFailed": {
  24241. "type": "object",
  24242. "properties": {
  24243. "id": {
  24244. "type": "string"
  24245. },
  24246. "type": {
  24247. "type": "string",
  24248. "enum": ["mcp.browser.open.failed"]
  24249. },
  24250. "properties": {
  24251. "type": "object",
  24252. "properties": {
  24253. "mcpName": {
  24254. "type": "string"
  24255. },
  24256. "url": {
  24257. "type": "string"
  24258. }
  24259. },
  24260. "required": ["mcpName", "url"],
  24261. "additionalProperties": false
  24262. }
  24263. },
  24264. "required": ["id", "type", "properties"],
  24265. "additionalProperties": false
  24266. },
  24267. "EventCommandExecuted": {
  24268. "type": "object",
  24269. "properties": {
  24270. "id": {
  24271. "type": "string"
  24272. },
  24273. "type": {
  24274. "type": "string",
  24275. "enum": ["command.executed"]
  24276. },
  24277. "properties": {
  24278. "type": "object",
  24279. "properties": {
  24280. "name": {
  24281. "type": "string"
  24282. },
  24283. "sessionID": {
  24284. "type": "string",
  24285. "pattern": "^ses"
  24286. },
  24287. "arguments": {
  24288. "type": "string"
  24289. },
  24290. "messageID": {
  24291. "type": "string",
  24292. "pattern": "^msg"
  24293. }
  24294. },
  24295. "required": ["name", "sessionID", "arguments", "messageID"],
  24296. "additionalProperties": false
  24297. }
  24298. },
  24299. "required": ["id", "type", "properties"],
  24300. "additionalProperties": false
  24301. },
  24302. "EventProjectUpdated": {
  24303. "type": "object",
  24304. "properties": {
  24305. "id": {
  24306. "type": "string"
  24307. },
  24308. "type": {
  24309. "type": "string",
  24310. "enum": ["project.updated"]
  24311. },
  24312. "properties": {
  24313. "type": "object",
  24314. "properties": {
  24315. "id": {
  24316. "type": "string"
  24317. },
  24318. "worktree": {
  24319. "type": "string"
  24320. },
  24321. "vcs": {
  24322. "type": "string",
  24323. "enum": ["git"]
  24324. },
  24325. "name": {
  24326. "type": "string"
  24327. },
  24328. "icon": {
  24329. "type": "object",
  24330. "properties": {
  24331. "url": {
  24332. "type": "string"
  24333. },
  24334. "override": {
  24335. "type": "string"
  24336. },
  24337. "color": {
  24338. "type": "string"
  24339. }
  24340. },
  24341. "additionalProperties": false
  24342. },
  24343. "commands": {
  24344. "type": "object",
  24345. "properties": {
  24346. "start": {
  24347. "type": "string",
  24348. "description": "Startup script to run when creating a new workspace (worktree)"
  24349. }
  24350. },
  24351. "additionalProperties": false
  24352. },
  24353. "time": {
  24354. "type": "object",
  24355. "properties": {
  24356. "created": {
  24357. "type": "integer",
  24358. "minimum": 0
  24359. },
  24360. "updated": {
  24361. "type": "integer",
  24362. "minimum": 0
  24363. },
  24364. "initialized": {
  24365. "type": "integer",
  24366. "minimum": 0
  24367. }
  24368. },
  24369. "required": ["created", "updated"],
  24370. "additionalProperties": false
  24371. },
  24372. "sandboxes": {
  24373. "type": "array",
  24374. "items": {
  24375. "type": "string"
  24376. }
  24377. }
  24378. },
  24379. "required": ["id", "worktree", "time", "sandboxes"],
  24380. "additionalProperties": false
  24381. }
  24382. },
  24383. "required": ["id", "type", "properties"],
  24384. "additionalProperties": false
  24385. },
  24386. "EventPtyCreated": {
  24387. "type": "object",
  24388. "properties": {
  24389. "id": {
  24390. "type": "string"
  24391. },
  24392. "type": {
  24393. "type": "string",
  24394. "enum": ["pty.created"]
  24395. },
  24396. "properties": {
  24397. "type": "object",
  24398. "properties": {
  24399. "info": {
  24400. "$ref": "#/components/schemas/Pty"
  24401. }
  24402. },
  24403. "required": ["info"],
  24404. "additionalProperties": false
  24405. }
  24406. },
  24407. "required": ["id", "type", "properties"],
  24408. "additionalProperties": false
  24409. },
  24410. "EventPtyUpdated": {
  24411. "type": "object",
  24412. "properties": {
  24413. "id": {
  24414. "type": "string"
  24415. },
  24416. "type": {
  24417. "type": "string",
  24418. "enum": ["pty.updated"]
  24419. },
  24420. "properties": {
  24421. "type": "object",
  24422. "properties": {
  24423. "info": {
  24424. "$ref": "#/components/schemas/Pty"
  24425. }
  24426. },
  24427. "required": ["info"],
  24428. "additionalProperties": false
  24429. }
  24430. },
  24431. "required": ["id", "type", "properties"],
  24432. "additionalProperties": false
  24433. },
  24434. "EventPtyExited": {
  24435. "type": "object",
  24436. "properties": {
  24437. "id": {
  24438. "type": "string"
  24439. },
  24440. "type": {
  24441. "type": "string",
  24442. "enum": ["pty.exited"]
  24443. },
  24444. "properties": {
  24445. "type": "object",
  24446. "properties": {
  24447. "id": {
  24448. "type": "string",
  24449. "pattern": "^pty"
  24450. },
  24451. "exitCode": {
  24452. "type": "integer",
  24453. "minimum": 0
  24454. }
  24455. },
  24456. "required": ["id", "exitCode"],
  24457. "additionalProperties": false
  24458. }
  24459. },
  24460. "required": ["id", "type", "properties"],
  24461. "additionalProperties": false
  24462. },
  24463. "EventPtyDeleted": {
  24464. "type": "object",
  24465. "properties": {
  24466. "id": {
  24467. "type": "string"
  24468. },
  24469. "type": {
  24470. "type": "string",
  24471. "enum": ["pty.deleted"]
  24472. },
  24473. "properties": {
  24474. "type": "object",
  24475. "properties": {
  24476. "id": {
  24477. "type": "string",
  24478. "pattern": "^pty"
  24479. }
  24480. },
  24481. "required": ["id"],
  24482. "additionalProperties": false
  24483. }
  24484. },
  24485. "required": ["id", "type", "properties"],
  24486. "additionalProperties": false
  24487. },
  24488. "EventQuestionAsked": {
  24489. "type": "object",
  24490. "properties": {
  24491. "id": {
  24492. "type": "string"
  24493. },
  24494. "type": {
  24495. "type": "string",
  24496. "enum": ["question.asked"]
  24497. },
  24498. "properties": {
  24499. "type": "object",
  24500. "properties": {
  24501. "id": {
  24502. "type": "string",
  24503. "pattern": "^que"
  24504. },
  24505. "sessionID": {
  24506. "type": "string",
  24507. "pattern": "^ses"
  24508. },
  24509. "questions": {
  24510. "type": "array",
  24511. "items": {
  24512. "$ref": "#/components/schemas/QuestionInfo"
  24513. },
  24514. "description": "Questions to ask"
  24515. },
  24516. "tool": {
  24517. "$ref": "#/components/schemas/QuestionTool"
  24518. }
  24519. },
  24520. "required": ["id", "sessionID", "questions"],
  24521. "additionalProperties": false
  24522. }
  24523. },
  24524. "required": ["id", "type", "properties"],
  24525. "additionalProperties": false
  24526. },
  24527. "EventQuestionReplied": {
  24528. "type": "object",
  24529. "properties": {
  24530. "id": {
  24531. "type": "string"
  24532. },
  24533. "type": {
  24534. "type": "string",
  24535. "enum": ["question.replied"]
  24536. },
  24537. "properties": {
  24538. "type": "object",
  24539. "properties": {
  24540. "sessionID": {
  24541. "type": "string",
  24542. "pattern": "^ses"
  24543. },
  24544. "requestID": {
  24545. "type": "string",
  24546. "pattern": "^que"
  24547. },
  24548. "answers": {
  24549. "type": "array",
  24550. "items": {
  24551. "$ref": "#/components/schemas/QuestionAnswer"
  24552. }
  24553. }
  24554. },
  24555. "required": ["sessionID", "requestID", "answers"],
  24556. "additionalProperties": false
  24557. }
  24558. },
  24559. "required": ["id", "type", "properties"],
  24560. "additionalProperties": false
  24561. },
  24562. "EventQuestionRejected": {
  24563. "type": "object",
  24564. "properties": {
  24565. "id": {
  24566. "type": "string"
  24567. },
  24568. "type": {
  24569. "type": "string",
  24570. "enum": ["question.rejected"]
  24571. },
  24572. "properties": {
  24573. "type": "object",
  24574. "properties": {
  24575. "sessionID": {
  24576. "type": "string",
  24577. "pattern": "^ses"
  24578. },
  24579. "requestID": {
  24580. "type": "string",
  24581. "pattern": "^que"
  24582. }
  24583. },
  24584. "required": ["sessionID", "requestID"],
  24585. "additionalProperties": false
  24586. }
  24587. },
  24588. "required": ["id", "type", "properties"],
  24589. "additionalProperties": false
  24590. },
  24591. "EventSessionStatus": {
  24592. "type": "object",
  24593. "properties": {
  24594. "id": {
  24595. "type": "string"
  24596. },
  24597. "type": {
  24598. "type": "string",
  24599. "enum": ["session.status"]
  24600. },
  24601. "properties": {
  24602. "type": "object",
  24603. "properties": {
  24604. "sessionID": {
  24605. "type": "string",
  24606. "pattern": "^ses"
  24607. },
  24608. "status": {
  24609. "$ref": "#/components/schemas/SessionStatus"
  24610. }
  24611. },
  24612. "required": ["sessionID", "status"],
  24613. "additionalProperties": false
  24614. }
  24615. },
  24616. "required": ["id", "type", "properties"],
  24617. "additionalProperties": false
  24618. },
  24619. "EventSessionIdle": {
  24620. "type": "object",
  24621. "properties": {
  24622. "id": {
  24623. "type": "string"
  24624. },
  24625. "type": {
  24626. "type": "string",
  24627. "enum": ["session.idle"]
  24628. },
  24629. "properties": {
  24630. "type": "object",
  24631. "properties": {
  24632. "sessionID": {
  24633. "type": "string",
  24634. "pattern": "^ses"
  24635. }
  24636. },
  24637. "required": ["sessionID"],
  24638. "additionalProperties": false
  24639. }
  24640. },
  24641. "required": ["id", "type", "properties"],
  24642. "additionalProperties": false
  24643. },
  24644. "EventSessionCompacted": {
  24645. "type": "object",
  24646. "properties": {
  24647. "id": {
  24648. "type": "string"
  24649. },
  24650. "type": {
  24651. "type": "string",
  24652. "enum": ["session.compacted"]
  24653. },
  24654. "properties": {
  24655. "type": "object",
  24656. "properties": {
  24657. "sessionID": {
  24658. "type": "string",
  24659. "pattern": "^ses"
  24660. }
  24661. },
  24662. "required": ["sessionID"],
  24663. "additionalProperties": false
  24664. }
  24665. },
  24666. "required": ["id", "type", "properties"],
  24667. "additionalProperties": false
  24668. },
  24669. "EventTodoUpdated": {
  24670. "type": "object",
  24671. "properties": {
  24672. "id": {
  24673. "type": "string"
  24674. },
  24675. "type": {
  24676. "type": "string",
  24677. "enum": ["todo.updated"]
  24678. },
  24679. "properties": {
  24680. "type": "object",
  24681. "properties": {
  24682. "sessionID": {
  24683. "type": "string",
  24684. "pattern": "^ses"
  24685. },
  24686. "todos": {
  24687. "type": "array",
  24688. "items": {
  24689. "$ref": "#/components/schemas/Todo"
  24690. }
  24691. }
  24692. },
  24693. "required": ["sessionID", "todos"],
  24694. "additionalProperties": false
  24695. }
  24696. },
  24697. "required": ["id", "type", "properties"],
  24698. "additionalProperties": false
  24699. },
  24700. "EventVcsBranchUpdated": {
  24701. "type": "object",
  24702. "properties": {
  24703. "id": {
  24704. "type": "string"
  24705. },
  24706. "type": {
  24707. "type": "string",
  24708. "enum": ["vcs.branch.updated"]
  24709. },
  24710. "properties": {
  24711. "type": "object",
  24712. "properties": {
  24713. "branch": {
  24714. "type": "string"
  24715. }
  24716. },
  24717. "additionalProperties": false
  24718. }
  24719. },
  24720. "required": ["id", "type", "properties"],
  24721. "additionalProperties": false
  24722. },
  24723. "EventWorktreeReady": {
  24724. "type": "object",
  24725. "properties": {
  24726. "id": {
  24727. "type": "string"
  24728. },
  24729. "type": {
  24730. "type": "string",
  24731. "enum": ["worktree.ready"]
  24732. },
  24733. "properties": {
  24734. "type": "object",
  24735. "properties": {
  24736. "name": {
  24737. "type": "string"
  24738. },
  24739. "branch": {
  24740. "type": "string"
  24741. }
  24742. },
  24743. "required": ["name"],
  24744. "additionalProperties": false
  24745. }
  24746. },
  24747. "required": ["id", "type", "properties"],
  24748. "additionalProperties": false
  24749. },
  24750. "EventWorktreeFailed": {
  24751. "type": "object",
  24752. "properties": {
  24753. "id": {
  24754. "type": "string"
  24755. },
  24756. "type": {
  24757. "type": "string",
  24758. "enum": ["worktree.failed"]
  24759. },
  24760. "properties": {
  24761. "type": "object",
  24762. "properties": {
  24763. "message": {
  24764. "type": "string"
  24765. }
  24766. },
  24767. "required": ["message"],
  24768. "additionalProperties": false
  24769. }
  24770. },
  24771. "required": ["id", "type", "properties"],
  24772. "additionalProperties": false
  24773. },
  24774. "EventWorkspaceReady": {
  24775. "type": "object",
  24776. "properties": {
  24777. "id": {
  24778. "type": "string"
  24779. },
  24780. "type": {
  24781. "type": "string",
  24782. "enum": ["workspace.ready"]
  24783. },
  24784. "properties": {
  24785. "type": "object",
  24786. "properties": {
  24787. "name": {
  24788. "type": "string"
  24789. }
  24790. },
  24791. "required": ["name"],
  24792. "additionalProperties": false
  24793. }
  24794. },
  24795. "required": ["id", "type", "properties"],
  24796. "additionalProperties": false
  24797. },
  24798. "EventWorkspaceFailed": {
  24799. "type": "object",
  24800. "properties": {
  24801. "id": {
  24802. "type": "string"
  24803. },
  24804. "type": {
  24805. "type": "string",
  24806. "enum": ["workspace.failed"]
  24807. },
  24808. "properties": {
  24809. "type": "object",
  24810. "properties": {
  24811. "message": {
  24812. "type": "string"
  24813. }
  24814. },
  24815. "required": ["message"],
  24816. "additionalProperties": false
  24817. }
  24818. },
  24819. "required": ["id", "type", "properties"],
  24820. "additionalProperties": false
  24821. },
  24822. "EventWorkspaceStatus": {
  24823. "type": "object",
  24824. "properties": {
  24825. "id": {
  24826. "type": "string"
  24827. },
  24828. "type": {
  24829. "type": "string",
  24830. "enum": ["workspace.status"]
  24831. },
  24832. "properties": {
  24833. "type": "object",
  24834. "properties": {
  24835. "workspaceID": {
  24836. "type": "string",
  24837. "pattern": "^wrk"
  24838. },
  24839. "status": {
  24840. "type": "string",
  24841. "enum": ["connected", "connecting", "disconnected", "error"]
  24842. }
  24843. },
  24844. "required": ["workspaceID", "status"],
  24845. "additionalProperties": false
  24846. }
  24847. },
  24848. "required": ["id", "type", "properties"],
  24849. "additionalProperties": false
  24850. },
  24851. "EventServerConnected": {
  24852. "type": "object",
  24853. "properties": {
  24854. "id": {
  24855. "type": "string"
  24856. },
  24857. "type": {
  24858. "type": "string",
  24859. "enum": ["server.connected"]
  24860. },
  24861. "properties": {
  24862. "type": "object",
  24863. "properties": {}
  24864. }
  24865. },
  24866. "required": ["id", "type", "properties"],
  24867. "additionalProperties": false
  24868. },
  24869. "EventGlobalDisposed": {
  24870. "type": "object",
  24871. "properties": {
  24872. "id": {
  24873. "type": "string"
  24874. },
  24875. "type": {
  24876. "type": "string",
  24877. "enum": ["global.disposed"]
  24878. },
  24879. "properties": {
  24880. "type": "object",
  24881. "properties": {}
  24882. }
  24883. },
  24884. "required": ["id", "type", "properties"],
  24885. "additionalProperties": false
  24886. },
  24887. "BadRequestError": {
  24888. "type": "object",
  24889. "required": ["name", "data"],
  24890. "properties": {
  24891. "name": {
  24892. "type": "string",
  24893. "enum": ["BadRequest"]
  24894. },
  24895. "data": {
  24896. "type": "object",
  24897. "required": ["message"],
  24898. "properties": {
  24899. "message": {
  24900. "type": "string"
  24901. },
  24902. "kind": {
  24903. "type": "string",
  24904. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  24905. }
  24906. }
  24907. }
  24908. }
  24909. }
  24910. }
  24911. },
  24912. "security": [],
  24913. "tags": [
  24914. {
  24915. "name": "control",
  24916. "description": "Control plane routes."
  24917. },
  24918. {
  24919. "name": "global",
  24920. "description": "Global server routes."
  24921. },
  24922. {
  24923. "name": "event",
  24924. "description": "Instance event stream route."
  24925. },
  24926. {
  24927. "name": "config",
  24928. "description": "Experimental HttpApi config routes."
  24929. },
  24930. {
  24931. "name": "experimental",
  24932. "description": "Experimental HttpApi read-only routes."
  24933. },
  24934. {
  24935. "name": "file",
  24936. "description": "Experimental HttpApi file routes."
  24937. },
  24938. {
  24939. "name": "instance",
  24940. "description": "Experimental HttpApi instance read routes."
  24941. },
  24942. {
  24943. "name": "mcp",
  24944. "description": "Experimental HttpApi MCP routes."
  24945. },
  24946. {
  24947. "name": "project",
  24948. "description": "Experimental HttpApi project routes."
  24949. },
  24950. {
  24951. "name": "pty",
  24952. "description": "Experimental HttpApi PTY routes."
  24953. },
  24954. {
  24955. "name": "question",
  24956. "description": "Question routes."
  24957. },
  24958. {
  24959. "name": "permission",
  24960. "description": "Experimental HttpApi permission routes."
  24961. },
  24962. {
  24963. "name": "provider",
  24964. "description": "Experimental HttpApi provider routes."
  24965. },
  24966. {
  24967. "name": "session",
  24968. "description": "Experimental HttpApi session routes."
  24969. },
  24970. {
  24971. "name": "sync",
  24972. "description": "Experimental HttpApi sync routes."
  24973. },
  24974. {
  24975. "name": "v2",
  24976. "description": "Experimental v2 routes."
  24977. },
  24978. {
  24979. "name": "v2 messages",
  24980. "description": "Experimental v2 message routes."
  24981. },
  24982. {
  24983. "name": "v2 models",
  24984. "description": "Experimental v2 model routes."
  24985. },
  24986. {
  24987. "name": "v2 providers",
  24988. "description": "Experimental v2 provider routes."
  24989. },
  24990. {
  24991. "name": "v2 permissions",
  24992. "description": "Experimental v2 permission routes."
  24993. },
  24994. {
  24995. "name": "v2 session permissions",
  24996. "description": "Experimental v2 session permission routes."
  24997. },
  24998. {
  24999. "name": "v2 saved permissions",
  25000. "description": "Experimental v2 saved permission routes."
  25001. },
  25002. {
  25003. "name": "v2 filesystem",
  25004. "description": "Experimental v2 location-scoped filesystem routes."
  25005. },
  25006. {
  25007. "name": "tui",
  25008. "description": "Experimental HttpApi TUI routes."
  25009. },
  25010. {
  25011. "name": "workspace",
  25012. "description": "Experimental HttpApi workspace routes."
  25013. },
  25014. {
  25015. "name": "pty",
  25016. "description": "PTY websocket route."
  25017. }
  25018. ]
  25019. }