openapi.json 814 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678
  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. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/console": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.console.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Active Console provider metadata",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ConsoleState"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. },
  856. "500": {
  857. "description": "InternalServerError",
  858. "content": {
  859. "application/json": {
  860. "schema": {
  861. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  868. "summary": "Get active Console provider metadata",
  869. "x-codeSamples": [
  870. {
  871. "lang": "js",
  872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  873. }
  874. ]
  875. }
  876. },
  877. "/experimental/console/orgs": {
  878. "get": {
  879. "tags": ["experimental"],
  880. "operationId": "experimental.console.listOrgs",
  881. "parameters": [
  882. {
  883. "name": "directory",
  884. "in": "query",
  885. "schema": {
  886. "type": "string"
  887. },
  888. "required": false
  889. },
  890. {
  891. "name": "workspace",
  892. "in": "query",
  893. "schema": {
  894. "type": "string"
  895. },
  896. "required": false
  897. }
  898. ],
  899. "responses": {
  900. "200": {
  901. "description": "Switchable Console orgs",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "type": "object",
  906. "properties": {
  907. "orgs": {
  908. "type": "array",
  909. "items": {
  910. "type": "object",
  911. "properties": {
  912. "accountID": {
  913. "type": "string"
  914. },
  915. "accountEmail": {
  916. "type": "string"
  917. },
  918. "accountUrl": {
  919. "type": "string"
  920. },
  921. "orgID": {
  922. "type": "string"
  923. },
  924. "orgName": {
  925. "type": "string"
  926. },
  927. "active": {
  928. "type": "boolean"
  929. }
  930. },
  931. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  932. "additionalProperties": false
  933. }
  934. }
  935. },
  936. "required": ["orgs"],
  937. "additionalProperties": false,
  938. "description": "Switchable Console orgs"
  939. }
  940. }
  941. }
  942. },
  943. "400": {
  944. "description": "Bad request",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/BadRequestError"
  949. }
  950. }
  951. }
  952. },
  953. "500": {
  954. "description": "InternalServerError",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  959. }
  960. }
  961. }
  962. }
  963. },
  964. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  965. "summary": "List switchable Console orgs",
  966. "x-codeSamples": [
  967. {
  968. "lang": "js",
  969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  970. }
  971. ]
  972. }
  973. },
  974. "/experimental/console/switch": {
  975. "post": {
  976. "tags": ["experimental"],
  977. "operationId": "experimental.console.switchOrg",
  978. "parameters": [
  979. {
  980. "name": "directory",
  981. "in": "query",
  982. "schema": {
  983. "type": "string"
  984. },
  985. "required": false
  986. },
  987. {
  988. "name": "workspace",
  989. "in": "query",
  990. "schema": {
  991. "type": "string"
  992. },
  993. "required": false
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "Switch success",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "boolean",
  1003. "description": "Switch success"
  1004. }
  1005. }
  1006. }
  1007. }
  1008. },
  1009. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1010. "summary": "Switch active Console org",
  1011. "requestBody": {
  1012. "content": {
  1013. "application/json": {
  1014. "schema": {
  1015. "type": "object",
  1016. "properties": {
  1017. "accountID": {
  1018. "type": "string"
  1019. },
  1020. "orgID": {
  1021. "type": "string"
  1022. }
  1023. },
  1024. "required": ["accountID", "orgID"],
  1025. "additionalProperties": false
  1026. }
  1027. }
  1028. }
  1029. },
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1034. }
  1035. ]
  1036. }
  1037. },
  1038. "/experimental/tool": {
  1039. "get": {
  1040. "tags": ["experimental"],
  1041. "operationId": "tool.list",
  1042. "parameters": [
  1043. {
  1044. "name": "directory",
  1045. "in": "query",
  1046. "schema": {
  1047. "type": "string"
  1048. },
  1049. "required": false
  1050. },
  1051. {
  1052. "name": "workspace",
  1053. "in": "query",
  1054. "schema": {
  1055. "type": "string"
  1056. },
  1057. "required": false
  1058. },
  1059. {
  1060. "name": "provider",
  1061. "in": "query",
  1062. "schema": {
  1063. "type": "string"
  1064. },
  1065. "required": true
  1066. },
  1067. {
  1068. "name": "model",
  1069. "in": "query",
  1070. "schema": {
  1071. "type": "string"
  1072. },
  1073. "required": true
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "Tools",
  1079. "content": {
  1080. "application/json": {
  1081. "schema": {
  1082. "$ref": "#/components/schemas/ToolList"
  1083. }
  1084. }
  1085. }
  1086. },
  1087. "400": {
  1088. "description": "BadRequest | InvalidRequestError",
  1089. "content": {
  1090. "application/json": {
  1091. "schema": {
  1092. "anyOf": [
  1093. {
  1094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1095. },
  1096. {
  1097. "$ref": "#/components/schemas/InvalidRequestError"
  1098. }
  1099. ]
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1106. "summary": "List tools",
  1107. "x-codeSamples": [
  1108. {
  1109. "lang": "js",
  1110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1111. }
  1112. ]
  1113. }
  1114. },
  1115. "/experimental/tool/ids": {
  1116. "get": {
  1117. "tags": ["experimental"],
  1118. "operationId": "tool.ids",
  1119. "parameters": [
  1120. {
  1121. "name": "directory",
  1122. "in": "query",
  1123. "schema": {
  1124. "type": "string"
  1125. },
  1126. "required": false
  1127. },
  1128. {
  1129. "name": "workspace",
  1130. "in": "query",
  1131. "schema": {
  1132. "type": "string"
  1133. },
  1134. "required": false
  1135. }
  1136. ],
  1137. "responses": {
  1138. "200": {
  1139. "description": "Tool IDs",
  1140. "content": {
  1141. "application/json": {
  1142. "schema": {
  1143. "$ref": "#/components/schemas/ToolIDs"
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "400": {
  1149. "description": "BadRequest | InvalidRequestError",
  1150. "content": {
  1151. "application/json": {
  1152. "schema": {
  1153. "anyOf": [
  1154. {
  1155. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1156. },
  1157. {
  1158. "$ref": "#/components/schemas/InvalidRequestError"
  1159. }
  1160. ]
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1167. "summary": "List tool IDs",
  1168. "x-codeSamples": [
  1169. {
  1170. "lang": "js",
  1171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1172. }
  1173. ]
  1174. }
  1175. },
  1176. "/experimental/worktree": {
  1177. "get": {
  1178. "tags": ["experimental"],
  1179. "operationId": "worktree.list",
  1180. "parameters": [
  1181. {
  1182. "name": "directory",
  1183. "in": "query",
  1184. "schema": {
  1185. "type": "string"
  1186. },
  1187. "required": false
  1188. },
  1189. {
  1190. "name": "workspace",
  1191. "in": "query",
  1192. "schema": {
  1193. "type": "string"
  1194. },
  1195. "required": false
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "List of worktree directories",
  1201. "content": {
  1202. "application/json": {
  1203. "schema": {
  1204. "type": "array",
  1205. "items": {
  1206. "type": "string"
  1207. },
  1208. "description": "List of worktree directories"
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "400": {
  1214. "description": "WorktreeError | InvalidRequestError",
  1215. "content": {
  1216. "application/json": {
  1217. "schema": {
  1218. "anyOf": [
  1219. {
  1220. "$ref": "#/components/schemas/WorktreeError"
  1221. },
  1222. {
  1223. "$ref": "#/components/schemas/InvalidRequestError"
  1224. }
  1225. ]
  1226. }
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "description": "List all sandbox worktrees for the current project.",
  1232. "summary": "List worktrees",
  1233. "x-codeSamples": [
  1234. {
  1235. "lang": "js",
  1236. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1237. }
  1238. ]
  1239. },
  1240. "post": {
  1241. "tags": ["experimental"],
  1242. "operationId": "worktree.create",
  1243. "parameters": [
  1244. {
  1245. "name": "directory",
  1246. "in": "query",
  1247. "schema": {
  1248. "type": "string"
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "workspace",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. }
  1260. ],
  1261. "responses": {
  1262. "200": {
  1263. "description": "Worktree created",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/Worktree"
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "400": {
  1273. "description": "WorktreeError | InvalidRequestError",
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/components/schemas/WorktreeError"
  1280. },
  1281. {
  1282. "$ref": "#/components/schemas/InvalidRequestError"
  1283. }
  1284. ]
  1285. }
  1286. }
  1287. }
  1288. }
  1289. },
  1290. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1291. "summary": "Create worktree",
  1292. "requestBody": {
  1293. "content": {
  1294. "application/json": {
  1295. "schema": {
  1296. "$ref": "#/components/schemas/WorktreeCreateInput"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "x-codeSamples": [
  1302. {
  1303. "lang": "js",
  1304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1305. }
  1306. ]
  1307. },
  1308. "delete": {
  1309. "tags": ["experimental"],
  1310. "operationId": "worktree.remove",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "schema": {
  1316. "type": "string"
  1317. },
  1318. "required": false
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "schema": {
  1324. "type": "string"
  1325. },
  1326. "required": false
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "Worktree removed",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "boolean",
  1336. "description": "Worktree removed"
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "400": {
  1342. "description": "WorktreeError | InvalidRequestError",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "anyOf": [
  1347. {
  1348. "$ref": "#/components/schemas/WorktreeError"
  1349. },
  1350. {
  1351. "$ref": "#/components/schemas/InvalidRequestError"
  1352. }
  1353. ]
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "description": "Remove a git worktree and delete its branch.",
  1360. "summary": "Remove worktree",
  1361. "requestBody": {
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "x-codeSamples": [
  1371. {
  1372. "lang": "js",
  1373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1374. }
  1375. ]
  1376. }
  1377. },
  1378. "/experimental/worktree/reset": {
  1379. "post": {
  1380. "tags": ["experimental"],
  1381. "operationId": "worktree.reset",
  1382. "parameters": [
  1383. {
  1384. "name": "directory",
  1385. "in": "query",
  1386. "schema": {
  1387. "type": "string"
  1388. },
  1389. "required": false
  1390. },
  1391. {
  1392. "name": "workspace",
  1393. "in": "query",
  1394. "schema": {
  1395. "type": "string"
  1396. },
  1397. "required": false
  1398. }
  1399. ],
  1400. "responses": {
  1401. "200": {
  1402. "description": "Worktree reset",
  1403. "content": {
  1404. "application/json": {
  1405. "schema": {
  1406. "type": "boolean",
  1407. "description": "Worktree reset"
  1408. }
  1409. }
  1410. }
  1411. },
  1412. "400": {
  1413. "description": "WorktreeError | InvalidRequestError",
  1414. "content": {
  1415. "application/json": {
  1416. "schema": {
  1417. "anyOf": [
  1418. {
  1419. "$ref": "#/components/schemas/WorktreeError"
  1420. },
  1421. {
  1422. "$ref": "#/components/schemas/InvalidRequestError"
  1423. }
  1424. ]
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "description": "Reset a worktree branch to the primary default branch.",
  1431. "summary": "Reset worktree",
  1432. "requestBody": {
  1433. "content": {
  1434. "application/json": {
  1435. "schema": {
  1436. "$ref": "#/components/schemas/WorktreeResetInput"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "x-codeSamples": [
  1442. {
  1443. "lang": "js",
  1444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1445. }
  1446. ]
  1447. }
  1448. },
  1449. "/experimental/session": {
  1450. "get": {
  1451. "tags": ["experimental"],
  1452. "operationId": "experimental.session.list",
  1453. "parameters": [
  1454. {
  1455. "name": "directory",
  1456. "in": "query",
  1457. "schema": {
  1458. "type": "string"
  1459. },
  1460. "required": false
  1461. },
  1462. {
  1463. "name": "workspace",
  1464. "in": "query",
  1465. "schema": {
  1466. "type": "string"
  1467. },
  1468. "required": false
  1469. },
  1470. {
  1471. "name": "roots",
  1472. "in": "query",
  1473. "schema": {
  1474. "anyOf": [
  1475. {
  1476. "type": "boolean"
  1477. },
  1478. {
  1479. "type": "string",
  1480. "enum": ["true", "false"]
  1481. }
  1482. ]
  1483. },
  1484. "required": false
  1485. },
  1486. {
  1487. "name": "start",
  1488. "in": "query",
  1489. "schema": {
  1490. "type": "number"
  1491. },
  1492. "required": false
  1493. },
  1494. {
  1495. "name": "cursor",
  1496. "in": "query",
  1497. "schema": {
  1498. "type": "number"
  1499. },
  1500. "required": false
  1501. },
  1502. {
  1503. "name": "search",
  1504. "in": "query",
  1505. "schema": {
  1506. "type": "string"
  1507. },
  1508. "required": false
  1509. },
  1510. {
  1511. "name": "limit",
  1512. "in": "query",
  1513. "schema": {
  1514. "type": "number"
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "archived",
  1520. "in": "query",
  1521. "schema": {
  1522. "anyOf": [
  1523. {
  1524. "type": "boolean"
  1525. },
  1526. {
  1527. "type": "string",
  1528. "enum": ["true", "false"]
  1529. }
  1530. ]
  1531. },
  1532. "required": false
  1533. }
  1534. ],
  1535. "responses": {
  1536. "200": {
  1537. "description": "List of sessions",
  1538. "content": {
  1539. "application/json": {
  1540. "schema": {
  1541. "type": "array",
  1542. "items": {
  1543. "$ref": "#/components/schemas/GlobalSession"
  1544. },
  1545. "description": "List of sessions"
  1546. }
  1547. }
  1548. }
  1549. },
  1550. "400": {
  1551. "description": "Bad request",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "$ref": "#/components/schemas/BadRequestError"
  1556. }
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1562. "summary": "List sessions",
  1563. "x-codeSamples": [
  1564. {
  1565. "lang": "js",
  1566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1567. }
  1568. ]
  1569. }
  1570. },
  1571. "/experimental/session/{sessionID}/background": {
  1572. "post": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.session.background",
  1575. "parameters": [
  1576. {
  1577. "name": "sessionID",
  1578. "in": "path",
  1579. "schema": {
  1580. "type": "string",
  1581. "pattern": "^ses"
  1582. },
  1583. "required": true
  1584. },
  1585. {
  1586. "name": "directory",
  1587. "in": "query",
  1588. "schema": {
  1589. "type": "string"
  1590. },
  1591. "required": false
  1592. },
  1593. {
  1594. "name": "workspace",
  1595. "in": "query",
  1596. "schema": {
  1597. "type": "string"
  1598. },
  1599. "required": false
  1600. }
  1601. ],
  1602. "responses": {
  1603. "200": {
  1604. "description": "Backgrounded subagents",
  1605. "content": {
  1606. "application/json": {
  1607. "schema": {
  1608. "type": "boolean",
  1609. "description": "Backgrounded subagents"
  1610. }
  1611. }
  1612. }
  1613. },
  1614. "400": {
  1615. "description": "BadRequest | InvalidRequestError",
  1616. "content": {
  1617. "application/json": {
  1618. "schema": {
  1619. "anyOf": [
  1620. {
  1621. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1622. },
  1623. {
  1624. "$ref": "#/components/schemas/InvalidRequestError"
  1625. }
  1626. ]
  1627. }
  1628. }
  1629. }
  1630. }
  1631. },
  1632. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1633. "summary": "Background subagents",
  1634. "x-codeSamples": [
  1635. {
  1636. "lang": "js",
  1637. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1638. }
  1639. ]
  1640. }
  1641. },
  1642. "/experimental/resource": {
  1643. "get": {
  1644. "tags": ["experimental"],
  1645. "operationId": "experimental.resource.list",
  1646. "parameters": [
  1647. {
  1648. "name": "directory",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. },
  1655. {
  1656. "name": "workspace",
  1657. "in": "query",
  1658. "schema": {
  1659. "type": "string"
  1660. },
  1661. "required": false
  1662. }
  1663. ],
  1664. "responses": {
  1665. "200": {
  1666. "description": "MCP resources",
  1667. "content": {
  1668. "application/json": {
  1669. "schema": {
  1670. "type": "object",
  1671. "additionalProperties": {
  1672. "$ref": "#/components/schemas/McpResource"
  1673. },
  1674. "description": "MCP resources"
  1675. }
  1676. }
  1677. }
  1678. },
  1679. "400": {
  1680. "description": "Bad request",
  1681. "content": {
  1682. "application/json": {
  1683. "schema": {
  1684. "$ref": "#/components/schemas/BadRequestError"
  1685. }
  1686. }
  1687. }
  1688. }
  1689. },
  1690. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1691. "summary": "Get MCP resources",
  1692. "x-codeSamples": [
  1693. {
  1694. "lang": "js",
  1695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1696. }
  1697. ]
  1698. }
  1699. },
  1700. "/find": {
  1701. "get": {
  1702. "tags": ["file"],
  1703. "operationId": "find.text",
  1704. "parameters": [
  1705. {
  1706. "name": "directory",
  1707. "in": "query",
  1708. "schema": {
  1709. "type": "string"
  1710. },
  1711. "required": false
  1712. },
  1713. {
  1714. "name": "workspace",
  1715. "in": "query",
  1716. "schema": {
  1717. "type": "string"
  1718. },
  1719. "required": false
  1720. },
  1721. {
  1722. "name": "pattern",
  1723. "in": "query",
  1724. "schema": {
  1725. "type": "string"
  1726. },
  1727. "required": true
  1728. }
  1729. ],
  1730. "responses": {
  1731. "200": {
  1732. "description": "Matches",
  1733. "content": {
  1734. "application/json": {
  1735. "schema": {
  1736. "type": "array",
  1737. "items": {
  1738. "type": "object",
  1739. "properties": {
  1740. "path": {
  1741. "type": "object",
  1742. "properties": {
  1743. "text": {
  1744. "type": "string"
  1745. }
  1746. },
  1747. "required": ["text"],
  1748. "additionalProperties": false
  1749. },
  1750. "lines": {
  1751. "type": "object",
  1752. "properties": {
  1753. "text": {
  1754. "type": "string"
  1755. }
  1756. },
  1757. "required": ["text"],
  1758. "additionalProperties": false
  1759. },
  1760. "line_number": {
  1761. "type": "integer",
  1762. "minimum": 0
  1763. },
  1764. "absolute_offset": {
  1765. "type": "integer",
  1766. "minimum": 0
  1767. },
  1768. "submatches": {
  1769. "type": "array",
  1770. "items": {
  1771. "type": "object",
  1772. "properties": {
  1773. "match": {
  1774. "type": "object",
  1775. "properties": {
  1776. "text": {
  1777. "type": "string"
  1778. }
  1779. },
  1780. "required": ["text"],
  1781. "additionalProperties": false
  1782. },
  1783. "start": {
  1784. "type": "integer",
  1785. "minimum": 0
  1786. },
  1787. "end": {
  1788. "type": "integer",
  1789. "minimum": 0
  1790. }
  1791. },
  1792. "required": ["match", "start", "end"],
  1793. "additionalProperties": false
  1794. }
  1795. }
  1796. },
  1797. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1798. "additionalProperties": false
  1799. },
  1800. "description": "Matches"
  1801. }
  1802. }
  1803. }
  1804. },
  1805. "400": {
  1806. "description": "Bad request",
  1807. "content": {
  1808. "application/json": {
  1809. "schema": {
  1810. "$ref": "#/components/schemas/BadRequestError"
  1811. }
  1812. }
  1813. }
  1814. }
  1815. },
  1816. "description": "Search for text patterns across files in the project using ripgrep.",
  1817. "summary": "Find text",
  1818. "x-codeSamples": [
  1819. {
  1820. "lang": "js",
  1821. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1822. }
  1823. ]
  1824. }
  1825. },
  1826. "/find/file": {
  1827. "get": {
  1828. "tags": ["file"],
  1829. "operationId": "find.files",
  1830. "parameters": [
  1831. {
  1832. "name": "directory",
  1833. "in": "query",
  1834. "schema": {
  1835. "type": "string"
  1836. },
  1837. "required": false
  1838. },
  1839. {
  1840. "name": "workspace",
  1841. "in": "query",
  1842. "schema": {
  1843. "type": "string"
  1844. },
  1845. "required": false
  1846. },
  1847. {
  1848. "name": "query",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": true
  1854. },
  1855. {
  1856. "name": "dirs",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string",
  1860. "enum": ["true", "false"]
  1861. },
  1862. "required": false
  1863. },
  1864. {
  1865. "name": "type",
  1866. "in": "query",
  1867. "schema": {
  1868. "type": "string",
  1869. "enum": ["file", "directory"]
  1870. },
  1871. "required": false
  1872. },
  1873. {
  1874. "name": "limit",
  1875. "in": "query",
  1876. "schema": {
  1877. "type": "integer",
  1878. "minimum": 1,
  1879. "maximum": 200
  1880. },
  1881. "required": false
  1882. }
  1883. ],
  1884. "responses": {
  1885. "200": {
  1886. "description": "File paths",
  1887. "content": {
  1888. "application/json": {
  1889. "schema": {
  1890. "type": "array",
  1891. "items": {
  1892. "type": "string"
  1893. },
  1894. "description": "File paths"
  1895. }
  1896. }
  1897. }
  1898. },
  1899. "400": {
  1900. "description": "Bad request",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/BadRequestError"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Search for files or directories by name or pattern in the project directory.",
  1911. "summary": "Find files",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/find/symbol": {
  1921. "get": {
  1922. "tags": ["file"],
  1923. "operationId": "find.symbols",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. },
  1941. {
  1942. "name": "query",
  1943. "in": "query",
  1944. "schema": {
  1945. "type": "string"
  1946. },
  1947. "required": true
  1948. }
  1949. ],
  1950. "responses": {
  1951. "200": {
  1952. "description": "Symbols",
  1953. "content": {
  1954. "application/json": {
  1955. "schema": {
  1956. "type": "array",
  1957. "items": {
  1958. "$ref": "#/components/schemas/Symbol"
  1959. },
  1960. "description": "Symbols"
  1961. }
  1962. }
  1963. }
  1964. },
  1965. "400": {
  1966. "description": "Bad request",
  1967. "content": {
  1968. "application/json": {
  1969. "schema": {
  1970. "$ref": "#/components/schemas/BadRequestError"
  1971. }
  1972. }
  1973. }
  1974. }
  1975. },
  1976. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1977. "summary": "Find symbols",
  1978. "x-codeSamples": [
  1979. {
  1980. "lang": "js",
  1981. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1982. }
  1983. ]
  1984. }
  1985. },
  1986. "/file": {
  1987. "get": {
  1988. "tags": ["file"],
  1989. "operationId": "file.list",
  1990. "parameters": [
  1991. {
  1992. "name": "directory",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "workspace",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string"
  2004. },
  2005. "required": false
  2006. },
  2007. {
  2008. "name": "path",
  2009. "in": "query",
  2010. "schema": {
  2011. "type": "string"
  2012. },
  2013. "required": true
  2014. }
  2015. ],
  2016. "responses": {
  2017. "200": {
  2018. "description": "Files and directories",
  2019. "content": {
  2020. "application/json": {
  2021. "schema": {
  2022. "type": "array",
  2023. "items": {
  2024. "$ref": "#/components/schemas/FileNode"
  2025. },
  2026. "description": "Files and directories"
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "400": {
  2032. "description": "Bad request",
  2033. "content": {
  2034. "application/json": {
  2035. "schema": {
  2036. "$ref": "#/components/schemas/BadRequestError"
  2037. }
  2038. }
  2039. }
  2040. }
  2041. },
  2042. "description": "List files and directories in a specified path.",
  2043. "summary": "List files",
  2044. "x-codeSamples": [
  2045. {
  2046. "lang": "js",
  2047. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2048. }
  2049. ]
  2050. }
  2051. },
  2052. "/file/content": {
  2053. "get": {
  2054. "tags": ["file"],
  2055. "operationId": "file.read",
  2056. "parameters": [
  2057. {
  2058. "name": "directory",
  2059. "in": "query",
  2060. "schema": {
  2061. "type": "string"
  2062. },
  2063. "required": false
  2064. },
  2065. {
  2066. "name": "workspace",
  2067. "in": "query",
  2068. "schema": {
  2069. "type": "string"
  2070. },
  2071. "required": false
  2072. },
  2073. {
  2074. "name": "path",
  2075. "in": "query",
  2076. "schema": {
  2077. "type": "string"
  2078. },
  2079. "required": true
  2080. }
  2081. ],
  2082. "responses": {
  2083. "200": {
  2084. "description": "File content",
  2085. "content": {
  2086. "application/json": {
  2087. "schema": {
  2088. "$ref": "#/components/schemas/FileContent"
  2089. }
  2090. }
  2091. }
  2092. },
  2093. "400": {
  2094. "description": "Bad request",
  2095. "content": {
  2096. "application/json": {
  2097. "schema": {
  2098. "$ref": "#/components/schemas/BadRequestError"
  2099. }
  2100. }
  2101. }
  2102. }
  2103. },
  2104. "description": "Read the content of a specified file.",
  2105. "summary": "Read file",
  2106. "x-codeSamples": [
  2107. {
  2108. "lang": "js",
  2109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2110. }
  2111. ]
  2112. }
  2113. },
  2114. "/file/status": {
  2115. "get": {
  2116. "tags": ["file"],
  2117. "operationId": "file.status",
  2118. "parameters": [
  2119. {
  2120. "name": "directory",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "workspace",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": false
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File status",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "type": "array",
  2143. "items": {
  2144. "$ref": "#/components/schemas/File"
  2145. },
  2146. "description": "File status"
  2147. }
  2148. }
  2149. }
  2150. },
  2151. "400": {
  2152. "description": "Bad request",
  2153. "content": {
  2154. "application/json": {
  2155. "schema": {
  2156. "$ref": "#/components/schemas/BadRequestError"
  2157. }
  2158. }
  2159. }
  2160. }
  2161. },
  2162. "description": "Get the git status of all files in the project.",
  2163. "summary": "Get file status",
  2164. "x-codeSamples": [
  2165. {
  2166. "lang": "js",
  2167. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2168. }
  2169. ]
  2170. }
  2171. },
  2172. "/instance/dispose": {
  2173. "post": {
  2174. "tags": ["instance"],
  2175. "operationId": "instance.dispose",
  2176. "parameters": [
  2177. {
  2178. "name": "directory",
  2179. "in": "query",
  2180. "schema": {
  2181. "type": "string"
  2182. },
  2183. "required": false
  2184. },
  2185. {
  2186. "name": "workspace",
  2187. "in": "query",
  2188. "schema": {
  2189. "type": "string"
  2190. },
  2191. "required": false
  2192. }
  2193. ],
  2194. "responses": {
  2195. "200": {
  2196. "description": "Instance disposed",
  2197. "content": {
  2198. "application/json": {
  2199. "schema": {
  2200. "type": "boolean",
  2201. "description": "Instance disposed"
  2202. }
  2203. }
  2204. }
  2205. },
  2206. "400": {
  2207. "description": "Bad request",
  2208. "content": {
  2209. "application/json": {
  2210. "schema": {
  2211. "$ref": "#/components/schemas/BadRequestError"
  2212. }
  2213. }
  2214. }
  2215. }
  2216. },
  2217. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2218. "summary": "Dispose instance",
  2219. "x-codeSamples": [
  2220. {
  2221. "lang": "js",
  2222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2223. }
  2224. ]
  2225. }
  2226. },
  2227. "/path": {
  2228. "get": {
  2229. "tags": ["instance"],
  2230. "operationId": "path.get",
  2231. "parameters": [
  2232. {
  2233. "name": "directory",
  2234. "in": "query",
  2235. "schema": {
  2236. "type": "string"
  2237. },
  2238. "required": false
  2239. },
  2240. {
  2241. "name": "workspace",
  2242. "in": "query",
  2243. "schema": {
  2244. "type": "string"
  2245. },
  2246. "required": false
  2247. }
  2248. ],
  2249. "responses": {
  2250. "200": {
  2251. "description": "Path",
  2252. "content": {
  2253. "application/json": {
  2254. "schema": {
  2255. "$ref": "#/components/schemas/Path"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2272. "summary": "Get paths",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/vcs": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "vcs.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "VCS info",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/VcsInfo"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2326. "summary": "Get VCS info",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs/status": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.status",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS status",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "type": "array",
  2364. "items": {
  2365. "$ref": "#/components/schemas/VcsFileStatus"
  2366. },
  2367. "description": "VCS status"
  2368. }
  2369. }
  2370. }
  2371. },
  2372. "400": {
  2373. "description": "Bad request",
  2374. "content": {
  2375. "application/json": {
  2376. "schema": {
  2377. "$ref": "#/components/schemas/BadRequestError"
  2378. }
  2379. }
  2380. }
  2381. }
  2382. },
  2383. "description": "Retrieve changed files in the current working tree without patches.",
  2384. "summary": "Get VCS status",
  2385. "x-codeSamples": [
  2386. {
  2387. "lang": "js",
  2388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2389. }
  2390. ]
  2391. }
  2392. },
  2393. "/vcs/diff": {
  2394. "get": {
  2395. "tags": ["instance"],
  2396. "operationId": "vcs.diff",
  2397. "parameters": [
  2398. {
  2399. "name": "directory",
  2400. "in": "query",
  2401. "schema": {
  2402. "type": "string"
  2403. },
  2404. "required": false
  2405. },
  2406. {
  2407. "name": "workspace",
  2408. "in": "query",
  2409. "schema": {
  2410. "type": "string"
  2411. },
  2412. "required": false
  2413. },
  2414. {
  2415. "name": "mode",
  2416. "in": "query",
  2417. "schema": {
  2418. "type": "string",
  2419. "enum": ["git", "branch"]
  2420. },
  2421. "required": true
  2422. },
  2423. {
  2424. "name": "context",
  2425. "in": "query",
  2426. "schema": {
  2427. "type": "integer",
  2428. "minimum": 0
  2429. },
  2430. "required": false
  2431. }
  2432. ],
  2433. "responses": {
  2434. "200": {
  2435. "description": "VCS diff",
  2436. "content": {
  2437. "application/json": {
  2438. "schema": {
  2439. "type": "array",
  2440. "items": {
  2441. "$ref": "#/components/schemas/VcsFileDiff"
  2442. },
  2443. "description": "VCS diff"
  2444. }
  2445. }
  2446. }
  2447. },
  2448. "400": {
  2449. "description": "Bad request",
  2450. "content": {
  2451. "application/json": {
  2452. "schema": {
  2453. "$ref": "#/components/schemas/BadRequestError"
  2454. }
  2455. }
  2456. }
  2457. }
  2458. },
  2459. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2460. "summary": "Get VCS diff",
  2461. "x-codeSamples": [
  2462. {
  2463. "lang": "js",
  2464. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2465. }
  2466. ]
  2467. }
  2468. },
  2469. "/vcs/diff/raw": {
  2470. "get": {
  2471. "tags": ["instance"],
  2472. "operationId": "vcs.diff.raw",
  2473. "parameters": [
  2474. {
  2475. "name": "directory",
  2476. "in": "query",
  2477. "schema": {
  2478. "type": "string"
  2479. },
  2480. "required": false
  2481. },
  2482. {
  2483. "name": "workspace",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. }
  2490. ],
  2491. "responses": {
  2492. "200": {
  2493. "description": "Raw VCS diff",
  2494. "content": {
  2495. "text/x-diff; charset=utf-8": {
  2496. "schema": {
  2497. "type": "string"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve a raw patch for current uncommitted changes.",
  2514. "summary": "Get raw VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/apply": {
  2524. "post": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.apply",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "VCS patch applied",
  2548. "content": {
  2549. "application/json": {
  2550. "schema": {
  2551. "type": "object",
  2552. "properties": {
  2553. "applied": {
  2554. "type": "boolean"
  2555. }
  2556. },
  2557. "required": ["applied"],
  2558. "additionalProperties": false,
  2559. "description": "VCS patch applied"
  2560. }
  2561. }
  2562. }
  2563. },
  2564. "400": {
  2565. "description": "VcsApplyError | InvalidRequestError",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "anyOf": [
  2570. {
  2571. "$ref": "#/components/schemas/VcsApplyError"
  2572. },
  2573. {
  2574. "$ref": "#/components/schemas/InvalidRequestError"
  2575. }
  2576. ]
  2577. }
  2578. }
  2579. }
  2580. }
  2581. },
  2582. "description": "Apply a raw patch to the current working tree.",
  2583. "summary": "Apply VCS patch",
  2584. "requestBody": {
  2585. "content": {
  2586. "application/json": {
  2587. "schema": {
  2588. "type": "object",
  2589. "properties": {
  2590. "patch": {
  2591. "type": "string"
  2592. }
  2593. },
  2594. "required": ["patch"],
  2595. "additionalProperties": false
  2596. }
  2597. }
  2598. }
  2599. },
  2600. "x-codeSamples": [
  2601. {
  2602. "lang": "js",
  2603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2604. }
  2605. ]
  2606. }
  2607. },
  2608. "/command": {
  2609. "get": {
  2610. "tags": ["instance"],
  2611. "operationId": "command.list",
  2612. "parameters": [
  2613. {
  2614. "name": "directory",
  2615. "in": "query",
  2616. "schema": {
  2617. "type": "string"
  2618. },
  2619. "required": false
  2620. },
  2621. {
  2622. "name": "workspace",
  2623. "in": "query",
  2624. "schema": {
  2625. "type": "string"
  2626. },
  2627. "required": false
  2628. }
  2629. ],
  2630. "responses": {
  2631. "200": {
  2632. "description": "List of commands",
  2633. "content": {
  2634. "application/json": {
  2635. "schema": {
  2636. "type": "array",
  2637. "items": {
  2638. "$ref": "#/components/schemas/Command"
  2639. },
  2640. "description": "List of commands"
  2641. }
  2642. }
  2643. }
  2644. },
  2645. "400": {
  2646. "description": "Bad request",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "$ref": "#/components/schemas/BadRequestError"
  2651. }
  2652. }
  2653. }
  2654. }
  2655. },
  2656. "description": "Get a list of all available commands in the OpenCode system.",
  2657. "summary": "List commands",
  2658. "x-codeSamples": [
  2659. {
  2660. "lang": "js",
  2661. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2662. }
  2663. ]
  2664. }
  2665. },
  2666. "/agent": {
  2667. "get": {
  2668. "tags": ["instance"],
  2669. "operationId": "app.agents",
  2670. "parameters": [
  2671. {
  2672. "name": "directory",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. },
  2679. {
  2680. "name": "workspace",
  2681. "in": "query",
  2682. "schema": {
  2683. "type": "string"
  2684. },
  2685. "required": false
  2686. }
  2687. ],
  2688. "responses": {
  2689. "200": {
  2690. "description": "List of agents",
  2691. "content": {
  2692. "application/json": {
  2693. "schema": {
  2694. "type": "array",
  2695. "items": {
  2696. "$ref": "#/components/schemas/Agent"
  2697. },
  2698. "description": "List of agents"
  2699. }
  2700. }
  2701. }
  2702. },
  2703. "400": {
  2704. "description": "Bad request",
  2705. "content": {
  2706. "application/json": {
  2707. "schema": {
  2708. "$ref": "#/components/schemas/BadRequestError"
  2709. }
  2710. }
  2711. }
  2712. }
  2713. },
  2714. "description": "Get a list of all available AI agents in the OpenCode system.",
  2715. "summary": "List agents",
  2716. "x-codeSamples": [
  2717. {
  2718. "lang": "js",
  2719. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2720. }
  2721. ]
  2722. }
  2723. },
  2724. "/skill": {
  2725. "get": {
  2726. "tags": ["instance"],
  2727. "operationId": "app.skills",
  2728. "parameters": [
  2729. {
  2730. "name": "directory",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. },
  2737. {
  2738. "name": "workspace",
  2739. "in": "query",
  2740. "schema": {
  2741. "type": "string"
  2742. },
  2743. "required": false
  2744. }
  2745. ],
  2746. "responses": {
  2747. "200": {
  2748. "description": "List of skills",
  2749. "content": {
  2750. "application/json": {
  2751. "schema": {
  2752. "type": "array",
  2753. "items": {
  2754. "type": "object",
  2755. "properties": {
  2756. "name": {
  2757. "type": "string"
  2758. },
  2759. "description": {
  2760. "type": "string"
  2761. },
  2762. "location": {
  2763. "type": "string"
  2764. },
  2765. "content": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["name", "location", "content"],
  2770. "additionalProperties": false
  2771. },
  2772. "description": "List of skills"
  2773. }
  2774. }
  2775. }
  2776. },
  2777. "400": {
  2778. "description": "Bad request",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "$ref": "#/components/schemas/BadRequestError"
  2783. }
  2784. }
  2785. }
  2786. }
  2787. },
  2788. "description": "Get a list of all available skills in the OpenCode system.",
  2789. "summary": "List skills",
  2790. "x-codeSamples": [
  2791. {
  2792. "lang": "js",
  2793. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2794. }
  2795. ]
  2796. }
  2797. },
  2798. "/lsp": {
  2799. "get": {
  2800. "tags": ["instance"],
  2801. "operationId": "lsp.status",
  2802. "parameters": [
  2803. {
  2804. "name": "directory",
  2805. "in": "query",
  2806. "schema": {
  2807. "type": "string"
  2808. },
  2809. "required": false
  2810. },
  2811. {
  2812. "name": "workspace",
  2813. "in": "query",
  2814. "schema": {
  2815. "type": "string"
  2816. },
  2817. "required": false
  2818. }
  2819. ],
  2820. "responses": {
  2821. "200": {
  2822. "description": "LSP server status",
  2823. "content": {
  2824. "application/json": {
  2825. "schema": {
  2826. "type": "array",
  2827. "items": {
  2828. "$ref": "#/components/schemas/LSPStatus"
  2829. },
  2830. "description": "LSP server status"
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "400": {
  2836. "description": "Bad request",
  2837. "content": {
  2838. "application/json": {
  2839. "schema": {
  2840. "$ref": "#/components/schemas/BadRequestError"
  2841. }
  2842. }
  2843. }
  2844. }
  2845. },
  2846. "description": "Get LSP server status",
  2847. "summary": "Get LSP status",
  2848. "x-codeSamples": [
  2849. {
  2850. "lang": "js",
  2851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2852. }
  2853. ]
  2854. }
  2855. },
  2856. "/formatter": {
  2857. "get": {
  2858. "tags": ["instance"],
  2859. "operationId": "formatter.status",
  2860. "parameters": [
  2861. {
  2862. "name": "directory",
  2863. "in": "query",
  2864. "schema": {
  2865. "type": "string"
  2866. },
  2867. "required": false
  2868. },
  2869. {
  2870. "name": "workspace",
  2871. "in": "query",
  2872. "schema": {
  2873. "type": "string"
  2874. },
  2875. "required": false
  2876. }
  2877. ],
  2878. "responses": {
  2879. "200": {
  2880. "description": "Formatter status",
  2881. "content": {
  2882. "application/json": {
  2883. "schema": {
  2884. "type": "array",
  2885. "items": {
  2886. "$ref": "#/components/schemas/FormatterStatus"
  2887. },
  2888. "description": "Formatter status"
  2889. }
  2890. }
  2891. }
  2892. },
  2893. "400": {
  2894. "description": "Bad request",
  2895. "content": {
  2896. "application/json": {
  2897. "schema": {
  2898. "$ref": "#/components/schemas/BadRequestError"
  2899. }
  2900. }
  2901. }
  2902. }
  2903. },
  2904. "description": "Get formatter status",
  2905. "summary": "Get formatter status",
  2906. "x-codeSamples": [
  2907. {
  2908. "lang": "js",
  2909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2910. }
  2911. ]
  2912. }
  2913. },
  2914. "/mcp": {
  2915. "get": {
  2916. "tags": ["mcp"],
  2917. "operationId": "mcp.status",
  2918. "parameters": [
  2919. {
  2920. "name": "directory",
  2921. "in": "query",
  2922. "schema": {
  2923. "type": "string"
  2924. },
  2925. "required": false
  2926. },
  2927. {
  2928. "name": "workspace",
  2929. "in": "query",
  2930. "schema": {
  2931. "type": "string"
  2932. },
  2933. "required": false
  2934. }
  2935. ],
  2936. "responses": {
  2937. "200": {
  2938. "description": "MCP server status",
  2939. "content": {
  2940. "application/json": {
  2941. "schema": {
  2942. "type": "object",
  2943. "additionalProperties": {
  2944. "$ref": "#/components/schemas/MCPStatus"
  2945. },
  2946. "description": "MCP server status"
  2947. }
  2948. }
  2949. }
  2950. },
  2951. "400": {
  2952. "description": "Bad request",
  2953. "content": {
  2954. "application/json": {
  2955. "schema": {
  2956. "$ref": "#/components/schemas/BadRequestError"
  2957. }
  2958. }
  2959. }
  2960. }
  2961. },
  2962. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2963. "summary": "Get MCP status",
  2964. "x-codeSamples": [
  2965. {
  2966. "lang": "js",
  2967. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2968. }
  2969. ]
  2970. },
  2971. "post": {
  2972. "tags": ["mcp"],
  2973. "operationId": "mcp.add",
  2974. "parameters": [
  2975. {
  2976. "name": "directory",
  2977. "in": "query",
  2978. "schema": {
  2979. "type": "string"
  2980. },
  2981. "required": false
  2982. },
  2983. {
  2984. "name": "workspace",
  2985. "in": "query",
  2986. "schema": {
  2987. "type": "string"
  2988. },
  2989. "required": false
  2990. }
  2991. ],
  2992. "responses": {
  2993. "200": {
  2994. "description": "MCP server added successfully",
  2995. "content": {
  2996. "application/json": {
  2997. "schema": {
  2998. "type": "object",
  2999. "additionalProperties": {
  3000. "$ref": "#/components/schemas/MCPStatus"
  3001. },
  3002. "description": "MCP server added successfully"
  3003. }
  3004. }
  3005. }
  3006. },
  3007. "400": {
  3008. "description": "BadRequest | InvalidRequestError",
  3009. "content": {
  3010. "application/json": {
  3011. "schema": {
  3012. "anyOf": [
  3013. {
  3014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3015. },
  3016. {
  3017. "$ref": "#/components/schemas/InvalidRequestError"
  3018. }
  3019. ]
  3020. }
  3021. }
  3022. }
  3023. }
  3024. },
  3025. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3026. "summary": "Add MCP server",
  3027. "requestBody": {
  3028. "content": {
  3029. "application/json": {
  3030. "schema": {
  3031. "type": "object",
  3032. "properties": {
  3033. "name": {
  3034. "type": "string"
  3035. },
  3036. "config": {
  3037. "anyOf": [
  3038. {
  3039. "$ref": "#/components/schemas/McpLocalConfig"
  3040. },
  3041. {
  3042. "$ref": "#/components/schemas/McpRemoteConfig"
  3043. }
  3044. ]
  3045. }
  3046. },
  3047. "required": ["name", "config"],
  3048. "additionalProperties": false
  3049. }
  3050. }
  3051. }
  3052. },
  3053. "x-codeSamples": [
  3054. {
  3055. "lang": "js",
  3056. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3057. }
  3058. ]
  3059. }
  3060. },
  3061. "/mcp/{name}/auth": {
  3062. "post": {
  3063. "tags": ["mcp"],
  3064. "operationId": "mcp.auth.start",
  3065. "parameters": [
  3066. {
  3067. "name": "name",
  3068. "in": "path",
  3069. "schema": {
  3070. "type": "string"
  3071. },
  3072. "required": true
  3073. },
  3074. {
  3075. "name": "directory",
  3076. "in": "query",
  3077. "schema": {
  3078. "type": "string"
  3079. },
  3080. "required": false
  3081. },
  3082. {
  3083. "name": "workspace",
  3084. "in": "query",
  3085. "schema": {
  3086. "type": "string"
  3087. },
  3088. "required": false
  3089. }
  3090. ],
  3091. "responses": {
  3092. "200": {
  3093. "description": "OAuth flow started",
  3094. "content": {
  3095. "application/json": {
  3096. "schema": {
  3097. "type": "object",
  3098. "properties": {
  3099. "authorizationUrl": {
  3100. "type": "string"
  3101. },
  3102. "oauthState": {
  3103. "type": "string"
  3104. }
  3105. },
  3106. "required": ["authorizationUrl", "oauthState"],
  3107. "additionalProperties": false,
  3108. "description": "OAuth flow started"
  3109. }
  3110. }
  3111. }
  3112. },
  3113. "400": {
  3114. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3115. "content": {
  3116. "application/json": {
  3117. "schema": {
  3118. "anyOf": [
  3119. {
  3120. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3121. },
  3122. {
  3123. "$ref": "#/components/schemas/InvalidRequestError"
  3124. }
  3125. ]
  3126. }
  3127. }
  3128. }
  3129. },
  3130. "404": {
  3131. "description": "McpServerNotFoundError",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/McpServerNotFoundError"
  3136. }
  3137. }
  3138. }
  3139. }
  3140. },
  3141. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3142. "summary": "Start MCP OAuth",
  3143. "x-codeSamples": [
  3144. {
  3145. "lang": "js",
  3146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3147. }
  3148. ]
  3149. },
  3150. "delete": {
  3151. "tags": ["mcp"],
  3152. "operationId": "mcp.auth.remove",
  3153. "parameters": [
  3154. {
  3155. "name": "name",
  3156. "in": "path",
  3157. "schema": {
  3158. "type": "string"
  3159. },
  3160. "required": true
  3161. },
  3162. {
  3163. "name": "directory",
  3164. "in": "query",
  3165. "schema": {
  3166. "type": "string"
  3167. },
  3168. "required": false
  3169. },
  3170. {
  3171. "name": "workspace",
  3172. "in": "query",
  3173. "schema": {
  3174. "type": "string"
  3175. },
  3176. "required": false
  3177. }
  3178. ],
  3179. "responses": {
  3180. "200": {
  3181. "description": "OAuth credentials removed",
  3182. "content": {
  3183. "application/json": {
  3184. "schema": {
  3185. "type": "object",
  3186. "properties": {
  3187. "success": {
  3188. "type": "boolean",
  3189. "enum": [true]
  3190. }
  3191. },
  3192. "required": ["success"],
  3193. "additionalProperties": false,
  3194. "description": "OAuth credentials removed"
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "400": {
  3200. "description": "Bad request",
  3201. "content": {
  3202. "application/json": {
  3203. "schema": {
  3204. "$ref": "#/components/schemas/BadRequestError"
  3205. }
  3206. }
  3207. }
  3208. },
  3209. "404": {
  3210. "description": "McpServerNotFoundError",
  3211. "content": {
  3212. "application/json": {
  3213. "schema": {
  3214. "$ref": "#/components/schemas/McpServerNotFoundError"
  3215. }
  3216. }
  3217. }
  3218. }
  3219. },
  3220. "description": "Remove OAuth credentials for an MCP server.",
  3221. "summary": "Remove MCP OAuth",
  3222. "x-codeSamples": [
  3223. {
  3224. "lang": "js",
  3225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3226. }
  3227. ]
  3228. }
  3229. },
  3230. "/mcp/{name}/auth/callback": {
  3231. "post": {
  3232. "tags": ["mcp"],
  3233. "operationId": "mcp.auth.callback",
  3234. "parameters": [
  3235. {
  3236. "name": "name",
  3237. "in": "path",
  3238. "schema": {
  3239. "type": "string"
  3240. },
  3241. "required": true
  3242. },
  3243. {
  3244. "name": "directory",
  3245. "in": "query",
  3246. "schema": {
  3247. "type": "string"
  3248. },
  3249. "required": false
  3250. },
  3251. {
  3252. "name": "workspace",
  3253. "in": "query",
  3254. "schema": {
  3255. "type": "string"
  3256. },
  3257. "required": false
  3258. }
  3259. ],
  3260. "responses": {
  3261. "200": {
  3262. "description": "OAuth authentication completed",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "$ref": "#/components/schemas/MCPStatus"
  3267. }
  3268. }
  3269. }
  3270. },
  3271. "400": {
  3272. "description": "BadRequest | InvalidRequestError",
  3273. "content": {
  3274. "application/json": {
  3275. "schema": {
  3276. "anyOf": [
  3277. {
  3278. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3279. },
  3280. {
  3281. "$ref": "#/components/schemas/InvalidRequestError"
  3282. }
  3283. ]
  3284. }
  3285. }
  3286. }
  3287. },
  3288. "404": {
  3289. "description": "McpServerNotFoundError",
  3290. "content": {
  3291. "application/json": {
  3292. "schema": {
  3293. "$ref": "#/components/schemas/McpServerNotFoundError"
  3294. }
  3295. }
  3296. }
  3297. }
  3298. },
  3299. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3300. "summary": "Complete MCP OAuth",
  3301. "requestBody": {
  3302. "content": {
  3303. "application/json": {
  3304. "schema": {
  3305. "type": "object",
  3306. "properties": {
  3307. "code": {
  3308. "type": "string"
  3309. }
  3310. },
  3311. "required": ["code"],
  3312. "additionalProperties": false
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "x-codeSamples": [
  3318. {
  3319. "lang": "js",
  3320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3321. }
  3322. ]
  3323. }
  3324. },
  3325. "/mcp/{name}/auth/authenticate": {
  3326. "post": {
  3327. "tags": ["mcp"],
  3328. "operationId": "mcp.auth.authenticate",
  3329. "parameters": [
  3330. {
  3331. "name": "name",
  3332. "in": "path",
  3333. "schema": {
  3334. "type": "string"
  3335. },
  3336. "required": true
  3337. },
  3338. {
  3339. "name": "directory",
  3340. "in": "query",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": false
  3345. },
  3346. {
  3347. "name": "workspace",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. }
  3354. ],
  3355. "responses": {
  3356. "200": {
  3357. "description": "OAuth authentication completed",
  3358. "content": {
  3359. "application/json": {
  3360. "schema": {
  3361. "$ref": "#/components/schemas/MCPStatus"
  3362. }
  3363. }
  3364. }
  3365. },
  3366. "400": {
  3367. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3368. "content": {
  3369. "application/json": {
  3370. "schema": {
  3371. "anyOf": [
  3372. {
  3373. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3374. },
  3375. {
  3376. "$ref": "#/components/schemas/InvalidRequestError"
  3377. }
  3378. ]
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "404": {
  3384. "description": "McpServerNotFoundError",
  3385. "content": {
  3386. "application/json": {
  3387. "schema": {
  3388. "$ref": "#/components/schemas/McpServerNotFoundError"
  3389. }
  3390. }
  3391. }
  3392. }
  3393. },
  3394. "description": "Start OAuth flow and wait for callback (opens browser).",
  3395. "summary": "Authenticate MCP OAuth",
  3396. "x-codeSamples": [
  3397. {
  3398. "lang": "js",
  3399. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3400. }
  3401. ]
  3402. }
  3403. },
  3404. "/mcp/{name}/connect": {
  3405. "post": {
  3406. "tags": ["mcp"],
  3407. "operationId": "mcp.connect",
  3408. "parameters": [
  3409. {
  3410. "name": "name",
  3411. "in": "path",
  3412. "schema": {
  3413. "type": "string"
  3414. },
  3415. "required": true
  3416. },
  3417. {
  3418. "name": "directory",
  3419. "in": "query",
  3420. "schema": {
  3421. "type": "string"
  3422. },
  3423. "required": false
  3424. },
  3425. {
  3426. "name": "workspace",
  3427. "in": "query",
  3428. "schema": {
  3429. "type": "string"
  3430. },
  3431. "required": false
  3432. }
  3433. ],
  3434. "responses": {
  3435. "200": {
  3436. "description": "MCP server connected successfully",
  3437. "content": {
  3438. "application/json": {
  3439. "schema": {
  3440. "type": "boolean",
  3441. "description": "MCP server connected successfully"
  3442. }
  3443. }
  3444. }
  3445. },
  3446. "400": {
  3447. "description": "Bad request",
  3448. "content": {
  3449. "application/json": {
  3450. "schema": {
  3451. "$ref": "#/components/schemas/BadRequestError"
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "404": {
  3457. "description": "McpServerNotFoundError",
  3458. "content": {
  3459. "application/json": {
  3460. "schema": {
  3461. "$ref": "#/components/schemas/McpServerNotFoundError"
  3462. }
  3463. }
  3464. }
  3465. }
  3466. },
  3467. "description": "Connect an MCP server.",
  3468. "x-codeSamples": [
  3469. {
  3470. "lang": "js",
  3471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3472. }
  3473. ]
  3474. }
  3475. },
  3476. "/mcp/{name}/disconnect": {
  3477. "post": {
  3478. "tags": ["mcp"],
  3479. "operationId": "mcp.disconnect",
  3480. "parameters": [
  3481. {
  3482. "name": "name",
  3483. "in": "path",
  3484. "schema": {
  3485. "type": "string"
  3486. },
  3487. "required": true
  3488. },
  3489. {
  3490. "name": "directory",
  3491. "in": "query",
  3492. "schema": {
  3493. "type": "string"
  3494. },
  3495. "required": false
  3496. },
  3497. {
  3498. "name": "workspace",
  3499. "in": "query",
  3500. "schema": {
  3501. "type": "string"
  3502. },
  3503. "required": false
  3504. }
  3505. ],
  3506. "responses": {
  3507. "200": {
  3508. "description": "MCP server disconnected successfully",
  3509. "content": {
  3510. "application/json": {
  3511. "schema": {
  3512. "type": "boolean",
  3513. "description": "MCP server disconnected successfully"
  3514. }
  3515. }
  3516. }
  3517. },
  3518. "400": {
  3519. "description": "Bad request",
  3520. "content": {
  3521. "application/json": {
  3522. "schema": {
  3523. "$ref": "#/components/schemas/BadRequestError"
  3524. }
  3525. }
  3526. }
  3527. },
  3528. "404": {
  3529. "description": "McpServerNotFoundError",
  3530. "content": {
  3531. "application/json": {
  3532. "schema": {
  3533. "$ref": "#/components/schemas/McpServerNotFoundError"
  3534. }
  3535. }
  3536. }
  3537. }
  3538. },
  3539. "description": "Disconnect an MCP server.",
  3540. "x-codeSamples": [
  3541. {
  3542. "lang": "js",
  3543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3544. }
  3545. ]
  3546. }
  3547. },
  3548. "/project": {
  3549. "get": {
  3550. "tags": ["project"],
  3551. "operationId": "project.list",
  3552. "parameters": [
  3553. {
  3554. "name": "directory",
  3555. "in": "query",
  3556. "schema": {
  3557. "type": "string"
  3558. },
  3559. "required": false
  3560. },
  3561. {
  3562. "name": "workspace",
  3563. "in": "query",
  3564. "schema": {
  3565. "type": "string"
  3566. },
  3567. "required": false
  3568. }
  3569. ],
  3570. "responses": {
  3571. "200": {
  3572. "description": "List of projects",
  3573. "content": {
  3574. "application/json": {
  3575. "schema": {
  3576. "type": "array",
  3577. "items": {
  3578. "$ref": "#/components/schemas/Project"
  3579. },
  3580. "description": "List of projects"
  3581. }
  3582. }
  3583. }
  3584. },
  3585. "400": {
  3586. "description": "Bad request",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/BadRequestError"
  3591. }
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "description": "Get a list of projects that have been opened with OpenCode.",
  3597. "summary": "List all projects",
  3598. "x-codeSamples": [
  3599. {
  3600. "lang": "js",
  3601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3602. }
  3603. ]
  3604. }
  3605. },
  3606. "/project/current": {
  3607. "get": {
  3608. "tags": ["project"],
  3609. "operationId": "project.current",
  3610. "parameters": [
  3611. {
  3612. "name": "directory",
  3613. "in": "query",
  3614. "schema": {
  3615. "type": "string"
  3616. },
  3617. "required": false
  3618. },
  3619. {
  3620. "name": "workspace",
  3621. "in": "query",
  3622. "schema": {
  3623. "type": "string"
  3624. },
  3625. "required": false
  3626. }
  3627. ],
  3628. "responses": {
  3629. "200": {
  3630. "description": "Current project information",
  3631. "content": {
  3632. "application/json": {
  3633. "schema": {
  3634. "$ref": "#/components/schemas/Project"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Retrieve the currently active project that OpenCode is working with.",
  3651. "summary": "Get current project",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/git/init": {
  3661. "post": {
  3662. "tags": ["project"],
  3663. "operationId": "project.initGit",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Project information after git initialization",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Create a git repository for the current project and return the refreshed project info.",
  3705. "summary": "Initialize git repository",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/{projectID}": {
  3715. "patch": {
  3716. "tags": ["project"],
  3717. "operationId": "project.update",
  3718. "parameters": [
  3719. {
  3720. "name": "projectID",
  3721. "in": "path",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": true
  3726. },
  3727. {
  3728. "name": "directory",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. },
  3735. {
  3736. "name": "workspace",
  3737. "in": "query",
  3738. "schema": {
  3739. "type": "string"
  3740. },
  3741. "required": false
  3742. }
  3743. ],
  3744. "responses": {
  3745. "200": {
  3746. "description": "Updated project information",
  3747. "content": {
  3748. "application/json": {
  3749. "schema": {
  3750. "$ref": "#/components/schemas/Project"
  3751. }
  3752. }
  3753. }
  3754. },
  3755. "400": {
  3756. "description": "BadRequest | InvalidRequestError",
  3757. "content": {
  3758. "application/json": {
  3759. "schema": {
  3760. "anyOf": [
  3761. {
  3762. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3763. },
  3764. {
  3765. "$ref": "#/components/schemas/InvalidRequestError"
  3766. }
  3767. ]
  3768. }
  3769. }
  3770. }
  3771. },
  3772. "404": {
  3773. "description": "ProjectNotFoundError",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "$ref": "#/components/schemas/ProjectNotFoundError"
  3778. }
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "description": "Update project properties such as name, icon, and commands.",
  3784. "summary": "Update project",
  3785. "requestBody": {
  3786. "content": {
  3787. "application/json": {
  3788. "schema": {
  3789. "type": "object",
  3790. "properties": {
  3791. "name": {
  3792. "type": "string"
  3793. },
  3794. "icon": {
  3795. "type": "object",
  3796. "properties": {
  3797. "url": {
  3798. "type": "string"
  3799. },
  3800. "override": {
  3801. "type": "string"
  3802. },
  3803. "color": {
  3804. "type": "string"
  3805. }
  3806. },
  3807. "additionalProperties": false
  3808. },
  3809. "commands": {
  3810. "type": "object",
  3811. "properties": {
  3812. "start": {
  3813. "type": "string",
  3814. "description": "Startup script to run when creating a new workspace (worktree)"
  3815. }
  3816. },
  3817. "additionalProperties": false
  3818. }
  3819. },
  3820. "additionalProperties": false
  3821. }
  3822. }
  3823. }
  3824. },
  3825. "x-codeSamples": [
  3826. {
  3827. "lang": "js",
  3828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3829. }
  3830. ]
  3831. }
  3832. },
  3833. "/project/{projectID}/directories": {
  3834. "get": {
  3835. "tags": ["project"],
  3836. "operationId": "project.directories",
  3837. "parameters": [
  3838. {
  3839. "name": "projectID",
  3840. "in": "path",
  3841. "schema": {
  3842. "type": "string"
  3843. },
  3844. "required": true
  3845. },
  3846. {
  3847. "name": "directory",
  3848. "in": "query",
  3849. "schema": {
  3850. "type": "string"
  3851. },
  3852. "required": false
  3853. },
  3854. {
  3855. "name": "workspace",
  3856. "in": "query",
  3857. "schema": {
  3858. "type": "string"
  3859. },
  3860. "required": false
  3861. }
  3862. ],
  3863. "responses": {
  3864. "200": {
  3865. "description": "Project directories",
  3866. "content": {
  3867. "application/json": {
  3868. "schema": {
  3869. "$ref": "#/components/schemas/ProjectDirectories"
  3870. }
  3871. }
  3872. }
  3873. },
  3874. "400": {
  3875. "description": "Bad request",
  3876. "content": {
  3877. "application/json": {
  3878. "schema": {
  3879. "$ref": "#/components/schemas/BadRequestError"
  3880. }
  3881. }
  3882. }
  3883. }
  3884. },
  3885. "description": "List known local absolute directories for a project.",
  3886. "summary": "List project directories",
  3887. "x-codeSamples": [
  3888. {
  3889. "lang": "js",
  3890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3891. }
  3892. ]
  3893. }
  3894. },
  3895. "/experimental/project/{projectID}/copy": {
  3896. "post": {
  3897. "tags": ["projectCopy"],
  3898. "operationId": "experimental.projectCopy.create",
  3899. "parameters": [
  3900. {
  3901. "name": "projectID",
  3902. "in": "path",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": true
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project copy created",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectCopyCopy"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "ProjectCopyError | InvalidRequestError",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "anyOf": [
  3934. {
  3935. "$ref": "#/components/schemas/ProjectCopyError"
  3936. },
  3937. {
  3938. "$ref": "#/components/schemas/InvalidRequestError"
  3939. }
  3940. ]
  3941. }
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "description": "Create a local physical copy of a project using the selected strategy.",
  3947. "summary": "Create project copy",
  3948. "requestBody": {
  3949. "content": {
  3950. "application/json": {
  3951. "schema": {
  3952. "type": "object",
  3953. "properties": {
  3954. "strategy": {
  3955. "type": "string",
  3956. "enum": ["git_worktree"]
  3957. },
  3958. "directory": {
  3959. "type": "string"
  3960. },
  3961. "name": {
  3962. "type": "string"
  3963. },
  3964. "context": {
  3965. "type": "string"
  3966. }
  3967. },
  3968. "required": ["strategy", "directory"],
  3969. "additionalProperties": false
  3970. }
  3971. }
  3972. }
  3973. },
  3974. "x-codeSamples": [
  3975. {
  3976. "lang": "js",
  3977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3978. }
  3979. ]
  3980. },
  3981. "delete": {
  3982. "tags": ["projectCopy"],
  3983. "operationId": "experimental.projectCopy.remove",
  3984. "parameters": [
  3985. {
  3986. "name": "projectID",
  3987. "in": "path",
  3988. "schema": {
  3989. "type": "string"
  3990. },
  3991. "required": true
  3992. },
  3993. {
  3994. "name": "workspace",
  3995. "in": "query",
  3996. "schema": {
  3997. "type": "string"
  3998. },
  3999. "required": false
  4000. }
  4001. ],
  4002. "responses": {
  4003. "204": {
  4004. "description": "Project copy removed"
  4005. },
  4006. "400": {
  4007. "description": "ProjectCopyError | InvalidRequestError",
  4008. "content": {
  4009. "application/json": {
  4010. "schema": {
  4011. "anyOf": [
  4012. {
  4013. "$ref": "#/components/schemas/ProjectCopyError"
  4014. },
  4015. {
  4016. "$ref": "#/components/schemas/InvalidRequestError"
  4017. }
  4018. ]
  4019. }
  4020. }
  4021. }
  4022. }
  4023. },
  4024. "description": "Remove a local physical copy of a project using the selected strategy.",
  4025. "summary": "Remove project copy",
  4026. "requestBody": {
  4027. "content": {
  4028. "application/json": {
  4029. "schema": {
  4030. "type": "object",
  4031. "properties": {
  4032. "directory": {
  4033. "type": "string"
  4034. },
  4035. "force": {
  4036. "type": "boolean"
  4037. }
  4038. },
  4039. "required": ["directory", "force"],
  4040. "additionalProperties": false
  4041. }
  4042. }
  4043. }
  4044. },
  4045. "x-codeSamples": [
  4046. {
  4047. "lang": "js",
  4048. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  4049. }
  4050. ]
  4051. }
  4052. },
  4053. "/experimental/project/{projectID}/copy/refresh": {
  4054. "post": {
  4055. "tags": ["projectCopy"],
  4056. "operationId": "experimental.projectCopy.refresh",
  4057. "parameters": [
  4058. {
  4059. "name": "projectID",
  4060. "in": "path",
  4061. "schema": {
  4062. "type": "string"
  4063. },
  4064. "required": true
  4065. },
  4066. {
  4067. "name": "directory",
  4068. "in": "query",
  4069. "schema": {
  4070. "type": "string"
  4071. },
  4072. "required": false
  4073. },
  4074. {
  4075. "name": "workspace",
  4076. "in": "query",
  4077. "schema": {
  4078. "type": "string"
  4079. },
  4080. "required": false
  4081. }
  4082. ],
  4083. "responses": {
  4084. "204": {
  4085. "description": "Project copies refreshed"
  4086. },
  4087. "400": {
  4088. "description": "ProjectCopyError | InvalidRequestError",
  4089. "content": {
  4090. "application/json": {
  4091. "schema": {
  4092. "anyOf": [
  4093. {
  4094. "$ref": "#/components/schemas/ProjectCopyError"
  4095. },
  4096. {
  4097. "$ref": "#/components/schemas/InvalidRequestError"
  4098. }
  4099. ]
  4100. }
  4101. }
  4102. }
  4103. }
  4104. },
  4105. "description": "Discover local project copies using one or all configured strategies.",
  4106. "summary": "Refresh project copies",
  4107. "x-codeSamples": [
  4108. {
  4109. "lang": "js",
  4110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  4111. }
  4112. ]
  4113. }
  4114. },
  4115. "/pty/shells": {
  4116. "get": {
  4117. "tags": ["pty"],
  4118. "operationId": "pty.shells",
  4119. "parameters": [
  4120. {
  4121. "name": "directory",
  4122. "in": "query",
  4123. "schema": {
  4124. "type": "string"
  4125. },
  4126. "required": false
  4127. },
  4128. {
  4129. "name": "workspace",
  4130. "in": "query",
  4131. "schema": {
  4132. "type": "string"
  4133. },
  4134. "required": false
  4135. }
  4136. ],
  4137. "responses": {
  4138. "200": {
  4139. "description": "List of shells",
  4140. "content": {
  4141. "application/json": {
  4142. "schema": {
  4143. "type": "array",
  4144. "items": {
  4145. "type": "object",
  4146. "properties": {
  4147. "path": {
  4148. "type": "string"
  4149. },
  4150. "name": {
  4151. "type": "string"
  4152. },
  4153. "acceptable": {
  4154. "type": "boolean"
  4155. }
  4156. },
  4157. "required": ["path", "name", "acceptable"],
  4158. "additionalProperties": false
  4159. },
  4160. "description": "List of shells"
  4161. }
  4162. }
  4163. }
  4164. },
  4165. "400": {
  4166. "description": "Bad request",
  4167. "content": {
  4168. "application/json": {
  4169. "schema": {
  4170. "$ref": "#/components/schemas/BadRequestError"
  4171. }
  4172. }
  4173. }
  4174. }
  4175. },
  4176. "description": "Get a list of available shells on the system.",
  4177. "summary": "List available shells",
  4178. "x-codeSamples": [
  4179. {
  4180. "lang": "js",
  4181. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4182. }
  4183. ]
  4184. }
  4185. },
  4186. "/pty": {
  4187. "get": {
  4188. "tags": ["pty"],
  4189. "operationId": "pty.list",
  4190. "parameters": [
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "List of sessions",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "type": "array",
  4215. "items": {
  4216. "$ref": "#/components/schemas/Pty"
  4217. },
  4218. "description": "List of sessions"
  4219. }
  4220. }
  4221. }
  4222. },
  4223. "400": {
  4224. "description": "Bad request",
  4225. "content": {
  4226. "application/json": {
  4227. "schema": {
  4228. "$ref": "#/components/schemas/BadRequestError"
  4229. }
  4230. }
  4231. }
  4232. }
  4233. },
  4234. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4235. "summary": "List PTY sessions",
  4236. "x-codeSamples": [
  4237. {
  4238. "lang": "js",
  4239. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4240. }
  4241. ]
  4242. },
  4243. "post": {
  4244. "tags": ["pty"],
  4245. "operationId": "pty.create",
  4246. "parameters": [
  4247. {
  4248. "name": "directory",
  4249. "in": "query",
  4250. "schema": {
  4251. "type": "string"
  4252. },
  4253. "required": false
  4254. },
  4255. {
  4256. "name": "workspace",
  4257. "in": "query",
  4258. "schema": {
  4259. "type": "string"
  4260. },
  4261. "required": false
  4262. }
  4263. ],
  4264. "responses": {
  4265. "200": {
  4266. "description": "Created session",
  4267. "content": {
  4268. "application/json": {
  4269. "schema": {
  4270. "$ref": "#/components/schemas/Pty"
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "400": {
  4276. "description": "BadRequest | InvalidRequestError",
  4277. "content": {
  4278. "application/json": {
  4279. "schema": {
  4280. "anyOf": [
  4281. {
  4282. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4283. },
  4284. {
  4285. "$ref": "#/components/schemas/InvalidRequestError"
  4286. }
  4287. ]
  4288. }
  4289. }
  4290. }
  4291. }
  4292. },
  4293. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4294. "summary": "Create PTY session",
  4295. "requestBody": {
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "object",
  4300. "properties": {
  4301. "command": {
  4302. "type": "string"
  4303. },
  4304. "args": {
  4305. "type": "array",
  4306. "items": {
  4307. "type": "string"
  4308. }
  4309. },
  4310. "cwd": {
  4311. "type": "string"
  4312. },
  4313. "title": {
  4314. "type": "string"
  4315. },
  4316. "env": {
  4317. "type": "object",
  4318. "additionalProperties": {
  4319. "type": "string"
  4320. }
  4321. }
  4322. },
  4323. "additionalProperties": false
  4324. }
  4325. }
  4326. }
  4327. },
  4328. "x-codeSamples": [
  4329. {
  4330. "lang": "js",
  4331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4332. }
  4333. ]
  4334. }
  4335. },
  4336. "/pty/{ptyID}": {
  4337. "get": {
  4338. "tags": ["pty"],
  4339. "operationId": "pty.get",
  4340. "parameters": [
  4341. {
  4342. "name": "ptyID",
  4343. "in": "path",
  4344. "schema": {
  4345. "type": "string",
  4346. "pattern": "^pty"
  4347. },
  4348. "required": true
  4349. },
  4350. {
  4351. "name": "directory",
  4352. "in": "query",
  4353. "schema": {
  4354. "type": "string"
  4355. },
  4356. "required": false
  4357. },
  4358. {
  4359. "name": "workspace",
  4360. "in": "query",
  4361. "schema": {
  4362. "type": "string"
  4363. },
  4364. "required": false
  4365. }
  4366. ],
  4367. "responses": {
  4368. "200": {
  4369. "description": "Session info",
  4370. "content": {
  4371. "application/json": {
  4372. "schema": {
  4373. "$ref": "#/components/schemas/Pty"
  4374. }
  4375. }
  4376. }
  4377. },
  4378. "400": {
  4379. "description": "Bad request",
  4380. "content": {
  4381. "application/json": {
  4382. "schema": {
  4383. "$ref": "#/components/schemas/BadRequestError"
  4384. }
  4385. }
  4386. }
  4387. },
  4388. "404": {
  4389. "description": "PtyNotFoundError",
  4390. "content": {
  4391. "application/json": {
  4392. "schema": {
  4393. "$ref": "#/components/schemas/PtyNotFoundError"
  4394. }
  4395. }
  4396. }
  4397. }
  4398. },
  4399. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4400. "summary": "Get PTY session",
  4401. "x-codeSamples": [
  4402. {
  4403. "lang": "js",
  4404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4405. }
  4406. ]
  4407. },
  4408. "put": {
  4409. "tags": ["pty"],
  4410. "operationId": "pty.update",
  4411. "parameters": [
  4412. {
  4413. "name": "ptyID",
  4414. "in": "path",
  4415. "schema": {
  4416. "type": "string",
  4417. "pattern": "^pty"
  4418. },
  4419. "required": true
  4420. },
  4421. {
  4422. "name": "directory",
  4423. "in": "query",
  4424. "schema": {
  4425. "type": "string"
  4426. },
  4427. "required": false
  4428. },
  4429. {
  4430. "name": "workspace",
  4431. "in": "query",
  4432. "schema": {
  4433. "type": "string"
  4434. },
  4435. "required": false
  4436. }
  4437. ],
  4438. "responses": {
  4439. "200": {
  4440. "description": "Updated session",
  4441. "content": {
  4442. "application/json": {
  4443. "schema": {
  4444. "$ref": "#/components/schemas/Pty"
  4445. }
  4446. }
  4447. }
  4448. },
  4449. "400": {
  4450. "description": "BadRequest | InvalidRequestError",
  4451. "content": {
  4452. "application/json": {
  4453. "schema": {
  4454. "anyOf": [
  4455. {
  4456. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4457. },
  4458. {
  4459. "$ref": "#/components/schemas/InvalidRequestError"
  4460. }
  4461. ]
  4462. }
  4463. }
  4464. }
  4465. },
  4466. "404": {
  4467. "description": "PtyNotFoundError",
  4468. "content": {
  4469. "application/json": {
  4470. "schema": {
  4471. "$ref": "#/components/schemas/PtyNotFoundError"
  4472. }
  4473. }
  4474. }
  4475. }
  4476. },
  4477. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4478. "summary": "Update PTY session",
  4479. "requestBody": {
  4480. "content": {
  4481. "application/json": {
  4482. "schema": {
  4483. "type": "object",
  4484. "properties": {
  4485. "title": {
  4486. "type": "string"
  4487. },
  4488. "size": {
  4489. "type": "object",
  4490. "properties": {
  4491. "rows": {
  4492. "type": "integer",
  4493. "exclusiveMinimum": 0
  4494. },
  4495. "cols": {
  4496. "type": "integer",
  4497. "exclusiveMinimum": 0
  4498. }
  4499. },
  4500. "required": ["rows", "cols"],
  4501. "additionalProperties": false
  4502. }
  4503. },
  4504. "additionalProperties": false
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "x-codeSamples": [
  4510. {
  4511. "lang": "js",
  4512. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4513. }
  4514. ]
  4515. },
  4516. "delete": {
  4517. "tags": ["pty"],
  4518. "operationId": "pty.remove",
  4519. "parameters": [
  4520. {
  4521. "name": "ptyID",
  4522. "in": "path",
  4523. "schema": {
  4524. "type": "string",
  4525. "pattern": "^pty"
  4526. },
  4527. "required": true
  4528. },
  4529. {
  4530. "name": "directory",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. },
  4537. {
  4538. "name": "workspace",
  4539. "in": "query",
  4540. "schema": {
  4541. "type": "string"
  4542. },
  4543. "required": false
  4544. }
  4545. ],
  4546. "responses": {
  4547. "200": {
  4548. "description": "Session removed",
  4549. "content": {
  4550. "application/json": {
  4551. "schema": {
  4552. "type": "boolean",
  4553. "description": "Session removed"
  4554. }
  4555. }
  4556. }
  4557. },
  4558. "400": {
  4559. "description": "Bad request",
  4560. "content": {
  4561. "application/json": {
  4562. "schema": {
  4563. "$ref": "#/components/schemas/BadRequestError"
  4564. }
  4565. }
  4566. }
  4567. },
  4568. "404": {
  4569. "description": "PtyNotFoundError",
  4570. "content": {
  4571. "application/json": {
  4572. "schema": {
  4573. "$ref": "#/components/schemas/PtyNotFoundError"
  4574. }
  4575. }
  4576. }
  4577. }
  4578. },
  4579. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4580. "summary": "Remove PTY session",
  4581. "x-codeSamples": [
  4582. {
  4583. "lang": "js",
  4584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4585. }
  4586. ]
  4587. }
  4588. },
  4589. "/pty/{ptyID}/connect-token": {
  4590. "post": {
  4591. "tags": ["pty"],
  4592. "operationId": "pty.connectToken",
  4593. "parameters": [
  4594. {
  4595. "name": "ptyID",
  4596. "in": "path",
  4597. "schema": {
  4598. "type": "string",
  4599. "pattern": "^pty"
  4600. },
  4601. "required": true
  4602. },
  4603. {
  4604. "name": "directory",
  4605. "in": "query",
  4606. "schema": {
  4607. "type": "string"
  4608. },
  4609. "required": false
  4610. },
  4611. {
  4612. "name": "workspace",
  4613. "in": "query",
  4614. "schema": {
  4615. "type": "string"
  4616. },
  4617. "required": false
  4618. }
  4619. ],
  4620. "responses": {
  4621. "200": {
  4622. "description": "WebSocket connect token",
  4623. "content": {
  4624. "application/json": {
  4625. "schema": {
  4626. "type": "object",
  4627. "properties": {
  4628. "ticket": {
  4629. "type": "string"
  4630. },
  4631. "expires_in": {
  4632. "type": "integer",
  4633. "exclusiveMinimum": 0
  4634. }
  4635. },
  4636. "required": ["ticket", "expires_in"],
  4637. "additionalProperties": false,
  4638. "description": "WebSocket connect token"
  4639. }
  4640. }
  4641. }
  4642. },
  4643. "400": {
  4644. "description": "Bad request",
  4645. "content": {
  4646. "application/json": {
  4647. "schema": {
  4648. "$ref": "#/components/schemas/BadRequestError"
  4649. }
  4650. }
  4651. }
  4652. },
  4653. "403": {
  4654. "description": "PtyForbiddenError",
  4655. "content": {
  4656. "application/json": {
  4657. "schema": {
  4658. "$ref": "#/components/schemas/PtyForbiddenError"
  4659. }
  4660. }
  4661. }
  4662. },
  4663. "404": {
  4664. "description": "PtyNotFoundError",
  4665. "content": {
  4666. "application/json": {
  4667. "schema": {
  4668. "$ref": "#/components/schemas/PtyNotFoundError"
  4669. }
  4670. }
  4671. }
  4672. }
  4673. },
  4674. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4675. "summary": "Create PTY WebSocket token",
  4676. "x-codeSamples": [
  4677. {
  4678. "lang": "js",
  4679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4680. }
  4681. ]
  4682. }
  4683. },
  4684. "/question": {
  4685. "get": {
  4686. "tags": ["question"],
  4687. "operationId": "question.list",
  4688. "parameters": [
  4689. {
  4690. "name": "directory",
  4691. "in": "query",
  4692. "schema": {
  4693. "type": "string"
  4694. },
  4695. "required": false
  4696. },
  4697. {
  4698. "name": "workspace",
  4699. "in": "query",
  4700. "schema": {
  4701. "type": "string"
  4702. },
  4703. "required": false
  4704. }
  4705. ],
  4706. "responses": {
  4707. "200": {
  4708. "description": "List of pending questions",
  4709. "content": {
  4710. "application/json": {
  4711. "schema": {
  4712. "type": "array",
  4713. "items": {
  4714. "$ref": "#/components/schemas/QuestionRequest"
  4715. },
  4716. "description": "List of pending questions"
  4717. }
  4718. }
  4719. }
  4720. },
  4721. "400": {
  4722. "description": "Bad request",
  4723. "content": {
  4724. "application/json": {
  4725. "schema": {
  4726. "$ref": "#/components/schemas/BadRequestError"
  4727. }
  4728. }
  4729. }
  4730. }
  4731. },
  4732. "description": "Get all pending question requests across all sessions.",
  4733. "summary": "List pending questions",
  4734. "x-codeSamples": [
  4735. {
  4736. "lang": "js",
  4737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4738. }
  4739. ]
  4740. }
  4741. },
  4742. "/question/{requestID}/reply": {
  4743. "post": {
  4744. "tags": ["question"],
  4745. "operationId": "question.reply",
  4746. "parameters": [
  4747. {
  4748. "name": "requestID",
  4749. "in": "path",
  4750. "schema": {
  4751. "type": "string",
  4752. "pattern": "^que"
  4753. },
  4754. "required": true
  4755. },
  4756. {
  4757. "name": "directory",
  4758. "in": "query",
  4759. "schema": {
  4760. "type": "string"
  4761. },
  4762. "required": false
  4763. },
  4764. {
  4765. "name": "workspace",
  4766. "in": "query",
  4767. "schema": {
  4768. "type": "string"
  4769. },
  4770. "required": false
  4771. }
  4772. ],
  4773. "responses": {
  4774. "200": {
  4775. "description": "Question answered successfully",
  4776. "content": {
  4777. "application/json": {
  4778. "schema": {
  4779. "type": "boolean",
  4780. "description": "Question answered successfully"
  4781. }
  4782. }
  4783. }
  4784. },
  4785. "400": {
  4786. "description": "BadRequest | InvalidRequestError",
  4787. "content": {
  4788. "application/json": {
  4789. "schema": {
  4790. "anyOf": [
  4791. {
  4792. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4793. },
  4794. {
  4795. "$ref": "#/components/schemas/InvalidRequestError"
  4796. }
  4797. ]
  4798. }
  4799. }
  4800. }
  4801. },
  4802. "404": {
  4803. "description": "QuestionNotFoundError",
  4804. "content": {
  4805. "application/json": {
  4806. "schema": {
  4807. "$ref": "#/components/schemas/QuestionNotFoundError"
  4808. }
  4809. }
  4810. }
  4811. }
  4812. },
  4813. "description": "Provide answers to a question request from the AI assistant.",
  4814. "summary": "Reply to question request",
  4815. "requestBody": {
  4816. "content": {
  4817. "application/json": {
  4818. "schema": {
  4819. "type": "object",
  4820. "properties": {
  4821. "answers": {
  4822. "type": "array",
  4823. "items": {
  4824. "$ref": "#/components/schemas/QuestionAnswer"
  4825. },
  4826. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4827. }
  4828. },
  4829. "required": ["answers"],
  4830. "additionalProperties": false
  4831. }
  4832. }
  4833. }
  4834. },
  4835. "x-codeSamples": [
  4836. {
  4837. "lang": "js",
  4838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4839. }
  4840. ]
  4841. }
  4842. },
  4843. "/question/{requestID}/reject": {
  4844. "post": {
  4845. "tags": ["question"],
  4846. "operationId": "question.reject",
  4847. "parameters": [
  4848. {
  4849. "name": "requestID",
  4850. "in": "path",
  4851. "schema": {
  4852. "type": "string",
  4853. "pattern": "^que"
  4854. },
  4855. "required": true
  4856. },
  4857. {
  4858. "name": "directory",
  4859. "in": "query",
  4860. "schema": {
  4861. "type": "string"
  4862. },
  4863. "required": false
  4864. },
  4865. {
  4866. "name": "workspace",
  4867. "in": "query",
  4868. "schema": {
  4869. "type": "string"
  4870. },
  4871. "required": false
  4872. }
  4873. ],
  4874. "responses": {
  4875. "200": {
  4876. "description": "Question rejected successfully",
  4877. "content": {
  4878. "application/json": {
  4879. "schema": {
  4880. "type": "boolean",
  4881. "description": "Question rejected successfully"
  4882. }
  4883. }
  4884. }
  4885. },
  4886. "400": {
  4887. "description": "BadRequest | InvalidRequestError",
  4888. "content": {
  4889. "application/json": {
  4890. "schema": {
  4891. "anyOf": [
  4892. {
  4893. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4894. },
  4895. {
  4896. "$ref": "#/components/schemas/InvalidRequestError"
  4897. }
  4898. ]
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "404": {
  4904. "description": "QuestionNotFoundError",
  4905. "content": {
  4906. "application/json": {
  4907. "schema": {
  4908. "$ref": "#/components/schemas/QuestionNotFoundError"
  4909. }
  4910. }
  4911. }
  4912. }
  4913. },
  4914. "description": "Reject a question request from the AI assistant.",
  4915. "summary": "Reject question request",
  4916. "x-codeSamples": [
  4917. {
  4918. "lang": "js",
  4919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4920. }
  4921. ]
  4922. }
  4923. },
  4924. "/permission": {
  4925. "get": {
  4926. "tags": ["permission"],
  4927. "operationId": "permission.list",
  4928. "parameters": [
  4929. {
  4930. "name": "directory",
  4931. "in": "query",
  4932. "schema": {
  4933. "type": "string"
  4934. },
  4935. "required": false
  4936. },
  4937. {
  4938. "name": "workspace",
  4939. "in": "query",
  4940. "schema": {
  4941. "type": "string"
  4942. },
  4943. "required": false
  4944. }
  4945. ],
  4946. "responses": {
  4947. "200": {
  4948. "description": "List of pending permissions",
  4949. "content": {
  4950. "application/json": {
  4951. "schema": {
  4952. "type": "array",
  4953. "items": {
  4954. "$ref": "#/components/schemas/PermissionRequest"
  4955. },
  4956. "description": "List of pending permissions"
  4957. }
  4958. }
  4959. }
  4960. },
  4961. "400": {
  4962. "description": "Bad request",
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "$ref": "#/components/schemas/BadRequestError"
  4967. }
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "description": "Get all pending permission requests across all sessions.",
  4973. "summary": "List pending permissions",
  4974. "x-codeSamples": [
  4975. {
  4976. "lang": "js",
  4977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4978. }
  4979. ]
  4980. }
  4981. },
  4982. "/permission/{requestID}/reply": {
  4983. "post": {
  4984. "tags": ["permission"],
  4985. "operationId": "permission.reply",
  4986. "parameters": [
  4987. {
  4988. "name": "requestID",
  4989. "in": "path",
  4990. "schema": {
  4991. "type": "string",
  4992. "pattern": "^per"
  4993. },
  4994. "required": true
  4995. },
  4996. {
  4997. "name": "directory",
  4998. "in": "query",
  4999. "schema": {
  5000. "type": "string"
  5001. },
  5002. "required": false
  5003. },
  5004. {
  5005. "name": "workspace",
  5006. "in": "query",
  5007. "schema": {
  5008. "type": "string"
  5009. },
  5010. "required": false
  5011. }
  5012. ],
  5013. "responses": {
  5014. "200": {
  5015. "description": "Permission processed successfully",
  5016. "content": {
  5017. "application/json": {
  5018. "schema": {
  5019. "type": "boolean",
  5020. "description": "Permission processed successfully"
  5021. }
  5022. }
  5023. }
  5024. },
  5025. "400": {
  5026. "description": "BadRequest | InvalidRequestError",
  5027. "content": {
  5028. "application/json": {
  5029. "schema": {
  5030. "anyOf": [
  5031. {
  5032. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5033. },
  5034. {
  5035. "$ref": "#/components/schemas/InvalidRequestError"
  5036. }
  5037. ]
  5038. }
  5039. }
  5040. }
  5041. },
  5042. "404": {
  5043. "description": "PermissionNotFoundError",
  5044. "content": {
  5045. "application/json": {
  5046. "schema": {
  5047. "$ref": "#/components/schemas/PermissionNotFoundError"
  5048. }
  5049. }
  5050. }
  5051. }
  5052. },
  5053. "description": "Approve or deny a permission request from the AI assistant.",
  5054. "summary": "Respond to permission request",
  5055. "requestBody": {
  5056. "content": {
  5057. "application/json": {
  5058. "schema": {
  5059. "type": "object",
  5060. "properties": {
  5061. "reply": {
  5062. "type": "string",
  5063. "enum": ["once", "always", "reject"]
  5064. },
  5065. "message": {
  5066. "type": "string"
  5067. }
  5068. },
  5069. "required": ["reply"],
  5070. "additionalProperties": false
  5071. }
  5072. }
  5073. }
  5074. },
  5075. "x-codeSamples": [
  5076. {
  5077. "lang": "js",
  5078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  5079. }
  5080. ]
  5081. }
  5082. },
  5083. "/provider": {
  5084. "get": {
  5085. "tags": ["provider"],
  5086. "operationId": "provider.list",
  5087. "parameters": [
  5088. {
  5089. "name": "directory",
  5090. "in": "query",
  5091. "schema": {
  5092. "type": "string"
  5093. },
  5094. "required": false
  5095. },
  5096. {
  5097. "name": "workspace",
  5098. "in": "query",
  5099. "schema": {
  5100. "type": "string"
  5101. },
  5102. "required": false
  5103. }
  5104. ],
  5105. "responses": {
  5106. "200": {
  5107. "description": "List of providers",
  5108. "content": {
  5109. "application/json": {
  5110. "schema": {
  5111. "type": "object",
  5112. "properties": {
  5113. "all": {
  5114. "type": "array",
  5115. "items": {
  5116. "$ref": "#/components/schemas/Provider"
  5117. }
  5118. },
  5119. "default": {
  5120. "type": "object",
  5121. "additionalProperties": {
  5122. "type": "string"
  5123. }
  5124. },
  5125. "connected": {
  5126. "type": "array",
  5127. "items": {
  5128. "type": "string"
  5129. }
  5130. }
  5131. },
  5132. "required": ["all", "default", "connected"],
  5133. "additionalProperties": false,
  5134. "description": "List of providers"
  5135. }
  5136. }
  5137. }
  5138. },
  5139. "400": {
  5140. "description": "Bad request",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/BadRequestError"
  5145. }
  5146. }
  5147. }
  5148. }
  5149. },
  5150. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5151. "summary": "List providers",
  5152. "x-codeSamples": [
  5153. {
  5154. "lang": "js",
  5155. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5156. }
  5157. ]
  5158. }
  5159. },
  5160. "/provider/auth": {
  5161. "get": {
  5162. "tags": ["provider"],
  5163. "operationId": "provider.auth",
  5164. "parameters": [
  5165. {
  5166. "name": "directory",
  5167. "in": "query",
  5168. "schema": {
  5169. "type": "string"
  5170. },
  5171. "required": false
  5172. },
  5173. {
  5174. "name": "workspace",
  5175. "in": "query",
  5176. "schema": {
  5177. "type": "string"
  5178. },
  5179. "required": false
  5180. }
  5181. ],
  5182. "responses": {
  5183. "200": {
  5184. "description": "Provider auth methods",
  5185. "content": {
  5186. "application/json": {
  5187. "schema": {
  5188. "type": "object",
  5189. "additionalProperties": {
  5190. "type": "array",
  5191. "items": {
  5192. "$ref": "#/components/schemas/ProviderAuthMethod"
  5193. }
  5194. },
  5195. "description": "Provider auth methods"
  5196. }
  5197. }
  5198. }
  5199. },
  5200. "400": {
  5201. "description": "Bad request",
  5202. "content": {
  5203. "application/json": {
  5204. "schema": {
  5205. "$ref": "#/components/schemas/BadRequestError"
  5206. }
  5207. }
  5208. }
  5209. }
  5210. },
  5211. "description": "Retrieve available authentication methods for all AI providers.",
  5212. "summary": "Get provider auth methods",
  5213. "x-codeSamples": [
  5214. {
  5215. "lang": "js",
  5216. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5217. }
  5218. ]
  5219. }
  5220. },
  5221. "/provider/{providerID}/oauth/authorize": {
  5222. "post": {
  5223. "tags": ["provider"],
  5224. "operationId": "provider.oauth.authorize",
  5225. "parameters": [
  5226. {
  5227. "name": "providerID",
  5228. "in": "path",
  5229. "schema": {
  5230. "type": "string"
  5231. },
  5232. "required": true
  5233. },
  5234. {
  5235. "name": "directory",
  5236. "in": "query",
  5237. "schema": {
  5238. "type": "string"
  5239. },
  5240. "required": false
  5241. },
  5242. {
  5243. "name": "workspace",
  5244. "in": "query",
  5245. "schema": {
  5246. "type": "string"
  5247. },
  5248. "required": false
  5249. }
  5250. ],
  5251. "responses": {
  5252. "200": {
  5253. "description": "Authorization URL and method",
  5254. "content": {
  5255. "application/json": {
  5256. "schema": {
  5257. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5258. }
  5259. }
  5260. }
  5261. },
  5262. "400": {
  5263. "description": "ProviderAuthError | InvalidRequestError",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "anyOf": [
  5268. {
  5269. "$ref": "#/components/schemas/ProviderAuthError1"
  5270. },
  5271. {
  5272. "$ref": "#/components/schemas/InvalidRequestError"
  5273. }
  5274. ]
  5275. }
  5276. }
  5277. }
  5278. }
  5279. },
  5280. "description": "Start the OAuth authorization flow for a provider.",
  5281. "summary": "Start OAuth authorization",
  5282. "requestBody": {
  5283. "content": {
  5284. "application/json": {
  5285. "schema": {
  5286. "type": "object",
  5287. "properties": {
  5288. "method": {
  5289. "type": "number",
  5290. "description": "Auth method index"
  5291. },
  5292. "inputs": {
  5293. "type": "object",
  5294. "additionalProperties": {
  5295. "type": "string"
  5296. }
  5297. }
  5298. },
  5299. "required": ["method"],
  5300. "additionalProperties": false
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "x-codeSamples": [
  5306. {
  5307. "lang": "js",
  5308. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5309. }
  5310. ]
  5311. }
  5312. },
  5313. "/provider/{providerID}/oauth/callback": {
  5314. "post": {
  5315. "tags": ["provider"],
  5316. "operationId": "provider.oauth.callback",
  5317. "parameters": [
  5318. {
  5319. "name": "providerID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string"
  5323. },
  5324. "required": true
  5325. },
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. }
  5342. ],
  5343. "responses": {
  5344. "200": {
  5345. "description": "OAuth callback processed successfully",
  5346. "content": {
  5347. "application/json": {
  5348. "schema": {
  5349. "type": "boolean",
  5350. "description": "OAuth callback processed successfully"
  5351. }
  5352. }
  5353. }
  5354. },
  5355. "400": {
  5356. "description": "ProviderAuthError | InvalidRequestError",
  5357. "content": {
  5358. "application/json": {
  5359. "schema": {
  5360. "anyOf": [
  5361. {
  5362. "$ref": "#/components/schemas/ProviderAuthError1"
  5363. },
  5364. {
  5365. "$ref": "#/components/schemas/InvalidRequestError"
  5366. }
  5367. ]
  5368. }
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "description": "Handle the OAuth callback from a provider after user authorization.",
  5374. "summary": "Handle OAuth callback",
  5375. "requestBody": {
  5376. "content": {
  5377. "application/json": {
  5378. "schema": {
  5379. "type": "object",
  5380. "properties": {
  5381. "method": {
  5382. "type": "number",
  5383. "description": "Auth method index"
  5384. },
  5385. "code": {
  5386. "type": "string"
  5387. }
  5388. },
  5389. "required": ["method"],
  5390. "additionalProperties": false
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "x-codeSamples": [
  5396. {
  5397. "lang": "js",
  5398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5399. }
  5400. ]
  5401. }
  5402. },
  5403. "/session": {
  5404. "get": {
  5405. "tags": ["session"],
  5406. "operationId": "session.list",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. },
  5424. {
  5425. "name": "scope",
  5426. "in": "query",
  5427. "schema": {
  5428. "type": "string",
  5429. "enum": ["project"]
  5430. },
  5431. "required": false
  5432. },
  5433. {
  5434. "name": "path",
  5435. "in": "query",
  5436. "schema": {
  5437. "type": "string"
  5438. },
  5439. "required": false
  5440. },
  5441. {
  5442. "name": "roots",
  5443. "in": "query",
  5444. "schema": {
  5445. "anyOf": [
  5446. {
  5447. "type": "boolean"
  5448. },
  5449. {
  5450. "type": "string",
  5451. "enum": ["true", "false"]
  5452. }
  5453. ]
  5454. },
  5455. "required": false
  5456. },
  5457. {
  5458. "name": "start",
  5459. "in": "query",
  5460. "schema": {
  5461. "type": "number"
  5462. },
  5463. "required": false
  5464. },
  5465. {
  5466. "name": "search",
  5467. "in": "query",
  5468. "schema": {
  5469. "type": "string"
  5470. },
  5471. "required": false
  5472. },
  5473. {
  5474. "name": "limit",
  5475. "in": "query",
  5476. "schema": {
  5477. "type": "number"
  5478. },
  5479. "required": false
  5480. }
  5481. ],
  5482. "responses": {
  5483. "200": {
  5484. "description": "List of sessions",
  5485. "content": {
  5486. "application/json": {
  5487. "schema": {
  5488. "type": "array",
  5489. "items": {
  5490. "$ref": "#/components/schemas/Session"
  5491. },
  5492. "description": "List of sessions"
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "400": {
  5498. "description": "Bad request",
  5499. "content": {
  5500. "application/json": {
  5501. "schema": {
  5502. "$ref": "#/components/schemas/BadRequestError"
  5503. }
  5504. }
  5505. }
  5506. }
  5507. },
  5508. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5509. "summary": "List sessions",
  5510. "x-codeSamples": [
  5511. {
  5512. "lang": "js",
  5513. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5514. }
  5515. ]
  5516. },
  5517. "post": {
  5518. "tags": ["session"],
  5519. "operationId": "session.create",
  5520. "parameters": [
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "Successfully created session",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5568. "summary": "Create session",
  5569. "requestBody": {
  5570. "content": {
  5571. "application/json": {
  5572. "schema": {
  5573. "type": "object",
  5574. "properties": {
  5575. "parentID": {
  5576. "type": "string",
  5577. "pattern": "^ses"
  5578. },
  5579. "title": {
  5580. "type": "string"
  5581. },
  5582. "agent": {
  5583. "type": "string"
  5584. },
  5585. "model": {
  5586. "type": "object",
  5587. "properties": {
  5588. "id": {
  5589. "type": "string"
  5590. },
  5591. "providerID": {
  5592. "type": "string"
  5593. },
  5594. "variant": {
  5595. "type": "string"
  5596. }
  5597. },
  5598. "required": ["id", "providerID"],
  5599. "additionalProperties": false
  5600. },
  5601. "metadata": {
  5602. "type": "object"
  5603. },
  5604. "permission": {
  5605. "$ref": "#/components/schemas/PermissionRuleset"
  5606. },
  5607. "workspaceID": {
  5608. "type": "string",
  5609. "pattern": "^wrk"
  5610. }
  5611. },
  5612. "additionalProperties": false
  5613. }
  5614. }
  5615. }
  5616. },
  5617. "x-codeSamples": [
  5618. {
  5619. "lang": "js",
  5620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5621. }
  5622. ]
  5623. }
  5624. },
  5625. "/session/status": {
  5626. "get": {
  5627. "tags": ["session"],
  5628. "operationId": "session.status",
  5629. "parameters": [
  5630. {
  5631. "name": "directory",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. },
  5638. {
  5639. "name": "workspace",
  5640. "in": "query",
  5641. "schema": {
  5642. "type": "string"
  5643. },
  5644. "required": false
  5645. }
  5646. ],
  5647. "responses": {
  5648. "200": {
  5649. "description": "Get session status",
  5650. "content": {
  5651. "application/json": {
  5652. "schema": {
  5653. "type": "object",
  5654. "additionalProperties": {
  5655. "$ref": "#/components/schemas/SessionStatus"
  5656. },
  5657. "description": "Get session status"
  5658. }
  5659. }
  5660. }
  5661. },
  5662. "400": {
  5663. "description": "BadRequest | InvalidRequestError",
  5664. "content": {
  5665. "application/json": {
  5666. "schema": {
  5667. "anyOf": [
  5668. {
  5669. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5670. },
  5671. {
  5672. "$ref": "#/components/schemas/InvalidRequestError"
  5673. }
  5674. ]
  5675. }
  5676. }
  5677. }
  5678. }
  5679. },
  5680. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5681. "summary": "Get session status",
  5682. "x-codeSamples": [
  5683. {
  5684. "lang": "js",
  5685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5686. }
  5687. ]
  5688. }
  5689. },
  5690. "/session/{sessionID}": {
  5691. "get": {
  5692. "tags": ["session"],
  5693. "operationId": "session.get",
  5694. "parameters": [
  5695. {
  5696. "name": "sessionID",
  5697. "in": "path",
  5698. "schema": {
  5699. "type": "string",
  5700. "pattern": "^ses"
  5701. },
  5702. "required": true
  5703. },
  5704. {
  5705. "name": "directory",
  5706. "in": "query",
  5707. "schema": {
  5708. "type": "string"
  5709. },
  5710. "required": false
  5711. },
  5712. {
  5713. "name": "workspace",
  5714. "in": "query",
  5715. "schema": {
  5716. "type": "string"
  5717. },
  5718. "required": false
  5719. }
  5720. ],
  5721. "responses": {
  5722. "200": {
  5723. "description": "Get session",
  5724. "content": {
  5725. "application/json": {
  5726. "schema": {
  5727. "$ref": "#/components/schemas/Session"
  5728. }
  5729. }
  5730. }
  5731. },
  5732. "400": {
  5733. "description": "BadRequest | InvalidRequestError",
  5734. "content": {
  5735. "application/json": {
  5736. "schema": {
  5737. "anyOf": [
  5738. {
  5739. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5740. },
  5741. {
  5742. "$ref": "#/components/schemas/InvalidRequestError"
  5743. }
  5744. ]
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "404": {
  5750. "description": "NotFoundError",
  5751. "content": {
  5752. "application/json": {
  5753. "schema": {
  5754. "$ref": "#/components/schemas/NotFoundError"
  5755. }
  5756. }
  5757. }
  5758. }
  5759. },
  5760. "description": "Retrieve detailed information about a specific OpenCode session.",
  5761. "summary": "Get session",
  5762. "x-codeSamples": [
  5763. {
  5764. "lang": "js",
  5765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5766. }
  5767. ]
  5768. },
  5769. "delete": {
  5770. "tags": ["session"],
  5771. "operationId": "session.delete",
  5772. "parameters": [
  5773. {
  5774. "name": "sessionID",
  5775. "in": "path",
  5776. "schema": {
  5777. "type": "string",
  5778. "pattern": "^ses"
  5779. },
  5780. "required": true
  5781. },
  5782. {
  5783. "name": "directory",
  5784. "in": "query",
  5785. "schema": {
  5786. "type": "string"
  5787. },
  5788. "required": false
  5789. },
  5790. {
  5791. "name": "workspace",
  5792. "in": "query",
  5793. "schema": {
  5794. "type": "string"
  5795. },
  5796. "required": false
  5797. }
  5798. ],
  5799. "responses": {
  5800. "200": {
  5801. "description": "Successfully deleted session",
  5802. "content": {
  5803. "application/json": {
  5804. "schema": {
  5805. "type": "boolean",
  5806. "description": "Successfully deleted session"
  5807. }
  5808. }
  5809. }
  5810. },
  5811. "400": {
  5812. "description": "BadRequest | InvalidRequestError",
  5813. "content": {
  5814. "application/json": {
  5815. "schema": {
  5816. "anyOf": [
  5817. {
  5818. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5819. },
  5820. {
  5821. "$ref": "#/components/schemas/InvalidRequestError"
  5822. }
  5823. ]
  5824. }
  5825. }
  5826. }
  5827. },
  5828. "404": {
  5829. "description": "NotFoundError",
  5830. "content": {
  5831. "application/json": {
  5832. "schema": {
  5833. "$ref": "#/components/schemas/NotFoundError"
  5834. }
  5835. }
  5836. }
  5837. }
  5838. },
  5839. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5840. "summary": "Delete session",
  5841. "x-codeSamples": [
  5842. {
  5843. "lang": "js",
  5844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5845. }
  5846. ]
  5847. },
  5848. "patch": {
  5849. "tags": ["session"],
  5850. "operationId": "session.update",
  5851. "parameters": [
  5852. {
  5853. "name": "sessionID",
  5854. "in": "path",
  5855. "schema": {
  5856. "type": "string",
  5857. "pattern": "^ses"
  5858. },
  5859. "required": true
  5860. },
  5861. {
  5862. "name": "directory",
  5863. "in": "query",
  5864. "schema": {
  5865. "type": "string"
  5866. },
  5867. "required": false
  5868. },
  5869. {
  5870. "name": "workspace",
  5871. "in": "query",
  5872. "schema": {
  5873. "type": "string"
  5874. },
  5875. "required": false
  5876. }
  5877. ],
  5878. "responses": {
  5879. "200": {
  5880. "description": "Successfully updated session",
  5881. "content": {
  5882. "application/json": {
  5883. "schema": {
  5884. "$ref": "#/components/schemas/Session"
  5885. }
  5886. }
  5887. }
  5888. },
  5889. "400": {
  5890. "description": "BadRequest | InvalidRequestError",
  5891. "content": {
  5892. "application/json": {
  5893. "schema": {
  5894. "anyOf": [
  5895. {
  5896. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5897. },
  5898. {
  5899. "$ref": "#/components/schemas/InvalidRequestError"
  5900. }
  5901. ]
  5902. }
  5903. }
  5904. }
  5905. },
  5906. "404": {
  5907. "description": "NotFoundError",
  5908. "content": {
  5909. "application/json": {
  5910. "schema": {
  5911. "$ref": "#/components/schemas/NotFoundError"
  5912. }
  5913. }
  5914. }
  5915. }
  5916. },
  5917. "description": "Update properties of an existing session, such as title or other metadata.",
  5918. "summary": "Update session",
  5919. "requestBody": {
  5920. "content": {
  5921. "application/json": {
  5922. "schema": {
  5923. "type": "object",
  5924. "properties": {
  5925. "title": {
  5926. "type": "string"
  5927. },
  5928. "metadata": {
  5929. "type": "object"
  5930. },
  5931. "permission": {
  5932. "$ref": "#/components/schemas/PermissionRuleset"
  5933. },
  5934. "time": {
  5935. "type": "object",
  5936. "properties": {
  5937. "archived": {
  5938. "type": "number"
  5939. }
  5940. },
  5941. "additionalProperties": false
  5942. }
  5943. },
  5944. "additionalProperties": false
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "x-codeSamples": [
  5950. {
  5951. "lang": "js",
  5952. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5953. }
  5954. ]
  5955. }
  5956. },
  5957. "/session/{sessionID}/children": {
  5958. "get": {
  5959. "tags": ["session"],
  5960. "operationId": "session.children",
  5961. "parameters": [
  5962. {
  5963. "name": "sessionID",
  5964. "in": "path",
  5965. "schema": {
  5966. "type": "string",
  5967. "pattern": "^ses"
  5968. },
  5969. "required": true
  5970. },
  5971. {
  5972. "name": "directory",
  5973. "in": "query",
  5974. "schema": {
  5975. "type": "string"
  5976. },
  5977. "required": false
  5978. },
  5979. {
  5980. "name": "workspace",
  5981. "in": "query",
  5982. "schema": {
  5983. "type": "string"
  5984. },
  5985. "required": false
  5986. }
  5987. ],
  5988. "responses": {
  5989. "200": {
  5990. "description": "List of children",
  5991. "content": {
  5992. "application/json": {
  5993. "schema": {
  5994. "type": "array",
  5995. "items": {
  5996. "$ref": "#/components/schemas/Session"
  5997. },
  5998. "description": "List of children"
  5999. }
  6000. }
  6001. }
  6002. },
  6003. "400": {
  6004. "description": "BadRequest | InvalidRequestError",
  6005. "content": {
  6006. "application/json": {
  6007. "schema": {
  6008. "anyOf": [
  6009. {
  6010. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6011. },
  6012. {
  6013. "$ref": "#/components/schemas/InvalidRequestError"
  6014. }
  6015. ]
  6016. }
  6017. }
  6018. }
  6019. },
  6020. "404": {
  6021. "description": "NotFoundError",
  6022. "content": {
  6023. "application/json": {
  6024. "schema": {
  6025. "$ref": "#/components/schemas/NotFoundError"
  6026. }
  6027. }
  6028. }
  6029. }
  6030. },
  6031. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  6032. "summary": "Get session children",
  6033. "x-codeSamples": [
  6034. {
  6035. "lang": "js",
  6036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  6037. }
  6038. ]
  6039. }
  6040. },
  6041. "/session/{sessionID}/todo": {
  6042. "get": {
  6043. "tags": ["session"],
  6044. "operationId": "session.todo",
  6045. "parameters": [
  6046. {
  6047. "name": "sessionID",
  6048. "in": "path",
  6049. "schema": {
  6050. "type": "string",
  6051. "pattern": "^ses"
  6052. },
  6053. "required": true
  6054. },
  6055. {
  6056. "name": "directory",
  6057. "in": "query",
  6058. "schema": {
  6059. "type": "string"
  6060. },
  6061. "required": false
  6062. },
  6063. {
  6064. "name": "workspace",
  6065. "in": "query",
  6066. "schema": {
  6067. "type": "string"
  6068. },
  6069. "required": false
  6070. }
  6071. ],
  6072. "responses": {
  6073. "200": {
  6074. "description": "Todo list",
  6075. "content": {
  6076. "application/json": {
  6077. "schema": {
  6078. "type": "array",
  6079. "items": {
  6080. "$ref": "#/components/schemas/Todo"
  6081. },
  6082. "description": "Todo list"
  6083. }
  6084. }
  6085. }
  6086. },
  6087. "400": {
  6088. "description": "BadRequest | InvalidRequestError",
  6089. "content": {
  6090. "application/json": {
  6091. "schema": {
  6092. "anyOf": [
  6093. {
  6094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6095. },
  6096. {
  6097. "$ref": "#/components/schemas/InvalidRequestError"
  6098. }
  6099. ]
  6100. }
  6101. }
  6102. }
  6103. },
  6104. "404": {
  6105. "description": "NotFoundError",
  6106. "content": {
  6107. "application/json": {
  6108. "schema": {
  6109. "$ref": "#/components/schemas/NotFoundError"
  6110. }
  6111. }
  6112. }
  6113. }
  6114. },
  6115. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6116. "summary": "Get session todos",
  6117. "x-codeSamples": [
  6118. {
  6119. "lang": "js",
  6120. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6121. }
  6122. ]
  6123. }
  6124. },
  6125. "/session/{sessionID}/diff": {
  6126. "get": {
  6127. "tags": ["session"],
  6128. "operationId": "session.diff",
  6129. "parameters": [
  6130. {
  6131. "name": "sessionID",
  6132. "in": "path",
  6133. "schema": {
  6134. "type": "string",
  6135. "pattern": "^ses"
  6136. },
  6137. "required": true
  6138. },
  6139. {
  6140. "name": "directory",
  6141. "in": "query",
  6142. "schema": {
  6143. "type": "string"
  6144. },
  6145. "required": false
  6146. },
  6147. {
  6148. "name": "workspace",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "messageID",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string",
  6160. "pattern": "^msg"
  6161. },
  6162. "required": false
  6163. }
  6164. ],
  6165. "responses": {
  6166. "200": {
  6167. "description": "Successfully retrieved diff",
  6168. "content": {
  6169. "application/json": {
  6170. "schema": {
  6171. "type": "array",
  6172. "items": {
  6173. "$ref": "#/components/schemas/SnapshotFileDiff"
  6174. },
  6175. "description": "Successfully retrieved diff"
  6176. }
  6177. }
  6178. }
  6179. },
  6180. "400": {
  6181. "description": "Bad request",
  6182. "content": {
  6183. "application/json": {
  6184. "schema": {
  6185. "$ref": "#/components/schemas/BadRequestError"
  6186. }
  6187. }
  6188. }
  6189. }
  6190. },
  6191. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6192. "summary": "Get message diff",
  6193. "x-codeSamples": [
  6194. {
  6195. "lang": "js",
  6196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6197. }
  6198. ]
  6199. }
  6200. },
  6201. "/session/{sessionID}/message": {
  6202. "get": {
  6203. "tags": ["session"],
  6204. "operationId": "session.messages",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. },
  6231. {
  6232. "name": "limit",
  6233. "in": "query",
  6234. "schema": {
  6235. "type": "integer",
  6236. "minimum": 0,
  6237. "maximum": 9007199254740991
  6238. },
  6239. "required": false
  6240. },
  6241. {
  6242. "name": "before",
  6243. "in": "query",
  6244. "schema": {
  6245. "type": "string"
  6246. },
  6247. "required": false
  6248. }
  6249. ],
  6250. "responses": {
  6251. "200": {
  6252. "description": "List of messages",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "type": "array",
  6257. "items": {
  6258. "type": "object",
  6259. "properties": {
  6260. "info": {
  6261. "$ref": "#/components/schemas/Message"
  6262. },
  6263. "parts": {
  6264. "type": "array",
  6265. "items": {
  6266. "$ref": "#/components/schemas/Part"
  6267. }
  6268. }
  6269. },
  6270. "required": ["info", "parts"],
  6271. "additionalProperties": false
  6272. },
  6273. "description": "List of messages"
  6274. }
  6275. }
  6276. }
  6277. },
  6278. "400": {
  6279. "description": "BadRequest | InvalidRequestError",
  6280. "content": {
  6281. "application/json": {
  6282. "schema": {
  6283. "anyOf": [
  6284. {
  6285. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6286. },
  6287. {
  6288. "$ref": "#/components/schemas/InvalidRequestError"
  6289. }
  6290. ]
  6291. }
  6292. }
  6293. }
  6294. },
  6295. "404": {
  6296. "description": "NotFoundError",
  6297. "content": {
  6298. "application/json": {
  6299. "schema": {
  6300. "$ref": "#/components/schemas/NotFoundError"
  6301. }
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6307. "summary": "Get session messages",
  6308. "x-codeSamples": [
  6309. {
  6310. "lang": "js",
  6311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6312. }
  6313. ]
  6314. },
  6315. "post": {
  6316. "tags": ["session"],
  6317. "operationId": "session.prompt",
  6318. "parameters": [
  6319. {
  6320. "name": "sessionID",
  6321. "in": "path",
  6322. "schema": {
  6323. "type": "string",
  6324. "pattern": "^ses"
  6325. },
  6326. "required": true
  6327. },
  6328. {
  6329. "name": "directory",
  6330. "in": "query",
  6331. "schema": {
  6332. "type": "string"
  6333. },
  6334. "required": false
  6335. },
  6336. {
  6337. "name": "workspace",
  6338. "in": "query",
  6339. "schema": {
  6340. "type": "string"
  6341. },
  6342. "required": false
  6343. }
  6344. ],
  6345. "responses": {
  6346. "200": {
  6347. "description": "Created message",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "type": "object",
  6352. "required": ["info", "parts"],
  6353. "properties": {
  6354. "info": {
  6355. "$ref": "#/components/schemas/AssistantMessage"
  6356. },
  6357. "parts": {
  6358. "type": "array",
  6359. "items": {
  6360. "$ref": "#/components/schemas/Part"
  6361. }
  6362. }
  6363. }
  6364. }
  6365. }
  6366. }
  6367. },
  6368. "400": {
  6369. "description": "BadRequest | InvalidRequestError",
  6370. "content": {
  6371. "application/json": {
  6372. "schema": {
  6373. "anyOf": [
  6374. {
  6375. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6376. },
  6377. {
  6378. "$ref": "#/components/schemas/InvalidRequestError"
  6379. }
  6380. ]
  6381. }
  6382. }
  6383. }
  6384. },
  6385. "404": {
  6386. "description": "NotFoundError",
  6387. "content": {
  6388. "application/json": {
  6389. "schema": {
  6390. "$ref": "#/components/schemas/NotFoundError"
  6391. }
  6392. }
  6393. }
  6394. }
  6395. },
  6396. "description": "Create and send a new message to a session, streaming the AI response.",
  6397. "summary": "Send message",
  6398. "requestBody": {
  6399. "content": {
  6400. "application/json": {
  6401. "schema": {
  6402. "type": "object",
  6403. "properties": {
  6404. "messageID": {
  6405. "type": "string",
  6406. "pattern": "^msg"
  6407. },
  6408. "model": {
  6409. "type": "object",
  6410. "properties": {
  6411. "providerID": {
  6412. "type": "string"
  6413. },
  6414. "modelID": {
  6415. "type": "string"
  6416. }
  6417. },
  6418. "required": ["providerID", "modelID"],
  6419. "additionalProperties": false
  6420. },
  6421. "agent": {
  6422. "type": "string"
  6423. },
  6424. "noReply": {
  6425. "type": "boolean"
  6426. },
  6427. "tools": {
  6428. "type": "object",
  6429. "additionalProperties": {
  6430. "type": "boolean"
  6431. }
  6432. },
  6433. "format": {
  6434. "$ref": "#/components/schemas/OutputFormat"
  6435. },
  6436. "system": {
  6437. "type": "string"
  6438. },
  6439. "variant": {
  6440. "type": "string"
  6441. },
  6442. "parts": {
  6443. "type": "array",
  6444. "items": {
  6445. "anyOf": [
  6446. {
  6447. "$ref": "#/components/schemas/TextPartInput"
  6448. },
  6449. {
  6450. "$ref": "#/components/schemas/FilePartInput"
  6451. },
  6452. {
  6453. "$ref": "#/components/schemas/AgentPartInput"
  6454. },
  6455. {
  6456. "$ref": "#/components/schemas/SubtaskPartInput"
  6457. }
  6458. ]
  6459. }
  6460. }
  6461. },
  6462. "required": ["parts"],
  6463. "additionalProperties": false
  6464. }
  6465. }
  6466. }
  6467. },
  6468. "x-codeSamples": [
  6469. {
  6470. "lang": "js",
  6471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6472. }
  6473. ]
  6474. }
  6475. },
  6476. "/session/{sessionID}/message/{messageID}": {
  6477. "get": {
  6478. "tags": ["session"],
  6479. "operationId": "session.message",
  6480. "parameters": [
  6481. {
  6482. "name": "sessionID",
  6483. "in": "path",
  6484. "schema": {
  6485. "type": "string",
  6486. "pattern": "^ses"
  6487. },
  6488. "required": true
  6489. },
  6490. {
  6491. "name": "messageID",
  6492. "in": "path",
  6493. "schema": {
  6494. "type": "string",
  6495. "pattern": "^msg"
  6496. },
  6497. "required": true
  6498. },
  6499. {
  6500. "name": "directory",
  6501. "in": "query",
  6502. "schema": {
  6503. "type": "string"
  6504. },
  6505. "required": false
  6506. },
  6507. {
  6508. "name": "workspace",
  6509. "in": "query",
  6510. "schema": {
  6511. "type": "string"
  6512. },
  6513. "required": false
  6514. }
  6515. ],
  6516. "responses": {
  6517. "200": {
  6518. "description": "Message",
  6519. "content": {
  6520. "application/json": {
  6521. "schema": {
  6522. "type": "object",
  6523. "properties": {
  6524. "info": {
  6525. "$ref": "#/components/schemas/Message"
  6526. },
  6527. "parts": {
  6528. "type": "array",
  6529. "items": {
  6530. "$ref": "#/components/schemas/Part"
  6531. }
  6532. }
  6533. },
  6534. "required": ["info", "parts"],
  6535. "additionalProperties": false,
  6536. "description": "Message"
  6537. }
  6538. }
  6539. }
  6540. },
  6541. "400": {
  6542. "description": "BadRequest | InvalidRequestError",
  6543. "content": {
  6544. "application/json": {
  6545. "schema": {
  6546. "anyOf": [
  6547. {
  6548. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6549. },
  6550. {
  6551. "$ref": "#/components/schemas/InvalidRequestError"
  6552. }
  6553. ]
  6554. }
  6555. }
  6556. }
  6557. },
  6558. "404": {
  6559. "description": "NotFoundError",
  6560. "content": {
  6561. "application/json": {
  6562. "schema": {
  6563. "$ref": "#/components/schemas/NotFoundError"
  6564. }
  6565. }
  6566. }
  6567. }
  6568. },
  6569. "description": "Retrieve a specific message from a session by its message ID.",
  6570. "summary": "Get message",
  6571. "x-codeSamples": [
  6572. {
  6573. "lang": "js",
  6574. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6575. }
  6576. ]
  6577. },
  6578. "delete": {
  6579. "tags": ["session"],
  6580. "operationId": "session.deleteMessage",
  6581. "parameters": [
  6582. {
  6583. "name": "sessionID",
  6584. "in": "path",
  6585. "schema": {
  6586. "type": "string",
  6587. "pattern": "^ses"
  6588. },
  6589. "required": true
  6590. },
  6591. {
  6592. "name": "messageID",
  6593. "in": "path",
  6594. "schema": {
  6595. "type": "string",
  6596. "pattern": "^msg"
  6597. },
  6598. "required": true
  6599. },
  6600. {
  6601. "name": "directory",
  6602. "in": "query",
  6603. "schema": {
  6604. "type": "string"
  6605. },
  6606. "required": false
  6607. },
  6608. {
  6609. "name": "workspace",
  6610. "in": "query",
  6611. "schema": {
  6612. "type": "string"
  6613. },
  6614. "required": false
  6615. }
  6616. ],
  6617. "responses": {
  6618. "200": {
  6619. "description": "Successfully deleted message",
  6620. "content": {
  6621. "application/json": {
  6622. "schema": {
  6623. "type": "boolean",
  6624. "description": "Successfully deleted message"
  6625. }
  6626. }
  6627. }
  6628. },
  6629. "400": {
  6630. "description": "BadRequest | InvalidRequestError",
  6631. "content": {
  6632. "application/json": {
  6633. "schema": {
  6634. "anyOf": [
  6635. {
  6636. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6637. },
  6638. {
  6639. "$ref": "#/components/schemas/InvalidRequestError"
  6640. }
  6641. ]
  6642. }
  6643. }
  6644. }
  6645. },
  6646. "404": {
  6647. "description": "NotFoundError",
  6648. "content": {
  6649. "application/json": {
  6650. "schema": {
  6651. "$ref": "#/components/schemas/NotFoundError"
  6652. }
  6653. }
  6654. }
  6655. },
  6656. "409": {
  6657. "description": "SessionBusyError",
  6658. "content": {
  6659. "application/json": {
  6660. "schema": {
  6661. "$ref": "#/components/schemas/SessionBusyError"
  6662. }
  6663. }
  6664. }
  6665. }
  6666. },
  6667. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6668. "summary": "Delete message",
  6669. "x-codeSamples": [
  6670. {
  6671. "lang": "js",
  6672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6673. }
  6674. ]
  6675. }
  6676. },
  6677. "/session/{sessionID}/fork": {
  6678. "post": {
  6679. "tags": ["session"],
  6680. "operationId": "session.fork",
  6681. "parameters": [
  6682. {
  6683. "name": "sessionID",
  6684. "in": "path",
  6685. "schema": {
  6686. "type": "string",
  6687. "pattern": "^ses"
  6688. },
  6689. "required": true
  6690. },
  6691. {
  6692. "name": "directory",
  6693. "in": "query",
  6694. "schema": {
  6695. "type": "string"
  6696. },
  6697. "required": false
  6698. },
  6699. {
  6700. "name": "workspace",
  6701. "in": "query",
  6702. "schema": {
  6703. "type": "string"
  6704. },
  6705. "required": false
  6706. }
  6707. ],
  6708. "responses": {
  6709. "200": {
  6710. "description": "200",
  6711. "content": {
  6712. "application/json": {
  6713. "schema": {
  6714. "$ref": "#/components/schemas/Session"
  6715. }
  6716. }
  6717. }
  6718. },
  6719. "400": {
  6720. "description": "BadRequest | InvalidRequestError",
  6721. "content": {
  6722. "application/json": {
  6723. "schema": {
  6724. "anyOf": [
  6725. {
  6726. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6727. },
  6728. {
  6729. "$ref": "#/components/schemas/InvalidRequestError"
  6730. }
  6731. ]
  6732. }
  6733. }
  6734. }
  6735. },
  6736. "404": {
  6737. "description": "NotFoundError",
  6738. "content": {
  6739. "application/json": {
  6740. "schema": {
  6741. "$ref": "#/components/schemas/NotFoundError"
  6742. }
  6743. }
  6744. }
  6745. }
  6746. },
  6747. "description": "Create a new session by forking an existing session at a specific message point.",
  6748. "summary": "Fork session",
  6749. "requestBody": {
  6750. "content": {
  6751. "application/json": {
  6752. "schema": {
  6753. "type": "object",
  6754. "properties": {
  6755. "messageID": {
  6756. "type": "string",
  6757. "pattern": "^msg"
  6758. }
  6759. },
  6760. "additionalProperties": false
  6761. }
  6762. }
  6763. }
  6764. },
  6765. "x-codeSamples": [
  6766. {
  6767. "lang": "js",
  6768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6769. }
  6770. ]
  6771. }
  6772. },
  6773. "/session/{sessionID}/abort": {
  6774. "post": {
  6775. "tags": ["session"],
  6776. "operationId": "session.abort",
  6777. "parameters": [
  6778. {
  6779. "name": "sessionID",
  6780. "in": "path",
  6781. "schema": {
  6782. "type": "string",
  6783. "pattern": "^ses"
  6784. },
  6785. "required": true
  6786. },
  6787. {
  6788. "name": "directory",
  6789. "in": "query",
  6790. "schema": {
  6791. "type": "string"
  6792. },
  6793. "required": false
  6794. },
  6795. {
  6796. "name": "workspace",
  6797. "in": "query",
  6798. "schema": {
  6799. "type": "string"
  6800. },
  6801. "required": false
  6802. }
  6803. ],
  6804. "responses": {
  6805. "200": {
  6806. "description": "Aborted session",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "type": "boolean",
  6811. "description": "Aborted session"
  6812. }
  6813. }
  6814. }
  6815. },
  6816. "400": {
  6817. "description": "BadRequest | InvalidRequestError",
  6818. "content": {
  6819. "application/json": {
  6820. "schema": {
  6821. "anyOf": [
  6822. {
  6823. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6824. },
  6825. {
  6826. "$ref": "#/components/schemas/InvalidRequestError"
  6827. }
  6828. ]
  6829. }
  6830. }
  6831. }
  6832. }
  6833. },
  6834. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6835. "summary": "Abort session",
  6836. "x-codeSamples": [
  6837. {
  6838. "lang": "js",
  6839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6840. }
  6841. ]
  6842. }
  6843. },
  6844. "/session/{sessionID}/init": {
  6845. "post": {
  6846. "tags": ["session"],
  6847. "operationId": "session.init",
  6848. "parameters": [
  6849. {
  6850. "name": "sessionID",
  6851. "in": "path",
  6852. "schema": {
  6853. "type": "string",
  6854. "pattern": "^ses"
  6855. },
  6856. "required": true
  6857. },
  6858. {
  6859. "name": "directory",
  6860. "in": "query",
  6861. "schema": {
  6862. "type": "string"
  6863. },
  6864. "required": false
  6865. },
  6866. {
  6867. "name": "workspace",
  6868. "in": "query",
  6869. "schema": {
  6870. "type": "string"
  6871. },
  6872. "required": false
  6873. }
  6874. ],
  6875. "responses": {
  6876. "200": {
  6877. "description": "200",
  6878. "content": {
  6879. "application/json": {
  6880. "schema": {
  6881. "type": "boolean",
  6882. "description": "200"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "400": {
  6888. "description": "BadRequest | InvalidRequestError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "anyOf": [
  6893. {
  6894. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6895. },
  6896. {
  6897. "$ref": "#/components/schemas/InvalidRequestError"
  6898. }
  6899. ]
  6900. }
  6901. }
  6902. }
  6903. },
  6904. "404": {
  6905. "description": "NotFoundError",
  6906. "content": {
  6907. "application/json": {
  6908. "schema": {
  6909. "$ref": "#/components/schemas/NotFoundError"
  6910. }
  6911. }
  6912. }
  6913. }
  6914. },
  6915. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6916. "summary": "Initialize session",
  6917. "requestBody": {
  6918. "content": {
  6919. "application/json": {
  6920. "schema": {
  6921. "type": "object",
  6922. "properties": {
  6923. "modelID": {
  6924. "type": "string"
  6925. },
  6926. "providerID": {
  6927. "type": "string"
  6928. },
  6929. "messageID": {
  6930. "type": "string",
  6931. "pattern": "^msg"
  6932. }
  6933. },
  6934. "required": ["modelID", "providerID", "messageID"],
  6935. "additionalProperties": false
  6936. }
  6937. }
  6938. }
  6939. },
  6940. "x-codeSamples": [
  6941. {
  6942. "lang": "js",
  6943. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6944. }
  6945. ]
  6946. }
  6947. },
  6948. "/session/{sessionID}/share": {
  6949. "post": {
  6950. "tags": ["session"],
  6951. "operationId": "session.share",
  6952. "parameters": [
  6953. {
  6954. "name": "sessionID",
  6955. "in": "path",
  6956. "schema": {
  6957. "type": "string",
  6958. "pattern": "^ses"
  6959. },
  6960. "required": true
  6961. },
  6962. {
  6963. "name": "directory",
  6964. "in": "query",
  6965. "schema": {
  6966. "type": "string"
  6967. },
  6968. "required": false
  6969. },
  6970. {
  6971. "name": "workspace",
  6972. "in": "query",
  6973. "schema": {
  6974. "type": "string"
  6975. },
  6976. "required": false
  6977. }
  6978. ],
  6979. "responses": {
  6980. "200": {
  6981. "description": "Successfully shared session",
  6982. "content": {
  6983. "application/json": {
  6984. "schema": {
  6985. "$ref": "#/components/schemas/Session"
  6986. }
  6987. }
  6988. }
  6989. },
  6990. "400": {
  6991. "description": "Bad request",
  6992. "content": {
  6993. "application/json": {
  6994. "schema": {
  6995. "$ref": "#/components/schemas/BadRequestError"
  6996. }
  6997. }
  6998. }
  6999. },
  7000. "404": {
  7001. "description": "NotFoundError",
  7002. "content": {
  7003. "application/json": {
  7004. "schema": {
  7005. "$ref": "#/components/schemas/NotFoundError"
  7006. }
  7007. }
  7008. }
  7009. },
  7010. "500": {
  7011. "description": "InternalServerError",
  7012. "content": {
  7013. "application/json": {
  7014. "schema": {
  7015. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7016. }
  7017. }
  7018. }
  7019. }
  7020. },
  7021. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  7022. "summary": "Share session",
  7023. "x-codeSamples": [
  7024. {
  7025. "lang": "js",
  7026. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  7027. }
  7028. ]
  7029. },
  7030. "delete": {
  7031. "tags": ["session"],
  7032. "operationId": "session.unshare",
  7033. "parameters": [
  7034. {
  7035. "name": "sessionID",
  7036. "in": "path",
  7037. "schema": {
  7038. "type": "string",
  7039. "pattern": "^ses"
  7040. },
  7041. "required": true
  7042. },
  7043. {
  7044. "name": "directory",
  7045. "in": "query",
  7046. "schema": {
  7047. "type": "string"
  7048. },
  7049. "required": false
  7050. },
  7051. {
  7052. "name": "workspace",
  7053. "in": "query",
  7054. "schema": {
  7055. "type": "string"
  7056. },
  7057. "required": false
  7058. }
  7059. ],
  7060. "responses": {
  7061. "200": {
  7062. "description": "Successfully unshared session",
  7063. "content": {
  7064. "application/json": {
  7065. "schema": {
  7066. "$ref": "#/components/schemas/Session"
  7067. }
  7068. }
  7069. }
  7070. },
  7071. "400": {
  7072. "description": "Bad request",
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "$ref": "#/components/schemas/BadRequestError"
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "404": {
  7082. "description": "NotFoundError",
  7083. "content": {
  7084. "application/json": {
  7085. "schema": {
  7086. "$ref": "#/components/schemas/NotFoundError"
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "500": {
  7092. "description": "InternalServerError",
  7093. "content": {
  7094. "application/json": {
  7095. "schema": {
  7096. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7097. }
  7098. }
  7099. }
  7100. }
  7101. },
  7102. "description": "Remove the shareable link for a session, making it private again.",
  7103. "summary": "Unshare session",
  7104. "x-codeSamples": [
  7105. {
  7106. "lang": "js",
  7107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7108. }
  7109. ]
  7110. }
  7111. },
  7112. "/session/{sessionID}/summarize": {
  7113. "post": {
  7114. "tags": ["session"],
  7115. "operationId": "session.summarize",
  7116. "parameters": [
  7117. {
  7118. "name": "sessionID",
  7119. "in": "path",
  7120. "schema": {
  7121. "type": "string",
  7122. "pattern": "^ses"
  7123. },
  7124. "required": true
  7125. },
  7126. {
  7127. "name": "directory",
  7128. "in": "query",
  7129. "schema": {
  7130. "type": "string"
  7131. },
  7132. "required": false
  7133. },
  7134. {
  7135. "name": "workspace",
  7136. "in": "query",
  7137. "schema": {
  7138. "type": "string"
  7139. },
  7140. "required": false
  7141. }
  7142. ],
  7143. "responses": {
  7144. "200": {
  7145. "description": "Summarized session",
  7146. "content": {
  7147. "application/json": {
  7148. "schema": {
  7149. "type": "boolean",
  7150. "description": "Summarized session"
  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. },
  7183. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7184. "summary": "Summarize session",
  7185. "requestBody": {
  7186. "content": {
  7187. "application/json": {
  7188. "schema": {
  7189. "type": "object",
  7190. "properties": {
  7191. "providerID": {
  7192. "type": "string"
  7193. },
  7194. "modelID": {
  7195. "type": "string"
  7196. },
  7197. "auto": {
  7198. "type": "boolean"
  7199. }
  7200. },
  7201. "required": ["providerID", "modelID"],
  7202. "additionalProperties": false
  7203. }
  7204. }
  7205. }
  7206. },
  7207. "x-codeSamples": [
  7208. {
  7209. "lang": "js",
  7210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7211. }
  7212. ]
  7213. }
  7214. },
  7215. "/session/{sessionID}/prompt_async": {
  7216. "post": {
  7217. "tags": ["session"],
  7218. "operationId": "session.prompt_async",
  7219. "parameters": [
  7220. {
  7221. "name": "sessionID",
  7222. "in": "path",
  7223. "schema": {
  7224. "type": "string",
  7225. "pattern": "^ses"
  7226. },
  7227. "required": true
  7228. },
  7229. {
  7230. "name": "directory",
  7231. "in": "query",
  7232. "schema": {
  7233. "type": "string"
  7234. },
  7235. "required": false
  7236. },
  7237. {
  7238. "name": "workspace",
  7239. "in": "query",
  7240. "schema": {
  7241. "type": "string"
  7242. },
  7243. "required": false
  7244. }
  7245. ],
  7246. "responses": {
  7247. "204": {
  7248. "description": "Prompt accepted"
  7249. },
  7250. "400": {
  7251. "description": "BadRequest | InvalidRequestError",
  7252. "content": {
  7253. "application/json": {
  7254. "schema": {
  7255. "anyOf": [
  7256. {
  7257. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7258. },
  7259. {
  7260. "$ref": "#/components/schemas/InvalidRequestError"
  7261. }
  7262. ]
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "404": {
  7268. "description": "NotFoundError",
  7269. "content": {
  7270. "application/json": {
  7271. "schema": {
  7272. "$ref": "#/components/schemas/NotFoundError"
  7273. }
  7274. }
  7275. }
  7276. }
  7277. },
  7278. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7279. "summary": "Send async message",
  7280. "requestBody": {
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "type": "object",
  7285. "properties": {
  7286. "messageID": {
  7287. "type": "string",
  7288. "pattern": "^msg"
  7289. },
  7290. "model": {
  7291. "type": "object",
  7292. "properties": {
  7293. "providerID": {
  7294. "type": "string"
  7295. },
  7296. "modelID": {
  7297. "type": "string"
  7298. }
  7299. },
  7300. "required": ["providerID", "modelID"],
  7301. "additionalProperties": false
  7302. },
  7303. "agent": {
  7304. "type": "string"
  7305. },
  7306. "noReply": {
  7307. "type": "boolean"
  7308. },
  7309. "tools": {
  7310. "type": "object",
  7311. "additionalProperties": {
  7312. "type": "boolean"
  7313. }
  7314. },
  7315. "format": {
  7316. "$ref": "#/components/schemas/OutputFormat"
  7317. },
  7318. "system": {
  7319. "type": "string"
  7320. },
  7321. "variant": {
  7322. "type": "string"
  7323. },
  7324. "parts": {
  7325. "type": "array",
  7326. "items": {
  7327. "anyOf": [
  7328. {
  7329. "$ref": "#/components/schemas/TextPartInput"
  7330. },
  7331. {
  7332. "$ref": "#/components/schemas/FilePartInput"
  7333. },
  7334. {
  7335. "$ref": "#/components/schemas/AgentPartInput"
  7336. },
  7337. {
  7338. "$ref": "#/components/schemas/SubtaskPartInput"
  7339. }
  7340. ]
  7341. }
  7342. }
  7343. },
  7344. "required": ["parts"],
  7345. "additionalProperties": false
  7346. }
  7347. }
  7348. }
  7349. },
  7350. "x-codeSamples": [
  7351. {
  7352. "lang": "js",
  7353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7354. }
  7355. ]
  7356. }
  7357. },
  7358. "/session/{sessionID}/command": {
  7359. "post": {
  7360. "tags": ["session"],
  7361. "operationId": "session.command",
  7362. "parameters": [
  7363. {
  7364. "name": "sessionID",
  7365. "in": "path",
  7366. "schema": {
  7367. "type": "string",
  7368. "pattern": "^ses"
  7369. },
  7370. "required": true
  7371. },
  7372. {
  7373. "name": "directory",
  7374. "in": "query",
  7375. "schema": {
  7376. "type": "string"
  7377. },
  7378. "required": false
  7379. },
  7380. {
  7381. "name": "workspace",
  7382. "in": "query",
  7383. "schema": {
  7384. "type": "string"
  7385. },
  7386. "required": false
  7387. }
  7388. ],
  7389. "responses": {
  7390. "200": {
  7391. "description": "Created message",
  7392. "content": {
  7393. "application/json": {
  7394. "schema": {
  7395. "type": "object",
  7396. "required": ["info", "parts"],
  7397. "properties": {
  7398. "info": {
  7399. "$ref": "#/components/schemas/AssistantMessage"
  7400. },
  7401. "parts": {
  7402. "type": "array",
  7403. "items": {
  7404. "$ref": "#/components/schemas/Part"
  7405. }
  7406. }
  7407. }
  7408. }
  7409. }
  7410. }
  7411. },
  7412. "400": {
  7413. "description": "BadRequest | InvalidRequestError",
  7414. "content": {
  7415. "application/json": {
  7416. "schema": {
  7417. "anyOf": [
  7418. {
  7419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7420. },
  7421. {
  7422. "$ref": "#/components/schemas/InvalidRequestError"
  7423. }
  7424. ]
  7425. }
  7426. }
  7427. }
  7428. },
  7429. "404": {
  7430. "description": "NotFoundError",
  7431. "content": {
  7432. "application/json": {
  7433. "schema": {
  7434. "$ref": "#/components/schemas/NotFoundError"
  7435. }
  7436. }
  7437. }
  7438. }
  7439. },
  7440. "description": "Send a new command to a session for execution by the AI assistant.",
  7441. "summary": "Send command",
  7442. "requestBody": {
  7443. "content": {
  7444. "application/json": {
  7445. "schema": {
  7446. "type": "object",
  7447. "properties": {
  7448. "messageID": {
  7449. "type": "string",
  7450. "pattern": "^msg"
  7451. },
  7452. "agent": {
  7453. "type": "string"
  7454. },
  7455. "model": {
  7456. "type": "string"
  7457. },
  7458. "arguments": {
  7459. "type": "string"
  7460. },
  7461. "command": {
  7462. "type": "string"
  7463. },
  7464. "variant": {
  7465. "type": "string"
  7466. },
  7467. "parts": {
  7468. "type": "array",
  7469. "items": {
  7470. "type": "object",
  7471. "properties": {
  7472. "id": {
  7473. "type": "string",
  7474. "pattern": "^prt"
  7475. },
  7476. "type": {
  7477. "type": "string",
  7478. "enum": ["file"]
  7479. },
  7480. "mime": {
  7481. "type": "string"
  7482. },
  7483. "filename": {
  7484. "type": "string"
  7485. },
  7486. "url": {
  7487. "type": "string"
  7488. },
  7489. "source": {
  7490. "$ref": "#/components/schemas/FilePartSource"
  7491. }
  7492. },
  7493. "required": ["type", "mime", "url"],
  7494. "additionalProperties": false
  7495. }
  7496. }
  7497. },
  7498. "required": ["arguments", "command"],
  7499. "additionalProperties": false
  7500. }
  7501. }
  7502. }
  7503. },
  7504. "x-codeSamples": [
  7505. {
  7506. "lang": "js",
  7507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7508. }
  7509. ]
  7510. }
  7511. },
  7512. "/session/{sessionID}/shell": {
  7513. "post": {
  7514. "tags": ["session"],
  7515. "operationId": "session.shell",
  7516. "parameters": [
  7517. {
  7518. "name": "sessionID",
  7519. "in": "path",
  7520. "schema": {
  7521. "type": "string",
  7522. "pattern": "^ses"
  7523. },
  7524. "required": true
  7525. },
  7526. {
  7527. "name": "directory",
  7528. "in": "query",
  7529. "schema": {
  7530. "type": "string"
  7531. },
  7532. "required": false
  7533. },
  7534. {
  7535. "name": "workspace",
  7536. "in": "query",
  7537. "schema": {
  7538. "type": "string"
  7539. },
  7540. "required": false
  7541. }
  7542. ],
  7543. "responses": {
  7544. "200": {
  7545. "description": "Created message",
  7546. "content": {
  7547. "application/json": {
  7548. "schema": {
  7549. "type": "object",
  7550. "properties": {
  7551. "info": {
  7552. "$ref": "#/components/schemas/Message"
  7553. },
  7554. "parts": {
  7555. "type": "array",
  7556. "items": {
  7557. "$ref": "#/components/schemas/Part"
  7558. }
  7559. }
  7560. },
  7561. "required": ["info", "parts"],
  7562. "additionalProperties": false,
  7563. "description": "Created message"
  7564. }
  7565. }
  7566. }
  7567. },
  7568. "400": {
  7569. "description": "BadRequest | InvalidRequestError",
  7570. "content": {
  7571. "application/json": {
  7572. "schema": {
  7573. "anyOf": [
  7574. {
  7575. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7576. },
  7577. {
  7578. "$ref": "#/components/schemas/InvalidRequestError"
  7579. }
  7580. ]
  7581. }
  7582. }
  7583. }
  7584. },
  7585. "404": {
  7586. "description": "NotFoundError",
  7587. "content": {
  7588. "application/json": {
  7589. "schema": {
  7590. "$ref": "#/components/schemas/NotFoundError"
  7591. }
  7592. }
  7593. }
  7594. },
  7595. "409": {
  7596. "description": "SessionBusyError",
  7597. "content": {
  7598. "application/json": {
  7599. "schema": {
  7600. "$ref": "#/components/schemas/SessionBusyError"
  7601. }
  7602. }
  7603. }
  7604. }
  7605. },
  7606. "description": "Execute a shell command within the session context and return the AI's response.",
  7607. "summary": "Run shell command",
  7608. "requestBody": {
  7609. "content": {
  7610. "application/json": {
  7611. "schema": {
  7612. "type": "object",
  7613. "properties": {
  7614. "messageID": {
  7615. "type": "string",
  7616. "pattern": "^msg"
  7617. },
  7618. "agent": {
  7619. "type": "string"
  7620. },
  7621. "model": {
  7622. "type": "object",
  7623. "properties": {
  7624. "providerID": {
  7625. "type": "string"
  7626. },
  7627. "modelID": {
  7628. "type": "string"
  7629. }
  7630. },
  7631. "required": ["providerID", "modelID"],
  7632. "additionalProperties": false
  7633. },
  7634. "command": {
  7635. "type": "string"
  7636. }
  7637. },
  7638. "required": ["agent", "command"],
  7639. "additionalProperties": false
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "x-codeSamples": [
  7645. {
  7646. "lang": "js",
  7647. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7648. }
  7649. ]
  7650. }
  7651. },
  7652. "/session/{sessionID}/revert": {
  7653. "post": {
  7654. "tags": ["session"],
  7655. "operationId": "session.revert",
  7656. "parameters": [
  7657. {
  7658. "name": "sessionID",
  7659. "in": "path",
  7660. "schema": {
  7661. "type": "string",
  7662. "pattern": "^ses"
  7663. },
  7664. "required": true
  7665. },
  7666. {
  7667. "name": "directory",
  7668. "in": "query",
  7669. "schema": {
  7670. "type": "string"
  7671. },
  7672. "required": false
  7673. },
  7674. {
  7675. "name": "workspace",
  7676. "in": "query",
  7677. "schema": {
  7678. "type": "string"
  7679. },
  7680. "required": false
  7681. }
  7682. ],
  7683. "responses": {
  7684. "200": {
  7685. "description": "Updated session",
  7686. "content": {
  7687. "application/json": {
  7688. "schema": {
  7689. "$ref": "#/components/schemas/Session"
  7690. }
  7691. }
  7692. }
  7693. },
  7694. "400": {
  7695. "description": "BadRequest | InvalidRequestError",
  7696. "content": {
  7697. "application/json": {
  7698. "schema": {
  7699. "anyOf": [
  7700. {
  7701. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7702. },
  7703. {
  7704. "$ref": "#/components/schemas/InvalidRequestError"
  7705. }
  7706. ]
  7707. }
  7708. }
  7709. }
  7710. },
  7711. "404": {
  7712. "description": "NotFoundError",
  7713. "content": {
  7714. "application/json": {
  7715. "schema": {
  7716. "$ref": "#/components/schemas/NotFoundError"
  7717. }
  7718. }
  7719. }
  7720. },
  7721. "409": {
  7722. "description": "SessionBusyError",
  7723. "content": {
  7724. "application/json": {
  7725. "schema": {
  7726. "$ref": "#/components/schemas/SessionBusyError"
  7727. }
  7728. }
  7729. }
  7730. }
  7731. },
  7732. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7733. "summary": "Revert message",
  7734. "requestBody": {
  7735. "content": {
  7736. "application/json": {
  7737. "schema": {
  7738. "type": "object",
  7739. "properties": {
  7740. "messageID": {
  7741. "type": "string",
  7742. "pattern": "^msg"
  7743. },
  7744. "partID": {
  7745. "type": "string",
  7746. "pattern": "^prt"
  7747. }
  7748. },
  7749. "required": ["messageID"],
  7750. "additionalProperties": false
  7751. }
  7752. }
  7753. }
  7754. },
  7755. "x-codeSamples": [
  7756. {
  7757. "lang": "js",
  7758. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7759. }
  7760. ]
  7761. }
  7762. },
  7763. "/session/{sessionID}/unrevert": {
  7764. "post": {
  7765. "tags": ["session"],
  7766. "operationId": "session.unrevert",
  7767. "parameters": [
  7768. {
  7769. "name": "sessionID",
  7770. "in": "path",
  7771. "schema": {
  7772. "type": "string",
  7773. "pattern": "^ses"
  7774. },
  7775. "required": true
  7776. },
  7777. {
  7778. "name": "directory",
  7779. "in": "query",
  7780. "schema": {
  7781. "type": "string"
  7782. },
  7783. "required": false
  7784. },
  7785. {
  7786. "name": "workspace",
  7787. "in": "query",
  7788. "schema": {
  7789. "type": "string"
  7790. },
  7791. "required": false
  7792. }
  7793. ],
  7794. "responses": {
  7795. "200": {
  7796. "description": "Updated session",
  7797. "content": {
  7798. "application/json": {
  7799. "schema": {
  7800. "$ref": "#/components/schemas/Session"
  7801. }
  7802. }
  7803. }
  7804. },
  7805. "400": {
  7806. "description": "BadRequest | InvalidRequestError",
  7807. "content": {
  7808. "application/json": {
  7809. "schema": {
  7810. "anyOf": [
  7811. {
  7812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7813. },
  7814. {
  7815. "$ref": "#/components/schemas/InvalidRequestError"
  7816. }
  7817. ]
  7818. }
  7819. }
  7820. }
  7821. },
  7822. "404": {
  7823. "description": "NotFoundError",
  7824. "content": {
  7825. "application/json": {
  7826. "schema": {
  7827. "$ref": "#/components/schemas/NotFoundError"
  7828. }
  7829. }
  7830. }
  7831. },
  7832. "409": {
  7833. "description": "SessionBusyError",
  7834. "content": {
  7835. "application/json": {
  7836. "schema": {
  7837. "$ref": "#/components/schemas/SessionBusyError"
  7838. }
  7839. }
  7840. }
  7841. }
  7842. },
  7843. "description": "Restore all previously reverted messages in a session.",
  7844. "summary": "Restore reverted messages",
  7845. "x-codeSamples": [
  7846. {
  7847. "lang": "js",
  7848. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7849. }
  7850. ]
  7851. }
  7852. },
  7853. "/session/{sessionID}/permissions/{permissionID}": {
  7854. "post": {
  7855. "tags": ["session"],
  7856. "operationId": "permission.respond",
  7857. "parameters": [
  7858. {
  7859. "name": "sessionID",
  7860. "in": "path",
  7861. "schema": {
  7862. "type": "string",
  7863. "pattern": "^ses"
  7864. },
  7865. "required": true
  7866. },
  7867. {
  7868. "name": "permissionID",
  7869. "in": "path",
  7870. "schema": {
  7871. "type": "string",
  7872. "pattern": "^per"
  7873. },
  7874. "required": true
  7875. },
  7876. {
  7877. "name": "directory",
  7878. "in": "query",
  7879. "schema": {
  7880. "type": "string"
  7881. },
  7882. "required": false
  7883. },
  7884. {
  7885. "name": "workspace",
  7886. "in": "query",
  7887. "schema": {
  7888. "type": "string"
  7889. },
  7890. "required": false
  7891. }
  7892. ],
  7893. "responses": {
  7894. "200": {
  7895. "description": "Permission processed successfully",
  7896. "content": {
  7897. "application/json": {
  7898. "schema": {
  7899. "type": "boolean",
  7900. "description": "Permission processed successfully"
  7901. }
  7902. }
  7903. }
  7904. },
  7905. "400": {
  7906. "description": "BadRequest | InvalidRequestError",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "anyOf": [
  7911. {
  7912. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7913. },
  7914. {
  7915. "$ref": "#/components/schemas/InvalidRequestError"
  7916. }
  7917. ]
  7918. }
  7919. }
  7920. }
  7921. },
  7922. "404": {
  7923. "description": "NotFoundError | PermissionNotFoundError",
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "anyOf": [
  7928. {
  7929. "$ref": "#/components/schemas/NotFoundError"
  7930. },
  7931. {
  7932. "$ref": "#/components/schemas/PermissionNotFoundError"
  7933. }
  7934. ]
  7935. }
  7936. }
  7937. }
  7938. }
  7939. },
  7940. "description": "Approve or deny a permission request from the AI assistant.",
  7941. "summary": "Respond to permission",
  7942. "deprecated": true,
  7943. "requestBody": {
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "object",
  7948. "properties": {
  7949. "response": {
  7950. "type": "string",
  7951. "enum": ["once", "always", "reject"]
  7952. }
  7953. },
  7954. "required": ["response"],
  7955. "additionalProperties": false
  7956. }
  7957. }
  7958. }
  7959. },
  7960. "x-codeSamples": [
  7961. {
  7962. "lang": "js",
  7963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7964. }
  7965. ]
  7966. }
  7967. },
  7968. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7969. "delete": {
  7970. "tags": ["session"],
  7971. "operationId": "part.delete",
  7972. "parameters": [
  7973. {
  7974. "name": "sessionID",
  7975. "in": "path",
  7976. "schema": {
  7977. "type": "string",
  7978. "pattern": "^ses"
  7979. },
  7980. "required": true
  7981. },
  7982. {
  7983. "name": "messageID",
  7984. "in": "path",
  7985. "schema": {
  7986. "type": "string",
  7987. "pattern": "^msg"
  7988. },
  7989. "required": true
  7990. },
  7991. {
  7992. "name": "partID",
  7993. "in": "path",
  7994. "schema": {
  7995. "type": "string",
  7996. "pattern": "^prt"
  7997. },
  7998. "required": true
  7999. },
  8000. {
  8001. "name": "directory",
  8002. "in": "query",
  8003. "schema": {
  8004. "type": "string"
  8005. },
  8006. "required": false
  8007. },
  8008. {
  8009. "name": "workspace",
  8010. "in": "query",
  8011. "schema": {
  8012. "type": "string"
  8013. },
  8014. "required": false
  8015. }
  8016. ],
  8017. "responses": {
  8018. "200": {
  8019. "description": "Successfully deleted part",
  8020. "content": {
  8021. "application/json": {
  8022. "schema": {
  8023. "type": "boolean",
  8024. "description": "Successfully deleted part"
  8025. }
  8026. }
  8027. }
  8028. },
  8029. "400": {
  8030. "description": "BadRequest | InvalidRequestError",
  8031. "content": {
  8032. "application/json": {
  8033. "schema": {
  8034. "anyOf": [
  8035. {
  8036. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8037. },
  8038. {
  8039. "$ref": "#/components/schemas/InvalidRequestError"
  8040. }
  8041. ]
  8042. }
  8043. }
  8044. }
  8045. },
  8046. "404": {
  8047. "description": "NotFoundError",
  8048. "content": {
  8049. "application/json": {
  8050. "schema": {
  8051. "$ref": "#/components/schemas/NotFoundError"
  8052. }
  8053. }
  8054. }
  8055. }
  8056. },
  8057. "description": "Delete a part from a message.",
  8058. "x-codeSamples": [
  8059. {
  8060. "lang": "js",
  8061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  8062. }
  8063. ]
  8064. },
  8065. "patch": {
  8066. "tags": ["session"],
  8067. "operationId": "part.update",
  8068. "parameters": [
  8069. {
  8070. "name": "sessionID",
  8071. "in": "path",
  8072. "schema": {
  8073. "type": "string",
  8074. "pattern": "^ses"
  8075. },
  8076. "required": true
  8077. },
  8078. {
  8079. "name": "messageID",
  8080. "in": "path",
  8081. "schema": {
  8082. "type": "string",
  8083. "pattern": "^msg"
  8084. },
  8085. "required": true
  8086. },
  8087. {
  8088. "name": "partID",
  8089. "in": "path",
  8090. "schema": {
  8091. "type": "string",
  8092. "pattern": "^prt"
  8093. },
  8094. "required": true
  8095. },
  8096. {
  8097. "name": "directory",
  8098. "in": "query",
  8099. "schema": {
  8100. "type": "string"
  8101. },
  8102. "required": false
  8103. },
  8104. {
  8105. "name": "workspace",
  8106. "in": "query",
  8107. "schema": {
  8108. "type": "string"
  8109. },
  8110. "required": false
  8111. }
  8112. ],
  8113. "responses": {
  8114. "200": {
  8115. "description": "Successfully updated part",
  8116. "content": {
  8117. "application/json": {
  8118. "schema": {
  8119. "$ref": "#/components/schemas/Part"
  8120. }
  8121. }
  8122. }
  8123. },
  8124. "400": {
  8125. "description": "BadRequest | InvalidRequestError",
  8126. "content": {
  8127. "application/json": {
  8128. "schema": {
  8129. "anyOf": [
  8130. {
  8131. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8132. },
  8133. {
  8134. "$ref": "#/components/schemas/InvalidRequestError"
  8135. }
  8136. ]
  8137. }
  8138. }
  8139. }
  8140. },
  8141. "404": {
  8142. "description": "NotFoundError",
  8143. "content": {
  8144. "application/json": {
  8145. "schema": {
  8146. "$ref": "#/components/schemas/NotFoundError"
  8147. }
  8148. }
  8149. }
  8150. }
  8151. },
  8152. "description": "Update a part in a message.",
  8153. "requestBody": {
  8154. "content": {
  8155. "application/json": {
  8156. "schema": {
  8157. "$ref": "#/components/schemas/Part"
  8158. }
  8159. }
  8160. }
  8161. },
  8162. "x-codeSamples": [
  8163. {
  8164. "lang": "js",
  8165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8166. }
  8167. ]
  8168. }
  8169. },
  8170. "/sync/start": {
  8171. "post": {
  8172. "tags": ["sync"],
  8173. "operationId": "sync.start",
  8174. "parameters": [
  8175. {
  8176. "name": "directory",
  8177. "in": "query",
  8178. "schema": {
  8179. "type": "string"
  8180. },
  8181. "required": false
  8182. },
  8183. {
  8184. "name": "workspace",
  8185. "in": "query",
  8186. "schema": {
  8187. "type": "string"
  8188. },
  8189. "required": false
  8190. }
  8191. ],
  8192. "responses": {
  8193. "200": {
  8194. "description": "Workspace sync started",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "type": "boolean",
  8199. "description": "Workspace sync started"
  8200. }
  8201. }
  8202. }
  8203. },
  8204. "400": {
  8205. "description": "Bad request",
  8206. "content": {
  8207. "application/json": {
  8208. "schema": {
  8209. "$ref": "#/components/schemas/BadRequestError"
  8210. }
  8211. }
  8212. }
  8213. }
  8214. },
  8215. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8216. "summary": "Start workspace sync",
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/replay": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.replay",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Replayed sync events",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string"
  8257. }
  8258. },
  8259. "required": ["sessionID"],
  8260. "additionalProperties": false,
  8261. "description": "Replayed sync events"
  8262. }
  8263. }
  8264. }
  8265. },
  8266. "400": {
  8267. "description": "BadRequest | InvalidRequestError",
  8268. "content": {
  8269. "application/json": {
  8270. "schema": {
  8271. "anyOf": [
  8272. {
  8273. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8274. },
  8275. {
  8276. "$ref": "#/components/schemas/InvalidRequestError"
  8277. }
  8278. ]
  8279. }
  8280. }
  8281. }
  8282. }
  8283. },
  8284. "description": "Validate and replay a complete sync event history.",
  8285. "summary": "Replay sync events",
  8286. "requestBody": {
  8287. "content": {
  8288. "application/json": {
  8289. "schema": {
  8290. "type": "object",
  8291. "properties": {
  8292. "directory": {
  8293. "type": "string"
  8294. },
  8295. "events": {
  8296. "type": "array",
  8297. "minItems": 1,
  8298. "items": {
  8299. "type": "object",
  8300. "properties": {
  8301. "id": {
  8302. "type": "string",
  8303. "pattern": "^evt_"
  8304. },
  8305. "aggregateID": {
  8306. "type": "string"
  8307. },
  8308. "seq": {
  8309. "type": "integer",
  8310. "minimum": 0
  8311. },
  8312. "type": {
  8313. "type": "string"
  8314. },
  8315. "data": {
  8316. "type": "object"
  8317. }
  8318. },
  8319. "required": ["id", "aggregateID", "seq", "type", "data"],
  8320. "additionalProperties": false
  8321. }
  8322. }
  8323. },
  8324. "required": ["directory", "events"],
  8325. "additionalProperties": false
  8326. }
  8327. }
  8328. }
  8329. },
  8330. "x-codeSamples": [
  8331. {
  8332. "lang": "js",
  8333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8334. }
  8335. ]
  8336. }
  8337. },
  8338. "/sync/steal": {
  8339. "post": {
  8340. "tags": ["sync"],
  8341. "operationId": "sync.steal",
  8342. "parameters": [
  8343. {
  8344. "name": "directory",
  8345. "in": "query",
  8346. "schema": {
  8347. "type": "string"
  8348. },
  8349. "required": false
  8350. },
  8351. {
  8352. "name": "workspace",
  8353. "in": "query",
  8354. "schema": {
  8355. "type": "string"
  8356. },
  8357. "required": false
  8358. }
  8359. ],
  8360. "responses": {
  8361. "200": {
  8362. "description": "Session stolen into workspace",
  8363. "content": {
  8364. "application/json": {
  8365. "schema": {
  8366. "type": "object",
  8367. "properties": {
  8368. "sessionID": {
  8369. "type": "string",
  8370. "pattern": "^ses"
  8371. }
  8372. },
  8373. "required": ["sessionID"],
  8374. "additionalProperties": false,
  8375. "description": "Session stolen into workspace"
  8376. }
  8377. }
  8378. }
  8379. },
  8380. "400": {
  8381. "description": "BadRequest | InvalidRequestError",
  8382. "content": {
  8383. "application/json": {
  8384. "schema": {
  8385. "anyOf": [
  8386. {
  8387. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8388. },
  8389. {
  8390. "$ref": "#/components/schemas/InvalidRequestError"
  8391. }
  8392. ]
  8393. }
  8394. }
  8395. }
  8396. }
  8397. },
  8398. "description": "Update a session to belong to the current workspace through the sync event system.",
  8399. "summary": "Steal session into workspace",
  8400. "requestBody": {
  8401. "content": {
  8402. "application/json": {
  8403. "schema": {
  8404. "type": "object",
  8405. "properties": {
  8406. "sessionID": {
  8407. "type": "string",
  8408. "pattern": "^ses"
  8409. }
  8410. },
  8411. "required": ["sessionID"],
  8412. "additionalProperties": false
  8413. }
  8414. }
  8415. }
  8416. },
  8417. "x-codeSamples": [
  8418. {
  8419. "lang": "js",
  8420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8421. }
  8422. ]
  8423. }
  8424. },
  8425. "/sync/history": {
  8426. "post": {
  8427. "tags": ["sync"],
  8428. "operationId": "sync.history.list",
  8429. "parameters": [
  8430. {
  8431. "name": "directory",
  8432. "in": "query",
  8433. "schema": {
  8434. "type": "string"
  8435. },
  8436. "required": false
  8437. },
  8438. {
  8439. "name": "workspace",
  8440. "in": "query",
  8441. "schema": {
  8442. "type": "string"
  8443. },
  8444. "required": false
  8445. }
  8446. ],
  8447. "responses": {
  8448. "200": {
  8449. "description": "Sync events",
  8450. "content": {
  8451. "application/json": {
  8452. "schema": {
  8453. "type": "array",
  8454. "items": {
  8455. "type": "object",
  8456. "properties": {
  8457. "id": {
  8458. "type": "string",
  8459. "pattern": "^evt_"
  8460. },
  8461. "aggregate_id": {
  8462. "type": "string"
  8463. },
  8464. "seq": {
  8465. "type": "integer",
  8466. "minimum": 0
  8467. },
  8468. "type": {
  8469. "type": "string"
  8470. },
  8471. "data": {
  8472. "type": "object"
  8473. }
  8474. },
  8475. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8476. "additionalProperties": false
  8477. },
  8478. "description": "Sync events"
  8479. }
  8480. }
  8481. }
  8482. },
  8483. "400": {
  8484. "description": "BadRequest | InvalidRequestError",
  8485. "content": {
  8486. "application/json": {
  8487. "schema": {
  8488. "anyOf": [
  8489. {
  8490. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8491. },
  8492. {
  8493. "$ref": "#/components/schemas/InvalidRequestError"
  8494. }
  8495. ]
  8496. }
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "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.",
  8502. "summary": "List sync events",
  8503. "requestBody": {
  8504. "content": {
  8505. "application/json": {
  8506. "schema": {
  8507. "type": "object",
  8508. "additionalProperties": {
  8509. "type": "integer",
  8510. "minimum": 0
  8511. }
  8512. }
  8513. }
  8514. }
  8515. },
  8516. "x-codeSamples": [
  8517. {
  8518. "lang": "js",
  8519. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8520. }
  8521. ]
  8522. }
  8523. },
  8524. "/tui/append-prompt": {
  8525. "post": {
  8526. "tags": ["tui"],
  8527. "operationId": "tui.appendPrompt",
  8528. "parameters": [
  8529. {
  8530. "name": "directory",
  8531. "in": "query",
  8532. "schema": {
  8533. "type": "string"
  8534. },
  8535. "required": false
  8536. },
  8537. {
  8538. "name": "workspace",
  8539. "in": "query",
  8540. "schema": {
  8541. "type": "string"
  8542. },
  8543. "required": false
  8544. }
  8545. ],
  8546. "responses": {
  8547. "200": {
  8548. "description": "Prompt processed successfully",
  8549. "content": {
  8550. "application/json": {
  8551. "schema": {
  8552. "type": "boolean",
  8553. "description": "Prompt processed successfully"
  8554. }
  8555. }
  8556. }
  8557. },
  8558. "400": {
  8559. "description": "BadRequest | InvalidRequestError",
  8560. "content": {
  8561. "application/json": {
  8562. "schema": {
  8563. "anyOf": [
  8564. {
  8565. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8566. },
  8567. {
  8568. "$ref": "#/components/schemas/InvalidRequestError"
  8569. }
  8570. ]
  8571. }
  8572. }
  8573. }
  8574. }
  8575. },
  8576. "description": "Append prompt to the TUI.",
  8577. "summary": "Append TUI prompt",
  8578. "requestBody": {
  8579. "content": {
  8580. "application/json": {
  8581. "schema": {
  8582. "type": "object",
  8583. "properties": {
  8584. "text": {
  8585. "type": "string"
  8586. }
  8587. },
  8588. "required": ["text"],
  8589. "additionalProperties": false
  8590. }
  8591. }
  8592. }
  8593. },
  8594. "x-codeSamples": [
  8595. {
  8596. "lang": "js",
  8597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8598. }
  8599. ]
  8600. }
  8601. },
  8602. "/tui/open-help": {
  8603. "post": {
  8604. "tags": ["tui"],
  8605. "operationId": "tui.openHelp",
  8606. "parameters": [
  8607. {
  8608. "name": "directory",
  8609. "in": "query",
  8610. "schema": {
  8611. "type": "string"
  8612. },
  8613. "required": false
  8614. },
  8615. {
  8616. "name": "workspace",
  8617. "in": "query",
  8618. "schema": {
  8619. "type": "string"
  8620. },
  8621. "required": false
  8622. }
  8623. ],
  8624. "responses": {
  8625. "200": {
  8626. "description": "Help dialog opened successfully",
  8627. "content": {
  8628. "application/json": {
  8629. "schema": {
  8630. "type": "boolean",
  8631. "description": "Help dialog opened successfully"
  8632. }
  8633. }
  8634. }
  8635. },
  8636. "400": {
  8637. "description": "Bad request",
  8638. "content": {
  8639. "application/json": {
  8640. "schema": {
  8641. "$ref": "#/components/schemas/BadRequestError"
  8642. }
  8643. }
  8644. }
  8645. }
  8646. },
  8647. "description": "Open the help dialog in the TUI to display user assistance information.",
  8648. "summary": "Open help dialog",
  8649. "x-codeSamples": [
  8650. {
  8651. "lang": "js",
  8652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8653. }
  8654. ]
  8655. }
  8656. },
  8657. "/tui/open-sessions": {
  8658. "post": {
  8659. "tags": ["tui"],
  8660. "operationId": "tui.openSessions",
  8661. "parameters": [
  8662. {
  8663. "name": "directory",
  8664. "in": "query",
  8665. "schema": {
  8666. "type": "string"
  8667. },
  8668. "required": false
  8669. },
  8670. {
  8671. "name": "workspace",
  8672. "in": "query",
  8673. "schema": {
  8674. "type": "string"
  8675. },
  8676. "required": false
  8677. }
  8678. ],
  8679. "responses": {
  8680. "200": {
  8681. "description": "Session dialog opened successfully",
  8682. "content": {
  8683. "application/json": {
  8684. "schema": {
  8685. "type": "boolean",
  8686. "description": "Session dialog opened successfully"
  8687. }
  8688. }
  8689. }
  8690. },
  8691. "400": {
  8692. "description": "Bad request",
  8693. "content": {
  8694. "application/json": {
  8695. "schema": {
  8696. "$ref": "#/components/schemas/BadRequestError"
  8697. }
  8698. }
  8699. }
  8700. }
  8701. },
  8702. "description": "Open the session dialog.",
  8703. "summary": "Open sessions dialog",
  8704. "x-codeSamples": [
  8705. {
  8706. "lang": "js",
  8707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8708. }
  8709. ]
  8710. }
  8711. },
  8712. "/tui/open-themes": {
  8713. "post": {
  8714. "tags": ["tui"],
  8715. "operationId": "tui.openThemes",
  8716. "parameters": [
  8717. {
  8718. "name": "directory",
  8719. "in": "query",
  8720. "schema": {
  8721. "type": "string"
  8722. },
  8723. "required": false
  8724. },
  8725. {
  8726. "name": "workspace",
  8727. "in": "query",
  8728. "schema": {
  8729. "type": "string"
  8730. },
  8731. "required": false
  8732. }
  8733. ],
  8734. "responses": {
  8735. "200": {
  8736. "description": "Theme dialog opened successfully",
  8737. "content": {
  8738. "application/json": {
  8739. "schema": {
  8740. "type": "boolean",
  8741. "description": "Theme dialog opened successfully"
  8742. }
  8743. }
  8744. }
  8745. },
  8746. "400": {
  8747. "description": "Bad request",
  8748. "content": {
  8749. "application/json": {
  8750. "schema": {
  8751. "$ref": "#/components/schemas/BadRequestError"
  8752. }
  8753. }
  8754. }
  8755. }
  8756. },
  8757. "description": "Open the theme dialog.",
  8758. "summary": "Open themes dialog",
  8759. "x-codeSamples": [
  8760. {
  8761. "lang": "js",
  8762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8763. }
  8764. ]
  8765. }
  8766. },
  8767. "/tui/open-models": {
  8768. "post": {
  8769. "tags": ["tui"],
  8770. "operationId": "tui.openModels",
  8771. "parameters": [
  8772. {
  8773. "name": "directory",
  8774. "in": "query",
  8775. "schema": {
  8776. "type": "string"
  8777. },
  8778. "required": false
  8779. },
  8780. {
  8781. "name": "workspace",
  8782. "in": "query",
  8783. "schema": {
  8784. "type": "string"
  8785. },
  8786. "required": false
  8787. }
  8788. ],
  8789. "responses": {
  8790. "200": {
  8791. "description": "Model dialog opened successfully",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "type": "boolean",
  8796. "description": "Model dialog opened successfully"
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "400": {
  8802. "description": "Bad request",
  8803. "content": {
  8804. "application/json": {
  8805. "schema": {
  8806. "$ref": "#/components/schemas/BadRequestError"
  8807. }
  8808. }
  8809. }
  8810. }
  8811. },
  8812. "description": "Open the model dialog.",
  8813. "summary": "Open models dialog",
  8814. "x-codeSamples": [
  8815. {
  8816. "lang": "js",
  8817. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8818. }
  8819. ]
  8820. }
  8821. },
  8822. "/tui/submit-prompt": {
  8823. "post": {
  8824. "tags": ["tui"],
  8825. "operationId": "tui.submitPrompt",
  8826. "parameters": [
  8827. {
  8828. "name": "directory",
  8829. "in": "query",
  8830. "schema": {
  8831. "type": "string"
  8832. },
  8833. "required": false
  8834. },
  8835. {
  8836. "name": "workspace",
  8837. "in": "query",
  8838. "schema": {
  8839. "type": "string"
  8840. },
  8841. "required": false
  8842. }
  8843. ],
  8844. "responses": {
  8845. "200": {
  8846. "description": "Prompt submitted successfully",
  8847. "content": {
  8848. "application/json": {
  8849. "schema": {
  8850. "type": "boolean",
  8851. "description": "Prompt submitted successfully"
  8852. }
  8853. }
  8854. }
  8855. },
  8856. "400": {
  8857. "description": "Bad request",
  8858. "content": {
  8859. "application/json": {
  8860. "schema": {
  8861. "$ref": "#/components/schemas/BadRequestError"
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "description": "Submit the prompt.",
  8868. "summary": "Submit TUI prompt",
  8869. "x-codeSamples": [
  8870. {
  8871. "lang": "js",
  8872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8873. }
  8874. ]
  8875. }
  8876. },
  8877. "/tui/clear-prompt": {
  8878. "post": {
  8879. "tags": ["tui"],
  8880. "operationId": "tui.clearPrompt",
  8881. "parameters": [
  8882. {
  8883. "name": "directory",
  8884. "in": "query",
  8885. "schema": {
  8886. "type": "string"
  8887. },
  8888. "required": false
  8889. },
  8890. {
  8891. "name": "workspace",
  8892. "in": "query",
  8893. "schema": {
  8894. "type": "string"
  8895. },
  8896. "required": false
  8897. }
  8898. ],
  8899. "responses": {
  8900. "200": {
  8901. "description": "Prompt cleared successfully",
  8902. "content": {
  8903. "application/json": {
  8904. "schema": {
  8905. "type": "boolean",
  8906. "description": "Prompt cleared successfully"
  8907. }
  8908. }
  8909. }
  8910. },
  8911. "400": {
  8912. "description": "Bad request",
  8913. "content": {
  8914. "application/json": {
  8915. "schema": {
  8916. "$ref": "#/components/schemas/BadRequestError"
  8917. }
  8918. }
  8919. }
  8920. }
  8921. },
  8922. "description": "Clear the prompt.",
  8923. "summary": "Clear TUI prompt",
  8924. "x-codeSamples": [
  8925. {
  8926. "lang": "js",
  8927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8928. }
  8929. ]
  8930. }
  8931. },
  8932. "/tui/execute-command": {
  8933. "post": {
  8934. "tags": ["tui"],
  8935. "operationId": "tui.executeCommand",
  8936. "parameters": [
  8937. {
  8938. "name": "directory",
  8939. "in": "query",
  8940. "schema": {
  8941. "type": "string"
  8942. },
  8943. "required": false
  8944. },
  8945. {
  8946. "name": "workspace",
  8947. "in": "query",
  8948. "schema": {
  8949. "type": "string"
  8950. },
  8951. "required": false
  8952. }
  8953. ],
  8954. "responses": {
  8955. "200": {
  8956. "description": "Command executed successfully",
  8957. "content": {
  8958. "application/json": {
  8959. "schema": {
  8960. "type": "boolean",
  8961. "description": "Command executed successfully"
  8962. }
  8963. }
  8964. }
  8965. },
  8966. "400": {
  8967. "description": "BadRequest | InvalidRequestError",
  8968. "content": {
  8969. "application/json": {
  8970. "schema": {
  8971. "anyOf": [
  8972. {
  8973. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8974. },
  8975. {
  8976. "$ref": "#/components/schemas/InvalidRequestError"
  8977. }
  8978. ]
  8979. }
  8980. }
  8981. }
  8982. }
  8983. },
  8984. "description": "Execute a TUI command.",
  8985. "summary": "Execute TUI command",
  8986. "requestBody": {
  8987. "content": {
  8988. "application/json": {
  8989. "schema": {
  8990. "type": "object",
  8991. "properties": {
  8992. "command": {
  8993. "type": "string"
  8994. }
  8995. },
  8996. "required": ["command"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/show-toast": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.showToast",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Toast notification shown successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Toast notification shown successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "Bad request",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "$ref": "#/components/schemas/BadRequestError"
  9050. }
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "description": "Show a toast notification in the TUI.",
  9056. "summary": "Show TUI toast",
  9057. "requestBody": {
  9058. "content": {
  9059. "application/json": {
  9060. "schema": {
  9061. "type": "object",
  9062. "properties": {
  9063. "title": {
  9064. "type": "string"
  9065. },
  9066. "message": {
  9067. "type": "string"
  9068. },
  9069. "variant": {
  9070. "type": "string",
  9071. "enum": ["info", "success", "warning", "error"]
  9072. },
  9073. "duration": {
  9074. "type": "integer",
  9075. "exclusiveMinimum": 0
  9076. }
  9077. },
  9078. "required": ["message", "variant"],
  9079. "additionalProperties": false
  9080. }
  9081. }
  9082. }
  9083. },
  9084. "x-codeSamples": [
  9085. {
  9086. "lang": "js",
  9087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9088. }
  9089. ]
  9090. }
  9091. },
  9092. "/tui/publish": {
  9093. "post": {
  9094. "tags": ["tui"],
  9095. "operationId": "tui.publish",
  9096. "parameters": [
  9097. {
  9098. "name": "directory",
  9099. "in": "query",
  9100. "schema": {
  9101. "type": "string"
  9102. },
  9103. "required": false
  9104. },
  9105. {
  9106. "name": "workspace",
  9107. "in": "query",
  9108. "schema": {
  9109. "type": "string"
  9110. },
  9111. "required": false
  9112. }
  9113. ],
  9114. "responses": {
  9115. "200": {
  9116. "description": "Event published successfully",
  9117. "content": {
  9118. "application/json": {
  9119. "schema": {
  9120. "type": "boolean",
  9121. "description": "Event published successfully"
  9122. }
  9123. }
  9124. }
  9125. },
  9126. "400": {
  9127. "description": "BadRequest | InvalidRequestError",
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "anyOf": [
  9132. {
  9133. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9134. },
  9135. {
  9136. "$ref": "#/components/schemas/InvalidRequestError"
  9137. }
  9138. ]
  9139. }
  9140. }
  9141. }
  9142. }
  9143. },
  9144. "description": "Publish a TUI event.",
  9145. "summary": "Publish TUI event",
  9146. "requestBody": {
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "anyOf": [
  9151. {
  9152. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9153. },
  9154. {
  9155. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9156. },
  9157. {
  9158. "$ref": "#/components/schemas/EventTuiToastShow"
  9159. },
  9160. {
  9161. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9162. }
  9163. ]
  9164. }
  9165. }
  9166. }
  9167. },
  9168. "x-codeSamples": [
  9169. {
  9170. "lang": "js",
  9171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9172. }
  9173. ]
  9174. }
  9175. },
  9176. "/tui/select-session": {
  9177. "post": {
  9178. "tags": ["tui"],
  9179. "operationId": "tui.selectSession",
  9180. "parameters": [
  9181. {
  9182. "name": "directory",
  9183. "in": "query",
  9184. "schema": {
  9185. "type": "string"
  9186. },
  9187. "required": false
  9188. },
  9189. {
  9190. "name": "workspace",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. }
  9197. ],
  9198. "responses": {
  9199. "200": {
  9200. "description": "Session selected successfully",
  9201. "content": {
  9202. "application/json": {
  9203. "schema": {
  9204. "type": "boolean",
  9205. "description": "Session selected successfully"
  9206. }
  9207. }
  9208. }
  9209. },
  9210. "400": {
  9211. "description": "BadRequest | InvalidRequestError",
  9212. "content": {
  9213. "application/json": {
  9214. "schema": {
  9215. "anyOf": [
  9216. {
  9217. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9218. },
  9219. {
  9220. "$ref": "#/components/schemas/InvalidRequestError"
  9221. }
  9222. ]
  9223. }
  9224. }
  9225. }
  9226. },
  9227. "404": {
  9228. "description": "NotFoundError",
  9229. "content": {
  9230. "application/json": {
  9231. "schema": {
  9232. "$ref": "#/components/schemas/NotFoundError"
  9233. }
  9234. }
  9235. }
  9236. }
  9237. },
  9238. "description": "Navigate the TUI to display the specified session.",
  9239. "summary": "Select session",
  9240. "requestBody": {
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "object",
  9245. "properties": {
  9246. "sessionID": {
  9247. "type": "string",
  9248. "pattern": "^ses",
  9249. "description": "Session ID to navigate to"
  9250. }
  9251. },
  9252. "required": ["sessionID"],
  9253. "additionalProperties": false
  9254. }
  9255. }
  9256. }
  9257. },
  9258. "x-codeSamples": [
  9259. {
  9260. "lang": "js",
  9261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9262. }
  9263. ]
  9264. }
  9265. },
  9266. "/tui/control/next": {
  9267. "get": {
  9268. "tags": ["tui"],
  9269. "operationId": "tui.control.next",
  9270. "parameters": [
  9271. {
  9272. "name": "directory",
  9273. "in": "query",
  9274. "schema": {
  9275. "type": "string"
  9276. },
  9277. "required": false
  9278. },
  9279. {
  9280. "name": "workspace",
  9281. "in": "query",
  9282. "schema": {
  9283. "type": "string"
  9284. },
  9285. "required": false
  9286. }
  9287. ],
  9288. "responses": {
  9289. "200": {
  9290. "description": "Next TUI request",
  9291. "content": {
  9292. "application/json": {
  9293. "schema": {
  9294. "type": "object",
  9295. "properties": {
  9296. "path": {
  9297. "type": "string"
  9298. },
  9299. "body": {}
  9300. },
  9301. "required": ["path", "body"],
  9302. "additionalProperties": false,
  9303. "description": "Next TUI request"
  9304. }
  9305. }
  9306. }
  9307. },
  9308. "400": {
  9309. "description": "Bad request",
  9310. "content": {
  9311. "application/json": {
  9312. "schema": {
  9313. "$ref": "#/components/schemas/BadRequestError"
  9314. }
  9315. }
  9316. }
  9317. }
  9318. },
  9319. "description": "Retrieve the next TUI request from the queue for processing.",
  9320. "summary": "Get next TUI request",
  9321. "x-codeSamples": [
  9322. {
  9323. "lang": "js",
  9324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9325. }
  9326. ]
  9327. }
  9328. },
  9329. "/tui/control/response": {
  9330. "post": {
  9331. "tags": ["tui"],
  9332. "operationId": "tui.control.response",
  9333. "parameters": [
  9334. {
  9335. "name": "directory",
  9336. "in": "query",
  9337. "schema": {
  9338. "type": "string"
  9339. },
  9340. "required": false
  9341. },
  9342. {
  9343. "name": "workspace",
  9344. "in": "query",
  9345. "schema": {
  9346. "type": "string"
  9347. },
  9348. "required": false
  9349. }
  9350. ],
  9351. "responses": {
  9352. "200": {
  9353. "description": "Response submitted successfully",
  9354. "content": {
  9355. "application/json": {
  9356. "schema": {
  9357. "type": "boolean",
  9358. "description": "Response submitted successfully"
  9359. }
  9360. }
  9361. }
  9362. },
  9363. "400": {
  9364. "description": "Bad request",
  9365. "content": {
  9366. "application/json": {
  9367. "schema": {
  9368. "$ref": "#/components/schemas/BadRequestError"
  9369. }
  9370. }
  9371. }
  9372. }
  9373. },
  9374. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9375. "summary": "Submit TUI response",
  9376. "requestBody": {
  9377. "content": {
  9378. "application/json": {
  9379. "schema": {}
  9380. }
  9381. }
  9382. },
  9383. "x-codeSamples": [
  9384. {
  9385. "lang": "js",
  9386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9387. }
  9388. ]
  9389. }
  9390. },
  9391. "/experimental/workspace/adapter": {
  9392. "get": {
  9393. "tags": ["workspace"],
  9394. "operationId": "experimental.workspace.adapter.list",
  9395. "parameters": [
  9396. {
  9397. "name": "directory",
  9398. "in": "query",
  9399. "schema": {
  9400. "type": "string"
  9401. },
  9402. "required": false
  9403. },
  9404. {
  9405. "name": "workspace",
  9406. "in": "query",
  9407. "schema": {
  9408. "type": "string"
  9409. },
  9410. "required": false
  9411. }
  9412. ],
  9413. "responses": {
  9414. "200": {
  9415. "description": "Workspace adapters",
  9416. "content": {
  9417. "application/json": {
  9418. "schema": {
  9419. "type": "array",
  9420. "items": {
  9421. "type": "object",
  9422. "properties": {
  9423. "type": {
  9424. "type": "string"
  9425. },
  9426. "name": {
  9427. "type": "string"
  9428. },
  9429. "description": {
  9430. "type": "string"
  9431. }
  9432. },
  9433. "required": ["type", "name", "description"],
  9434. "additionalProperties": false
  9435. },
  9436. "description": "Workspace adapters"
  9437. }
  9438. }
  9439. }
  9440. },
  9441. "400": {
  9442. "description": "Bad request",
  9443. "content": {
  9444. "application/json": {
  9445. "schema": {
  9446. "$ref": "#/components/schemas/BadRequestError"
  9447. }
  9448. }
  9449. }
  9450. }
  9451. },
  9452. "description": "List all available workspace adapters for the current project.",
  9453. "summary": "List workspace adapters",
  9454. "x-codeSamples": [
  9455. {
  9456. "lang": "js",
  9457. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9458. }
  9459. ]
  9460. }
  9461. },
  9462. "/experimental/workspace": {
  9463. "get": {
  9464. "tags": ["workspace"],
  9465. "operationId": "experimental.workspace.list",
  9466. "parameters": [
  9467. {
  9468. "name": "directory",
  9469. "in": "query",
  9470. "schema": {
  9471. "type": "string"
  9472. },
  9473. "required": false
  9474. },
  9475. {
  9476. "name": "workspace",
  9477. "in": "query",
  9478. "schema": {
  9479. "type": "string"
  9480. },
  9481. "required": false
  9482. }
  9483. ],
  9484. "responses": {
  9485. "200": {
  9486. "description": "Workspaces",
  9487. "content": {
  9488. "application/json": {
  9489. "schema": {
  9490. "type": "array",
  9491. "items": {
  9492. "$ref": "#/components/schemas/Workspace"
  9493. },
  9494. "description": "Workspaces"
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "400": {
  9500. "description": "Bad request",
  9501. "content": {
  9502. "application/json": {
  9503. "schema": {
  9504. "$ref": "#/components/schemas/BadRequestError"
  9505. }
  9506. }
  9507. }
  9508. }
  9509. },
  9510. "description": "List all workspaces.",
  9511. "summary": "List workspaces",
  9512. "x-codeSamples": [
  9513. {
  9514. "lang": "js",
  9515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9516. }
  9517. ]
  9518. },
  9519. "post": {
  9520. "tags": ["workspace"],
  9521. "operationId": "experimental.workspace.create",
  9522. "parameters": [
  9523. {
  9524. "name": "directory",
  9525. "in": "query",
  9526. "schema": {
  9527. "type": "string"
  9528. },
  9529. "required": false
  9530. },
  9531. {
  9532. "name": "workspace",
  9533. "in": "query",
  9534. "schema": {
  9535. "type": "string"
  9536. },
  9537. "required": false
  9538. }
  9539. ],
  9540. "responses": {
  9541. "200": {
  9542. "description": "Workspace created",
  9543. "content": {
  9544. "application/json": {
  9545. "schema": {
  9546. "$ref": "#/components/schemas/Workspace"
  9547. }
  9548. }
  9549. }
  9550. },
  9551. "400": {
  9552. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9553. "content": {
  9554. "application/json": {
  9555. "schema": {
  9556. "anyOf": [
  9557. {
  9558. "$ref": "#/components/schemas/WorkspaceCreateError"
  9559. },
  9560. {
  9561. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9562. },
  9563. {
  9564. "$ref": "#/components/schemas/InvalidRequestError"
  9565. }
  9566. ]
  9567. }
  9568. }
  9569. }
  9570. }
  9571. },
  9572. "description": "Create a workspace for the current project.",
  9573. "summary": "Create workspace",
  9574. "requestBody": {
  9575. "content": {
  9576. "application/json": {
  9577. "schema": {
  9578. "type": "object",
  9579. "properties": {
  9580. "id": {
  9581. "type": "string",
  9582. "pattern": "^wrk"
  9583. },
  9584. "type": {
  9585. "type": "string"
  9586. },
  9587. "branch": {
  9588. "anyOf": [
  9589. {
  9590. "type": "string"
  9591. },
  9592. {
  9593. "type": "null"
  9594. }
  9595. ]
  9596. },
  9597. "extra": {
  9598. "anyOf": [
  9599. {},
  9600. {
  9601. "type": "null"
  9602. }
  9603. ]
  9604. }
  9605. },
  9606. "required": ["type"],
  9607. "additionalProperties": false
  9608. }
  9609. }
  9610. }
  9611. },
  9612. "x-codeSamples": [
  9613. {
  9614. "lang": "js",
  9615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9616. }
  9617. ]
  9618. }
  9619. },
  9620. "/experimental/workspace/sync-list": {
  9621. "post": {
  9622. "tags": ["workspace"],
  9623. "operationId": "experimental.workspace.syncList",
  9624. "parameters": [
  9625. {
  9626. "name": "directory",
  9627. "in": "query",
  9628. "schema": {
  9629. "type": "string"
  9630. },
  9631. "required": false
  9632. },
  9633. {
  9634. "name": "workspace",
  9635. "in": "query",
  9636. "schema": {
  9637. "type": "string"
  9638. },
  9639. "required": false
  9640. }
  9641. ],
  9642. "responses": {
  9643. "204": {
  9644. "description": "Workspace list synced"
  9645. },
  9646. "400": {
  9647. "description": "Bad request",
  9648. "content": {
  9649. "application/json": {
  9650. "schema": {
  9651. "$ref": "#/components/schemas/BadRequestError"
  9652. }
  9653. }
  9654. }
  9655. }
  9656. },
  9657. "description": "Register missing workspaces returned by workspace adapters.",
  9658. "summary": "Sync workspace list",
  9659. "x-codeSamples": [
  9660. {
  9661. "lang": "js",
  9662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9663. }
  9664. ]
  9665. }
  9666. },
  9667. "/experimental/workspace/status": {
  9668. "get": {
  9669. "tags": ["workspace"],
  9670. "operationId": "experimental.workspace.status",
  9671. "parameters": [
  9672. {
  9673. "name": "directory",
  9674. "in": "query",
  9675. "schema": {
  9676. "type": "string"
  9677. },
  9678. "required": false
  9679. },
  9680. {
  9681. "name": "workspace",
  9682. "in": "query",
  9683. "schema": {
  9684. "type": "string"
  9685. },
  9686. "required": false
  9687. }
  9688. ],
  9689. "responses": {
  9690. "200": {
  9691. "description": "Workspace status",
  9692. "content": {
  9693. "application/json": {
  9694. "schema": {
  9695. "type": "array",
  9696. "items": {
  9697. "type": "object",
  9698. "properties": {
  9699. "workspaceID": {
  9700. "type": "string",
  9701. "pattern": "^wrk"
  9702. },
  9703. "status": {
  9704. "type": "string",
  9705. "enum": ["connected", "connecting", "disconnected", "error"]
  9706. }
  9707. },
  9708. "required": ["workspaceID", "status"],
  9709. "additionalProperties": false
  9710. },
  9711. "description": "Workspace status"
  9712. }
  9713. }
  9714. }
  9715. },
  9716. "400": {
  9717. "description": "Bad request",
  9718. "content": {
  9719. "application/json": {
  9720. "schema": {
  9721. "$ref": "#/components/schemas/BadRequestError"
  9722. }
  9723. }
  9724. }
  9725. }
  9726. },
  9727. "description": "Get connection status for workspaces in the current project.",
  9728. "summary": "Workspace status",
  9729. "x-codeSamples": [
  9730. {
  9731. "lang": "js",
  9732. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9733. }
  9734. ]
  9735. }
  9736. },
  9737. "/experimental/workspace/{id}": {
  9738. "delete": {
  9739. "tags": ["workspace"],
  9740. "operationId": "experimental.workspace.remove",
  9741. "parameters": [
  9742. {
  9743. "name": "id",
  9744. "in": "path",
  9745. "schema": {
  9746. "type": "string",
  9747. "pattern": "^wrk"
  9748. },
  9749. "required": true
  9750. },
  9751. {
  9752. "name": "directory",
  9753. "in": "query",
  9754. "schema": {
  9755. "type": "string"
  9756. },
  9757. "required": false
  9758. },
  9759. {
  9760. "name": "workspace",
  9761. "in": "query",
  9762. "schema": {
  9763. "type": "string"
  9764. },
  9765. "required": false
  9766. }
  9767. ],
  9768. "responses": {
  9769. "200": {
  9770. "description": "Workspace removed",
  9771. "content": {
  9772. "application/json": {
  9773. "schema": {
  9774. "$ref": "#/components/schemas/Workspace"
  9775. }
  9776. }
  9777. }
  9778. },
  9779. "400": {
  9780. "description": "BadRequest | InvalidRequestError",
  9781. "content": {
  9782. "application/json": {
  9783. "schema": {
  9784. "anyOf": [
  9785. {
  9786. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9787. },
  9788. {
  9789. "$ref": "#/components/schemas/InvalidRequestError"
  9790. }
  9791. ]
  9792. }
  9793. }
  9794. }
  9795. }
  9796. },
  9797. "description": "Remove an existing workspace.",
  9798. "summary": "Remove workspace",
  9799. "x-codeSamples": [
  9800. {
  9801. "lang": "js",
  9802. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9803. }
  9804. ]
  9805. }
  9806. },
  9807. "/experimental/workspace/warp": {
  9808. "post": {
  9809. "tags": ["workspace"],
  9810. "operationId": "experimental.workspace.warp",
  9811. "parameters": [
  9812. {
  9813. "name": "directory",
  9814. "in": "query",
  9815. "schema": {
  9816. "type": "string"
  9817. },
  9818. "required": false
  9819. },
  9820. {
  9821. "name": "workspace",
  9822. "in": "query",
  9823. "schema": {
  9824. "type": "string"
  9825. },
  9826. "required": false
  9827. }
  9828. ],
  9829. "responses": {
  9830. "204": {
  9831. "description": "Session warped"
  9832. },
  9833. "400": {
  9834. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9835. "content": {
  9836. "application/json": {
  9837. "schema": {
  9838. "anyOf": [
  9839. {
  9840. "$ref": "#/components/schemas/WorkspaceWarpError"
  9841. },
  9842. {
  9843. "$ref": "#/components/schemas/VcsApplyError"
  9844. },
  9845. {
  9846. "$ref": "#/components/schemas/InvalidRequestError"
  9847. }
  9848. ]
  9849. }
  9850. }
  9851. }
  9852. },
  9853. "404": {
  9854. "description": "NotFoundError",
  9855. "content": {
  9856. "application/json": {
  9857. "schema": {
  9858. "$ref": "#/components/schemas/NotFoundError"
  9859. }
  9860. }
  9861. }
  9862. }
  9863. },
  9864. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9865. "summary": "Warp session into workspace",
  9866. "requestBody": {
  9867. "content": {
  9868. "application/json": {
  9869. "schema": {
  9870. "type": "object",
  9871. "properties": {
  9872. "id": {
  9873. "anyOf": [
  9874. {
  9875. "type": "string",
  9876. "pattern": "^wrk"
  9877. },
  9878. {
  9879. "type": "null"
  9880. }
  9881. ]
  9882. },
  9883. "sessionID": {
  9884. "type": "string",
  9885. "pattern": "^ses"
  9886. },
  9887. "copyChanges": {
  9888. "type": "boolean"
  9889. }
  9890. },
  9891. "required": ["id", "sessionID"],
  9892. "additionalProperties": false
  9893. }
  9894. }
  9895. }
  9896. },
  9897. "x-codeSamples": [
  9898. {
  9899. "lang": "js",
  9900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9901. }
  9902. ]
  9903. }
  9904. },
  9905. "/api/health": {
  9906. "get": {
  9907. "tags": ["opencode experimental HttpApi"],
  9908. "operationId": "v2.health.get",
  9909. "parameters": [],
  9910. "security": [],
  9911. "responses": {
  9912. "200": {
  9913. "description": "Success",
  9914. "content": {
  9915. "application/json": {
  9916. "schema": {
  9917. "type": "object",
  9918. "properties": {
  9919. "healthy": {
  9920. "type": "boolean",
  9921. "enum": [true]
  9922. }
  9923. },
  9924. "required": ["healthy"],
  9925. "additionalProperties": false
  9926. }
  9927. }
  9928. }
  9929. },
  9930. "400": {
  9931. "description": "InvalidRequestError",
  9932. "content": {
  9933. "application/json": {
  9934. "schema": {
  9935. "$ref": "#/components/schemas/InvalidRequestError"
  9936. }
  9937. }
  9938. }
  9939. },
  9940. "401": {
  9941. "description": "UnauthorizedError",
  9942. "content": {
  9943. "application/json": {
  9944. "schema": {
  9945. "$ref": "#/components/schemas/UnauthorizedError"
  9946. }
  9947. }
  9948. }
  9949. }
  9950. },
  9951. "description": "Check whether the v2 API server is ready to accept requests.",
  9952. "summary": "Check v2 server health",
  9953. "x-codeSamples": [
  9954. {
  9955. "lang": "js",
  9956. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9957. }
  9958. ]
  9959. }
  9960. },
  9961. "/api/agent": {
  9962. "get": {
  9963. "tags": ["opencode experimental HttpApi"],
  9964. "operationId": "v2.agent.list",
  9965. "parameters": [
  9966. {
  9967. "name": "location",
  9968. "in": "query",
  9969. "schema": {
  9970. "type": "object",
  9971. "properties": {
  9972. "directory": {
  9973. "type": "string"
  9974. },
  9975. "workspace": {
  9976. "type": "string"
  9977. }
  9978. },
  9979. "additionalProperties": false
  9980. },
  9981. "required": false,
  9982. "style": "deepObject",
  9983. "explode": true
  9984. }
  9985. ],
  9986. "security": [],
  9987. "responses": {
  9988. "200": {
  9989. "description": "Success",
  9990. "content": {
  9991. "application/json": {
  9992. "schema": {
  9993. "type": "object",
  9994. "properties": {
  9995. "location": {
  9996. "$ref": "#/components/schemas/LocationInfo"
  9997. },
  9998. "data": {
  9999. "type": "array",
  10000. "items": {
  10001. "$ref": "#/components/schemas/AgentV2Info"
  10002. }
  10003. }
  10004. },
  10005. "required": ["location", "data"],
  10006. "additionalProperties": false
  10007. }
  10008. }
  10009. }
  10010. },
  10011. "400": {
  10012. "description": "InvalidRequestError",
  10013. "content": {
  10014. "application/json": {
  10015. "schema": {
  10016. "$ref": "#/components/schemas/InvalidRequestError"
  10017. }
  10018. }
  10019. }
  10020. },
  10021. "401": {
  10022. "description": "UnauthorizedError",
  10023. "content": {
  10024. "application/json": {
  10025. "schema": {
  10026. "$ref": "#/components/schemas/UnauthorizedError"
  10027. }
  10028. }
  10029. }
  10030. }
  10031. },
  10032. "description": "Retrieve currently registered v2 agents.",
  10033. "summary": "List v2 agents",
  10034. "x-codeSamples": [
  10035. {
  10036. "lang": "js",
  10037. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10038. }
  10039. ]
  10040. }
  10041. },
  10042. "/api/session": {
  10043. "get": {
  10044. "tags": ["v2"],
  10045. "operationId": "v2.session.list",
  10046. "parameters": [
  10047. {
  10048. "name": "workspace",
  10049. "in": "query",
  10050. "schema": {
  10051. "type": "string",
  10052. "pattern": "^wrk"
  10053. },
  10054. "required": false
  10055. },
  10056. {
  10057. "name": "limit",
  10058. "in": "query",
  10059. "schema": {
  10060. "type": "number"
  10061. },
  10062. "required": false
  10063. },
  10064. {
  10065. "name": "order",
  10066. "in": "query",
  10067. "schema": {
  10068. "type": "string",
  10069. "enum": ["asc", "desc"]
  10070. },
  10071. "required": false
  10072. },
  10073. {
  10074. "name": "search",
  10075. "in": "query",
  10076. "schema": {
  10077. "type": "string"
  10078. },
  10079. "required": false
  10080. },
  10081. {
  10082. "name": "directory",
  10083. "in": "query",
  10084. "schema": {
  10085. "type": "string"
  10086. },
  10087. "required": false
  10088. },
  10089. {
  10090. "name": "project",
  10091. "in": "query",
  10092. "schema": {
  10093. "type": "string"
  10094. },
  10095. "required": false
  10096. },
  10097. {
  10098. "name": "subpath",
  10099. "in": "query",
  10100. "schema": {
  10101. "type": "string"
  10102. },
  10103. "required": false
  10104. },
  10105. {
  10106. "name": "cursor",
  10107. "in": "query",
  10108. "schema": {
  10109. "type": "string",
  10110. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10111. },
  10112. "required": false
  10113. }
  10114. ],
  10115. "security": [],
  10116. "responses": {
  10117. "200": {
  10118. "description": "V2SessionsResponse",
  10119. "content": {
  10120. "application/json": {
  10121. "schema": {
  10122. "$ref": "#/components/schemas/V2SessionsResponse"
  10123. }
  10124. }
  10125. }
  10126. },
  10127. "400": {
  10128. "description": "InvalidCursorError | InvalidRequestError",
  10129. "content": {
  10130. "application/json": {
  10131. "schema": {
  10132. "anyOf": [
  10133. {
  10134. "$ref": "#/components/schemas/InvalidCursorError"
  10135. },
  10136. {
  10137. "$ref": "#/components/schemas/InvalidRequestError"
  10138. },
  10139. {
  10140. "$ref": "#/components/schemas/InvalidRequestError"
  10141. }
  10142. ]
  10143. }
  10144. }
  10145. }
  10146. },
  10147. "401": {
  10148. "description": "UnauthorizedError",
  10149. "content": {
  10150. "application/json": {
  10151. "schema": {
  10152. "$ref": "#/components/schemas/UnauthorizedError"
  10153. }
  10154. }
  10155. }
  10156. }
  10157. },
  10158. "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.",
  10159. "summary": "List v2 sessions",
  10160. "x-codeSamples": [
  10161. {
  10162. "lang": "js",
  10163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10164. }
  10165. ]
  10166. }
  10167. },
  10168. "/api/session/{sessionID}/prompt": {
  10169. "post": {
  10170. "tags": ["v2"],
  10171. "operationId": "v2.session.prompt",
  10172. "parameters": [
  10173. {
  10174. "name": "sessionID",
  10175. "in": "path",
  10176. "schema": {
  10177. "type": "string",
  10178. "pattern": "^ses"
  10179. },
  10180. "required": true
  10181. }
  10182. ],
  10183. "security": [],
  10184. "responses": {
  10185. "200": {
  10186. "description": "Success",
  10187. "content": {
  10188. "application/json": {
  10189. "schema": {
  10190. "type": "object",
  10191. "properties": {
  10192. "data": {
  10193. "$ref": "#/components/schemas/SessionInputAdmitted"
  10194. }
  10195. },
  10196. "required": ["data"],
  10197. "additionalProperties": false
  10198. }
  10199. }
  10200. }
  10201. },
  10202. "400": {
  10203. "description": "InvalidRequestError",
  10204. "content": {
  10205. "application/json": {
  10206. "schema": {
  10207. "$ref": "#/components/schemas/InvalidRequestError"
  10208. }
  10209. }
  10210. }
  10211. },
  10212. "401": {
  10213. "description": "UnauthorizedError",
  10214. "content": {
  10215. "application/json": {
  10216. "schema": {
  10217. "$ref": "#/components/schemas/UnauthorizedError"
  10218. }
  10219. }
  10220. }
  10221. },
  10222. "404": {
  10223. "description": "SessionNotFoundError",
  10224. "content": {
  10225. "application/json": {
  10226. "schema": {
  10227. "$ref": "#/components/schemas/SessionNotFoundError"
  10228. }
  10229. }
  10230. }
  10231. },
  10232. "409": {
  10233. "description": "ConflictError",
  10234. "content": {
  10235. "application/json": {
  10236. "schema": {
  10237. "$ref": "#/components/schemas/ConflictError"
  10238. }
  10239. }
  10240. }
  10241. }
  10242. },
  10243. "description": "Durably admit one v2 session input and schedule agent-loop execution unless resume is false.",
  10244. "summary": "Send v2 message",
  10245. "requestBody": {
  10246. "content": {
  10247. "application/json": {
  10248. "schema": {
  10249. "type": "object",
  10250. "properties": {
  10251. "id": {
  10252. "type": "string",
  10253. "pattern": "^msg_"
  10254. },
  10255. "prompt": {
  10256. "$ref": "#/components/schemas/Prompt"
  10257. },
  10258. "delivery": {
  10259. "type": "string",
  10260. "enum": ["steer", "queue"]
  10261. },
  10262. "resume": {
  10263. "type": "boolean"
  10264. }
  10265. },
  10266. "required": ["prompt"],
  10267. "additionalProperties": false
  10268. }
  10269. }
  10270. },
  10271. "required": true
  10272. },
  10273. "x-codeSamples": [
  10274. {
  10275. "lang": "js",
  10276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10277. }
  10278. ]
  10279. }
  10280. },
  10281. "/api/session/{sessionID}/compact": {
  10282. "post": {
  10283. "tags": ["v2"],
  10284. "operationId": "v2.session.compact",
  10285. "parameters": [
  10286. {
  10287. "name": "sessionID",
  10288. "in": "path",
  10289. "schema": {
  10290. "type": "string",
  10291. "pattern": "^ses"
  10292. },
  10293. "required": true
  10294. }
  10295. ],
  10296. "security": [],
  10297. "responses": {
  10298. "204": {
  10299. "description": "<No Content>"
  10300. },
  10301. "400": {
  10302. "description": "InvalidRequestError",
  10303. "content": {
  10304. "application/json": {
  10305. "schema": {
  10306. "$ref": "#/components/schemas/InvalidRequestError"
  10307. }
  10308. }
  10309. }
  10310. },
  10311. "401": {
  10312. "description": "UnauthorizedError",
  10313. "content": {
  10314. "application/json": {
  10315. "schema": {
  10316. "$ref": "#/components/schemas/UnauthorizedError"
  10317. }
  10318. }
  10319. }
  10320. },
  10321. "404": {
  10322. "description": "SessionNotFoundError",
  10323. "content": {
  10324. "application/json": {
  10325. "schema": {
  10326. "$ref": "#/components/schemas/SessionNotFoundError"
  10327. }
  10328. }
  10329. }
  10330. },
  10331. "503": {
  10332. "description": "ServiceUnavailableError",
  10333. "content": {
  10334. "application/json": {
  10335. "schema": {
  10336. "$ref": "#/components/schemas/ServiceUnavailableError"
  10337. }
  10338. }
  10339. }
  10340. }
  10341. },
  10342. "description": "Compact a v2 session conversation.",
  10343. "summary": "Compact v2 session",
  10344. "x-codeSamples": [
  10345. {
  10346. "lang": "js",
  10347. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10348. }
  10349. ]
  10350. }
  10351. },
  10352. "/api/session/{sessionID}/wait": {
  10353. "post": {
  10354. "tags": ["v2"],
  10355. "operationId": "v2.session.wait",
  10356. "parameters": [
  10357. {
  10358. "name": "sessionID",
  10359. "in": "path",
  10360. "schema": {
  10361. "type": "string",
  10362. "pattern": "^ses"
  10363. },
  10364. "required": true
  10365. }
  10366. ],
  10367. "security": [],
  10368. "responses": {
  10369. "204": {
  10370. "description": "<No Content>"
  10371. },
  10372. "400": {
  10373. "description": "InvalidRequestError",
  10374. "content": {
  10375. "application/json": {
  10376. "schema": {
  10377. "$ref": "#/components/schemas/InvalidRequestError"
  10378. }
  10379. }
  10380. }
  10381. },
  10382. "401": {
  10383. "description": "UnauthorizedError",
  10384. "content": {
  10385. "application/json": {
  10386. "schema": {
  10387. "$ref": "#/components/schemas/UnauthorizedError"
  10388. }
  10389. }
  10390. }
  10391. },
  10392. "404": {
  10393. "description": "SessionNotFoundError",
  10394. "content": {
  10395. "application/json": {
  10396. "schema": {
  10397. "$ref": "#/components/schemas/SessionNotFoundError"
  10398. }
  10399. }
  10400. }
  10401. },
  10402. "503": {
  10403. "description": "ServiceUnavailableError",
  10404. "content": {
  10405. "application/json": {
  10406. "schema": {
  10407. "$ref": "#/components/schemas/ServiceUnavailableError"
  10408. }
  10409. }
  10410. }
  10411. }
  10412. },
  10413. "description": "Wait for a v2 session agent loop to become idle.",
  10414. "summary": "Wait for v2 session",
  10415. "x-codeSamples": [
  10416. {
  10417. "lang": "js",
  10418. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10419. }
  10420. ]
  10421. }
  10422. },
  10423. "/api/session/{sessionID}/context": {
  10424. "get": {
  10425. "tags": ["v2"],
  10426. "operationId": "v2.session.context",
  10427. "parameters": [
  10428. {
  10429. "name": "sessionID",
  10430. "in": "path",
  10431. "schema": {
  10432. "type": "string",
  10433. "pattern": "^ses"
  10434. },
  10435. "required": true
  10436. }
  10437. ],
  10438. "security": [],
  10439. "responses": {
  10440. "200": {
  10441. "description": "Success",
  10442. "content": {
  10443. "application/json": {
  10444. "schema": {
  10445. "type": "object",
  10446. "properties": {
  10447. "data": {
  10448. "type": "array",
  10449. "items": {
  10450. "$ref": "#/components/schemas/SessionMessage"
  10451. }
  10452. }
  10453. },
  10454. "required": ["data"],
  10455. "additionalProperties": false
  10456. }
  10457. }
  10458. }
  10459. },
  10460. "400": {
  10461. "description": "InvalidRequestError",
  10462. "content": {
  10463. "application/json": {
  10464. "schema": {
  10465. "$ref": "#/components/schemas/InvalidRequestError"
  10466. }
  10467. }
  10468. }
  10469. },
  10470. "401": {
  10471. "description": "UnauthorizedError",
  10472. "content": {
  10473. "application/json": {
  10474. "schema": {
  10475. "$ref": "#/components/schemas/UnauthorizedError"
  10476. }
  10477. }
  10478. }
  10479. },
  10480. "404": {
  10481. "description": "SessionNotFoundError",
  10482. "content": {
  10483. "application/json": {
  10484. "schema": {
  10485. "$ref": "#/components/schemas/SessionNotFoundError"
  10486. }
  10487. }
  10488. }
  10489. },
  10490. "500": {
  10491. "description": "UnknownError",
  10492. "content": {
  10493. "application/json": {
  10494. "schema": {
  10495. "$ref": "#/components/schemas/UnknownError1"
  10496. }
  10497. }
  10498. }
  10499. }
  10500. },
  10501. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  10502. "summary": "Get v2 session context",
  10503. "x-codeSamples": [
  10504. {
  10505. "lang": "js",
  10506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10507. }
  10508. ]
  10509. }
  10510. },
  10511. "/api/session/{sessionID}/message": {
  10512. "get": {
  10513. "tags": ["v2 messages"],
  10514. "operationId": "v2.session.messages",
  10515. "parameters": [
  10516. {
  10517. "name": "sessionID",
  10518. "in": "path",
  10519. "schema": {
  10520. "type": "string",
  10521. "pattern": "^ses"
  10522. },
  10523. "required": true
  10524. },
  10525. {
  10526. "name": "limit",
  10527. "in": "query",
  10528. "schema": {
  10529. "type": "number"
  10530. },
  10531. "required": false
  10532. },
  10533. {
  10534. "name": "order",
  10535. "in": "query",
  10536. "schema": {
  10537. "type": "string",
  10538. "enum": ["asc", "desc"]
  10539. },
  10540. "required": false
  10541. },
  10542. {
  10543. "name": "cursor",
  10544. "in": "query",
  10545. "schema": {
  10546. "type": "string",
  10547. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10548. },
  10549. "required": false
  10550. }
  10551. ],
  10552. "security": [],
  10553. "responses": {
  10554. "200": {
  10555. "description": "V2SessionMessagesResponse",
  10556. "content": {
  10557. "application/json": {
  10558. "schema": {
  10559. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  10560. }
  10561. }
  10562. }
  10563. },
  10564. "400": {
  10565. "description": "InvalidCursorError | InvalidRequestError",
  10566. "content": {
  10567. "application/json": {
  10568. "schema": {
  10569. "anyOf": [
  10570. {
  10571. "$ref": "#/components/schemas/InvalidCursorError"
  10572. },
  10573. {
  10574. "$ref": "#/components/schemas/InvalidRequestError"
  10575. }
  10576. ]
  10577. }
  10578. }
  10579. }
  10580. },
  10581. "401": {
  10582. "description": "UnauthorizedError",
  10583. "content": {
  10584. "application/json": {
  10585. "schema": {
  10586. "$ref": "#/components/schemas/UnauthorizedError"
  10587. }
  10588. }
  10589. }
  10590. },
  10591. "404": {
  10592. "description": "SessionNotFoundError",
  10593. "content": {
  10594. "application/json": {
  10595. "schema": {
  10596. "$ref": "#/components/schemas/SessionNotFoundError"
  10597. }
  10598. }
  10599. }
  10600. },
  10601. "500": {
  10602. "description": "UnknownError",
  10603. "content": {
  10604. "application/json": {
  10605. "schema": {
  10606. "$ref": "#/components/schemas/UnknownError1"
  10607. }
  10608. }
  10609. }
  10610. }
  10611. },
  10612. "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.",
  10613. "summary": "Get v2 session messages",
  10614. "x-codeSamples": [
  10615. {
  10616. "lang": "js",
  10617. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10618. }
  10619. ]
  10620. }
  10621. },
  10622. "/api/model": {
  10623. "get": {
  10624. "tags": ["v2 models"],
  10625. "operationId": "v2.model.list",
  10626. "parameters": [
  10627. {
  10628. "name": "location",
  10629. "in": "query",
  10630. "schema": {
  10631. "type": "object",
  10632. "properties": {
  10633. "directory": {
  10634. "type": "string"
  10635. },
  10636. "workspace": {
  10637. "type": "string"
  10638. }
  10639. },
  10640. "additionalProperties": false
  10641. },
  10642. "required": false,
  10643. "style": "deepObject",
  10644. "explode": true
  10645. }
  10646. ],
  10647. "security": [],
  10648. "responses": {
  10649. "200": {
  10650. "description": "Success",
  10651. "content": {
  10652. "application/json": {
  10653. "schema": {
  10654. "type": "object",
  10655. "properties": {
  10656. "location": {
  10657. "$ref": "#/components/schemas/LocationInfo"
  10658. },
  10659. "data": {
  10660. "type": "array",
  10661. "items": {
  10662. "$ref": "#/components/schemas/ModelV2Info"
  10663. }
  10664. }
  10665. },
  10666. "required": ["location", "data"],
  10667. "additionalProperties": false
  10668. }
  10669. }
  10670. }
  10671. },
  10672. "400": {
  10673. "description": "InvalidRequestError",
  10674. "content": {
  10675. "application/json": {
  10676. "schema": {
  10677. "$ref": "#/components/schemas/InvalidRequestError"
  10678. }
  10679. }
  10680. }
  10681. },
  10682. "401": {
  10683. "description": "UnauthorizedError",
  10684. "content": {
  10685. "application/json": {
  10686. "schema": {
  10687. "$ref": "#/components/schemas/UnauthorizedError"
  10688. }
  10689. }
  10690. }
  10691. },
  10692. "503": {
  10693. "description": "ServiceUnavailableError",
  10694. "content": {
  10695. "application/json": {
  10696. "schema": {
  10697. "$ref": "#/components/schemas/ServiceUnavailableError"
  10698. }
  10699. }
  10700. }
  10701. }
  10702. },
  10703. "description": "Retrieve available v2 models ordered by release date.",
  10704. "summary": "List v2 models",
  10705. "x-codeSamples": [
  10706. {
  10707. "lang": "js",
  10708. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10709. }
  10710. ]
  10711. }
  10712. },
  10713. "/api/provider": {
  10714. "get": {
  10715. "tags": ["v2 providers"],
  10716. "operationId": "v2.provider.list",
  10717. "parameters": [
  10718. {
  10719. "name": "location",
  10720. "in": "query",
  10721. "schema": {
  10722. "type": "object",
  10723. "properties": {
  10724. "directory": {
  10725. "type": "string"
  10726. },
  10727. "workspace": {
  10728. "type": "string"
  10729. }
  10730. },
  10731. "additionalProperties": false
  10732. },
  10733. "required": false,
  10734. "style": "deepObject",
  10735. "explode": true
  10736. }
  10737. ],
  10738. "security": [],
  10739. "responses": {
  10740. "200": {
  10741. "description": "Success",
  10742. "content": {
  10743. "application/json": {
  10744. "schema": {
  10745. "type": "object",
  10746. "properties": {
  10747. "location": {
  10748. "$ref": "#/components/schemas/LocationInfo"
  10749. },
  10750. "data": {
  10751. "type": "array",
  10752. "items": {
  10753. "$ref": "#/components/schemas/ProviderV2Info"
  10754. }
  10755. }
  10756. },
  10757. "required": ["location", "data"],
  10758. "additionalProperties": false
  10759. }
  10760. }
  10761. }
  10762. },
  10763. "400": {
  10764. "description": "InvalidRequestError",
  10765. "content": {
  10766. "application/json": {
  10767. "schema": {
  10768. "$ref": "#/components/schemas/InvalidRequestError"
  10769. }
  10770. }
  10771. }
  10772. },
  10773. "401": {
  10774. "description": "UnauthorizedError",
  10775. "content": {
  10776. "application/json": {
  10777. "schema": {
  10778. "$ref": "#/components/schemas/UnauthorizedError"
  10779. }
  10780. }
  10781. }
  10782. },
  10783. "503": {
  10784. "description": "ServiceUnavailableError",
  10785. "content": {
  10786. "application/json": {
  10787. "schema": {
  10788. "$ref": "#/components/schemas/ServiceUnavailableError"
  10789. }
  10790. }
  10791. }
  10792. }
  10793. },
  10794. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  10795. "summary": "List v2 providers",
  10796. "x-codeSamples": [
  10797. {
  10798. "lang": "js",
  10799. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10800. }
  10801. ]
  10802. }
  10803. },
  10804. "/api/provider/{providerID}": {
  10805. "get": {
  10806. "tags": ["v2 providers"],
  10807. "operationId": "v2.provider.get",
  10808. "parameters": [
  10809. {
  10810. "name": "providerID",
  10811. "in": "path",
  10812. "schema": {
  10813. "type": "string"
  10814. },
  10815. "required": true
  10816. },
  10817. {
  10818. "name": "location",
  10819. "in": "query",
  10820. "schema": {
  10821. "type": "object",
  10822. "properties": {
  10823. "directory": {
  10824. "type": "string"
  10825. },
  10826. "workspace": {
  10827. "type": "string"
  10828. }
  10829. },
  10830. "additionalProperties": false
  10831. },
  10832. "required": false,
  10833. "style": "deepObject",
  10834. "explode": true
  10835. }
  10836. ],
  10837. "security": [],
  10838. "responses": {
  10839. "200": {
  10840. "description": "Success",
  10841. "content": {
  10842. "application/json": {
  10843. "schema": {
  10844. "type": "object",
  10845. "properties": {
  10846. "location": {
  10847. "$ref": "#/components/schemas/LocationInfo"
  10848. },
  10849. "data": {
  10850. "$ref": "#/components/schemas/ProviderV2Info"
  10851. }
  10852. },
  10853. "required": ["location", "data"],
  10854. "additionalProperties": false
  10855. }
  10856. }
  10857. }
  10858. },
  10859. "400": {
  10860. "description": "InvalidRequestError",
  10861. "content": {
  10862. "application/json": {
  10863. "schema": {
  10864. "$ref": "#/components/schemas/InvalidRequestError"
  10865. }
  10866. }
  10867. }
  10868. },
  10869. "401": {
  10870. "description": "UnauthorizedError",
  10871. "content": {
  10872. "application/json": {
  10873. "schema": {
  10874. "$ref": "#/components/schemas/UnauthorizedError"
  10875. }
  10876. }
  10877. }
  10878. },
  10879. "404": {
  10880. "description": "ProviderNotFoundError",
  10881. "content": {
  10882. "application/json": {
  10883. "schema": {
  10884. "$ref": "#/components/schemas/ProviderNotFoundError"
  10885. }
  10886. }
  10887. }
  10888. },
  10889. "503": {
  10890. "description": "ServiceUnavailableError",
  10891. "content": {
  10892. "application/json": {
  10893. "schema": {
  10894. "$ref": "#/components/schemas/ServiceUnavailableError"
  10895. }
  10896. }
  10897. }
  10898. }
  10899. },
  10900. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  10901. "summary": "Get v2 provider",
  10902. "x-codeSamples": [
  10903. {
  10904. "lang": "js",
  10905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  10906. }
  10907. ]
  10908. }
  10909. },
  10910. "/api/permission/request": {
  10911. "get": {
  10912. "tags": ["v2 permissions"],
  10913. "operationId": "v2.permission.request.list",
  10914. "parameters": [
  10915. {
  10916. "name": "location",
  10917. "in": "query",
  10918. "schema": {
  10919. "type": "object",
  10920. "properties": {
  10921. "directory": {
  10922. "type": "string"
  10923. },
  10924. "workspace": {
  10925. "type": "string"
  10926. }
  10927. },
  10928. "additionalProperties": false
  10929. },
  10930. "required": false,
  10931. "style": "deepObject",
  10932. "explode": true
  10933. }
  10934. ],
  10935. "security": [],
  10936. "responses": {
  10937. "200": {
  10938. "description": "Success",
  10939. "content": {
  10940. "application/json": {
  10941. "schema": {
  10942. "type": "object",
  10943. "properties": {
  10944. "location": {
  10945. "$ref": "#/components/schemas/LocationInfo"
  10946. },
  10947. "data": {
  10948. "type": "array",
  10949. "items": {
  10950. "$ref": "#/components/schemas/PermissionV2Request"
  10951. }
  10952. }
  10953. },
  10954. "required": ["location", "data"],
  10955. "additionalProperties": false
  10956. }
  10957. }
  10958. }
  10959. },
  10960. "400": {
  10961. "description": "InvalidRequestError",
  10962. "content": {
  10963. "application/json": {
  10964. "schema": {
  10965. "$ref": "#/components/schemas/InvalidRequestError"
  10966. }
  10967. }
  10968. }
  10969. },
  10970. "401": {
  10971. "description": "UnauthorizedError",
  10972. "content": {
  10973. "application/json": {
  10974. "schema": {
  10975. "$ref": "#/components/schemas/UnauthorizedError"
  10976. }
  10977. }
  10978. }
  10979. }
  10980. },
  10981. "description": "Retrieve pending permission requests for a location.",
  10982. "summary": "List pending permission requests",
  10983. "x-codeSamples": [
  10984. {
  10985. "lang": "js",
  10986. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  10987. }
  10988. ]
  10989. }
  10990. },
  10991. "/api/session/{sessionID}/permission/request": {
  10992. "get": {
  10993. "tags": ["v2 session permissions"],
  10994. "operationId": "v2.session.permission.list",
  10995. "parameters": [
  10996. {
  10997. "name": "sessionID",
  10998. "in": "path",
  10999. "schema": {
  11000. "type": "string",
  11001. "pattern": "^ses"
  11002. },
  11003. "required": true
  11004. }
  11005. ],
  11006. "security": [],
  11007. "responses": {
  11008. "200": {
  11009. "description": "Success",
  11010. "content": {
  11011. "application/json": {
  11012. "schema": {
  11013. "type": "object",
  11014. "properties": {
  11015. "data": {
  11016. "type": "array",
  11017. "items": {
  11018. "$ref": "#/components/schemas/PermissionV2Request"
  11019. }
  11020. }
  11021. },
  11022. "required": ["data"],
  11023. "additionalProperties": false
  11024. }
  11025. }
  11026. }
  11027. },
  11028. "400": {
  11029. "description": "InvalidRequestError",
  11030. "content": {
  11031. "application/json": {
  11032. "schema": {
  11033. "$ref": "#/components/schemas/InvalidRequestError"
  11034. }
  11035. }
  11036. }
  11037. },
  11038. "401": {
  11039. "description": "UnauthorizedError",
  11040. "content": {
  11041. "application/json": {
  11042. "schema": {
  11043. "$ref": "#/components/schemas/UnauthorizedError"
  11044. }
  11045. }
  11046. }
  11047. },
  11048. "404": {
  11049. "description": "SessionNotFoundError",
  11050. "content": {
  11051. "application/json": {
  11052. "schema": {
  11053. "$ref": "#/components/schemas/SessionNotFoundError"
  11054. }
  11055. }
  11056. }
  11057. }
  11058. },
  11059. "description": "Retrieve pending permission requests owned by a session.",
  11060. "summary": "List session permission requests",
  11061. "x-codeSamples": [
  11062. {
  11063. "lang": "js",
  11064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  11065. }
  11066. ]
  11067. }
  11068. },
  11069. "/api/session/{sessionID}/permission/request/{requestID}/reply": {
  11070. "post": {
  11071. "tags": ["v2 session permissions"],
  11072. "operationId": "v2.session.permission.reply",
  11073. "parameters": [
  11074. {
  11075. "name": "sessionID",
  11076. "in": "path",
  11077. "schema": {
  11078. "type": "string",
  11079. "pattern": "^ses"
  11080. },
  11081. "required": true
  11082. },
  11083. {
  11084. "name": "requestID",
  11085. "in": "path",
  11086. "schema": {
  11087. "type": "string",
  11088. "pattern": "^per"
  11089. },
  11090. "required": true
  11091. }
  11092. ],
  11093. "security": [],
  11094. "responses": {
  11095. "204": {
  11096. "description": "<No Content>"
  11097. },
  11098. "400": {
  11099. "description": "InvalidRequestError",
  11100. "content": {
  11101. "application/json": {
  11102. "schema": {
  11103. "$ref": "#/components/schemas/InvalidRequestError"
  11104. }
  11105. }
  11106. }
  11107. },
  11108. "401": {
  11109. "description": "UnauthorizedError",
  11110. "content": {
  11111. "application/json": {
  11112. "schema": {
  11113. "$ref": "#/components/schemas/UnauthorizedError"
  11114. }
  11115. }
  11116. }
  11117. },
  11118. "404": {
  11119. "description": "SessionNotFoundError | PermissionNotFoundError",
  11120. "content": {
  11121. "application/json": {
  11122. "schema": {
  11123. "anyOf": [
  11124. {
  11125. "$ref": "#/components/schemas/SessionNotFoundError"
  11126. },
  11127. {
  11128. "$ref": "#/components/schemas/PermissionNotFoundError"
  11129. }
  11130. ]
  11131. }
  11132. }
  11133. }
  11134. }
  11135. },
  11136. "description": "Respond to a pending permission request owned by a session.",
  11137. "summary": "Reply to pending permission request",
  11138. "requestBody": {
  11139. "content": {
  11140. "application/json": {
  11141. "schema": {
  11142. "type": "object",
  11143. "properties": {
  11144. "reply": {
  11145. "$ref": "#/components/schemas/PermissionV2Reply"
  11146. },
  11147. "message": {
  11148. "type": "string"
  11149. }
  11150. },
  11151. "required": ["reply"],
  11152. "additionalProperties": false
  11153. }
  11154. }
  11155. },
  11156. "required": true
  11157. },
  11158. "x-codeSamples": [
  11159. {
  11160. "lang": "js",
  11161. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  11162. }
  11163. ]
  11164. }
  11165. },
  11166. "/api/permission/saved": {
  11167. "get": {
  11168. "tags": ["v2 saved permissions"],
  11169. "operationId": "v2.permission.saved.list",
  11170. "parameters": [
  11171. {
  11172. "name": "projectID",
  11173. "in": "query",
  11174. "schema": {
  11175. "type": "string"
  11176. },
  11177. "required": false
  11178. }
  11179. ],
  11180. "security": [],
  11181. "responses": {
  11182. "200": {
  11183. "description": "Success",
  11184. "content": {
  11185. "application/json": {
  11186. "schema": {
  11187. "type": "object",
  11188. "properties": {
  11189. "data": {
  11190. "type": "array",
  11191. "items": {
  11192. "$ref": "#/components/schemas/PermissionSavedInfo"
  11193. }
  11194. }
  11195. },
  11196. "required": ["data"],
  11197. "additionalProperties": false
  11198. }
  11199. }
  11200. }
  11201. },
  11202. "400": {
  11203. "description": "InvalidRequestError",
  11204. "content": {
  11205. "application/json": {
  11206. "schema": {
  11207. "$ref": "#/components/schemas/InvalidRequestError"
  11208. }
  11209. }
  11210. }
  11211. },
  11212. "401": {
  11213. "description": "UnauthorizedError",
  11214. "content": {
  11215. "application/json": {
  11216. "schema": {
  11217. "$ref": "#/components/schemas/UnauthorizedError"
  11218. }
  11219. }
  11220. }
  11221. }
  11222. },
  11223. "description": "Retrieve saved permissions, optionally filtered by project.",
  11224. "summary": "List saved permissions",
  11225. "x-codeSamples": [
  11226. {
  11227. "lang": "js",
  11228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  11229. }
  11230. ]
  11231. }
  11232. },
  11233. "/api/permission/saved/{id}": {
  11234. "delete": {
  11235. "tags": ["v2 saved permissions"],
  11236. "operationId": "v2.permission.saved.remove",
  11237. "parameters": [
  11238. {
  11239. "name": "id",
  11240. "in": "path",
  11241. "schema": {
  11242. "type": "string"
  11243. },
  11244. "required": true
  11245. }
  11246. ],
  11247. "security": [],
  11248. "responses": {
  11249. "204": {
  11250. "description": "<No Content>"
  11251. },
  11252. "400": {
  11253. "description": "InvalidRequestError",
  11254. "content": {
  11255. "application/json": {
  11256. "schema": {
  11257. "$ref": "#/components/schemas/InvalidRequestError"
  11258. }
  11259. }
  11260. }
  11261. },
  11262. "401": {
  11263. "description": "UnauthorizedError",
  11264. "content": {
  11265. "application/json": {
  11266. "schema": {
  11267. "$ref": "#/components/schemas/UnauthorizedError"
  11268. }
  11269. }
  11270. }
  11271. }
  11272. },
  11273. "description": "Remove a saved permission by ID.",
  11274. "summary": "Remove saved permission",
  11275. "x-codeSamples": [
  11276. {
  11277. "lang": "js",
  11278. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  11279. }
  11280. ]
  11281. }
  11282. },
  11283. "/api/fs/read": {
  11284. "get": {
  11285. "tags": ["v2 filesystem"],
  11286. "operationId": "v2.fs.read",
  11287. "parameters": [
  11288. {
  11289. "name": "location",
  11290. "in": "query",
  11291. "schema": {
  11292. "type": "object",
  11293. "properties": {
  11294. "directory": {
  11295. "type": "string"
  11296. },
  11297. "workspace": {
  11298. "type": "string"
  11299. }
  11300. },
  11301. "additionalProperties": false
  11302. },
  11303. "required": false,
  11304. "style": "deepObject",
  11305. "explode": true
  11306. },
  11307. {
  11308. "name": "path",
  11309. "in": "query",
  11310. "schema": {
  11311. "type": "string"
  11312. },
  11313. "required": true
  11314. },
  11315. {
  11316. "name": "reference",
  11317. "in": "query",
  11318. "schema": {
  11319. "type": "string"
  11320. },
  11321. "required": false
  11322. }
  11323. ],
  11324. "security": [],
  11325. "responses": {
  11326. "200": {
  11327. "description": "Success",
  11328. "content": {
  11329. "application/json": {
  11330. "schema": {
  11331. "type": "object",
  11332. "properties": {
  11333. "location": {
  11334. "$ref": "#/components/schemas/LocationInfo"
  11335. },
  11336. "data": {
  11337. "anyOf": [
  11338. {
  11339. "$ref": "#/components/schemas/FileSystemTextContent"
  11340. },
  11341. {
  11342. "$ref": "#/components/schemas/FileSystemBinaryContent"
  11343. }
  11344. ]
  11345. }
  11346. },
  11347. "required": ["location", "data"],
  11348. "additionalProperties": false
  11349. }
  11350. }
  11351. }
  11352. },
  11353. "400": {
  11354. "description": "InvalidRequestError",
  11355. "content": {
  11356. "application/json": {
  11357. "schema": {
  11358. "$ref": "#/components/schemas/InvalidRequestError"
  11359. }
  11360. }
  11361. }
  11362. },
  11363. "401": {
  11364. "description": "UnauthorizedError",
  11365. "content": {
  11366. "application/json": {
  11367. "schema": {
  11368. "$ref": "#/components/schemas/UnauthorizedError"
  11369. }
  11370. }
  11371. }
  11372. }
  11373. },
  11374. "description": "Read one file relative to the requested location.",
  11375. "summary": "Read file",
  11376. "x-codeSamples": [
  11377. {
  11378. "lang": "js",
  11379. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  11380. }
  11381. ]
  11382. }
  11383. },
  11384. "/api/fs/list": {
  11385. "get": {
  11386. "tags": ["v2 filesystem"],
  11387. "operationId": "v2.fs.list",
  11388. "parameters": [
  11389. {
  11390. "name": "location",
  11391. "in": "query",
  11392. "schema": {
  11393. "type": "object",
  11394. "properties": {
  11395. "directory": {
  11396. "type": "string"
  11397. },
  11398. "workspace": {
  11399. "type": "string"
  11400. }
  11401. },
  11402. "additionalProperties": false
  11403. },
  11404. "required": false,
  11405. "style": "deepObject",
  11406. "explode": true
  11407. },
  11408. {
  11409. "name": "path",
  11410. "in": "query",
  11411. "schema": {
  11412. "type": "string"
  11413. },
  11414. "required": false
  11415. },
  11416. {
  11417. "name": "reference",
  11418. "in": "query",
  11419. "schema": {
  11420. "type": "string"
  11421. },
  11422. "required": false
  11423. }
  11424. ],
  11425. "security": [],
  11426. "responses": {
  11427. "200": {
  11428. "description": "Success",
  11429. "content": {
  11430. "application/json": {
  11431. "schema": {
  11432. "type": "object",
  11433. "properties": {
  11434. "location": {
  11435. "$ref": "#/components/schemas/LocationInfo"
  11436. },
  11437. "data": {
  11438. "type": "array",
  11439. "items": {
  11440. "$ref": "#/components/schemas/FileSystemEntry"
  11441. }
  11442. }
  11443. },
  11444. "required": ["location", "data"],
  11445. "additionalProperties": false
  11446. }
  11447. }
  11448. }
  11449. },
  11450. "400": {
  11451. "description": "InvalidRequestError",
  11452. "content": {
  11453. "application/json": {
  11454. "schema": {
  11455. "$ref": "#/components/schemas/InvalidRequestError"
  11456. }
  11457. }
  11458. }
  11459. },
  11460. "401": {
  11461. "description": "UnauthorizedError",
  11462. "content": {
  11463. "application/json": {
  11464. "schema": {
  11465. "$ref": "#/components/schemas/UnauthorizedError"
  11466. }
  11467. }
  11468. }
  11469. }
  11470. },
  11471. "description": "List direct children of one directory relative to the requested location.",
  11472. "summary": "List directory",
  11473. "x-codeSamples": [
  11474. {
  11475. "lang": "js",
  11476. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  11477. }
  11478. ]
  11479. }
  11480. },
  11481. "/api/command": {
  11482. "get": {
  11483. "tags": ["v2 commands"],
  11484. "operationId": "v2.command.list",
  11485. "parameters": [
  11486. {
  11487. "name": "location",
  11488. "in": "query",
  11489. "schema": {
  11490. "type": "object",
  11491. "properties": {
  11492. "directory": {
  11493. "type": "string"
  11494. },
  11495. "workspace": {
  11496. "type": "string"
  11497. }
  11498. },
  11499. "additionalProperties": false
  11500. },
  11501. "required": false,
  11502. "style": "deepObject",
  11503. "explode": true
  11504. }
  11505. ],
  11506. "security": [],
  11507. "responses": {
  11508. "200": {
  11509. "description": "Success",
  11510. "content": {
  11511. "application/json": {
  11512. "schema": {
  11513. "type": "object",
  11514. "properties": {
  11515. "location": {
  11516. "$ref": "#/components/schemas/LocationInfo"
  11517. },
  11518. "data": {
  11519. "type": "array",
  11520. "items": {
  11521. "$ref": "#/components/schemas/CommandV2Info"
  11522. }
  11523. }
  11524. },
  11525. "required": ["location", "data"],
  11526. "additionalProperties": false
  11527. }
  11528. }
  11529. }
  11530. },
  11531. "400": {
  11532. "description": "InvalidRequestError",
  11533. "content": {
  11534. "application/json": {
  11535. "schema": {
  11536. "$ref": "#/components/schemas/InvalidRequestError"
  11537. }
  11538. }
  11539. }
  11540. },
  11541. "401": {
  11542. "description": "UnauthorizedError",
  11543. "content": {
  11544. "application/json": {
  11545. "schema": {
  11546. "$ref": "#/components/schemas/UnauthorizedError"
  11547. }
  11548. }
  11549. }
  11550. }
  11551. },
  11552. "description": "Retrieve currently registered v2 commands.",
  11553. "summary": "List v2 commands",
  11554. "x-codeSamples": [
  11555. {
  11556. "lang": "js",
  11557. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  11558. }
  11559. ]
  11560. }
  11561. },
  11562. "/api/skill": {
  11563. "get": {
  11564. "tags": ["v2 skills"],
  11565. "operationId": "v2.skill.list",
  11566. "parameters": [
  11567. {
  11568. "name": "location",
  11569. "in": "query",
  11570. "schema": {
  11571. "type": "object",
  11572. "properties": {
  11573. "directory": {
  11574. "type": "string"
  11575. },
  11576. "workspace": {
  11577. "type": "string"
  11578. }
  11579. },
  11580. "additionalProperties": false
  11581. },
  11582. "required": false,
  11583. "style": "deepObject",
  11584. "explode": true
  11585. }
  11586. ],
  11587. "security": [],
  11588. "responses": {
  11589. "200": {
  11590. "description": "Success",
  11591. "content": {
  11592. "application/json": {
  11593. "schema": {
  11594. "type": "object",
  11595. "properties": {
  11596. "location": {
  11597. "$ref": "#/components/schemas/LocationInfo"
  11598. },
  11599. "data": {
  11600. "type": "array",
  11601. "items": {
  11602. "$ref": "#/components/schemas/SkillV2Info"
  11603. }
  11604. }
  11605. },
  11606. "required": ["location", "data"],
  11607. "additionalProperties": false
  11608. }
  11609. }
  11610. }
  11611. },
  11612. "400": {
  11613. "description": "InvalidRequestError",
  11614. "content": {
  11615. "application/json": {
  11616. "schema": {
  11617. "$ref": "#/components/schemas/InvalidRequestError"
  11618. }
  11619. }
  11620. }
  11621. },
  11622. "401": {
  11623. "description": "UnauthorizedError",
  11624. "content": {
  11625. "application/json": {
  11626. "schema": {
  11627. "$ref": "#/components/schemas/UnauthorizedError"
  11628. }
  11629. }
  11630. }
  11631. }
  11632. },
  11633. "description": "Retrieve currently registered v2 skills.",
  11634. "summary": "List v2 skills",
  11635. "x-codeSamples": [
  11636. {
  11637. "lang": "js",
  11638. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  11639. }
  11640. ]
  11641. }
  11642. },
  11643. "/api/event": {
  11644. "get": {
  11645. "tags": ["v2 events"],
  11646. "operationId": "v2.event.subscribe",
  11647. "parameters": [
  11648. {
  11649. "name": "location",
  11650. "in": "query",
  11651. "schema": {
  11652. "type": "object",
  11653. "properties": {
  11654. "directory": {
  11655. "type": "string"
  11656. },
  11657. "workspace": {
  11658. "type": "string"
  11659. }
  11660. },
  11661. "additionalProperties": false
  11662. },
  11663. "required": false,
  11664. "style": "deepObject",
  11665. "explode": true
  11666. }
  11667. ],
  11668. "security": [],
  11669. "responses": {
  11670. "200": {
  11671. "description": "Success",
  11672. "content": {
  11673. "text/event-stream": {
  11674. "schema": {
  11675. "type": "string"
  11676. }
  11677. }
  11678. }
  11679. },
  11680. "400": {
  11681. "description": "InvalidRequestError",
  11682. "content": {
  11683. "application/json": {
  11684. "schema": {
  11685. "$ref": "#/components/schemas/InvalidRequestError"
  11686. }
  11687. }
  11688. }
  11689. },
  11690. "401": {
  11691. "description": "UnauthorizedError",
  11692. "content": {
  11693. "application/json": {
  11694. "schema": {
  11695. "$ref": "#/components/schemas/UnauthorizedError"
  11696. }
  11697. }
  11698. }
  11699. }
  11700. },
  11701. "description": "Subscribe to native EventV2 payloads for a location.",
  11702. "summary": "Subscribe to v2 events",
  11703. "x-codeSamples": [
  11704. {
  11705. "lang": "js",
  11706. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  11707. }
  11708. ]
  11709. }
  11710. },
  11711. "/api/question/request": {
  11712. "get": {
  11713. "tags": ["v2 questions"],
  11714. "operationId": "v2.question.request.list",
  11715. "parameters": [
  11716. {
  11717. "name": "location",
  11718. "in": "query",
  11719. "schema": {
  11720. "type": "object",
  11721. "properties": {
  11722. "directory": {
  11723. "type": "string"
  11724. },
  11725. "workspace": {
  11726. "type": "string"
  11727. }
  11728. },
  11729. "additionalProperties": false
  11730. },
  11731. "required": false,
  11732. "style": "deepObject",
  11733. "explode": true
  11734. }
  11735. ],
  11736. "security": [],
  11737. "responses": {
  11738. "200": {
  11739. "description": "Success",
  11740. "content": {
  11741. "application/json": {
  11742. "schema": {
  11743. "type": "object",
  11744. "properties": {
  11745. "location": {
  11746. "$ref": "#/components/schemas/LocationInfo"
  11747. },
  11748. "data": {
  11749. "type": "array",
  11750. "items": {
  11751. "$ref": "#/components/schemas/QuestionV2Request"
  11752. }
  11753. }
  11754. },
  11755. "required": ["location", "data"],
  11756. "additionalProperties": false
  11757. }
  11758. }
  11759. }
  11760. },
  11761. "400": {
  11762. "description": "InvalidRequestError",
  11763. "content": {
  11764. "application/json": {
  11765. "schema": {
  11766. "$ref": "#/components/schemas/InvalidRequestError"
  11767. }
  11768. }
  11769. }
  11770. },
  11771. "401": {
  11772. "description": "UnauthorizedError",
  11773. "content": {
  11774. "application/json": {
  11775. "schema": {
  11776. "$ref": "#/components/schemas/UnauthorizedError"
  11777. }
  11778. }
  11779. }
  11780. }
  11781. },
  11782. "description": "Retrieve pending question requests for a location.",
  11783. "summary": "List pending question requests",
  11784. "x-codeSamples": [
  11785. {
  11786. "lang": "js",
  11787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  11788. }
  11789. ]
  11790. }
  11791. },
  11792. "/api/session/{sessionID}/question/request/{requestID}/reply": {
  11793. "post": {
  11794. "tags": ["v2 session questions"],
  11795. "operationId": "v2.session.question.reply",
  11796. "parameters": [
  11797. {
  11798. "name": "sessionID",
  11799. "in": "path",
  11800. "schema": {
  11801. "type": "string",
  11802. "pattern": "^ses"
  11803. },
  11804. "required": true
  11805. },
  11806. {
  11807. "name": "requestID",
  11808. "in": "path",
  11809. "schema": {
  11810. "type": "string",
  11811. "pattern": "^que"
  11812. },
  11813. "required": true
  11814. }
  11815. ],
  11816. "security": [],
  11817. "responses": {
  11818. "204": {
  11819. "description": "<No Content>"
  11820. },
  11821. "400": {
  11822. "description": "InvalidRequestError",
  11823. "content": {
  11824. "application/json": {
  11825. "schema": {
  11826. "$ref": "#/components/schemas/InvalidRequestError"
  11827. }
  11828. }
  11829. }
  11830. },
  11831. "401": {
  11832. "description": "UnauthorizedError",
  11833. "content": {
  11834. "application/json": {
  11835. "schema": {
  11836. "$ref": "#/components/schemas/UnauthorizedError"
  11837. }
  11838. }
  11839. }
  11840. },
  11841. "404": {
  11842. "description": "SessionNotFoundError | QuestionNotFoundError",
  11843. "content": {
  11844. "application/json": {
  11845. "schema": {
  11846. "anyOf": [
  11847. {
  11848. "$ref": "#/components/schemas/SessionNotFoundError"
  11849. },
  11850. {
  11851. "$ref": "#/components/schemas/QuestionNotFoundError"
  11852. }
  11853. ]
  11854. }
  11855. }
  11856. }
  11857. }
  11858. },
  11859. "description": "Answer a pending question request owned by a session.",
  11860. "summary": "Reply to pending question request",
  11861. "requestBody": {
  11862. "content": {
  11863. "application/json": {
  11864. "schema": {
  11865. "$ref": "#/components/schemas/QuestionV2Reply"
  11866. }
  11867. }
  11868. },
  11869. "required": true
  11870. },
  11871. "x-codeSamples": [
  11872. {
  11873. "lang": "js",
  11874. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  11875. }
  11876. ]
  11877. }
  11878. },
  11879. "/api/session/{sessionID}/question/request/{requestID}/reject": {
  11880. "post": {
  11881. "tags": ["v2 session questions"],
  11882. "operationId": "v2.session.question.reject",
  11883. "parameters": [
  11884. {
  11885. "name": "sessionID",
  11886. "in": "path",
  11887. "schema": {
  11888. "type": "string",
  11889. "pattern": "^ses"
  11890. },
  11891. "required": true
  11892. },
  11893. {
  11894. "name": "requestID",
  11895. "in": "path",
  11896. "schema": {
  11897. "type": "string",
  11898. "pattern": "^que"
  11899. },
  11900. "required": true
  11901. }
  11902. ],
  11903. "security": [],
  11904. "responses": {
  11905. "204": {
  11906. "description": "<No Content>"
  11907. },
  11908. "400": {
  11909. "description": "InvalidRequestError",
  11910. "content": {
  11911. "application/json": {
  11912. "schema": {
  11913. "$ref": "#/components/schemas/InvalidRequestError"
  11914. }
  11915. }
  11916. }
  11917. },
  11918. "401": {
  11919. "description": "UnauthorizedError",
  11920. "content": {
  11921. "application/json": {
  11922. "schema": {
  11923. "$ref": "#/components/schemas/UnauthorizedError"
  11924. }
  11925. }
  11926. }
  11927. },
  11928. "404": {
  11929. "description": "SessionNotFoundError | QuestionNotFoundError",
  11930. "content": {
  11931. "application/json": {
  11932. "schema": {
  11933. "anyOf": [
  11934. {
  11935. "$ref": "#/components/schemas/SessionNotFoundError"
  11936. },
  11937. {
  11938. "$ref": "#/components/schemas/QuestionNotFoundError"
  11939. }
  11940. ]
  11941. }
  11942. }
  11943. }
  11944. }
  11945. },
  11946. "description": "Reject a pending question request owned by a session.",
  11947. "summary": "Reject pending question request",
  11948. "x-codeSamples": [
  11949. {
  11950. "lang": "js",
  11951. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  11952. }
  11953. ]
  11954. }
  11955. },
  11956. "/pty/{ptyID}/connect": {
  11957. "get": {
  11958. "tags": ["pty"],
  11959. "operationId": "pty.connect",
  11960. "parameters": [
  11961. {
  11962. "name": "ptyID",
  11963. "in": "path",
  11964. "schema": {
  11965. "type": "string",
  11966. "pattern": "^pty"
  11967. },
  11968. "required": true
  11969. },
  11970. {
  11971. "in": "query",
  11972. "name": "directory",
  11973. "schema": {
  11974. "type": "string"
  11975. }
  11976. },
  11977. {
  11978. "in": "query",
  11979. "name": "workspace",
  11980. "schema": {
  11981. "type": "string"
  11982. }
  11983. },
  11984. {
  11985. "in": "query",
  11986. "name": "cursor",
  11987. "schema": {
  11988. "type": "string"
  11989. }
  11990. },
  11991. {
  11992. "in": "query",
  11993. "name": "ticket",
  11994. "schema": {
  11995. "type": "string"
  11996. }
  11997. }
  11998. ],
  11999. "responses": {
  12000. "200": {
  12001. "description": "Connected session",
  12002. "content": {
  12003. "application/json": {
  12004. "schema": {
  12005. "type": "boolean",
  12006. "description": "Connected session"
  12007. }
  12008. }
  12009. }
  12010. },
  12011. "403": {
  12012. "description": "Forbidden",
  12013. "content": {
  12014. "application/json": {
  12015. "schema": {
  12016. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  12017. }
  12018. }
  12019. }
  12020. },
  12021. "404": {
  12022. "description": "Not found",
  12023. "content": {
  12024. "application/json": {
  12025. "schema": {
  12026. "$ref": "#/components/schemas/NotFoundError"
  12027. }
  12028. }
  12029. }
  12030. }
  12031. },
  12032. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  12033. "summary": "Connect to PTY session",
  12034. "x-codeSamples": [
  12035. {
  12036. "lang": "js",
  12037. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  12038. }
  12039. ]
  12040. }
  12041. }
  12042. },
  12043. "components": {
  12044. "schemas": {
  12045. "Event": {
  12046. "anyOf": [
  12047. {
  12048. "$ref": "#/components/schemas/EventModels-devRefreshed"
  12049. },
  12050. {
  12051. "$ref": "#/components/schemas/EventPluginAdded"
  12052. },
  12053. {
  12054. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  12055. },
  12056. {
  12057. "$ref": "#/components/schemas/EventSessionCreated"
  12058. },
  12059. {
  12060. "$ref": "#/components/schemas/EventSessionUpdated"
  12061. },
  12062. {
  12063. "$ref": "#/components/schemas/EventSessionDeleted"
  12064. },
  12065. {
  12066. "$ref": "#/components/schemas/EventMessageUpdated"
  12067. },
  12068. {
  12069. "$ref": "#/components/schemas/EventMessageRemoved"
  12070. },
  12071. {
  12072. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12073. },
  12074. {
  12075. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12076. },
  12077. {
  12078. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12079. },
  12080. {
  12081. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12082. },
  12083. {
  12084. "$ref": "#/components/schemas/EventSessionNextMoved"
  12085. },
  12086. {
  12087. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12088. },
  12089. {
  12090. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  12091. },
  12092. {
  12093. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  12094. },
  12095. {
  12096. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  12097. },
  12098. {
  12099. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  12100. },
  12101. {
  12102. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12103. },
  12104. {
  12105. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12106. },
  12107. {
  12108. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12109. },
  12110. {
  12111. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12112. },
  12113. {
  12114. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12115. },
  12116. {
  12117. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12118. },
  12119. {
  12120. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12121. },
  12122. {
  12123. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12124. },
  12125. {
  12126. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12127. },
  12128. {
  12129. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12130. },
  12131. {
  12132. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12133. },
  12134. {
  12135. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12136. },
  12137. {
  12138. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12139. },
  12140. {
  12141. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12142. },
  12143. {
  12144. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12145. },
  12146. {
  12147. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12148. },
  12149. {
  12150. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12151. },
  12152. {
  12153. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12154. },
  12155. {
  12156. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12157. },
  12158. {
  12159. "$ref": "#/components/schemas/EventSessionNextRetried"
  12160. },
  12161. {
  12162. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12163. },
  12164. {
  12165. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12166. },
  12167. {
  12168. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12169. },
  12170. {
  12171. "$ref": "#/components/schemas/EventMessagePartDelta"
  12172. },
  12173. {
  12174. "$ref": "#/components/schemas/EventSessionDiff"
  12175. },
  12176. {
  12177. "$ref": "#/components/schemas/EventSessionError"
  12178. },
  12179. {
  12180. "$ref": "#/components/schemas/EventInstallationUpdated"
  12181. },
  12182. {
  12183. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12184. },
  12185. {
  12186. "$ref": "#/components/schemas/EventFileEdited"
  12187. },
  12188. {
  12189. "$ref": "#/components/schemas/EventAccountAdded"
  12190. },
  12191. {
  12192. "$ref": "#/components/schemas/EventAccountRemoved"
  12193. },
  12194. {
  12195. "$ref": "#/components/schemas/EventAccountSwitched"
  12196. },
  12197. {
  12198. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12199. },
  12200. {
  12201. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12202. },
  12203. {
  12204. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12205. },
  12206. {
  12207. "$ref": "#/components/schemas/EventPtyCreated"
  12208. },
  12209. {
  12210. "$ref": "#/components/schemas/EventPtyUpdated"
  12211. },
  12212. {
  12213. "$ref": "#/components/schemas/EventPtyExited"
  12214. },
  12215. {
  12216. "$ref": "#/components/schemas/EventPtyDeleted"
  12217. },
  12218. {
  12219. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12220. },
  12221. {
  12222. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12223. },
  12224. {
  12225. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12226. },
  12227. {
  12228. "$ref": "#/components/schemas/EventTodoUpdated"
  12229. },
  12230. {
  12231. "$ref": "#/components/schemas/EventLspUpdated"
  12232. },
  12233. {
  12234. "$ref": "#/components/schemas/EventPermissionAsked"
  12235. },
  12236. {
  12237. "$ref": "#/components/schemas/EventPermissionReplied"
  12238. },
  12239. {
  12240. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12241. },
  12242. {
  12243. "$ref": "#/components/schemas/Event.tui.command.execute"
  12244. },
  12245. {
  12246. "$ref": "#/components/schemas/Event.tui.toast.show"
  12247. },
  12248. {
  12249. "$ref": "#/components/schemas/Event.tui.session.select"
  12250. },
  12251. {
  12252. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12253. },
  12254. {
  12255. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12256. },
  12257. {
  12258. "$ref": "#/components/schemas/EventCommandExecuted"
  12259. },
  12260. {
  12261. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12262. },
  12263. {
  12264. "$ref": "#/components/schemas/EventProjectUpdated"
  12265. },
  12266. {
  12267. "$ref": "#/components/schemas/EventQuestionAsked"
  12268. },
  12269. {
  12270. "$ref": "#/components/schemas/EventQuestionReplied"
  12271. },
  12272. {
  12273. "$ref": "#/components/schemas/EventQuestionRejected"
  12274. },
  12275. {
  12276. "$ref": "#/components/schemas/EventSessionStatus"
  12277. },
  12278. {
  12279. "$ref": "#/components/schemas/EventSessionIdle"
  12280. },
  12281. {
  12282. "$ref": "#/components/schemas/EventSessionCompacted"
  12283. },
  12284. {
  12285. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12286. },
  12287. {
  12288. "$ref": "#/components/schemas/EventWorktreeReady"
  12289. },
  12290. {
  12291. "$ref": "#/components/schemas/EventWorktreeFailed"
  12292. },
  12293. {
  12294. "$ref": "#/components/schemas/EventWorkspaceReady"
  12295. },
  12296. {
  12297. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12298. },
  12299. {
  12300. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12301. },
  12302. {
  12303. "$ref": "#/components/schemas/EventServerConnected"
  12304. },
  12305. {
  12306. "$ref": "#/components/schemas/EventGlobalDisposed"
  12307. },
  12308. {
  12309. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12310. }
  12311. ]
  12312. },
  12313. "QuestionReplied": {
  12314. "type": "object",
  12315. "properties": {
  12316. "sessionID": {
  12317. "type": "string",
  12318. "pattern": "^ses"
  12319. },
  12320. "requestID": {
  12321. "type": "string",
  12322. "pattern": "^que"
  12323. },
  12324. "answers": {
  12325. "type": "array",
  12326. "items": {
  12327. "$ref": "#/components/schemas/QuestionAnswer"
  12328. }
  12329. }
  12330. },
  12331. "required": ["sessionID", "requestID", "answers"],
  12332. "additionalProperties": false
  12333. },
  12334. "QuestionRejected": {
  12335. "type": "object",
  12336. "properties": {
  12337. "sessionID": {
  12338. "type": "string",
  12339. "pattern": "^ses"
  12340. },
  12341. "requestID": {
  12342. "type": "string",
  12343. "pattern": "^que"
  12344. }
  12345. },
  12346. "required": ["sessionID", "requestID"],
  12347. "additionalProperties": false
  12348. },
  12349. "OAuth": {
  12350. "type": "object",
  12351. "properties": {
  12352. "type": {
  12353. "type": "string",
  12354. "enum": ["oauth"]
  12355. },
  12356. "refresh": {
  12357. "type": "string"
  12358. },
  12359. "access": {
  12360. "type": "string"
  12361. },
  12362. "expires": {
  12363. "type": "integer",
  12364. "minimum": 0
  12365. },
  12366. "accountId": {
  12367. "type": "string"
  12368. },
  12369. "enterpriseUrl": {
  12370. "type": "string"
  12371. }
  12372. },
  12373. "required": ["type", "refresh", "access", "expires"],
  12374. "additionalProperties": false
  12375. },
  12376. "ApiAuth": {
  12377. "type": "object",
  12378. "properties": {
  12379. "type": {
  12380. "type": "string",
  12381. "enum": ["api"]
  12382. },
  12383. "key": {
  12384. "type": "string"
  12385. },
  12386. "metadata": {
  12387. "type": "object",
  12388. "additionalProperties": {
  12389. "type": "string"
  12390. }
  12391. }
  12392. },
  12393. "required": ["type", "key"],
  12394. "additionalProperties": false
  12395. },
  12396. "WellKnownAuth": {
  12397. "type": "object",
  12398. "properties": {
  12399. "type": {
  12400. "type": "string",
  12401. "enum": ["wellknown"]
  12402. },
  12403. "key": {
  12404. "type": "string"
  12405. },
  12406. "token": {
  12407. "type": "string"
  12408. }
  12409. },
  12410. "required": ["type", "key", "token"],
  12411. "additionalProperties": false
  12412. },
  12413. "Auth": {
  12414. "anyOf": [
  12415. {
  12416. "$ref": "#/components/schemas/OAuth"
  12417. },
  12418. {
  12419. "$ref": "#/components/schemas/ApiAuth"
  12420. },
  12421. {
  12422. "$ref": "#/components/schemas/WellKnownAuth"
  12423. }
  12424. ]
  12425. },
  12426. "effect_HttpApiError_BadRequest": {
  12427. "type": "object",
  12428. "properties": {
  12429. "_tag": {
  12430. "type": "string",
  12431. "enum": ["BadRequest"]
  12432. }
  12433. },
  12434. "required": ["_tag"],
  12435. "additionalProperties": false
  12436. },
  12437. "InvalidRequestError": {
  12438. "type": "object",
  12439. "properties": {
  12440. "_tag": {
  12441. "type": "string",
  12442. "enum": ["InvalidRequestError"]
  12443. },
  12444. "message": {
  12445. "type": "string"
  12446. },
  12447. "kind": {
  12448. "type": "string"
  12449. },
  12450. "field": {
  12451. "type": "string"
  12452. }
  12453. },
  12454. "required": ["_tag", "message"],
  12455. "additionalProperties": false
  12456. },
  12457. "MoveSessionError": {
  12458. "type": "object",
  12459. "properties": {
  12460. "name": {
  12461. "type": "string",
  12462. "enum": ["MoveSessionError"]
  12463. },
  12464. "data": {
  12465. "type": "object",
  12466. "properties": {
  12467. "message": {
  12468. "type": "string"
  12469. }
  12470. },
  12471. "required": ["message"],
  12472. "additionalProperties": false
  12473. }
  12474. },
  12475. "required": ["name", "data"],
  12476. "additionalProperties": false
  12477. },
  12478. "SnapshotFileDiff": {
  12479. "type": "object",
  12480. "properties": {
  12481. "file": {
  12482. "type": "string"
  12483. },
  12484. "patch": {
  12485. "type": "string"
  12486. },
  12487. "additions": {
  12488. "type": "number"
  12489. },
  12490. "deletions": {
  12491. "type": "number"
  12492. },
  12493. "status": {
  12494. "type": "string",
  12495. "enum": ["added", "deleted", "modified"]
  12496. }
  12497. },
  12498. "required": ["additions", "deletions"],
  12499. "additionalProperties": false
  12500. },
  12501. "PermissionAction": {
  12502. "type": "string",
  12503. "enum": ["allow", "deny", "ask"]
  12504. },
  12505. "PermissionRule": {
  12506. "type": "object",
  12507. "properties": {
  12508. "permission": {
  12509. "type": "string"
  12510. },
  12511. "pattern": {
  12512. "type": "string"
  12513. },
  12514. "action": {
  12515. "$ref": "#/components/schemas/PermissionAction"
  12516. }
  12517. },
  12518. "required": ["permission", "pattern", "action"],
  12519. "additionalProperties": false
  12520. },
  12521. "PermissionRuleset": {
  12522. "type": "array",
  12523. "items": {
  12524. "$ref": "#/components/schemas/PermissionRule"
  12525. }
  12526. },
  12527. "Session": {
  12528. "type": "object",
  12529. "properties": {
  12530. "id": {
  12531. "type": "string",
  12532. "pattern": "^ses"
  12533. },
  12534. "slug": {
  12535. "type": "string"
  12536. },
  12537. "projectID": {
  12538. "type": "string"
  12539. },
  12540. "workspaceID": {
  12541. "type": "string",
  12542. "pattern": "^wrk"
  12543. },
  12544. "directory": {
  12545. "type": "string"
  12546. },
  12547. "path": {
  12548. "type": "string"
  12549. },
  12550. "parentID": {
  12551. "type": "string",
  12552. "pattern": "^ses"
  12553. },
  12554. "summary": {
  12555. "type": "object",
  12556. "properties": {
  12557. "additions": {
  12558. "type": "number"
  12559. },
  12560. "deletions": {
  12561. "type": "number"
  12562. },
  12563. "files": {
  12564. "type": "number"
  12565. },
  12566. "diffs": {
  12567. "type": "array",
  12568. "items": {
  12569. "$ref": "#/components/schemas/SnapshotFileDiff"
  12570. }
  12571. }
  12572. },
  12573. "required": ["additions", "deletions", "files"],
  12574. "additionalProperties": false
  12575. },
  12576. "cost": {
  12577. "type": "number"
  12578. },
  12579. "tokens": {
  12580. "type": "object",
  12581. "properties": {
  12582. "input": {
  12583. "type": "number"
  12584. },
  12585. "output": {
  12586. "type": "number"
  12587. },
  12588. "reasoning": {
  12589. "type": "number"
  12590. },
  12591. "cache": {
  12592. "type": "object",
  12593. "properties": {
  12594. "read": {
  12595. "type": "number"
  12596. },
  12597. "write": {
  12598. "type": "number"
  12599. }
  12600. },
  12601. "required": ["read", "write"],
  12602. "additionalProperties": false
  12603. }
  12604. },
  12605. "required": ["input", "output", "reasoning", "cache"],
  12606. "additionalProperties": false
  12607. },
  12608. "share": {
  12609. "type": "object",
  12610. "properties": {
  12611. "url": {
  12612. "type": "string"
  12613. }
  12614. },
  12615. "required": ["url"],
  12616. "additionalProperties": false
  12617. },
  12618. "title": {
  12619. "type": "string"
  12620. },
  12621. "agent": {
  12622. "type": "string"
  12623. },
  12624. "model": {
  12625. "type": "object",
  12626. "properties": {
  12627. "id": {
  12628. "type": "string"
  12629. },
  12630. "providerID": {
  12631. "type": "string"
  12632. },
  12633. "variant": {
  12634. "type": "string"
  12635. }
  12636. },
  12637. "required": ["id", "providerID"],
  12638. "additionalProperties": false
  12639. },
  12640. "version": {
  12641. "type": "string"
  12642. },
  12643. "metadata": {
  12644. "type": "object"
  12645. },
  12646. "time": {
  12647. "type": "object",
  12648. "properties": {
  12649. "created": {
  12650. "type": "integer",
  12651. "minimum": 0
  12652. },
  12653. "updated": {
  12654. "type": "integer",
  12655. "minimum": 0
  12656. },
  12657. "compacting": {
  12658. "type": "integer",
  12659. "minimum": 0
  12660. },
  12661. "archived": {
  12662. "type": "number"
  12663. }
  12664. },
  12665. "required": ["created", "updated"],
  12666. "additionalProperties": false
  12667. },
  12668. "permission": {
  12669. "$ref": "#/components/schemas/PermissionRuleset"
  12670. },
  12671. "revert": {
  12672. "type": "object",
  12673. "properties": {
  12674. "messageID": {
  12675. "type": "string",
  12676. "pattern": "^msg"
  12677. },
  12678. "partID": {
  12679. "type": "string",
  12680. "pattern": "^prt"
  12681. },
  12682. "snapshot": {
  12683. "type": "string"
  12684. },
  12685. "diff": {
  12686. "type": "string"
  12687. }
  12688. },
  12689. "required": ["messageID"],
  12690. "additionalProperties": false
  12691. }
  12692. },
  12693. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12694. "additionalProperties": false
  12695. },
  12696. "OutputFormatText": {
  12697. "type": "object",
  12698. "properties": {
  12699. "type": {
  12700. "type": "string",
  12701. "enum": ["text"]
  12702. }
  12703. },
  12704. "required": ["type"],
  12705. "additionalProperties": false
  12706. },
  12707. "JSONSchema": {
  12708. "type": "object"
  12709. },
  12710. "OutputFormatJsonSchema": {
  12711. "type": "object",
  12712. "properties": {
  12713. "type": {
  12714. "type": "string",
  12715. "enum": ["json_schema"]
  12716. },
  12717. "schema": {
  12718. "$ref": "#/components/schemas/JSONSchema"
  12719. },
  12720. "retryCount": {
  12721. "type": "integer",
  12722. "minimum": 0
  12723. }
  12724. },
  12725. "required": ["type", "schema"],
  12726. "additionalProperties": false
  12727. },
  12728. "OutputFormat": {
  12729. "anyOf": [
  12730. {
  12731. "$ref": "#/components/schemas/OutputFormatText"
  12732. },
  12733. {
  12734. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  12735. }
  12736. ]
  12737. },
  12738. "UserMessage": {
  12739. "type": "object",
  12740. "properties": {
  12741. "id": {
  12742. "type": "string",
  12743. "pattern": "^msg"
  12744. },
  12745. "sessionID": {
  12746. "type": "string",
  12747. "pattern": "^ses"
  12748. },
  12749. "role": {
  12750. "type": "string",
  12751. "enum": ["user"]
  12752. },
  12753. "time": {
  12754. "type": "object",
  12755. "properties": {
  12756. "created": {
  12757. "type": "number",
  12758. "minimum": 0
  12759. }
  12760. },
  12761. "required": ["created"],
  12762. "additionalProperties": false
  12763. },
  12764. "format": {
  12765. "$ref": "#/components/schemas/OutputFormat"
  12766. },
  12767. "summary": {
  12768. "type": "object",
  12769. "properties": {
  12770. "title": {
  12771. "type": "string"
  12772. },
  12773. "body": {
  12774. "type": "string"
  12775. },
  12776. "diffs": {
  12777. "type": "array",
  12778. "items": {
  12779. "$ref": "#/components/schemas/SnapshotFileDiff"
  12780. }
  12781. }
  12782. },
  12783. "required": ["diffs"],
  12784. "additionalProperties": false
  12785. },
  12786. "agent": {
  12787. "type": "string"
  12788. },
  12789. "model": {
  12790. "type": "object",
  12791. "properties": {
  12792. "providerID": {
  12793. "type": "string"
  12794. },
  12795. "modelID": {
  12796. "type": "string"
  12797. },
  12798. "variant": {
  12799. "type": "string"
  12800. }
  12801. },
  12802. "required": ["providerID", "modelID"],
  12803. "additionalProperties": false
  12804. },
  12805. "system": {
  12806. "type": "string"
  12807. },
  12808. "tools": {
  12809. "type": "object",
  12810. "additionalProperties": {
  12811. "type": "boolean"
  12812. }
  12813. }
  12814. },
  12815. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  12816. "additionalProperties": false
  12817. },
  12818. "ProviderAuthError": {
  12819. "type": "object",
  12820. "properties": {
  12821. "name": {
  12822. "type": "string",
  12823. "enum": ["ProviderAuthError"]
  12824. },
  12825. "data": {
  12826. "type": "object",
  12827. "properties": {
  12828. "providerID": {
  12829. "type": "string"
  12830. },
  12831. "message": {
  12832. "type": "string"
  12833. }
  12834. },
  12835. "required": ["providerID", "message"],
  12836. "additionalProperties": false
  12837. }
  12838. },
  12839. "required": ["name", "data"],
  12840. "additionalProperties": false
  12841. },
  12842. "UnknownError": {
  12843. "type": "object",
  12844. "properties": {
  12845. "name": {
  12846. "type": "string",
  12847. "enum": ["UnknownError"]
  12848. },
  12849. "data": {
  12850. "type": "object",
  12851. "properties": {
  12852. "message": {
  12853. "type": "string"
  12854. },
  12855. "ref": {
  12856. "type": "string"
  12857. }
  12858. },
  12859. "required": ["message"],
  12860. "additionalProperties": false
  12861. }
  12862. },
  12863. "required": ["name", "data"],
  12864. "additionalProperties": false
  12865. },
  12866. "MessageOutputLengthError": {
  12867. "type": "object",
  12868. "properties": {
  12869. "name": {
  12870. "type": "string",
  12871. "enum": ["MessageOutputLengthError"]
  12872. },
  12873. "data": {
  12874. "type": "object",
  12875. "properties": {}
  12876. }
  12877. },
  12878. "required": ["name", "data"],
  12879. "additionalProperties": false
  12880. },
  12881. "MessageAbortedError": {
  12882. "type": "object",
  12883. "properties": {
  12884. "name": {
  12885. "type": "string",
  12886. "enum": ["MessageAbortedError"]
  12887. },
  12888. "data": {
  12889. "type": "object",
  12890. "properties": {
  12891. "message": {
  12892. "type": "string"
  12893. }
  12894. },
  12895. "required": ["message"],
  12896. "additionalProperties": false
  12897. }
  12898. },
  12899. "required": ["name", "data"],
  12900. "additionalProperties": false
  12901. },
  12902. "StructuredOutputError": {
  12903. "type": "object",
  12904. "properties": {
  12905. "name": {
  12906. "type": "string",
  12907. "enum": ["StructuredOutputError"]
  12908. },
  12909. "data": {
  12910. "type": "object",
  12911. "properties": {
  12912. "message": {
  12913. "type": "string"
  12914. },
  12915. "retries": {
  12916. "type": "integer",
  12917. "minimum": 0
  12918. }
  12919. },
  12920. "required": ["message", "retries"],
  12921. "additionalProperties": false
  12922. }
  12923. },
  12924. "required": ["name", "data"],
  12925. "additionalProperties": false
  12926. },
  12927. "ContextOverflowError": {
  12928. "type": "object",
  12929. "properties": {
  12930. "name": {
  12931. "type": "string",
  12932. "enum": ["ContextOverflowError"]
  12933. },
  12934. "data": {
  12935. "type": "object",
  12936. "properties": {
  12937. "message": {
  12938. "type": "string"
  12939. },
  12940. "responseBody": {
  12941. "type": "string"
  12942. }
  12943. },
  12944. "required": ["message"],
  12945. "additionalProperties": false
  12946. }
  12947. },
  12948. "required": ["name", "data"],
  12949. "additionalProperties": false
  12950. },
  12951. "APIError": {
  12952. "type": "object",
  12953. "properties": {
  12954. "name": {
  12955. "type": "string",
  12956. "enum": ["APIError"]
  12957. },
  12958. "data": {
  12959. "type": "object",
  12960. "properties": {
  12961. "message": {
  12962. "type": "string"
  12963. },
  12964. "statusCode": {
  12965. "type": "integer",
  12966. "minimum": 0
  12967. },
  12968. "isRetryable": {
  12969. "type": "boolean"
  12970. },
  12971. "responseHeaders": {
  12972. "type": "object",
  12973. "additionalProperties": {
  12974. "type": "string"
  12975. }
  12976. },
  12977. "responseBody": {
  12978. "type": "string"
  12979. },
  12980. "metadata": {
  12981. "type": "object",
  12982. "additionalProperties": {
  12983. "type": "string"
  12984. }
  12985. }
  12986. },
  12987. "required": ["message", "isRetryable"],
  12988. "additionalProperties": false
  12989. }
  12990. },
  12991. "required": ["name", "data"],
  12992. "additionalProperties": false
  12993. },
  12994. "AssistantMessage": {
  12995. "type": "object",
  12996. "properties": {
  12997. "id": {
  12998. "type": "string",
  12999. "pattern": "^msg"
  13000. },
  13001. "sessionID": {
  13002. "type": "string",
  13003. "pattern": "^ses"
  13004. },
  13005. "role": {
  13006. "type": "string",
  13007. "enum": ["assistant"]
  13008. },
  13009. "time": {
  13010. "type": "object",
  13011. "properties": {
  13012. "created": {
  13013. "type": "integer",
  13014. "minimum": 0
  13015. },
  13016. "completed": {
  13017. "type": "integer",
  13018. "minimum": 0
  13019. }
  13020. },
  13021. "required": ["created"],
  13022. "additionalProperties": false
  13023. },
  13024. "error": {
  13025. "anyOf": [
  13026. {
  13027. "$ref": "#/components/schemas/ProviderAuthError"
  13028. },
  13029. {
  13030. "$ref": "#/components/schemas/UnknownError"
  13031. },
  13032. {
  13033. "$ref": "#/components/schemas/MessageOutputLengthError"
  13034. },
  13035. {
  13036. "$ref": "#/components/schemas/MessageAbortedError"
  13037. },
  13038. {
  13039. "$ref": "#/components/schemas/StructuredOutputError"
  13040. },
  13041. {
  13042. "$ref": "#/components/schemas/ContextOverflowError"
  13043. },
  13044. {
  13045. "$ref": "#/components/schemas/APIError"
  13046. }
  13047. ]
  13048. },
  13049. "parentID": {
  13050. "type": "string",
  13051. "pattern": "^msg"
  13052. },
  13053. "modelID": {
  13054. "type": "string"
  13055. },
  13056. "providerID": {
  13057. "type": "string"
  13058. },
  13059. "mode": {
  13060. "type": "string"
  13061. },
  13062. "agent": {
  13063. "type": "string"
  13064. },
  13065. "path": {
  13066. "type": "object",
  13067. "properties": {
  13068. "cwd": {
  13069. "type": "string"
  13070. },
  13071. "root": {
  13072. "type": "string"
  13073. }
  13074. },
  13075. "required": ["cwd", "root"],
  13076. "additionalProperties": false
  13077. },
  13078. "summary": {
  13079. "type": "boolean"
  13080. },
  13081. "cost": {
  13082. "type": "number"
  13083. },
  13084. "tokens": {
  13085. "type": "object",
  13086. "properties": {
  13087. "total": {
  13088. "type": "number"
  13089. },
  13090. "input": {
  13091. "type": "number"
  13092. },
  13093. "output": {
  13094. "type": "number"
  13095. },
  13096. "reasoning": {
  13097. "type": "number"
  13098. },
  13099. "cache": {
  13100. "type": "object",
  13101. "properties": {
  13102. "read": {
  13103. "type": "number"
  13104. },
  13105. "write": {
  13106. "type": "number"
  13107. }
  13108. },
  13109. "required": ["read", "write"],
  13110. "additionalProperties": false
  13111. }
  13112. },
  13113. "required": ["input", "output", "reasoning", "cache"],
  13114. "additionalProperties": false
  13115. },
  13116. "structured": {},
  13117. "variant": {
  13118. "type": "string"
  13119. },
  13120. "finish": {
  13121. "type": "string"
  13122. }
  13123. },
  13124. "required": [
  13125. "id",
  13126. "sessionID",
  13127. "role",
  13128. "time",
  13129. "parentID",
  13130. "modelID",
  13131. "providerID",
  13132. "mode",
  13133. "agent",
  13134. "path",
  13135. "cost",
  13136. "tokens"
  13137. ],
  13138. "additionalProperties": false
  13139. },
  13140. "Message": {
  13141. "anyOf": [
  13142. {
  13143. "$ref": "#/components/schemas/UserMessage"
  13144. },
  13145. {
  13146. "$ref": "#/components/schemas/AssistantMessage"
  13147. }
  13148. ]
  13149. },
  13150. "TextPart": {
  13151. "type": "object",
  13152. "properties": {
  13153. "id": {
  13154. "type": "string",
  13155. "pattern": "^prt"
  13156. },
  13157. "sessionID": {
  13158. "type": "string",
  13159. "pattern": "^ses"
  13160. },
  13161. "messageID": {
  13162. "type": "string",
  13163. "pattern": "^msg"
  13164. },
  13165. "type": {
  13166. "type": "string",
  13167. "enum": ["text"]
  13168. },
  13169. "text": {
  13170. "type": "string"
  13171. },
  13172. "synthetic": {
  13173. "type": "boolean"
  13174. },
  13175. "ignored": {
  13176. "type": "boolean"
  13177. },
  13178. "time": {
  13179. "type": "object",
  13180. "properties": {
  13181. "start": {
  13182. "type": "integer",
  13183. "minimum": 0
  13184. },
  13185. "end": {
  13186. "type": "integer",
  13187. "minimum": 0
  13188. }
  13189. },
  13190. "required": ["start"],
  13191. "additionalProperties": false
  13192. },
  13193. "metadata": {
  13194. "type": "object"
  13195. }
  13196. },
  13197. "required": ["id", "sessionID", "messageID", "type", "text"],
  13198. "additionalProperties": false
  13199. },
  13200. "SubtaskPart": {
  13201. "type": "object",
  13202. "properties": {
  13203. "id": {
  13204. "type": "string",
  13205. "pattern": "^prt"
  13206. },
  13207. "sessionID": {
  13208. "type": "string",
  13209. "pattern": "^ses"
  13210. },
  13211. "messageID": {
  13212. "type": "string",
  13213. "pattern": "^msg"
  13214. },
  13215. "type": {
  13216. "type": "string",
  13217. "enum": ["subtask"]
  13218. },
  13219. "prompt": {
  13220. "type": "string"
  13221. },
  13222. "description": {
  13223. "type": "string"
  13224. },
  13225. "agent": {
  13226. "type": "string"
  13227. },
  13228. "model": {
  13229. "type": "object",
  13230. "properties": {
  13231. "providerID": {
  13232. "type": "string"
  13233. },
  13234. "modelID": {
  13235. "type": "string"
  13236. }
  13237. },
  13238. "required": ["providerID", "modelID"],
  13239. "additionalProperties": false
  13240. },
  13241. "command": {
  13242. "type": "string"
  13243. }
  13244. },
  13245. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13246. "additionalProperties": false
  13247. },
  13248. "ReasoningPart": {
  13249. "type": "object",
  13250. "properties": {
  13251. "id": {
  13252. "type": "string",
  13253. "pattern": "^prt"
  13254. },
  13255. "sessionID": {
  13256. "type": "string",
  13257. "pattern": "^ses"
  13258. },
  13259. "messageID": {
  13260. "type": "string",
  13261. "pattern": "^msg"
  13262. },
  13263. "type": {
  13264. "type": "string",
  13265. "enum": ["reasoning"]
  13266. },
  13267. "text": {
  13268. "type": "string"
  13269. },
  13270. "metadata": {
  13271. "type": "object"
  13272. },
  13273. "time": {
  13274. "type": "object",
  13275. "properties": {
  13276. "start": {
  13277. "type": "integer",
  13278. "minimum": 0
  13279. },
  13280. "end": {
  13281. "type": "integer",
  13282. "minimum": 0
  13283. }
  13284. },
  13285. "required": ["start"],
  13286. "additionalProperties": false
  13287. }
  13288. },
  13289. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13290. "additionalProperties": false
  13291. },
  13292. "FilePartSourceText": {
  13293. "type": "object",
  13294. "properties": {
  13295. "value": {
  13296. "type": "string"
  13297. },
  13298. "start": {
  13299. "type": "number"
  13300. },
  13301. "end": {
  13302. "type": "number"
  13303. }
  13304. },
  13305. "required": ["value", "start", "end"],
  13306. "additionalProperties": false
  13307. },
  13308. "FileSource": {
  13309. "type": "object",
  13310. "properties": {
  13311. "text": {
  13312. "$ref": "#/components/schemas/FilePartSourceText"
  13313. },
  13314. "type": {
  13315. "type": "string",
  13316. "enum": ["file"]
  13317. },
  13318. "path": {
  13319. "type": "string"
  13320. }
  13321. },
  13322. "required": ["text", "type", "path"],
  13323. "additionalProperties": false
  13324. },
  13325. "Range": {
  13326. "type": "object",
  13327. "properties": {
  13328. "start": {
  13329. "type": "object",
  13330. "properties": {
  13331. "line": {
  13332. "type": "integer",
  13333. "minimum": 0
  13334. },
  13335. "character": {
  13336. "type": "integer",
  13337. "minimum": 0
  13338. }
  13339. },
  13340. "required": ["line", "character"],
  13341. "additionalProperties": false
  13342. },
  13343. "end": {
  13344. "type": "object",
  13345. "properties": {
  13346. "line": {
  13347. "type": "integer",
  13348. "minimum": 0
  13349. },
  13350. "character": {
  13351. "type": "integer",
  13352. "minimum": 0
  13353. }
  13354. },
  13355. "required": ["line", "character"],
  13356. "additionalProperties": false
  13357. }
  13358. },
  13359. "required": ["start", "end"],
  13360. "additionalProperties": false
  13361. },
  13362. "SymbolSource": {
  13363. "type": "object",
  13364. "properties": {
  13365. "text": {
  13366. "$ref": "#/components/schemas/FilePartSourceText"
  13367. },
  13368. "type": {
  13369. "type": "string",
  13370. "enum": ["symbol"]
  13371. },
  13372. "path": {
  13373. "type": "string"
  13374. },
  13375. "range": {
  13376. "$ref": "#/components/schemas/Range"
  13377. },
  13378. "name": {
  13379. "type": "string"
  13380. },
  13381. "kind": {
  13382. "type": "integer",
  13383. "minimum": 0
  13384. }
  13385. },
  13386. "required": ["text", "type", "path", "range", "name", "kind"],
  13387. "additionalProperties": false
  13388. },
  13389. "ResourceSource": {
  13390. "type": "object",
  13391. "properties": {
  13392. "text": {
  13393. "$ref": "#/components/schemas/FilePartSourceText"
  13394. },
  13395. "type": {
  13396. "type": "string",
  13397. "enum": ["resource"]
  13398. },
  13399. "clientName": {
  13400. "type": "string"
  13401. },
  13402. "uri": {
  13403. "type": "string"
  13404. }
  13405. },
  13406. "required": ["text", "type", "clientName", "uri"],
  13407. "additionalProperties": false
  13408. },
  13409. "FilePartSource": {
  13410. "anyOf": [
  13411. {
  13412. "$ref": "#/components/schemas/FileSource"
  13413. },
  13414. {
  13415. "$ref": "#/components/schemas/SymbolSource"
  13416. },
  13417. {
  13418. "$ref": "#/components/schemas/ResourceSource"
  13419. }
  13420. ]
  13421. },
  13422. "FilePart": {
  13423. "type": "object",
  13424. "properties": {
  13425. "id": {
  13426. "type": "string",
  13427. "pattern": "^prt"
  13428. },
  13429. "sessionID": {
  13430. "type": "string",
  13431. "pattern": "^ses"
  13432. },
  13433. "messageID": {
  13434. "type": "string",
  13435. "pattern": "^msg"
  13436. },
  13437. "type": {
  13438. "type": "string",
  13439. "enum": ["file"]
  13440. },
  13441. "mime": {
  13442. "type": "string"
  13443. },
  13444. "filename": {
  13445. "type": "string"
  13446. },
  13447. "url": {
  13448. "type": "string"
  13449. },
  13450. "source": {
  13451. "$ref": "#/components/schemas/FilePartSource"
  13452. }
  13453. },
  13454. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  13455. "additionalProperties": false
  13456. },
  13457. "ToolStatePending": {
  13458. "type": "object",
  13459. "properties": {
  13460. "status": {
  13461. "type": "string",
  13462. "enum": ["pending"]
  13463. },
  13464. "input": {
  13465. "type": "object"
  13466. },
  13467. "raw": {
  13468. "type": "string"
  13469. }
  13470. },
  13471. "required": ["status", "input", "raw"],
  13472. "additionalProperties": false
  13473. },
  13474. "ToolStateRunning": {
  13475. "type": "object",
  13476. "properties": {
  13477. "status": {
  13478. "type": "string",
  13479. "enum": ["running"]
  13480. },
  13481. "input": {
  13482. "type": "object"
  13483. },
  13484. "title": {
  13485. "type": "string"
  13486. },
  13487. "metadata": {
  13488. "type": "object"
  13489. },
  13490. "time": {
  13491. "type": "object",
  13492. "properties": {
  13493. "start": {
  13494. "type": "integer",
  13495. "minimum": 0
  13496. }
  13497. },
  13498. "required": ["start"],
  13499. "additionalProperties": false
  13500. }
  13501. },
  13502. "required": ["status", "input", "time"],
  13503. "additionalProperties": false
  13504. },
  13505. "ToolStateCompleted": {
  13506. "type": "object",
  13507. "properties": {
  13508. "status": {
  13509. "type": "string",
  13510. "enum": ["completed"]
  13511. },
  13512. "input": {
  13513. "type": "object"
  13514. },
  13515. "output": {
  13516. "type": "string"
  13517. },
  13518. "title": {
  13519. "type": "string"
  13520. },
  13521. "metadata": {
  13522. "type": "object"
  13523. },
  13524. "time": {
  13525. "type": "object",
  13526. "properties": {
  13527. "start": {
  13528. "type": "integer",
  13529. "minimum": 0
  13530. },
  13531. "end": {
  13532. "type": "integer",
  13533. "minimum": 0
  13534. },
  13535. "compacted": {
  13536. "type": "integer",
  13537. "minimum": 0
  13538. }
  13539. },
  13540. "required": ["start", "end"],
  13541. "additionalProperties": false
  13542. },
  13543. "attachments": {
  13544. "type": "array",
  13545. "items": {
  13546. "$ref": "#/components/schemas/FilePart"
  13547. }
  13548. }
  13549. },
  13550. "required": ["status", "input", "output", "title", "metadata", "time"],
  13551. "additionalProperties": false
  13552. },
  13553. "ToolStateError": {
  13554. "type": "object",
  13555. "properties": {
  13556. "status": {
  13557. "type": "string",
  13558. "enum": ["error"]
  13559. },
  13560. "input": {
  13561. "type": "object"
  13562. },
  13563. "error": {
  13564. "type": "string"
  13565. },
  13566. "metadata": {
  13567. "type": "object"
  13568. },
  13569. "time": {
  13570. "type": "object",
  13571. "properties": {
  13572. "start": {
  13573. "type": "integer",
  13574. "minimum": 0
  13575. },
  13576. "end": {
  13577. "type": "integer",
  13578. "minimum": 0
  13579. }
  13580. },
  13581. "required": ["start", "end"],
  13582. "additionalProperties": false
  13583. }
  13584. },
  13585. "required": ["status", "input", "error", "time"],
  13586. "additionalProperties": false
  13587. },
  13588. "ToolState": {
  13589. "anyOf": [
  13590. {
  13591. "$ref": "#/components/schemas/ToolStatePending"
  13592. },
  13593. {
  13594. "$ref": "#/components/schemas/ToolStateRunning"
  13595. },
  13596. {
  13597. "$ref": "#/components/schemas/ToolStateCompleted"
  13598. },
  13599. {
  13600. "$ref": "#/components/schemas/ToolStateError"
  13601. }
  13602. ]
  13603. },
  13604. "ToolPart": {
  13605. "type": "object",
  13606. "properties": {
  13607. "id": {
  13608. "type": "string",
  13609. "pattern": "^prt"
  13610. },
  13611. "sessionID": {
  13612. "type": "string",
  13613. "pattern": "^ses"
  13614. },
  13615. "messageID": {
  13616. "type": "string",
  13617. "pattern": "^msg"
  13618. },
  13619. "type": {
  13620. "type": "string",
  13621. "enum": ["tool"]
  13622. },
  13623. "callID": {
  13624. "type": "string"
  13625. },
  13626. "tool": {
  13627. "type": "string"
  13628. },
  13629. "state": {
  13630. "$ref": "#/components/schemas/ToolState"
  13631. },
  13632. "metadata": {
  13633. "type": "object"
  13634. }
  13635. },
  13636. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  13637. "additionalProperties": false
  13638. },
  13639. "StepStartPart": {
  13640. "type": "object",
  13641. "properties": {
  13642. "id": {
  13643. "type": "string",
  13644. "pattern": "^prt"
  13645. },
  13646. "sessionID": {
  13647. "type": "string",
  13648. "pattern": "^ses"
  13649. },
  13650. "messageID": {
  13651. "type": "string",
  13652. "pattern": "^msg"
  13653. },
  13654. "type": {
  13655. "type": "string",
  13656. "enum": ["step-start"]
  13657. },
  13658. "snapshot": {
  13659. "type": "string"
  13660. }
  13661. },
  13662. "required": ["id", "sessionID", "messageID", "type"],
  13663. "additionalProperties": false
  13664. },
  13665. "StepFinishPart": {
  13666. "type": "object",
  13667. "properties": {
  13668. "id": {
  13669. "type": "string",
  13670. "pattern": "^prt"
  13671. },
  13672. "sessionID": {
  13673. "type": "string",
  13674. "pattern": "^ses"
  13675. },
  13676. "messageID": {
  13677. "type": "string",
  13678. "pattern": "^msg"
  13679. },
  13680. "type": {
  13681. "type": "string",
  13682. "enum": ["step-finish"]
  13683. },
  13684. "reason": {
  13685. "type": "string"
  13686. },
  13687. "snapshot": {
  13688. "type": "string"
  13689. },
  13690. "cost": {
  13691. "type": "number"
  13692. },
  13693. "tokens": {
  13694. "type": "object",
  13695. "properties": {
  13696. "total": {
  13697. "type": "number"
  13698. },
  13699. "input": {
  13700. "type": "number"
  13701. },
  13702. "output": {
  13703. "type": "number"
  13704. },
  13705. "reasoning": {
  13706. "type": "number"
  13707. },
  13708. "cache": {
  13709. "type": "object",
  13710. "properties": {
  13711. "read": {
  13712. "type": "number"
  13713. },
  13714. "write": {
  13715. "type": "number"
  13716. }
  13717. },
  13718. "required": ["read", "write"],
  13719. "additionalProperties": false
  13720. }
  13721. },
  13722. "required": ["input", "output", "reasoning", "cache"],
  13723. "additionalProperties": false
  13724. }
  13725. },
  13726. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  13727. "additionalProperties": false
  13728. },
  13729. "SnapshotPart": {
  13730. "type": "object",
  13731. "properties": {
  13732. "id": {
  13733. "type": "string",
  13734. "pattern": "^prt"
  13735. },
  13736. "sessionID": {
  13737. "type": "string",
  13738. "pattern": "^ses"
  13739. },
  13740. "messageID": {
  13741. "type": "string",
  13742. "pattern": "^msg"
  13743. },
  13744. "type": {
  13745. "type": "string",
  13746. "enum": ["snapshot"]
  13747. },
  13748. "snapshot": {
  13749. "type": "string"
  13750. }
  13751. },
  13752. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  13753. "additionalProperties": false
  13754. },
  13755. "PatchPart": {
  13756. "type": "object",
  13757. "properties": {
  13758. "id": {
  13759. "type": "string",
  13760. "pattern": "^prt"
  13761. },
  13762. "sessionID": {
  13763. "type": "string",
  13764. "pattern": "^ses"
  13765. },
  13766. "messageID": {
  13767. "type": "string",
  13768. "pattern": "^msg"
  13769. },
  13770. "type": {
  13771. "type": "string",
  13772. "enum": ["patch"]
  13773. },
  13774. "hash": {
  13775. "type": "string"
  13776. },
  13777. "files": {
  13778. "type": "array",
  13779. "items": {
  13780. "type": "string"
  13781. }
  13782. }
  13783. },
  13784. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  13785. "additionalProperties": false
  13786. },
  13787. "AgentPart": {
  13788. "type": "object",
  13789. "properties": {
  13790. "id": {
  13791. "type": "string",
  13792. "pattern": "^prt"
  13793. },
  13794. "sessionID": {
  13795. "type": "string",
  13796. "pattern": "^ses"
  13797. },
  13798. "messageID": {
  13799. "type": "string",
  13800. "pattern": "^msg"
  13801. },
  13802. "type": {
  13803. "type": "string",
  13804. "enum": ["agent"]
  13805. },
  13806. "name": {
  13807. "type": "string"
  13808. },
  13809. "source": {
  13810. "type": "object",
  13811. "properties": {
  13812. "value": {
  13813. "type": "string"
  13814. },
  13815. "start": {
  13816. "type": "integer",
  13817. "minimum": 0
  13818. },
  13819. "end": {
  13820. "type": "integer",
  13821. "minimum": 0
  13822. }
  13823. },
  13824. "required": ["value", "start", "end"],
  13825. "additionalProperties": false
  13826. }
  13827. },
  13828. "required": ["id", "sessionID", "messageID", "type", "name"],
  13829. "additionalProperties": false
  13830. },
  13831. "RetryPart": {
  13832. "type": "object",
  13833. "properties": {
  13834. "id": {
  13835. "type": "string",
  13836. "pattern": "^prt"
  13837. },
  13838. "sessionID": {
  13839. "type": "string",
  13840. "pattern": "^ses"
  13841. },
  13842. "messageID": {
  13843. "type": "string",
  13844. "pattern": "^msg"
  13845. },
  13846. "type": {
  13847. "type": "string",
  13848. "enum": ["retry"]
  13849. },
  13850. "attempt": {
  13851. "type": "integer",
  13852. "minimum": 0
  13853. },
  13854. "error": {
  13855. "$ref": "#/components/schemas/APIError"
  13856. },
  13857. "time": {
  13858. "type": "object",
  13859. "properties": {
  13860. "created": {
  13861. "type": "integer",
  13862. "minimum": 0
  13863. }
  13864. },
  13865. "required": ["created"],
  13866. "additionalProperties": false
  13867. }
  13868. },
  13869. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  13870. "additionalProperties": false
  13871. },
  13872. "CompactionPart": {
  13873. "type": "object",
  13874. "properties": {
  13875. "id": {
  13876. "type": "string",
  13877. "pattern": "^prt"
  13878. },
  13879. "sessionID": {
  13880. "type": "string",
  13881. "pattern": "^ses"
  13882. },
  13883. "messageID": {
  13884. "type": "string",
  13885. "pattern": "^msg"
  13886. },
  13887. "type": {
  13888. "type": "string",
  13889. "enum": ["compaction"]
  13890. },
  13891. "auto": {
  13892. "type": "boolean"
  13893. },
  13894. "overflow": {
  13895. "type": "boolean"
  13896. },
  13897. "tail_start_id": {
  13898. "type": "string",
  13899. "pattern": "^msg"
  13900. }
  13901. },
  13902. "required": ["id", "sessionID", "messageID", "type", "auto"],
  13903. "additionalProperties": false
  13904. },
  13905. "Part": {
  13906. "anyOf": [
  13907. {
  13908. "$ref": "#/components/schemas/TextPart"
  13909. },
  13910. {
  13911. "$ref": "#/components/schemas/SubtaskPart"
  13912. },
  13913. {
  13914. "$ref": "#/components/schemas/ReasoningPart"
  13915. },
  13916. {
  13917. "$ref": "#/components/schemas/FilePart"
  13918. },
  13919. {
  13920. "$ref": "#/components/schemas/ToolPart"
  13921. },
  13922. {
  13923. "$ref": "#/components/schemas/StepStartPart"
  13924. },
  13925. {
  13926. "$ref": "#/components/schemas/StepFinishPart"
  13927. },
  13928. {
  13929. "$ref": "#/components/schemas/SnapshotPart"
  13930. },
  13931. {
  13932. "$ref": "#/components/schemas/PatchPart"
  13933. },
  13934. {
  13935. "$ref": "#/components/schemas/AgentPart"
  13936. },
  13937. {
  13938. "$ref": "#/components/schemas/RetryPart"
  13939. },
  13940. {
  13941. "$ref": "#/components/schemas/CompactionPart"
  13942. }
  13943. ]
  13944. },
  13945. "Prompt": {
  13946. "type": "object",
  13947. "properties": {
  13948. "text": {
  13949. "type": "string"
  13950. },
  13951. "files": {
  13952. "type": "array",
  13953. "items": {
  13954. "$ref": "#/components/schemas/PromptFileAttachment"
  13955. }
  13956. },
  13957. "agents": {
  13958. "type": "array",
  13959. "items": {
  13960. "$ref": "#/components/schemas/PromptAgentAttachment"
  13961. }
  13962. },
  13963. "references": {
  13964. "type": "array",
  13965. "items": {
  13966. "$ref": "#/components/schemas/PromptReferenceAttachment"
  13967. }
  13968. }
  13969. },
  13970. "required": ["text"],
  13971. "additionalProperties": false
  13972. },
  13973. "Pty": {
  13974. "type": "object",
  13975. "properties": {
  13976. "id": {
  13977. "type": "string",
  13978. "pattern": "^pty"
  13979. },
  13980. "title": {
  13981. "type": "string"
  13982. },
  13983. "command": {
  13984. "type": "string"
  13985. },
  13986. "args": {
  13987. "type": "array",
  13988. "items": {
  13989. "type": "string"
  13990. }
  13991. },
  13992. "cwd": {
  13993. "type": "string"
  13994. },
  13995. "status": {
  13996. "type": "string",
  13997. "enum": ["running", "exited"]
  13998. },
  13999. "pid": {
  14000. "type": "integer",
  14001. "minimum": 0
  14002. }
  14003. },
  14004. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  14005. "additionalProperties": false
  14006. },
  14007. "Todo": {
  14008. "type": "object",
  14009. "properties": {
  14010. "content": {
  14011. "type": "string",
  14012. "description": "Brief description of the task"
  14013. },
  14014. "status": {
  14015. "type": "string",
  14016. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  14017. },
  14018. "priority": {
  14019. "type": "string",
  14020. "description": "Priority level of the task: high, medium, low"
  14021. }
  14022. },
  14023. "required": ["content", "status", "priority"],
  14024. "additionalProperties": false
  14025. },
  14026. "QuestionOption": {
  14027. "type": "object",
  14028. "properties": {
  14029. "label": {
  14030. "type": "string",
  14031. "description": "Display text (1-5 words, concise)"
  14032. },
  14033. "description": {
  14034. "type": "string",
  14035. "description": "Explanation of choice"
  14036. }
  14037. },
  14038. "required": ["label", "description"],
  14039. "additionalProperties": false
  14040. },
  14041. "QuestionInfo": {
  14042. "type": "object",
  14043. "properties": {
  14044. "question": {
  14045. "type": "string",
  14046. "description": "Complete question"
  14047. },
  14048. "header": {
  14049. "type": "string",
  14050. "description": "Very short label (max 30 chars)"
  14051. },
  14052. "options": {
  14053. "type": "array",
  14054. "items": {
  14055. "$ref": "#/components/schemas/QuestionOption"
  14056. },
  14057. "description": "Available choices"
  14058. },
  14059. "multiple": {
  14060. "type": "boolean"
  14061. },
  14062. "custom": {
  14063. "type": "boolean"
  14064. }
  14065. },
  14066. "required": ["question", "header", "options"],
  14067. "additionalProperties": false
  14068. },
  14069. "QuestionTool": {
  14070. "type": "object",
  14071. "properties": {
  14072. "messageID": {
  14073. "type": "string",
  14074. "pattern": "^msg"
  14075. },
  14076. "callID": {
  14077. "type": "string"
  14078. }
  14079. },
  14080. "required": ["messageID", "callID"],
  14081. "additionalProperties": false
  14082. },
  14083. "QuestionAnswer": {
  14084. "type": "array",
  14085. "items": {
  14086. "type": "string"
  14087. }
  14088. },
  14089. "SessionStatus": {
  14090. "anyOf": [
  14091. {
  14092. "type": "object",
  14093. "properties": {
  14094. "type": {
  14095. "type": "string",
  14096. "enum": ["idle"]
  14097. }
  14098. },
  14099. "required": ["type"],
  14100. "additionalProperties": false
  14101. },
  14102. {
  14103. "type": "object",
  14104. "properties": {
  14105. "type": {
  14106. "type": "string",
  14107. "enum": ["retry"]
  14108. },
  14109. "attempt": {
  14110. "type": "integer",
  14111. "minimum": 0
  14112. },
  14113. "message": {
  14114. "type": "string"
  14115. },
  14116. "action": {
  14117. "type": "object",
  14118. "properties": {
  14119. "reason": {
  14120. "type": "string"
  14121. },
  14122. "provider": {
  14123. "type": "string"
  14124. },
  14125. "title": {
  14126. "type": "string"
  14127. },
  14128. "message": {
  14129. "type": "string"
  14130. },
  14131. "label": {
  14132. "type": "string"
  14133. },
  14134. "link": {
  14135. "type": "string"
  14136. }
  14137. },
  14138. "required": ["reason", "provider", "title", "message", "label"],
  14139. "additionalProperties": false
  14140. },
  14141. "next": {
  14142. "type": "integer",
  14143. "minimum": 0
  14144. }
  14145. },
  14146. "required": ["type", "attempt", "message", "next"],
  14147. "additionalProperties": false
  14148. },
  14149. {
  14150. "type": "object",
  14151. "properties": {
  14152. "type": {
  14153. "type": "string",
  14154. "enum": ["busy"]
  14155. }
  14156. },
  14157. "required": ["type"],
  14158. "additionalProperties": false
  14159. }
  14160. ]
  14161. },
  14162. "GlobalEvent": {
  14163. "type": "object",
  14164. "properties": {
  14165. "directory": {
  14166. "type": "string"
  14167. },
  14168. "project": {
  14169. "type": "string"
  14170. },
  14171. "workspace": {
  14172. "type": "string"
  14173. },
  14174. "payload": {
  14175. "anyOf": [
  14176. {
  14177. "type": "object",
  14178. "properties": {
  14179. "id": {
  14180. "type": "string",
  14181. "pattern": "^evt_"
  14182. },
  14183. "type": {
  14184. "type": "string",
  14185. "enum": ["models-dev.refreshed"]
  14186. },
  14187. "properties": {
  14188. "type": "object",
  14189. "properties": {}
  14190. }
  14191. },
  14192. "required": ["id", "type", "properties"],
  14193. "additionalProperties": false
  14194. },
  14195. {
  14196. "type": "object",
  14197. "properties": {
  14198. "id": {
  14199. "type": "string",
  14200. "pattern": "^evt_"
  14201. },
  14202. "type": {
  14203. "type": "string",
  14204. "enum": ["plugin.added"]
  14205. },
  14206. "properties": {
  14207. "type": "object",
  14208. "properties": {
  14209. "id": {
  14210. "type": "string"
  14211. }
  14212. },
  14213. "required": ["id"],
  14214. "additionalProperties": false
  14215. }
  14216. },
  14217. "required": ["id", "type", "properties"],
  14218. "additionalProperties": false
  14219. },
  14220. {
  14221. "type": "object",
  14222. "properties": {
  14223. "id": {
  14224. "type": "string",
  14225. "pattern": "^evt_"
  14226. },
  14227. "type": {
  14228. "type": "string",
  14229. "enum": ["catalog.model.updated"]
  14230. },
  14231. "properties": {
  14232. "type": "object",
  14233. "properties": {
  14234. "model": {
  14235. "$ref": "#/components/schemas/ModelV2Info"
  14236. }
  14237. },
  14238. "required": ["model"],
  14239. "additionalProperties": false
  14240. }
  14241. },
  14242. "required": ["id", "type", "properties"],
  14243. "additionalProperties": false
  14244. },
  14245. {
  14246. "type": "object",
  14247. "properties": {
  14248. "id": {
  14249. "type": "string",
  14250. "pattern": "^evt_"
  14251. },
  14252. "type": {
  14253. "type": "string",
  14254. "enum": ["session.created"]
  14255. },
  14256. "properties": {
  14257. "type": "object",
  14258. "properties": {
  14259. "sessionID": {
  14260. "type": "string",
  14261. "pattern": "^ses"
  14262. },
  14263. "info": {
  14264. "$ref": "#/components/schemas/Session"
  14265. }
  14266. },
  14267. "required": ["sessionID", "info"],
  14268. "additionalProperties": false
  14269. }
  14270. },
  14271. "required": ["id", "type", "properties"],
  14272. "additionalProperties": false
  14273. },
  14274. {
  14275. "type": "object",
  14276. "properties": {
  14277. "id": {
  14278. "type": "string",
  14279. "pattern": "^evt_"
  14280. },
  14281. "type": {
  14282. "type": "string",
  14283. "enum": ["session.updated"]
  14284. },
  14285. "properties": {
  14286. "type": "object",
  14287. "properties": {
  14288. "sessionID": {
  14289. "type": "string",
  14290. "pattern": "^ses"
  14291. },
  14292. "info": {
  14293. "$ref": "#/components/schemas/Session"
  14294. }
  14295. },
  14296. "required": ["sessionID", "info"],
  14297. "additionalProperties": false
  14298. }
  14299. },
  14300. "required": ["id", "type", "properties"],
  14301. "additionalProperties": false
  14302. },
  14303. {
  14304. "type": "object",
  14305. "properties": {
  14306. "id": {
  14307. "type": "string",
  14308. "pattern": "^evt_"
  14309. },
  14310. "type": {
  14311. "type": "string",
  14312. "enum": ["session.deleted"]
  14313. },
  14314. "properties": {
  14315. "type": "object",
  14316. "properties": {
  14317. "sessionID": {
  14318. "type": "string",
  14319. "pattern": "^ses"
  14320. },
  14321. "info": {
  14322. "$ref": "#/components/schemas/Session"
  14323. }
  14324. },
  14325. "required": ["sessionID", "info"],
  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. "pattern": "^evt_"
  14338. },
  14339. "type": {
  14340. "type": "string",
  14341. "enum": ["message.updated"]
  14342. },
  14343. "properties": {
  14344. "type": "object",
  14345. "properties": {
  14346. "sessionID": {
  14347. "type": "string",
  14348. "pattern": "^ses"
  14349. },
  14350. "info": {
  14351. "$ref": "#/components/schemas/Message"
  14352. }
  14353. },
  14354. "required": ["sessionID", "info"],
  14355. "additionalProperties": false
  14356. }
  14357. },
  14358. "required": ["id", "type", "properties"],
  14359. "additionalProperties": false
  14360. },
  14361. {
  14362. "type": "object",
  14363. "properties": {
  14364. "id": {
  14365. "type": "string",
  14366. "pattern": "^evt_"
  14367. },
  14368. "type": {
  14369. "type": "string",
  14370. "enum": ["message.removed"]
  14371. },
  14372. "properties": {
  14373. "type": "object",
  14374. "properties": {
  14375. "sessionID": {
  14376. "type": "string",
  14377. "pattern": "^ses"
  14378. },
  14379. "messageID": {
  14380. "type": "string",
  14381. "pattern": "^msg"
  14382. }
  14383. },
  14384. "required": ["sessionID", "messageID"],
  14385. "additionalProperties": false
  14386. }
  14387. },
  14388. "required": ["id", "type", "properties"],
  14389. "additionalProperties": false
  14390. },
  14391. {
  14392. "type": "object",
  14393. "properties": {
  14394. "id": {
  14395. "type": "string",
  14396. "pattern": "^evt_"
  14397. },
  14398. "type": {
  14399. "type": "string",
  14400. "enum": ["message.part.updated"]
  14401. },
  14402. "properties": {
  14403. "type": "object",
  14404. "properties": {
  14405. "sessionID": {
  14406. "type": "string",
  14407. "pattern": "^ses"
  14408. },
  14409. "part": {
  14410. "$ref": "#/components/schemas/Part"
  14411. },
  14412. "time": {
  14413. "type": "number"
  14414. }
  14415. },
  14416. "required": ["sessionID", "part", "time"],
  14417. "additionalProperties": false
  14418. }
  14419. },
  14420. "required": ["id", "type", "properties"],
  14421. "additionalProperties": false
  14422. },
  14423. {
  14424. "type": "object",
  14425. "properties": {
  14426. "id": {
  14427. "type": "string",
  14428. "pattern": "^evt_"
  14429. },
  14430. "type": {
  14431. "type": "string",
  14432. "enum": ["message.part.removed"]
  14433. },
  14434. "properties": {
  14435. "type": "object",
  14436. "properties": {
  14437. "sessionID": {
  14438. "type": "string",
  14439. "pattern": "^ses"
  14440. },
  14441. "messageID": {
  14442. "type": "string",
  14443. "pattern": "^msg"
  14444. },
  14445. "partID": {
  14446. "type": "string",
  14447. "pattern": "^prt"
  14448. }
  14449. },
  14450. "required": ["sessionID", "messageID", "partID"],
  14451. "additionalProperties": false
  14452. }
  14453. },
  14454. "required": ["id", "type", "properties"],
  14455. "additionalProperties": false
  14456. },
  14457. {
  14458. "type": "object",
  14459. "properties": {
  14460. "id": {
  14461. "type": "string",
  14462. "pattern": "^evt_"
  14463. },
  14464. "type": {
  14465. "type": "string",
  14466. "enum": ["session.next.agent.switched"]
  14467. },
  14468. "properties": {
  14469. "type": "object",
  14470. "properties": {
  14471. "timestamp": {
  14472. "type": "number"
  14473. },
  14474. "sessionID": {
  14475. "type": "string",
  14476. "pattern": "^ses"
  14477. },
  14478. "messageID": {
  14479. "type": "string",
  14480. "pattern": "^msg_"
  14481. },
  14482. "agent": {
  14483. "type": "string"
  14484. }
  14485. },
  14486. "required": ["timestamp", "sessionID", "messageID", "agent"],
  14487. "additionalProperties": false
  14488. }
  14489. },
  14490. "required": ["id", "type", "properties"],
  14491. "additionalProperties": false
  14492. },
  14493. {
  14494. "type": "object",
  14495. "properties": {
  14496. "id": {
  14497. "type": "string",
  14498. "pattern": "^evt_"
  14499. },
  14500. "type": {
  14501. "type": "string",
  14502. "enum": ["session.next.model.switched"]
  14503. },
  14504. "properties": {
  14505. "type": "object",
  14506. "properties": {
  14507. "timestamp": {
  14508. "type": "number"
  14509. },
  14510. "sessionID": {
  14511. "type": "string",
  14512. "pattern": "^ses"
  14513. },
  14514. "messageID": {
  14515. "type": "string",
  14516. "pattern": "^msg_"
  14517. },
  14518. "model": {
  14519. "type": "object",
  14520. "properties": {
  14521. "id": {
  14522. "type": "string"
  14523. },
  14524. "providerID": {
  14525. "type": "string"
  14526. },
  14527. "variant": {
  14528. "type": "string"
  14529. }
  14530. },
  14531. "required": ["id", "providerID"],
  14532. "additionalProperties": false
  14533. }
  14534. },
  14535. "required": ["timestamp", "sessionID", "messageID", "model"],
  14536. "additionalProperties": false
  14537. }
  14538. },
  14539. "required": ["id", "type", "properties"],
  14540. "additionalProperties": false
  14541. },
  14542. {
  14543. "type": "object",
  14544. "properties": {
  14545. "id": {
  14546. "type": "string",
  14547. "pattern": "^evt_"
  14548. },
  14549. "type": {
  14550. "type": "string",
  14551. "enum": ["session.next.moved"]
  14552. },
  14553. "properties": {
  14554. "type": "object",
  14555. "properties": {
  14556. "timestamp": {
  14557. "type": "number"
  14558. },
  14559. "sessionID": {
  14560. "type": "string",
  14561. "pattern": "^ses"
  14562. },
  14563. "location": {
  14564. "$ref": "#/components/schemas/LocationRef"
  14565. },
  14566. "subdirectory": {
  14567. "type": "string"
  14568. }
  14569. },
  14570. "required": ["timestamp", "sessionID", "location"],
  14571. "additionalProperties": false
  14572. }
  14573. },
  14574. "required": ["id", "type", "properties"],
  14575. "additionalProperties": false
  14576. },
  14577. {
  14578. "type": "object",
  14579. "properties": {
  14580. "id": {
  14581. "type": "string",
  14582. "pattern": "^evt_"
  14583. },
  14584. "type": {
  14585. "type": "string",
  14586. "enum": ["session.next.prompted"]
  14587. },
  14588. "properties": {
  14589. "type": "object",
  14590. "properties": {
  14591. "timestamp": {
  14592. "type": "number"
  14593. },
  14594. "sessionID": {
  14595. "type": "string",
  14596. "pattern": "^ses"
  14597. },
  14598. "messageID": {
  14599. "type": "string",
  14600. "pattern": "^msg_"
  14601. },
  14602. "prompt": {
  14603. "$ref": "#/components/schemas/Prompt"
  14604. },
  14605. "delivery": {
  14606. "type": "string",
  14607. "enum": ["steer", "queue"]
  14608. }
  14609. },
  14610. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14611. "additionalProperties": false
  14612. }
  14613. },
  14614. "required": ["id", "type", "properties"],
  14615. "additionalProperties": false
  14616. },
  14617. {
  14618. "type": "object",
  14619. "properties": {
  14620. "id": {
  14621. "type": "string",
  14622. "pattern": "^evt_"
  14623. },
  14624. "type": {
  14625. "type": "string",
  14626. "enum": ["session.next.prompt.admitted"]
  14627. },
  14628. "properties": {
  14629. "type": "object",
  14630. "properties": {
  14631. "timestamp": {
  14632. "type": "number"
  14633. },
  14634. "sessionID": {
  14635. "type": "string",
  14636. "pattern": "^ses"
  14637. },
  14638. "messageID": {
  14639. "type": "string",
  14640. "pattern": "^msg_"
  14641. },
  14642. "prompt": {
  14643. "$ref": "#/components/schemas/Prompt"
  14644. },
  14645. "delivery": {
  14646. "type": "string",
  14647. "enum": ["steer", "queue"]
  14648. }
  14649. },
  14650. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14651. "additionalProperties": false
  14652. }
  14653. },
  14654. "required": ["id", "type", "properties"],
  14655. "additionalProperties": false
  14656. },
  14657. {
  14658. "type": "object",
  14659. "properties": {
  14660. "id": {
  14661. "type": "string",
  14662. "pattern": "^evt_"
  14663. },
  14664. "type": {
  14665. "type": "string",
  14666. "enum": ["session.next.prompt.promoted"]
  14667. },
  14668. "properties": {
  14669. "type": "object",
  14670. "properties": {
  14671. "timestamp": {
  14672. "type": "number"
  14673. },
  14674. "sessionID": {
  14675. "type": "string",
  14676. "pattern": "^ses"
  14677. },
  14678. "messageID": {
  14679. "type": "string",
  14680. "pattern": "^msg_"
  14681. },
  14682. "prompt": {
  14683. "$ref": "#/components/schemas/Prompt"
  14684. },
  14685. "timeCreated": {
  14686. "type": "number"
  14687. }
  14688. },
  14689. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  14690. "additionalProperties": false
  14691. }
  14692. },
  14693. "required": ["id", "type", "properties"],
  14694. "additionalProperties": false
  14695. },
  14696. {
  14697. "type": "object",
  14698. "properties": {
  14699. "id": {
  14700. "type": "string",
  14701. "pattern": "^evt_"
  14702. },
  14703. "type": {
  14704. "type": "string",
  14705. "enum": ["session.next.interrupt.requested"]
  14706. },
  14707. "properties": {
  14708. "type": "object",
  14709. "properties": {
  14710. "timestamp": {
  14711. "type": "number"
  14712. },
  14713. "sessionID": {
  14714. "type": "string",
  14715. "pattern": "^ses"
  14716. }
  14717. },
  14718. "required": ["timestamp", "sessionID"],
  14719. "additionalProperties": false
  14720. }
  14721. },
  14722. "required": ["id", "type", "properties"],
  14723. "additionalProperties": false
  14724. },
  14725. {
  14726. "type": "object",
  14727. "properties": {
  14728. "id": {
  14729. "type": "string",
  14730. "pattern": "^evt_"
  14731. },
  14732. "type": {
  14733. "type": "string",
  14734. "enum": ["session.next.context.updated"]
  14735. },
  14736. "properties": {
  14737. "type": "object",
  14738. "properties": {
  14739. "timestamp": {
  14740. "type": "number"
  14741. },
  14742. "sessionID": {
  14743. "type": "string",
  14744. "pattern": "^ses"
  14745. },
  14746. "messageID": {
  14747. "type": "string",
  14748. "pattern": "^msg_"
  14749. },
  14750. "text": {
  14751. "type": "string"
  14752. }
  14753. },
  14754. "required": ["timestamp", "sessionID", "messageID", "text"],
  14755. "additionalProperties": false
  14756. }
  14757. },
  14758. "required": ["id", "type", "properties"],
  14759. "additionalProperties": false
  14760. },
  14761. {
  14762. "type": "object",
  14763. "properties": {
  14764. "id": {
  14765. "type": "string",
  14766. "pattern": "^evt_"
  14767. },
  14768. "type": {
  14769. "type": "string",
  14770. "enum": ["session.next.synthetic"]
  14771. },
  14772. "properties": {
  14773. "type": "object",
  14774. "properties": {
  14775. "timestamp": {
  14776. "type": "number"
  14777. },
  14778. "sessionID": {
  14779. "type": "string",
  14780. "pattern": "^ses"
  14781. },
  14782. "messageID": {
  14783. "type": "string",
  14784. "pattern": "^msg_"
  14785. },
  14786. "text": {
  14787. "type": "string"
  14788. }
  14789. },
  14790. "required": ["timestamp", "sessionID", "messageID", "text"],
  14791. "additionalProperties": false
  14792. }
  14793. },
  14794. "required": ["id", "type", "properties"],
  14795. "additionalProperties": false
  14796. },
  14797. {
  14798. "type": "object",
  14799. "properties": {
  14800. "id": {
  14801. "type": "string",
  14802. "pattern": "^evt_"
  14803. },
  14804. "type": {
  14805. "type": "string",
  14806. "enum": ["session.next.shell.started"]
  14807. },
  14808. "properties": {
  14809. "type": "object",
  14810. "properties": {
  14811. "timestamp": {
  14812. "type": "number"
  14813. },
  14814. "sessionID": {
  14815. "type": "string",
  14816. "pattern": "^ses"
  14817. },
  14818. "messageID": {
  14819. "type": "string",
  14820. "pattern": "^msg_"
  14821. },
  14822. "callID": {
  14823. "type": "string"
  14824. },
  14825. "command": {
  14826. "type": "string"
  14827. }
  14828. },
  14829. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  14830. "additionalProperties": false
  14831. }
  14832. },
  14833. "required": ["id", "type", "properties"],
  14834. "additionalProperties": false
  14835. },
  14836. {
  14837. "type": "object",
  14838. "properties": {
  14839. "id": {
  14840. "type": "string",
  14841. "pattern": "^evt_"
  14842. },
  14843. "type": {
  14844. "type": "string",
  14845. "enum": ["session.next.shell.ended"]
  14846. },
  14847. "properties": {
  14848. "type": "object",
  14849. "properties": {
  14850. "timestamp": {
  14851. "type": "number"
  14852. },
  14853. "sessionID": {
  14854. "type": "string",
  14855. "pattern": "^ses"
  14856. },
  14857. "callID": {
  14858. "type": "string"
  14859. },
  14860. "output": {
  14861. "type": "string"
  14862. }
  14863. },
  14864. "required": ["timestamp", "sessionID", "callID", "output"],
  14865. "additionalProperties": false
  14866. }
  14867. },
  14868. "required": ["id", "type", "properties"],
  14869. "additionalProperties": false
  14870. },
  14871. {
  14872. "type": "object",
  14873. "properties": {
  14874. "id": {
  14875. "type": "string",
  14876. "pattern": "^evt_"
  14877. },
  14878. "type": {
  14879. "type": "string",
  14880. "enum": ["session.next.step.started"]
  14881. },
  14882. "properties": {
  14883. "type": "object",
  14884. "properties": {
  14885. "timestamp": {
  14886. "type": "number"
  14887. },
  14888. "sessionID": {
  14889. "type": "string",
  14890. "pattern": "^ses"
  14891. },
  14892. "assistantMessageID": {
  14893. "type": "string",
  14894. "pattern": "^msg_"
  14895. },
  14896. "agent": {
  14897. "type": "string"
  14898. },
  14899. "model": {
  14900. "type": "object",
  14901. "properties": {
  14902. "id": {
  14903. "type": "string"
  14904. },
  14905. "providerID": {
  14906. "type": "string"
  14907. },
  14908. "variant": {
  14909. "type": "string"
  14910. }
  14911. },
  14912. "required": ["id", "providerID"],
  14913. "additionalProperties": false
  14914. },
  14915. "snapshot": {
  14916. "type": "string"
  14917. }
  14918. },
  14919. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  14920. "additionalProperties": false
  14921. }
  14922. },
  14923. "required": ["id", "type", "properties"],
  14924. "additionalProperties": false
  14925. },
  14926. {
  14927. "type": "object",
  14928. "properties": {
  14929. "id": {
  14930. "type": "string",
  14931. "pattern": "^evt_"
  14932. },
  14933. "type": {
  14934. "type": "string",
  14935. "enum": ["session.next.step.ended"]
  14936. },
  14937. "properties": {
  14938. "type": "object",
  14939. "properties": {
  14940. "timestamp": {
  14941. "type": "number"
  14942. },
  14943. "sessionID": {
  14944. "type": "string",
  14945. "pattern": "^ses"
  14946. },
  14947. "assistantMessageID": {
  14948. "type": "string",
  14949. "pattern": "^msg_"
  14950. },
  14951. "finish": {
  14952. "type": "string"
  14953. },
  14954. "cost": {
  14955. "type": "number"
  14956. },
  14957. "tokens": {
  14958. "type": "object",
  14959. "properties": {
  14960. "input": {
  14961. "type": "number"
  14962. },
  14963. "output": {
  14964. "type": "number"
  14965. },
  14966. "reasoning": {
  14967. "type": "number"
  14968. },
  14969. "cache": {
  14970. "type": "object",
  14971. "properties": {
  14972. "read": {
  14973. "type": "number"
  14974. },
  14975. "write": {
  14976. "type": "number"
  14977. }
  14978. },
  14979. "required": ["read", "write"],
  14980. "additionalProperties": false
  14981. }
  14982. },
  14983. "required": ["input", "output", "reasoning", "cache"],
  14984. "additionalProperties": false
  14985. },
  14986. "snapshot": {
  14987. "type": "string"
  14988. }
  14989. },
  14990. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  14991. "additionalProperties": false
  14992. }
  14993. },
  14994. "required": ["id", "type", "properties"],
  14995. "additionalProperties": false
  14996. },
  14997. {
  14998. "type": "object",
  14999. "properties": {
  15000. "id": {
  15001. "type": "string",
  15002. "pattern": "^evt_"
  15003. },
  15004. "type": {
  15005. "type": "string",
  15006. "enum": ["session.next.step.failed"]
  15007. },
  15008. "properties": {
  15009. "type": "object",
  15010. "properties": {
  15011. "timestamp": {
  15012. "type": "number"
  15013. },
  15014. "sessionID": {
  15015. "type": "string",
  15016. "pattern": "^ses"
  15017. },
  15018. "assistantMessageID": {
  15019. "type": "string",
  15020. "pattern": "^msg_"
  15021. },
  15022. "error": {
  15023. "$ref": "#/components/schemas/SessionErrorUnknown"
  15024. }
  15025. },
  15026. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  15027. "additionalProperties": false
  15028. }
  15029. },
  15030. "required": ["id", "type", "properties"],
  15031. "additionalProperties": false
  15032. },
  15033. {
  15034. "type": "object",
  15035. "properties": {
  15036. "id": {
  15037. "type": "string",
  15038. "pattern": "^evt_"
  15039. },
  15040. "type": {
  15041. "type": "string",
  15042. "enum": ["session.next.text.started"]
  15043. },
  15044. "properties": {
  15045. "type": "object",
  15046. "properties": {
  15047. "timestamp": {
  15048. "type": "number"
  15049. },
  15050. "sessionID": {
  15051. "type": "string",
  15052. "pattern": "^ses"
  15053. },
  15054. "assistantMessageID": {
  15055. "type": "string",
  15056. "pattern": "^msg_"
  15057. },
  15058. "textID": {
  15059. "type": "string"
  15060. }
  15061. },
  15062. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  15063. "additionalProperties": false
  15064. }
  15065. },
  15066. "required": ["id", "type", "properties"],
  15067. "additionalProperties": false
  15068. },
  15069. {
  15070. "type": "object",
  15071. "properties": {
  15072. "id": {
  15073. "type": "string",
  15074. "pattern": "^evt_"
  15075. },
  15076. "type": {
  15077. "type": "string",
  15078. "enum": ["session.next.text.delta"]
  15079. },
  15080. "properties": {
  15081. "type": "object",
  15082. "properties": {
  15083. "timestamp": {
  15084. "type": "number"
  15085. },
  15086. "sessionID": {
  15087. "type": "string",
  15088. "pattern": "^ses"
  15089. },
  15090. "assistantMessageID": {
  15091. "type": "string",
  15092. "pattern": "^msg_"
  15093. },
  15094. "textID": {
  15095. "type": "string"
  15096. },
  15097. "delta": {
  15098. "type": "string"
  15099. }
  15100. },
  15101. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  15102. "additionalProperties": false
  15103. }
  15104. },
  15105. "required": ["id", "type", "properties"],
  15106. "additionalProperties": false
  15107. },
  15108. {
  15109. "type": "object",
  15110. "properties": {
  15111. "id": {
  15112. "type": "string",
  15113. "pattern": "^evt_"
  15114. },
  15115. "type": {
  15116. "type": "string",
  15117. "enum": ["session.next.text.ended"]
  15118. },
  15119. "properties": {
  15120. "type": "object",
  15121. "properties": {
  15122. "timestamp": {
  15123. "type": "number"
  15124. },
  15125. "sessionID": {
  15126. "type": "string",
  15127. "pattern": "^ses"
  15128. },
  15129. "assistantMessageID": {
  15130. "type": "string",
  15131. "pattern": "^msg_"
  15132. },
  15133. "textID": {
  15134. "type": "string"
  15135. },
  15136. "text": {
  15137. "type": "string"
  15138. }
  15139. },
  15140. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  15141. "additionalProperties": false
  15142. }
  15143. },
  15144. "required": ["id", "type", "properties"],
  15145. "additionalProperties": false
  15146. },
  15147. {
  15148. "type": "object",
  15149. "properties": {
  15150. "id": {
  15151. "type": "string",
  15152. "pattern": "^evt_"
  15153. },
  15154. "type": {
  15155. "type": "string",
  15156. "enum": ["session.next.reasoning.started"]
  15157. },
  15158. "properties": {
  15159. "type": "object",
  15160. "properties": {
  15161. "timestamp": {
  15162. "type": "number"
  15163. },
  15164. "sessionID": {
  15165. "type": "string",
  15166. "pattern": "^ses"
  15167. },
  15168. "assistantMessageID": {
  15169. "type": "string",
  15170. "pattern": "^msg_"
  15171. },
  15172. "reasoningID": {
  15173. "type": "string"
  15174. },
  15175. "providerMetadata": {
  15176. "type": "object",
  15177. "additionalProperties": {
  15178. "type": "object"
  15179. }
  15180. }
  15181. },
  15182. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  15183. "additionalProperties": false
  15184. }
  15185. },
  15186. "required": ["id", "type", "properties"],
  15187. "additionalProperties": false
  15188. },
  15189. {
  15190. "type": "object",
  15191. "properties": {
  15192. "id": {
  15193. "type": "string",
  15194. "pattern": "^evt_"
  15195. },
  15196. "type": {
  15197. "type": "string",
  15198. "enum": ["session.next.reasoning.delta"]
  15199. },
  15200. "properties": {
  15201. "type": "object",
  15202. "properties": {
  15203. "timestamp": {
  15204. "type": "number"
  15205. },
  15206. "sessionID": {
  15207. "type": "string",
  15208. "pattern": "^ses"
  15209. },
  15210. "assistantMessageID": {
  15211. "type": "string",
  15212. "pattern": "^msg_"
  15213. },
  15214. "reasoningID": {
  15215. "type": "string"
  15216. },
  15217. "delta": {
  15218. "type": "string"
  15219. }
  15220. },
  15221. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  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. "pattern": "^evt_"
  15234. },
  15235. "type": {
  15236. "type": "string",
  15237. "enum": ["session.next.reasoning.ended"]
  15238. },
  15239. "properties": {
  15240. "type": "object",
  15241. "properties": {
  15242. "timestamp": {
  15243. "type": "number"
  15244. },
  15245. "sessionID": {
  15246. "type": "string",
  15247. "pattern": "^ses"
  15248. },
  15249. "assistantMessageID": {
  15250. "type": "string",
  15251. "pattern": "^msg_"
  15252. },
  15253. "reasoningID": {
  15254. "type": "string"
  15255. },
  15256. "text": {
  15257. "type": "string"
  15258. },
  15259. "providerMetadata": {
  15260. "type": "object",
  15261. "additionalProperties": {
  15262. "type": "object"
  15263. }
  15264. }
  15265. },
  15266. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  15267. "additionalProperties": false
  15268. }
  15269. },
  15270. "required": ["id", "type", "properties"],
  15271. "additionalProperties": false
  15272. },
  15273. {
  15274. "type": "object",
  15275. "properties": {
  15276. "id": {
  15277. "type": "string",
  15278. "pattern": "^evt_"
  15279. },
  15280. "type": {
  15281. "type": "string",
  15282. "enum": ["session.next.tool.input.started"]
  15283. },
  15284. "properties": {
  15285. "type": "object",
  15286. "properties": {
  15287. "timestamp": {
  15288. "type": "number"
  15289. },
  15290. "sessionID": {
  15291. "type": "string",
  15292. "pattern": "^ses"
  15293. },
  15294. "assistantMessageID": {
  15295. "type": "string",
  15296. "pattern": "^msg_"
  15297. },
  15298. "callID": {
  15299. "type": "string"
  15300. },
  15301. "name": {
  15302. "type": "string"
  15303. }
  15304. },
  15305. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  15306. "additionalProperties": false
  15307. }
  15308. },
  15309. "required": ["id", "type", "properties"],
  15310. "additionalProperties": false
  15311. },
  15312. {
  15313. "type": "object",
  15314. "properties": {
  15315. "id": {
  15316. "type": "string",
  15317. "pattern": "^evt_"
  15318. },
  15319. "type": {
  15320. "type": "string",
  15321. "enum": ["session.next.tool.input.delta"]
  15322. },
  15323. "properties": {
  15324. "type": "object",
  15325. "properties": {
  15326. "timestamp": {
  15327. "type": "number"
  15328. },
  15329. "sessionID": {
  15330. "type": "string",
  15331. "pattern": "^ses"
  15332. },
  15333. "assistantMessageID": {
  15334. "type": "string",
  15335. "pattern": "^msg_"
  15336. },
  15337. "callID": {
  15338. "type": "string"
  15339. },
  15340. "delta": {
  15341. "type": "string"
  15342. }
  15343. },
  15344. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  15345. "additionalProperties": false
  15346. }
  15347. },
  15348. "required": ["id", "type", "properties"],
  15349. "additionalProperties": false
  15350. },
  15351. {
  15352. "type": "object",
  15353. "properties": {
  15354. "id": {
  15355. "type": "string",
  15356. "pattern": "^evt_"
  15357. },
  15358. "type": {
  15359. "type": "string",
  15360. "enum": ["session.next.tool.input.ended"]
  15361. },
  15362. "properties": {
  15363. "type": "object",
  15364. "properties": {
  15365. "timestamp": {
  15366. "type": "number"
  15367. },
  15368. "sessionID": {
  15369. "type": "string",
  15370. "pattern": "^ses"
  15371. },
  15372. "assistantMessageID": {
  15373. "type": "string",
  15374. "pattern": "^msg_"
  15375. },
  15376. "callID": {
  15377. "type": "string"
  15378. },
  15379. "text": {
  15380. "type": "string"
  15381. }
  15382. },
  15383. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  15384. "additionalProperties": false
  15385. }
  15386. },
  15387. "required": ["id", "type", "properties"],
  15388. "additionalProperties": false
  15389. },
  15390. {
  15391. "type": "object",
  15392. "properties": {
  15393. "id": {
  15394. "type": "string",
  15395. "pattern": "^evt_"
  15396. },
  15397. "type": {
  15398. "type": "string",
  15399. "enum": ["session.next.tool.called"]
  15400. },
  15401. "properties": {
  15402. "type": "object",
  15403. "properties": {
  15404. "timestamp": {
  15405. "type": "number"
  15406. },
  15407. "sessionID": {
  15408. "type": "string",
  15409. "pattern": "^ses"
  15410. },
  15411. "assistantMessageID": {
  15412. "type": "string",
  15413. "pattern": "^msg_"
  15414. },
  15415. "callID": {
  15416. "type": "string"
  15417. },
  15418. "tool": {
  15419. "type": "string"
  15420. },
  15421. "input": {
  15422. "type": "object"
  15423. },
  15424. "provider": {
  15425. "type": "object",
  15426. "properties": {
  15427. "executed": {
  15428. "type": "boolean"
  15429. },
  15430. "metadata": {
  15431. "type": "object",
  15432. "additionalProperties": {
  15433. "type": "object"
  15434. }
  15435. }
  15436. },
  15437. "required": ["executed"],
  15438. "additionalProperties": false
  15439. }
  15440. },
  15441. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15442. "additionalProperties": false
  15443. }
  15444. },
  15445. "required": ["id", "type", "properties"],
  15446. "additionalProperties": false
  15447. },
  15448. {
  15449. "type": "object",
  15450. "properties": {
  15451. "id": {
  15452. "type": "string",
  15453. "pattern": "^evt_"
  15454. },
  15455. "type": {
  15456. "type": "string",
  15457. "enum": ["session.next.tool.progress"]
  15458. },
  15459. "properties": {
  15460. "type": "object",
  15461. "properties": {
  15462. "timestamp": {
  15463. "type": "number"
  15464. },
  15465. "sessionID": {
  15466. "type": "string",
  15467. "pattern": "^ses"
  15468. },
  15469. "assistantMessageID": {
  15470. "type": "string",
  15471. "pattern": "^msg_"
  15472. },
  15473. "callID": {
  15474. "type": "string"
  15475. },
  15476. "structured": {
  15477. "type": "object"
  15478. },
  15479. "content": {
  15480. "type": "array",
  15481. "items": {
  15482. "anyOf": [
  15483. {
  15484. "$ref": "#/components/schemas/ToolTextContent"
  15485. },
  15486. {
  15487. "$ref": "#/components/schemas/ToolFileContent"
  15488. }
  15489. ]
  15490. }
  15491. }
  15492. },
  15493. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  15494. "additionalProperties": false
  15495. }
  15496. },
  15497. "required": ["id", "type", "properties"],
  15498. "additionalProperties": false
  15499. },
  15500. {
  15501. "type": "object",
  15502. "properties": {
  15503. "id": {
  15504. "type": "string",
  15505. "pattern": "^evt_"
  15506. },
  15507. "type": {
  15508. "type": "string",
  15509. "enum": ["session.next.tool.success"]
  15510. },
  15511. "properties": {
  15512. "type": "object",
  15513. "properties": {
  15514. "timestamp": {
  15515. "type": "number"
  15516. },
  15517. "sessionID": {
  15518. "type": "string",
  15519. "pattern": "^ses"
  15520. },
  15521. "assistantMessageID": {
  15522. "type": "string",
  15523. "pattern": "^msg_"
  15524. },
  15525. "callID": {
  15526. "type": "string"
  15527. },
  15528. "structured": {
  15529. "type": "object"
  15530. },
  15531. "content": {
  15532. "type": "array",
  15533. "items": {
  15534. "anyOf": [
  15535. {
  15536. "$ref": "#/components/schemas/ToolTextContent"
  15537. },
  15538. {
  15539. "$ref": "#/components/schemas/ToolFileContent"
  15540. }
  15541. ]
  15542. }
  15543. },
  15544. "outputPaths": {
  15545. "type": "array",
  15546. "items": {
  15547. "type": "string"
  15548. }
  15549. },
  15550. "result": {},
  15551. "provider": {
  15552. "type": "object",
  15553. "properties": {
  15554. "executed": {
  15555. "type": "boolean"
  15556. },
  15557. "metadata": {
  15558. "type": "object",
  15559. "additionalProperties": {
  15560. "type": "object"
  15561. }
  15562. }
  15563. },
  15564. "required": ["executed"],
  15565. "additionalProperties": false
  15566. }
  15567. },
  15568. "required": [
  15569. "timestamp",
  15570. "sessionID",
  15571. "assistantMessageID",
  15572. "callID",
  15573. "structured",
  15574. "content",
  15575. "provider"
  15576. ],
  15577. "additionalProperties": false
  15578. }
  15579. },
  15580. "required": ["id", "type", "properties"],
  15581. "additionalProperties": false
  15582. },
  15583. {
  15584. "type": "object",
  15585. "properties": {
  15586. "id": {
  15587. "type": "string",
  15588. "pattern": "^evt_"
  15589. },
  15590. "type": {
  15591. "type": "string",
  15592. "enum": ["session.next.tool.failed"]
  15593. },
  15594. "properties": {
  15595. "type": "object",
  15596. "properties": {
  15597. "timestamp": {
  15598. "type": "number"
  15599. },
  15600. "sessionID": {
  15601. "type": "string",
  15602. "pattern": "^ses"
  15603. },
  15604. "assistantMessageID": {
  15605. "type": "string",
  15606. "pattern": "^msg_"
  15607. },
  15608. "callID": {
  15609. "type": "string"
  15610. },
  15611. "error": {
  15612. "$ref": "#/components/schemas/SessionErrorUnknown"
  15613. },
  15614. "result": {},
  15615. "provider": {
  15616. "type": "object",
  15617. "properties": {
  15618. "executed": {
  15619. "type": "boolean"
  15620. },
  15621. "metadata": {
  15622. "type": "object",
  15623. "additionalProperties": {
  15624. "type": "object"
  15625. }
  15626. }
  15627. },
  15628. "required": ["executed"],
  15629. "additionalProperties": false
  15630. }
  15631. },
  15632. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  15633. "additionalProperties": false
  15634. }
  15635. },
  15636. "required": ["id", "type", "properties"],
  15637. "additionalProperties": false
  15638. },
  15639. {
  15640. "type": "object",
  15641. "properties": {
  15642. "id": {
  15643. "type": "string",
  15644. "pattern": "^evt_"
  15645. },
  15646. "type": {
  15647. "type": "string",
  15648. "enum": ["session.next.retried"]
  15649. },
  15650. "properties": {
  15651. "type": "object",
  15652. "properties": {
  15653. "timestamp": {
  15654. "type": "number"
  15655. },
  15656. "sessionID": {
  15657. "type": "string",
  15658. "pattern": "^ses"
  15659. },
  15660. "attempt": {
  15661. "type": "number"
  15662. },
  15663. "error": {
  15664. "$ref": "#/components/schemas/SessionNextRetry_error"
  15665. }
  15666. },
  15667. "required": ["timestamp", "sessionID", "attempt", "error"],
  15668. "additionalProperties": false
  15669. }
  15670. },
  15671. "required": ["id", "type", "properties"],
  15672. "additionalProperties": false
  15673. },
  15674. {
  15675. "type": "object",
  15676. "properties": {
  15677. "id": {
  15678. "type": "string",
  15679. "pattern": "^evt_"
  15680. },
  15681. "type": {
  15682. "type": "string",
  15683. "enum": ["session.next.compaction.started"]
  15684. },
  15685. "properties": {
  15686. "type": "object",
  15687. "properties": {
  15688. "timestamp": {
  15689. "type": "number"
  15690. },
  15691. "sessionID": {
  15692. "type": "string",
  15693. "pattern": "^ses"
  15694. },
  15695. "messageID": {
  15696. "type": "string",
  15697. "pattern": "^msg_"
  15698. },
  15699. "reason": {
  15700. "type": "string",
  15701. "enum": ["auto", "manual"]
  15702. }
  15703. },
  15704. "required": ["timestamp", "sessionID", "messageID", "reason"],
  15705. "additionalProperties": false
  15706. }
  15707. },
  15708. "required": ["id", "type", "properties"],
  15709. "additionalProperties": false
  15710. },
  15711. {
  15712. "type": "object",
  15713. "properties": {
  15714. "id": {
  15715. "type": "string",
  15716. "pattern": "^evt_"
  15717. },
  15718. "type": {
  15719. "type": "string",
  15720. "enum": ["session.next.compaction.delta"]
  15721. },
  15722. "properties": {
  15723. "type": "object",
  15724. "properties": {
  15725. "timestamp": {
  15726. "type": "number"
  15727. },
  15728. "sessionID": {
  15729. "type": "string",
  15730. "pattern": "^ses"
  15731. },
  15732. "messageID": {
  15733. "type": "string",
  15734. "pattern": "^msg_"
  15735. },
  15736. "text": {
  15737. "type": "string"
  15738. }
  15739. },
  15740. "required": ["timestamp", "sessionID", "messageID", "text"],
  15741. "additionalProperties": false
  15742. }
  15743. },
  15744. "required": ["id", "type", "properties"],
  15745. "additionalProperties": false
  15746. },
  15747. {
  15748. "type": "object",
  15749. "properties": {
  15750. "id": {
  15751. "type": "string",
  15752. "pattern": "^evt_"
  15753. },
  15754. "type": {
  15755. "type": "string",
  15756. "enum": ["session.next.compaction.ended"]
  15757. },
  15758. "properties": {
  15759. "type": "object",
  15760. "properties": {
  15761. "timestamp": {
  15762. "type": "number"
  15763. },
  15764. "sessionID": {
  15765. "type": "string",
  15766. "pattern": "^ses"
  15767. },
  15768. "messageID": {
  15769. "type": "string",
  15770. "pattern": "^msg_"
  15771. },
  15772. "reason": {
  15773. "type": "string",
  15774. "enum": ["auto", "manual"]
  15775. },
  15776. "text": {
  15777. "type": "string"
  15778. },
  15779. "recent": {
  15780. "type": "string"
  15781. }
  15782. },
  15783. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  15784. "additionalProperties": false
  15785. }
  15786. },
  15787. "required": ["id", "type", "properties"],
  15788. "additionalProperties": false
  15789. },
  15790. {
  15791. "type": "object",
  15792. "properties": {
  15793. "id": {
  15794. "type": "string",
  15795. "pattern": "^evt_"
  15796. },
  15797. "type": {
  15798. "type": "string",
  15799. "enum": ["message.part.delta"]
  15800. },
  15801. "properties": {
  15802. "type": "object",
  15803. "properties": {
  15804. "sessionID": {
  15805. "type": "string",
  15806. "pattern": "^ses"
  15807. },
  15808. "messageID": {
  15809. "type": "string",
  15810. "pattern": "^msg"
  15811. },
  15812. "partID": {
  15813. "type": "string",
  15814. "pattern": "^prt"
  15815. },
  15816. "field": {
  15817. "type": "string"
  15818. },
  15819. "delta": {
  15820. "type": "string"
  15821. }
  15822. },
  15823. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15824. "additionalProperties": false
  15825. }
  15826. },
  15827. "required": ["id", "type", "properties"],
  15828. "additionalProperties": false
  15829. },
  15830. {
  15831. "type": "object",
  15832. "properties": {
  15833. "id": {
  15834. "type": "string",
  15835. "pattern": "^evt_"
  15836. },
  15837. "type": {
  15838. "type": "string",
  15839. "enum": ["session.diff"]
  15840. },
  15841. "properties": {
  15842. "type": "object",
  15843. "properties": {
  15844. "sessionID": {
  15845. "type": "string",
  15846. "pattern": "^ses"
  15847. },
  15848. "diff": {
  15849. "type": "array",
  15850. "items": {
  15851. "$ref": "#/components/schemas/SnapshotFileDiff"
  15852. }
  15853. }
  15854. },
  15855. "required": ["sessionID", "diff"],
  15856. "additionalProperties": false
  15857. }
  15858. },
  15859. "required": ["id", "type", "properties"],
  15860. "additionalProperties": false
  15861. },
  15862. {
  15863. "type": "object",
  15864. "properties": {
  15865. "id": {
  15866. "type": "string",
  15867. "pattern": "^evt_"
  15868. },
  15869. "type": {
  15870. "type": "string",
  15871. "enum": ["session.error"]
  15872. },
  15873. "properties": {
  15874. "type": "object",
  15875. "properties": {
  15876. "sessionID": {
  15877. "type": "string",
  15878. "pattern": "^ses"
  15879. },
  15880. "error": {
  15881. "anyOf": [
  15882. {
  15883. "$ref": "#/components/schemas/ProviderAuthError"
  15884. },
  15885. {
  15886. "$ref": "#/components/schemas/UnknownError"
  15887. },
  15888. {
  15889. "$ref": "#/components/schemas/MessageOutputLengthError"
  15890. },
  15891. {
  15892. "$ref": "#/components/schemas/MessageAbortedError"
  15893. },
  15894. {
  15895. "$ref": "#/components/schemas/StructuredOutputError"
  15896. },
  15897. {
  15898. "$ref": "#/components/schemas/ContextOverflowError"
  15899. },
  15900. {
  15901. "$ref": "#/components/schemas/APIError"
  15902. }
  15903. ]
  15904. }
  15905. },
  15906. "additionalProperties": false
  15907. }
  15908. },
  15909. "required": ["id", "type", "properties"],
  15910. "additionalProperties": false
  15911. },
  15912. {
  15913. "type": "object",
  15914. "properties": {
  15915. "id": {
  15916. "type": "string",
  15917. "pattern": "^evt_"
  15918. },
  15919. "type": {
  15920. "type": "string",
  15921. "enum": ["installation.updated"]
  15922. },
  15923. "properties": {
  15924. "type": "object",
  15925. "properties": {
  15926. "version": {
  15927. "type": "string"
  15928. }
  15929. },
  15930. "required": ["version"],
  15931. "additionalProperties": false
  15932. }
  15933. },
  15934. "required": ["id", "type", "properties"],
  15935. "additionalProperties": false
  15936. },
  15937. {
  15938. "type": "object",
  15939. "properties": {
  15940. "id": {
  15941. "type": "string",
  15942. "pattern": "^evt_"
  15943. },
  15944. "type": {
  15945. "type": "string",
  15946. "enum": ["installation.update-available"]
  15947. },
  15948. "properties": {
  15949. "type": "object",
  15950. "properties": {
  15951. "version": {
  15952. "type": "string"
  15953. }
  15954. },
  15955. "required": ["version"],
  15956. "additionalProperties": false
  15957. }
  15958. },
  15959. "required": ["id", "type", "properties"],
  15960. "additionalProperties": false
  15961. },
  15962. {
  15963. "type": "object",
  15964. "properties": {
  15965. "id": {
  15966. "type": "string",
  15967. "pattern": "^evt_"
  15968. },
  15969. "type": {
  15970. "type": "string",
  15971. "enum": ["file.edited"]
  15972. },
  15973. "properties": {
  15974. "type": "object",
  15975. "properties": {
  15976. "file": {
  15977. "type": "string"
  15978. }
  15979. },
  15980. "required": ["file"],
  15981. "additionalProperties": false
  15982. }
  15983. },
  15984. "required": ["id", "type", "properties"],
  15985. "additionalProperties": false
  15986. },
  15987. {
  15988. "type": "object",
  15989. "properties": {
  15990. "id": {
  15991. "type": "string",
  15992. "pattern": "^evt_"
  15993. },
  15994. "type": {
  15995. "type": "string",
  15996. "enum": ["account.added"]
  15997. },
  15998. "properties": {
  15999. "type": "object",
  16000. "properties": {
  16001. "account": {
  16002. "$ref": "#/components/schemas/AuthInfo"
  16003. }
  16004. },
  16005. "required": ["account"],
  16006. "additionalProperties": false
  16007. }
  16008. },
  16009. "required": ["id", "type", "properties"],
  16010. "additionalProperties": false
  16011. },
  16012. {
  16013. "type": "object",
  16014. "properties": {
  16015. "id": {
  16016. "type": "string",
  16017. "pattern": "^evt_"
  16018. },
  16019. "type": {
  16020. "type": "string",
  16021. "enum": ["account.removed"]
  16022. },
  16023. "properties": {
  16024. "type": "object",
  16025. "properties": {
  16026. "account": {
  16027. "$ref": "#/components/schemas/AuthInfo"
  16028. }
  16029. },
  16030. "required": ["account"],
  16031. "additionalProperties": false
  16032. }
  16033. },
  16034. "required": ["id", "type", "properties"],
  16035. "additionalProperties": false
  16036. },
  16037. {
  16038. "type": "object",
  16039. "properties": {
  16040. "id": {
  16041. "type": "string",
  16042. "pattern": "^evt_"
  16043. },
  16044. "type": {
  16045. "type": "string",
  16046. "enum": ["account.switched"]
  16047. },
  16048. "properties": {
  16049. "type": "object",
  16050. "properties": {
  16051. "serviceID": {
  16052. "type": "string"
  16053. },
  16054. "from": {
  16055. "type": "string"
  16056. },
  16057. "to": {
  16058. "type": "string"
  16059. }
  16060. },
  16061. "required": ["serviceID"],
  16062. "additionalProperties": false
  16063. }
  16064. },
  16065. "required": ["id", "type", "properties"],
  16066. "additionalProperties": false
  16067. },
  16068. {
  16069. "type": "object",
  16070. "properties": {
  16071. "id": {
  16072. "type": "string",
  16073. "pattern": "^evt_"
  16074. },
  16075. "type": {
  16076. "type": "string",
  16077. "enum": ["permission.v2.asked"]
  16078. },
  16079. "properties": {
  16080. "type": "object",
  16081. "properties": {
  16082. "id": {
  16083. "type": "string",
  16084. "pattern": "^per"
  16085. },
  16086. "sessionID": {
  16087. "type": "string",
  16088. "pattern": "^ses"
  16089. },
  16090. "action": {
  16091. "type": "string"
  16092. },
  16093. "resources": {
  16094. "type": "array",
  16095. "items": {
  16096. "type": "string"
  16097. }
  16098. },
  16099. "save": {
  16100. "type": "array",
  16101. "items": {
  16102. "type": "string"
  16103. }
  16104. },
  16105. "metadata": {
  16106. "type": "object"
  16107. },
  16108. "source": {
  16109. "$ref": "#/components/schemas/PermissionV2Source"
  16110. }
  16111. },
  16112. "required": ["id", "sessionID", "action", "resources"],
  16113. "additionalProperties": false
  16114. }
  16115. },
  16116. "required": ["id", "type", "properties"],
  16117. "additionalProperties": false
  16118. },
  16119. {
  16120. "type": "object",
  16121. "properties": {
  16122. "id": {
  16123. "type": "string",
  16124. "pattern": "^evt_"
  16125. },
  16126. "type": {
  16127. "type": "string",
  16128. "enum": ["permission.v2.replied"]
  16129. },
  16130. "properties": {
  16131. "type": "object",
  16132. "properties": {
  16133. "sessionID": {
  16134. "type": "string",
  16135. "pattern": "^ses"
  16136. },
  16137. "requestID": {
  16138. "type": "string",
  16139. "pattern": "^per"
  16140. },
  16141. "reply": {
  16142. "$ref": "#/components/schemas/PermissionV2Reply"
  16143. }
  16144. },
  16145. "required": ["sessionID", "requestID", "reply"],
  16146. "additionalProperties": false
  16147. }
  16148. },
  16149. "required": ["id", "type", "properties"],
  16150. "additionalProperties": false
  16151. },
  16152. {
  16153. "type": "object",
  16154. "properties": {
  16155. "id": {
  16156. "type": "string",
  16157. "pattern": "^evt_"
  16158. },
  16159. "type": {
  16160. "type": "string",
  16161. "enum": ["file.watcher.updated"]
  16162. },
  16163. "properties": {
  16164. "type": "object",
  16165. "properties": {
  16166. "file": {
  16167. "type": "string"
  16168. },
  16169. "event": {
  16170. "type": "string",
  16171. "enum": ["add", "change", "unlink"]
  16172. }
  16173. },
  16174. "required": ["file", "event"],
  16175. "additionalProperties": false
  16176. }
  16177. },
  16178. "required": ["id", "type", "properties"],
  16179. "additionalProperties": false
  16180. },
  16181. {
  16182. "type": "object",
  16183. "properties": {
  16184. "id": {
  16185. "type": "string",
  16186. "pattern": "^evt_"
  16187. },
  16188. "type": {
  16189. "type": "string",
  16190. "enum": ["pty.created"]
  16191. },
  16192. "properties": {
  16193. "type": "object",
  16194. "properties": {
  16195. "info": {
  16196. "$ref": "#/components/schemas/Pty"
  16197. }
  16198. },
  16199. "required": ["info"],
  16200. "additionalProperties": false
  16201. }
  16202. },
  16203. "required": ["id", "type", "properties"],
  16204. "additionalProperties": false
  16205. },
  16206. {
  16207. "type": "object",
  16208. "properties": {
  16209. "id": {
  16210. "type": "string",
  16211. "pattern": "^evt_"
  16212. },
  16213. "type": {
  16214. "type": "string",
  16215. "enum": ["pty.updated"]
  16216. },
  16217. "properties": {
  16218. "type": "object",
  16219. "properties": {
  16220. "info": {
  16221. "$ref": "#/components/schemas/Pty"
  16222. }
  16223. },
  16224. "required": ["info"],
  16225. "additionalProperties": false
  16226. }
  16227. },
  16228. "required": ["id", "type", "properties"],
  16229. "additionalProperties": false
  16230. },
  16231. {
  16232. "type": "object",
  16233. "properties": {
  16234. "id": {
  16235. "type": "string",
  16236. "pattern": "^evt_"
  16237. },
  16238. "type": {
  16239. "type": "string",
  16240. "enum": ["pty.exited"]
  16241. },
  16242. "properties": {
  16243. "type": "object",
  16244. "properties": {
  16245. "id": {
  16246. "type": "string",
  16247. "pattern": "^pty"
  16248. },
  16249. "exitCode": {
  16250. "type": "integer",
  16251. "minimum": 0
  16252. }
  16253. },
  16254. "required": ["id", "exitCode"],
  16255. "additionalProperties": false
  16256. }
  16257. },
  16258. "required": ["id", "type", "properties"],
  16259. "additionalProperties": false
  16260. },
  16261. {
  16262. "type": "object",
  16263. "properties": {
  16264. "id": {
  16265. "type": "string",
  16266. "pattern": "^evt_"
  16267. },
  16268. "type": {
  16269. "type": "string",
  16270. "enum": ["pty.deleted"]
  16271. },
  16272. "properties": {
  16273. "type": "object",
  16274. "properties": {
  16275. "id": {
  16276. "type": "string",
  16277. "pattern": "^pty"
  16278. }
  16279. },
  16280. "required": ["id"],
  16281. "additionalProperties": false
  16282. }
  16283. },
  16284. "required": ["id", "type", "properties"],
  16285. "additionalProperties": false
  16286. },
  16287. {
  16288. "type": "object",
  16289. "properties": {
  16290. "id": {
  16291. "type": "string",
  16292. "pattern": "^evt_"
  16293. },
  16294. "type": {
  16295. "type": "string",
  16296. "enum": ["question.v2.asked"]
  16297. },
  16298. "properties": {
  16299. "type": "object",
  16300. "properties": {
  16301. "id": {
  16302. "type": "string",
  16303. "pattern": "^que"
  16304. },
  16305. "sessionID": {
  16306. "type": "string",
  16307. "pattern": "^ses"
  16308. },
  16309. "questions": {
  16310. "type": "array",
  16311. "items": {
  16312. "$ref": "#/components/schemas/QuestionV2Info"
  16313. },
  16314. "description": "Questions to ask"
  16315. },
  16316. "tool": {
  16317. "$ref": "#/components/schemas/QuestionV2Tool"
  16318. }
  16319. },
  16320. "required": ["id", "sessionID", "questions"],
  16321. "additionalProperties": false
  16322. }
  16323. },
  16324. "required": ["id", "type", "properties"],
  16325. "additionalProperties": false
  16326. },
  16327. {
  16328. "type": "object",
  16329. "properties": {
  16330. "id": {
  16331. "type": "string",
  16332. "pattern": "^evt_"
  16333. },
  16334. "type": {
  16335. "type": "string",
  16336. "enum": ["question.v2.replied"]
  16337. },
  16338. "properties": {
  16339. "type": "object",
  16340. "properties": {
  16341. "sessionID": {
  16342. "type": "string",
  16343. "pattern": "^ses"
  16344. },
  16345. "requestID": {
  16346. "type": "string",
  16347. "pattern": "^que"
  16348. },
  16349. "answers": {
  16350. "type": "array",
  16351. "items": {
  16352. "$ref": "#/components/schemas/QuestionV2Answer"
  16353. }
  16354. }
  16355. },
  16356. "required": ["sessionID", "requestID", "answers"],
  16357. "additionalProperties": false
  16358. }
  16359. },
  16360. "required": ["id", "type", "properties"],
  16361. "additionalProperties": false
  16362. },
  16363. {
  16364. "type": "object",
  16365. "properties": {
  16366. "id": {
  16367. "type": "string",
  16368. "pattern": "^evt_"
  16369. },
  16370. "type": {
  16371. "type": "string",
  16372. "enum": ["question.v2.rejected"]
  16373. },
  16374. "properties": {
  16375. "type": "object",
  16376. "properties": {
  16377. "sessionID": {
  16378. "type": "string",
  16379. "pattern": "^ses"
  16380. },
  16381. "requestID": {
  16382. "type": "string",
  16383. "pattern": "^que"
  16384. }
  16385. },
  16386. "required": ["sessionID", "requestID"],
  16387. "additionalProperties": false
  16388. }
  16389. },
  16390. "required": ["id", "type", "properties"],
  16391. "additionalProperties": false
  16392. },
  16393. {
  16394. "type": "object",
  16395. "properties": {
  16396. "id": {
  16397. "type": "string",
  16398. "pattern": "^evt_"
  16399. },
  16400. "type": {
  16401. "type": "string",
  16402. "enum": ["todo.updated"]
  16403. },
  16404. "properties": {
  16405. "type": "object",
  16406. "properties": {
  16407. "sessionID": {
  16408. "type": "string",
  16409. "pattern": "^ses"
  16410. },
  16411. "todos": {
  16412. "type": "array",
  16413. "items": {
  16414. "$ref": "#/components/schemas/Todo"
  16415. }
  16416. }
  16417. },
  16418. "required": ["sessionID", "todos"],
  16419. "additionalProperties": false
  16420. }
  16421. },
  16422. "required": ["id", "type", "properties"],
  16423. "additionalProperties": false
  16424. },
  16425. {
  16426. "type": "object",
  16427. "properties": {
  16428. "id": {
  16429. "type": "string",
  16430. "pattern": "^evt_"
  16431. },
  16432. "type": {
  16433. "type": "string",
  16434. "enum": ["lsp.updated"]
  16435. },
  16436. "properties": {
  16437. "type": "object",
  16438. "properties": {}
  16439. }
  16440. },
  16441. "required": ["id", "type", "properties"],
  16442. "additionalProperties": false
  16443. },
  16444. {
  16445. "type": "object",
  16446. "properties": {
  16447. "id": {
  16448. "type": "string",
  16449. "pattern": "^evt_"
  16450. },
  16451. "type": {
  16452. "type": "string",
  16453. "enum": ["permission.asked"]
  16454. },
  16455. "properties": {
  16456. "type": "object",
  16457. "properties": {
  16458. "id": {
  16459. "type": "string",
  16460. "pattern": "^per"
  16461. },
  16462. "sessionID": {
  16463. "type": "string",
  16464. "pattern": "^ses"
  16465. },
  16466. "permission": {
  16467. "type": "string"
  16468. },
  16469. "patterns": {
  16470. "type": "array",
  16471. "items": {
  16472. "type": "string"
  16473. }
  16474. },
  16475. "metadata": {
  16476. "type": "object"
  16477. },
  16478. "always": {
  16479. "type": "array",
  16480. "items": {
  16481. "type": "string"
  16482. }
  16483. },
  16484. "tool": {
  16485. "type": "object",
  16486. "properties": {
  16487. "messageID": {
  16488. "type": "string"
  16489. },
  16490. "callID": {
  16491. "type": "string"
  16492. }
  16493. },
  16494. "required": ["messageID", "callID"],
  16495. "additionalProperties": false
  16496. }
  16497. },
  16498. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  16499. "additionalProperties": false
  16500. }
  16501. },
  16502. "required": ["id", "type", "properties"],
  16503. "additionalProperties": false
  16504. },
  16505. {
  16506. "type": "object",
  16507. "properties": {
  16508. "id": {
  16509. "type": "string",
  16510. "pattern": "^evt_"
  16511. },
  16512. "type": {
  16513. "type": "string",
  16514. "enum": ["permission.replied"]
  16515. },
  16516. "properties": {
  16517. "type": "object",
  16518. "properties": {
  16519. "sessionID": {
  16520. "type": "string",
  16521. "pattern": "^ses"
  16522. },
  16523. "requestID": {
  16524. "type": "string",
  16525. "pattern": "^per"
  16526. },
  16527. "reply": {
  16528. "type": "string",
  16529. "enum": ["once", "always", "reject"]
  16530. }
  16531. },
  16532. "required": ["sessionID", "requestID", "reply"],
  16533. "additionalProperties": false
  16534. }
  16535. },
  16536. "required": ["id", "type", "properties"],
  16537. "additionalProperties": false
  16538. },
  16539. {
  16540. "type": "object",
  16541. "properties": {
  16542. "id": {
  16543. "type": "string",
  16544. "pattern": "^evt_"
  16545. },
  16546. "type": {
  16547. "type": "string",
  16548. "enum": ["tui.prompt.append"]
  16549. },
  16550. "properties": {
  16551. "type": "object",
  16552. "properties": {
  16553. "text": {
  16554. "type": "string"
  16555. }
  16556. },
  16557. "required": ["text"],
  16558. "additionalProperties": false
  16559. }
  16560. },
  16561. "required": ["id", "type", "properties"],
  16562. "additionalProperties": false
  16563. },
  16564. {
  16565. "type": "object",
  16566. "properties": {
  16567. "id": {
  16568. "type": "string",
  16569. "pattern": "^evt_"
  16570. },
  16571. "type": {
  16572. "type": "string",
  16573. "enum": ["tui.command.execute"]
  16574. },
  16575. "properties": {
  16576. "type": "object",
  16577. "properties": {
  16578. "command": {
  16579. "anyOf": [
  16580. {
  16581. "type": "string",
  16582. "enum": [
  16583. "session.list",
  16584. "session.new",
  16585. "session.share",
  16586. "session.interrupt",
  16587. "session.compact",
  16588. "session.page.up",
  16589. "session.page.down",
  16590. "session.line.up",
  16591. "session.line.down",
  16592. "session.half.page.up",
  16593. "session.half.page.down",
  16594. "session.first",
  16595. "session.last",
  16596. "prompt.clear",
  16597. "prompt.submit",
  16598. "agent.cycle"
  16599. ]
  16600. },
  16601. {
  16602. "type": "string"
  16603. }
  16604. ]
  16605. }
  16606. },
  16607. "required": ["command"],
  16608. "additionalProperties": false
  16609. }
  16610. },
  16611. "required": ["id", "type", "properties"],
  16612. "additionalProperties": false
  16613. },
  16614. {
  16615. "type": "object",
  16616. "properties": {
  16617. "id": {
  16618. "type": "string",
  16619. "pattern": "^evt_"
  16620. },
  16621. "type": {
  16622. "type": "string",
  16623. "enum": ["tui.toast.show"]
  16624. },
  16625. "properties": {
  16626. "type": "object",
  16627. "properties": {
  16628. "title": {
  16629. "type": "string"
  16630. },
  16631. "message": {
  16632. "type": "string"
  16633. },
  16634. "variant": {
  16635. "type": "string",
  16636. "enum": ["info", "success", "warning", "error"]
  16637. },
  16638. "duration": {
  16639. "type": "integer",
  16640. "exclusiveMinimum": 0
  16641. }
  16642. },
  16643. "required": ["message", "variant"],
  16644. "additionalProperties": false
  16645. }
  16646. },
  16647. "required": ["id", "type", "properties"],
  16648. "additionalProperties": false
  16649. },
  16650. {
  16651. "type": "object",
  16652. "properties": {
  16653. "id": {
  16654. "type": "string",
  16655. "pattern": "^evt_"
  16656. },
  16657. "type": {
  16658. "type": "string",
  16659. "enum": ["tui.session.select"]
  16660. },
  16661. "properties": {
  16662. "type": "object",
  16663. "properties": {
  16664. "sessionID": {
  16665. "type": "string",
  16666. "pattern": "^ses",
  16667. "description": "Session ID to navigate to"
  16668. }
  16669. },
  16670. "required": ["sessionID"],
  16671. "additionalProperties": false
  16672. }
  16673. },
  16674. "required": ["id", "type", "properties"],
  16675. "additionalProperties": false
  16676. },
  16677. {
  16678. "type": "object",
  16679. "properties": {
  16680. "id": {
  16681. "type": "string",
  16682. "pattern": "^evt_"
  16683. },
  16684. "type": {
  16685. "type": "string",
  16686. "enum": ["mcp.tools.changed"]
  16687. },
  16688. "properties": {
  16689. "type": "object",
  16690. "properties": {
  16691. "server": {
  16692. "type": "string"
  16693. }
  16694. },
  16695. "required": ["server"],
  16696. "additionalProperties": false
  16697. }
  16698. },
  16699. "required": ["id", "type", "properties"],
  16700. "additionalProperties": false
  16701. },
  16702. {
  16703. "type": "object",
  16704. "properties": {
  16705. "id": {
  16706. "type": "string",
  16707. "pattern": "^evt_"
  16708. },
  16709. "type": {
  16710. "type": "string",
  16711. "enum": ["mcp.browser.open.failed"]
  16712. },
  16713. "properties": {
  16714. "type": "object",
  16715. "properties": {
  16716. "mcpName": {
  16717. "type": "string"
  16718. },
  16719. "url": {
  16720. "type": "string"
  16721. }
  16722. },
  16723. "required": ["mcpName", "url"],
  16724. "additionalProperties": false
  16725. }
  16726. },
  16727. "required": ["id", "type", "properties"],
  16728. "additionalProperties": false
  16729. },
  16730. {
  16731. "type": "object",
  16732. "properties": {
  16733. "id": {
  16734. "type": "string",
  16735. "pattern": "^evt_"
  16736. },
  16737. "type": {
  16738. "type": "string",
  16739. "enum": ["command.executed"]
  16740. },
  16741. "properties": {
  16742. "type": "object",
  16743. "properties": {
  16744. "name": {
  16745. "type": "string"
  16746. },
  16747. "sessionID": {
  16748. "type": "string",
  16749. "pattern": "^ses"
  16750. },
  16751. "arguments": {
  16752. "type": "string"
  16753. },
  16754. "messageID": {
  16755. "type": "string",
  16756. "pattern": "^msg"
  16757. }
  16758. },
  16759. "required": ["name", "sessionID", "arguments", "messageID"],
  16760. "additionalProperties": false
  16761. }
  16762. },
  16763. "required": ["id", "type", "properties"],
  16764. "additionalProperties": false
  16765. },
  16766. {
  16767. "type": "object",
  16768. "properties": {
  16769. "id": {
  16770. "type": "string",
  16771. "pattern": "^evt_"
  16772. },
  16773. "type": {
  16774. "type": "string",
  16775. "enum": ["project.directories.updated"]
  16776. },
  16777. "properties": {
  16778. "type": "object",
  16779. "properties": {
  16780. "projectID": {
  16781. "type": "string"
  16782. }
  16783. },
  16784. "required": ["projectID"],
  16785. "additionalProperties": false
  16786. }
  16787. },
  16788. "required": ["id", "type", "properties"],
  16789. "additionalProperties": false
  16790. },
  16791. {
  16792. "type": "object",
  16793. "properties": {
  16794. "id": {
  16795. "type": "string",
  16796. "pattern": "^evt_"
  16797. },
  16798. "type": {
  16799. "type": "string",
  16800. "enum": ["project.updated"]
  16801. },
  16802. "properties": {
  16803. "type": "object",
  16804. "properties": {
  16805. "id": {
  16806. "type": "string"
  16807. },
  16808. "worktree": {
  16809. "type": "string"
  16810. },
  16811. "vcs": {
  16812. "type": "string",
  16813. "enum": ["git"]
  16814. },
  16815. "name": {
  16816. "type": "string"
  16817. },
  16818. "icon": {
  16819. "type": "object",
  16820. "properties": {
  16821. "url": {
  16822. "type": "string"
  16823. },
  16824. "override": {
  16825. "type": "string"
  16826. },
  16827. "color": {
  16828. "type": "string"
  16829. }
  16830. },
  16831. "additionalProperties": false
  16832. },
  16833. "commands": {
  16834. "type": "object",
  16835. "properties": {
  16836. "start": {
  16837. "type": "string",
  16838. "description": "Startup script to run when creating a new workspace (worktree)"
  16839. }
  16840. },
  16841. "additionalProperties": false
  16842. },
  16843. "time": {
  16844. "type": "object",
  16845. "properties": {
  16846. "created": {
  16847. "type": "integer",
  16848. "minimum": 0
  16849. },
  16850. "updated": {
  16851. "type": "integer",
  16852. "minimum": 0
  16853. },
  16854. "initialized": {
  16855. "type": "integer",
  16856. "minimum": 0
  16857. }
  16858. },
  16859. "required": ["created", "updated"],
  16860. "additionalProperties": false
  16861. },
  16862. "sandboxes": {
  16863. "type": "array",
  16864. "items": {
  16865. "type": "string"
  16866. }
  16867. }
  16868. },
  16869. "required": ["id", "worktree", "time", "sandboxes"],
  16870. "additionalProperties": false
  16871. }
  16872. },
  16873. "required": ["id", "type", "properties"],
  16874. "additionalProperties": false
  16875. },
  16876. {
  16877. "type": "object",
  16878. "properties": {
  16879. "id": {
  16880. "type": "string",
  16881. "pattern": "^evt_"
  16882. },
  16883. "type": {
  16884. "type": "string",
  16885. "enum": ["question.asked"]
  16886. },
  16887. "properties": {
  16888. "type": "object",
  16889. "properties": {
  16890. "id": {
  16891. "type": "string",
  16892. "pattern": "^que"
  16893. },
  16894. "sessionID": {
  16895. "type": "string",
  16896. "pattern": "^ses"
  16897. },
  16898. "questions": {
  16899. "type": "array",
  16900. "items": {
  16901. "$ref": "#/components/schemas/QuestionInfo"
  16902. },
  16903. "description": "Questions to ask"
  16904. },
  16905. "tool": {
  16906. "$ref": "#/components/schemas/QuestionTool"
  16907. }
  16908. },
  16909. "required": ["id", "sessionID", "questions"],
  16910. "additionalProperties": false
  16911. }
  16912. },
  16913. "required": ["id", "type", "properties"],
  16914. "additionalProperties": false
  16915. },
  16916. {
  16917. "type": "object",
  16918. "properties": {
  16919. "id": {
  16920. "type": "string",
  16921. "pattern": "^evt_"
  16922. },
  16923. "type": {
  16924. "type": "string",
  16925. "enum": ["question.replied"]
  16926. },
  16927. "properties": {
  16928. "type": "object",
  16929. "properties": {
  16930. "sessionID": {
  16931. "type": "string",
  16932. "pattern": "^ses"
  16933. },
  16934. "requestID": {
  16935. "type": "string",
  16936. "pattern": "^que"
  16937. },
  16938. "answers": {
  16939. "type": "array",
  16940. "items": {
  16941. "$ref": "#/components/schemas/QuestionAnswer"
  16942. }
  16943. }
  16944. },
  16945. "required": ["sessionID", "requestID", "answers"],
  16946. "additionalProperties": false
  16947. }
  16948. },
  16949. "required": ["id", "type", "properties"],
  16950. "additionalProperties": false
  16951. },
  16952. {
  16953. "type": "object",
  16954. "properties": {
  16955. "id": {
  16956. "type": "string",
  16957. "pattern": "^evt_"
  16958. },
  16959. "type": {
  16960. "type": "string",
  16961. "enum": ["question.rejected"]
  16962. },
  16963. "properties": {
  16964. "type": "object",
  16965. "properties": {
  16966. "sessionID": {
  16967. "type": "string",
  16968. "pattern": "^ses"
  16969. },
  16970. "requestID": {
  16971. "type": "string",
  16972. "pattern": "^que"
  16973. }
  16974. },
  16975. "required": ["sessionID", "requestID"],
  16976. "additionalProperties": false
  16977. }
  16978. },
  16979. "required": ["id", "type", "properties"],
  16980. "additionalProperties": false
  16981. },
  16982. {
  16983. "type": "object",
  16984. "properties": {
  16985. "id": {
  16986. "type": "string",
  16987. "pattern": "^evt_"
  16988. },
  16989. "type": {
  16990. "type": "string",
  16991. "enum": ["session.status"]
  16992. },
  16993. "properties": {
  16994. "type": "object",
  16995. "properties": {
  16996. "sessionID": {
  16997. "type": "string",
  16998. "pattern": "^ses"
  16999. },
  17000. "status": {
  17001. "$ref": "#/components/schemas/SessionStatus"
  17002. }
  17003. },
  17004. "required": ["sessionID", "status"],
  17005. "additionalProperties": false
  17006. }
  17007. },
  17008. "required": ["id", "type", "properties"],
  17009. "additionalProperties": false
  17010. },
  17011. {
  17012. "type": "object",
  17013. "properties": {
  17014. "id": {
  17015. "type": "string",
  17016. "pattern": "^evt_"
  17017. },
  17018. "type": {
  17019. "type": "string",
  17020. "enum": ["session.idle"]
  17021. },
  17022. "properties": {
  17023. "type": "object",
  17024. "properties": {
  17025. "sessionID": {
  17026. "type": "string",
  17027. "pattern": "^ses"
  17028. }
  17029. },
  17030. "required": ["sessionID"],
  17031. "additionalProperties": false
  17032. }
  17033. },
  17034. "required": ["id", "type", "properties"],
  17035. "additionalProperties": false
  17036. },
  17037. {
  17038. "type": "object",
  17039. "properties": {
  17040. "id": {
  17041. "type": "string",
  17042. "pattern": "^evt_"
  17043. },
  17044. "type": {
  17045. "type": "string",
  17046. "enum": ["session.compacted"]
  17047. },
  17048. "properties": {
  17049. "type": "object",
  17050. "properties": {
  17051. "sessionID": {
  17052. "type": "string",
  17053. "pattern": "^ses"
  17054. }
  17055. },
  17056. "required": ["sessionID"],
  17057. "additionalProperties": false
  17058. }
  17059. },
  17060. "required": ["id", "type", "properties"],
  17061. "additionalProperties": false
  17062. },
  17063. {
  17064. "type": "object",
  17065. "properties": {
  17066. "id": {
  17067. "type": "string",
  17068. "pattern": "^evt_"
  17069. },
  17070. "type": {
  17071. "type": "string",
  17072. "enum": ["vcs.branch.updated"]
  17073. },
  17074. "properties": {
  17075. "type": "object",
  17076. "properties": {
  17077. "branch": {
  17078. "type": "string"
  17079. }
  17080. },
  17081. "additionalProperties": false
  17082. }
  17083. },
  17084. "required": ["id", "type", "properties"],
  17085. "additionalProperties": false
  17086. },
  17087. {
  17088. "type": "object",
  17089. "properties": {
  17090. "id": {
  17091. "type": "string",
  17092. "pattern": "^evt_"
  17093. },
  17094. "type": {
  17095. "type": "string",
  17096. "enum": ["worktree.ready"]
  17097. },
  17098. "properties": {
  17099. "type": "object",
  17100. "properties": {
  17101. "name": {
  17102. "type": "string"
  17103. },
  17104. "branch": {
  17105. "type": "string"
  17106. }
  17107. },
  17108. "required": ["name"],
  17109. "additionalProperties": false
  17110. }
  17111. },
  17112. "required": ["id", "type", "properties"],
  17113. "additionalProperties": false
  17114. },
  17115. {
  17116. "type": "object",
  17117. "properties": {
  17118. "id": {
  17119. "type": "string",
  17120. "pattern": "^evt_"
  17121. },
  17122. "type": {
  17123. "type": "string",
  17124. "enum": ["worktree.failed"]
  17125. },
  17126. "properties": {
  17127. "type": "object",
  17128. "properties": {
  17129. "message": {
  17130. "type": "string"
  17131. }
  17132. },
  17133. "required": ["message"],
  17134. "additionalProperties": false
  17135. }
  17136. },
  17137. "required": ["id", "type", "properties"],
  17138. "additionalProperties": false
  17139. },
  17140. {
  17141. "type": "object",
  17142. "properties": {
  17143. "id": {
  17144. "type": "string",
  17145. "pattern": "^evt_"
  17146. },
  17147. "type": {
  17148. "type": "string",
  17149. "enum": ["workspace.ready"]
  17150. },
  17151. "properties": {
  17152. "type": "object",
  17153. "properties": {
  17154. "name": {
  17155. "type": "string"
  17156. }
  17157. },
  17158. "required": ["name"],
  17159. "additionalProperties": false
  17160. }
  17161. },
  17162. "required": ["id", "type", "properties"],
  17163. "additionalProperties": false
  17164. },
  17165. {
  17166. "type": "object",
  17167. "properties": {
  17168. "id": {
  17169. "type": "string",
  17170. "pattern": "^evt_"
  17171. },
  17172. "type": {
  17173. "type": "string",
  17174. "enum": ["workspace.failed"]
  17175. },
  17176. "properties": {
  17177. "type": "object",
  17178. "properties": {
  17179. "message": {
  17180. "type": "string"
  17181. }
  17182. },
  17183. "required": ["message"],
  17184. "additionalProperties": false
  17185. }
  17186. },
  17187. "required": ["id", "type", "properties"],
  17188. "additionalProperties": false
  17189. },
  17190. {
  17191. "type": "object",
  17192. "properties": {
  17193. "id": {
  17194. "type": "string",
  17195. "pattern": "^evt_"
  17196. },
  17197. "type": {
  17198. "type": "string",
  17199. "enum": ["workspace.status"]
  17200. },
  17201. "properties": {
  17202. "type": "object",
  17203. "properties": {
  17204. "workspaceID": {
  17205. "type": "string",
  17206. "pattern": "^wrk"
  17207. },
  17208. "status": {
  17209. "type": "string",
  17210. "enum": ["connected", "connecting", "disconnected", "error"]
  17211. }
  17212. },
  17213. "required": ["workspaceID", "status"],
  17214. "additionalProperties": false
  17215. }
  17216. },
  17217. "required": ["id", "type", "properties"],
  17218. "additionalProperties": false
  17219. },
  17220. {
  17221. "type": "object",
  17222. "properties": {
  17223. "id": {
  17224. "type": "string",
  17225. "pattern": "^evt_"
  17226. },
  17227. "type": {
  17228. "type": "string",
  17229. "enum": ["server.connected"]
  17230. },
  17231. "properties": {
  17232. "type": "object",
  17233. "properties": {}
  17234. }
  17235. },
  17236. "required": ["id", "type", "properties"],
  17237. "additionalProperties": false
  17238. },
  17239. {
  17240. "type": "object",
  17241. "properties": {
  17242. "id": {
  17243. "type": "string",
  17244. "pattern": "^evt_"
  17245. },
  17246. "type": {
  17247. "type": "string",
  17248. "enum": ["global.disposed"]
  17249. },
  17250. "properties": {
  17251. "type": "object",
  17252. "properties": {}
  17253. }
  17254. },
  17255. "required": ["id", "type", "properties"],
  17256. "additionalProperties": false
  17257. },
  17258. {
  17259. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  17260. },
  17261. {
  17262. "$ref": "#/components/schemas/SyncEventSessionCreated"
  17263. },
  17264. {
  17265. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  17266. },
  17267. {
  17268. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  17269. },
  17270. {
  17271. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  17272. },
  17273. {
  17274. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  17275. },
  17276. {
  17277. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  17278. },
  17279. {
  17280. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  17281. },
  17282. {
  17283. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  17284. },
  17285. {
  17286. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  17287. },
  17288. {
  17289. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  17290. },
  17291. {
  17292. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  17293. },
  17294. {
  17295. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  17296. },
  17297. {
  17298. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  17299. },
  17300. {
  17301. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  17302. },
  17303. {
  17304. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  17305. },
  17306. {
  17307. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  17308. },
  17309. {
  17310. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  17311. },
  17312. {
  17313. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  17314. },
  17315. {
  17316. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  17317. },
  17318. {
  17319. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  17320. },
  17321. {
  17322. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  17323. },
  17324. {
  17325. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  17326. },
  17327. {
  17328. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  17329. },
  17330. {
  17331. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  17332. },
  17333. {
  17334. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  17335. },
  17336. {
  17337. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  17338. },
  17339. {
  17340. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  17341. },
  17342. {
  17343. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  17344. },
  17345. {
  17346. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  17347. },
  17348. {
  17349. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  17350. },
  17351. {
  17352. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  17353. },
  17354. {
  17355. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  17356. },
  17357. {
  17358. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  17359. },
  17360. {
  17361. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  17362. }
  17363. ]
  17364. }
  17365. },
  17366. "required": ["directory", "payload"],
  17367. "additionalProperties": false
  17368. },
  17369. "LogLevel": {
  17370. "type": "string",
  17371. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  17372. "description": "Log level"
  17373. },
  17374. "ServerConfig": {
  17375. "type": "object",
  17376. "properties": {
  17377. "port": {
  17378. "type": "integer",
  17379. "exclusiveMinimum": 0
  17380. },
  17381. "hostname": {
  17382. "type": "string"
  17383. },
  17384. "mdns": {
  17385. "type": "boolean"
  17386. },
  17387. "mdnsDomain": {
  17388. "type": "string"
  17389. },
  17390. "cors": {
  17391. "type": "array",
  17392. "items": {
  17393. "type": "string"
  17394. }
  17395. }
  17396. },
  17397. "additionalProperties": false,
  17398. "description": "Server configuration for opencode serve and web commands"
  17399. },
  17400. "ReferenceConfigEntry": {
  17401. "anyOf": [
  17402. {
  17403. "type": "string"
  17404. },
  17405. {
  17406. "type": "object",
  17407. "properties": {
  17408. "repository": {
  17409. "type": "string",
  17410. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  17411. },
  17412. "branch": {
  17413. "type": "string"
  17414. }
  17415. },
  17416. "required": ["repository"],
  17417. "additionalProperties": false
  17418. },
  17419. {
  17420. "type": "object",
  17421. "properties": {
  17422. "path": {
  17423. "type": "string",
  17424. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  17425. }
  17426. },
  17427. "required": ["path"],
  17428. "additionalProperties": false
  17429. }
  17430. ]
  17431. },
  17432. "ReferenceConfig": {
  17433. "type": "object",
  17434. "additionalProperties": {
  17435. "$ref": "#/components/schemas/ReferenceConfigEntry"
  17436. }
  17437. },
  17438. "PermissionActionConfig": {
  17439. "type": "string",
  17440. "enum": ["ask", "allow", "deny"]
  17441. },
  17442. "PermissionObjectConfig": {
  17443. "type": "object",
  17444. "additionalProperties": {
  17445. "$ref": "#/components/schemas/PermissionActionConfig"
  17446. }
  17447. },
  17448. "PermissionRuleConfig": {
  17449. "anyOf": [
  17450. {
  17451. "$ref": "#/components/schemas/PermissionActionConfig"
  17452. },
  17453. {
  17454. "$ref": "#/components/schemas/PermissionObjectConfig"
  17455. }
  17456. ]
  17457. },
  17458. "PermissionConfig": {
  17459. "anyOf": [
  17460. {
  17461. "$ref": "#/components/schemas/PermissionActionConfig"
  17462. },
  17463. {
  17464. "type": "object",
  17465. "properties": {
  17466. "read": {
  17467. "$ref": "#/components/schemas/PermissionRuleConfig"
  17468. },
  17469. "edit": {
  17470. "$ref": "#/components/schemas/PermissionRuleConfig"
  17471. },
  17472. "glob": {
  17473. "$ref": "#/components/schemas/PermissionRuleConfig"
  17474. },
  17475. "grep": {
  17476. "$ref": "#/components/schemas/PermissionRuleConfig"
  17477. },
  17478. "list": {
  17479. "$ref": "#/components/schemas/PermissionRuleConfig"
  17480. },
  17481. "bash": {
  17482. "$ref": "#/components/schemas/PermissionRuleConfig"
  17483. },
  17484. "task": {
  17485. "$ref": "#/components/schemas/PermissionRuleConfig"
  17486. },
  17487. "external_directory": {
  17488. "$ref": "#/components/schemas/PermissionRuleConfig"
  17489. },
  17490. "todowrite": {
  17491. "$ref": "#/components/schemas/PermissionActionConfig"
  17492. },
  17493. "question": {
  17494. "$ref": "#/components/schemas/PermissionActionConfig"
  17495. },
  17496. "webfetch": {
  17497. "$ref": "#/components/schemas/PermissionActionConfig"
  17498. },
  17499. "websearch": {
  17500. "$ref": "#/components/schemas/PermissionActionConfig"
  17501. },
  17502. "lsp": {
  17503. "$ref": "#/components/schemas/PermissionRuleConfig"
  17504. },
  17505. "doom_loop": {
  17506. "$ref": "#/components/schemas/PermissionActionConfig"
  17507. },
  17508. "skill": {
  17509. "$ref": "#/components/schemas/PermissionRuleConfig"
  17510. }
  17511. },
  17512. "additionalProperties": {
  17513. "$ref": "#/components/schemas/PermissionRuleConfig"
  17514. }
  17515. }
  17516. ]
  17517. },
  17518. "AgentConfig": {
  17519. "type": "object",
  17520. "properties": {
  17521. "model": {
  17522. "type": "string"
  17523. },
  17524. "variant": {
  17525. "type": "string"
  17526. },
  17527. "temperature": {
  17528. "type": "number"
  17529. },
  17530. "top_p": {
  17531. "type": "number"
  17532. },
  17533. "prompt": {
  17534. "type": "string"
  17535. },
  17536. "tools": {
  17537. "type": "object",
  17538. "additionalProperties": {
  17539. "type": "boolean"
  17540. }
  17541. },
  17542. "disable": {
  17543. "type": "boolean"
  17544. },
  17545. "description": {
  17546. "type": "string"
  17547. },
  17548. "mode": {
  17549. "type": "string",
  17550. "enum": ["subagent", "primary", "all"]
  17551. },
  17552. "hidden": {
  17553. "type": "boolean"
  17554. },
  17555. "options": {
  17556. "type": "object"
  17557. },
  17558. "color": {
  17559. "anyOf": [
  17560. {
  17561. "type": "string",
  17562. "pattern": "^#[0-9a-fA-F]{6}$"
  17563. },
  17564. {
  17565. "type": "string",
  17566. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  17567. }
  17568. ],
  17569. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  17570. },
  17571. "steps": {
  17572. "type": "integer",
  17573. "exclusiveMinimum": 0
  17574. },
  17575. "maxSteps": {
  17576. "type": "integer",
  17577. "exclusiveMinimum": 0
  17578. },
  17579. "permission": {
  17580. "$ref": "#/components/schemas/PermissionConfig"
  17581. }
  17582. },
  17583. "additionalProperties": {}
  17584. },
  17585. "ProviderConfig": {
  17586. "type": "object",
  17587. "properties": {
  17588. "api": {
  17589. "type": "string"
  17590. },
  17591. "name": {
  17592. "type": "string"
  17593. },
  17594. "env": {
  17595. "type": "array",
  17596. "items": {
  17597. "type": "string"
  17598. }
  17599. },
  17600. "id": {
  17601. "type": "string"
  17602. },
  17603. "npm": {
  17604. "type": "string"
  17605. },
  17606. "whitelist": {
  17607. "type": "array",
  17608. "items": {
  17609. "type": "string"
  17610. }
  17611. },
  17612. "blacklist": {
  17613. "type": "array",
  17614. "items": {
  17615. "type": "string"
  17616. }
  17617. },
  17618. "options": {
  17619. "type": "object",
  17620. "properties": {
  17621. "apiKey": {
  17622. "type": "string"
  17623. },
  17624. "baseURL": {
  17625. "type": "string"
  17626. },
  17627. "enterpriseUrl": {
  17628. "type": "string"
  17629. },
  17630. "setCacheKey": {
  17631. "type": "boolean"
  17632. },
  17633. "timeout": {
  17634. "anyOf": [
  17635. {
  17636. "type": "integer",
  17637. "exclusiveMinimum": 0
  17638. },
  17639. {
  17640. "type": "boolean",
  17641. "enum": [false]
  17642. }
  17643. ],
  17644. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  17645. },
  17646. "headerTimeout": {
  17647. "anyOf": [
  17648. {
  17649. "type": "integer",
  17650. "exclusiveMinimum": 0
  17651. },
  17652. {
  17653. "type": "boolean",
  17654. "enum": [false]
  17655. }
  17656. ],
  17657. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  17658. },
  17659. "chunkTimeout": {
  17660. "type": "integer",
  17661. "exclusiveMinimum": 0
  17662. }
  17663. },
  17664. "additionalProperties": {}
  17665. },
  17666. "models": {
  17667. "type": "object",
  17668. "additionalProperties": {
  17669. "type": "object",
  17670. "properties": {
  17671. "id": {
  17672. "type": "string"
  17673. },
  17674. "name": {
  17675. "type": "string"
  17676. },
  17677. "family": {
  17678. "type": "string"
  17679. },
  17680. "release_date": {
  17681. "type": "string"
  17682. },
  17683. "attachment": {
  17684. "type": "boolean"
  17685. },
  17686. "reasoning": {
  17687. "type": "boolean"
  17688. },
  17689. "temperature": {
  17690. "type": "boolean"
  17691. },
  17692. "tool_call": {
  17693. "type": "boolean"
  17694. },
  17695. "interleaved": {
  17696. "anyOf": [
  17697. {
  17698. "type": "boolean",
  17699. "enum": [true]
  17700. },
  17701. {
  17702. "type": "object",
  17703. "properties": {
  17704. "field": {
  17705. "type": "string",
  17706. "enum": ["reasoning_content", "reasoning_details"]
  17707. }
  17708. },
  17709. "required": ["field"],
  17710. "additionalProperties": false
  17711. }
  17712. ]
  17713. },
  17714. "cost": {
  17715. "type": "object",
  17716. "properties": {
  17717. "input": {
  17718. "type": "number"
  17719. },
  17720. "output": {
  17721. "type": "number"
  17722. },
  17723. "cache_read": {
  17724. "type": "number"
  17725. },
  17726. "cache_write": {
  17727. "type": "number"
  17728. },
  17729. "context_over_200k": {
  17730. "type": "object",
  17731. "properties": {
  17732. "input": {
  17733. "type": "number"
  17734. },
  17735. "output": {
  17736. "type": "number"
  17737. },
  17738. "cache_read": {
  17739. "type": "number"
  17740. },
  17741. "cache_write": {
  17742. "type": "number"
  17743. }
  17744. },
  17745. "required": ["input", "output"],
  17746. "additionalProperties": false
  17747. }
  17748. },
  17749. "required": ["input", "output"],
  17750. "additionalProperties": false
  17751. },
  17752. "limit": {
  17753. "type": "object",
  17754. "properties": {
  17755. "context": {
  17756. "type": "number"
  17757. },
  17758. "input": {
  17759. "type": "number"
  17760. },
  17761. "output": {
  17762. "type": "number"
  17763. }
  17764. },
  17765. "required": ["context", "output"],
  17766. "additionalProperties": false
  17767. },
  17768. "modalities": {
  17769. "type": "object",
  17770. "properties": {
  17771. "input": {
  17772. "type": "array",
  17773. "items": {
  17774. "type": "string",
  17775. "enum": ["text", "audio", "image", "video", "pdf"]
  17776. }
  17777. },
  17778. "output": {
  17779. "type": "array",
  17780. "items": {
  17781. "type": "string",
  17782. "enum": ["text", "audio", "image", "video", "pdf"]
  17783. }
  17784. }
  17785. },
  17786. "additionalProperties": false
  17787. },
  17788. "experimental": {
  17789. "type": "boolean"
  17790. },
  17791. "status": {
  17792. "type": "string",
  17793. "enum": ["alpha", "beta", "deprecated", "active"]
  17794. },
  17795. "provider": {
  17796. "type": "object",
  17797. "properties": {
  17798. "npm": {
  17799. "type": "string"
  17800. },
  17801. "api": {
  17802. "type": "string"
  17803. }
  17804. },
  17805. "additionalProperties": false
  17806. },
  17807. "options": {
  17808. "type": "object"
  17809. },
  17810. "headers": {
  17811. "type": "object",
  17812. "additionalProperties": {
  17813. "type": "string"
  17814. }
  17815. },
  17816. "variants": {
  17817. "type": "object",
  17818. "additionalProperties": {
  17819. "type": "object",
  17820. "properties": {
  17821. "disabled": {
  17822. "type": "boolean"
  17823. }
  17824. },
  17825. "additionalProperties": {}
  17826. },
  17827. "description": "Variant-specific configuration"
  17828. }
  17829. },
  17830. "additionalProperties": false
  17831. }
  17832. }
  17833. },
  17834. "additionalProperties": false
  17835. },
  17836. "McpLocalConfig": {
  17837. "type": "object",
  17838. "properties": {
  17839. "type": {
  17840. "type": "string",
  17841. "enum": ["local"],
  17842. "description": "Type of MCP server connection"
  17843. },
  17844. "command": {
  17845. "type": "array",
  17846. "items": {
  17847. "type": "string"
  17848. },
  17849. "description": "Command and arguments to run the MCP server"
  17850. },
  17851. "environment": {
  17852. "type": "object",
  17853. "additionalProperties": {
  17854. "type": "string"
  17855. }
  17856. },
  17857. "enabled": {
  17858. "type": "boolean"
  17859. },
  17860. "timeout": {
  17861. "type": "integer",
  17862. "exclusiveMinimum": 0
  17863. }
  17864. },
  17865. "required": ["type", "command"],
  17866. "additionalProperties": false
  17867. },
  17868. "McpOAuthConfig": {
  17869. "type": "object",
  17870. "properties": {
  17871. "clientId": {
  17872. "type": "string"
  17873. },
  17874. "clientSecret": {
  17875. "type": "string"
  17876. },
  17877. "scope": {
  17878. "type": "string"
  17879. },
  17880. "callbackPort": {
  17881. "type": "integer",
  17882. "minimum": 1,
  17883. "maximum": 65535
  17884. },
  17885. "redirectUri": {
  17886. "type": "string"
  17887. }
  17888. },
  17889. "additionalProperties": false
  17890. },
  17891. "McpRemoteConfig": {
  17892. "type": "object",
  17893. "properties": {
  17894. "type": {
  17895. "type": "string",
  17896. "enum": ["remote"],
  17897. "description": "Type of MCP server connection"
  17898. },
  17899. "url": {
  17900. "type": "string",
  17901. "description": "URL of the remote MCP server"
  17902. },
  17903. "enabled": {
  17904. "type": "boolean"
  17905. },
  17906. "headers": {
  17907. "type": "object",
  17908. "additionalProperties": {
  17909. "type": "string"
  17910. }
  17911. },
  17912. "oauth": {
  17913. "anyOf": [
  17914. {
  17915. "$ref": "#/components/schemas/McpOAuthConfig"
  17916. },
  17917. {
  17918. "type": "boolean",
  17919. "enum": [false]
  17920. }
  17921. ],
  17922. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  17923. },
  17924. "timeout": {
  17925. "type": "integer",
  17926. "exclusiveMinimum": 0
  17927. }
  17928. },
  17929. "required": ["type", "url"],
  17930. "additionalProperties": false
  17931. },
  17932. "LayoutConfig": {
  17933. "type": "string",
  17934. "enum": ["auto", "stretch"],
  17935. "description": "@deprecated Always uses stretch layout."
  17936. },
  17937. "ImageAttachmentConfig": {
  17938. "type": "object",
  17939. "properties": {
  17940. "auto_resize": {
  17941. "type": "boolean"
  17942. },
  17943. "max_width": {
  17944. "type": "integer",
  17945. "exclusiveMinimum": 0
  17946. },
  17947. "max_height": {
  17948. "type": "integer",
  17949. "exclusiveMinimum": 0
  17950. },
  17951. "max_base64_bytes": {
  17952. "type": "integer",
  17953. "exclusiveMinimum": 0
  17954. }
  17955. },
  17956. "additionalProperties": false
  17957. },
  17958. "AttachmentConfig": {
  17959. "type": "object",
  17960. "properties": {
  17961. "image": {
  17962. "$ref": "#/components/schemas/ImageAttachmentConfig"
  17963. }
  17964. },
  17965. "additionalProperties": false
  17966. },
  17967. "Config": {
  17968. "type": "object",
  17969. "properties": {
  17970. "$schema": {
  17971. "type": "string"
  17972. },
  17973. "shell": {
  17974. "type": "string"
  17975. },
  17976. "logLevel": {
  17977. "$ref": "#/components/schemas/LogLevel"
  17978. },
  17979. "server": {
  17980. "$ref": "#/components/schemas/ServerConfig"
  17981. },
  17982. "command": {
  17983. "type": "object",
  17984. "additionalProperties": {
  17985. "type": "object",
  17986. "properties": {
  17987. "template": {
  17988. "type": "string"
  17989. },
  17990. "description": {
  17991. "type": "string"
  17992. },
  17993. "agent": {
  17994. "type": "string"
  17995. },
  17996. "model": {
  17997. "type": "string"
  17998. },
  17999. "variant": {
  18000. "type": "string"
  18001. },
  18002. "subtask": {
  18003. "type": "boolean"
  18004. }
  18005. },
  18006. "required": ["template"],
  18007. "additionalProperties": false
  18008. }
  18009. },
  18010. "skills": {
  18011. "type": "object",
  18012. "properties": {
  18013. "paths": {
  18014. "type": "array",
  18015. "items": {
  18016. "type": "string"
  18017. }
  18018. },
  18019. "urls": {
  18020. "type": "array",
  18021. "items": {
  18022. "type": "string"
  18023. }
  18024. }
  18025. },
  18026. "additionalProperties": false
  18027. },
  18028. "reference": {
  18029. "$ref": "#/components/schemas/ReferenceConfig"
  18030. },
  18031. "watcher": {
  18032. "type": "object",
  18033. "properties": {
  18034. "ignore": {
  18035. "type": "array",
  18036. "items": {
  18037. "type": "string"
  18038. }
  18039. }
  18040. },
  18041. "additionalProperties": false
  18042. },
  18043. "snapshot": {
  18044. "type": "boolean"
  18045. },
  18046. "plugin": {
  18047. "type": "array",
  18048. "items": {
  18049. "anyOf": [
  18050. {
  18051. "type": "string"
  18052. },
  18053. {
  18054. "type": "array",
  18055. "prefixItems": [
  18056. {
  18057. "type": "string"
  18058. },
  18059. {
  18060. "type": "object"
  18061. }
  18062. ],
  18063. "maxItems": 2,
  18064. "minItems": 2
  18065. }
  18066. ]
  18067. }
  18068. },
  18069. "share": {
  18070. "type": "string",
  18071. "enum": ["manual", "auto", "disabled"]
  18072. },
  18073. "autoshare": {
  18074. "type": "boolean"
  18075. },
  18076. "autoupdate": {
  18077. "anyOf": [
  18078. {
  18079. "type": "boolean"
  18080. },
  18081. {
  18082. "type": "string",
  18083. "enum": ["notify"]
  18084. }
  18085. ],
  18086. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  18087. },
  18088. "disabled_providers": {
  18089. "type": "array",
  18090. "items": {
  18091. "type": "string"
  18092. }
  18093. },
  18094. "enabled_providers": {
  18095. "type": "array",
  18096. "items": {
  18097. "type": "string"
  18098. }
  18099. },
  18100. "model": {
  18101. "type": "string"
  18102. },
  18103. "small_model": {
  18104. "type": "string"
  18105. },
  18106. "default_agent": {
  18107. "type": "string"
  18108. },
  18109. "username": {
  18110. "type": "string"
  18111. },
  18112. "mode": {
  18113. "type": "object",
  18114. "properties": {
  18115. "build": {
  18116. "$ref": "#/components/schemas/AgentConfig"
  18117. },
  18118. "plan": {
  18119. "$ref": "#/components/schemas/AgentConfig"
  18120. }
  18121. },
  18122. "additionalProperties": {
  18123. "$ref": "#/components/schemas/AgentConfig"
  18124. }
  18125. },
  18126. "agent": {
  18127. "type": "object",
  18128. "properties": {
  18129. "plan": {
  18130. "$ref": "#/components/schemas/AgentConfig"
  18131. },
  18132. "build": {
  18133. "$ref": "#/components/schemas/AgentConfig"
  18134. },
  18135. "general": {
  18136. "$ref": "#/components/schemas/AgentConfig"
  18137. },
  18138. "explore": {
  18139. "$ref": "#/components/schemas/AgentConfig"
  18140. },
  18141. "title": {
  18142. "$ref": "#/components/schemas/AgentConfig"
  18143. },
  18144. "summary": {
  18145. "$ref": "#/components/schemas/AgentConfig"
  18146. },
  18147. "compaction": {
  18148. "$ref": "#/components/schemas/AgentConfig"
  18149. }
  18150. },
  18151. "additionalProperties": {
  18152. "$ref": "#/components/schemas/AgentConfig"
  18153. }
  18154. },
  18155. "provider": {
  18156. "type": "object",
  18157. "additionalProperties": {
  18158. "$ref": "#/components/schemas/ProviderConfig"
  18159. }
  18160. },
  18161. "mcp": {
  18162. "type": "object",
  18163. "additionalProperties": {
  18164. "anyOf": [
  18165. {
  18166. "$ref": "#/components/schemas/McpLocalConfig"
  18167. },
  18168. {
  18169. "$ref": "#/components/schemas/McpRemoteConfig"
  18170. },
  18171. {
  18172. "type": "object",
  18173. "properties": {
  18174. "enabled": {
  18175. "type": "boolean"
  18176. }
  18177. },
  18178. "required": ["enabled"],
  18179. "additionalProperties": false
  18180. }
  18181. ]
  18182. }
  18183. },
  18184. "formatter": {
  18185. "anyOf": [
  18186. {
  18187. "type": "boolean"
  18188. },
  18189. {
  18190. "type": "object",
  18191. "additionalProperties": {
  18192. "type": "object",
  18193. "properties": {
  18194. "disabled": {
  18195. "type": "boolean"
  18196. },
  18197. "command": {
  18198. "type": "array",
  18199. "items": {
  18200. "type": "string"
  18201. }
  18202. },
  18203. "environment": {
  18204. "type": "object",
  18205. "additionalProperties": {
  18206. "type": "string"
  18207. }
  18208. },
  18209. "extensions": {
  18210. "type": "array",
  18211. "items": {
  18212. "type": "string"
  18213. }
  18214. }
  18215. },
  18216. "additionalProperties": false
  18217. }
  18218. }
  18219. ],
  18220. "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."
  18221. },
  18222. "lsp": {
  18223. "anyOf": [
  18224. {
  18225. "type": "boolean"
  18226. },
  18227. {
  18228. "type": "object",
  18229. "additionalProperties": {
  18230. "anyOf": [
  18231. {
  18232. "type": "object",
  18233. "properties": {
  18234. "disabled": {
  18235. "type": "boolean",
  18236. "enum": [true]
  18237. }
  18238. },
  18239. "required": ["disabled"],
  18240. "additionalProperties": false
  18241. },
  18242. {
  18243. "type": "object",
  18244. "properties": {
  18245. "command": {
  18246. "type": "array",
  18247. "items": {
  18248. "type": "string"
  18249. }
  18250. },
  18251. "extensions": {
  18252. "type": "array",
  18253. "items": {
  18254. "type": "string"
  18255. }
  18256. },
  18257. "disabled": {
  18258. "type": "boolean"
  18259. },
  18260. "env": {
  18261. "type": "object",
  18262. "additionalProperties": {
  18263. "type": "string"
  18264. }
  18265. },
  18266. "initialization": {
  18267. "type": "object"
  18268. }
  18269. },
  18270. "required": ["command"],
  18271. "additionalProperties": false
  18272. }
  18273. ]
  18274. }
  18275. }
  18276. ],
  18277. "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."
  18278. },
  18279. "instructions": {
  18280. "type": "array",
  18281. "items": {
  18282. "type": "string"
  18283. }
  18284. },
  18285. "layout": {
  18286. "$ref": "#/components/schemas/LayoutConfig"
  18287. },
  18288. "permission": {
  18289. "$ref": "#/components/schemas/PermissionConfig"
  18290. },
  18291. "tools": {
  18292. "type": "object",
  18293. "additionalProperties": {
  18294. "type": "boolean"
  18295. }
  18296. },
  18297. "attachment": {
  18298. "$ref": "#/components/schemas/AttachmentConfig"
  18299. },
  18300. "enterprise": {
  18301. "type": "object",
  18302. "properties": {
  18303. "url": {
  18304. "type": "string"
  18305. }
  18306. },
  18307. "additionalProperties": false
  18308. },
  18309. "tool_output": {
  18310. "type": "object",
  18311. "properties": {
  18312. "max_lines": {
  18313. "type": "integer",
  18314. "exclusiveMinimum": 0
  18315. },
  18316. "max_bytes": {
  18317. "type": "integer",
  18318. "exclusiveMinimum": 0
  18319. }
  18320. },
  18321. "additionalProperties": false
  18322. },
  18323. "compaction": {
  18324. "type": "object",
  18325. "properties": {
  18326. "auto": {
  18327. "type": "boolean"
  18328. },
  18329. "prune": {
  18330. "type": "boolean"
  18331. },
  18332. "tail_turns": {
  18333. "type": "integer",
  18334. "minimum": 0
  18335. },
  18336. "preserve_recent_tokens": {
  18337. "type": "integer",
  18338. "minimum": 0
  18339. },
  18340. "reserved": {
  18341. "type": "integer",
  18342. "minimum": 0
  18343. }
  18344. },
  18345. "additionalProperties": false
  18346. },
  18347. "experimental": {
  18348. "type": "object",
  18349. "properties": {
  18350. "disable_paste_summary": {
  18351. "type": "boolean"
  18352. },
  18353. "batch_tool": {
  18354. "type": "boolean"
  18355. },
  18356. "openTelemetry": {
  18357. "type": "boolean"
  18358. },
  18359. "primary_tools": {
  18360. "type": "array",
  18361. "items": {
  18362. "type": "string"
  18363. }
  18364. },
  18365. "continue_loop_on_deny": {
  18366. "type": "boolean"
  18367. },
  18368. "mcp_timeout": {
  18369. "type": "integer",
  18370. "exclusiveMinimum": 0
  18371. },
  18372. "policies": {
  18373. "type": "array",
  18374. "items": {
  18375. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  18376. }
  18377. }
  18378. },
  18379. "additionalProperties": false
  18380. }
  18381. },
  18382. "additionalProperties": false
  18383. },
  18384. "Model": {
  18385. "type": "object",
  18386. "properties": {
  18387. "id": {
  18388. "type": "string"
  18389. },
  18390. "providerID": {
  18391. "type": "string"
  18392. },
  18393. "api": {
  18394. "type": "object",
  18395. "properties": {
  18396. "id": {
  18397. "type": "string"
  18398. },
  18399. "url": {
  18400. "type": "string"
  18401. },
  18402. "npm": {
  18403. "type": "string"
  18404. }
  18405. },
  18406. "required": ["id", "url", "npm"],
  18407. "additionalProperties": false
  18408. },
  18409. "name": {
  18410. "type": "string"
  18411. },
  18412. "family": {
  18413. "type": "string"
  18414. },
  18415. "capabilities": {
  18416. "type": "object",
  18417. "properties": {
  18418. "temperature": {
  18419. "type": "boolean"
  18420. },
  18421. "reasoning": {
  18422. "type": "boolean"
  18423. },
  18424. "attachment": {
  18425. "type": "boolean"
  18426. },
  18427. "toolcall": {
  18428. "type": "boolean"
  18429. },
  18430. "input": {
  18431. "type": "object",
  18432. "properties": {
  18433. "text": {
  18434. "type": "boolean"
  18435. },
  18436. "audio": {
  18437. "type": "boolean"
  18438. },
  18439. "image": {
  18440. "type": "boolean"
  18441. },
  18442. "video": {
  18443. "type": "boolean"
  18444. },
  18445. "pdf": {
  18446. "type": "boolean"
  18447. }
  18448. },
  18449. "required": ["text", "audio", "image", "video", "pdf"],
  18450. "additionalProperties": false
  18451. },
  18452. "output": {
  18453. "type": "object",
  18454. "properties": {
  18455. "text": {
  18456. "type": "boolean"
  18457. },
  18458. "audio": {
  18459. "type": "boolean"
  18460. },
  18461. "image": {
  18462. "type": "boolean"
  18463. },
  18464. "video": {
  18465. "type": "boolean"
  18466. },
  18467. "pdf": {
  18468. "type": "boolean"
  18469. }
  18470. },
  18471. "required": ["text", "audio", "image", "video", "pdf"],
  18472. "additionalProperties": false
  18473. },
  18474. "interleaved": {
  18475. "anyOf": [
  18476. {
  18477. "type": "boolean"
  18478. },
  18479. {
  18480. "type": "object",
  18481. "properties": {
  18482. "field": {
  18483. "type": "string",
  18484. "enum": ["reasoning_content", "reasoning_details"]
  18485. }
  18486. },
  18487. "required": ["field"],
  18488. "additionalProperties": false
  18489. }
  18490. ]
  18491. }
  18492. },
  18493. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  18494. "additionalProperties": false
  18495. },
  18496. "cost": {
  18497. "type": "object",
  18498. "properties": {
  18499. "input": {
  18500. "type": "number"
  18501. },
  18502. "output": {
  18503. "type": "number"
  18504. },
  18505. "cache": {
  18506. "type": "object",
  18507. "properties": {
  18508. "read": {
  18509. "type": "number"
  18510. },
  18511. "write": {
  18512. "type": "number"
  18513. }
  18514. },
  18515. "required": ["read", "write"],
  18516. "additionalProperties": false
  18517. },
  18518. "tiers": {
  18519. "type": "array",
  18520. "items": {
  18521. "type": "object",
  18522. "properties": {
  18523. "input": {
  18524. "type": "number"
  18525. },
  18526. "output": {
  18527. "type": "number"
  18528. },
  18529. "cache": {
  18530. "type": "object",
  18531. "properties": {
  18532. "read": {
  18533. "type": "number"
  18534. },
  18535. "write": {
  18536. "type": "number"
  18537. }
  18538. },
  18539. "required": ["read", "write"],
  18540. "additionalProperties": false
  18541. },
  18542. "tier": {
  18543. "type": "object",
  18544. "properties": {
  18545. "type": {
  18546. "type": "string",
  18547. "enum": ["context"]
  18548. },
  18549. "size": {
  18550. "type": "number"
  18551. }
  18552. },
  18553. "required": ["type", "size"],
  18554. "additionalProperties": false
  18555. }
  18556. },
  18557. "required": ["input", "output", "cache", "tier"],
  18558. "additionalProperties": false
  18559. }
  18560. },
  18561. "experimentalOver200K": {
  18562. "type": "object",
  18563. "properties": {
  18564. "input": {
  18565. "type": "number"
  18566. },
  18567. "output": {
  18568. "type": "number"
  18569. },
  18570. "cache": {
  18571. "type": "object",
  18572. "properties": {
  18573. "read": {
  18574. "type": "number"
  18575. },
  18576. "write": {
  18577. "type": "number"
  18578. }
  18579. },
  18580. "required": ["read", "write"],
  18581. "additionalProperties": false
  18582. }
  18583. },
  18584. "required": ["input", "output", "cache"],
  18585. "additionalProperties": false
  18586. }
  18587. },
  18588. "required": ["input", "output", "cache"],
  18589. "additionalProperties": false
  18590. },
  18591. "limit": {
  18592. "type": "object",
  18593. "properties": {
  18594. "context": {
  18595. "type": "number"
  18596. },
  18597. "input": {
  18598. "type": "number"
  18599. },
  18600. "output": {
  18601. "type": "number"
  18602. }
  18603. },
  18604. "required": ["context", "output"],
  18605. "additionalProperties": false
  18606. },
  18607. "status": {
  18608. "type": "string",
  18609. "enum": ["alpha", "beta", "deprecated", "active"]
  18610. },
  18611. "options": {
  18612. "type": "object"
  18613. },
  18614. "headers": {
  18615. "type": "object",
  18616. "additionalProperties": {
  18617. "type": "string"
  18618. }
  18619. },
  18620. "release_date": {
  18621. "type": "string"
  18622. },
  18623. "variants": {
  18624. "type": "object",
  18625. "additionalProperties": {
  18626. "type": "object"
  18627. }
  18628. }
  18629. },
  18630. "required": [
  18631. "id",
  18632. "providerID",
  18633. "api",
  18634. "name",
  18635. "capabilities",
  18636. "cost",
  18637. "limit",
  18638. "status",
  18639. "options",
  18640. "headers",
  18641. "release_date"
  18642. ],
  18643. "additionalProperties": false
  18644. },
  18645. "Provider": {
  18646. "type": "object",
  18647. "properties": {
  18648. "id": {
  18649. "type": "string"
  18650. },
  18651. "name": {
  18652. "type": "string"
  18653. },
  18654. "source": {
  18655. "type": "string",
  18656. "enum": ["env", "config", "custom", "api"]
  18657. },
  18658. "env": {
  18659. "type": "array",
  18660. "items": {
  18661. "type": "string"
  18662. }
  18663. },
  18664. "key": {
  18665. "type": "string"
  18666. },
  18667. "options": {
  18668. "type": "object"
  18669. },
  18670. "models": {
  18671. "type": "object",
  18672. "additionalProperties": {
  18673. "$ref": "#/components/schemas/Model"
  18674. }
  18675. }
  18676. },
  18677. "required": ["id", "name", "source", "env", "options", "models"],
  18678. "additionalProperties": false
  18679. },
  18680. "ConsoleState": {
  18681. "type": "object",
  18682. "properties": {
  18683. "consoleManagedProviders": {
  18684. "type": "array",
  18685. "items": {
  18686. "type": "string"
  18687. }
  18688. },
  18689. "activeOrgName": {
  18690. "type": "string"
  18691. },
  18692. "switchableOrgCount": {
  18693. "type": "integer",
  18694. "minimum": 0
  18695. }
  18696. },
  18697. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18698. "additionalProperties": false
  18699. },
  18700. "effect_HttpApiError_InternalServerError": {
  18701. "type": "object",
  18702. "properties": {
  18703. "_tag": {
  18704. "type": "string",
  18705. "enum": ["InternalServerError"]
  18706. }
  18707. },
  18708. "required": ["_tag"],
  18709. "additionalProperties": false
  18710. },
  18711. "ToolListItem": {
  18712. "type": "object",
  18713. "properties": {
  18714. "id": {
  18715. "type": "string"
  18716. },
  18717. "description": {
  18718. "type": "string"
  18719. },
  18720. "parameters": {}
  18721. },
  18722. "required": ["id", "description", "parameters"],
  18723. "additionalProperties": false
  18724. },
  18725. "ToolList": {
  18726. "type": "array",
  18727. "items": {
  18728. "$ref": "#/components/schemas/ToolListItem"
  18729. }
  18730. },
  18731. "ToolIDs": {
  18732. "type": "array",
  18733. "items": {
  18734. "type": "string"
  18735. }
  18736. },
  18737. "WorktreeError": {
  18738. "type": "object",
  18739. "properties": {
  18740. "name": {
  18741. "type": "string",
  18742. "enum": [
  18743. "WorktreeNotGitError",
  18744. "WorktreeNameGenerationFailedError",
  18745. "WorktreeCreateFailedError",
  18746. "WorktreeStartCommandFailedError",
  18747. "WorktreeRemoveFailedError",
  18748. "WorktreeResetFailedError",
  18749. "WorktreeListFailedError"
  18750. ]
  18751. },
  18752. "data": {
  18753. "type": "object",
  18754. "properties": {
  18755. "message": {
  18756. "type": "string"
  18757. }
  18758. },
  18759. "required": ["message"],
  18760. "additionalProperties": false
  18761. }
  18762. },
  18763. "required": ["name", "data"],
  18764. "additionalProperties": false
  18765. },
  18766. "WorktreeCreateInput": {
  18767. "type": "object",
  18768. "properties": {
  18769. "name": {
  18770. "type": "string"
  18771. },
  18772. "startCommand": {
  18773. "type": "string",
  18774. "description": "Additional startup script to run after the project's start command"
  18775. }
  18776. },
  18777. "additionalProperties": false
  18778. },
  18779. "Worktree": {
  18780. "type": "object",
  18781. "properties": {
  18782. "name": {
  18783. "type": "string"
  18784. },
  18785. "branch": {
  18786. "type": "string"
  18787. },
  18788. "directory": {
  18789. "type": "string"
  18790. }
  18791. },
  18792. "required": ["name", "directory"],
  18793. "additionalProperties": false
  18794. },
  18795. "WorktreeRemoveInput": {
  18796. "type": "object",
  18797. "properties": {
  18798. "directory": {
  18799. "type": "string"
  18800. }
  18801. },
  18802. "required": ["directory"],
  18803. "additionalProperties": false
  18804. },
  18805. "WorktreeResetInput": {
  18806. "type": "object",
  18807. "properties": {
  18808. "directory": {
  18809. "type": "string"
  18810. }
  18811. },
  18812. "required": ["directory"],
  18813. "additionalProperties": false
  18814. },
  18815. "ProjectSummary": {
  18816. "type": "object",
  18817. "properties": {
  18818. "id": {
  18819. "type": "string"
  18820. },
  18821. "name": {
  18822. "type": "string"
  18823. },
  18824. "worktree": {
  18825. "type": "string"
  18826. }
  18827. },
  18828. "required": ["id", "worktree"],
  18829. "additionalProperties": false
  18830. },
  18831. "GlobalSession": {
  18832. "type": "object",
  18833. "properties": {
  18834. "id": {
  18835. "type": "string",
  18836. "pattern": "^ses"
  18837. },
  18838. "slug": {
  18839. "type": "string"
  18840. },
  18841. "projectID": {
  18842. "type": "string"
  18843. },
  18844. "workspaceID": {
  18845. "type": "string",
  18846. "pattern": "^wrk"
  18847. },
  18848. "directory": {
  18849. "type": "string"
  18850. },
  18851. "path": {
  18852. "type": "string"
  18853. },
  18854. "parentID": {
  18855. "type": "string",
  18856. "pattern": "^ses"
  18857. },
  18858. "summary": {
  18859. "type": "object",
  18860. "properties": {
  18861. "additions": {
  18862. "type": "number"
  18863. },
  18864. "deletions": {
  18865. "type": "number"
  18866. },
  18867. "files": {
  18868. "type": "number"
  18869. },
  18870. "diffs": {
  18871. "type": "array",
  18872. "items": {
  18873. "$ref": "#/components/schemas/SnapshotFileDiff"
  18874. }
  18875. }
  18876. },
  18877. "required": ["additions", "deletions", "files"],
  18878. "additionalProperties": false
  18879. },
  18880. "cost": {
  18881. "type": "number"
  18882. },
  18883. "tokens": {
  18884. "type": "object",
  18885. "properties": {
  18886. "input": {
  18887. "type": "number"
  18888. },
  18889. "output": {
  18890. "type": "number"
  18891. },
  18892. "reasoning": {
  18893. "type": "number"
  18894. },
  18895. "cache": {
  18896. "type": "object",
  18897. "properties": {
  18898. "read": {
  18899. "type": "number"
  18900. },
  18901. "write": {
  18902. "type": "number"
  18903. }
  18904. },
  18905. "required": ["read", "write"],
  18906. "additionalProperties": false
  18907. }
  18908. },
  18909. "required": ["input", "output", "reasoning", "cache"],
  18910. "additionalProperties": false
  18911. },
  18912. "share": {
  18913. "type": "object",
  18914. "properties": {
  18915. "url": {
  18916. "type": "string"
  18917. }
  18918. },
  18919. "required": ["url"],
  18920. "additionalProperties": false
  18921. },
  18922. "title": {
  18923. "type": "string"
  18924. },
  18925. "agent": {
  18926. "type": "string"
  18927. },
  18928. "model": {
  18929. "type": "object",
  18930. "properties": {
  18931. "id": {
  18932. "type": "string"
  18933. },
  18934. "providerID": {
  18935. "type": "string"
  18936. },
  18937. "variant": {
  18938. "type": "string"
  18939. }
  18940. },
  18941. "required": ["id", "providerID"],
  18942. "additionalProperties": false
  18943. },
  18944. "version": {
  18945. "type": "string"
  18946. },
  18947. "metadata": {
  18948. "type": "object"
  18949. },
  18950. "time": {
  18951. "type": "object",
  18952. "properties": {
  18953. "created": {
  18954. "type": "integer",
  18955. "minimum": 0
  18956. },
  18957. "updated": {
  18958. "type": "integer",
  18959. "minimum": 0
  18960. },
  18961. "compacting": {
  18962. "type": "integer",
  18963. "minimum": 0
  18964. },
  18965. "archived": {
  18966. "type": "number"
  18967. }
  18968. },
  18969. "required": ["created", "updated"],
  18970. "additionalProperties": false
  18971. },
  18972. "permission": {
  18973. "$ref": "#/components/schemas/PermissionRuleset"
  18974. },
  18975. "revert": {
  18976. "type": "object",
  18977. "properties": {
  18978. "messageID": {
  18979. "type": "string",
  18980. "pattern": "^msg"
  18981. },
  18982. "partID": {
  18983. "type": "string",
  18984. "pattern": "^prt"
  18985. },
  18986. "snapshot": {
  18987. "type": "string"
  18988. },
  18989. "diff": {
  18990. "type": "string"
  18991. }
  18992. },
  18993. "required": ["messageID"],
  18994. "additionalProperties": false
  18995. },
  18996. "project": {
  18997. "anyOf": [
  18998. {
  18999. "$ref": "#/components/schemas/ProjectSummary"
  19000. },
  19001. {
  19002. "type": "null"
  19003. }
  19004. ]
  19005. }
  19006. },
  19007. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  19008. "additionalProperties": false
  19009. },
  19010. "McpResource": {
  19011. "type": "object",
  19012. "properties": {
  19013. "name": {
  19014. "type": "string"
  19015. },
  19016. "uri": {
  19017. "type": "string"
  19018. },
  19019. "description": {
  19020. "type": "string"
  19021. },
  19022. "mimeType": {
  19023. "type": "string"
  19024. },
  19025. "client": {
  19026. "type": "string"
  19027. }
  19028. },
  19029. "required": ["name", "uri", "client"],
  19030. "additionalProperties": false
  19031. },
  19032. "Symbol": {
  19033. "type": "object",
  19034. "properties": {
  19035. "name": {
  19036. "type": "string"
  19037. },
  19038. "kind": {
  19039. "type": "integer",
  19040. "minimum": 0
  19041. },
  19042. "location": {
  19043. "type": "object",
  19044. "properties": {
  19045. "uri": {
  19046. "type": "string"
  19047. },
  19048. "range": {
  19049. "$ref": "#/components/schemas/Range"
  19050. }
  19051. },
  19052. "required": ["uri", "range"],
  19053. "additionalProperties": false
  19054. }
  19055. },
  19056. "required": ["name", "kind", "location"],
  19057. "additionalProperties": false
  19058. },
  19059. "FileNode": {
  19060. "type": "object",
  19061. "properties": {
  19062. "name": {
  19063. "type": "string"
  19064. },
  19065. "path": {
  19066. "type": "string"
  19067. },
  19068. "absolute": {
  19069. "type": "string"
  19070. },
  19071. "type": {
  19072. "type": "string",
  19073. "enum": ["file", "directory"]
  19074. },
  19075. "ignored": {
  19076. "type": "boolean"
  19077. }
  19078. },
  19079. "required": ["name", "path", "absolute", "type", "ignored"],
  19080. "additionalProperties": false
  19081. },
  19082. "FileContent": {
  19083. "type": "object",
  19084. "properties": {
  19085. "type": {
  19086. "type": "string",
  19087. "enum": ["text", "binary"]
  19088. },
  19089. "content": {
  19090. "type": "string"
  19091. },
  19092. "diff": {
  19093. "type": "string"
  19094. },
  19095. "patch": {
  19096. "type": "object",
  19097. "properties": {
  19098. "oldFileName": {
  19099. "type": "string"
  19100. },
  19101. "newFileName": {
  19102. "type": "string"
  19103. },
  19104. "oldHeader": {
  19105. "type": "string"
  19106. },
  19107. "newHeader": {
  19108. "type": "string"
  19109. },
  19110. "hunks": {
  19111. "type": "array",
  19112. "items": {
  19113. "type": "object",
  19114. "properties": {
  19115. "oldStart": {
  19116. "type": "integer",
  19117. "minimum": 0
  19118. },
  19119. "oldLines": {
  19120. "type": "integer",
  19121. "minimum": 0
  19122. },
  19123. "newStart": {
  19124. "type": "integer",
  19125. "minimum": 0
  19126. },
  19127. "newLines": {
  19128. "type": "integer",
  19129. "minimum": 0
  19130. },
  19131. "lines": {
  19132. "type": "array",
  19133. "items": {
  19134. "type": "string"
  19135. }
  19136. }
  19137. },
  19138. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  19139. "additionalProperties": false
  19140. }
  19141. },
  19142. "index": {
  19143. "type": "string"
  19144. }
  19145. },
  19146. "required": ["oldFileName", "newFileName", "hunks"],
  19147. "additionalProperties": false
  19148. },
  19149. "encoding": {
  19150. "type": "string",
  19151. "enum": ["base64"]
  19152. },
  19153. "mimeType": {
  19154. "type": "string"
  19155. }
  19156. },
  19157. "required": ["type", "content"],
  19158. "additionalProperties": false
  19159. },
  19160. "File": {
  19161. "type": "object",
  19162. "properties": {
  19163. "path": {
  19164. "type": "string"
  19165. },
  19166. "added": {
  19167. "type": "integer",
  19168. "minimum": 0
  19169. },
  19170. "removed": {
  19171. "type": "integer",
  19172. "minimum": 0
  19173. },
  19174. "status": {
  19175. "type": "string",
  19176. "enum": ["added", "deleted", "modified"]
  19177. }
  19178. },
  19179. "required": ["path", "added", "removed", "status"],
  19180. "additionalProperties": false
  19181. },
  19182. "Path": {
  19183. "type": "object",
  19184. "properties": {
  19185. "home": {
  19186. "type": "string"
  19187. },
  19188. "state": {
  19189. "type": "string"
  19190. },
  19191. "config": {
  19192. "type": "string"
  19193. },
  19194. "worktree": {
  19195. "type": "string"
  19196. },
  19197. "directory": {
  19198. "type": "string"
  19199. }
  19200. },
  19201. "required": ["home", "state", "config", "worktree", "directory"],
  19202. "additionalProperties": false
  19203. },
  19204. "VcsInfo": {
  19205. "type": "object",
  19206. "properties": {
  19207. "branch": {
  19208. "type": "string"
  19209. },
  19210. "default_branch": {
  19211. "type": "string"
  19212. }
  19213. },
  19214. "additionalProperties": false
  19215. },
  19216. "VcsFileStatus": {
  19217. "type": "object",
  19218. "properties": {
  19219. "file": {
  19220. "type": "string"
  19221. },
  19222. "additions": {
  19223. "type": "number"
  19224. },
  19225. "deletions": {
  19226. "type": "number"
  19227. },
  19228. "status": {
  19229. "type": "string",
  19230. "enum": ["added", "deleted", "modified"]
  19231. }
  19232. },
  19233. "required": ["file", "additions", "deletions", "status"],
  19234. "additionalProperties": false
  19235. },
  19236. "VcsFileDiff": {
  19237. "type": "object",
  19238. "properties": {
  19239. "file": {
  19240. "type": "string"
  19241. },
  19242. "patch": {
  19243. "type": "string"
  19244. },
  19245. "additions": {
  19246. "type": "number"
  19247. },
  19248. "deletions": {
  19249. "type": "number"
  19250. },
  19251. "status": {
  19252. "type": "string",
  19253. "enum": ["added", "deleted", "modified"]
  19254. }
  19255. },
  19256. "required": ["file", "additions", "deletions"],
  19257. "additionalProperties": false
  19258. },
  19259. "VcsApplyError": {
  19260. "type": "object",
  19261. "properties": {
  19262. "name": {
  19263. "type": "string",
  19264. "enum": ["VcsApplyError"]
  19265. },
  19266. "data": {
  19267. "type": "object",
  19268. "properties": {
  19269. "message": {
  19270. "type": "string"
  19271. },
  19272. "reason": {
  19273. "type": "string",
  19274. "enum": ["non-git", "not-clean"]
  19275. }
  19276. },
  19277. "required": ["message", "reason"],
  19278. "additionalProperties": false
  19279. }
  19280. },
  19281. "required": ["name", "data"],
  19282. "additionalProperties": false
  19283. },
  19284. "Command": {
  19285. "type": "object",
  19286. "properties": {
  19287. "name": {
  19288. "type": "string"
  19289. },
  19290. "description": {
  19291. "type": "string"
  19292. },
  19293. "agent": {
  19294. "type": "string"
  19295. },
  19296. "model": {
  19297. "type": "string"
  19298. },
  19299. "source": {
  19300. "type": "string",
  19301. "enum": ["command", "mcp", "skill"]
  19302. },
  19303. "template": {
  19304. "type": "string"
  19305. },
  19306. "subtask": {
  19307. "type": "boolean"
  19308. },
  19309. "hints": {
  19310. "type": "array",
  19311. "items": {
  19312. "type": "string"
  19313. }
  19314. }
  19315. },
  19316. "required": ["name", "template", "hints"],
  19317. "additionalProperties": false
  19318. },
  19319. "Agent": {
  19320. "type": "object",
  19321. "properties": {
  19322. "name": {
  19323. "type": "string"
  19324. },
  19325. "description": {
  19326. "type": "string"
  19327. },
  19328. "mode": {
  19329. "type": "string",
  19330. "enum": ["subagent", "primary", "all"]
  19331. },
  19332. "native": {
  19333. "type": "boolean"
  19334. },
  19335. "hidden": {
  19336. "type": "boolean"
  19337. },
  19338. "topP": {
  19339. "type": "number"
  19340. },
  19341. "temperature": {
  19342. "type": "number"
  19343. },
  19344. "color": {
  19345. "type": "string"
  19346. },
  19347. "permission": {
  19348. "$ref": "#/components/schemas/PermissionRuleset"
  19349. },
  19350. "model": {
  19351. "type": "object",
  19352. "properties": {
  19353. "modelID": {
  19354. "type": "string"
  19355. },
  19356. "providerID": {
  19357. "type": "string"
  19358. }
  19359. },
  19360. "required": ["modelID", "providerID"],
  19361. "additionalProperties": false
  19362. },
  19363. "variant": {
  19364. "type": "string"
  19365. },
  19366. "prompt": {
  19367. "type": "string"
  19368. },
  19369. "options": {
  19370. "type": "object"
  19371. },
  19372. "steps": {
  19373. "type": "number"
  19374. }
  19375. },
  19376. "required": ["name", "mode", "permission", "options"],
  19377. "additionalProperties": false
  19378. },
  19379. "LSPStatus": {
  19380. "type": "object",
  19381. "properties": {
  19382. "id": {
  19383. "type": "string"
  19384. },
  19385. "name": {
  19386. "type": "string"
  19387. },
  19388. "root": {
  19389. "type": "string"
  19390. },
  19391. "status": {
  19392. "type": "string",
  19393. "enum": ["connected", "error"]
  19394. }
  19395. },
  19396. "required": ["id", "name", "root", "status"],
  19397. "additionalProperties": false
  19398. },
  19399. "FormatterStatus": {
  19400. "type": "object",
  19401. "properties": {
  19402. "name": {
  19403. "type": "string"
  19404. },
  19405. "extensions": {
  19406. "type": "array",
  19407. "items": {
  19408. "type": "string"
  19409. }
  19410. },
  19411. "enabled": {
  19412. "type": "boolean"
  19413. }
  19414. },
  19415. "required": ["name", "extensions", "enabled"],
  19416. "additionalProperties": false
  19417. },
  19418. "MCPStatusConnected": {
  19419. "type": "object",
  19420. "properties": {
  19421. "status": {
  19422. "type": "string",
  19423. "enum": ["connected"]
  19424. }
  19425. },
  19426. "required": ["status"],
  19427. "additionalProperties": false
  19428. },
  19429. "MCPStatusDisabled": {
  19430. "type": "object",
  19431. "properties": {
  19432. "status": {
  19433. "type": "string",
  19434. "enum": ["disabled"]
  19435. }
  19436. },
  19437. "required": ["status"],
  19438. "additionalProperties": false
  19439. },
  19440. "MCPStatusFailed": {
  19441. "type": "object",
  19442. "properties": {
  19443. "status": {
  19444. "type": "string",
  19445. "enum": ["failed"]
  19446. },
  19447. "error": {
  19448. "type": "string"
  19449. }
  19450. },
  19451. "required": ["status", "error"],
  19452. "additionalProperties": false
  19453. },
  19454. "MCPStatusNeedsAuth": {
  19455. "type": "object",
  19456. "properties": {
  19457. "status": {
  19458. "type": "string",
  19459. "enum": ["needs_auth"]
  19460. }
  19461. },
  19462. "required": ["status"],
  19463. "additionalProperties": false
  19464. },
  19465. "MCPStatusNeedsClientRegistration": {
  19466. "type": "object",
  19467. "properties": {
  19468. "status": {
  19469. "type": "string",
  19470. "enum": ["needs_client_registration"]
  19471. },
  19472. "error": {
  19473. "type": "string"
  19474. }
  19475. },
  19476. "required": ["status", "error"],
  19477. "additionalProperties": false
  19478. },
  19479. "MCPStatus": {
  19480. "anyOf": [
  19481. {
  19482. "$ref": "#/components/schemas/MCPStatusConnected"
  19483. },
  19484. {
  19485. "$ref": "#/components/schemas/MCPStatusDisabled"
  19486. },
  19487. {
  19488. "$ref": "#/components/schemas/MCPStatusFailed"
  19489. },
  19490. {
  19491. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  19492. },
  19493. {
  19494. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  19495. }
  19496. ]
  19497. },
  19498. "McpUnsupportedOAuthError": {
  19499. "type": "object",
  19500. "properties": {
  19501. "error": {
  19502. "type": "string"
  19503. }
  19504. },
  19505. "required": ["error"],
  19506. "additionalProperties": false
  19507. },
  19508. "McpServerNotFoundError": {
  19509. "type": "object",
  19510. "properties": {
  19511. "_tag": {
  19512. "type": "string",
  19513. "enum": ["McpServerNotFoundError"]
  19514. },
  19515. "name": {
  19516. "type": "string"
  19517. },
  19518. "message": {
  19519. "type": "string"
  19520. }
  19521. },
  19522. "required": ["_tag", "name", "message"],
  19523. "additionalProperties": false
  19524. },
  19525. "Project": {
  19526. "type": "object",
  19527. "properties": {
  19528. "id": {
  19529. "type": "string"
  19530. },
  19531. "worktree": {
  19532. "type": "string"
  19533. },
  19534. "vcs": {
  19535. "type": "string",
  19536. "enum": ["git"]
  19537. },
  19538. "name": {
  19539. "type": "string"
  19540. },
  19541. "icon": {
  19542. "type": "object",
  19543. "properties": {
  19544. "url": {
  19545. "type": "string"
  19546. },
  19547. "override": {
  19548. "type": "string"
  19549. },
  19550. "color": {
  19551. "type": "string"
  19552. }
  19553. },
  19554. "additionalProperties": false
  19555. },
  19556. "commands": {
  19557. "type": "object",
  19558. "properties": {
  19559. "start": {
  19560. "type": "string",
  19561. "description": "Startup script to run when creating a new workspace (worktree)"
  19562. }
  19563. },
  19564. "additionalProperties": false
  19565. },
  19566. "time": {
  19567. "type": "object",
  19568. "properties": {
  19569. "created": {
  19570. "type": "integer",
  19571. "minimum": 0
  19572. },
  19573. "updated": {
  19574. "type": "integer",
  19575. "minimum": 0
  19576. },
  19577. "initialized": {
  19578. "type": "integer",
  19579. "minimum": 0
  19580. }
  19581. },
  19582. "required": ["created", "updated"],
  19583. "additionalProperties": false
  19584. },
  19585. "sandboxes": {
  19586. "type": "array",
  19587. "items": {
  19588. "type": "string"
  19589. }
  19590. }
  19591. },
  19592. "required": ["id", "worktree", "time", "sandboxes"],
  19593. "additionalProperties": false
  19594. },
  19595. "ProjectNotFoundError": {
  19596. "type": "object",
  19597. "properties": {
  19598. "_tag": {
  19599. "type": "string",
  19600. "enum": ["ProjectNotFoundError"]
  19601. },
  19602. "projectID": {
  19603. "type": "string"
  19604. },
  19605. "message": {
  19606. "type": "string"
  19607. }
  19608. },
  19609. "required": ["_tag", "projectID", "message"],
  19610. "additionalProperties": false
  19611. },
  19612. "ProjectCopyError": {
  19613. "type": "object",
  19614. "properties": {
  19615. "name": {
  19616. "type": "string",
  19617. "enum": ["ProjectCopyError"]
  19618. },
  19619. "data": {
  19620. "type": "object",
  19621. "properties": {
  19622. "message": {
  19623. "type": "string"
  19624. },
  19625. "forceRequired": {
  19626. "type": "boolean"
  19627. }
  19628. },
  19629. "required": ["message"],
  19630. "additionalProperties": false
  19631. }
  19632. },
  19633. "required": ["name", "data"],
  19634. "additionalProperties": false
  19635. },
  19636. "PtyNotFoundError": {
  19637. "type": "object",
  19638. "properties": {
  19639. "_tag": {
  19640. "type": "string",
  19641. "enum": ["PtyNotFoundError"]
  19642. },
  19643. "ptyID": {
  19644. "type": "string"
  19645. },
  19646. "message": {
  19647. "type": "string"
  19648. }
  19649. },
  19650. "required": ["_tag", "ptyID", "message"],
  19651. "additionalProperties": false
  19652. },
  19653. "PtyForbiddenError": {
  19654. "type": "object",
  19655. "properties": {
  19656. "_tag": {
  19657. "type": "string",
  19658. "enum": ["PtyForbiddenError"]
  19659. },
  19660. "message": {
  19661. "type": "string"
  19662. }
  19663. },
  19664. "required": ["_tag", "message"],
  19665. "additionalProperties": false
  19666. },
  19667. "QuestionRequest": {
  19668. "type": "object",
  19669. "properties": {
  19670. "id": {
  19671. "type": "string",
  19672. "pattern": "^que"
  19673. },
  19674. "sessionID": {
  19675. "type": "string",
  19676. "pattern": "^ses"
  19677. },
  19678. "questions": {
  19679. "type": "array",
  19680. "items": {
  19681. "$ref": "#/components/schemas/QuestionInfo"
  19682. },
  19683. "description": "Questions to ask"
  19684. },
  19685. "tool": {
  19686. "$ref": "#/components/schemas/QuestionTool"
  19687. }
  19688. },
  19689. "required": ["id", "sessionID", "questions"],
  19690. "additionalProperties": false
  19691. },
  19692. "QuestionNotFoundError": {
  19693. "type": "object",
  19694. "properties": {
  19695. "_tag": {
  19696. "type": "string",
  19697. "enum": ["QuestionNotFoundError"]
  19698. },
  19699. "requestID": {
  19700. "type": "string"
  19701. },
  19702. "message": {
  19703. "type": "string"
  19704. }
  19705. },
  19706. "required": ["_tag", "requestID", "message"],
  19707. "additionalProperties": false
  19708. },
  19709. "PermissionRequest": {
  19710. "type": "object",
  19711. "properties": {
  19712. "id": {
  19713. "type": "string",
  19714. "pattern": "^per"
  19715. },
  19716. "sessionID": {
  19717. "type": "string",
  19718. "pattern": "^ses"
  19719. },
  19720. "permission": {
  19721. "type": "string"
  19722. },
  19723. "patterns": {
  19724. "type": "array",
  19725. "items": {
  19726. "type": "string"
  19727. }
  19728. },
  19729. "metadata": {
  19730. "type": "object"
  19731. },
  19732. "always": {
  19733. "type": "array",
  19734. "items": {
  19735. "type": "string"
  19736. }
  19737. },
  19738. "tool": {
  19739. "type": "object",
  19740. "properties": {
  19741. "messageID": {
  19742. "type": "string"
  19743. },
  19744. "callID": {
  19745. "type": "string"
  19746. }
  19747. },
  19748. "required": ["messageID", "callID"],
  19749. "additionalProperties": false
  19750. }
  19751. },
  19752. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19753. "additionalProperties": false
  19754. },
  19755. "PermissionNotFoundError": {
  19756. "type": "object",
  19757. "properties": {
  19758. "_tag": {
  19759. "type": "string",
  19760. "enum": ["PermissionNotFoundError"]
  19761. },
  19762. "requestID": {
  19763. "type": "string"
  19764. },
  19765. "message": {
  19766. "type": "string"
  19767. }
  19768. },
  19769. "required": ["_tag", "requestID", "message"],
  19770. "additionalProperties": false
  19771. },
  19772. "ProviderAuthMethod": {
  19773. "type": "object",
  19774. "properties": {
  19775. "type": {
  19776. "type": "string",
  19777. "enum": ["oauth", "api"]
  19778. },
  19779. "label": {
  19780. "type": "string"
  19781. },
  19782. "prompts": {
  19783. "type": "array",
  19784. "items": {
  19785. "anyOf": [
  19786. {
  19787. "type": "object",
  19788. "properties": {
  19789. "type": {
  19790. "type": "string",
  19791. "enum": ["text"]
  19792. },
  19793. "key": {
  19794. "type": "string"
  19795. },
  19796. "message": {
  19797. "type": "string"
  19798. },
  19799. "placeholder": {
  19800. "type": "string"
  19801. },
  19802. "when": {
  19803. "type": "object",
  19804. "properties": {
  19805. "key": {
  19806. "type": "string"
  19807. },
  19808. "op": {
  19809. "type": "string",
  19810. "enum": ["eq", "neq"]
  19811. },
  19812. "value": {
  19813. "type": "string"
  19814. }
  19815. },
  19816. "required": ["key", "op", "value"],
  19817. "additionalProperties": false
  19818. }
  19819. },
  19820. "required": ["type", "key", "message"],
  19821. "additionalProperties": false
  19822. },
  19823. {
  19824. "type": "object",
  19825. "properties": {
  19826. "type": {
  19827. "type": "string",
  19828. "enum": ["select"]
  19829. },
  19830. "key": {
  19831. "type": "string"
  19832. },
  19833. "message": {
  19834. "type": "string"
  19835. },
  19836. "options": {
  19837. "type": "array",
  19838. "items": {
  19839. "type": "object",
  19840. "properties": {
  19841. "label": {
  19842. "type": "string"
  19843. },
  19844. "value": {
  19845. "type": "string"
  19846. },
  19847. "hint": {
  19848. "type": "string"
  19849. }
  19850. },
  19851. "required": ["label", "value"],
  19852. "additionalProperties": false
  19853. }
  19854. },
  19855. "when": {
  19856. "type": "object",
  19857. "properties": {
  19858. "key": {
  19859. "type": "string"
  19860. },
  19861. "op": {
  19862. "type": "string",
  19863. "enum": ["eq", "neq"]
  19864. },
  19865. "value": {
  19866. "type": "string"
  19867. }
  19868. },
  19869. "required": ["key", "op", "value"],
  19870. "additionalProperties": false
  19871. }
  19872. },
  19873. "required": ["type", "key", "message", "options"],
  19874. "additionalProperties": false
  19875. }
  19876. ]
  19877. }
  19878. }
  19879. },
  19880. "required": ["type", "label"],
  19881. "additionalProperties": false
  19882. },
  19883. "ProviderAuthAuthorization": {
  19884. "type": "object",
  19885. "properties": {
  19886. "url": {
  19887. "type": "string"
  19888. },
  19889. "method": {
  19890. "type": "string",
  19891. "enum": ["auto", "code"]
  19892. },
  19893. "instructions": {
  19894. "type": "string"
  19895. }
  19896. },
  19897. "required": ["url", "method", "instructions"],
  19898. "additionalProperties": false
  19899. },
  19900. "ProviderAuthError1": {
  19901. "type": "object",
  19902. "properties": {
  19903. "name": {
  19904. "type": "string",
  19905. "enum": [
  19906. "BadRequest",
  19907. "ProviderAuthOauthMissing",
  19908. "ProviderAuthOauthCodeMissing",
  19909. "ProviderAuthOauthCallbackFailed",
  19910. "ProviderAuthValidationFailed"
  19911. ]
  19912. },
  19913. "data": {
  19914. "type": "object",
  19915. "properties": {
  19916. "providerID": {
  19917. "type": "string"
  19918. },
  19919. "field": {
  19920. "type": "string"
  19921. },
  19922. "message": {
  19923. "type": "string"
  19924. },
  19925. "kind": {
  19926. "type": "string"
  19927. }
  19928. },
  19929. "additionalProperties": false
  19930. }
  19931. },
  19932. "required": ["name", "data"],
  19933. "additionalProperties": false
  19934. },
  19935. "NotFoundError": {
  19936. "type": "object",
  19937. "required": ["name", "data"],
  19938. "properties": {
  19939. "name": {
  19940. "type": "string",
  19941. "enum": ["NotFoundError"]
  19942. },
  19943. "data": {
  19944. "type": "object",
  19945. "required": ["message"],
  19946. "properties": {
  19947. "message": {
  19948. "type": "string"
  19949. }
  19950. }
  19951. }
  19952. }
  19953. },
  19954. "TextPartInput": {
  19955. "type": "object",
  19956. "properties": {
  19957. "id": {
  19958. "type": "string",
  19959. "pattern": "^prt"
  19960. },
  19961. "type": {
  19962. "type": "string",
  19963. "enum": ["text"]
  19964. },
  19965. "text": {
  19966. "type": "string"
  19967. },
  19968. "synthetic": {
  19969. "type": "boolean"
  19970. },
  19971. "ignored": {
  19972. "type": "boolean"
  19973. },
  19974. "time": {
  19975. "type": "object",
  19976. "properties": {
  19977. "start": {
  19978. "type": "integer",
  19979. "minimum": 0
  19980. },
  19981. "end": {
  19982. "type": "integer",
  19983. "minimum": 0
  19984. }
  19985. },
  19986. "required": ["start"],
  19987. "additionalProperties": false
  19988. },
  19989. "metadata": {
  19990. "type": "object"
  19991. }
  19992. },
  19993. "required": ["type", "text"],
  19994. "additionalProperties": false
  19995. },
  19996. "FilePartInput": {
  19997. "type": "object",
  19998. "properties": {
  19999. "id": {
  20000. "type": "string",
  20001. "pattern": "^prt"
  20002. },
  20003. "type": {
  20004. "type": "string",
  20005. "enum": ["file"]
  20006. },
  20007. "mime": {
  20008. "type": "string"
  20009. },
  20010. "filename": {
  20011. "type": "string"
  20012. },
  20013. "url": {
  20014. "type": "string"
  20015. },
  20016. "source": {
  20017. "$ref": "#/components/schemas/FilePartSource"
  20018. }
  20019. },
  20020. "required": ["type", "mime", "url"],
  20021. "additionalProperties": false
  20022. },
  20023. "AgentPartInput": {
  20024. "type": "object",
  20025. "properties": {
  20026. "id": {
  20027. "type": "string",
  20028. "pattern": "^prt"
  20029. },
  20030. "type": {
  20031. "type": "string",
  20032. "enum": ["agent"]
  20033. },
  20034. "name": {
  20035. "type": "string"
  20036. },
  20037. "source": {
  20038. "type": "object",
  20039. "properties": {
  20040. "value": {
  20041. "type": "string"
  20042. },
  20043. "start": {
  20044. "type": "integer",
  20045. "minimum": 0
  20046. },
  20047. "end": {
  20048. "type": "integer",
  20049. "minimum": 0
  20050. }
  20051. },
  20052. "required": ["value", "start", "end"],
  20053. "additionalProperties": false
  20054. }
  20055. },
  20056. "required": ["type", "name"],
  20057. "additionalProperties": false
  20058. },
  20059. "SubtaskPartInput": {
  20060. "type": "object",
  20061. "properties": {
  20062. "id": {
  20063. "type": "string",
  20064. "pattern": "^prt"
  20065. },
  20066. "type": {
  20067. "type": "string",
  20068. "enum": ["subtask"]
  20069. },
  20070. "prompt": {
  20071. "type": "string"
  20072. },
  20073. "description": {
  20074. "type": "string"
  20075. },
  20076. "agent": {
  20077. "type": "string"
  20078. },
  20079. "model": {
  20080. "type": "object",
  20081. "properties": {
  20082. "providerID": {
  20083. "type": "string"
  20084. },
  20085. "modelID": {
  20086. "type": "string"
  20087. }
  20088. },
  20089. "required": ["providerID", "modelID"],
  20090. "additionalProperties": false
  20091. },
  20092. "command": {
  20093. "type": "string"
  20094. }
  20095. },
  20096. "required": ["type", "prompt", "description", "agent"],
  20097. "additionalProperties": false
  20098. },
  20099. "SessionBusyError": {
  20100. "type": "object",
  20101. "properties": {
  20102. "_tag": {
  20103. "type": "string",
  20104. "enum": ["SessionBusyError"]
  20105. },
  20106. "sessionID": {
  20107. "type": "string"
  20108. },
  20109. "message": {
  20110. "type": "string"
  20111. }
  20112. },
  20113. "required": ["_tag", "sessionID", "message"],
  20114. "additionalProperties": false
  20115. },
  20116. "EventTuiPromptAppend": {
  20117. "type": "object",
  20118. "properties": {
  20119. "type": {
  20120. "type": "string",
  20121. "enum": ["tui.prompt.append"]
  20122. },
  20123. "properties": {
  20124. "type": "object",
  20125. "properties": {
  20126. "text": {
  20127. "type": "string"
  20128. }
  20129. },
  20130. "required": ["text"],
  20131. "additionalProperties": false
  20132. }
  20133. },
  20134. "required": ["type", "properties"],
  20135. "additionalProperties": false
  20136. },
  20137. "EventTuiCommandExecute": {
  20138. "type": "object",
  20139. "properties": {
  20140. "type": {
  20141. "type": "string",
  20142. "enum": ["tui.command.execute"]
  20143. },
  20144. "properties": {
  20145. "type": "object",
  20146. "properties": {
  20147. "command": {
  20148. "anyOf": [
  20149. {
  20150. "type": "string",
  20151. "enum": [
  20152. "session.list",
  20153. "session.new",
  20154. "session.share",
  20155. "session.interrupt",
  20156. "session.compact",
  20157. "session.page.up",
  20158. "session.page.down",
  20159. "session.line.up",
  20160. "session.line.down",
  20161. "session.half.page.up",
  20162. "session.half.page.down",
  20163. "session.first",
  20164. "session.last",
  20165. "prompt.clear",
  20166. "prompt.submit",
  20167. "agent.cycle"
  20168. ]
  20169. },
  20170. {
  20171. "type": "string"
  20172. }
  20173. ]
  20174. }
  20175. },
  20176. "required": ["command"],
  20177. "additionalProperties": false
  20178. }
  20179. },
  20180. "required": ["type", "properties"],
  20181. "additionalProperties": false
  20182. },
  20183. "EventTuiToastShow": {
  20184. "type": "object",
  20185. "properties": {
  20186. "type": {
  20187. "type": "string",
  20188. "enum": ["tui.toast.show"]
  20189. },
  20190. "properties": {
  20191. "type": "object",
  20192. "properties": {
  20193. "title": {
  20194. "type": "string"
  20195. },
  20196. "message": {
  20197. "type": "string"
  20198. },
  20199. "variant": {
  20200. "type": "string",
  20201. "enum": ["info", "success", "warning", "error"]
  20202. },
  20203. "duration": {
  20204. "type": "integer",
  20205. "exclusiveMinimum": 0
  20206. }
  20207. },
  20208. "required": ["message", "variant"],
  20209. "additionalProperties": false
  20210. }
  20211. },
  20212. "required": ["type", "properties"],
  20213. "additionalProperties": false
  20214. },
  20215. "EventTuiSessionSelect": {
  20216. "type": "object",
  20217. "properties": {
  20218. "type": {
  20219. "type": "string",
  20220. "enum": ["tui.session.select"]
  20221. },
  20222. "properties": {
  20223. "type": "object",
  20224. "properties": {
  20225. "sessionID": {
  20226. "type": "string",
  20227. "pattern": "^ses",
  20228. "description": "Session ID to navigate to"
  20229. }
  20230. },
  20231. "required": ["sessionID"],
  20232. "additionalProperties": false
  20233. }
  20234. },
  20235. "required": ["type", "properties"],
  20236. "additionalProperties": false
  20237. },
  20238. "Workspace": {
  20239. "type": "object",
  20240. "properties": {
  20241. "id": {
  20242. "type": "string",
  20243. "pattern": "^wrk"
  20244. },
  20245. "type": {
  20246. "type": "string"
  20247. },
  20248. "name": {
  20249. "type": "string"
  20250. },
  20251. "branch": {
  20252. "anyOf": [
  20253. {
  20254. "type": "string"
  20255. },
  20256. {
  20257. "type": "null"
  20258. }
  20259. ]
  20260. },
  20261. "directory": {
  20262. "anyOf": [
  20263. {
  20264. "type": "string"
  20265. },
  20266. {
  20267. "type": "null"
  20268. }
  20269. ]
  20270. },
  20271. "extra": {
  20272. "anyOf": [
  20273. {},
  20274. {
  20275. "type": "null"
  20276. }
  20277. ]
  20278. },
  20279. "projectID": {
  20280. "type": "string"
  20281. },
  20282. "timeUsed": {
  20283. "anyOf": [
  20284. {
  20285. "type": "number"
  20286. },
  20287. {
  20288. "type": "string",
  20289. "enum": ["NaN"]
  20290. },
  20291. {
  20292. "type": "string",
  20293. "enum": ["Infinity"]
  20294. },
  20295. {
  20296. "type": "string",
  20297. "enum": ["-Infinity"]
  20298. },
  20299. {
  20300. "type": "string",
  20301. "enum": ["Infinity", "-Infinity", "NaN"]
  20302. }
  20303. ]
  20304. }
  20305. },
  20306. "required": ["id", "type", "name", "projectID", "timeUsed"],
  20307. "additionalProperties": false
  20308. },
  20309. "WorkspaceCreateError": {
  20310. "type": "object",
  20311. "properties": {
  20312. "name": {
  20313. "type": "string",
  20314. "enum": ["WorkspaceCreateError"]
  20315. },
  20316. "data": {
  20317. "type": "object",
  20318. "properties": {
  20319. "message": {
  20320. "type": "string"
  20321. }
  20322. },
  20323. "required": ["message"],
  20324. "additionalProperties": false
  20325. }
  20326. },
  20327. "required": ["name", "data"],
  20328. "additionalProperties": false
  20329. },
  20330. "WorkspaceWarpError": {
  20331. "type": "object",
  20332. "properties": {
  20333. "name": {
  20334. "type": "string",
  20335. "enum": ["WorkspaceWarpError"]
  20336. },
  20337. "data": {
  20338. "type": "object",
  20339. "properties": {
  20340. "message": {
  20341. "type": "string"
  20342. }
  20343. },
  20344. "required": ["message"],
  20345. "additionalProperties": false
  20346. }
  20347. },
  20348. "required": ["name", "data"],
  20349. "additionalProperties": false
  20350. },
  20351. "UnauthorizedError": {
  20352. "type": "object",
  20353. "properties": {
  20354. "_tag": {
  20355. "type": "string",
  20356. "enum": ["UnauthorizedError"]
  20357. },
  20358. "message": {
  20359. "type": "string"
  20360. }
  20361. },
  20362. "required": ["_tag", "message"],
  20363. "additionalProperties": false
  20364. },
  20365. "V2SessionsResponse": {
  20366. "type": "object",
  20367. "properties": {
  20368. "data": {
  20369. "type": "array",
  20370. "items": {
  20371. "$ref": "#/components/schemas/SessionV2Info"
  20372. }
  20373. },
  20374. "cursor": {
  20375. "type": "object",
  20376. "properties": {
  20377. "previous": {
  20378. "type": "string"
  20379. },
  20380. "next": {
  20381. "type": "string"
  20382. }
  20383. },
  20384. "additionalProperties": false
  20385. }
  20386. },
  20387. "required": ["data", "cursor"],
  20388. "additionalProperties": false
  20389. },
  20390. "InvalidCursorError": {
  20391. "type": "object",
  20392. "properties": {
  20393. "_tag": {
  20394. "type": "string",
  20395. "enum": ["InvalidCursorError"]
  20396. },
  20397. "message": {
  20398. "type": "string"
  20399. }
  20400. },
  20401. "required": ["_tag", "message"],
  20402. "additionalProperties": false
  20403. },
  20404. "ConflictError": {
  20405. "type": "object",
  20406. "properties": {
  20407. "_tag": {
  20408. "type": "string",
  20409. "enum": ["ConflictError"]
  20410. },
  20411. "message": {
  20412. "type": "string"
  20413. },
  20414. "resource": {
  20415. "type": "string"
  20416. }
  20417. },
  20418. "required": ["_tag", "message"],
  20419. "additionalProperties": false
  20420. },
  20421. "SessionNotFoundError": {
  20422. "type": "object",
  20423. "properties": {
  20424. "_tag": {
  20425. "type": "string",
  20426. "enum": ["SessionNotFoundError"]
  20427. },
  20428. "sessionID": {
  20429. "type": "string"
  20430. },
  20431. "message": {
  20432. "type": "string"
  20433. }
  20434. },
  20435. "required": ["_tag", "sessionID", "message"],
  20436. "additionalProperties": false
  20437. },
  20438. "ServiceUnavailableError": {
  20439. "type": "object",
  20440. "properties": {
  20441. "_tag": {
  20442. "type": "string",
  20443. "enum": ["ServiceUnavailableError"]
  20444. },
  20445. "message": {
  20446. "type": "string"
  20447. },
  20448. "service": {
  20449. "type": "string"
  20450. }
  20451. },
  20452. "required": ["_tag", "message"],
  20453. "additionalProperties": false
  20454. },
  20455. "UnknownError1": {
  20456. "type": "object",
  20457. "properties": {
  20458. "_tag": {
  20459. "type": "string",
  20460. "enum": ["UnknownError"]
  20461. },
  20462. "message": {
  20463. "type": "string"
  20464. },
  20465. "ref": {
  20466. "type": "string"
  20467. }
  20468. },
  20469. "required": ["_tag", "message"],
  20470. "additionalProperties": false
  20471. },
  20472. "V2SessionMessagesResponse": {
  20473. "type": "object",
  20474. "properties": {
  20475. "data": {
  20476. "type": "array",
  20477. "items": {
  20478. "$ref": "#/components/schemas/SessionMessage"
  20479. }
  20480. },
  20481. "cursor": {
  20482. "type": "object",
  20483. "properties": {
  20484. "previous": {
  20485. "type": "string"
  20486. },
  20487. "next": {
  20488. "type": "string"
  20489. }
  20490. },
  20491. "additionalProperties": false
  20492. }
  20493. },
  20494. "required": ["data", "cursor"],
  20495. "additionalProperties": false
  20496. },
  20497. "ProviderNotFoundError": {
  20498. "type": "object",
  20499. "properties": {
  20500. "_tag": {
  20501. "type": "string",
  20502. "enum": ["ProviderNotFoundError"]
  20503. },
  20504. "providerID": {
  20505. "type": "string"
  20506. },
  20507. "message": {
  20508. "type": "string"
  20509. }
  20510. },
  20511. "required": ["_tag", "providerID", "message"],
  20512. "additionalProperties": false
  20513. },
  20514. "effect_HttpApiError_Forbidden": {
  20515. "type": "object",
  20516. "properties": {
  20517. "_tag": {
  20518. "type": "string",
  20519. "enum": ["Forbidden"]
  20520. }
  20521. },
  20522. "required": ["_tag"],
  20523. "additionalProperties": false
  20524. },
  20525. "Event.tui.prompt.append": {
  20526. "type": "object",
  20527. "properties": {
  20528. "id": {
  20529. "type": "string",
  20530. "pattern": "^evt_"
  20531. },
  20532. "type": {
  20533. "type": "string",
  20534. "enum": ["tui.prompt.append"]
  20535. },
  20536. "properties": {
  20537. "type": "object",
  20538. "properties": {
  20539. "text": {
  20540. "type": "string"
  20541. }
  20542. },
  20543. "required": ["text"],
  20544. "additionalProperties": false
  20545. }
  20546. },
  20547. "required": ["id", "type", "properties"],
  20548. "additionalProperties": false
  20549. },
  20550. "Event.tui.command.execute": {
  20551. "type": "object",
  20552. "properties": {
  20553. "id": {
  20554. "type": "string",
  20555. "pattern": "^evt_"
  20556. },
  20557. "type": {
  20558. "type": "string",
  20559. "enum": ["tui.command.execute"]
  20560. },
  20561. "properties": {
  20562. "type": "object",
  20563. "properties": {
  20564. "command": {
  20565. "anyOf": [
  20566. {
  20567. "type": "string",
  20568. "enum": [
  20569. "session.list",
  20570. "session.new",
  20571. "session.share",
  20572. "session.interrupt",
  20573. "session.compact",
  20574. "session.page.up",
  20575. "session.page.down",
  20576. "session.line.up",
  20577. "session.line.down",
  20578. "session.half.page.up",
  20579. "session.half.page.down",
  20580. "session.first",
  20581. "session.last",
  20582. "prompt.clear",
  20583. "prompt.submit",
  20584. "agent.cycle"
  20585. ]
  20586. },
  20587. {
  20588. "type": "string"
  20589. }
  20590. ]
  20591. }
  20592. },
  20593. "required": ["command"],
  20594. "additionalProperties": false
  20595. }
  20596. },
  20597. "required": ["id", "type", "properties"],
  20598. "additionalProperties": false
  20599. },
  20600. "Event.tui.toast.show": {
  20601. "type": "object",
  20602. "properties": {
  20603. "id": {
  20604. "type": "string",
  20605. "pattern": "^evt_"
  20606. },
  20607. "type": {
  20608. "type": "string",
  20609. "enum": ["tui.toast.show"]
  20610. },
  20611. "properties": {
  20612. "type": "object",
  20613. "properties": {
  20614. "title": {
  20615. "type": "string"
  20616. },
  20617. "message": {
  20618. "type": "string"
  20619. },
  20620. "variant": {
  20621. "type": "string",
  20622. "enum": ["info", "success", "warning", "error"]
  20623. },
  20624. "duration": {
  20625. "type": "integer",
  20626. "exclusiveMinimum": 0
  20627. }
  20628. },
  20629. "required": ["message", "variant"],
  20630. "additionalProperties": false
  20631. }
  20632. },
  20633. "required": ["id", "type", "properties"],
  20634. "additionalProperties": false
  20635. },
  20636. "Event.tui.session.select": {
  20637. "type": "object",
  20638. "properties": {
  20639. "id": {
  20640. "type": "string",
  20641. "pattern": "^evt_"
  20642. },
  20643. "type": {
  20644. "type": "string",
  20645. "enum": ["tui.session.select"]
  20646. },
  20647. "properties": {
  20648. "type": "object",
  20649. "properties": {
  20650. "sessionID": {
  20651. "type": "string",
  20652. "pattern": "^ses",
  20653. "description": "Session ID to navigate to"
  20654. }
  20655. },
  20656. "required": ["sessionID"],
  20657. "additionalProperties": false
  20658. }
  20659. },
  20660. "required": ["id", "type", "properties"],
  20661. "additionalProperties": false
  20662. },
  20663. "MoveSessionDestination": {
  20664. "type": "object",
  20665. "properties": {
  20666. "directory": {
  20667. "type": "string"
  20668. }
  20669. },
  20670. "required": ["directory"],
  20671. "additionalProperties": false
  20672. },
  20673. "ModelV2Info": {
  20674. "type": "object",
  20675. "properties": {
  20676. "id": {
  20677. "type": "string"
  20678. },
  20679. "providerID": {
  20680. "type": "string"
  20681. },
  20682. "family": {
  20683. "type": "string"
  20684. },
  20685. "name": {
  20686. "type": "string"
  20687. },
  20688. "api": {
  20689. "anyOf": [
  20690. {
  20691. "type": "object",
  20692. "properties": {
  20693. "id": {
  20694. "type": "string"
  20695. },
  20696. "type": {
  20697. "type": "string",
  20698. "enum": ["aisdk"]
  20699. },
  20700. "package": {
  20701. "type": "string"
  20702. },
  20703. "url": {
  20704. "type": "string"
  20705. },
  20706. "settings": {
  20707. "type": "object"
  20708. }
  20709. },
  20710. "required": ["id", "type", "package"],
  20711. "additionalProperties": false
  20712. },
  20713. {
  20714. "type": "object",
  20715. "properties": {
  20716. "id": {
  20717. "type": "string"
  20718. },
  20719. "type": {
  20720. "type": "string",
  20721. "enum": ["native"]
  20722. },
  20723. "url": {
  20724. "type": "string"
  20725. },
  20726. "settings": {
  20727. "type": "object"
  20728. }
  20729. },
  20730. "required": ["id", "type", "settings"],
  20731. "additionalProperties": false
  20732. }
  20733. ]
  20734. },
  20735. "capabilities": {
  20736. "type": "object",
  20737. "properties": {
  20738. "tools": {
  20739. "type": "boolean"
  20740. },
  20741. "input": {
  20742. "type": "array",
  20743. "items": {
  20744. "type": "string"
  20745. }
  20746. },
  20747. "output": {
  20748. "type": "array",
  20749. "items": {
  20750. "type": "string"
  20751. }
  20752. }
  20753. },
  20754. "required": ["tools", "input", "output"],
  20755. "additionalProperties": false
  20756. },
  20757. "request": {
  20758. "type": "object",
  20759. "properties": {
  20760. "headers": {
  20761. "type": "object",
  20762. "additionalProperties": {
  20763. "type": "string"
  20764. }
  20765. },
  20766. "body": {
  20767. "type": "object"
  20768. },
  20769. "generation": {
  20770. "type": "object",
  20771. "properties": {
  20772. "maxTokens": {
  20773. "anyOf": [
  20774. {
  20775. "type": "number"
  20776. },
  20777. {
  20778. "type": "string",
  20779. "enum": ["NaN"]
  20780. },
  20781. {
  20782. "type": "string",
  20783. "enum": ["Infinity"]
  20784. },
  20785. {
  20786. "type": "string",
  20787. "enum": ["-Infinity"]
  20788. },
  20789. {
  20790. "type": "string",
  20791. "enum": ["Infinity", "-Infinity", "NaN"]
  20792. }
  20793. ]
  20794. },
  20795. "temperature": {
  20796. "anyOf": [
  20797. {
  20798. "type": "number"
  20799. },
  20800. {
  20801. "type": "string",
  20802. "enum": ["NaN"]
  20803. },
  20804. {
  20805. "type": "string",
  20806. "enum": ["Infinity"]
  20807. },
  20808. {
  20809. "type": "string",
  20810. "enum": ["-Infinity"]
  20811. },
  20812. {
  20813. "type": "string",
  20814. "enum": ["Infinity", "-Infinity", "NaN"]
  20815. }
  20816. ]
  20817. },
  20818. "topP": {
  20819. "anyOf": [
  20820. {
  20821. "type": "number"
  20822. },
  20823. {
  20824. "type": "string",
  20825. "enum": ["NaN"]
  20826. },
  20827. {
  20828. "type": "string",
  20829. "enum": ["Infinity"]
  20830. },
  20831. {
  20832. "type": "string",
  20833. "enum": ["-Infinity"]
  20834. },
  20835. {
  20836. "type": "string",
  20837. "enum": ["Infinity", "-Infinity", "NaN"]
  20838. }
  20839. ]
  20840. },
  20841. "topK": {
  20842. "anyOf": [
  20843. {
  20844. "type": "number"
  20845. },
  20846. {
  20847. "type": "string",
  20848. "enum": ["NaN"]
  20849. },
  20850. {
  20851. "type": "string",
  20852. "enum": ["Infinity"]
  20853. },
  20854. {
  20855. "type": "string",
  20856. "enum": ["-Infinity"]
  20857. },
  20858. {
  20859. "type": "string",
  20860. "enum": ["Infinity", "-Infinity", "NaN"]
  20861. }
  20862. ]
  20863. },
  20864. "frequencyPenalty": {
  20865. "anyOf": [
  20866. {
  20867. "type": "number"
  20868. },
  20869. {
  20870. "type": "string",
  20871. "enum": ["NaN"]
  20872. },
  20873. {
  20874. "type": "string",
  20875. "enum": ["Infinity"]
  20876. },
  20877. {
  20878. "type": "string",
  20879. "enum": ["-Infinity"]
  20880. },
  20881. {
  20882. "type": "string",
  20883. "enum": ["Infinity", "-Infinity", "NaN"]
  20884. }
  20885. ]
  20886. },
  20887. "presencePenalty": {
  20888. "anyOf": [
  20889. {
  20890. "type": "number"
  20891. },
  20892. {
  20893. "type": "string",
  20894. "enum": ["NaN"]
  20895. },
  20896. {
  20897. "type": "string",
  20898. "enum": ["Infinity"]
  20899. },
  20900. {
  20901. "type": "string",
  20902. "enum": ["-Infinity"]
  20903. },
  20904. {
  20905. "type": "string",
  20906. "enum": ["Infinity", "-Infinity", "NaN"]
  20907. }
  20908. ]
  20909. },
  20910. "seed": {
  20911. "anyOf": [
  20912. {
  20913. "type": "number"
  20914. },
  20915. {
  20916. "type": "string",
  20917. "enum": ["NaN"]
  20918. },
  20919. {
  20920. "type": "string",
  20921. "enum": ["Infinity"]
  20922. },
  20923. {
  20924. "type": "string",
  20925. "enum": ["-Infinity"]
  20926. },
  20927. {
  20928. "type": "string",
  20929. "enum": ["Infinity", "-Infinity", "NaN"]
  20930. }
  20931. ]
  20932. },
  20933. "stop": {
  20934. "type": "array",
  20935. "items": {
  20936. "type": "string"
  20937. }
  20938. }
  20939. },
  20940. "additionalProperties": false
  20941. },
  20942. "options": {
  20943. "type": "object"
  20944. },
  20945. "variant": {
  20946. "type": "string"
  20947. }
  20948. },
  20949. "required": ["headers", "body"],
  20950. "additionalProperties": false
  20951. },
  20952. "variants": {
  20953. "type": "array",
  20954. "items": {
  20955. "type": "object",
  20956. "properties": {
  20957. "id": {
  20958. "type": "string"
  20959. },
  20960. "headers": {
  20961. "type": "object",
  20962. "additionalProperties": {
  20963. "type": "string"
  20964. }
  20965. },
  20966. "body": {
  20967. "type": "object"
  20968. },
  20969. "generation": {
  20970. "type": "object",
  20971. "properties": {
  20972. "maxTokens": {
  20973. "anyOf": [
  20974. {
  20975. "type": "number"
  20976. },
  20977. {
  20978. "type": "string",
  20979. "enum": ["NaN"]
  20980. },
  20981. {
  20982. "type": "string",
  20983. "enum": ["Infinity"]
  20984. },
  20985. {
  20986. "type": "string",
  20987. "enum": ["-Infinity"]
  20988. },
  20989. {
  20990. "type": "string",
  20991. "enum": ["Infinity", "-Infinity", "NaN"]
  20992. }
  20993. ]
  20994. },
  20995. "temperature": {
  20996. "anyOf": [
  20997. {
  20998. "type": "number"
  20999. },
  21000. {
  21001. "type": "string",
  21002. "enum": ["NaN"]
  21003. },
  21004. {
  21005. "type": "string",
  21006. "enum": ["Infinity"]
  21007. },
  21008. {
  21009. "type": "string",
  21010. "enum": ["-Infinity"]
  21011. },
  21012. {
  21013. "type": "string",
  21014. "enum": ["Infinity", "-Infinity", "NaN"]
  21015. }
  21016. ]
  21017. },
  21018. "topP": {
  21019. "anyOf": [
  21020. {
  21021. "type": "number"
  21022. },
  21023. {
  21024. "type": "string",
  21025. "enum": ["NaN"]
  21026. },
  21027. {
  21028. "type": "string",
  21029. "enum": ["Infinity"]
  21030. },
  21031. {
  21032. "type": "string",
  21033. "enum": ["-Infinity"]
  21034. },
  21035. {
  21036. "type": "string",
  21037. "enum": ["Infinity", "-Infinity", "NaN"]
  21038. }
  21039. ]
  21040. },
  21041. "topK": {
  21042. "anyOf": [
  21043. {
  21044. "type": "number"
  21045. },
  21046. {
  21047. "type": "string",
  21048. "enum": ["NaN"]
  21049. },
  21050. {
  21051. "type": "string",
  21052. "enum": ["Infinity"]
  21053. },
  21054. {
  21055. "type": "string",
  21056. "enum": ["-Infinity"]
  21057. },
  21058. {
  21059. "type": "string",
  21060. "enum": ["Infinity", "-Infinity", "NaN"]
  21061. }
  21062. ]
  21063. },
  21064. "frequencyPenalty": {
  21065. "anyOf": [
  21066. {
  21067. "type": "number"
  21068. },
  21069. {
  21070. "type": "string",
  21071. "enum": ["NaN"]
  21072. },
  21073. {
  21074. "type": "string",
  21075. "enum": ["Infinity"]
  21076. },
  21077. {
  21078. "type": "string",
  21079. "enum": ["-Infinity"]
  21080. },
  21081. {
  21082. "type": "string",
  21083. "enum": ["Infinity", "-Infinity", "NaN"]
  21084. }
  21085. ]
  21086. },
  21087. "presencePenalty": {
  21088. "anyOf": [
  21089. {
  21090. "type": "number"
  21091. },
  21092. {
  21093. "type": "string",
  21094. "enum": ["NaN"]
  21095. },
  21096. {
  21097. "type": "string",
  21098. "enum": ["Infinity"]
  21099. },
  21100. {
  21101. "type": "string",
  21102. "enum": ["-Infinity"]
  21103. },
  21104. {
  21105. "type": "string",
  21106. "enum": ["Infinity", "-Infinity", "NaN"]
  21107. }
  21108. ]
  21109. },
  21110. "seed": {
  21111. "anyOf": [
  21112. {
  21113. "type": "number"
  21114. },
  21115. {
  21116. "type": "string",
  21117. "enum": ["NaN"]
  21118. },
  21119. {
  21120. "type": "string",
  21121. "enum": ["Infinity"]
  21122. },
  21123. {
  21124. "type": "string",
  21125. "enum": ["-Infinity"]
  21126. },
  21127. {
  21128. "type": "string",
  21129. "enum": ["Infinity", "-Infinity", "NaN"]
  21130. }
  21131. ]
  21132. },
  21133. "stop": {
  21134. "type": "array",
  21135. "items": {
  21136. "type": "string"
  21137. }
  21138. }
  21139. },
  21140. "additionalProperties": false
  21141. },
  21142. "options": {
  21143. "type": "object"
  21144. }
  21145. },
  21146. "required": ["id", "headers", "body"],
  21147. "additionalProperties": false
  21148. }
  21149. },
  21150. "time": {
  21151. "type": "object",
  21152. "properties": {
  21153. "released": {
  21154. "anyOf": [
  21155. {
  21156. "type": "number"
  21157. },
  21158. {
  21159. "type": "string",
  21160. "enum": ["NaN"]
  21161. },
  21162. {
  21163. "type": "string",
  21164. "enum": ["Infinity"]
  21165. },
  21166. {
  21167. "type": "string",
  21168. "enum": ["-Infinity"]
  21169. },
  21170. {
  21171. "type": "string",
  21172. "enum": ["Infinity", "-Infinity", "NaN"]
  21173. }
  21174. ]
  21175. }
  21176. },
  21177. "required": ["released"],
  21178. "additionalProperties": false
  21179. },
  21180. "cost": {
  21181. "type": "array",
  21182. "items": {
  21183. "type": "object",
  21184. "properties": {
  21185. "tier": {
  21186. "type": "object",
  21187. "properties": {
  21188. "type": {
  21189. "type": "string",
  21190. "enum": ["context"]
  21191. },
  21192. "size": {
  21193. "type": "integer"
  21194. }
  21195. },
  21196. "required": ["type", "size"],
  21197. "additionalProperties": false
  21198. },
  21199. "input": {
  21200. "type": "number"
  21201. },
  21202. "output": {
  21203. "type": "number"
  21204. },
  21205. "cache": {
  21206. "type": "object",
  21207. "properties": {
  21208. "read": {
  21209. "type": "number"
  21210. },
  21211. "write": {
  21212. "type": "number"
  21213. }
  21214. },
  21215. "required": ["read", "write"],
  21216. "additionalProperties": false
  21217. }
  21218. },
  21219. "required": ["input", "output", "cache"],
  21220. "additionalProperties": false
  21221. }
  21222. },
  21223. "status": {
  21224. "type": "string",
  21225. "enum": ["alpha", "beta", "deprecated", "active"]
  21226. },
  21227. "enabled": {
  21228. "type": "boolean"
  21229. },
  21230. "limit": {
  21231. "type": "object",
  21232. "properties": {
  21233. "context": {
  21234. "type": "integer"
  21235. },
  21236. "input": {
  21237. "type": "integer"
  21238. },
  21239. "output": {
  21240. "type": "integer"
  21241. }
  21242. },
  21243. "required": ["context", "output"],
  21244. "additionalProperties": false
  21245. }
  21246. },
  21247. "required": [
  21248. "id",
  21249. "providerID",
  21250. "name",
  21251. "api",
  21252. "capabilities",
  21253. "request",
  21254. "variants",
  21255. "time",
  21256. "cost",
  21257. "status",
  21258. "enabled",
  21259. "limit"
  21260. ],
  21261. "additionalProperties": false
  21262. },
  21263. "LocationRef": {
  21264. "type": "object",
  21265. "properties": {
  21266. "directory": {
  21267. "type": "string"
  21268. },
  21269. "workspaceID": {
  21270. "type": "string",
  21271. "pattern": "^wrk"
  21272. }
  21273. },
  21274. "required": ["directory"],
  21275. "additionalProperties": false
  21276. },
  21277. "PromptSource": {
  21278. "type": "object",
  21279. "properties": {
  21280. "start": {
  21281. "type": "number"
  21282. },
  21283. "end": {
  21284. "type": "number"
  21285. },
  21286. "text": {
  21287. "type": "string"
  21288. }
  21289. },
  21290. "required": ["start", "end", "text"],
  21291. "additionalProperties": false
  21292. },
  21293. "PromptFileAttachment": {
  21294. "type": "object",
  21295. "properties": {
  21296. "uri": {
  21297. "type": "string"
  21298. },
  21299. "mime": {
  21300. "type": "string"
  21301. },
  21302. "name": {
  21303. "type": "string"
  21304. },
  21305. "description": {
  21306. "type": "string"
  21307. },
  21308. "source": {
  21309. "$ref": "#/components/schemas/PromptSource"
  21310. }
  21311. },
  21312. "required": ["uri", "mime"],
  21313. "additionalProperties": false
  21314. },
  21315. "PromptAgentAttachment": {
  21316. "type": "object",
  21317. "properties": {
  21318. "name": {
  21319. "type": "string"
  21320. },
  21321. "source": {
  21322. "$ref": "#/components/schemas/PromptSource"
  21323. }
  21324. },
  21325. "required": ["name"],
  21326. "additionalProperties": false
  21327. },
  21328. "PromptReferenceAttachment": {
  21329. "type": "object",
  21330. "properties": {
  21331. "name": {
  21332. "type": "string"
  21333. },
  21334. "kind": {
  21335. "type": "string",
  21336. "enum": ["local", "git", "invalid"]
  21337. },
  21338. "uri": {
  21339. "type": "string"
  21340. },
  21341. "repository": {
  21342. "type": "string"
  21343. },
  21344. "branch": {
  21345. "type": "string"
  21346. },
  21347. "target": {
  21348. "type": "string"
  21349. },
  21350. "targetUri": {
  21351. "type": "string"
  21352. },
  21353. "problem": {
  21354. "type": "string"
  21355. },
  21356. "source": {
  21357. "$ref": "#/components/schemas/PromptSource"
  21358. }
  21359. },
  21360. "required": ["name", "kind"],
  21361. "additionalProperties": false
  21362. },
  21363. "SessionErrorUnknown": {
  21364. "type": "object",
  21365. "properties": {
  21366. "type": {
  21367. "type": "string",
  21368. "enum": ["unknown"]
  21369. },
  21370. "message": {
  21371. "type": "string"
  21372. }
  21373. },
  21374. "required": ["type", "message"],
  21375. "additionalProperties": false
  21376. },
  21377. "ToolTextContent": {
  21378. "type": "object",
  21379. "properties": {
  21380. "type": {
  21381. "type": "string",
  21382. "enum": ["text"]
  21383. },
  21384. "text": {
  21385. "type": "string"
  21386. }
  21387. },
  21388. "required": ["type", "text"],
  21389. "additionalProperties": false
  21390. },
  21391. "ToolFileContent": {
  21392. "type": "object",
  21393. "properties": {
  21394. "type": {
  21395. "type": "string",
  21396. "enum": ["file"]
  21397. },
  21398. "source": {
  21399. "anyOf": [
  21400. {
  21401. "type": "object",
  21402. "properties": {
  21403. "type": {
  21404. "type": "string",
  21405. "enum": ["data"]
  21406. },
  21407. "data": {
  21408. "type": "string"
  21409. }
  21410. },
  21411. "required": ["type", "data"],
  21412. "additionalProperties": false
  21413. },
  21414. {
  21415. "type": "object",
  21416. "properties": {
  21417. "type": {
  21418. "type": "string",
  21419. "enum": ["url"]
  21420. },
  21421. "url": {
  21422. "type": "string"
  21423. }
  21424. },
  21425. "required": ["type", "url"],
  21426. "additionalProperties": false
  21427. },
  21428. {
  21429. "type": "object",
  21430. "properties": {
  21431. "type": {
  21432. "type": "string",
  21433. "enum": ["file"]
  21434. },
  21435. "uri": {
  21436. "type": "string"
  21437. }
  21438. },
  21439. "required": ["type", "uri"],
  21440. "additionalProperties": false
  21441. }
  21442. ]
  21443. },
  21444. "mime": {
  21445. "type": "string"
  21446. },
  21447. "name": {
  21448. "type": "string"
  21449. }
  21450. },
  21451. "required": ["type", "source", "mime"],
  21452. "additionalProperties": false
  21453. },
  21454. "SessionNextRetry_error": {
  21455. "type": "object",
  21456. "properties": {
  21457. "message": {
  21458. "type": "string"
  21459. },
  21460. "statusCode": {
  21461. "type": "number"
  21462. },
  21463. "isRetryable": {
  21464. "type": "boolean"
  21465. },
  21466. "responseHeaders": {
  21467. "type": "object",
  21468. "additionalProperties": {
  21469. "type": "string"
  21470. }
  21471. },
  21472. "responseBody": {
  21473. "type": "string"
  21474. },
  21475. "metadata": {
  21476. "type": "object",
  21477. "additionalProperties": {
  21478. "type": "string"
  21479. }
  21480. }
  21481. },
  21482. "required": ["message", "isRetryable"],
  21483. "additionalProperties": false
  21484. },
  21485. "AuthOAuthCredential": {
  21486. "type": "object",
  21487. "properties": {
  21488. "type": {
  21489. "type": "string",
  21490. "enum": ["oauth"]
  21491. },
  21492. "refresh": {
  21493. "type": "string"
  21494. },
  21495. "access": {
  21496. "type": "string"
  21497. },
  21498. "expires": {
  21499. "type": "integer",
  21500. "minimum": 0
  21501. }
  21502. },
  21503. "required": ["type", "refresh", "access", "expires"],
  21504. "additionalProperties": false
  21505. },
  21506. "AuthApiKeyCredential": {
  21507. "type": "object",
  21508. "properties": {
  21509. "type": {
  21510. "type": "string",
  21511. "enum": ["api"]
  21512. },
  21513. "key": {
  21514. "type": "string"
  21515. },
  21516. "metadata": {
  21517. "type": "object",
  21518. "additionalProperties": {
  21519. "type": "string"
  21520. }
  21521. }
  21522. },
  21523. "required": ["type", "key"],
  21524. "additionalProperties": false
  21525. },
  21526. "AuthCredential": {
  21527. "anyOf": [
  21528. {
  21529. "$ref": "#/components/schemas/AuthOAuthCredential"
  21530. },
  21531. {
  21532. "$ref": "#/components/schemas/AuthApiKeyCredential"
  21533. }
  21534. ]
  21535. },
  21536. "AuthInfo": {
  21537. "type": "object",
  21538. "properties": {
  21539. "id": {
  21540. "type": "string"
  21541. },
  21542. "serviceID": {
  21543. "type": "string"
  21544. },
  21545. "description": {
  21546. "type": "string"
  21547. },
  21548. "credential": {
  21549. "$ref": "#/components/schemas/AuthCredential"
  21550. }
  21551. },
  21552. "required": ["id", "serviceID", "description", "credential"],
  21553. "additionalProperties": false
  21554. },
  21555. "PermissionV2Source": {
  21556. "type": "object",
  21557. "properties": {
  21558. "type": {
  21559. "type": "string",
  21560. "enum": ["tool"]
  21561. },
  21562. "messageID": {
  21563. "type": "string"
  21564. },
  21565. "callID": {
  21566. "type": "string"
  21567. }
  21568. },
  21569. "required": ["type", "messageID", "callID"],
  21570. "additionalProperties": false
  21571. },
  21572. "PermissionV2Reply": {
  21573. "type": "string",
  21574. "enum": ["once", "always", "reject"]
  21575. },
  21576. "QuestionV2Option": {
  21577. "type": "object",
  21578. "properties": {
  21579. "label": {
  21580. "type": "string",
  21581. "description": "Display text (1-5 words, concise)"
  21582. },
  21583. "description": {
  21584. "type": "string",
  21585. "description": "Explanation of choice"
  21586. }
  21587. },
  21588. "required": ["label", "description"],
  21589. "additionalProperties": false
  21590. },
  21591. "QuestionV2Info": {
  21592. "type": "object",
  21593. "properties": {
  21594. "question": {
  21595. "type": "string",
  21596. "description": "Complete question"
  21597. },
  21598. "header": {
  21599. "type": "string",
  21600. "description": "Very short label (max 30 chars)"
  21601. },
  21602. "options": {
  21603. "type": "array",
  21604. "items": {
  21605. "$ref": "#/components/schemas/QuestionV2Option"
  21606. },
  21607. "description": "Available choices"
  21608. },
  21609. "multiple": {
  21610. "type": "boolean"
  21611. },
  21612. "custom": {
  21613. "type": "boolean"
  21614. }
  21615. },
  21616. "required": ["question", "header", "options"],
  21617. "additionalProperties": false
  21618. },
  21619. "QuestionV2Tool": {
  21620. "type": "object",
  21621. "properties": {
  21622. "messageID": {
  21623. "type": "string"
  21624. },
  21625. "callID": {
  21626. "type": "string"
  21627. }
  21628. },
  21629. "required": ["messageID", "callID"],
  21630. "additionalProperties": false
  21631. },
  21632. "QuestionV2Answer": {
  21633. "type": "array",
  21634. "items": {
  21635. "type": "string"
  21636. }
  21637. },
  21638. "EventServerInstanceDisposed": {
  21639. "type": "object",
  21640. "properties": {
  21641. "id": {
  21642. "type": "string"
  21643. },
  21644. "type": {
  21645. "type": "string",
  21646. "enum": ["server.instance.disposed"]
  21647. },
  21648. "properties": {
  21649. "type": "object",
  21650. "properties": {
  21651. "directory": {
  21652. "type": "string"
  21653. }
  21654. },
  21655. "required": ["directory"],
  21656. "additionalProperties": false
  21657. }
  21658. },
  21659. "required": ["id", "type", "properties"],
  21660. "additionalProperties": false
  21661. },
  21662. "SyncEventSessionCreated": {
  21663. "type": "object",
  21664. "properties": {
  21665. "type": {
  21666. "type": "string",
  21667. "enum": ["sync"]
  21668. },
  21669. "id": {
  21670. "type": "string",
  21671. "pattern": "^evt_"
  21672. },
  21673. "syncEvent": {
  21674. "type": "object",
  21675. "properties": {
  21676. "type": {
  21677. "type": "string",
  21678. "enum": ["session.created.1"]
  21679. },
  21680. "id": {
  21681. "type": "string",
  21682. "pattern": "^evt_"
  21683. },
  21684. "seq": {
  21685. "type": "number"
  21686. },
  21687. "aggregateID": {
  21688. "type": "string"
  21689. },
  21690. "data": {
  21691. "type": "object",
  21692. "properties": {
  21693. "sessionID": {
  21694. "type": "string",
  21695. "pattern": "^ses"
  21696. },
  21697. "info": {
  21698. "$ref": "#/components/schemas/Session"
  21699. }
  21700. },
  21701. "required": ["sessionID", "info"],
  21702. "additionalProperties": false
  21703. }
  21704. },
  21705. "required": ["type", "id", "seq", "aggregateID", "data"],
  21706. "additionalProperties": false
  21707. }
  21708. },
  21709. "required": ["type", "id", "syncEvent"],
  21710. "additionalProperties": false
  21711. },
  21712. "SyncEventSessionUpdated": {
  21713. "type": "object",
  21714. "properties": {
  21715. "type": {
  21716. "type": "string",
  21717. "enum": ["sync"]
  21718. },
  21719. "id": {
  21720. "type": "string",
  21721. "pattern": "^evt_"
  21722. },
  21723. "syncEvent": {
  21724. "type": "object",
  21725. "properties": {
  21726. "type": {
  21727. "type": "string",
  21728. "enum": ["session.updated.1"]
  21729. },
  21730. "id": {
  21731. "type": "string",
  21732. "pattern": "^evt_"
  21733. },
  21734. "seq": {
  21735. "type": "number"
  21736. },
  21737. "aggregateID": {
  21738. "type": "string"
  21739. },
  21740. "data": {
  21741. "type": "object",
  21742. "properties": {
  21743. "sessionID": {
  21744. "type": "string",
  21745. "pattern": "^ses"
  21746. },
  21747. "info": {
  21748. "$ref": "#/components/schemas/Session"
  21749. }
  21750. },
  21751. "required": ["sessionID", "info"],
  21752. "additionalProperties": false
  21753. }
  21754. },
  21755. "required": ["type", "id", "seq", "aggregateID", "data"],
  21756. "additionalProperties": false
  21757. }
  21758. },
  21759. "required": ["type", "id", "syncEvent"],
  21760. "additionalProperties": false
  21761. },
  21762. "SyncEventSessionDeleted": {
  21763. "type": "object",
  21764. "properties": {
  21765. "type": {
  21766. "type": "string",
  21767. "enum": ["sync"]
  21768. },
  21769. "id": {
  21770. "type": "string",
  21771. "pattern": "^evt_"
  21772. },
  21773. "syncEvent": {
  21774. "type": "object",
  21775. "properties": {
  21776. "type": {
  21777. "type": "string",
  21778. "enum": ["session.deleted.1"]
  21779. },
  21780. "id": {
  21781. "type": "string",
  21782. "pattern": "^evt_"
  21783. },
  21784. "seq": {
  21785. "type": "number"
  21786. },
  21787. "aggregateID": {
  21788. "type": "string"
  21789. },
  21790. "data": {
  21791. "type": "object",
  21792. "properties": {
  21793. "sessionID": {
  21794. "type": "string",
  21795. "pattern": "^ses"
  21796. },
  21797. "info": {
  21798. "$ref": "#/components/schemas/Session"
  21799. }
  21800. },
  21801. "required": ["sessionID", "info"],
  21802. "additionalProperties": false
  21803. }
  21804. },
  21805. "required": ["type", "id", "seq", "aggregateID", "data"],
  21806. "additionalProperties": false
  21807. }
  21808. },
  21809. "required": ["type", "id", "syncEvent"],
  21810. "additionalProperties": false
  21811. },
  21812. "SyncEventMessageUpdated": {
  21813. "type": "object",
  21814. "properties": {
  21815. "type": {
  21816. "type": "string",
  21817. "enum": ["sync"]
  21818. },
  21819. "id": {
  21820. "type": "string",
  21821. "pattern": "^evt_"
  21822. },
  21823. "syncEvent": {
  21824. "type": "object",
  21825. "properties": {
  21826. "type": {
  21827. "type": "string",
  21828. "enum": ["message.updated.1"]
  21829. },
  21830. "id": {
  21831. "type": "string",
  21832. "pattern": "^evt_"
  21833. },
  21834. "seq": {
  21835. "type": "number"
  21836. },
  21837. "aggregateID": {
  21838. "type": "string"
  21839. },
  21840. "data": {
  21841. "type": "object",
  21842. "properties": {
  21843. "sessionID": {
  21844. "type": "string",
  21845. "pattern": "^ses"
  21846. },
  21847. "info": {
  21848. "$ref": "#/components/schemas/Message"
  21849. }
  21850. },
  21851. "required": ["sessionID", "info"],
  21852. "additionalProperties": false
  21853. }
  21854. },
  21855. "required": ["type", "id", "seq", "aggregateID", "data"],
  21856. "additionalProperties": false
  21857. }
  21858. },
  21859. "required": ["type", "id", "syncEvent"],
  21860. "additionalProperties": false
  21861. },
  21862. "SyncEventMessageRemoved": {
  21863. "type": "object",
  21864. "properties": {
  21865. "type": {
  21866. "type": "string",
  21867. "enum": ["sync"]
  21868. },
  21869. "id": {
  21870. "type": "string",
  21871. "pattern": "^evt_"
  21872. },
  21873. "syncEvent": {
  21874. "type": "object",
  21875. "properties": {
  21876. "type": {
  21877. "type": "string",
  21878. "enum": ["message.removed.1"]
  21879. },
  21880. "id": {
  21881. "type": "string",
  21882. "pattern": "^evt_"
  21883. },
  21884. "seq": {
  21885. "type": "number"
  21886. },
  21887. "aggregateID": {
  21888. "type": "string"
  21889. },
  21890. "data": {
  21891. "type": "object",
  21892. "properties": {
  21893. "sessionID": {
  21894. "type": "string",
  21895. "pattern": "^ses"
  21896. },
  21897. "messageID": {
  21898. "type": "string",
  21899. "pattern": "^msg"
  21900. }
  21901. },
  21902. "required": ["sessionID", "messageID"],
  21903. "additionalProperties": false
  21904. }
  21905. },
  21906. "required": ["type", "id", "seq", "aggregateID", "data"],
  21907. "additionalProperties": false
  21908. }
  21909. },
  21910. "required": ["type", "id", "syncEvent"],
  21911. "additionalProperties": false
  21912. },
  21913. "SyncEventMessagePartUpdated": {
  21914. "type": "object",
  21915. "properties": {
  21916. "type": {
  21917. "type": "string",
  21918. "enum": ["sync"]
  21919. },
  21920. "id": {
  21921. "type": "string",
  21922. "pattern": "^evt_"
  21923. },
  21924. "syncEvent": {
  21925. "type": "object",
  21926. "properties": {
  21927. "type": {
  21928. "type": "string",
  21929. "enum": ["message.part.updated.1"]
  21930. },
  21931. "id": {
  21932. "type": "string",
  21933. "pattern": "^evt_"
  21934. },
  21935. "seq": {
  21936. "type": "number"
  21937. },
  21938. "aggregateID": {
  21939. "type": "string"
  21940. },
  21941. "data": {
  21942. "type": "object",
  21943. "properties": {
  21944. "sessionID": {
  21945. "type": "string",
  21946. "pattern": "^ses"
  21947. },
  21948. "part": {
  21949. "$ref": "#/components/schemas/Part"
  21950. },
  21951. "time": {
  21952. "type": "number"
  21953. }
  21954. },
  21955. "required": ["sessionID", "part", "time"],
  21956. "additionalProperties": false
  21957. }
  21958. },
  21959. "required": ["type", "id", "seq", "aggregateID", "data"],
  21960. "additionalProperties": false
  21961. }
  21962. },
  21963. "required": ["type", "id", "syncEvent"],
  21964. "additionalProperties": false
  21965. },
  21966. "SyncEventMessagePartRemoved": {
  21967. "type": "object",
  21968. "properties": {
  21969. "type": {
  21970. "type": "string",
  21971. "enum": ["sync"]
  21972. },
  21973. "id": {
  21974. "type": "string",
  21975. "pattern": "^evt_"
  21976. },
  21977. "syncEvent": {
  21978. "type": "object",
  21979. "properties": {
  21980. "type": {
  21981. "type": "string",
  21982. "enum": ["message.part.removed.1"]
  21983. },
  21984. "id": {
  21985. "type": "string",
  21986. "pattern": "^evt_"
  21987. },
  21988. "seq": {
  21989. "type": "number"
  21990. },
  21991. "aggregateID": {
  21992. "type": "string"
  21993. },
  21994. "data": {
  21995. "type": "object",
  21996. "properties": {
  21997. "sessionID": {
  21998. "type": "string",
  21999. "pattern": "^ses"
  22000. },
  22001. "messageID": {
  22002. "type": "string",
  22003. "pattern": "^msg"
  22004. },
  22005. "partID": {
  22006. "type": "string",
  22007. "pattern": "^prt"
  22008. }
  22009. },
  22010. "required": ["sessionID", "messageID", "partID"],
  22011. "additionalProperties": false
  22012. }
  22013. },
  22014. "required": ["type", "id", "seq", "aggregateID", "data"],
  22015. "additionalProperties": false
  22016. }
  22017. },
  22018. "required": ["type", "id", "syncEvent"],
  22019. "additionalProperties": false
  22020. },
  22021. "SyncEventSessionNextAgentSwitched": {
  22022. "type": "object",
  22023. "properties": {
  22024. "type": {
  22025. "type": "string",
  22026. "enum": ["sync"]
  22027. },
  22028. "id": {
  22029. "type": "string",
  22030. "pattern": "^evt_"
  22031. },
  22032. "syncEvent": {
  22033. "type": "object",
  22034. "properties": {
  22035. "type": {
  22036. "type": "string",
  22037. "enum": ["session.next.agent.switched.1"]
  22038. },
  22039. "id": {
  22040. "type": "string",
  22041. "pattern": "^evt_"
  22042. },
  22043. "seq": {
  22044. "type": "number"
  22045. },
  22046. "aggregateID": {
  22047. "type": "string"
  22048. },
  22049. "data": {
  22050. "type": "object",
  22051. "properties": {
  22052. "timestamp": {
  22053. "type": "number"
  22054. },
  22055. "sessionID": {
  22056. "type": "string",
  22057. "pattern": "^ses"
  22058. },
  22059. "messageID": {
  22060. "type": "string",
  22061. "pattern": "^msg_"
  22062. },
  22063. "agent": {
  22064. "type": "string"
  22065. }
  22066. },
  22067. "required": ["timestamp", "sessionID", "messageID", "agent"],
  22068. "additionalProperties": false
  22069. }
  22070. },
  22071. "required": ["type", "id", "seq", "aggregateID", "data"],
  22072. "additionalProperties": false
  22073. }
  22074. },
  22075. "required": ["type", "id", "syncEvent"],
  22076. "additionalProperties": false
  22077. },
  22078. "SyncEventSessionNextModelSwitched": {
  22079. "type": "object",
  22080. "properties": {
  22081. "type": {
  22082. "type": "string",
  22083. "enum": ["sync"]
  22084. },
  22085. "id": {
  22086. "type": "string",
  22087. "pattern": "^evt_"
  22088. },
  22089. "syncEvent": {
  22090. "type": "object",
  22091. "properties": {
  22092. "type": {
  22093. "type": "string",
  22094. "enum": ["session.next.model.switched.1"]
  22095. },
  22096. "id": {
  22097. "type": "string",
  22098. "pattern": "^evt_"
  22099. },
  22100. "seq": {
  22101. "type": "number"
  22102. },
  22103. "aggregateID": {
  22104. "type": "string"
  22105. },
  22106. "data": {
  22107. "type": "object",
  22108. "properties": {
  22109. "timestamp": {
  22110. "type": "number"
  22111. },
  22112. "sessionID": {
  22113. "type": "string",
  22114. "pattern": "^ses"
  22115. },
  22116. "messageID": {
  22117. "type": "string",
  22118. "pattern": "^msg_"
  22119. },
  22120. "model": {
  22121. "type": "object",
  22122. "properties": {
  22123. "id": {
  22124. "type": "string"
  22125. },
  22126. "providerID": {
  22127. "type": "string"
  22128. },
  22129. "variant": {
  22130. "type": "string"
  22131. }
  22132. },
  22133. "required": ["id", "providerID"],
  22134. "additionalProperties": false
  22135. }
  22136. },
  22137. "required": ["timestamp", "sessionID", "messageID", "model"],
  22138. "additionalProperties": false
  22139. }
  22140. },
  22141. "required": ["type", "id", "seq", "aggregateID", "data"],
  22142. "additionalProperties": false
  22143. }
  22144. },
  22145. "required": ["type", "id", "syncEvent"],
  22146. "additionalProperties": false
  22147. },
  22148. "SyncEventSessionNextMoved": {
  22149. "type": "object",
  22150. "properties": {
  22151. "type": {
  22152. "type": "string",
  22153. "enum": ["sync"]
  22154. },
  22155. "id": {
  22156. "type": "string",
  22157. "pattern": "^evt_"
  22158. },
  22159. "syncEvent": {
  22160. "type": "object",
  22161. "properties": {
  22162. "type": {
  22163. "type": "string",
  22164. "enum": ["session.next.moved.1"]
  22165. },
  22166. "id": {
  22167. "type": "string",
  22168. "pattern": "^evt_"
  22169. },
  22170. "seq": {
  22171. "type": "number"
  22172. },
  22173. "aggregateID": {
  22174. "type": "string"
  22175. },
  22176. "data": {
  22177. "type": "object",
  22178. "properties": {
  22179. "timestamp": {
  22180. "type": "number"
  22181. },
  22182. "sessionID": {
  22183. "type": "string",
  22184. "pattern": "^ses"
  22185. },
  22186. "location": {
  22187. "$ref": "#/components/schemas/LocationRef"
  22188. },
  22189. "subdirectory": {
  22190. "type": "string"
  22191. }
  22192. },
  22193. "required": ["timestamp", "sessionID", "location"],
  22194. "additionalProperties": false
  22195. }
  22196. },
  22197. "required": ["type", "id", "seq", "aggregateID", "data"],
  22198. "additionalProperties": false
  22199. }
  22200. },
  22201. "required": ["type", "id", "syncEvent"],
  22202. "additionalProperties": false
  22203. },
  22204. "SyncEventSessionNextPrompted": {
  22205. "type": "object",
  22206. "properties": {
  22207. "type": {
  22208. "type": "string",
  22209. "enum": ["sync"]
  22210. },
  22211. "id": {
  22212. "type": "string",
  22213. "pattern": "^evt_"
  22214. },
  22215. "syncEvent": {
  22216. "type": "object",
  22217. "properties": {
  22218. "type": {
  22219. "type": "string",
  22220. "enum": ["session.next.prompted.1"]
  22221. },
  22222. "id": {
  22223. "type": "string",
  22224. "pattern": "^evt_"
  22225. },
  22226. "seq": {
  22227. "type": "number"
  22228. },
  22229. "aggregateID": {
  22230. "type": "string"
  22231. },
  22232. "data": {
  22233. "type": "object",
  22234. "properties": {
  22235. "timestamp": {
  22236. "type": "number"
  22237. },
  22238. "sessionID": {
  22239. "type": "string",
  22240. "pattern": "^ses"
  22241. },
  22242. "messageID": {
  22243. "type": "string",
  22244. "pattern": "^msg_"
  22245. },
  22246. "prompt": {
  22247. "$ref": "#/components/schemas/Prompt"
  22248. },
  22249. "delivery": {
  22250. "type": "string",
  22251. "enum": ["steer", "queue"]
  22252. }
  22253. },
  22254. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22255. "additionalProperties": false
  22256. }
  22257. },
  22258. "required": ["type", "id", "seq", "aggregateID", "data"],
  22259. "additionalProperties": false
  22260. }
  22261. },
  22262. "required": ["type", "id", "syncEvent"],
  22263. "additionalProperties": false
  22264. },
  22265. "SyncEventSessionNextPromptAdmitted": {
  22266. "type": "object",
  22267. "properties": {
  22268. "type": {
  22269. "type": "string",
  22270. "enum": ["sync"]
  22271. },
  22272. "id": {
  22273. "type": "string",
  22274. "pattern": "^evt_"
  22275. },
  22276. "syncEvent": {
  22277. "type": "object",
  22278. "properties": {
  22279. "type": {
  22280. "type": "string",
  22281. "enum": ["session.next.prompt.admitted.1"]
  22282. },
  22283. "id": {
  22284. "type": "string",
  22285. "pattern": "^evt_"
  22286. },
  22287. "seq": {
  22288. "type": "number"
  22289. },
  22290. "aggregateID": {
  22291. "type": "string"
  22292. },
  22293. "data": {
  22294. "type": "object",
  22295. "properties": {
  22296. "timestamp": {
  22297. "type": "number"
  22298. },
  22299. "sessionID": {
  22300. "type": "string",
  22301. "pattern": "^ses"
  22302. },
  22303. "messageID": {
  22304. "type": "string",
  22305. "pattern": "^msg_"
  22306. },
  22307. "prompt": {
  22308. "$ref": "#/components/schemas/Prompt"
  22309. },
  22310. "delivery": {
  22311. "type": "string",
  22312. "enum": ["steer", "queue"]
  22313. }
  22314. },
  22315. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22316. "additionalProperties": false
  22317. }
  22318. },
  22319. "required": ["type", "id", "seq", "aggregateID", "data"],
  22320. "additionalProperties": false
  22321. }
  22322. },
  22323. "required": ["type", "id", "syncEvent"],
  22324. "additionalProperties": false
  22325. },
  22326. "SyncEventSessionNextPromptPromoted": {
  22327. "type": "object",
  22328. "properties": {
  22329. "type": {
  22330. "type": "string",
  22331. "enum": ["sync"]
  22332. },
  22333. "id": {
  22334. "type": "string",
  22335. "pattern": "^evt_"
  22336. },
  22337. "syncEvent": {
  22338. "type": "object",
  22339. "properties": {
  22340. "type": {
  22341. "type": "string",
  22342. "enum": ["session.next.prompt.promoted.1"]
  22343. },
  22344. "id": {
  22345. "type": "string",
  22346. "pattern": "^evt_"
  22347. },
  22348. "seq": {
  22349. "type": "number"
  22350. },
  22351. "aggregateID": {
  22352. "type": "string"
  22353. },
  22354. "data": {
  22355. "type": "object",
  22356. "properties": {
  22357. "timestamp": {
  22358. "type": "number"
  22359. },
  22360. "sessionID": {
  22361. "type": "string",
  22362. "pattern": "^ses"
  22363. },
  22364. "messageID": {
  22365. "type": "string",
  22366. "pattern": "^msg_"
  22367. },
  22368. "prompt": {
  22369. "$ref": "#/components/schemas/Prompt"
  22370. },
  22371. "timeCreated": {
  22372. "type": "number"
  22373. }
  22374. },
  22375. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  22376. "additionalProperties": false
  22377. }
  22378. },
  22379. "required": ["type", "id", "seq", "aggregateID", "data"],
  22380. "additionalProperties": false
  22381. }
  22382. },
  22383. "required": ["type", "id", "syncEvent"],
  22384. "additionalProperties": false
  22385. },
  22386. "SyncEventSessionNextInterruptRequested": {
  22387. "type": "object",
  22388. "properties": {
  22389. "type": {
  22390. "type": "string",
  22391. "enum": ["sync"]
  22392. },
  22393. "id": {
  22394. "type": "string",
  22395. "pattern": "^evt_"
  22396. },
  22397. "syncEvent": {
  22398. "type": "object",
  22399. "properties": {
  22400. "type": {
  22401. "type": "string",
  22402. "enum": ["session.next.interrupt.requested.1"]
  22403. },
  22404. "id": {
  22405. "type": "string",
  22406. "pattern": "^evt_"
  22407. },
  22408. "seq": {
  22409. "type": "number"
  22410. },
  22411. "aggregateID": {
  22412. "type": "string"
  22413. },
  22414. "data": {
  22415. "type": "object",
  22416. "properties": {
  22417. "timestamp": {
  22418. "type": "number"
  22419. },
  22420. "sessionID": {
  22421. "type": "string",
  22422. "pattern": "^ses"
  22423. }
  22424. },
  22425. "required": ["timestamp", "sessionID"],
  22426. "additionalProperties": false
  22427. }
  22428. },
  22429. "required": ["type", "id", "seq", "aggregateID", "data"],
  22430. "additionalProperties": false
  22431. }
  22432. },
  22433. "required": ["type", "id", "syncEvent"],
  22434. "additionalProperties": false
  22435. },
  22436. "SyncEventSessionNextContextUpdated": {
  22437. "type": "object",
  22438. "properties": {
  22439. "type": {
  22440. "type": "string",
  22441. "enum": ["sync"]
  22442. },
  22443. "id": {
  22444. "type": "string",
  22445. "pattern": "^evt_"
  22446. },
  22447. "syncEvent": {
  22448. "type": "object",
  22449. "properties": {
  22450. "type": {
  22451. "type": "string",
  22452. "enum": ["session.next.context.updated.1"]
  22453. },
  22454. "id": {
  22455. "type": "string",
  22456. "pattern": "^evt_"
  22457. },
  22458. "seq": {
  22459. "type": "number"
  22460. },
  22461. "aggregateID": {
  22462. "type": "string"
  22463. },
  22464. "data": {
  22465. "type": "object",
  22466. "properties": {
  22467. "timestamp": {
  22468. "type": "number"
  22469. },
  22470. "sessionID": {
  22471. "type": "string",
  22472. "pattern": "^ses"
  22473. },
  22474. "messageID": {
  22475. "type": "string",
  22476. "pattern": "^msg_"
  22477. },
  22478. "text": {
  22479. "type": "string"
  22480. }
  22481. },
  22482. "required": ["timestamp", "sessionID", "messageID", "text"],
  22483. "additionalProperties": false
  22484. }
  22485. },
  22486. "required": ["type", "id", "seq", "aggregateID", "data"],
  22487. "additionalProperties": false
  22488. }
  22489. },
  22490. "required": ["type", "id", "syncEvent"],
  22491. "additionalProperties": false
  22492. },
  22493. "SyncEventSessionNextSynthetic": {
  22494. "type": "object",
  22495. "properties": {
  22496. "type": {
  22497. "type": "string",
  22498. "enum": ["sync"]
  22499. },
  22500. "id": {
  22501. "type": "string",
  22502. "pattern": "^evt_"
  22503. },
  22504. "syncEvent": {
  22505. "type": "object",
  22506. "properties": {
  22507. "type": {
  22508. "type": "string",
  22509. "enum": ["session.next.synthetic.1"]
  22510. },
  22511. "id": {
  22512. "type": "string",
  22513. "pattern": "^evt_"
  22514. },
  22515. "seq": {
  22516. "type": "number"
  22517. },
  22518. "aggregateID": {
  22519. "type": "string"
  22520. },
  22521. "data": {
  22522. "type": "object",
  22523. "properties": {
  22524. "timestamp": {
  22525. "type": "number"
  22526. },
  22527. "sessionID": {
  22528. "type": "string",
  22529. "pattern": "^ses"
  22530. },
  22531. "messageID": {
  22532. "type": "string",
  22533. "pattern": "^msg_"
  22534. },
  22535. "text": {
  22536. "type": "string"
  22537. }
  22538. },
  22539. "required": ["timestamp", "sessionID", "messageID", "text"],
  22540. "additionalProperties": false
  22541. }
  22542. },
  22543. "required": ["type", "id", "seq", "aggregateID", "data"],
  22544. "additionalProperties": false
  22545. }
  22546. },
  22547. "required": ["type", "id", "syncEvent"],
  22548. "additionalProperties": false
  22549. },
  22550. "SyncEventSessionNextShellStarted": {
  22551. "type": "object",
  22552. "properties": {
  22553. "type": {
  22554. "type": "string",
  22555. "enum": ["sync"]
  22556. },
  22557. "id": {
  22558. "type": "string",
  22559. "pattern": "^evt_"
  22560. },
  22561. "syncEvent": {
  22562. "type": "object",
  22563. "properties": {
  22564. "type": {
  22565. "type": "string",
  22566. "enum": ["session.next.shell.started.1"]
  22567. },
  22568. "id": {
  22569. "type": "string",
  22570. "pattern": "^evt_"
  22571. },
  22572. "seq": {
  22573. "type": "number"
  22574. },
  22575. "aggregateID": {
  22576. "type": "string"
  22577. },
  22578. "data": {
  22579. "type": "object",
  22580. "properties": {
  22581. "timestamp": {
  22582. "type": "number"
  22583. },
  22584. "sessionID": {
  22585. "type": "string",
  22586. "pattern": "^ses"
  22587. },
  22588. "messageID": {
  22589. "type": "string",
  22590. "pattern": "^msg_"
  22591. },
  22592. "callID": {
  22593. "type": "string"
  22594. },
  22595. "command": {
  22596. "type": "string"
  22597. }
  22598. },
  22599. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  22600. "additionalProperties": false
  22601. }
  22602. },
  22603. "required": ["type", "id", "seq", "aggregateID", "data"],
  22604. "additionalProperties": false
  22605. }
  22606. },
  22607. "required": ["type", "id", "syncEvent"],
  22608. "additionalProperties": false
  22609. },
  22610. "SyncEventSessionNextShellEnded": {
  22611. "type": "object",
  22612. "properties": {
  22613. "type": {
  22614. "type": "string",
  22615. "enum": ["sync"]
  22616. },
  22617. "id": {
  22618. "type": "string",
  22619. "pattern": "^evt_"
  22620. },
  22621. "syncEvent": {
  22622. "type": "object",
  22623. "properties": {
  22624. "type": {
  22625. "type": "string",
  22626. "enum": ["session.next.shell.ended.1"]
  22627. },
  22628. "id": {
  22629. "type": "string",
  22630. "pattern": "^evt_"
  22631. },
  22632. "seq": {
  22633. "type": "number"
  22634. },
  22635. "aggregateID": {
  22636. "type": "string"
  22637. },
  22638. "data": {
  22639. "type": "object",
  22640. "properties": {
  22641. "timestamp": {
  22642. "type": "number"
  22643. },
  22644. "sessionID": {
  22645. "type": "string",
  22646. "pattern": "^ses"
  22647. },
  22648. "callID": {
  22649. "type": "string"
  22650. },
  22651. "output": {
  22652. "type": "string"
  22653. }
  22654. },
  22655. "required": ["timestamp", "sessionID", "callID", "output"],
  22656. "additionalProperties": false
  22657. }
  22658. },
  22659. "required": ["type", "id", "seq", "aggregateID", "data"],
  22660. "additionalProperties": false
  22661. }
  22662. },
  22663. "required": ["type", "id", "syncEvent"],
  22664. "additionalProperties": false
  22665. },
  22666. "SyncEventSessionNextStepStarted": {
  22667. "type": "object",
  22668. "properties": {
  22669. "type": {
  22670. "type": "string",
  22671. "enum": ["sync"]
  22672. },
  22673. "id": {
  22674. "type": "string",
  22675. "pattern": "^evt_"
  22676. },
  22677. "syncEvent": {
  22678. "type": "object",
  22679. "properties": {
  22680. "type": {
  22681. "type": "string",
  22682. "enum": ["session.next.step.started.1"]
  22683. },
  22684. "id": {
  22685. "type": "string",
  22686. "pattern": "^evt_"
  22687. },
  22688. "seq": {
  22689. "type": "number"
  22690. },
  22691. "aggregateID": {
  22692. "type": "string"
  22693. },
  22694. "data": {
  22695. "type": "object",
  22696. "properties": {
  22697. "timestamp": {
  22698. "type": "number"
  22699. },
  22700. "sessionID": {
  22701. "type": "string",
  22702. "pattern": "^ses"
  22703. },
  22704. "assistantMessageID": {
  22705. "type": "string",
  22706. "pattern": "^msg_"
  22707. },
  22708. "agent": {
  22709. "type": "string"
  22710. },
  22711. "model": {
  22712. "type": "object",
  22713. "properties": {
  22714. "id": {
  22715. "type": "string"
  22716. },
  22717. "providerID": {
  22718. "type": "string"
  22719. },
  22720. "variant": {
  22721. "type": "string"
  22722. }
  22723. },
  22724. "required": ["id", "providerID"],
  22725. "additionalProperties": false
  22726. },
  22727. "snapshot": {
  22728. "type": "string"
  22729. }
  22730. },
  22731. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  22732. "additionalProperties": false
  22733. }
  22734. },
  22735. "required": ["type", "id", "seq", "aggregateID", "data"],
  22736. "additionalProperties": false
  22737. }
  22738. },
  22739. "required": ["type", "id", "syncEvent"],
  22740. "additionalProperties": false
  22741. },
  22742. "SyncEventSessionNextStepEnded": {
  22743. "type": "object",
  22744. "properties": {
  22745. "type": {
  22746. "type": "string",
  22747. "enum": ["sync"]
  22748. },
  22749. "id": {
  22750. "type": "string",
  22751. "pattern": "^evt_"
  22752. },
  22753. "syncEvent": {
  22754. "type": "object",
  22755. "properties": {
  22756. "type": {
  22757. "type": "string",
  22758. "enum": ["session.next.step.ended.2"]
  22759. },
  22760. "id": {
  22761. "type": "string",
  22762. "pattern": "^evt_"
  22763. },
  22764. "seq": {
  22765. "type": "number"
  22766. },
  22767. "aggregateID": {
  22768. "type": "string"
  22769. },
  22770. "data": {
  22771. "type": "object",
  22772. "properties": {
  22773. "timestamp": {
  22774. "type": "number"
  22775. },
  22776. "sessionID": {
  22777. "type": "string",
  22778. "pattern": "^ses"
  22779. },
  22780. "assistantMessageID": {
  22781. "type": "string",
  22782. "pattern": "^msg_"
  22783. },
  22784. "finish": {
  22785. "type": "string"
  22786. },
  22787. "cost": {
  22788. "type": "number"
  22789. },
  22790. "tokens": {
  22791. "type": "object",
  22792. "properties": {
  22793. "input": {
  22794. "type": "number"
  22795. },
  22796. "output": {
  22797. "type": "number"
  22798. },
  22799. "reasoning": {
  22800. "type": "number"
  22801. },
  22802. "cache": {
  22803. "type": "object",
  22804. "properties": {
  22805. "read": {
  22806. "type": "number"
  22807. },
  22808. "write": {
  22809. "type": "number"
  22810. }
  22811. },
  22812. "required": ["read", "write"],
  22813. "additionalProperties": false
  22814. }
  22815. },
  22816. "required": ["input", "output", "reasoning", "cache"],
  22817. "additionalProperties": false
  22818. },
  22819. "snapshot": {
  22820. "type": "string"
  22821. }
  22822. },
  22823. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  22824. "additionalProperties": false
  22825. }
  22826. },
  22827. "required": ["type", "id", "seq", "aggregateID", "data"],
  22828. "additionalProperties": false
  22829. }
  22830. },
  22831. "required": ["type", "id", "syncEvent"],
  22832. "additionalProperties": false
  22833. },
  22834. "SyncEventSessionNextStepFailed": {
  22835. "type": "object",
  22836. "properties": {
  22837. "type": {
  22838. "type": "string",
  22839. "enum": ["sync"]
  22840. },
  22841. "id": {
  22842. "type": "string",
  22843. "pattern": "^evt_"
  22844. },
  22845. "syncEvent": {
  22846. "type": "object",
  22847. "properties": {
  22848. "type": {
  22849. "type": "string",
  22850. "enum": ["session.next.step.failed.2"]
  22851. },
  22852. "id": {
  22853. "type": "string",
  22854. "pattern": "^evt_"
  22855. },
  22856. "seq": {
  22857. "type": "number"
  22858. },
  22859. "aggregateID": {
  22860. "type": "string"
  22861. },
  22862. "data": {
  22863. "type": "object",
  22864. "properties": {
  22865. "timestamp": {
  22866. "type": "number"
  22867. },
  22868. "sessionID": {
  22869. "type": "string",
  22870. "pattern": "^ses"
  22871. },
  22872. "assistantMessageID": {
  22873. "type": "string",
  22874. "pattern": "^msg_"
  22875. },
  22876. "error": {
  22877. "$ref": "#/components/schemas/SessionErrorUnknown"
  22878. }
  22879. },
  22880. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  22881. "additionalProperties": false
  22882. }
  22883. },
  22884. "required": ["type", "id", "seq", "aggregateID", "data"],
  22885. "additionalProperties": false
  22886. }
  22887. },
  22888. "required": ["type", "id", "syncEvent"],
  22889. "additionalProperties": false
  22890. },
  22891. "SyncEventSessionNextTextStarted": {
  22892. "type": "object",
  22893. "properties": {
  22894. "type": {
  22895. "type": "string",
  22896. "enum": ["sync"]
  22897. },
  22898. "id": {
  22899. "type": "string",
  22900. "pattern": "^evt_"
  22901. },
  22902. "syncEvent": {
  22903. "type": "object",
  22904. "properties": {
  22905. "type": {
  22906. "type": "string",
  22907. "enum": ["session.next.text.started.1"]
  22908. },
  22909. "id": {
  22910. "type": "string",
  22911. "pattern": "^evt_"
  22912. },
  22913. "seq": {
  22914. "type": "number"
  22915. },
  22916. "aggregateID": {
  22917. "type": "string"
  22918. },
  22919. "data": {
  22920. "type": "object",
  22921. "properties": {
  22922. "timestamp": {
  22923. "type": "number"
  22924. },
  22925. "sessionID": {
  22926. "type": "string",
  22927. "pattern": "^ses"
  22928. },
  22929. "assistantMessageID": {
  22930. "type": "string",
  22931. "pattern": "^msg_"
  22932. },
  22933. "textID": {
  22934. "type": "string"
  22935. }
  22936. },
  22937. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  22938. "additionalProperties": false
  22939. }
  22940. },
  22941. "required": ["type", "id", "seq", "aggregateID", "data"],
  22942. "additionalProperties": false
  22943. }
  22944. },
  22945. "required": ["type", "id", "syncEvent"],
  22946. "additionalProperties": false
  22947. },
  22948. "SyncEventSessionNextTextEnded": {
  22949. "type": "object",
  22950. "properties": {
  22951. "type": {
  22952. "type": "string",
  22953. "enum": ["sync"]
  22954. },
  22955. "id": {
  22956. "type": "string",
  22957. "pattern": "^evt_"
  22958. },
  22959. "syncEvent": {
  22960. "type": "object",
  22961. "properties": {
  22962. "type": {
  22963. "type": "string",
  22964. "enum": ["session.next.text.ended.1"]
  22965. },
  22966. "id": {
  22967. "type": "string",
  22968. "pattern": "^evt_"
  22969. },
  22970. "seq": {
  22971. "type": "number"
  22972. },
  22973. "aggregateID": {
  22974. "type": "string"
  22975. },
  22976. "data": {
  22977. "type": "object",
  22978. "properties": {
  22979. "timestamp": {
  22980. "type": "number"
  22981. },
  22982. "sessionID": {
  22983. "type": "string",
  22984. "pattern": "^ses"
  22985. },
  22986. "assistantMessageID": {
  22987. "type": "string",
  22988. "pattern": "^msg_"
  22989. },
  22990. "textID": {
  22991. "type": "string"
  22992. },
  22993. "text": {
  22994. "type": "string"
  22995. }
  22996. },
  22997. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  22998. "additionalProperties": false
  22999. }
  23000. },
  23001. "required": ["type", "id", "seq", "aggregateID", "data"],
  23002. "additionalProperties": false
  23003. }
  23004. },
  23005. "required": ["type", "id", "syncEvent"],
  23006. "additionalProperties": false
  23007. },
  23008. "SyncEventSessionNextReasoningStarted": {
  23009. "type": "object",
  23010. "properties": {
  23011. "type": {
  23012. "type": "string",
  23013. "enum": ["sync"]
  23014. },
  23015. "id": {
  23016. "type": "string",
  23017. "pattern": "^evt_"
  23018. },
  23019. "syncEvent": {
  23020. "type": "object",
  23021. "properties": {
  23022. "type": {
  23023. "type": "string",
  23024. "enum": ["session.next.reasoning.started.1"]
  23025. },
  23026. "id": {
  23027. "type": "string",
  23028. "pattern": "^evt_"
  23029. },
  23030. "seq": {
  23031. "type": "number"
  23032. },
  23033. "aggregateID": {
  23034. "type": "string"
  23035. },
  23036. "data": {
  23037. "type": "object",
  23038. "properties": {
  23039. "timestamp": {
  23040. "type": "number"
  23041. },
  23042. "sessionID": {
  23043. "type": "string",
  23044. "pattern": "^ses"
  23045. },
  23046. "assistantMessageID": {
  23047. "type": "string",
  23048. "pattern": "^msg_"
  23049. },
  23050. "reasoningID": {
  23051. "type": "string"
  23052. },
  23053. "providerMetadata": {
  23054. "type": "object",
  23055. "additionalProperties": {
  23056. "type": "object"
  23057. }
  23058. }
  23059. },
  23060. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  23061. "additionalProperties": false
  23062. }
  23063. },
  23064. "required": ["type", "id", "seq", "aggregateID", "data"],
  23065. "additionalProperties": false
  23066. }
  23067. },
  23068. "required": ["type", "id", "syncEvent"],
  23069. "additionalProperties": false
  23070. },
  23071. "SyncEventSessionNextReasoningEnded": {
  23072. "type": "object",
  23073. "properties": {
  23074. "type": {
  23075. "type": "string",
  23076. "enum": ["sync"]
  23077. },
  23078. "id": {
  23079. "type": "string",
  23080. "pattern": "^evt_"
  23081. },
  23082. "syncEvent": {
  23083. "type": "object",
  23084. "properties": {
  23085. "type": {
  23086. "type": "string",
  23087. "enum": ["session.next.reasoning.ended.1"]
  23088. },
  23089. "id": {
  23090. "type": "string",
  23091. "pattern": "^evt_"
  23092. },
  23093. "seq": {
  23094. "type": "number"
  23095. },
  23096. "aggregateID": {
  23097. "type": "string"
  23098. },
  23099. "data": {
  23100. "type": "object",
  23101. "properties": {
  23102. "timestamp": {
  23103. "type": "number"
  23104. },
  23105. "sessionID": {
  23106. "type": "string",
  23107. "pattern": "^ses"
  23108. },
  23109. "assistantMessageID": {
  23110. "type": "string",
  23111. "pattern": "^msg_"
  23112. },
  23113. "reasoningID": {
  23114. "type": "string"
  23115. },
  23116. "text": {
  23117. "type": "string"
  23118. },
  23119. "providerMetadata": {
  23120. "type": "object",
  23121. "additionalProperties": {
  23122. "type": "object"
  23123. }
  23124. }
  23125. },
  23126. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  23127. "additionalProperties": false
  23128. }
  23129. },
  23130. "required": ["type", "id", "seq", "aggregateID", "data"],
  23131. "additionalProperties": false
  23132. }
  23133. },
  23134. "required": ["type", "id", "syncEvent"],
  23135. "additionalProperties": false
  23136. },
  23137. "SyncEventSessionNextToolInputStarted": {
  23138. "type": "object",
  23139. "properties": {
  23140. "type": {
  23141. "type": "string",
  23142. "enum": ["sync"]
  23143. },
  23144. "id": {
  23145. "type": "string",
  23146. "pattern": "^evt_"
  23147. },
  23148. "syncEvent": {
  23149. "type": "object",
  23150. "properties": {
  23151. "type": {
  23152. "type": "string",
  23153. "enum": ["session.next.tool.input.started.1"]
  23154. },
  23155. "id": {
  23156. "type": "string",
  23157. "pattern": "^evt_"
  23158. },
  23159. "seq": {
  23160. "type": "number"
  23161. },
  23162. "aggregateID": {
  23163. "type": "string"
  23164. },
  23165. "data": {
  23166. "type": "object",
  23167. "properties": {
  23168. "timestamp": {
  23169. "type": "number"
  23170. },
  23171. "sessionID": {
  23172. "type": "string",
  23173. "pattern": "^ses"
  23174. },
  23175. "assistantMessageID": {
  23176. "type": "string",
  23177. "pattern": "^msg_"
  23178. },
  23179. "callID": {
  23180. "type": "string"
  23181. },
  23182. "name": {
  23183. "type": "string"
  23184. }
  23185. },
  23186. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  23187. "additionalProperties": false
  23188. }
  23189. },
  23190. "required": ["type", "id", "seq", "aggregateID", "data"],
  23191. "additionalProperties": false
  23192. }
  23193. },
  23194. "required": ["type", "id", "syncEvent"],
  23195. "additionalProperties": false
  23196. },
  23197. "SyncEventSessionNextToolInputEnded": {
  23198. "type": "object",
  23199. "properties": {
  23200. "type": {
  23201. "type": "string",
  23202. "enum": ["sync"]
  23203. },
  23204. "id": {
  23205. "type": "string",
  23206. "pattern": "^evt_"
  23207. },
  23208. "syncEvent": {
  23209. "type": "object",
  23210. "properties": {
  23211. "type": {
  23212. "type": "string",
  23213. "enum": ["session.next.tool.input.ended.1"]
  23214. },
  23215. "id": {
  23216. "type": "string",
  23217. "pattern": "^evt_"
  23218. },
  23219. "seq": {
  23220. "type": "number"
  23221. },
  23222. "aggregateID": {
  23223. "type": "string"
  23224. },
  23225. "data": {
  23226. "type": "object",
  23227. "properties": {
  23228. "timestamp": {
  23229. "type": "number"
  23230. },
  23231. "sessionID": {
  23232. "type": "string",
  23233. "pattern": "^ses"
  23234. },
  23235. "assistantMessageID": {
  23236. "type": "string",
  23237. "pattern": "^msg_"
  23238. },
  23239. "callID": {
  23240. "type": "string"
  23241. },
  23242. "text": {
  23243. "type": "string"
  23244. }
  23245. },
  23246. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  23247. "additionalProperties": false
  23248. }
  23249. },
  23250. "required": ["type", "id", "seq", "aggregateID", "data"],
  23251. "additionalProperties": false
  23252. }
  23253. },
  23254. "required": ["type", "id", "syncEvent"],
  23255. "additionalProperties": false
  23256. },
  23257. "SyncEventSessionNextToolCalled": {
  23258. "type": "object",
  23259. "properties": {
  23260. "type": {
  23261. "type": "string",
  23262. "enum": ["sync"]
  23263. },
  23264. "id": {
  23265. "type": "string",
  23266. "pattern": "^evt_"
  23267. },
  23268. "syncEvent": {
  23269. "type": "object",
  23270. "properties": {
  23271. "type": {
  23272. "type": "string",
  23273. "enum": ["session.next.tool.called.1"]
  23274. },
  23275. "id": {
  23276. "type": "string",
  23277. "pattern": "^evt_"
  23278. },
  23279. "seq": {
  23280. "type": "number"
  23281. },
  23282. "aggregateID": {
  23283. "type": "string"
  23284. },
  23285. "data": {
  23286. "type": "object",
  23287. "properties": {
  23288. "timestamp": {
  23289. "type": "number"
  23290. },
  23291. "sessionID": {
  23292. "type": "string",
  23293. "pattern": "^ses"
  23294. },
  23295. "assistantMessageID": {
  23296. "type": "string",
  23297. "pattern": "^msg_"
  23298. },
  23299. "callID": {
  23300. "type": "string"
  23301. },
  23302. "tool": {
  23303. "type": "string"
  23304. },
  23305. "input": {
  23306. "type": "object"
  23307. },
  23308. "provider": {
  23309. "type": "object",
  23310. "properties": {
  23311. "executed": {
  23312. "type": "boolean"
  23313. },
  23314. "metadata": {
  23315. "type": "object",
  23316. "additionalProperties": {
  23317. "type": "object"
  23318. }
  23319. }
  23320. },
  23321. "required": ["executed"],
  23322. "additionalProperties": false
  23323. }
  23324. },
  23325. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  23326. "additionalProperties": false
  23327. }
  23328. },
  23329. "required": ["type", "id", "seq", "aggregateID", "data"],
  23330. "additionalProperties": false
  23331. }
  23332. },
  23333. "required": ["type", "id", "syncEvent"],
  23334. "additionalProperties": false
  23335. },
  23336. "SyncEventSessionNextToolProgress": {
  23337. "type": "object",
  23338. "properties": {
  23339. "type": {
  23340. "type": "string",
  23341. "enum": ["sync"]
  23342. },
  23343. "id": {
  23344. "type": "string",
  23345. "pattern": "^evt_"
  23346. },
  23347. "syncEvent": {
  23348. "type": "object",
  23349. "properties": {
  23350. "type": {
  23351. "type": "string",
  23352. "enum": ["session.next.tool.progress.1"]
  23353. },
  23354. "id": {
  23355. "type": "string",
  23356. "pattern": "^evt_"
  23357. },
  23358. "seq": {
  23359. "type": "number"
  23360. },
  23361. "aggregateID": {
  23362. "type": "string"
  23363. },
  23364. "data": {
  23365. "type": "object",
  23366. "properties": {
  23367. "timestamp": {
  23368. "type": "number"
  23369. },
  23370. "sessionID": {
  23371. "type": "string",
  23372. "pattern": "^ses"
  23373. },
  23374. "assistantMessageID": {
  23375. "type": "string",
  23376. "pattern": "^msg_"
  23377. },
  23378. "callID": {
  23379. "type": "string"
  23380. },
  23381. "structured": {
  23382. "type": "object"
  23383. },
  23384. "content": {
  23385. "type": "array",
  23386. "items": {
  23387. "anyOf": [
  23388. {
  23389. "$ref": "#/components/schemas/ToolTextContent"
  23390. },
  23391. {
  23392. "$ref": "#/components/schemas/ToolFileContent"
  23393. }
  23394. ]
  23395. }
  23396. }
  23397. },
  23398. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  23399. "additionalProperties": false
  23400. }
  23401. },
  23402. "required": ["type", "id", "seq", "aggregateID", "data"],
  23403. "additionalProperties": false
  23404. }
  23405. },
  23406. "required": ["type", "id", "syncEvent"],
  23407. "additionalProperties": false
  23408. },
  23409. "SyncEventSessionNextToolSuccess": {
  23410. "type": "object",
  23411. "properties": {
  23412. "type": {
  23413. "type": "string",
  23414. "enum": ["sync"]
  23415. },
  23416. "id": {
  23417. "type": "string",
  23418. "pattern": "^evt_"
  23419. },
  23420. "syncEvent": {
  23421. "type": "object",
  23422. "properties": {
  23423. "type": {
  23424. "type": "string",
  23425. "enum": ["session.next.tool.success.1"]
  23426. },
  23427. "id": {
  23428. "type": "string",
  23429. "pattern": "^evt_"
  23430. },
  23431. "seq": {
  23432. "type": "number"
  23433. },
  23434. "aggregateID": {
  23435. "type": "string"
  23436. },
  23437. "data": {
  23438. "type": "object",
  23439. "properties": {
  23440. "timestamp": {
  23441. "type": "number"
  23442. },
  23443. "sessionID": {
  23444. "type": "string",
  23445. "pattern": "^ses"
  23446. },
  23447. "assistantMessageID": {
  23448. "type": "string",
  23449. "pattern": "^msg_"
  23450. },
  23451. "callID": {
  23452. "type": "string"
  23453. },
  23454. "structured": {
  23455. "type": "object"
  23456. },
  23457. "content": {
  23458. "type": "array",
  23459. "items": {
  23460. "anyOf": [
  23461. {
  23462. "$ref": "#/components/schemas/ToolTextContent"
  23463. },
  23464. {
  23465. "$ref": "#/components/schemas/ToolFileContent"
  23466. }
  23467. ]
  23468. }
  23469. },
  23470. "outputPaths": {
  23471. "type": "array",
  23472. "items": {
  23473. "type": "string"
  23474. }
  23475. },
  23476. "result": {},
  23477. "provider": {
  23478. "type": "object",
  23479. "properties": {
  23480. "executed": {
  23481. "type": "boolean"
  23482. },
  23483. "metadata": {
  23484. "type": "object",
  23485. "additionalProperties": {
  23486. "type": "object"
  23487. }
  23488. }
  23489. },
  23490. "required": ["executed"],
  23491. "additionalProperties": false
  23492. }
  23493. },
  23494. "required": [
  23495. "timestamp",
  23496. "sessionID",
  23497. "assistantMessageID",
  23498. "callID",
  23499. "structured",
  23500. "content",
  23501. "provider"
  23502. ],
  23503. "additionalProperties": false
  23504. }
  23505. },
  23506. "required": ["type", "id", "seq", "aggregateID", "data"],
  23507. "additionalProperties": false
  23508. }
  23509. },
  23510. "required": ["type", "id", "syncEvent"],
  23511. "additionalProperties": false
  23512. },
  23513. "SyncEventSessionNextToolFailed": {
  23514. "type": "object",
  23515. "properties": {
  23516. "type": {
  23517. "type": "string",
  23518. "enum": ["sync"]
  23519. },
  23520. "id": {
  23521. "type": "string",
  23522. "pattern": "^evt_"
  23523. },
  23524. "syncEvent": {
  23525. "type": "object",
  23526. "properties": {
  23527. "type": {
  23528. "type": "string",
  23529. "enum": ["session.next.tool.failed.1"]
  23530. },
  23531. "id": {
  23532. "type": "string",
  23533. "pattern": "^evt_"
  23534. },
  23535. "seq": {
  23536. "type": "number"
  23537. },
  23538. "aggregateID": {
  23539. "type": "string"
  23540. },
  23541. "data": {
  23542. "type": "object",
  23543. "properties": {
  23544. "timestamp": {
  23545. "type": "number"
  23546. },
  23547. "sessionID": {
  23548. "type": "string",
  23549. "pattern": "^ses"
  23550. },
  23551. "assistantMessageID": {
  23552. "type": "string",
  23553. "pattern": "^msg_"
  23554. },
  23555. "callID": {
  23556. "type": "string"
  23557. },
  23558. "error": {
  23559. "$ref": "#/components/schemas/SessionErrorUnknown"
  23560. },
  23561. "result": {},
  23562. "provider": {
  23563. "type": "object",
  23564. "properties": {
  23565. "executed": {
  23566. "type": "boolean"
  23567. },
  23568. "metadata": {
  23569. "type": "object",
  23570. "additionalProperties": {
  23571. "type": "object"
  23572. }
  23573. }
  23574. },
  23575. "required": ["executed"],
  23576. "additionalProperties": false
  23577. }
  23578. },
  23579. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  23580. "additionalProperties": false
  23581. }
  23582. },
  23583. "required": ["type", "id", "seq", "aggregateID", "data"],
  23584. "additionalProperties": false
  23585. }
  23586. },
  23587. "required": ["type", "id", "syncEvent"],
  23588. "additionalProperties": false
  23589. },
  23590. "SyncEventSessionNextRetried": {
  23591. "type": "object",
  23592. "properties": {
  23593. "type": {
  23594. "type": "string",
  23595. "enum": ["sync"]
  23596. },
  23597. "id": {
  23598. "type": "string",
  23599. "pattern": "^evt_"
  23600. },
  23601. "syncEvent": {
  23602. "type": "object",
  23603. "properties": {
  23604. "type": {
  23605. "type": "string",
  23606. "enum": ["session.next.retried.1"]
  23607. },
  23608. "id": {
  23609. "type": "string",
  23610. "pattern": "^evt_"
  23611. },
  23612. "seq": {
  23613. "type": "number"
  23614. },
  23615. "aggregateID": {
  23616. "type": "string"
  23617. },
  23618. "data": {
  23619. "type": "object",
  23620. "properties": {
  23621. "timestamp": {
  23622. "type": "number"
  23623. },
  23624. "sessionID": {
  23625. "type": "string",
  23626. "pattern": "^ses"
  23627. },
  23628. "attempt": {
  23629. "type": "number"
  23630. },
  23631. "error": {
  23632. "$ref": "#/components/schemas/SessionNextRetry_error"
  23633. }
  23634. },
  23635. "required": ["timestamp", "sessionID", "attempt", "error"],
  23636. "additionalProperties": false
  23637. }
  23638. },
  23639. "required": ["type", "id", "seq", "aggregateID", "data"],
  23640. "additionalProperties": false
  23641. }
  23642. },
  23643. "required": ["type", "id", "syncEvent"],
  23644. "additionalProperties": false
  23645. },
  23646. "SyncEventSessionNextCompactionStarted": {
  23647. "type": "object",
  23648. "properties": {
  23649. "type": {
  23650. "type": "string",
  23651. "enum": ["sync"]
  23652. },
  23653. "id": {
  23654. "type": "string",
  23655. "pattern": "^evt_"
  23656. },
  23657. "syncEvent": {
  23658. "type": "object",
  23659. "properties": {
  23660. "type": {
  23661. "type": "string",
  23662. "enum": ["session.next.compaction.started.1"]
  23663. },
  23664. "id": {
  23665. "type": "string",
  23666. "pattern": "^evt_"
  23667. },
  23668. "seq": {
  23669. "type": "number"
  23670. },
  23671. "aggregateID": {
  23672. "type": "string"
  23673. },
  23674. "data": {
  23675. "type": "object",
  23676. "properties": {
  23677. "timestamp": {
  23678. "type": "number"
  23679. },
  23680. "sessionID": {
  23681. "type": "string",
  23682. "pattern": "^ses"
  23683. },
  23684. "messageID": {
  23685. "type": "string",
  23686. "pattern": "^msg_"
  23687. },
  23688. "reason": {
  23689. "type": "string",
  23690. "enum": ["auto", "manual"]
  23691. }
  23692. },
  23693. "required": ["timestamp", "sessionID", "messageID", "reason"],
  23694. "additionalProperties": false
  23695. }
  23696. },
  23697. "required": ["type", "id", "seq", "aggregateID", "data"],
  23698. "additionalProperties": false
  23699. }
  23700. },
  23701. "required": ["type", "id", "syncEvent"],
  23702. "additionalProperties": false
  23703. },
  23704. "SyncEventSessionNextCompactionEnded": {
  23705. "type": "object",
  23706. "properties": {
  23707. "type": {
  23708. "type": "string",
  23709. "enum": ["sync"]
  23710. },
  23711. "id": {
  23712. "type": "string",
  23713. "pattern": "^evt_"
  23714. },
  23715. "syncEvent": {
  23716. "type": "object",
  23717. "properties": {
  23718. "type": {
  23719. "type": "string",
  23720. "enum": ["session.next.compaction.ended.2"]
  23721. },
  23722. "id": {
  23723. "type": "string",
  23724. "pattern": "^evt_"
  23725. },
  23726. "seq": {
  23727. "type": "number"
  23728. },
  23729. "aggregateID": {
  23730. "type": "string"
  23731. },
  23732. "data": {
  23733. "type": "object",
  23734. "properties": {
  23735. "timestamp": {
  23736. "type": "number"
  23737. },
  23738. "sessionID": {
  23739. "type": "string",
  23740. "pattern": "^ses"
  23741. },
  23742. "messageID": {
  23743. "type": "string",
  23744. "pattern": "^msg_"
  23745. },
  23746. "reason": {
  23747. "type": "string",
  23748. "enum": ["auto", "manual"]
  23749. },
  23750. "text": {
  23751. "type": "string"
  23752. },
  23753. "recent": {
  23754. "type": "string"
  23755. }
  23756. },
  23757. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  23758. "additionalProperties": false
  23759. }
  23760. },
  23761. "required": ["type", "id", "seq", "aggregateID", "data"],
  23762. "additionalProperties": false
  23763. }
  23764. },
  23765. "required": ["type", "id", "syncEvent"],
  23766. "additionalProperties": false
  23767. },
  23768. "PolicyEffect": {
  23769. "type": "string",
  23770. "enum": ["allow", "deny"]
  23771. },
  23772. "ConfigV2ExperimentalPolicy": {
  23773. "type": "object",
  23774. "properties": {
  23775. "action": {
  23776. "type": "string",
  23777. "enum": ["provider.use"]
  23778. },
  23779. "effect": {
  23780. "$ref": "#/components/schemas/PolicyEffect"
  23781. },
  23782. "resource": {
  23783. "type": "string"
  23784. }
  23785. },
  23786. "required": ["action", "effect", "resource"],
  23787. "additionalProperties": false
  23788. },
  23789. "ProjectDirectories": {
  23790. "type": "array",
  23791. "items": {
  23792. "type": "string"
  23793. }
  23794. },
  23795. "ProjectCopyCopy": {
  23796. "type": "object",
  23797. "properties": {
  23798. "directory": {
  23799. "type": "string"
  23800. }
  23801. },
  23802. "required": ["directory"],
  23803. "additionalProperties": false
  23804. },
  23805. "LocationInfo": {
  23806. "type": "object",
  23807. "properties": {
  23808. "directory": {
  23809. "type": "string"
  23810. },
  23811. "workspaceID": {
  23812. "type": "string",
  23813. "pattern": "^wrk"
  23814. },
  23815. "project": {
  23816. "type": "object",
  23817. "properties": {
  23818. "id": {
  23819. "type": "string"
  23820. },
  23821. "directory": {
  23822. "type": "string"
  23823. }
  23824. },
  23825. "required": ["id", "directory"],
  23826. "additionalProperties": false
  23827. }
  23828. },
  23829. "required": ["directory", "project"],
  23830. "additionalProperties": false
  23831. },
  23832. "PermissionV2Effect": {
  23833. "type": "string",
  23834. "enum": ["allow", "deny", "ask"]
  23835. },
  23836. "PermissionV2Rule": {
  23837. "type": "object",
  23838. "properties": {
  23839. "action": {
  23840. "type": "string"
  23841. },
  23842. "resource": {
  23843. "type": "string"
  23844. },
  23845. "effect": {
  23846. "$ref": "#/components/schemas/PermissionV2Effect"
  23847. }
  23848. },
  23849. "required": ["action", "resource", "effect"],
  23850. "additionalProperties": false
  23851. },
  23852. "PermissionV2Ruleset": {
  23853. "type": "array",
  23854. "items": {
  23855. "$ref": "#/components/schemas/PermissionV2Rule"
  23856. }
  23857. },
  23858. "AgentV2Info": {
  23859. "type": "object",
  23860. "properties": {
  23861. "id": {
  23862. "type": "string"
  23863. },
  23864. "model": {
  23865. "type": "object",
  23866. "properties": {
  23867. "id": {
  23868. "type": "string"
  23869. },
  23870. "providerID": {
  23871. "type": "string"
  23872. },
  23873. "variant": {
  23874. "type": "string"
  23875. }
  23876. },
  23877. "required": ["id", "providerID"],
  23878. "additionalProperties": false
  23879. },
  23880. "request": {
  23881. "type": "object",
  23882. "properties": {
  23883. "headers": {
  23884. "type": "object",
  23885. "additionalProperties": {
  23886. "type": "string"
  23887. }
  23888. },
  23889. "body": {
  23890. "type": "object"
  23891. }
  23892. },
  23893. "required": ["headers", "body"],
  23894. "additionalProperties": false
  23895. },
  23896. "system": {
  23897. "type": "string"
  23898. },
  23899. "description": {
  23900. "type": "string"
  23901. },
  23902. "mode": {
  23903. "type": "string",
  23904. "enum": ["subagent", "primary", "all"]
  23905. },
  23906. "hidden": {
  23907. "type": "boolean"
  23908. },
  23909. "color": {
  23910. "anyOf": [
  23911. {
  23912. "type": "string",
  23913. "pattern": "^#[0-9a-fA-F]{6}$"
  23914. },
  23915. {
  23916. "type": "string",
  23917. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  23918. }
  23919. ]
  23920. },
  23921. "steps": {
  23922. "type": "integer",
  23923. "exclusiveMinimum": 0
  23924. },
  23925. "permissions": {
  23926. "$ref": "#/components/schemas/PermissionV2Ruleset"
  23927. }
  23928. },
  23929. "required": ["id", "request", "mode", "hidden", "permissions"],
  23930. "additionalProperties": false
  23931. },
  23932. "SessionV2Info": {
  23933. "type": "object",
  23934. "properties": {
  23935. "id": {
  23936. "type": "string",
  23937. "pattern": "^ses"
  23938. },
  23939. "parentID": {
  23940. "type": "string",
  23941. "pattern": "^ses"
  23942. },
  23943. "projectID": {
  23944. "type": "string"
  23945. },
  23946. "agent": {
  23947. "type": "string"
  23948. },
  23949. "model": {
  23950. "type": "object",
  23951. "properties": {
  23952. "id": {
  23953. "type": "string"
  23954. },
  23955. "providerID": {
  23956. "type": "string"
  23957. },
  23958. "variant": {
  23959. "type": "string"
  23960. }
  23961. },
  23962. "required": ["id", "providerID"],
  23963. "additionalProperties": false
  23964. },
  23965. "cost": {
  23966. "type": "number"
  23967. },
  23968. "tokens": {
  23969. "type": "object",
  23970. "properties": {
  23971. "input": {
  23972. "type": "number"
  23973. },
  23974. "output": {
  23975. "type": "number"
  23976. },
  23977. "reasoning": {
  23978. "type": "number"
  23979. },
  23980. "cache": {
  23981. "type": "object",
  23982. "properties": {
  23983. "read": {
  23984. "type": "number"
  23985. },
  23986. "write": {
  23987. "type": "number"
  23988. }
  23989. },
  23990. "required": ["read", "write"],
  23991. "additionalProperties": false
  23992. }
  23993. },
  23994. "required": ["input", "output", "reasoning", "cache"],
  23995. "additionalProperties": false
  23996. },
  23997. "time": {
  23998. "type": "object",
  23999. "properties": {
  24000. "created": {
  24001. "type": "number"
  24002. },
  24003. "updated": {
  24004. "type": "number"
  24005. },
  24006. "archived": {
  24007. "type": "number"
  24008. }
  24009. },
  24010. "required": ["created", "updated"],
  24011. "additionalProperties": false
  24012. },
  24013. "title": {
  24014. "type": "string"
  24015. },
  24016. "location": {
  24017. "$ref": "#/components/schemas/LocationRef"
  24018. },
  24019. "subpath": {
  24020. "type": "string"
  24021. }
  24022. },
  24023. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  24024. "additionalProperties": false
  24025. },
  24026. "SessionInputAdmitted": {
  24027. "type": "object",
  24028. "properties": {
  24029. "admittedSeq": {
  24030. "type": "integer",
  24031. "minimum": 0
  24032. },
  24033. "id": {
  24034. "type": "string",
  24035. "pattern": "^msg_"
  24036. },
  24037. "sessionID": {
  24038. "type": "string",
  24039. "pattern": "^ses"
  24040. },
  24041. "prompt": {
  24042. "$ref": "#/components/schemas/Prompt"
  24043. },
  24044. "delivery": {
  24045. "type": "string",
  24046. "enum": ["steer", "queue"]
  24047. },
  24048. "timeCreated": {
  24049. "type": "number"
  24050. },
  24051. "promotedSeq": {
  24052. "type": "integer",
  24053. "minimum": 0
  24054. }
  24055. },
  24056. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  24057. "additionalProperties": false
  24058. },
  24059. "SessionMessageAgentSwitched": {
  24060. "type": "object",
  24061. "properties": {
  24062. "id": {
  24063. "type": "string",
  24064. "pattern": "^msg_"
  24065. },
  24066. "metadata": {
  24067. "type": "object"
  24068. },
  24069. "time": {
  24070. "type": "object",
  24071. "properties": {
  24072. "created": {
  24073. "type": "number"
  24074. }
  24075. },
  24076. "required": ["created"],
  24077. "additionalProperties": false
  24078. },
  24079. "type": {
  24080. "type": "string",
  24081. "enum": ["agent-switched"]
  24082. },
  24083. "agent": {
  24084. "type": "string"
  24085. }
  24086. },
  24087. "required": ["id", "time", "type", "agent"],
  24088. "additionalProperties": false
  24089. },
  24090. "SessionMessageModelSwitched": {
  24091. "type": "object",
  24092. "properties": {
  24093. "id": {
  24094. "type": "string",
  24095. "pattern": "^msg_"
  24096. },
  24097. "metadata": {
  24098. "type": "object"
  24099. },
  24100. "time": {
  24101. "type": "object",
  24102. "properties": {
  24103. "created": {
  24104. "type": "number"
  24105. }
  24106. },
  24107. "required": ["created"],
  24108. "additionalProperties": false
  24109. },
  24110. "type": {
  24111. "type": "string",
  24112. "enum": ["model-switched"]
  24113. },
  24114. "model": {
  24115. "type": "object",
  24116. "properties": {
  24117. "id": {
  24118. "type": "string"
  24119. },
  24120. "providerID": {
  24121. "type": "string"
  24122. },
  24123. "variant": {
  24124. "type": "string"
  24125. }
  24126. },
  24127. "required": ["id", "providerID"],
  24128. "additionalProperties": false
  24129. }
  24130. },
  24131. "required": ["id", "time", "type", "model"],
  24132. "additionalProperties": false
  24133. },
  24134. "SessionMessageUser": {
  24135. "type": "object",
  24136. "properties": {
  24137. "id": {
  24138. "type": "string",
  24139. "pattern": "^msg_"
  24140. },
  24141. "metadata": {
  24142. "type": "object"
  24143. },
  24144. "time": {
  24145. "type": "object",
  24146. "properties": {
  24147. "created": {
  24148. "type": "number"
  24149. }
  24150. },
  24151. "required": ["created"],
  24152. "additionalProperties": false
  24153. },
  24154. "text": {
  24155. "type": "string"
  24156. },
  24157. "files": {
  24158. "type": "array",
  24159. "items": {
  24160. "$ref": "#/components/schemas/PromptFileAttachment"
  24161. }
  24162. },
  24163. "agents": {
  24164. "type": "array",
  24165. "items": {
  24166. "$ref": "#/components/schemas/PromptAgentAttachment"
  24167. }
  24168. },
  24169. "references": {
  24170. "type": "array",
  24171. "items": {
  24172. "$ref": "#/components/schemas/PromptReferenceAttachment"
  24173. }
  24174. },
  24175. "type": {
  24176. "type": "string",
  24177. "enum": ["user"]
  24178. }
  24179. },
  24180. "required": ["id", "time", "text", "type"],
  24181. "additionalProperties": false
  24182. },
  24183. "SessionMessageSynthetic": {
  24184. "type": "object",
  24185. "properties": {
  24186. "id": {
  24187. "type": "string",
  24188. "pattern": "^msg_"
  24189. },
  24190. "metadata": {
  24191. "type": "object"
  24192. },
  24193. "time": {
  24194. "type": "object",
  24195. "properties": {
  24196. "created": {
  24197. "type": "number"
  24198. }
  24199. },
  24200. "required": ["created"],
  24201. "additionalProperties": false
  24202. },
  24203. "sessionID": {
  24204. "type": "string",
  24205. "pattern": "^ses"
  24206. },
  24207. "text": {
  24208. "type": "string"
  24209. },
  24210. "type": {
  24211. "type": "string",
  24212. "enum": ["synthetic"]
  24213. }
  24214. },
  24215. "required": ["id", "time", "sessionID", "text", "type"],
  24216. "additionalProperties": false
  24217. },
  24218. "SessionMessageSystem": {
  24219. "type": "object",
  24220. "properties": {
  24221. "id": {
  24222. "type": "string",
  24223. "pattern": "^msg_"
  24224. },
  24225. "metadata": {
  24226. "type": "object"
  24227. },
  24228. "time": {
  24229. "type": "object",
  24230. "properties": {
  24231. "created": {
  24232. "type": "number"
  24233. }
  24234. },
  24235. "required": ["created"],
  24236. "additionalProperties": false
  24237. },
  24238. "type": {
  24239. "type": "string",
  24240. "enum": ["system"]
  24241. },
  24242. "text": {
  24243. "type": "string"
  24244. }
  24245. },
  24246. "required": ["id", "time", "type", "text"],
  24247. "additionalProperties": false
  24248. },
  24249. "SessionMessageShell": {
  24250. "type": "object",
  24251. "properties": {
  24252. "id": {
  24253. "type": "string",
  24254. "pattern": "^msg_"
  24255. },
  24256. "metadata": {
  24257. "type": "object"
  24258. },
  24259. "time": {
  24260. "type": "object",
  24261. "properties": {
  24262. "created": {
  24263. "type": "number"
  24264. },
  24265. "completed": {
  24266. "type": "number"
  24267. }
  24268. },
  24269. "required": ["created"],
  24270. "additionalProperties": false
  24271. },
  24272. "type": {
  24273. "type": "string",
  24274. "enum": ["shell"]
  24275. },
  24276. "callID": {
  24277. "type": "string"
  24278. },
  24279. "command": {
  24280. "type": "string"
  24281. },
  24282. "output": {
  24283. "type": "string"
  24284. }
  24285. },
  24286. "required": ["id", "time", "type", "callID", "command", "output"],
  24287. "additionalProperties": false
  24288. },
  24289. "SessionMessageAssistantText": {
  24290. "type": "object",
  24291. "properties": {
  24292. "type": {
  24293. "type": "string",
  24294. "enum": ["text"]
  24295. },
  24296. "id": {
  24297. "type": "string"
  24298. },
  24299. "text": {
  24300. "type": "string"
  24301. }
  24302. },
  24303. "required": ["type", "id", "text"],
  24304. "additionalProperties": false
  24305. },
  24306. "SessionMessageAssistantReasoning": {
  24307. "type": "object",
  24308. "properties": {
  24309. "type": {
  24310. "type": "string",
  24311. "enum": ["reasoning"]
  24312. },
  24313. "id": {
  24314. "type": "string"
  24315. },
  24316. "text": {
  24317. "type": "string"
  24318. },
  24319. "providerMetadata": {
  24320. "type": "object",
  24321. "additionalProperties": {
  24322. "type": "object"
  24323. }
  24324. }
  24325. },
  24326. "required": ["type", "id", "text"],
  24327. "additionalProperties": false
  24328. },
  24329. "SessionMessageToolStatePending": {
  24330. "type": "object",
  24331. "properties": {
  24332. "status": {
  24333. "type": "string",
  24334. "enum": ["pending"]
  24335. },
  24336. "input": {
  24337. "type": "string"
  24338. }
  24339. },
  24340. "required": ["status", "input"],
  24341. "additionalProperties": false
  24342. },
  24343. "SessionMessageToolStateRunning": {
  24344. "type": "object",
  24345. "properties": {
  24346. "status": {
  24347. "type": "string",
  24348. "enum": ["running"]
  24349. },
  24350. "input": {
  24351. "type": "object"
  24352. },
  24353. "structured": {
  24354. "type": "object"
  24355. },
  24356. "content": {
  24357. "type": "array",
  24358. "items": {
  24359. "anyOf": [
  24360. {
  24361. "$ref": "#/components/schemas/ToolTextContent"
  24362. },
  24363. {
  24364. "$ref": "#/components/schemas/ToolFileContent"
  24365. }
  24366. ]
  24367. }
  24368. }
  24369. },
  24370. "required": ["status", "input", "structured", "content"],
  24371. "additionalProperties": false
  24372. },
  24373. "SessionMessageToolStateCompleted": {
  24374. "type": "object",
  24375. "properties": {
  24376. "status": {
  24377. "type": "string",
  24378. "enum": ["completed"]
  24379. },
  24380. "input": {
  24381. "type": "object"
  24382. },
  24383. "attachments": {
  24384. "type": "array",
  24385. "items": {
  24386. "$ref": "#/components/schemas/PromptFileAttachment"
  24387. }
  24388. },
  24389. "content": {
  24390. "type": "array",
  24391. "items": {
  24392. "anyOf": [
  24393. {
  24394. "$ref": "#/components/schemas/ToolTextContent"
  24395. },
  24396. {
  24397. "$ref": "#/components/schemas/ToolFileContent"
  24398. }
  24399. ]
  24400. }
  24401. },
  24402. "outputPaths": {
  24403. "type": "array",
  24404. "items": {
  24405. "type": "string"
  24406. }
  24407. },
  24408. "structured": {
  24409. "type": "object"
  24410. },
  24411. "result": {}
  24412. },
  24413. "required": ["status", "input", "content", "structured"],
  24414. "additionalProperties": false
  24415. },
  24416. "SessionMessageToolStateError": {
  24417. "type": "object",
  24418. "properties": {
  24419. "status": {
  24420. "type": "string",
  24421. "enum": ["error"]
  24422. },
  24423. "input": {
  24424. "type": "object"
  24425. },
  24426. "content": {
  24427. "type": "array",
  24428. "items": {
  24429. "anyOf": [
  24430. {
  24431. "$ref": "#/components/schemas/ToolTextContent"
  24432. },
  24433. {
  24434. "$ref": "#/components/schemas/ToolFileContent"
  24435. }
  24436. ]
  24437. }
  24438. },
  24439. "structured": {
  24440. "type": "object"
  24441. },
  24442. "error": {
  24443. "$ref": "#/components/schemas/SessionErrorUnknown"
  24444. },
  24445. "result": {}
  24446. },
  24447. "required": ["status", "input", "content", "structured", "error"],
  24448. "additionalProperties": false
  24449. },
  24450. "SessionMessageAssistantTool": {
  24451. "type": "object",
  24452. "properties": {
  24453. "type": {
  24454. "type": "string",
  24455. "enum": ["tool"]
  24456. },
  24457. "id": {
  24458. "type": "string"
  24459. },
  24460. "name": {
  24461. "type": "string"
  24462. },
  24463. "provider": {
  24464. "type": "object",
  24465. "properties": {
  24466. "executed": {
  24467. "type": "boolean"
  24468. },
  24469. "metadata": {
  24470. "type": "object",
  24471. "additionalProperties": {
  24472. "type": "object"
  24473. }
  24474. },
  24475. "resultMetadata": {
  24476. "type": "object",
  24477. "additionalProperties": {
  24478. "type": "object"
  24479. }
  24480. }
  24481. },
  24482. "required": ["executed"],
  24483. "additionalProperties": false
  24484. },
  24485. "state": {
  24486. "anyOf": [
  24487. {
  24488. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  24489. },
  24490. {
  24491. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  24492. },
  24493. {
  24494. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  24495. },
  24496. {
  24497. "$ref": "#/components/schemas/SessionMessageToolStateError"
  24498. }
  24499. ]
  24500. },
  24501. "time": {
  24502. "type": "object",
  24503. "properties": {
  24504. "created": {
  24505. "type": "number"
  24506. },
  24507. "ran": {
  24508. "type": "number"
  24509. },
  24510. "completed": {
  24511. "type": "number"
  24512. },
  24513. "pruned": {
  24514. "type": "number"
  24515. }
  24516. },
  24517. "required": ["created"],
  24518. "additionalProperties": false
  24519. }
  24520. },
  24521. "required": ["type", "id", "name", "state", "time"],
  24522. "additionalProperties": false
  24523. },
  24524. "SessionMessageAssistant": {
  24525. "type": "object",
  24526. "properties": {
  24527. "id": {
  24528. "type": "string",
  24529. "pattern": "^msg_"
  24530. },
  24531. "metadata": {
  24532. "type": "object"
  24533. },
  24534. "time": {
  24535. "type": "object",
  24536. "properties": {
  24537. "created": {
  24538. "type": "number"
  24539. },
  24540. "completed": {
  24541. "type": "number"
  24542. }
  24543. },
  24544. "required": ["created"],
  24545. "additionalProperties": false
  24546. },
  24547. "type": {
  24548. "type": "string",
  24549. "enum": ["assistant"]
  24550. },
  24551. "agent": {
  24552. "type": "string"
  24553. },
  24554. "model": {
  24555. "type": "object",
  24556. "properties": {
  24557. "id": {
  24558. "type": "string"
  24559. },
  24560. "providerID": {
  24561. "type": "string"
  24562. },
  24563. "variant": {
  24564. "type": "string"
  24565. }
  24566. },
  24567. "required": ["id", "providerID"],
  24568. "additionalProperties": false
  24569. },
  24570. "content": {
  24571. "type": "array",
  24572. "items": {
  24573. "anyOf": [
  24574. {
  24575. "$ref": "#/components/schemas/SessionMessageAssistantText"
  24576. },
  24577. {
  24578. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  24579. },
  24580. {
  24581. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  24582. }
  24583. ]
  24584. }
  24585. },
  24586. "snapshot": {
  24587. "type": "object",
  24588. "properties": {
  24589. "start": {
  24590. "type": "string"
  24591. },
  24592. "end": {
  24593. "type": "string"
  24594. }
  24595. },
  24596. "additionalProperties": false
  24597. },
  24598. "finish": {
  24599. "type": "string"
  24600. },
  24601. "cost": {
  24602. "type": "number"
  24603. },
  24604. "tokens": {
  24605. "type": "object",
  24606. "properties": {
  24607. "input": {
  24608. "type": "number"
  24609. },
  24610. "output": {
  24611. "type": "number"
  24612. },
  24613. "reasoning": {
  24614. "type": "number"
  24615. },
  24616. "cache": {
  24617. "type": "object",
  24618. "properties": {
  24619. "read": {
  24620. "type": "number"
  24621. },
  24622. "write": {
  24623. "type": "number"
  24624. }
  24625. },
  24626. "required": ["read", "write"],
  24627. "additionalProperties": false
  24628. }
  24629. },
  24630. "required": ["input", "output", "reasoning", "cache"],
  24631. "additionalProperties": false
  24632. },
  24633. "error": {
  24634. "$ref": "#/components/schemas/SessionErrorUnknown"
  24635. }
  24636. },
  24637. "required": ["id", "time", "type", "agent", "model", "content"],
  24638. "additionalProperties": false
  24639. },
  24640. "SessionMessageCompaction": {
  24641. "type": "object",
  24642. "properties": {
  24643. "type": {
  24644. "type": "string",
  24645. "enum": ["compaction"]
  24646. },
  24647. "reason": {
  24648. "type": "string",
  24649. "enum": ["auto", "manual"]
  24650. },
  24651. "summary": {
  24652. "type": "string"
  24653. },
  24654. "recent": {
  24655. "type": "string"
  24656. },
  24657. "id": {
  24658. "type": "string",
  24659. "pattern": "^msg_"
  24660. },
  24661. "metadata": {
  24662. "type": "object"
  24663. },
  24664. "time": {
  24665. "type": "object",
  24666. "properties": {
  24667. "created": {
  24668. "type": "number"
  24669. }
  24670. },
  24671. "required": ["created"],
  24672. "additionalProperties": false
  24673. }
  24674. },
  24675. "required": ["type", "reason", "summary", "recent", "id", "time"],
  24676. "additionalProperties": false
  24677. },
  24678. "SessionMessage": {
  24679. "anyOf": [
  24680. {
  24681. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  24682. },
  24683. {
  24684. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  24685. },
  24686. {
  24687. "$ref": "#/components/schemas/SessionMessageUser"
  24688. },
  24689. {
  24690. "$ref": "#/components/schemas/SessionMessageSynthetic"
  24691. },
  24692. {
  24693. "$ref": "#/components/schemas/SessionMessageSystem"
  24694. },
  24695. {
  24696. "$ref": "#/components/schemas/SessionMessageShell"
  24697. },
  24698. {
  24699. "$ref": "#/components/schemas/SessionMessageAssistant"
  24700. },
  24701. {
  24702. "$ref": "#/components/schemas/SessionMessageCompaction"
  24703. }
  24704. ]
  24705. },
  24706. "ProviderV2Info": {
  24707. "type": "object",
  24708. "properties": {
  24709. "id": {
  24710. "type": "string"
  24711. },
  24712. "name": {
  24713. "type": "string"
  24714. },
  24715. "enabled": {
  24716. "anyOf": [
  24717. {
  24718. "type": "boolean",
  24719. "enum": [false]
  24720. },
  24721. {
  24722. "type": "object",
  24723. "properties": {
  24724. "via": {
  24725. "type": "string",
  24726. "enum": ["env"]
  24727. },
  24728. "name": {
  24729. "type": "string"
  24730. }
  24731. },
  24732. "required": ["via", "name"],
  24733. "additionalProperties": false
  24734. },
  24735. {
  24736. "type": "object",
  24737. "properties": {
  24738. "via": {
  24739. "type": "string",
  24740. "enum": ["account"]
  24741. },
  24742. "service": {
  24743. "type": "string"
  24744. }
  24745. },
  24746. "required": ["via", "service"],
  24747. "additionalProperties": false
  24748. },
  24749. {
  24750. "type": "object",
  24751. "properties": {
  24752. "via": {
  24753. "type": "string",
  24754. "enum": ["custom"]
  24755. },
  24756. "data": {
  24757. "type": "object"
  24758. }
  24759. },
  24760. "required": ["via", "data"],
  24761. "additionalProperties": false
  24762. }
  24763. ]
  24764. },
  24765. "env": {
  24766. "type": "array",
  24767. "items": {
  24768. "type": "string"
  24769. }
  24770. },
  24771. "api": {
  24772. "anyOf": [
  24773. {
  24774. "type": "object",
  24775. "properties": {
  24776. "type": {
  24777. "type": "string",
  24778. "enum": ["aisdk"]
  24779. },
  24780. "package": {
  24781. "type": "string"
  24782. },
  24783. "url": {
  24784. "type": "string"
  24785. },
  24786. "settings": {
  24787. "type": "object"
  24788. }
  24789. },
  24790. "required": ["type", "package"],
  24791. "additionalProperties": false
  24792. },
  24793. {
  24794. "type": "object",
  24795. "properties": {
  24796. "type": {
  24797. "type": "string",
  24798. "enum": ["native"]
  24799. },
  24800. "url": {
  24801. "type": "string"
  24802. },
  24803. "settings": {
  24804. "type": "object"
  24805. }
  24806. },
  24807. "required": ["type", "settings"],
  24808. "additionalProperties": false
  24809. }
  24810. ]
  24811. },
  24812. "request": {
  24813. "type": "object",
  24814. "properties": {
  24815. "headers": {
  24816. "type": "object",
  24817. "additionalProperties": {
  24818. "type": "string"
  24819. }
  24820. },
  24821. "body": {
  24822. "type": "object"
  24823. }
  24824. },
  24825. "required": ["headers", "body"],
  24826. "additionalProperties": false
  24827. }
  24828. },
  24829. "required": ["id", "name", "enabled", "env", "api", "request"],
  24830. "additionalProperties": false
  24831. },
  24832. "PermissionV2Request": {
  24833. "type": "object",
  24834. "properties": {
  24835. "id": {
  24836. "type": "string",
  24837. "pattern": "^per"
  24838. },
  24839. "sessionID": {
  24840. "type": "string",
  24841. "pattern": "^ses"
  24842. },
  24843. "action": {
  24844. "type": "string"
  24845. },
  24846. "resources": {
  24847. "type": "array",
  24848. "items": {
  24849. "type": "string"
  24850. }
  24851. },
  24852. "save": {
  24853. "type": "array",
  24854. "items": {
  24855. "type": "string"
  24856. }
  24857. },
  24858. "metadata": {
  24859. "type": "object"
  24860. },
  24861. "source": {
  24862. "$ref": "#/components/schemas/PermissionV2Source"
  24863. }
  24864. },
  24865. "required": ["id", "sessionID", "action", "resources"],
  24866. "additionalProperties": false
  24867. },
  24868. "PermissionSavedInfo": {
  24869. "type": "object",
  24870. "properties": {
  24871. "id": {
  24872. "type": "string"
  24873. },
  24874. "projectID": {
  24875. "type": "string"
  24876. },
  24877. "action": {
  24878. "type": "string"
  24879. },
  24880. "resource": {
  24881. "type": "string"
  24882. }
  24883. },
  24884. "required": ["id", "projectID", "action", "resource"],
  24885. "additionalProperties": false
  24886. },
  24887. "FileSystemTextContent": {
  24888. "type": "object",
  24889. "properties": {
  24890. "type": {
  24891. "type": "string",
  24892. "enum": ["text"]
  24893. },
  24894. "content": {
  24895. "type": "string"
  24896. },
  24897. "mime": {
  24898. "type": "string"
  24899. }
  24900. },
  24901. "required": ["type", "content", "mime"],
  24902. "additionalProperties": false
  24903. },
  24904. "FileSystemBinaryContent": {
  24905. "type": "object",
  24906. "properties": {
  24907. "type": {
  24908. "type": "string",
  24909. "enum": ["binary"]
  24910. },
  24911. "content": {
  24912. "type": "string"
  24913. },
  24914. "encoding": {
  24915. "type": "string",
  24916. "enum": ["base64"]
  24917. },
  24918. "mime": {
  24919. "type": "string"
  24920. }
  24921. },
  24922. "required": ["type", "content", "encoding", "mime"],
  24923. "additionalProperties": false
  24924. },
  24925. "FileSystemEntry": {
  24926. "type": "object",
  24927. "properties": {
  24928. "path": {
  24929. "type": "string"
  24930. },
  24931. "uri": {
  24932. "type": "string"
  24933. },
  24934. "type": {
  24935. "type": "string",
  24936. "enum": ["file", "directory"]
  24937. },
  24938. "mime": {
  24939. "type": "string"
  24940. }
  24941. },
  24942. "required": ["path", "uri", "type", "mime"],
  24943. "additionalProperties": false
  24944. },
  24945. "CommandV2Info": {
  24946. "type": "object",
  24947. "properties": {
  24948. "name": {
  24949. "type": "string"
  24950. },
  24951. "template": {
  24952. "type": "string"
  24953. },
  24954. "description": {
  24955. "type": "string"
  24956. },
  24957. "agent": {
  24958. "type": "string"
  24959. },
  24960. "model": {
  24961. "type": "object",
  24962. "properties": {
  24963. "id": {
  24964. "type": "string"
  24965. },
  24966. "providerID": {
  24967. "type": "string"
  24968. },
  24969. "variant": {
  24970. "type": "string"
  24971. }
  24972. },
  24973. "required": ["id", "providerID"],
  24974. "additionalProperties": false
  24975. },
  24976. "subtask": {
  24977. "type": "boolean"
  24978. }
  24979. },
  24980. "required": ["name", "template"],
  24981. "additionalProperties": false
  24982. },
  24983. "SkillV2Info": {
  24984. "type": "object",
  24985. "properties": {
  24986. "name": {
  24987. "type": "string"
  24988. },
  24989. "description": {
  24990. "type": "string"
  24991. },
  24992. "slash": {
  24993. "type": "boolean"
  24994. },
  24995. "location": {
  24996. "type": "string"
  24997. },
  24998. "content": {
  24999. "type": "string"
  25000. }
  25001. },
  25002. "required": ["name", "location", "content"],
  25003. "additionalProperties": false
  25004. },
  25005. "QuestionV2Request": {
  25006. "type": "object",
  25007. "properties": {
  25008. "id": {
  25009. "type": "string",
  25010. "pattern": "^que"
  25011. },
  25012. "sessionID": {
  25013. "type": "string",
  25014. "pattern": "^ses"
  25015. },
  25016. "questions": {
  25017. "type": "array",
  25018. "items": {
  25019. "$ref": "#/components/schemas/QuestionV2Info"
  25020. },
  25021. "description": "Questions to ask"
  25022. },
  25023. "tool": {
  25024. "$ref": "#/components/schemas/QuestionV2Tool"
  25025. }
  25026. },
  25027. "required": ["id", "sessionID", "questions"],
  25028. "additionalProperties": false
  25029. },
  25030. "QuestionV2Reply": {
  25031. "type": "object",
  25032. "properties": {
  25033. "answers": {
  25034. "type": "array",
  25035. "items": {
  25036. "$ref": "#/components/schemas/QuestionV2Answer"
  25037. },
  25038. "description": "User answers in order of questions (each answer is an array of selected labels)"
  25039. }
  25040. },
  25041. "required": ["answers"],
  25042. "additionalProperties": false
  25043. },
  25044. "EventModels-devRefreshed": {
  25045. "type": "object",
  25046. "properties": {
  25047. "id": {
  25048. "type": "string",
  25049. "pattern": "^evt_"
  25050. },
  25051. "type": {
  25052. "type": "string",
  25053. "enum": ["models-dev.refreshed"]
  25054. },
  25055. "properties": {
  25056. "type": "object",
  25057. "properties": {}
  25058. }
  25059. },
  25060. "required": ["id", "type", "properties"],
  25061. "additionalProperties": false
  25062. },
  25063. "EventPluginAdded": {
  25064. "type": "object",
  25065. "properties": {
  25066. "id": {
  25067. "type": "string",
  25068. "pattern": "^evt_"
  25069. },
  25070. "type": {
  25071. "type": "string",
  25072. "enum": ["plugin.added"]
  25073. },
  25074. "properties": {
  25075. "type": "object",
  25076. "properties": {
  25077. "id": {
  25078. "type": "string"
  25079. }
  25080. },
  25081. "required": ["id"],
  25082. "additionalProperties": false
  25083. }
  25084. },
  25085. "required": ["id", "type", "properties"],
  25086. "additionalProperties": false
  25087. },
  25088. "ModelV2Info1": {
  25089. "type": "object",
  25090. "properties": {
  25091. "id": {
  25092. "type": "string"
  25093. },
  25094. "providerID": {
  25095. "type": "string"
  25096. },
  25097. "family": {
  25098. "type": "string"
  25099. },
  25100. "name": {
  25101. "type": "string"
  25102. },
  25103. "api": {
  25104. "anyOf": [
  25105. {
  25106. "type": "object",
  25107. "properties": {
  25108. "id": {
  25109. "type": "string"
  25110. },
  25111. "type": {
  25112. "type": "string",
  25113. "enum": ["aisdk"]
  25114. },
  25115. "package": {
  25116. "type": "string"
  25117. },
  25118. "url": {
  25119. "type": "string"
  25120. },
  25121. "settings": {
  25122. "type": "object"
  25123. }
  25124. },
  25125. "required": ["id", "type", "package"],
  25126. "additionalProperties": false
  25127. },
  25128. {
  25129. "type": "object",
  25130. "properties": {
  25131. "id": {
  25132. "type": "string"
  25133. },
  25134. "type": {
  25135. "type": "string",
  25136. "enum": ["native"]
  25137. },
  25138. "url": {
  25139. "type": "string"
  25140. },
  25141. "settings": {
  25142. "type": "object"
  25143. }
  25144. },
  25145. "required": ["id", "type", "settings"],
  25146. "additionalProperties": false
  25147. }
  25148. ]
  25149. },
  25150. "capabilities": {
  25151. "type": "object",
  25152. "properties": {
  25153. "tools": {
  25154. "type": "boolean"
  25155. },
  25156. "input": {
  25157. "type": "array",
  25158. "items": {
  25159. "type": "string"
  25160. }
  25161. },
  25162. "output": {
  25163. "type": "array",
  25164. "items": {
  25165. "type": "string"
  25166. }
  25167. }
  25168. },
  25169. "required": ["tools", "input", "output"],
  25170. "additionalProperties": false
  25171. },
  25172. "request": {
  25173. "type": "object",
  25174. "properties": {
  25175. "headers": {
  25176. "type": "object",
  25177. "additionalProperties": {
  25178. "type": "string"
  25179. }
  25180. },
  25181. "body": {
  25182. "type": "object"
  25183. },
  25184. "generation": {
  25185. "type": "object",
  25186. "properties": {
  25187. "maxTokens": {
  25188. "anyOf": [
  25189. {
  25190. "type": "number"
  25191. },
  25192. {
  25193. "type": "string",
  25194. "enum": ["NaN"]
  25195. },
  25196. {
  25197. "type": "string",
  25198. "enum": ["Infinity"]
  25199. },
  25200. {
  25201. "type": "string",
  25202. "enum": ["-Infinity"]
  25203. }
  25204. ]
  25205. },
  25206. "temperature": {
  25207. "anyOf": [
  25208. {
  25209. "type": "number"
  25210. },
  25211. {
  25212. "type": "string",
  25213. "enum": ["NaN"]
  25214. },
  25215. {
  25216. "type": "string",
  25217. "enum": ["Infinity"]
  25218. },
  25219. {
  25220. "type": "string",
  25221. "enum": ["-Infinity"]
  25222. }
  25223. ]
  25224. },
  25225. "topP": {
  25226. "anyOf": [
  25227. {
  25228. "type": "number"
  25229. },
  25230. {
  25231. "type": "string",
  25232. "enum": ["NaN"]
  25233. },
  25234. {
  25235. "type": "string",
  25236. "enum": ["Infinity"]
  25237. },
  25238. {
  25239. "type": "string",
  25240. "enum": ["-Infinity"]
  25241. }
  25242. ]
  25243. },
  25244. "topK": {
  25245. "anyOf": [
  25246. {
  25247. "type": "number"
  25248. },
  25249. {
  25250. "type": "string",
  25251. "enum": ["NaN"]
  25252. },
  25253. {
  25254. "type": "string",
  25255. "enum": ["Infinity"]
  25256. },
  25257. {
  25258. "type": "string",
  25259. "enum": ["-Infinity"]
  25260. }
  25261. ]
  25262. },
  25263. "frequencyPenalty": {
  25264. "anyOf": [
  25265. {
  25266. "type": "number"
  25267. },
  25268. {
  25269. "type": "string",
  25270. "enum": ["NaN"]
  25271. },
  25272. {
  25273. "type": "string",
  25274. "enum": ["Infinity"]
  25275. },
  25276. {
  25277. "type": "string",
  25278. "enum": ["-Infinity"]
  25279. }
  25280. ]
  25281. },
  25282. "presencePenalty": {
  25283. "anyOf": [
  25284. {
  25285. "type": "number"
  25286. },
  25287. {
  25288. "type": "string",
  25289. "enum": ["NaN"]
  25290. },
  25291. {
  25292. "type": "string",
  25293. "enum": ["Infinity"]
  25294. },
  25295. {
  25296. "type": "string",
  25297. "enum": ["-Infinity"]
  25298. }
  25299. ]
  25300. },
  25301. "seed": {
  25302. "anyOf": [
  25303. {
  25304. "type": "number"
  25305. },
  25306. {
  25307. "type": "string",
  25308. "enum": ["NaN"]
  25309. },
  25310. {
  25311. "type": "string",
  25312. "enum": ["Infinity"]
  25313. },
  25314. {
  25315. "type": "string",
  25316. "enum": ["-Infinity"]
  25317. }
  25318. ]
  25319. },
  25320. "stop": {
  25321. "type": "array",
  25322. "items": {
  25323. "type": "string"
  25324. }
  25325. }
  25326. },
  25327. "additionalProperties": false
  25328. },
  25329. "options": {
  25330. "type": "object"
  25331. },
  25332. "variant": {
  25333. "type": "string"
  25334. }
  25335. },
  25336. "required": ["headers", "body"],
  25337. "additionalProperties": false
  25338. },
  25339. "variants": {
  25340. "type": "array",
  25341. "items": {
  25342. "type": "object",
  25343. "properties": {
  25344. "id": {
  25345. "type": "string"
  25346. },
  25347. "headers": {
  25348. "type": "object",
  25349. "additionalProperties": {
  25350. "type": "string"
  25351. }
  25352. },
  25353. "body": {
  25354. "type": "object"
  25355. },
  25356. "generation": {
  25357. "type": "object",
  25358. "properties": {
  25359. "maxTokens": {
  25360. "anyOf": [
  25361. {
  25362. "type": "number"
  25363. },
  25364. {
  25365. "type": "string",
  25366. "enum": ["NaN"]
  25367. },
  25368. {
  25369. "type": "string",
  25370. "enum": ["Infinity"]
  25371. },
  25372. {
  25373. "type": "string",
  25374. "enum": ["-Infinity"]
  25375. }
  25376. ]
  25377. },
  25378. "temperature": {
  25379. "anyOf": [
  25380. {
  25381. "type": "number"
  25382. },
  25383. {
  25384. "type": "string",
  25385. "enum": ["NaN"]
  25386. },
  25387. {
  25388. "type": "string",
  25389. "enum": ["Infinity"]
  25390. },
  25391. {
  25392. "type": "string",
  25393. "enum": ["-Infinity"]
  25394. }
  25395. ]
  25396. },
  25397. "topP": {
  25398. "anyOf": [
  25399. {
  25400. "type": "number"
  25401. },
  25402. {
  25403. "type": "string",
  25404. "enum": ["NaN"]
  25405. },
  25406. {
  25407. "type": "string",
  25408. "enum": ["Infinity"]
  25409. },
  25410. {
  25411. "type": "string",
  25412. "enum": ["-Infinity"]
  25413. }
  25414. ]
  25415. },
  25416. "topK": {
  25417. "anyOf": [
  25418. {
  25419. "type": "number"
  25420. },
  25421. {
  25422. "type": "string",
  25423. "enum": ["NaN"]
  25424. },
  25425. {
  25426. "type": "string",
  25427. "enum": ["Infinity"]
  25428. },
  25429. {
  25430. "type": "string",
  25431. "enum": ["-Infinity"]
  25432. }
  25433. ]
  25434. },
  25435. "frequencyPenalty": {
  25436. "anyOf": [
  25437. {
  25438. "type": "number"
  25439. },
  25440. {
  25441. "type": "string",
  25442. "enum": ["NaN"]
  25443. },
  25444. {
  25445. "type": "string",
  25446. "enum": ["Infinity"]
  25447. },
  25448. {
  25449. "type": "string",
  25450. "enum": ["-Infinity"]
  25451. }
  25452. ]
  25453. },
  25454. "presencePenalty": {
  25455. "anyOf": [
  25456. {
  25457. "type": "number"
  25458. },
  25459. {
  25460. "type": "string",
  25461. "enum": ["NaN"]
  25462. },
  25463. {
  25464. "type": "string",
  25465. "enum": ["Infinity"]
  25466. },
  25467. {
  25468. "type": "string",
  25469. "enum": ["-Infinity"]
  25470. }
  25471. ]
  25472. },
  25473. "seed": {
  25474. "anyOf": [
  25475. {
  25476. "type": "number"
  25477. },
  25478. {
  25479. "type": "string",
  25480. "enum": ["NaN"]
  25481. },
  25482. {
  25483. "type": "string",
  25484. "enum": ["Infinity"]
  25485. },
  25486. {
  25487. "type": "string",
  25488. "enum": ["-Infinity"]
  25489. }
  25490. ]
  25491. },
  25492. "stop": {
  25493. "type": "array",
  25494. "items": {
  25495. "type": "string"
  25496. }
  25497. }
  25498. },
  25499. "additionalProperties": false
  25500. },
  25501. "options": {
  25502. "type": "object"
  25503. }
  25504. },
  25505. "required": ["id", "headers", "body"],
  25506. "additionalProperties": false
  25507. }
  25508. },
  25509. "time": {
  25510. "type": "object",
  25511. "properties": {
  25512. "released": {
  25513. "anyOf": [
  25514. {
  25515. "type": "number"
  25516. },
  25517. {
  25518. "type": "string",
  25519. "enum": ["NaN"]
  25520. },
  25521. {
  25522. "type": "string",
  25523. "enum": ["Infinity"]
  25524. },
  25525. {
  25526. "type": "string",
  25527. "enum": ["-Infinity"]
  25528. }
  25529. ]
  25530. }
  25531. },
  25532. "required": ["released"],
  25533. "additionalProperties": false
  25534. },
  25535. "cost": {
  25536. "type": "array",
  25537. "items": {
  25538. "type": "object",
  25539. "properties": {
  25540. "tier": {
  25541. "type": "object",
  25542. "properties": {
  25543. "type": {
  25544. "type": "string",
  25545. "enum": ["context"]
  25546. },
  25547. "size": {
  25548. "type": "integer"
  25549. }
  25550. },
  25551. "required": ["type", "size"],
  25552. "additionalProperties": false
  25553. },
  25554. "input": {
  25555. "type": "number"
  25556. },
  25557. "output": {
  25558. "type": "number"
  25559. },
  25560. "cache": {
  25561. "type": "object",
  25562. "properties": {
  25563. "read": {
  25564. "type": "number"
  25565. },
  25566. "write": {
  25567. "type": "number"
  25568. }
  25569. },
  25570. "required": ["read", "write"],
  25571. "additionalProperties": false
  25572. }
  25573. },
  25574. "required": ["input", "output", "cache"],
  25575. "additionalProperties": false
  25576. }
  25577. },
  25578. "status": {
  25579. "type": "string",
  25580. "enum": ["alpha", "beta", "deprecated", "active"]
  25581. },
  25582. "enabled": {
  25583. "type": "boolean"
  25584. },
  25585. "limit": {
  25586. "type": "object",
  25587. "properties": {
  25588. "context": {
  25589. "type": "integer"
  25590. },
  25591. "input": {
  25592. "type": "integer"
  25593. },
  25594. "output": {
  25595. "type": "integer"
  25596. }
  25597. },
  25598. "required": ["context", "output"],
  25599. "additionalProperties": false
  25600. }
  25601. },
  25602. "required": [
  25603. "id",
  25604. "providerID",
  25605. "name",
  25606. "api",
  25607. "capabilities",
  25608. "request",
  25609. "variants",
  25610. "time",
  25611. "cost",
  25612. "status",
  25613. "enabled",
  25614. "limit"
  25615. ],
  25616. "additionalProperties": false
  25617. },
  25618. "EventCatalogModelUpdated": {
  25619. "type": "object",
  25620. "properties": {
  25621. "id": {
  25622. "type": "string",
  25623. "pattern": "^evt_"
  25624. },
  25625. "type": {
  25626. "type": "string",
  25627. "enum": ["catalog.model.updated"]
  25628. },
  25629. "properties": {
  25630. "type": "object",
  25631. "properties": {
  25632. "model": {
  25633. "$ref": "#/components/schemas/ModelV2Info1"
  25634. }
  25635. },
  25636. "required": ["model"],
  25637. "additionalProperties": false
  25638. }
  25639. },
  25640. "required": ["id", "type", "properties"],
  25641. "additionalProperties": false
  25642. },
  25643. "EventSessionCreated": {
  25644. "type": "object",
  25645. "properties": {
  25646. "id": {
  25647. "type": "string",
  25648. "pattern": "^evt_"
  25649. },
  25650. "type": {
  25651. "type": "string",
  25652. "enum": ["session.created"]
  25653. },
  25654. "properties": {
  25655. "type": "object",
  25656. "properties": {
  25657. "sessionID": {
  25658. "type": "string",
  25659. "pattern": "^ses"
  25660. },
  25661. "info": {
  25662. "$ref": "#/components/schemas/Session"
  25663. }
  25664. },
  25665. "required": ["sessionID", "info"],
  25666. "additionalProperties": false
  25667. }
  25668. },
  25669. "required": ["id", "type", "properties"],
  25670. "additionalProperties": false
  25671. },
  25672. "EventSessionUpdated": {
  25673. "type": "object",
  25674. "properties": {
  25675. "id": {
  25676. "type": "string",
  25677. "pattern": "^evt_"
  25678. },
  25679. "type": {
  25680. "type": "string",
  25681. "enum": ["session.updated"]
  25682. },
  25683. "properties": {
  25684. "type": "object",
  25685. "properties": {
  25686. "sessionID": {
  25687. "type": "string",
  25688. "pattern": "^ses"
  25689. },
  25690. "info": {
  25691. "$ref": "#/components/schemas/Session"
  25692. }
  25693. },
  25694. "required": ["sessionID", "info"],
  25695. "additionalProperties": false
  25696. }
  25697. },
  25698. "required": ["id", "type", "properties"],
  25699. "additionalProperties": false
  25700. },
  25701. "EventSessionDeleted": {
  25702. "type": "object",
  25703. "properties": {
  25704. "id": {
  25705. "type": "string",
  25706. "pattern": "^evt_"
  25707. },
  25708. "type": {
  25709. "type": "string",
  25710. "enum": ["session.deleted"]
  25711. },
  25712. "properties": {
  25713. "type": "object",
  25714. "properties": {
  25715. "sessionID": {
  25716. "type": "string",
  25717. "pattern": "^ses"
  25718. },
  25719. "info": {
  25720. "$ref": "#/components/schemas/Session"
  25721. }
  25722. },
  25723. "required": ["sessionID", "info"],
  25724. "additionalProperties": false
  25725. }
  25726. },
  25727. "required": ["id", "type", "properties"],
  25728. "additionalProperties": false
  25729. },
  25730. "EventMessageUpdated": {
  25731. "type": "object",
  25732. "properties": {
  25733. "id": {
  25734. "type": "string",
  25735. "pattern": "^evt_"
  25736. },
  25737. "type": {
  25738. "type": "string",
  25739. "enum": ["message.updated"]
  25740. },
  25741. "properties": {
  25742. "type": "object",
  25743. "properties": {
  25744. "sessionID": {
  25745. "type": "string",
  25746. "pattern": "^ses"
  25747. },
  25748. "info": {
  25749. "$ref": "#/components/schemas/Message"
  25750. }
  25751. },
  25752. "required": ["sessionID", "info"],
  25753. "additionalProperties": false
  25754. }
  25755. },
  25756. "required": ["id", "type", "properties"],
  25757. "additionalProperties": false
  25758. },
  25759. "EventMessageRemoved": {
  25760. "type": "object",
  25761. "properties": {
  25762. "id": {
  25763. "type": "string",
  25764. "pattern": "^evt_"
  25765. },
  25766. "type": {
  25767. "type": "string",
  25768. "enum": ["message.removed"]
  25769. },
  25770. "properties": {
  25771. "type": "object",
  25772. "properties": {
  25773. "sessionID": {
  25774. "type": "string",
  25775. "pattern": "^ses"
  25776. },
  25777. "messageID": {
  25778. "type": "string",
  25779. "pattern": "^msg"
  25780. }
  25781. },
  25782. "required": ["sessionID", "messageID"],
  25783. "additionalProperties": false
  25784. }
  25785. },
  25786. "required": ["id", "type", "properties"],
  25787. "additionalProperties": false
  25788. },
  25789. "EventMessagePartUpdated": {
  25790. "type": "object",
  25791. "properties": {
  25792. "id": {
  25793. "type": "string",
  25794. "pattern": "^evt_"
  25795. },
  25796. "type": {
  25797. "type": "string",
  25798. "enum": ["message.part.updated"]
  25799. },
  25800. "properties": {
  25801. "type": "object",
  25802. "properties": {
  25803. "sessionID": {
  25804. "type": "string",
  25805. "pattern": "^ses"
  25806. },
  25807. "part": {
  25808. "$ref": "#/components/schemas/Part"
  25809. },
  25810. "time": {
  25811. "type": "number"
  25812. }
  25813. },
  25814. "required": ["sessionID", "part", "time"],
  25815. "additionalProperties": false
  25816. }
  25817. },
  25818. "required": ["id", "type", "properties"],
  25819. "additionalProperties": false
  25820. },
  25821. "EventMessagePartRemoved": {
  25822. "type": "object",
  25823. "properties": {
  25824. "id": {
  25825. "type": "string",
  25826. "pattern": "^evt_"
  25827. },
  25828. "type": {
  25829. "type": "string",
  25830. "enum": ["message.part.removed"]
  25831. },
  25832. "properties": {
  25833. "type": "object",
  25834. "properties": {
  25835. "sessionID": {
  25836. "type": "string",
  25837. "pattern": "^ses"
  25838. },
  25839. "messageID": {
  25840. "type": "string",
  25841. "pattern": "^msg"
  25842. },
  25843. "partID": {
  25844. "type": "string",
  25845. "pattern": "^prt"
  25846. }
  25847. },
  25848. "required": ["sessionID", "messageID", "partID"],
  25849. "additionalProperties": false
  25850. }
  25851. },
  25852. "required": ["id", "type", "properties"],
  25853. "additionalProperties": false
  25854. },
  25855. "EventSessionNextAgentSwitched": {
  25856. "type": "object",
  25857. "properties": {
  25858. "id": {
  25859. "type": "string",
  25860. "pattern": "^evt_"
  25861. },
  25862. "type": {
  25863. "type": "string",
  25864. "enum": ["session.next.agent.switched"]
  25865. },
  25866. "properties": {
  25867. "type": "object",
  25868. "properties": {
  25869. "timestamp": {
  25870. "type": "number"
  25871. },
  25872. "sessionID": {
  25873. "type": "string",
  25874. "pattern": "^ses"
  25875. },
  25876. "messageID": {
  25877. "type": "string",
  25878. "pattern": "^msg_"
  25879. },
  25880. "agent": {
  25881. "type": "string"
  25882. }
  25883. },
  25884. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25885. "additionalProperties": false
  25886. }
  25887. },
  25888. "required": ["id", "type", "properties"],
  25889. "additionalProperties": false
  25890. },
  25891. "EventSessionNextModelSwitched": {
  25892. "type": "object",
  25893. "properties": {
  25894. "id": {
  25895. "type": "string",
  25896. "pattern": "^evt_"
  25897. },
  25898. "type": {
  25899. "type": "string",
  25900. "enum": ["session.next.model.switched"]
  25901. },
  25902. "properties": {
  25903. "type": "object",
  25904. "properties": {
  25905. "timestamp": {
  25906. "type": "number"
  25907. },
  25908. "sessionID": {
  25909. "type": "string",
  25910. "pattern": "^ses"
  25911. },
  25912. "messageID": {
  25913. "type": "string",
  25914. "pattern": "^msg_"
  25915. },
  25916. "model": {
  25917. "type": "object",
  25918. "properties": {
  25919. "id": {
  25920. "type": "string"
  25921. },
  25922. "providerID": {
  25923. "type": "string"
  25924. },
  25925. "variant": {
  25926. "type": "string"
  25927. }
  25928. },
  25929. "required": ["id", "providerID"],
  25930. "additionalProperties": false
  25931. }
  25932. },
  25933. "required": ["timestamp", "sessionID", "messageID", "model"],
  25934. "additionalProperties": false
  25935. }
  25936. },
  25937. "required": ["id", "type", "properties"],
  25938. "additionalProperties": false
  25939. },
  25940. "EventSessionNextMoved": {
  25941. "type": "object",
  25942. "properties": {
  25943. "id": {
  25944. "type": "string",
  25945. "pattern": "^evt_"
  25946. },
  25947. "type": {
  25948. "type": "string",
  25949. "enum": ["session.next.moved"]
  25950. },
  25951. "properties": {
  25952. "type": "object",
  25953. "properties": {
  25954. "timestamp": {
  25955. "type": "number"
  25956. },
  25957. "sessionID": {
  25958. "type": "string",
  25959. "pattern": "^ses"
  25960. },
  25961. "location": {
  25962. "$ref": "#/components/schemas/LocationRef"
  25963. },
  25964. "subdirectory": {
  25965. "type": "string"
  25966. }
  25967. },
  25968. "required": ["timestamp", "sessionID", "location"],
  25969. "additionalProperties": false
  25970. }
  25971. },
  25972. "required": ["id", "type", "properties"],
  25973. "additionalProperties": false
  25974. },
  25975. "EventSessionNextPrompted": {
  25976. "type": "object",
  25977. "properties": {
  25978. "id": {
  25979. "type": "string",
  25980. "pattern": "^evt_"
  25981. },
  25982. "type": {
  25983. "type": "string",
  25984. "enum": ["session.next.prompted"]
  25985. },
  25986. "properties": {
  25987. "type": "object",
  25988. "properties": {
  25989. "timestamp": {
  25990. "type": "number"
  25991. },
  25992. "sessionID": {
  25993. "type": "string",
  25994. "pattern": "^ses"
  25995. },
  25996. "messageID": {
  25997. "type": "string",
  25998. "pattern": "^msg_"
  25999. },
  26000. "prompt": {
  26001. "$ref": "#/components/schemas/Prompt"
  26002. },
  26003. "delivery": {
  26004. "type": "string",
  26005. "enum": ["steer", "queue"]
  26006. }
  26007. },
  26008. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26009. "additionalProperties": false
  26010. }
  26011. },
  26012. "required": ["id", "type", "properties"],
  26013. "additionalProperties": false
  26014. },
  26015. "EventSessionNextPromptAdmitted": {
  26016. "type": "object",
  26017. "properties": {
  26018. "id": {
  26019. "type": "string",
  26020. "pattern": "^evt_"
  26021. },
  26022. "type": {
  26023. "type": "string",
  26024. "enum": ["session.next.prompt.admitted"]
  26025. },
  26026. "properties": {
  26027. "type": "object",
  26028. "properties": {
  26029. "timestamp": {
  26030. "type": "number"
  26031. },
  26032. "sessionID": {
  26033. "type": "string",
  26034. "pattern": "^ses"
  26035. },
  26036. "messageID": {
  26037. "type": "string",
  26038. "pattern": "^msg_"
  26039. },
  26040. "prompt": {
  26041. "$ref": "#/components/schemas/Prompt"
  26042. },
  26043. "delivery": {
  26044. "type": "string",
  26045. "enum": ["steer", "queue"]
  26046. }
  26047. },
  26048. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26049. "additionalProperties": false
  26050. }
  26051. },
  26052. "required": ["id", "type", "properties"],
  26053. "additionalProperties": false
  26054. },
  26055. "EventSessionNextPromptPromoted": {
  26056. "type": "object",
  26057. "properties": {
  26058. "id": {
  26059. "type": "string",
  26060. "pattern": "^evt_"
  26061. },
  26062. "type": {
  26063. "type": "string",
  26064. "enum": ["session.next.prompt.promoted"]
  26065. },
  26066. "properties": {
  26067. "type": "object",
  26068. "properties": {
  26069. "timestamp": {
  26070. "type": "number"
  26071. },
  26072. "sessionID": {
  26073. "type": "string",
  26074. "pattern": "^ses"
  26075. },
  26076. "messageID": {
  26077. "type": "string",
  26078. "pattern": "^msg_"
  26079. },
  26080. "prompt": {
  26081. "$ref": "#/components/schemas/Prompt"
  26082. },
  26083. "timeCreated": {
  26084. "type": "number"
  26085. }
  26086. },
  26087. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  26088. "additionalProperties": false
  26089. }
  26090. },
  26091. "required": ["id", "type", "properties"],
  26092. "additionalProperties": false
  26093. },
  26094. "EventSessionNextInterruptRequested": {
  26095. "type": "object",
  26096. "properties": {
  26097. "id": {
  26098. "type": "string",
  26099. "pattern": "^evt_"
  26100. },
  26101. "type": {
  26102. "type": "string",
  26103. "enum": ["session.next.interrupt.requested"]
  26104. },
  26105. "properties": {
  26106. "type": "object",
  26107. "properties": {
  26108. "timestamp": {
  26109. "type": "number"
  26110. },
  26111. "sessionID": {
  26112. "type": "string",
  26113. "pattern": "^ses"
  26114. }
  26115. },
  26116. "required": ["timestamp", "sessionID"],
  26117. "additionalProperties": false
  26118. }
  26119. },
  26120. "required": ["id", "type", "properties"],
  26121. "additionalProperties": false
  26122. },
  26123. "EventSessionNextContextUpdated": {
  26124. "type": "object",
  26125. "properties": {
  26126. "id": {
  26127. "type": "string",
  26128. "pattern": "^evt_"
  26129. },
  26130. "type": {
  26131. "type": "string",
  26132. "enum": ["session.next.context.updated"]
  26133. },
  26134. "properties": {
  26135. "type": "object",
  26136. "properties": {
  26137. "timestamp": {
  26138. "type": "number"
  26139. },
  26140. "sessionID": {
  26141. "type": "string",
  26142. "pattern": "^ses"
  26143. },
  26144. "messageID": {
  26145. "type": "string",
  26146. "pattern": "^msg_"
  26147. },
  26148. "text": {
  26149. "type": "string"
  26150. }
  26151. },
  26152. "required": ["timestamp", "sessionID", "messageID", "text"],
  26153. "additionalProperties": false
  26154. }
  26155. },
  26156. "required": ["id", "type", "properties"],
  26157. "additionalProperties": false
  26158. },
  26159. "EventSessionNextSynthetic": {
  26160. "type": "object",
  26161. "properties": {
  26162. "id": {
  26163. "type": "string",
  26164. "pattern": "^evt_"
  26165. },
  26166. "type": {
  26167. "type": "string",
  26168. "enum": ["session.next.synthetic"]
  26169. },
  26170. "properties": {
  26171. "type": "object",
  26172. "properties": {
  26173. "timestamp": {
  26174. "type": "number"
  26175. },
  26176. "sessionID": {
  26177. "type": "string",
  26178. "pattern": "^ses"
  26179. },
  26180. "messageID": {
  26181. "type": "string",
  26182. "pattern": "^msg_"
  26183. },
  26184. "text": {
  26185. "type": "string"
  26186. }
  26187. },
  26188. "required": ["timestamp", "sessionID", "messageID", "text"],
  26189. "additionalProperties": false
  26190. }
  26191. },
  26192. "required": ["id", "type", "properties"],
  26193. "additionalProperties": false
  26194. },
  26195. "EventSessionNextShellStarted": {
  26196. "type": "object",
  26197. "properties": {
  26198. "id": {
  26199. "type": "string",
  26200. "pattern": "^evt_"
  26201. },
  26202. "type": {
  26203. "type": "string",
  26204. "enum": ["session.next.shell.started"]
  26205. },
  26206. "properties": {
  26207. "type": "object",
  26208. "properties": {
  26209. "timestamp": {
  26210. "type": "number"
  26211. },
  26212. "sessionID": {
  26213. "type": "string",
  26214. "pattern": "^ses"
  26215. },
  26216. "messageID": {
  26217. "type": "string",
  26218. "pattern": "^msg_"
  26219. },
  26220. "callID": {
  26221. "type": "string"
  26222. },
  26223. "command": {
  26224. "type": "string"
  26225. }
  26226. },
  26227. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  26228. "additionalProperties": false
  26229. }
  26230. },
  26231. "required": ["id", "type", "properties"],
  26232. "additionalProperties": false
  26233. },
  26234. "EventSessionNextShellEnded": {
  26235. "type": "object",
  26236. "properties": {
  26237. "id": {
  26238. "type": "string",
  26239. "pattern": "^evt_"
  26240. },
  26241. "type": {
  26242. "type": "string",
  26243. "enum": ["session.next.shell.ended"]
  26244. },
  26245. "properties": {
  26246. "type": "object",
  26247. "properties": {
  26248. "timestamp": {
  26249. "type": "number"
  26250. },
  26251. "sessionID": {
  26252. "type": "string",
  26253. "pattern": "^ses"
  26254. },
  26255. "callID": {
  26256. "type": "string"
  26257. },
  26258. "output": {
  26259. "type": "string"
  26260. }
  26261. },
  26262. "required": ["timestamp", "sessionID", "callID", "output"],
  26263. "additionalProperties": false
  26264. }
  26265. },
  26266. "required": ["id", "type", "properties"],
  26267. "additionalProperties": false
  26268. },
  26269. "EventSessionNextStepStarted": {
  26270. "type": "object",
  26271. "properties": {
  26272. "id": {
  26273. "type": "string",
  26274. "pattern": "^evt_"
  26275. },
  26276. "type": {
  26277. "type": "string",
  26278. "enum": ["session.next.step.started"]
  26279. },
  26280. "properties": {
  26281. "type": "object",
  26282. "properties": {
  26283. "timestamp": {
  26284. "type": "number"
  26285. },
  26286. "sessionID": {
  26287. "type": "string",
  26288. "pattern": "^ses"
  26289. },
  26290. "assistantMessageID": {
  26291. "type": "string",
  26292. "pattern": "^msg_"
  26293. },
  26294. "agent": {
  26295. "type": "string"
  26296. },
  26297. "model": {
  26298. "type": "object",
  26299. "properties": {
  26300. "id": {
  26301. "type": "string"
  26302. },
  26303. "providerID": {
  26304. "type": "string"
  26305. },
  26306. "variant": {
  26307. "type": "string"
  26308. }
  26309. },
  26310. "required": ["id", "providerID"],
  26311. "additionalProperties": false
  26312. },
  26313. "snapshot": {
  26314. "type": "string"
  26315. }
  26316. },
  26317. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  26318. "additionalProperties": false
  26319. }
  26320. },
  26321. "required": ["id", "type", "properties"],
  26322. "additionalProperties": false
  26323. },
  26324. "EventSessionNextStepEnded": {
  26325. "type": "object",
  26326. "properties": {
  26327. "id": {
  26328. "type": "string",
  26329. "pattern": "^evt_"
  26330. },
  26331. "type": {
  26332. "type": "string",
  26333. "enum": ["session.next.step.ended"]
  26334. },
  26335. "properties": {
  26336. "type": "object",
  26337. "properties": {
  26338. "timestamp": {
  26339. "type": "number"
  26340. },
  26341. "sessionID": {
  26342. "type": "string",
  26343. "pattern": "^ses"
  26344. },
  26345. "assistantMessageID": {
  26346. "type": "string",
  26347. "pattern": "^msg_"
  26348. },
  26349. "finish": {
  26350. "type": "string"
  26351. },
  26352. "cost": {
  26353. "type": "number"
  26354. },
  26355. "tokens": {
  26356. "type": "object",
  26357. "properties": {
  26358. "input": {
  26359. "type": "number"
  26360. },
  26361. "output": {
  26362. "type": "number"
  26363. },
  26364. "reasoning": {
  26365. "type": "number"
  26366. },
  26367. "cache": {
  26368. "type": "object",
  26369. "properties": {
  26370. "read": {
  26371. "type": "number"
  26372. },
  26373. "write": {
  26374. "type": "number"
  26375. }
  26376. },
  26377. "required": ["read", "write"],
  26378. "additionalProperties": false
  26379. }
  26380. },
  26381. "required": ["input", "output", "reasoning", "cache"],
  26382. "additionalProperties": false
  26383. },
  26384. "snapshot": {
  26385. "type": "string"
  26386. }
  26387. },
  26388. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  26389. "additionalProperties": false
  26390. }
  26391. },
  26392. "required": ["id", "type", "properties"],
  26393. "additionalProperties": false
  26394. },
  26395. "EventSessionNextStepFailed": {
  26396. "type": "object",
  26397. "properties": {
  26398. "id": {
  26399. "type": "string",
  26400. "pattern": "^evt_"
  26401. },
  26402. "type": {
  26403. "type": "string",
  26404. "enum": ["session.next.step.failed"]
  26405. },
  26406. "properties": {
  26407. "type": "object",
  26408. "properties": {
  26409. "timestamp": {
  26410. "type": "number"
  26411. },
  26412. "sessionID": {
  26413. "type": "string",
  26414. "pattern": "^ses"
  26415. },
  26416. "assistantMessageID": {
  26417. "type": "string",
  26418. "pattern": "^msg_"
  26419. },
  26420. "error": {
  26421. "$ref": "#/components/schemas/SessionErrorUnknown"
  26422. }
  26423. },
  26424. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  26425. "additionalProperties": false
  26426. }
  26427. },
  26428. "required": ["id", "type", "properties"],
  26429. "additionalProperties": false
  26430. },
  26431. "EventSessionNextTextStarted": {
  26432. "type": "object",
  26433. "properties": {
  26434. "id": {
  26435. "type": "string",
  26436. "pattern": "^evt_"
  26437. },
  26438. "type": {
  26439. "type": "string",
  26440. "enum": ["session.next.text.started"]
  26441. },
  26442. "properties": {
  26443. "type": "object",
  26444. "properties": {
  26445. "timestamp": {
  26446. "type": "number"
  26447. },
  26448. "sessionID": {
  26449. "type": "string",
  26450. "pattern": "^ses"
  26451. },
  26452. "assistantMessageID": {
  26453. "type": "string",
  26454. "pattern": "^msg_"
  26455. },
  26456. "textID": {
  26457. "type": "string"
  26458. }
  26459. },
  26460. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26461. "additionalProperties": false
  26462. }
  26463. },
  26464. "required": ["id", "type", "properties"],
  26465. "additionalProperties": false
  26466. },
  26467. "EventSessionNextTextDelta": {
  26468. "type": "object",
  26469. "properties": {
  26470. "id": {
  26471. "type": "string",
  26472. "pattern": "^evt_"
  26473. },
  26474. "type": {
  26475. "type": "string",
  26476. "enum": ["session.next.text.delta"]
  26477. },
  26478. "properties": {
  26479. "type": "object",
  26480. "properties": {
  26481. "timestamp": {
  26482. "type": "number"
  26483. },
  26484. "sessionID": {
  26485. "type": "string",
  26486. "pattern": "^ses"
  26487. },
  26488. "assistantMessageID": {
  26489. "type": "string",
  26490. "pattern": "^msg_"
  26491. },
  26492. "textID": {
  26493. "type": "string"
  26494. },
  26495. "delta": {
  26496. "type": "string"
  26497. }
  26498. },
  26499. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  26500. "additionalProperties": false
  26501. }
  26502. },
  26503. "required": ["id", "type", "properties"],
  26504. "additionalProperties": false
  26505. },
  26506. "EventSessionNextTextEnded": {
  26507. "type": "object",
  26508. "properties": {
  26509. "id": {
  26510. "type": "string",
  26511. "pattern": "^evt_"
  26512. },
  26513. "type": {
  26514. "type": "string",
  26515. "enum": ["session.next.text.ended"]
  26516. },
  26517. "properties": {
  26518. "type": "object",
  26519. "properties": {
  26520. "timestamp": {
  26521. "type": "number"
  26522. },
  26523. "sessionID": {
  26524. "type": "string",
  26525. "pattern": "^ses"
  26526. },
  26527. "assistantMessageID": {
  26528. "type": "string",
  26529. "pattern": "^msg_"
  26530. },
  26531. "textID": {
  26532. "type": "string"
  26533. },
  26534. "text": {
  26535. "type": "string"
  26536. }
  26537. },
  26538. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26539. "additionalProperties": false
  26540. }
  26541. },
  26542. "required": ["id", "type", "properties"],
  26543. "additionalProperties": false
  26544. },
  26545. "EventSessionNextReasoningStarted": {
  26546. "type": "object",
  26547. "properties": {
  26548. "id": {
  26549. "type": "string",
  26550. "pattern": "^evt_"
  26551. },
  26552. "type": {
  26553. "type": "string",
  26554. "enum": ["session.next.reasoning.started"]
  26555. },
  26556. "properties": {
  26557. "type": "object",
  26558. "properties": {
  26559. "timestamp": {
  26560. "type": "number"
  26561. },
  26562. "sessionID": {
  26563. "type": "string",
  26564. "pattern": "^ses"
  26565. },
  26566. "assistantMessageID": {
  26567. "type": "string",
  26568. "pattern": "^msg_"
  26569. },
  26570. "reasoningID": {
  26571. "type": "string"
  26572. },
  26573. "providerMetadata": {
  26574. "type": "object",
  26575. "additionalProperties": {
  26576. "type": "object"
  26577. }
  26578. }
  26579. },
  26580. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26581. "additionalProperties": false
  26582. }
  26583. },
  26584. "required": ["id", "type", "properties"],
  26585. "additionalProperties": false
  26586. },
  26587. "EventSessionNextReasoningDelta": {
  26588. "type": "object",
  26589. "properties": {
  26590. "id": {
  26591. "type": "string",
  26592. "pattern": "^evt_"
  26593. },
  26594. "type": {
  26595. "type": "string",
  26596. "enum": ["session.next.reasoning.delta"]
  26597. },
  26598. "properties": {
  26599. "type": "object",
  26600. "properties": {
  26601. "timestamp": {
  26602. "type": "number"
  26603. },
  26604. "sessionID": {
  26605. "type": "string",
  26606. "pattern": "^ses"
  26607. },
  26608. "assistantMessageID": {
  26609. "type": "string",
  26610. "pattern": "^msg_"
  26611. },
  26612. "reasoningID": {
  26613. "type": "string"
  26614. },
  26615. "delta": {
  26616. "type": "string"
  26617. }
  26618. },
  26619. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  26620. "additionalProperties": false
  26621. }
  26622. },
  26623. "required": ["id", "type", "properties"],
  26624. "additionalProperties": false
  26625. },
  26626. "EventSessionNextReasoningEnded": {
  26627. "type": "object",
  26628. "properties": {
  26629. "id": {
  26630. "type": "string",
  26631. "pattern": "^evt_"
  26632. },
  26633. "type": {
  26634. "type": "string",
  26635. "enum": ["session.next.reasoning.ended"]
  26636. },
  26637. "properties": {
  26638. "type": "object",
  26639. "properties": {
  26640. "timestamp": {
  26641. "type": "number"
  26642. },
  26643. "sessionID": {
  26644. "type": "string",
  26645. "pattern": "^ses"
  26646. },
  26647. "assistantMessageID": {
  26648. "type": "string",
  26649. "pattern": "^msg_"
  26650. },
  26651. "reasoningID": {
  26652. "type": "string"
  26653. },
  26654. "text": {
  26655. "type": "string"
  26656. },
  26657. "providerMetadata": {
  26658. "type": "object",
  26659. "additionalProperties": {
  26660. "type": "object"
  26661. }
  26662. }
  26663. },
  26664. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26665. "additionalProperties": false
  26666. }
  26667. },
  26668. "required": ["id", "type", "properties"],
  26669. "additionalProperties": false
  26670. },
  26671. "EventSessionNextToolInputStarted": {
  26672. "type": "object",
  26673. "properties": {
  26674. "id": {
  26675. "type": "string",
  26676. "pattern": "^evt_"
  26677. },
  26678. "type": {
  26679. "type": "string",
  26680. "enum": ["session.next.tool.input.started"]
  26681. },
  26682. "properties": {
  26683. "type": "object",
  26684. "properties": {
  26685. "timestamp": {
  26686. "type": "number"
  26687. },
  26688. "sessionID": {
  26689. "type": "string",
  26690. "pattern": "^ses"
  26691. },
  26692. "assistantMessageID": {
  26693. "type": "string",
  26694. "pattern": "^msg_"
  26695. },
  26696. "callID": {
  26697. "type": "string"
  26698. },
  26699. "name": {
  26700. "type": "string"
  26701. }
  26702. },
  26703. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26704. "additionalProperties": false
  26705. }
  26706. },
  26707. "required": ["id", "type", "properties"],
  26708. "additionalProperties": false
  26709. },
  26710. "EventSessionNextToolInputDelta": {
  26711. "type": "object",
  26712. "properties": {
  26713. "id": {
  26714. "type": "string",
  26715. "pattern": "^evt_"
  26716. },
  26717. "type": {
  26718. "type": "string",
  26719. "enum": ["session.next.tool.input.delta"]
  26720. },
  26721. "properties": {
  26722. "type": "object",
  26723. "properties": {
  26724. "timestamp": {
  26725. "type": "number"
  26726. },
  26727. "sessionID": {
  26728. "type": "string",
  26729. "pattern": "^ses"
  26730. },
  26731. "assistantMessageID": {
  26732. "type": "string",
  26733. "pattern": "^msg_"
  26734. },
  26735. "callID": {
  26736. "type": "string"
  26737. },
  26738. "delta": {
  26739. "type": "string"
  26740. }
  26741. },
  26742. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  26743. "additionalProperties": false
  26744. }
  26745. },
  26746. "required": ["id", "type", "properties"],
  26747. "additionalProperties": false
  26748. },
  26749. "EventSessionNextToolInputEnded": {
  26750. "type": "object",
  26751. "properties": {
  26752. "id": {
  26753. "type": "string",
  26754. "pattern": "^evt_"
  26755. },
  26756. "type": {
  26757. "type": "string",
  26758. "enum": ["session.next.tool.input.ended"]
  26759. },
  26760. "properties": {
  26761. "type": "object",
  26762. "properties": {
  26763. "timestamp": {
  26764. "type": "number"
  26765. },
  26766. "sessionID": {
  26767. "type": "string",
  26768. "pattern": "^ses"
  26769. },
  26770. "assistantMessageID": {
  26771. "type": "string",
  26772. "pattern": "^msg_"
  26773. },
  26774. "callID": {
  26775. "type": "string"
  26776. },
  26777. "text": {
  26778. "type": "string"
  26779. }
  26780. },
  26781. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26782. "additionalProperties": false
  26783. }
  26784. },
  26785. "required": ["id", "type", "properties"],
  26786. "additionalProperties": false
  26787. },
  26788. "EventSessionNextToolCalled": {
  26789. "type": "object",
  26790. "properties": {
  26791. "id": {
  26792. "type": "string",
  26793. "pattern": "^evt_"
  26794. },
  26795. "type": {
  26796. "type": "string",
  26797. "enum": ["session.next.tool.called"]
  26798. },
  26799. "properties": {
  26800. "type": "object",
  26801. "properties": {
  26802. "timestamp": {
  26803. "type": "number"
  26804. },
  26805. "sessionID": {
  26806. "type": "string",
  26807. "pattern": "^ses"
  26808. },
  26809. "assistantMessageID": {
  26810. "type": "string",
  26811. "pattern": "^msg_"
  26812. },
  26813. "callID": {
  26814. "type": "string"
  26815. },
  26816. "tool": {
  26817. "type": "string"
  26818. },
  26819. "input": {
  26820. "type": "object"
  26821. },
  26822. "provider": {
  26823. "type": "object",
  26824. "properties": {
  26825. "executed": {
  26826. "type": "boolean"
  26827. },
  26828. "metadata": {
  26829. "type": "object",
  26830. "additionalProperties": {
  26831. "type": "object"
  26832. }
  26833. }
  26834. },
  26835. "required": ["executed"],
  26836. "additionalProperties": false
  26837. }
  26838. },
  26839. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26840. "additionalProperties": false
  26841. }
  26842. },
  26843. "required": ["id", "type", "properties"],
  26844. "additionalProperties": false
  26845. },
  26846. "EventSessionNextToolProgress": {
  26847. "type": "object",
  26848. "properties": {
  26849. "id": {
  26850. "type": "string",
  26851. "pattern": "^evt_"
  26852. },
  26853. "type": {
  26854. "type": "string",
  26855. "enum": ["session.next.tool.progress"]
  26856. },
  26857. "properties": {
  26858. "type": "object",
  26859. "properties": {
  26860. "timestamp": {
  26861. "type": "number"
  26862. },
  26863. "sessionID": {
  26864. "type": "string",
  26865. "pattern": "^ses"
  26866. },
  26867. "assistantMessageID": {
  26868. "type": "string",
  26869. "pattern": "^msg_"
  26870. },
  26871. "callID": {
  26872. "type": "string"
  26873. },
  26874. "structured": {
  26875. "type": "object"
  26876. },
  26877. "content": {
  26878. "type": "array",
  26879. "items": {
  26880. "anyOf": [
  26881. {
  26882. "$ref": "#/components/schemas/ToolTextContent"
  26883. },
  26884. {
  26885. "$ref": "#/components/schemas/ToolFileContent"
  26886. }
  26887. ]
  26888. }
  26889. }
  26890. },
  26891. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26892. "additionalProperties": false
  26893. }
  26894. },
  26895. "required": ["id", "type", "properties"],
  26896. "additionalProperties": false
  26897. },
  26898. "EventSessionNextToolSuccess": {
  26899. "type": "object",
  26900. "properties": {
  26901. "id": {
  26902. "type": "string",
  26903. "pattern": "^evt_"
  26904. },
  26905. "type": {
  26906. "type": "string",
  26907. "enum": ["session.next.tool.success"]
  26908. },
  26909. "properties": {
  26910. "type": "object",
  26911. "properties": {
  26912. "timestamp": {
  26913. "type": "number"
  26914. },
  26915. "sessionID": {
  26916. "type": "string",
  26917. "pattern": "^ses"
  26918. },
  26919. "assistantMessageID": {
  26920. "type": "string",
  26921. "pattern": "^msg_"
  26922. },
  26923. "callID": {
  26924. "type": "string"
  26925. },
  26926. "structured": {
  26927. "type": "object"
  26928. },
  26929. "content": {
  26930. "type": "array",
  26931. "items": {
  26932. "anyOf": [
  26933. {
  26934. "$ref": "#/components/schemas/ToolTextContent"
  26935. },
  26936. {
  26937. "$ref": "#/components/schemas/ToolFileContent"
  26938. }
  26939. ]
  26940. }
  26941. },
  26942. "outputPaths": {
  26943. "type": "array",
  26944. "items": {
  26945. "type": "string"
  26946. }
  26947. },
  26948. "result": {},
  26949. "provider": {
  26950. "type": "object",
  26951. "properties": {
  26952. "executed": {
  26953. "type": "boolean"
  26954. },
  26955. "metadata": {
  26956. "type": "object",
  26957. "additionalProperties": {
  26958. "type": "object"
  26959. }
  26960. }
  26961. },
  26962. "required": ["executed"],
  26963. "additionalProperties": false
  26964. }
  26965. },
  26966. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  26967. "additionalProperties": false
  26968. }
  26969. },
  26970. "required": ["id", "type", "properties"],
  26971. "additionalProperties": false
  26972. },
  26973. "EventSessionNextToolFailed": {
  26974. "type": "object",
  26975. "properties": {
  26976. "id": {
  26977. "type": "string",
  26978. "pattern": "^evt_"
  26979. },
  26980. "type": {
  26981. "type": "string",
  26982. "enum": ["session.next.tool.failed"]
  26983. },
  26984. "properties": {
  26985. "type": "object",
  26986. "properties": {
  26987. "timestamp": {
  26988. "type": "number"
  26989. },
  26990. "sessionID": {
  26991. "type": "string",
  26992. "pattern": "^ses"
  26993. },
  26994. "assistantMessageID": {
  26995. "type": "string",
  26996. "pattern": "^msg_"
  26997. },
  26998. "callID": {
  26999. "type": "string"
  27000. },
  27001. "error": {
  27002. "$ref": "#/components/schemas/SessionErrorUnknown"
  27003. },
  27004. "result": {},
  27005. "provider": {
  27006. "type": "object",
  27007. "properties": {
  27008. "executed": {
  27009. "type": "boolean"
  27010. },
  27011. "metadata": {
  27012. "type": "object",
  27013. "additionalProperties": {
  27014. "type": "object"
  27015. }
  27016. }
  27017. },
  27018. "required": ["executed"],
  27019. "additionalProperties": false
  27020. }
  27021. },
  27022. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  27023. "additionalProperties": false
  27024. }
  27025. },
  27026. "required": ["id", "type", "properties"],
  27027. "additionalProperties": false
  27028. },
  27029. "EventSessionNextRetried": {
  27030. "type": "object",
  27031. "properties": {
  27032. "id": {
  27033. "type": "string",
  27034. "pattern": "^evt_"
  27035. },
  27036. "type": {
  27037. "type": "string",
  27038. "enum": ["session.next.retried"]
  27039. },
  27040. "properties": {
  27041. "type": "object",
  27042. "properties": {
  27043. "timestamp": {
  27044. "type": "number"
  27045. },
  27046. "sessionID": {
  27047. "type": "string",
  27048. "pattern": "^ses"
  27049. },
  27050. "attempt": {
  27051. "type": "number"
  27052. },
  27053. "error": {
  27054. "$ref": "#/components/schemas/SessionNextRetry_error"
  27055. }
  27056. },
  27057. "required": ["timestamp", "sessionID", "attempt", "error"],
  27058. "additionalProperties": false
  27059. }
  27060. },
  27061. "required": ["id", "type", "properties"],
  27062. "additionalProperties": false
  27063. },
  27064. "EventSessionNextCompactionStarted": {
  27065. "type": "object",
  27066. "properties": {
  27067. "id": {
  27068. "type": "string",
  27069. "pattern": "^evt_"
  27070. },
  27071. "type": {
  27072. "type": "string",
  27073. "enum": ["session.next.compaction.started"]
  27074. },
  27075. "properties": {
  27076. "type": "object",
  27077. "properties": {
  27078. "timestamp": {
  27079. "type": "number"
  27080. },
  27081. "sessionID": {
  27082. "type": "string",
  27083. "pattern": "^ses"
  27084. },
  27085. "messageID": {
  27086. "type": "string",
  27087. "pattern": "^msg_"
  27088. },
  27089. "reason": {
  27090. "type": "string",
  27091. "enum": ["auto", "manual"]
  27092. }
  27093. },
  27094. "required": ["timestamp", "sessionID", "messageID", "reason"],
  27095. "additionalProperties": false
  27096. }
  27097. },
  27098. "required": ["id", "type", "properties"],
  27099. "additionalProperties": false
  27100. },
  27101. "EventSessionNextCompactionDelta": {
  27102. "type": "object",
  27103. "properties": {
  27104. "id": {
  27105. "type": "string",
  27106. "pattern": "^evt_"
  27107. },
  27108. "type": {
  27109. "type": "string",
  27110. "enum": ["session.next.compaction.delta"]
  27111. },
  27112. "properties": {
  27113. "type": "object",
  27114. "properties": {
  27115. "timestamp": {
  27116. "type": "number"
  27117. },
  27118. "sessionID": {
  27119. "type": "string",
  27120. "pattern": "^ses"
  27121. },
  27122. "messageID": {
  27123. "type": "string",
  27124. "pattern": "^msg_"
  27125. },
  27126. "text": {
  27127. "type": "string"
  27128. }
  27129. },
  27130. "required": ["timestamp", "sessionID", "messageID", "text"],
  27131. "additionalProperties": false
  27132. }
  27133. },
  27134. "required": ["id", "type", "properties"],
  27135. "additionalProperties": false
  27136. },
  27137. "EventSessionNextCompactionEnded": {
  27138. "type": "object",
  27139. "properties": {
  27140. "id": {
  27141. "type": "string",
  27142. "pattern": "^evt_"
  27143. },
  27144. "type": {
  27145. "type": "string",
  27146. "enum": ["session.next.compaction.ended"]
  27147. },
  27148. "properties": {
  27149. "type": "object",
  27150. "properties": {
  27151. "timestamp": {
  27152. "type": "number"
  27153. },
  27154. "sessionID": {
  27155. "type": "string",
  27156. "pattern": "^ses"
  27157. },
  27158. "messageID": {
  27159. "type": "string",
  27160. "pattern": "^msg_"
  27161. },
  27162. "reason": {
  27163. "type": "string",
  27164. "enum": ["auto", "manual"]
  27165. },
  27166. "text": {
  27167. "type": "string"
  27168. },
  27169. "recent": {
  27170. "type": "string"
  27171. }
  27172. },
  27173. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  27174. "additionalProperties": false
  27175. }
  27176. },
  27177. "required": ["id", "type", "properties"],
  27178. "additionalProperties": false
  27179. },
  27180. "EventMessagePartDelta": {
  27181. "type": "object",
  27182. "properties": {
  27183. "id": {
  27184. "type": "string",
  27185. "pattern": "^evt_"
  27186. },
  27187. "type": {
  27188. "type": "string",
  27189. "enum": ["message.part.delta"]
  27190. },
  27191. "properties": {
  27192. "type": "object",
  27193. "properties": {
  27194. "sessionID": {
  27195. "type": "string",
  27196. "pattern": "^ses"
  27197. },
  27198. "messageID": {
  27199. "type": "string",
  27200. "pattern": "^msg"
  27201. },
  27202. "partID": {
  27203. "type": "string",
  27204. "pattern": "^prt"
  27205. },
  27206. "field": {
  27207. "type": "string"
  27208. },
  27209. "delta": {
  27210. "type": "string"
  27211. }
  27212. },
  27213. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  27214. "additionalProperties": false
  27215. }
  27216. },
  27217. "required": ["id", "type", "properties"],
  27218. "additionalProperties": false
  27219. },
  27220. "EventSessionDiff": {
  27221. "type": "object",
  27222. "properties": {
  27223. "id": {
  27224. "type": "string",
  27225. "pattern": "^evt_"
  27226. },
  27227. "type": {
  27228. "type": "string",
  27229. "enum": ["session.diff"]
  27230. },
  27231. "properties": {
  27232. "type": "object",
  27233. "properties": {
  27234. "sessionID": {
  27235. "type": "string",
  27236. "pattern": "^ses"
  27237. },
  27238. "diff": {
  27239. "type": "array",
  27240. "items": {
  27241. "$ref": "#/components/schemas/SnapshotFileDiff"
  27242. }
  27243. }
  27244. },
  27245. "required": ["sessionID", "diff"],
  27246. "additionalProperties": false
  27247. }
  27248. },
  27249. "required": ["id", "type", "properties"],
  27250. "additionalProperties": false
  27251. },
  27252. "EventSessionError": {
  27253. "type": "object",
  27254. "properties": {
  27255. "id": {
  27256. "type": "string",
  27257. "pattern": "^evt_"
  27258. },
  27259. "type": {
  27260. "type": "string",
  27261. "enum": ["session.error"]
  27262. },
  27263. "properties": {
  27264. "type": "object",
  27265. "properties": {
  27266. "sessionID": {
  27267. "type": "string",
  27268. "pattern": "^ses"
  27269. },
  27270. "error": {
  27271. "anyOf": [
  27272. {
  27273. "$ref": "#/components/schemas/ProviderAuthError"
  27274. },
  27275. {
  27276. "$ref": "#/components/schemas/UnknownError"
  27277. },
  27278. {
  27279. "$ref": "#/components/schemas/MessageOutputLengthError"
  27280. },
  27281. {
  27282. "$ref": "#/components/schemas/MessageAbortedError"
  27283. },
  27284. {
  27285. "$ref": "#/components/schemas/StructuredOutputError"
  27286. },
  27287. {
  27288. "$ref": "#/components/schemas/ContextOverflowError"
  27289. },
  27290. {
  27291. "$ref": "#/components/schemas/APIError"
  27292. }
  27293. ]
  27294. }
  27295. },
  27296. "additionalProperties": false
  27297. }
  27298. },
  27299. "required": ["id", "type", "properties"],
  27300. "additionalProperties": false
  27301. },
  27302. "EventInstallationUpdated": {
  27303. "type": "object",
  27304. "properties": {
  27305. "id": {
  27306. "type": "string",
  27307. "pattern": "^evt_"
  27308. },
  27309. "type": {
  27310. "type": "string",
  27311. "enum": ["installation.updated"]
  27312. },
  27313. "properties": {
  27314. "type": "object",
  27315. "properties": {
  27316. "version": {
  27317. "type": "string"
  27318. }
  27319. },
  27320. "required": ["version"],
  27321. "additionalProperties": false
  27322. }
  27323. },
  27324. "required": ["id", "type", "properties"],
  27325. "additionalProperties": false
  27326. },
  27327. "EventInstallationUpdate-available": {
  27328. "type": "object",
  27329. "properties": {
  27330. "id": {
  27331. "type": "string",
  27332. "pattern": "^evt_"
  27333. },
  27334. "type": {
  27335. "type": "string",
  27336. "enum": ["installation.update-available"]
  27337. },
  27338. "properties": {
  27339. "type": "object",
  27340. "properties": {
  27341. "version": {
  27342. "type": "string"
  27343. }
  27344. },
  27345. "required": ["version"],
  27346. "additionalProperties": false
  27347. }
  27348. },
  27349. "required": ["id", "type", "properties"],
  27350. "additionalProperties": false
  27351. },
  27352. "EventFileEdited": {
  27353. "type": "object",
  27354. "properties": {
  27355. "id": {
  27356. "type": "string",
  27357. "pattern": "^evt_"
  27358. },
  27359. "type": {
  27360. "type": "string",
  27361. "enum": ["file.edited"]
  27362. },
  27363. "properties": {
  27364. "type": "object",
  27365. "properties": {
  27366. "file": {
  27367. "type": "string"
  27368. }
  27369. },
  27370. "required": ["file"],
  27371. "additionalProperties": false
  27372. }
  27373. },
  27374. "required": ["id", "type", "properties"],
  27375. "additionalProperties": false
  27376. },
  27377. "EventAccountAdded": {
  27378. "type": "object",
  27379. "properties": {
  27380. "id": {
  27381. "type": "string",
  27382. "pattern": "^evt_"
  27383. },
  27384. "type": {
  27385. "type": "string",
  27386. "enum": ["account.added"]
  27387. },
  27388. "properties": {
  27389. "type": "object",
  27390. "properties": {
  27391. "account": {
  27392. "$ref": "#/components/schemas/AuthInfo"
  27393. }
  27394. },
  27395. "required": ["account"],
  27396. "additionalProperties": false
  27397. }
  27398. },
  27399. "required": ["id", "type", "properties"],
  27400. "additionalProperties": false
  27401. },
  27402. "EventAccountRemoved": {
  27403. "type": "object",
  27404. "properties": {
  27405. "id": {
  27406. "type": "string",
  27407. "pattern": "^evt_"
  27408. },
  27409. "type": {
  27410. "type": "string",
  27411. "enum": ["account.removed"]
  27412. },
  27413. "properties": {
  27414. "type": "object",
  27415. "properties": {
  27416. "account": {
  27417. "$ref": "#/components/schemas/AuthInfo"
  27418. }
  27419. },
  27420. "required": ["account"],
  27421. "additionalProperties": false
  27422. }
  27423. },
  27424. "required": ["id", "type", "properties"],
  27425. "additionalProperties": false
  27426. },
  27427. "EventAccountSwitched": {
  27428. "type": "object",
  27429. "properties": {
  27430. "id": {
  27431. "type": "string",
  27432. "pattern": "^evt_"
  27433. },
  27434. "type": {
  27435. "type": "string",
  27436. "enum": ["account.switched"]
  27437. },
  27438. "properties": {
  27439. "type": "object",
  27440. "properties": {
  27441. "serviceID": {
  27442. "type": "string"
  27443. },
  27444. "from": {
  27445. "type": "string"
  27446. },
  27447. "to": {
  27448. "type": "string"
  27449. }
  27450. },
  27451. "required": ["serviceID"],
  27452. "additionalProperties": false
  27453. }
  27454. },
  27455. "required": ["id", "type", "properties"],
  27456. "additionalProperties": false
  27457. },
  27458. "EventPermissionV2Asked": {
  27459. "type": "object",
  27460. "properties": {
  27461. "id": {
  27462. "type": "string",
  27463. "pattern": "^evt_"
  27464. },
  27465. "type": {
  27466. "type": "string",
  27467. "enum": ["permission.v2.asked"]
  27468. },
  27469. "properties": {
  27470. "type": "object",
  27471. "properties": {
  27472. "id": {
  27473. "type": "string",
  27474. "pattern": "^per"
  27475. },
  27476. "sessionID": {
  27477. "type": "string",
  27478. "pattern": "^ses"
  27479. },
  27480. "action": {
  27481. "type": "string"
  27482. },
  27483. "resources": {
  27484. "type": "array",
  27485. "items": {
  27486. "type": "string"
  27487. }
  27488. },
  27489. "save": {
  27490. "type": "array",
  27491. "items": {
  27492. "type": "string"
  27493. }
  27494. },
  27495. "metadata": {
  27496. "type": "object"
  27497. },
  27498. "source": {
  27499. "$ref": "#/components/schemas/PermissionV2Source"
  27500. }
  27501. },
  27502. "required": ["id", "sessionID", "action", "resources"],
  27503. "additionalProperties": false
  27504. }
  27505. },
  27506. "required": ["id", "type", "properties"],
  27507. "additionalProperties": false
  27508. },
  27509. "EventPermissionV2Replied": {
  27510. "type": "object",
  27511. "properties": {
  27512. "id": {
  27513. "type": "string",
  27514. "pattern": "^evt_"
  27515. },
  27516. "type": {
  27517. "type": "string",
  27518. "enum": ["permission.v2.replied"]
  27519. },
  27520. "properties": {
  27521. "type": "object",
  27522. "properties": {
  27523. "sessionID": {
  27524. "type": "string",
  27525. "pattern": "^ses"
  27526. },
  27527. "requestID": {
  27528. "type": "string",
  27529. "pattern": "^per"
  27530. },
  27531. "reply": {
  27532. "$ref": "#/components/schemas/PermissionV2Reply"
  27533. }
  27534. },
  27535. "required": ["sessionID", "requestID", "reply"],
  27536. "additionalProperties": false
  27537. }
  27538. },
  27539. "required": ["id", "type", "properties"],
  27540. "additionalProperties": false
  27541. },
  27542. "EventFileWatcherUpdated": {
  27543. "type": "object",
  27544. "properties": {
  27545. "id": {
  27546. "type": "string",
  27547. "pattern": "^evt_"
  27548. },
  27549. "type": {
  27550. "type": "string",
  27551. "enum": ["file.watcher.updated"]
  27552. },
  27553. "properties": {
  27554. "type": "object",
  27555. "properties": {
  27556. "file": {
  27557. "type": "string"
  27558. },
  27559. "event": {
  27560. "type": "string",
  27561. "enum": ["add", "change", "unlink"]
  27562. }
  27563. },
  27564. "required": ["file", "event"],
  27565. "additionalProperties": false
  27566. }
  27567. },
  27568. "required": ["id", "type", "properties"],
  27569. "additionalProperties": false
  27570. },
  27571. "EventPtyCreated": {
  27572. "type": "object",
  27573. "properties": {
  27574. "id": {
  27575. "type": "string",
  27576. "pattern": "^evt_"
  27577. },
  27578. "type": {
  27579. "type": "string",
  27580. "enum": ["pty.created"]
  27581. },
  27582. "properties": {
  27583. "type": "object",
  27584. "properties": {
  27585. "info": {
  27586. "$ref": "#/components/schemas/Pty"
  27587. }
  27588. },
  27589. "required": ["info"],
  27590. "additionalProperties": false
  27591. }
  27592. },
  27593. "required": ["id", "type", "properties"],
  27594. "additionalProperties": false
  27595. },
  27596. "EventPtyUpdated": {
  27597. "type": "object",
  27598. "properties": {
  27599. "id": {
  27600. "type": "string",
  27601. "pattern": "^evt_"
  27602. },
  27603. "type": {
  27604. "type": "string",
  27605. "enum": ["pty.updated"]
  27606. },
  27607. "properties": {
  27608. "type": "object",
  27609. "properties": {
  27610. "info": {
  27611. "$ref": "#/components/schemas/Pty"
  27612. }
  27613. },
  27614. "required": ["info"],
  27615. "additionalProperties": false
  27616. }
  27617. },
  27618. "required": ["id", "type", "properties"],
  27619. "additionalProperties": false
  27620. },
  27621. "EventPtyExited": {
  27622. "type": "object",
  27623. "properties": {
  27624. "id": {
  27625. "type": "string",
  27626. "pattern": "^evt_"
  27627. },
  27628. "type": {
  27629. "type": "string",
  27630. "enum": ["pty.exited"]
  27631. },
  27632. "properties": {
  27633. "type": "object",
  27634. "properties": {
  27635. "id": {
  27636. "type": "string",
  27637. "pattern": "^pty"
  27638. },
  27639. "exitCode": {
  27640. "type": "integer",
  27641. "minimum": 0
  27642. }
  27643. },
  27644. "required": ["id", "exitCode"],
  27645. "additionalProperties": false
  27646. }
  27647. },
  27648. "required": ["id", "type", "properties"],
  27649. "additionalProperties": false
  27650. },
  27651. "EventPtyDeleted": {
  27652. "type": "object",
  27653. "properties": {
  27654. "id": {
  27655. "type": "string",
  27656. "pattern": "^evt_"
  27657. },
  27658. "type": {
  27659. "type": "string",
  27660. "enum": ["pty.deleted"]
  27661. },
  27662. "properties": {
  27663. "type": "object",
  27664. "properties": {
  27665. "id": {
  27666. "type": "string",
  27667. "pattern": "^pty"
  27668. }
  27669. },
  27670. "required": ["id"],
  27671. "additionalProperties": false
  27672. }
  27673. },
  27674. "required": ["id", "type", "properties"],
  27675. "additionalProperties": false
  27676. },
  27677. "EventQuestionV2Asked": {
  27678. "type": "object",
  27679. "properties": {
  27680. "id": {
  27681. "type": "string",
  27682. "pattern": "^evt_"
  27683. },
  27684. "type": {
  27685. "type": "string",
  27686. "enum": ["question.v2.asked"]
  27687. },
  27688. "properties": {
  27689. "type": "object",
  27690. "properties": {
  27691. "id": {
  27692. "type": "string",
  27693. "pattern": "^que"
  27694. },
  27695. "sessionID": {
  27696. "type": "string",
  27697. "pattern": "^ses"
  27698. },
  27699. "questions": {
  27700. "type": "array",
  27701. "items": {
  27702. "$ref": "#/components/schemas/QuestionV2Info"
  27703. },
  27704. "description": "Questions to ask"
  27705. },
  27706. "tool": {
  27707. "$ref": "#/components/schemas/QuestionV2Tool"
  27708. }
  27709. },
  27710. "required": ["id", "sessionID", "questions"],
  27711. "additionalProperties": false
  27712. }
  27713. },
  27714. "required": ["id", "type", "properties"],
  27715. "additionalProperties": false
  27716. },
  27717. "EventQuestionV2Replied": {
  27718. "type": "object",
  27719. "properties": {
  27720. "id": {
  27721. "type": "string",
  27722. "pattern": "^evt_"
  27723. },
  27724. "type": {
  27725. "type": "string",
  27726. "enum": ["question.v2.replied"]
  27727. },
  27728. "properties": {
  27729. "type": "object",
  27730. "properties": {
  27731. "sessionID": {
  27732. "type": "string",
  27733. "pattern": "^ses"
  27734. },
  27735. "requestID": {
  27736. "type": "string",
  27737. "pattern": "^que"
  27738. },
  27739. "answers": {
  27740. "type": "array",
  27741. "items": {
  27742. "$ref": "#/components/schemas/QuestionV2Answer"
  27743. }
  27744. }
  27745. },
  27746. "required": ["sessionID", "requestID", "answers"],
  27747. "additionalProperties": false
  27748. }
  27749. },
  27750. "required": ["id", "type", "properties"],
  27751. "additionalProperties": false
  27752. },
  27753. "EventQuestionV2Rejected": {
  27754. "type": "object",
  27755. "properties": {
  27756. "id": {
  27757. "type": "string",
  27758. "pattern": "^evt_"
  27759. },
  27760. "type": {
  27761. "type": "string",
  27762. "enum": ["question.v2.rejected"]
  27763. },
  27764. "properties": {
  27765. "type": "object",
  27766. "properties": {
  27767. "sessionID": {
  27768. "type": "string",
  27769. "pattern": "^ses"
  27770. },
  27771. "requestID": {
  27772. "type": "string",
  27773. "pattern": "^que"
  27774. }
  27775. },
  27776. "required": ["sessionID", "requestID"],
  27777. "additionalProperties": false
  27778. }
  27779. },
  27780. "required": ["id", "type", "properties"],
  27781. "additionalProperties": false
  27782. },
  27783. "EventTodoUpdated": {
  27784. "type": "object",
  27785. "properties": {
  27786. "id": {
  27787. "type": "string",
  27788. "pattern": "^evt_"
  27789. },
  27790. "type": {
  27791. "type": "string",
  27792. "enum": ["todo.updated"]
  27793. },
  27794. "properties": {
  27795. "type": "object",
  27796. "properties": {
  27797. "sessionID": {
  27798. "type": "string",
  27799. "pattern": "^ses"
  27800. },
  27801. "todos": {
  27802. "type": "array",
  27803. "items": {
  27804. "$ref": "#/components/schemas/Todo"
  27805. }
  27806. }
  27807. },
  27808. "required": ["sessionID", "todos"],
  27809. "additionalProperties": false
  27810. }
  27811. },
  27812. "required": ["id", "type", "properties"],
  27813. "additionalProperties": false
  27814. },
  27815. "EventLspUpdated": {
  27816. "type": "object",
  27817. "properties": {
  27818. "id": {
  27819. "type": "string",
  27820. "pattern": "^evt_"
  27821. },
  27822. "type": {
  27823. "type": "string",
  27824. "enum": ["lsp.updated"]
  27825. },
  27826. "properties": {
  27827. "type": "object",
  27828. "properties": {}
  27829. }
  27830. },
  27831. "required": ["id", "type", "properties"],
  27832. "additionalProperties": false
  27833. },
  27834. "EventPermissionAsked": {
  27835. "type": "object",
  27836. "properties": {
  27837. "id": {
  27838. "type": "string",
  27839. "pattern": "^evt_"
  27840. },
  27841. "type": {
  27842. "type": "string",
  27843. "enum": ["permission.asked"]
  27844. },
  27845. "properties": {
  27846. "type": "object",
  27847. "properties": {
  27848. "id": {
  27849. "type": "string",
  27850. "pattern": "^per"
  27851. },
  27852. "sessionID": {
  27853. "type": "string",
  27854. "pattern": "^ses"
  27855. },
  27856. "permission": {
  27857. "type": "string"
  27858. },
  27859. "patterns": {
  27860. "type": "array",
  27861. "items": {
  27862. "type": "string"
  27863. }
  27864. },
  27865. "metadata": {
  27866. "type": "object"
  27867. },
  27868. "always": {
  27869. "type": "array",
  27870. "items": {
  27871. "type": "string"
  27872. }
  27873. },
  27874. "tool": {
  27875. "type": "object",
  27876. "properties": {
  27877. "messageID": {
  27878. "type": "string"
  27879. },
  27880. "callID": {
  27881. "type": "string"
  27882. }
  27883. },
  27884. "required": ["messageID", "callID"],
  27885. "additionalProperties": false
  27886. }
  27887. },
  27888. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  27889. "additionalProperties": false
  27890. }
  27891. },
  27892. "required": ["id", "type", "properties"],
  27893. "additionalProperties": false
  27894. },
  27895. "EventPermissionReplied": {
  27896. "type": "object",
  27897. "properties": {
  27898. "id": {
  27899. "type": "string",
  27900. "pattern": "^evt_"
  27901. },
  27902. "type": {
  27903. "type": "string",
  27904. "enum": ["permission.replied"]
  27905. },
  27906. "properties": {
  27907. "type": "object",
  27908. "properties": {
  27909. "sessionID": {
  27910. "type": "string",
  27911. "pattern": "^ses"
  27912. },
  27913. "requestID": {
  27914. "type": "string",
  27915. "pattern": "^per"
  27916. },
  27917. "reply": {
  27918. "type": "string",
  27919. "enum": ["once", "always", "reject"]
  27920. }
  27921. },
  27922. "required": ["sessionID", "requestID", "reply"],
  27923. "additionalProperties": false
  27924. }
  27925. },
  27926. "required": ["id", "type", "properties"],
  27927. "additionalProperties": false
  27928. },
  27929. "EventMcpToolsChanged": {
  27930. "type": "object",
  27931. "properties": {
  27932. "id": {
  27933. "type": "string",
  27934. "pattern": "^evt_"
  27935. },
  27936. "type": {
  27937. "type": "string",
  27938. "enum": ["mcp.tools.changed"]
  27939. },
  27940. "properties": {
  27941. "type": "object",
  27942. "properties": {
  27943. "server": {
  27944. "type": "string"
  27945. }
  27946. },
  27947. "required": ["server"],
  27948. "additionalProperties": false
  27949. }
  27950. },
  27951. "required": ["id", "type", "properties"],
  27952. "additionalProperties": false
  27953. },
  27954. "EventMcpBrowserOpenFailed": {
  27955. "type": "object",
  27956. "properties": {
  27957. "id": {
  27958. "type": "string",
  27959. "pattern": "^evt_"
  27960. },
  27961. "type": {
  27962. "type": "string",
  27963. "enum": ["mcp.browser.open.failed"]
  27964. },
  27965. "properties": {
  27966. "type": "object",
  27967. "properties": {
  27968. "mcpName": {
  27969. "type": "string"
  27970. },
  27971. "url": {
  27972. "type": "string"
  27973. }
  27974. },
  27975. "required": ["mcpName", "url"],
  27976. "additionalProperties": false
  27977. }
  27978. },
  27979. "required": ["id", "type", "properties"],
  27980. "additionalProperties": false
  27981. },
  27982. "EventCommandExecuted": {
  27983. "type": "object",
  27984. "properties": {
  27985. "id": {
  27986. "type": "string",
  27987. "pattern": "^evt_"
  27988. },
  27989. "type": {
  27990. "type": "string",
  27991. "enum": ["command.executed"]
  27992. },
  27993. "properties": {
  27994. "type": "object",
  27995. "properties": {
  27996. "name": {
  27997. "type": "string"
  27998. },
  27999. "sessionID": {
  28000. "type": "string",
  28001. "pattern": "^ses"
  28002. },
  28003. "arguments": {
  28004. "type": "string"
  28005. },
  28006. "messageID": {
  28007. "type": "string",
  28008. "pattern": "^msg"
  28009. }
  28010. },
  28011. "required": ["name", "sessionID", "arguments", "messageID"],
  28012. "additionalProperties": false
  28013. }
  28014. },
  28015. "required": ["id", "type", "properties"],
  28016. "additionalProperties": false
  28017. },
  28018. "EventProjectDirectoriesUpdated": {
  28019. "type": "object",
  28020. "properties": {
  28021. "id": {
  28022. "type": "string",
  28023. "pattern": "^evt_"
  28024. },
  28025. "type": {
  28026. "type": "string",
  28027. "enum": ["project.directories.updated"]
  28028. },
  28029. "properties": {
  28030. "type": "object",
  28031. "properties": {
  28032. "projectID": {
  28033. "type": "string"
  28034. }
  28035. },
  28036. "required": ["projectID"],
  28037. "additionalProperties": false
  28038. }
  28039. },
  28040. "required": ["id", "type", "properties"],
  28041. "additionalProperties": false
  28042. },
  28043. "EventProjectUpdated": {
  28044. "type": "object",
  28045. "properties": {
  28046. "id": {
  28047. "type": "string",
  28048. "pattern": "^evt_"
  28049. },
  28050. "type": {
  28051. "type": "string",
  28052. "enum": ["project.updated"]
  28053. },
  28054. "properties": {
  28055. "type": "object",
  28056. "properties": {
  28057. "id": {
  28058. "type": "string"
  28059. },
  28060. "worktree": {
  28061. "type": "string"
  28062. },
  28063. "vcs": {
  28064. "type": "string",
  28065. "enum": ["git"]
  28066. },
  28067. "name": {
  28068. "type": "string"
  28069. },
  28070. "icon": {
  28071. "type": "object",
  28072. "properties": {
  28073. "url": {
  28074. "type": "string"
  28075. },
  28076. "override": {
  28077. "type": "string"
  28078. },
  28079. "color": {
  28080. "type": "string"
  28081. }
  28082. },
  28083. "additionalProperties": false
  28084. },
  28085. "commands": {
  28086. "type": "object",
  28087. "properties": {
  28088. "start": {
  28089. "type": "string",
  28090. "description": "Startup script to run when creating a new workspace (worktree)"
  28091. }
  28092. },
  28093. "additionalProperties": false
  28094. },
  28095. "time": {
  28096. "type": "object",
  28097. "properties": {
  28098. "created": {
  28099. "type": "integer",
  28100. "minimum": 0
  28101. },
  28102. "updated": {
  28103. "type": "integer",
  28104. "minimum": 0
  28105. },
  28106. "initialized": {
  28107. "type": "integer",
  28108. "minimum": 0
  28109. }
  28110. },
  28111. "required": ["created", "updated"],
  28112. "additionalProperties": false
  28113. },
  28114. "sandboxes": {
  28115. "type": "array",
  28116. "items": {
  28117. "type": "string"
  28118. }
  28119. }
  28120. },
  28121. "required": ["id", "worktree", "time", "sandboxes"],
  28122. "additionalProperties": false
  28123. }
  28124. },
  28125. "required": ["id", "type", "properties"],
  28126. "additionalProperties": false
  28127. },
  28128. "EventQuestionAsked": {
  28129. "type": "object",
  28130. "properties": {
  28131. "id": {
  28132. "type": "string",
  28133. "pattern": "^evt_"
  28134. },
  28135. "type": {
  28136. "type": "string",
  28137. "enum": ["question.asked"]
  28138. },
  28139. "properties": {
  28140. "type": "object",
  28141. "properties": {
  28142. "id": {
  28143. "type": "string",
  28144. "pattern": "^que"
  28145. },
  28146. "sessionID": {
  28147. "type": "string",
  28148. "pattern": "^ses"
  28149. },
  28150. "questions": {
  28151. "type": "array",
  28152. "items": {
  28153. "$ref": "#/components/schemas/QuestionInfo"
  28154. },
  28155. "description": "Questions to ask"
  28156. },
  28157. "tool": {
  28158. "$ref": "#/components/schemas/QuestionTool"
  28159. }
  28160. },
  28161. "required": ["id", "sessionID", "questions"],
  28162. "additionalProperties": false
  28163. }
  28164. },
  28165. "required": ["id", "type", "properties"],
  28166. "additionalProperties": false
  28167. },
  28168. "EventQuestionReplied": {
  28169. "type": "object",
  28170. "properties": {
  28171. "id": {
  28172. "type": "string",
  28173. "pattern": "^evt_"
  28174. },
  28175. "type": {
  28176. "type": "string",
  28177. "enum": ["question.replied"]
  28178. },
  28179. "properties": {
  28180. "type": "object",
  28181. "properties": {
  28182. "sessionID": {
  28183. "type": "string",
  28184. "pattern": "^ses"
  28185. },
  28186. "requestID": {
  28187. "type": "string",
  28188. "pattern": "^que"
  28189. },
  28190. "answers": {
  28191. "type": "array",
  28192. "items": {
  28193. "$ref": "#/components/schemas/QuestionAnswer"
  28194. }
  28195. }
  28196. },
  28197. "required": ["sessionID", "requestID", "answers"],
  28198. "additionalProperties": false
  28199. }
  28200. },
  28201. "required": ["id", "type", "properties"],
  28202. "additionalProperties": false
  28203. },
  28204. "EventQuestionRejected": {
  28205. "type": "object",
  28206. "properties": {
  28207. "id": {
  28208. "type": "string",
  28209. "pattern": "^evt_"
  28210. },
  28211. "type": {
  28212. "type": "string",
  28213. "enum": ["question.rejected"]
  28214. },
  28215. "properties": {
  28216. "type": "object",
  28217. "properties": {
  28218. "sessionID": {
  28219. "type": "string",
  28220. "pattern": "^ses"
  28221. },
  28222. "requestID": {
  28223. "type": "string",
  28224. "pattern": "^que"
  28225. }
  28226. },
  28227. "required": ["sessionID", "requestID"],
  28228. "additionalProperties": false
  28229. }
  28230. },
  28231. "required": ["id", "type", "properties"],
  28232. "additionalProperties": false
  28233. },
  28234. "EventSessionStatus": {
  28235. "type": "object",
  28236. "properties": {
  28237. "id": {
  28238. "type": "string",
  28239. "pattern": "^evt_"
  28240. },
  28241. "type": {
  28242. "type": "string",
  28243. "enum": ["session.status"]
  28244. },
  28245. "properties": {
  28246. "type": "object",
  28247. "properties": {
  28248. "sessionID": {
  28249. "type": "string",
  28250. "pattern": "^ses"
  28251. },
  28252. "status": {
  28253. "$ref": "#/components/schemas/SessionStatus"
  28254. }
  28255. },
  28256. "required": ["sessionID", "status"],
  28257. "additionalProperties": false
  28258. }
  28259. },
  28260. "required": ["id", "type", "properties"],
  28261. "additionalProperties": false
  28262. },
  28263. "EventSessionIdle": {
  28264. "type": "object",
  28265. "properties": {
  28266. "id": {
  28267. "type": "string",
  28268. "pattern": "^evt_"
  28269. },
  28270. "type": {
  28271. "type": "string",
  28272. "enum": ["session.idle"]
  28273. },
  28274. "properties": {
  28275. "type": "object",
  28276. "properties": {
  28277. "sessionID": {
  28278. "type": "string",
  28279. "pattern": "^ses"
  28280. }
  28281. },
  28282. "required": ["sessionID"],
  28283. "additionalProperties": false
  28284. }
  28285. },
  28286. "required": ["id", "type", "properties"],
  28287. "additionalProperties": false
  28288. },
  28289. "EventSessionCompacted": {
  28290. "type": "object",
  28291. "properties": {
  28292. "id": {
  28293. "type": "string",
  28294. "pattern": "^evt_"
  28295. },
  28296. "type": {
  28297. "type": "string",
  28298. "enum": ["session.compacted"]
  28299. },
  28300. "properties": {
  28301. "type": "object",
  28302. "properties": {
  28303. "sessionID": {
  28304. "type": "string",
  28305. "pattern": "^ses"
  28306. }
  28307. },
  28308. "required": ["sessionID"],
  28309. "additionalProperties": false
  28310. }
  28311. },
  28312. "required": ["id", "type", "properties"],
  28313. "additionalProperties": false
  28314. },
  28315. "EventVcsBranchUpdated": {
  28316. "type": "object",
  28317. "properties": {
  28318. "id": {
  28319. "type": "string",
  28320. "pattern": "^evt_"
  28321. },
  28322. "type": {
  28323. "type": "string",
  28324. "enum": ["vcs.branch.updated"]
  28325. },
  28326. "properties": {
  28327. "type": "object",
  28328. "properties": {
  28329. "branch": {
  28330. "type": "string"
  28331. }
  28332. },
  28333. "additionalProperties": false
  28334. }
  28335. },
  28336. "required": ["id", "type", "properties"],
  28337. "additionalProperties": false
  28338. },
  28339. "EventWorktreeReady": {
  28340. "type": "object",
  28341. "properties": {
  28342. "id": {
  28343. "type": "string",
  28344. "pattern": "^evt_"
  28345. },
  28346. "type": {
  28347. "type": "string",
  28348. "enum": ["worktree.ready"]
  28349. },
  28350. "properties": {
  28351. "type": "object",
  28352. "properties": {
  28353. "name": {
  28354. "type": "string"
  28355. },
  28356. "branch": {
  28357. "type": "string"
  28358. }
  28359. },
  28360. "required": ["name"],
  28361. "additionalProperties": false
  28362. }
  28363. },
  28364. "required": ["id", "type", "properties"],
  28365. "additionalProperties": false
  28366. },
  28367. "EventWorktreeFailed": {
  28368. "type": "object",
  28369. "properties": {
  28370. "id": {
  28371. "type": "string",
  28372. "pattern": "^evt_"
  28373. },
  28374. "type": {
  28375. "type": "string",
  28376. "enum": ["worktree.failed"]
  28377. },
  28378. "properties": {
  28379. "type": "object",
  28380. "properties": {
  28381. "message": {
  28382. "type": "string"
  28383. }
  28384. },
  28385. "required": ["message"],
  28386. "additionalProperties": false
  28387. }
  28388. },
  28389. "required": ["id", "type", "properties"],
  28390. "additionalProperties": false
  28391. },
  28392. "EventWorkspaceReady": {
  28393. "type": "object",
  28394. "properties": {
  28395. "id": {
  28396. "type": "string",
  28397. "pattern": "^evt_"
  28398. },
  28399. "type": {
  28400. "type": "string",
  28401. "enum": ["workspace.ready"]
  28402. },
  28403. "properties": {
  28404. "type": "object",
  28405. "properties": {
  28406. "name": {
  28407. "type": "string"
  28408. }
  28409. },
  28410. "required": ["name"],
  28411. "additionalProperties": false
  28412. }
  28413. },
  28414. "required": ["id", "type", "properties"],
  28415. "additionalProperties": false
  28416. },
  28417. "EventWorkspaceFailed": {
  28418. "type": "object",
  28419. "properties": {
  28420. "id": {
  28421. "type": "string",
  28422. "pattern": "^evt_"
  28423. },
  28424. "type": {
  28425. "type": "string",
  28426. "enum": ["workspace.failed"]
  28427. },
  28428. "properties": {
  28429. "type": "object",
  28430. "properties": {
  28431. "message": {
  28432. "type": "string"
  28433. }
  28434. },
  28435. "required": ["message"],
  28436. "additionalProperties": false
  28437. }
  28438. },
  28439. "required": ["id", "type", "properties"],
  28440. "additionalProperties": false
  28441. },
  28442. "EventWorkspaceStatus": {
  28443. "type": "object",
  28444. "properties": {
  28445. "id": {
  28446. "type": "string",
  28447. "pattern": "^evt_"
  28448. },
  28449. "type": {
  28450. "type": "string",
  28451. "enum": ["workspace.status"]
  28452. },
  28453. "properties": {
  28454. "type": "object",
  28455. "properties": {
  28456. "workspaceID": {
  28457. "type": "string",
  28458. "pattern": "^wrk"
  28459. },
  28460. "status": {
  28461. "type": "string",
  28462. "enum": ["connected", "connecting", "disconnected", "error"]
  28463. }
  28464. },
  28465. "required": ["workspaceID", "status"],
  28466. "additionalProperties": false
  28467. }
  28468. },
  28469. "required": ["id", "type", "properties"],
  28470. "additionalProperties": false
  28471. },
  28472. "EventServerConnected": {
  28473. "type": "object",
  28474. "properties": {
  28475. "id": {
  28476. "type": "string",
  28477. "pattern": "^evt_"
  28478. },
  28479. "type": {
  28480. "type": "string",
  28481. "enum": ["server.connected"]
  28482. },
  28483. "properties": {
  28484. "type": "object",
  28485. "properties": {}
  28486. }
  28487. },
  28488. "required": ["id", "type", "properties"],
  28489. "additionalProperties": false
  28490. },
  28491. "EventGlobalDisposed": {
  28492. "type": "object",
  28493. "properties": {
  28494. "id": {
  28495. "type": "string",
  28496. "pattern": "^evt_"
  28497. },
  28498. "type": {
  28499. "type": "string",
  28500. "enum": ["global.disposed"]
  28501. },
  28502. "properties": {
  28503. "type": "object",
  28504. "properties": {}
  28505. }
  28506. },
  28507. "required": ["id", "type", "properties"],
  28508. "additionalProperties": false
  28509. },
  28510. "BadRequestError": {
  28511. "type": "object",
  28512. "required": ["name", "data"],
  28513. "properties": {
  28514. "name": {
  28515. "type": "string",
  28516. "enum": ["BadRequest"]
  28517. },
  28518. "data": {
  28519. "type": "object",
  28520. "required": ["message"],
  28521. "properties": {
  28522. "message": {
  28523. "type": "string"
  28524. },
  28525. "kind": {
  28526. "type": "string",
  28527. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  28528. }
  28529. }
  28530. }
  28531. }
  28532. }
  28533. }
  28534. },
  28535. "security": [],
  28536. "tags": [
  28537. {
  28538. "name": "control",
  28539. "description": "Control plane routes."
  28540. },
  28541. {
  28542. "name": "controlPlane",
  28543. "description": "Control-plane orchestration routes."
  28544. },
  28545. {
  28546. "name": "global",
  28547. "description": "Global server routes."
  28548. },
  28549. {
  28550. "name": "event",
  28551. "description": "Instance event stream route."
  28552. },
  28553. {
  28554. "name": "config",
  28555. "description": "Experimental HttpApi config routes."
  28556. },
  28557. {
  28558. "name": "experimental",
  28559. "description": "Experimental HttpApi read-only routes."
  28560. },
  28561. {
  28562. "name": "file",
  28563. "description": "Experimental HttpApi file routes."
  28564. },
  28565. {
  28566. "name": "instance",
  28567. "description": "Experimental HttpApi instance read routes."
  28568. },
  28569. {
  28570. "name": "mcp",
  28571. "description": "Experimental HttpApi MCP routes."
  28572. },
  28573. {
  28574. "name": "project",
  28575. "description": "Experimental HttpApi project routes."
  28576. },
  28577. {
  28578. "name": "projectCopy",
  28579. "description": "Project copy management routes."
  28580. },
  28581. {
  28582. "name": "pty",
  28583. "description": "Experimental HttpApi PTY routes."
  28584. },
  28585. {
  28586. "name": "question",
  28587. "description": "Question routes."
  28588. },
  28589. {
  28590. "name": "permission",
  28591. "description": "Experimental HttpApi permission routes."
  28592. },
  28593. {
  28594. "name": "provider",
  28595. "description": "Experimental HttpApi provider routes."
  28596. },
  28597. {
  28598. "name": "session",
  28599. "description": "Experimental HttpApi session routes."
  28600. },
  28601. {
  28602. "name": "sync",
  28603. "description": "Experimental HttpApi sync routes."
  28604. },
  28605. {
  28606. "name": "tui",
  28607. "description": "Experimental HttpApi TUI routes."
  28608. },
  28609. {
  28610. "name": "workspace",
  28611. "description": "Experimental HttpApi workspace routes."
  28612. },
  28613. {
  28614. "name": "opencode experimental HttpApi",
  28615. "description": "Experimental HttpApi surface for selected instance routes."
  28616. },
  28617. {
  28618. "name": "opencode experimental HttpApi",
  28619. "description": "Experimental HttpApi surface for selected instance routes."
  28620. },
  28621. {
  28622. "name": "v2",
  28623. "description": "Experimental v2 routes."
  28624. },
  28625. {
  28626. "name": "v2 messages",
  28627. "description": "Experimental v2 message routes."
  28628. },
  28629. {
  28630. "name": "v2 models",
  28631. "description": "Experimental v2 model routes."
  28632. },
  28633. {
  28634. "name": "v2 providers",
  28635. "description": "Experimental v2 provider routes."
  28636. },
  28637. {
  28638. "name": "v2 permissions",
  28639. "description": "Experimental v2 permission routes."
  28640. },
  28641. {
  28642. "name": "v2 session permissions",
  28643. "description": "Experimental v2 session permission routes."
  28644. },
  28645. {
  28646. "name": "v2 saved permissions",
  28647. "description": "Experimental v2 saved permission routes."
  28648. },
  28649. {
  28650. "name": "v2 filesystem",
  28651. "description": "Experimental v2 location-scoped filesystem routes."
  28652. },
  28653. {
  28654. "name": "v2 commands",
  28655. "description": "Experimental v2 command routes."
  28656. },
  28657. {
  28658. "name": "v2 skills",
  28659. "description": "Experimental v2 skill routes."
  28660. },
  28661. {
  28662. "name": "v2 events",
  28663. "description": "Experimental v2 event stream route."
  28664. },
  28665. {
  28666. "name": "v2 questions",
  28667. "description": "Experimental v2 question routes."
  28668. },
  28669. {
  28670. "name": "v2 session questions",
  28671. "description": "Experimental v2 session question routes."
  28672. },
  28673. {
  28674. "name": "pty",
  28675. "description": "PTY websocket route."
  28676. }
  28677. ]
  28678. }