openapi.json 788 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847
  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/resource": {
  1572. "get": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.resource.list",
  1575. "parameters": [
  1576. {
  1577. "name": "directory",
  1578. "in": "query",
  1579. "schema": {
  1580. "type": "string"
  1581. },
  1582. "required": false
  1583. },
  1584. {
  1585. "name": "workspace",
  1586. "in": "query",
  1587. "schema": {
  1588. "type": "string"
  1589. },
  1590. "required": false
  1591. }
  1592. ],
  1593. "responses": {
  1594. "200": {
  1595. "description": "MCP resources",
  1596. "content": {
  1597. "application/json": {
  1598. "schema": {
  1599. "type": "object",
  1600. "additionalProperties": {
  1601. "$ref": "#/components/schemas/McpResource"
  1602. },
  1603. "description": "MCP resources"
  1604. }
  1605. }
  1606. }
  1607. },
  1608. "400": {
  1609. "description": "Bad request",
  1610. "content": {
  1611. "application/json": {
  1612. "schema": {
  1613. "$ref": "#/components/schemas/BadRequestError"
  1614. }
  1615. }
  1616. }
  1617. }
  1618. },
  1619. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1620. "summary": "Get MCP resources",
  1621. "x-codeSamples": [
  1622. {
  1623. "lang": "js",
  1624. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1625. }
  1626. ]
  1627. }
  1628. },
  1629. "/find": {
  1630. "get": {
  1631. "tags": ["file"],
  1632. "operationId": "find.text",
  1633. "parameters": [
  1634. {
  1635. "name": "directory",
  1636. "in": "query",
  1637. "schema": {
  1638. "type": "string"
  1639. },
  1640. "required": false
  1641. },
  1642. {
  1643. "name": "workspace",
  1644. "in": "query",
  1645. "schema": {
  1646. "type": "string"
  1647. },
  1648. "required": false
  1649. },
  1650. {
  1651. "name": "pattern",
  1652. "in": "query",
  1653. "schema": {
  1654. "type": "string"
  1655. },
  1656. "required": true
  1657. }
  1658. ],
  1659. "responses": {
  1660. "200": {
  1661. "description": "Matches",
  1662. "content": {
  1663. "application/json": {
  1664. "schema": {
  1665. "type": "array",
  1666. "items": {
  1667. "type": "object",
  1668. "properties": {
  1669. "path": {
  1670. "type": "object",
  1671. "properties": {
  1672. "text": {
  1673. "type": "string"
  1674. }
  1675. },
  1676. "required": ["text"],
  1677. "additionalProperties": false
  1678. },
  1679. "lines": {
  1680. "type": "object",
  1681. "properties": {
  1682. "text": {
  1683. "type": "string"
  1684. }
  1685. },
  1686. "required": ["text"],
  1687. "additionalProperties": false
  1688. },
  1689. "line_number": {
  1690. "type": "integer",
  1691. "minimum": 0
  1692. },
  1693. "absolute_offset": {
  1694. "type": "integer",
  1695. "minimum": 0
  1696. },
  1697. "submatches": {
  1698. "type": "array",
  1699. "items": {
  1700. "type": "object",
  1701. "properties": {
  1702. "match": {
  1703. "type": "object",
  1704. "properties": {
  1705. "text": {
  1706. "type": "string"
  1707. }
  1708. },
  1709. "required": ["text"],
  1710. "additionalProperties": false
  1711. },
  1712. "start": {
  1713. "type": "integer",
  1714. "minimum": 0
  1715. },
  1716. "end": {
  1717. "type": "integer",
  1718. "minimum": 0
  1719. }
  1720. },
  1721. "required": ["match", "start", "end"],
  1722. "additionalProperties": false
  1723. }
  1724. }
  1725. },
  1726. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1727. "additionalProperties": false
  1728. },
  1729. "description": "Matches"
  1730. }
  1731. }
  1732. }
  1733. },
  1734. "400": {
  1735. "description": "Bad request",
  1736. "content": {
  1737. "application/json": {
  1738. "schema": {
  1739. "$ref": "#/components/schemas/BadRequestError"
  1740. }
  1741. }
  1742. }
  1743. }
  1744. },
  1745. "description": "Search for text patterns across files in the project using ripgrep.",
  1746. "summary": "Find text",
  1747. "x-codeSamples": [
  1748. {
  1749. "lang": "js",
  1750. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1751. }
  1752. ]
  1753. }
  1754. },
  1755. "/find/file": {
  1756. "get": {
  1757. "tags": ["file"],
  1758. "operationId": "find.files",
  1759. "parameters": [
  1760. {
  1761. "name": "directory",
  1762. "in": "query",
  1763. "schema": {
  1764. "type": "string"
  1765. },
  1766. "required": false
  1767. },
  1768. {
  1769. "name": "workspace",
  1770. "in": "query",
  1771. "schema": {
  1772. "type": "string"
  1773. },
  1774. "required": false
  1775. },
  1776. {
  1777. "name": "query",
  1778. "in": "query",
  1779. "schema": {
  1780. "type": "string"
  1781. },
  1782. "required": true
  1783. },
  1784. {
  1785. "name": "dirs",
  1786. "in": "query",
  1787. "schema": {
  1788. "type": "string",
  1789. "enum": ["true", "false"]
  1790. },
  1791. "required": false
  1792. },
  1793. {
  1794. "name": "type",
  1795. "in": "query",
  1796. "schema": {
  1797. "type": "string",
  1798. "enum": ["file", "directory"]
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "limit",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "integer",
  1807. "minimum": 1,
  1808. "maximum": 200
  1809. },
  1810. "required": false
  1811. }
  1812. ],
  1813. "responses": {
  1814. "200": {
  1815. "description": "File paths",
  1816. "content": {
  1817. "application/json": {
  1818. "schema": {
  1819. "type": "array",
  1820. "items": {
  1821. "type": "string"
  1822. },
  1823. "description": "File paths"
  1824. }
  1825. }
  1826. }
  1827. },
  1828. "400": {
  1829. "description": "Bad request",
  1830. "content": {
  1831. "application/json": {
  1832. "schema": {
  1833. "$ref": "#/components/schemas/BadRequestError"
  1834. }
  1835. }
  1836. }
  1837. }
  1838. },
  1839. "description": "Search for files or directories by name or pattern in the project directory.",
  1840. "summary": "Find files",
  1841. "x-codeSamples": [
  1842. {
  1843. "lang": "js",
  1844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1845. }
  1846. ]
  1847. }
  1848. },
  1849. "/find/symbol": {
  1850. "get": {
  1851. "tags": ["file"],
  1852. "operationId": "find.symbols",
  1853. "parameters": [
  1854. {
  1855. "name": "directory",
  1856. "in": "query",
  1857. "schema": {
  1858. "type": "string"
  1859. },
  1860. "required": false
  1861. },
  1862. {
  1863. "name": "workspace",
  1864. "in": "query",
  1865. "schema": {
  1866. "type": "string"
  1867. },
  1868. "required": false
  1869. },
  1870. {
  1871. "name": "query",
  1872. "in": "query",
  1873. "schema": {
  1874. "type": "string"
  1875. },
  1876. "required": true
  1877. }
  1878. ],
  1879. "responses": {
  1880. "200": {
  1881. "description": "Symbols",
  1882. "content": {
  1883. "application/json": {
  1884. "schema": {
  1885. "type": "array",
  1886. "items": {
  1887. "$ref": "#/components/schemas/Symbol"
  1888. },
  1889. "description": "Symbols"
  1890. }
  1891. }
  1892. }
  1893. },
  1894. "400": {
  1895. "description": "Bad request",
  1896. "content": {
  1897. "application/json": {
  1898. "schema": {
  1899. "$ref": "#/components/schemas/BadRequestError"
  1900. }
  1901. }
  1902. }
  1903. }
  1904. },
  1905. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1906. "summary": "Find symbols",
  1907. "x-codeSamples": [
  1908. {
  1909. "lang": "js",
  1910. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1911. }
  1912. ]
  1913. }
  1914. },
  1915. "/file": {
  1916. "get": {
  1917. "tags": ["file"],
  1918. "operationId": "file.list",
  1919. "parameters": [
  1920. {
  1921. "name": "directory",
  1922. "in": "query",
  1923. "schema": {
  1924. "type": "string"
  1925. },
  1926. "required": false
  1927. },
  1928. {
  1929. "name": "workspace",
  1930. "in": "query",
  1931. "schema": {
  1932. "type": "string"
  1933. },
  1934. "required": false
  1935. },
  1936. {
  1937. "name": "path",
  1938. "in": "query",
  1939. "schema": {
  1940. "type": "string"
  1941. },
  1942. "required": true
  1943. }
  1944. ],
  1945. "responses": {
  1946. "200": {
  1947. "description": "Files and directories",
  1948. "content": {
  1949. "application/json": {
  1950. "schema": {
  1951. "type": "array",
  1952. "items": {
  1953. "$ref": "#/components/schemas/FileNode"
  1954. },
  1955. "description": "Files and directories"
  1956. }
  1957. }
  1958. }
  1959. },
  1960. "400": {
  1961. "description": "Bad request",
  1962. "content": {
  1963. "application/json": {
  1964. "schema": {
  1965. "$ref": "#/components/schemas/BadRequestError"
  1966. }
  1967. }
  1968. }
  1969. }
  1970. },
  1971. "description": "List files and directories in a specified path.",
  1972. "summary": "List files",
  1973. "x-codeSamples": [
  1974. {
  1975. "lang": "js",
  1976. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1977. }
  1978. ]
  1979. }
  1980. },
  1981. "/file/content": {
  1982. "get": {
  1983. "tags": ["file"],
  1984. "operationId": "file.read",
  1985. "parameters": [
  1986. {
  1987. "name": "directory",
  1988. "in": "query",
  1989. "schema": {
  1990. "type": "string"
  1991. },
  1992. "required": false
  1993. },
  1994. {
  1995. "name": "workspace",
  1996. "in": "query",
  1997. "schema": {
  1998. "type": "string"
  1999. },
  2000. "required": false
  2001. },
  2002. {
  2003. "name": "path",
  2004. "in": "query",
  2005. "schema": {
  2006. "type": "string"
  2007. },
  2008. "required": true
  2009. }
  2010. ],
  2011. "responses": {
  2012. "200": {
  2013. "description": "File content",
  2014. "content": {
  2015. "application/json": {
  2016. "schema": {
  2017. "$ref": "#/components/schemas/FileContent"
  2018. }
  2019. }
  2020. }
  2021. },
  2022. "400": {
  2023. "description": "Bad request",
  2024. "content": {
  2025. "application/json": {
  2026. "schema": {
  2027. "$ref": "#/components/schemas/BadRequestError"
  2028. }
  2029. }
  2030. }
  2031. }
  2032. },
  2033. "description": "Read the content of a specified file.",
  2034. "summary": "Read file",
  2035. "x-codeSamples": [
  2036. {
  2037. "lang": "js",
  2038. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2039. }
  2040. ]
  2041. }
  2042. },
  2043. "/file/status": {
  2044. "get": {
  2045. "tags": ["file"],
  2046. "operationId": "file.status",
  2047. "parameters": [
  2048. {
  2049. "name": "directory",
  2050. "in": "query",
  2051. "schema": {
  2052. "type": "string"
  2053. },
  2054. "required": false
  2055. },
  2056. {
  2057. "name": "workspace",
  2058. "in": "query",
  2059. "schema": {
  2060. "type": "string"
  2061. },
  2062. "required": false
  2063. }
  2064. ],
  2065. "responses": {
  2066. "200": {
  2067. "description": "File status",
  2068. "content": {
  2069. "application/json": {
  2070. "schema": {
  2071. "type": "array",
  2072. "items": {
  2073. "$ref": "#/components/schemas/File"
  2074. },
  2075. "description": "File status"
  2076. }
  2077. }
  2078. }
  2079. },
  2080. "400": {
  2081. "description": "Bad request",
  2082. "content": {
  2083. "application/json": {
  2084. "schema": {
  2085. "$ref": "#/components/schemas/BadRequestError"
  2086. }
  2087. }
  2088. }
  2089. }
  2090. },
  2091. "description": "Get the git status of all files in the project.",
  2092. "summary": "Get file status",
  2093. "x-codeSamples": [
  2094. {
  2095. "lang": "js",
  2096. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2097. }
  2098. ]
  2099. }
  2100. },
  2101. "/instance/dispose": {
  2102. "post": {
  2103. "tags": ["instance"],
  2104. "operationId": "instance.dispose",
  2105. "parameters": [
  2106. {
  2107. "name": "directory",
  2108. "in": "query",
  2109. "schema": {
  2110. "type": "string"
  2111. },
  2112. "required": false
  2113. },
  2114. {
  2115. "name": "workspace",
  2116. "in": "query",
  2117. "schema": {
  2118. "type": "string"
  2119. },
  2120. "required": false
  2121. }
  2122. ],
  2123. "responses": {
  2124. "200": {
  2125. "description": "Instance disposed",
  2126. "content": {
  2127. "application/json": {
  2128. "schema": {
  2129. "type": "boolean",
  2130. "description": "Instance disposed"
  2131. }
  2132. }
  2133. }
  2134. },
  2135. "400": {
  2136. "description": "Bad request",
  2137. "content": {
  2138. "application/json": {
  2139. "schema": {
  2140. "$ref": "#/components/schemas/BadRequestError"
  2141. }
  2142. }
  2143. }
  2144. }
  2145. },
  2146. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2147. "summary": "Dispose instance",
  2148. "x-codeSamples": [
  2149. {
  2150. "lang": "js",
  2151. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2152. }
  2153. ]
  2154. }
  2155. },
  2156. "/path": {
  2157. "get": {
  2158. "tags": ["instance"],
  2159. "operationId": "path.get",
  2160. "parameters": [
  2161. {
  2162. "name": "directory",
  2163. "in": "query",
  2164. "schema": {
  2165. "type": "string"
  2166. },
  2167. "required": false
  2168. },
  2169. {
  2170. "name": "workspace",
  2171. "in": "query",
  2172. "schema": {
  2173. "type": "string"
  2174. },
  2175. "required": false
  2176. }
  2177. ],
  2178. "responses": {
  2179. "200": {
  2180. "description": "Path",
  2181. "content": {
  2182. "application/json": {
  2183. "schema": {
  2184. "$ref": "#/components/schemas/Path"
  2185. }
  2186. }
  2187. }
  2188. },
  2189. "400": {
  2190. "description": "Bad request",
  2191. "content": {
  2192. "application/json": {
  2193. "schema": {
  2194. "$ref": "#/components/schemas/BadRequestError"
  2195. }
  2196. }
  2197. }
  2198. }
  2199. },
  2200. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2201. "summary": "Get paths",
  2202. "x-codeSamples": [
  2203. {
  2204. "lang": "js",
  2205. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2206. }
  2207. ]
  2208. }
  2209. },
  2210. "/vcs": {
  2211. "get": {
  2212. "tags": ["instance"],
  2213. "operationId": "vcs.get",
  2214. "parameters": [
  2215. {
  2216. "name": "directory",
  2217. "in": "query",
  2218. "schema": {
  2219. "type": "string"
  2220. },
  2221. "required": false
  2222. },
  2223. {
  2224. "name": "workspace",
  2225. "in": "query",
  2226. "schema": {
  2227. "type": "string"
  2228. },
  2229. "required": false
  2230. }
  2231. ],
  2232. "responses": {
  2233. "200": {
  2234. "description": "VCS info",
  2235. "content": {
  2236. "application/json": {
  2237. "schema": {
  2238. "$ref": "#/components/schemas/VcsInfo"
  2239. }
  2240. }
  2241. }
  2242. },
  2243. "400": {
  2244. "description": "Bad request",
  2245. "content": {
  2246. "application/json": {
  2247. "schema": {
  2248. "$ref": "#/components/schemas/BadRequestError"
  2249. }
  2250. }
  2251. }
  2252. }
  2253. },
  2254. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2255. "summary": "Get VCS info",
  2256. "x-codeSamples": [
  2257. {
  2258. "lang": "js",
  2259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2260. }
  2261. ]
  2262. }
  2263. },
  2264. "/vcs/status": {
  2265. "get": {
  2266. "tags": ["instance"],
  2267. "operationId": "vcs.status",
  2268. "parameters": [
  2269. {
  2270. "name": "directory",
  2271. "in": "query",
  2272. "schema": {
  2273. "type": "string"
  2274. },
  2275. "required": false
  2276. },
  2277. {
  2278. "name": "workspace",
  2279. "in": "query",
  2280. "schema": {
  2281. "type": "string"
  2282. },
  2283. "required": false
  2284. }
  2285. ],
  2286. "responses": {
  2287. "200": {
  2288. "description": "VCS status",
  2289. "content": {
  2290. "application/json": {
  2291. "schema": {
  2292. "type": "array",
  2293. "items": {
  2294. "$ref": "#/components/schemas/VcsFileStatus"
  2295. },
  2296. "description": "VCS status"
  2297. }
  2298. }
  2299. }
  2300. },
  2301. "400": {
  2302. "description": "Bad request",
  2303. "content": {
  2304. "application/json": {
  2305. "schema": {
  2306. "$ref": "#/components/schemas/BadRequestError"
  2307. }
  2308. }
  2309. }
  2310. }
  2311. },
  2312. "description": "Retrieve changed files in the current working tree without patches.",
  2313. "summary": "Get VCS status",
  2314. "x-codeSamples": [
  2315. {
  2316. "lang": "js",
  2317. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2318. }
  2319. ]
  2320. }
  2321. },
  2322. "/vcs/diff": {
  2323. "get": {
  2324. "tags": ["instance"],
  2325. "operationId": "vcs.diff",
  2326. "parameters": [
  2327. {
  2328. "name": "directory",
  2329. "in": "query",
  2330. "schema": {
  2331. "type": "string"
  2332. },
  2333. "required": false
  2334. },
  2335. {
  2336. "name": "workspace",
  2337. "in": "query",
  2338. "schema": {
  2339. "type": "string"
  2340. },
  2341. "required": false
  2342. },
  2343. {
  2344. "name": "mode",
  2345. "in": "query",
  2346. "schema": {
  2347. "type": "string",
  2348. "enum": ["git", "branch"]
  2349. },
  2350. "required": true
  2351. },
  2352. {
  2353. "name": "context",
  2354. "in": "query",
  2355. "schema": {
  2356. "type": "integer",
  2357. "minimum": 0
  2358. },
  2359. "required": false
  2360. }
  2361. ],
  2362. "responses": {
  2363. "200": {
  2364. "description": "VCS diff",
  2365. "content": {
  2366. "application/json": {
  2367. "schema": {
  2368. "type": "array",
  2369. "items": {
  2370. "$ref": "#/components/schemas/VcsFileDiff"
  2371. },
  2372. "description": "VCS diff"
  2373. }
  2374. }
  2375. }
  2376. },
  2377. "400": {
  2378. "description": "Bad request",
  2379. "content": {
  2380. "application/json": {
  2381. "schema": {
  2382. "$ref": "#/components/schemas/BadRequestError"
  2383. }
  2384. }
  2385. }
  2386. }
  2387. },
  2388. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2389. "summary": "Get VCS diff",
  2390. "x-codeSamples": [
  2391. {
  2392. "lang": "js",
  2393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2394. }
  2395. ]
  2396. }
  2397. },
  2398. "/vcs/diff/raw": {
  2399. "get": {
  2400. "tags": ["instance"],
  2401. "operationId": "vcs.diff.raw",
  2402. "parameters": [
  2403. {
  2404. "name": "directory",
  2405. "in": "query",
  2406. "schema": {
  2407. "type": "string"
  2408. },
  2409. "required": false
  2410. },
  2411. {
  2412. "name": "workspace",
  2413. "in": "query",
  2414. "schema": {
  2415. "type": "string"
  2416. },
  2417. "required": false
  2418. }
  2419. ],
  2420. "responses": {
  2421. "200": {
  2422. "description": "Raw VCS diff",
  2423. "content": {
  2424. "text/x-diff; charset=utf-8": {
  2425. "schema": {
  2426. "type": "string"
  2427. }
  2428. }
  2429. }
  2430. },
  2431. "400": {
  2432. "description": "Bad request",
  2433. "content": {
  2434. "application/json": {
  2435. "schema": {
  2436. "$ref": "#/components/schemas/BadRequestError"
  2437. }
  2438. }
  2439. }
  2440. }
  2441. },
  2442. "description": "Retrieve a raw patch for current uncommitted changes.",
  2443. "summary": "Get raw VCS diff",
  2444. "x-codeSamples": [
  2445. {
  2446. "lang": "js",
  2447. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2448. }
  2449. ]
  2450. }
  2451. },
  2452. "/vcs/apply": {
  2453. "post": {
  2454. "tags": ["instance"],
  2455. "operationId": "vcs.apply",
  2456. "parameters": [
  2457. {
  2458. "name": "directory",
  2459. "in": "query",
  2460. "schema": {
  2461. "type": "string"
  2462. },
  2463. "required": false
  2464. },
  2465. {
  2466. "name": "workspace",
  2467. "in": "query",
  2468. "schema": {
  2469. "type": "string"
  2470. },
  2471. "required": false
  2472. }
  2473. ],
  2474. "responses": {
  2475. "200": {
  2476. "description": "VCS patch applied",
  2477. "content": {
  2478. "application/json": {
  2479. "schema": {
  2480. "type": "object",
  2481. "properties": {
  2482. "applied": {
  2483. "type": "boolean"
  2484. }
  2485. },
  2486. "required": ["applied"],
  2487. "additionalProperties": false,
  2488. "description": "VCS patch applied"
  2489. }
  2490. }
  2491. }
  2492. },
  2493. "400": {
  2494. "description": "VcsApplyError | InvalidRequestError",
  2495. "content": {
  2496. "application/json": {
  2497. "schema": {
  2498. "anyOf": [
  2499. {
  2500. "$ref": "#/components/schemas/VcsApplyError"
  2501. },
  2502. {
  2503. "$ref": "#/components/schemas/InvalidRequestError"
  2504. }
  2505. ]
  2506. }
  2507. }
  2508. }
  2509. }
  2510. },
  2511. "description": "Apply a raw patch to the current working tree.",
  2512. "summary": "Apply VCS patch",
  2513. "requestBody": {
  2514. "content": {
  2515. "application/json": {
  2516. "schema": {
  2517. "type": "object",
  2518. "properties": {
  2519. "patch": {
  2520. "type": "string"
  2521. }
  2522. },
  2523. "required": ["patch"],
  2524. "additionalProperties": false
  2525. }
  2526. }
  2527. }
  2528. },
  2529. "x-codeSamples": [
  2530. {
  2531. "lang": "js",
  2532. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2533. }
  2534. ]
  2535. }
  2536. },
  2537. "/command": {
  2538. "get": {
  2539. "tags": ["instance"],
  2540. "operationId": "command.list",
  2541. "parameters": [
  2542. {
  2543. "name": "directory",
  2544. "in": "query",
  2545. "schema": {
  2546. "type": "string"
  2547. },
  2548. "required": false
  2549. },
  2550. {
  2551. "name": "workspace",
  2552. "in": "query",
  2553. "schema": {
  2554. "type": "string"
  2555. },
  2556. "required": false
  2557. }
  2558. ],
  2559. "responses": {
  2560. "200": {
  2561. "description": "List of commands",
  2562. "content": {
  2563. "application/json": {
  2564. "schema": {
  2565. "type": "array",
  2566. "items": {
  2567. "$ref": "#/components/schemas/Command"
  2568. },
  2569. "description": "List of commands"
  2570. }
  2571. }
  2572. }
  2573. },
  2574. "400": {
  2575. "description": "Bad request",
  2576. "content": {
  2577. "application/json": {
  2578. "schema": {
  2579. "$ref": "#/components/schemas/BadRequestError"
  2580. }
  2581. }
  2582. }
  2583. }
  2584. },
  2585. "description": "Get a list of all available commands in the OpenCode system.",
  2586. "summary": "List commands",
  2587. "x-codeSamples": [
  2588. {
  2589. "lang": "js",
  2590. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2591. }
  2592. ]
  2593. }
  2594. },
  2595. "/agent": {
  2596. "get": {
  2597. "tags": ["instance"],
  2598. "operationId": "app.agents",
  2599. "parameters": [
  2600. {
  2601. "name": "directory",
  2602. "in": "query",
  2603. "schema": {
  2604. "type": "string"
  2605. },
  2606. "required": false
  2607. },
  2608. {
  2609. "name": "workspace",
  2610. "in": "query",
  2611. "schema": {
  2612. "type": "string"
  2613. },
  2614. "required": false
  2615. }
  2616. ],
  2617. "responses": {
  2618. "200": {
  2619. "description": "List of agents",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "type": "array",
  2624. "items": {
  2625. "$ref": "#/components/schemas/Agent"
  2626. },
  2627. "description": "List of agents"
  2628. }
  2629. }
  2630. }
  2631. },
  2632. "400": {
  2633. "description": "Bad request",
  2634. "content": {
  2635. "application/json": {
  2636. "schema": {
  2637. "$ref": "#/components/schemas/BadRequestError"
  2638. }
  2639. }
  2640. }
  2641. }
  2642. },
  2643. "description": "Get a list of all available AI agents in the OpenCode system.",
  2644. "summary": "List agents",
  2645. "x-codeSamples": [
  2646. {
  2647. "lang": "js",
  2648. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2649. }
  2650. ]
  2651. }
  2652. },
  2653. "/skill": {
  2654. "get": {
  2655. "tags": ["instance"],
  2656. "operationId": "app.skills",
  2657. "parameters": [
  2658. {
  2659. "name": "directory",
  2660. "in": "query",
  2661. "schema": {
  2662. "type": "string"
  2663. },
  2664. "required": false
  2665. },
  2666. {
  2667. "name": "workspace",
  2668. "in": "query",
  2669. "schema": {
  2670. "type": "string"
  2671. },
  2672. "required": false
  2673. }
  2674. ],
  2675. "responses": {
  2676. "200": {
  2677. "description": "List of skills",
  2678. "content": {
  2679. "application/json": {
  2680. "schema": {
  2681. "type": "array",
  2682. "items": {
  2683. "type": "object",
  2684. "properties": {
  2685. "name": {
  2686. "type": "string"
  2687. },
  2688. "description": {
  2689. "type": "string"
  2690. },
  2691. "location": {
  2692. "type": "string"
  2693. },
  2694. "content": {
  2695. "type": "string"
  2696. }
  2697. },
  2698. "required": ["name", "location", "content"],
  2699. "additionalProperties": false
  2700. },
  2701. "description": "List of skills"
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "400": {
  2707. "description": "Bad request",
  2708. "content": {
  2709. "application/json": {
  2710. "schema": {
  2711. "$ref": "#/components/schemas/BadRequestError"
  2712. }
  2713. }
  2714. }
  2715. }
  2716. },
  2717. "description": "Get a list of all available skills in the OpenCode system.",
  2718. "summary": "List skills",
  2719. "x-codeSamples": [
  2720. {
  2721. "lang": "js",
  2722. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2723. }
  2724. ]
  2725. }
  2726. },
  2727. "/lsp": {
  2728. "get": {
  2729. "tags": ["instance"],
  2730. "operationId": "lsp.status",
  2731. "parameters": [
  2732. {
  2733. "name": "directory",
  2734. "in": "query",
  2735. "schema": {
  2736. "type": "string"
  2737. },
  2738. "required": false
  2739. },
  2740. {
  2741. "name": "workspace",
  2742. "in": "query",
  2743. "schema": {
  2744. "type": "string"
  2745. },
  2746. "required": false
  2747. }
  2748. ],
  2749. "responses": {
  2750. "200": {
  2751. "description": "LSP server status",
  2752. "content": {
  2753. "application/json": {
  2754. "schema": {
  2755. "type": "array",
  2756. "items": {
  2757. "$ref": "#/components/schemas/LSPStatus"
  2758. },
  2759. "description": "LSP server status"
  2760. }
  2761. }
  2762. }
  2763. },
  2764. "400": {
  2765. "description": "Bad request",
  2766. "content": {
  2767. "application/json": {
  2768. "schema": {
  2769. "$ref": "#/components/schemas/BadRequestError"
  2770. }
  2771. }
  2772. }
  2773. }
  2774. },
  2775. "description": "Get LSP server status",
  2776. "summary": "Get LSP status",
  2777. "x-codeSamples": [
  2778. {
  2779. "lang": "js",
  2780. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2781. }
  2782. ]
  2783. }
  2784. },
  2785. "/formatter": {
  2786. "get": {
  2787. "tags": ["instance"],
  2788. "operationId": "formatter.status",
  2789. "parameters": [
  2790. {
  2791. "name": "directory",
  2792. "in": "query",
  2793. "schema": {
  2794. "type": "string"
  2795. },
  2796. "required": false
  2797. },
  2798. {
  2799. "name": "workspace",
  2800. "in": "query",
  2801. "schema": {
  2802. "type": "string"
  2803. },
  2804. "required": false
  2805. }
  2806. ],
  2807. "responses": {
  2808. "200": {
  2809. "description": "Formatter status",
  2810. "content": {
  2811. "application/json": {
  2812. "schema": {
  2813. "type": "array",
  2814. "items": {
  2815. "$ref": "#/components/schemas/FormatterStatus"
  2816. },
  2817. "description": "Formatter status"
  2818. }
  2819. }
  2820. }
  2821. },
  2822. "400": {
  2823. "description": "Bad request",
  2824. "content": {
  2825. "application/json": {
  2826. "schema": {
  2827. "$ref": "#/components/schemas/BadRequestError"
  2828. }
  2829. }
  2830. }
  2831. }
  2832. },
  2833. "description": "Get formatter status",
  2834. "summary": "Get formatter status",
  2835. "x-codeSamples": [
  2836. {
  2837. "lang": "js",
  2838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2839. }
  2840. ]
  2841. }
  2842. },
  2843. "/mcp": {
  2844. "get": {
  2845. "tags": ["mcp"],
  2846. "operationId": "mcp.status",
  2847. "parameters": [
  2848. {
  2849. "name": "directory",
  2850. "in": "query",
  2851. "schema": {
  2852. "type": "string"
  2853. },
  2854. "required": false
  2855. },
  2856. {
  2857. "name": "workspace",
  2858. "in": "query",
  2859. "schema": {
  2860. "type": "string"
  2861. },
  2862. "required": false
  2863. }
  2864. ],
  2865. "responses": {
  2866. "200": {
  2867. "description": "MCP server status",
  2868. "content": {
  2869. "application/json": {
  2870. "schema": {
  2871. "type": "object",
  2872. "additionalProperties": {
  2873. "$ref": "#/components/schemas/MCPStatus"
  2874. },
  2875. "description": "MCP server status"
  2876. }
  2877. }
  2878. }
  2879. },
  2880. "400": {
  2881. "description": "Bad request",
  2882. "content": {
  2883. "application/json": {
  2884. "schema": {
  2885. "$ref": "#/components/schemas/BadRequestError"
  2886. }
  2887. }
  2888. }
  2889. }
  2890. },
  2891. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2892. "summary": "Get MCP status",
  2893. "x-codeSamples": [
  2894. {
  2895. "lang": "js",
  2896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2897. }
  2898. ]
  2899. },
  2900. "post": {
  2901. "tags": ["mcp"],
  2902. "operationId": "mcp.add",
  2903. "parameters": [
  2904. {
  2905. "name": "directory",
  2906. "in": "query",
  2907. "schema": {
  2908. "type": "string"
  2909. },
  2910. "required": false
  2911. },
  2912. {
  2913. "name": "workspace",
  2914. "in": "query",
  2915. "schema": {
  2916. "type": "string"
  2917. },
  2918. "required": false
  2919. }
  2920. ],
  2921. "responses": {
  2922. "200": {
  2923. "description": "MCP server added successfully",
  2924. "content": {
  2925. "application/json": {
  2926. "schema": {
  2927. "type": "object",
  2928. "additionalProperties": {
  2929. "$ref": "#/components/schemas/MCPStatus"
  2930. },
  2931. "description": "MCP server added successfully"
  2932. }
  2933. }
  2934. }
  2935. },
  2936. "400": {
  2937. "description": "BadRequest | InvalidRequestError",
  2938. "content": {
  2939. "application/json": {
  2940. "schema": {
  2941. "anyOf": [
  2942. {
  2943. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2944. },
  2945. {
  2946. "$ref": "#/components/schemas/InvalidRequestError"
  2947. }
  2948. ]
  2949. }
  2950. }
  2951. }
  2952. }
  2953. },
  2954. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2955. "summary": "Add MCP server",
  2956. "requestBody": {
  2957. "content": {
  2958. "application/json": {
  2959. "schema": {
  2960. "type": "object",
  2961. "properties": {
  2962. "name": {
  2963. "type": "string"
  2964. },
  2965. "config": {
  2966. "anyOf": [
  2967. {
  2968. "$ref": "#/components/schemas/McpLocalConfig"
  2969. },
  2970. {
  2971. "$ref": "#/components/schemas/McpRemoteConfig"
  2972. }
  2973. ]
  2974. }
  2975. },
  2976. "required": ["name", "config"],
  2977. "additionalProperties": false
  2978. }
  2979. }
  2980. }
  2981. },
  2982. "x-codeSamples": [
  2983. {
  2984. "lang": "js",
  2985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2986. }
  2987. ]
  2988. }
  2989. },
  2990. "/mcp/{name}/auth": {
  2991. "post": {
  2992. "tags": ["mcp"],
  2993. "operationId": "mcp.auth.start",
  2994. "parameters": [
  2995. {
  2996. "name": "name",
  2997. "in": "path",
  2998. "schema": {
  2999. "type": "string"
  3000. },
  3001. "required": true
  3002. },
  3003. {
  3004. "name": "directory",
  3005. "in": "query",
  3006. "schema": {
  3007. "type": "string"
  3008. },
  3009. "required": false
  3010. },
  3011. {
  3012. "name": "workspace",
  3013. "in": "query",
  3014. "schema": {
  3015. "type": "string"
  3016. },
  3017. "required": false
  3018. }
  3019. ],
  3020. "responses": {
  3021. "200": {
  3022. "description": "OAuth flow started",
  3023. "content": {
  3024. "application/json": {
  3025. "schema": {
  3026. "type": "object",
  3027. "properties": {
  3028. "authorizationUrl": {
  3029. "type": "string"
  3030. },
  3031. "oauthState": {
  3032. "type": "string"
  3033. }
  3034. },
  3035. "required": ["authorizationUrl", "oauthState"],
  3036. "additionalProperties": false,
  3037. "description": "OAuth flow started"
  3038. }
  3039. }
  3040. }
  3041. },
  3042. "400": {
  3043. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3044. "content": {
  3045. "application/json": {
  3046. "schema": {
  3047. "anyOf": [
  3048. {
  3049. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3050. },
  3051. {
  3052. "$ref": "#/components/schemas/InvalidRequestError"
  3053. }
  3054. ]
  3055. }
  3056. }
  3057. }
  3058. },
  3059. "404": {
  3060. "description": "McpServerNotFoundError",
  3061. "content": {
  3062. "application/json": {
  3063. "schema": {
  3064. "$ref": "#/components/schemas/McpServerNotFoundError"
  3065. }
  3066. }
  3067. }
  3068. }
  3069. },
  3070. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3071. "summary": "Start MCP OAuth",
  3072. "x-codeSamples": [
  3073. {
  3074. "lang": "js",
  3075. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3076. }
  3077. ]
  3078. },
  3079. "delete": {
  3080. "tags": ["mcp"],
  3081. "operationId": "mcp.auth.remove",
  3082. "parameters": [
  3083. {
  3084. "name": "name",
  3085. "in": "path",
  3086. "schema": {
  3087. "type": "string"
  3088. },
  3089. "required": true
  3090. },
  3091. {
  3092. "name": "directory",
  3093. "in": "query",
  3094. "schema": {
  3095. "type": "string"
  3096. },
  3097. "required": false
  3098. },
  3099. {
  3100. "name": "workspace",
  3101. "in": "query",
  3102. "schema": {
  3103. "type": "string"
  3104. },
  3105. "required": false
  3106. }
  3107. ],
  3108. "responses": {
  3109. "200": {
  3110. "description": "OAuth credentials removed",
  3111. "content": {
  3112. "application/json": {
  3113. "schema": {
  3114. "type": "object",
  3115. "properties": {
  3116. "success": {
  3117. "type": "boolean",
  3118. "enum": [true]
  3119. }
  3120. },
  3121. "required": ["success"],
  3122. "additionalProperties": false,
  3123. "description": "OAuth credentials removed"
  3124. }
  3125. }
  3126. }
  3127. },
  3128. "400": {
  3129. "description": "Bad request",
  3130. "content": {
  3131. "application/json": {
  3132. "schema": {
  3133. "$ref": "#/components/schemas/BadRequestError"
  3134. }
  3135. }
  3136. }
  3137. },
  3138. "404": {
  3139. "description": "McpServerNotFoundError",
  3140. "content": {
  3141. "application/json": {
  3142. "schema": {
  3143. "$ref": "#/components/schemas/McpServerNotFoundError"
  3144. }
  3145. }
  3146. }
  3147. }
  3148. },
  3149. "description": "Remove OAuth credentials for an MCP server.",
  3150. "summary": "Remove MCP OAuth",
  3151. "x-codeSamples": [
  3152. {
  3153. "lang": "js",
  3154. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3155. }
  3156. ]
  3157. }
  3158. },
  3159. "/mcp/{name}/auth/callback": {
  3160. "post": {
  3161. "tags": ["mcp"],
  3162. "operationId": "mcp.auth.callback",
  3163. "parameters": [
  3164. {
  3165. "name": "name",
  3166. "in": "path",
  3167. "schema": {
  3168. "type": "string"
  3169. },
  3170. "required": true
  3171. },
  3172. {
  3173. "name": "directory",
  3174. "in": "query",
  3175. "schema": {
  3176. "type": "string"
  3177. },
  3178. "required": false
  3179. },
  3180. {
  3181. "name": "workspace",
  3182. "in": "query",
  3183. "schema": {
  3184. "type": "string"
  3185. },
  3186. "required": false
  3187. }
  3188. ],
  3189. "responses": {
  3190. "200": {
  3191. "description": "OAuth authentication completed",
  3192. "content": {
  3193. "application/json": {
  3194. "schema": {
  3195. "$ref": "#/components/schemas/MCPStatus"
  3196. }
  3197. }
  3198. }
  3199. },
  3200. "400": {
  3201. "description": "BadRequest | InvalidRequestError",
  3202. "content": {
  3203. "application/json": {
  3204. "schema": {
  3205. "anyOf": [
  3206. {
  3207. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3208. },
  3209. {
  3210. "$ref": "#/components/schemas/InvalidRequestError"
  3211. }
  3212. ]
  3213. }
  3214. }
  3215. }
  3216. },
  3217. "404": {
  3218. "description": "McpServerNotFoundError",
  3219. "content": {
  3220. "application/json": {
  3221. "schema": {
  3222. "$ref": "#/components/schemas/McpServerNotFoundError"
  3223. }
  3224. }
  3225. }
  3226. }
  3227. },
  3228. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3229. "summary": "Complete MCP OAuth",
  3230. "requestBody": {
  3231. "content": {
  3232. "application/json": {
  3233. "schema": {
  3234. "type": "object",
  3235. "properties": {
  3236. "code": {
  3237. "type": "string"
  3238. }
  3239. },
  3240. "required": ["code"],
  3241. "additionalProperties": false
  3242. }
  3243. }
  3244. }
  3245. },
  3246. "x-codeSamples": [
  3247. {
  3248. "lang": "js",
  3249. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3250. }
  3251. ]
  3252. }
  3253. },
  3254. "/mcp/{name}/auth/authenticate": {
  3255. "post": {
  3256. "tags": ["mcp"],
  3257. "operationId": "mcp.auth.authenticate",
  3258. "parameters": [
  3259. {
  3260. "name": "name",
  3261. "in": "path",
  3262. "schema": {
  3263. "type": "string"
  3264. },
  3265. "required": true
  3266. },
  3267. {
  3268. "name": "directory",
  3269. "in": "query",
  3270. "schema": {
  3271. "type": "string"
  3272. },
  3273. "required": false
  3274. },
  3275. {
  3276. "name": "workspace",
  3277. "in": "query",
  3278. "schema": {
  3279. "type": "string"
  3280. },
  3281. "required": false
  3282. }
  3283. ],
  3284. "responses": {
  3285. "200": {
  3286. "description": "OAuth authentication completed",
  3287. "content": {
  3288. "application/json": {
  3289. "schema": {
  3290. "$ref": "#/components/schemas/MCPStatus"
  3291. }
  3292. }
  3293. }
  3294. },
  3295. "400": {
  3296. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3297. "content": {
  3298. "application/json": {
  3299. "schema": {
  3300. "anyOf": [
  3301. {
  3302. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3303. },
  3304. {
  3305. "$ref": "#/components/schemas/InvalidRequestError"
  3306. }
  3307. ]
  3308. }
  3309. }
  3310. }
  3311. },
  3312. "404": {
  3313. "description": "McpServerNotFoundError",
  3314. "content": {
  3315. "application/json": {
  3316. "schema": {
  3317. "$ref": "#/components/schemas/McpServerNotFoundError"
  3318. }
  3319. }
  3320. }
  3321. }
  3322. },
  3323. "description": "Start OAuth flow and wait for callback (opens browser).",
  3324. "summary": "Authenticate MCP OAuth",
  3325. "x-codeSamples": [
  3326. {
  3327. "lang": "js",
  3328. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3329. }
  3330. ]
  3331. }
  3332. },
  3333. "/mcp/{name}/connect": {
  3334. "post": {
  3335. "tags": ["mcp"],
  3336. "operationId": "mcp.connect",
  3337. "parameters": [
  3338. {
  3339. "name": "name",
  3340. "in": "path",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": true
  3345. },
  3346. {
  3347. "name": "directory",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. },
  3354. {
  3355. "name": "workspace",
  3356. "in": "query",
  3357. "schema": {
  3358. "type": "string"
  3359. },
  3360. "required": false
  3361. }
  3362. ],
  3363. "responses": {
  3364. "200": {
  3365. "description": "MCP server connected successfully",
  3366. "content": {
  3367. "application/json": {
  3368. "schema": {
  3369. "type": "boolean",
  3370. "description": "MCP server connected successfully"
  3371. }
  3372. }
  3373. }
  3374. },
  3375. "400": {
  3376. "description": "Bad request",
  3377. "content": {
  3378. "application/json": {
  3379. "schema": {
  3380. "$ref": "#/components/schemas/BadRequestError"
  3381. }
  3382. }
  3383. }
  3384. },
  3385. "404": {
  3386. "description": "McpServerNotFoundError",
  3387. "content": {
  3388. "application/json": {
  3389. "schema": {
  3390. "$ref": "#/components/schemas/McpServerNotFoundError"
  3391. }
  3392. }
  3393. }
  3394. }
  3395. },
  3396. "description": "Connect an MCP server.",
  3397. "x-codeSamples": [
  3398. {
  3399. "lang": "js",
  3400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3401. }
  3402. ]
  3403. }
  3404. },
  3405. "/mcp/{name}/disconnect": {
  3406. "post": {
  3407. "tags": ["mcp"],
  3408. "operationId": "mcp.disconnect",
  3409. "parameters": [
  3410. {
  3411. "name": "name",
  3412. "in": "path",
  3413. "schema": {
  3414. "type": "string"
  3415. },
  3416. "required": true
  3417. },
  3418. {
  3419. "name": "directory",
  3420. "in": "query",
  3421. "schema": {
  3422. "type": "string"
  3423. },
  3424. "required": false
  3425. },
  3426. {
  3427. "name": "workspace",
  3428. "in": "query",
  3429. "schema": {
  3430. "type": "string"
  3431. },
  3432. "required": false
  3433. }
  3434. ],
  3435. "responses": {
  3436. "200": {
  3437. "description": "MCP server disconnected successfully",
  3438. "content": {
  3439. "application/json": {
  3440. "schema": {
  3441. "type": "boolean",
  3442. "description": "MCP server disconnected successfully"
  3443. }
  3444. }
  3445. }
  3446. },
  3447. "400": {
  3448. "description": "Bad request",
  3449. "content": {
  3450. "application/json": {
  3451. "schema": {
  3452. "$ref": "#/components/schemas/BadRequestError"
  3453. }
  3454. }
  3455. }
  3456. },
  3457. "404": {
  3458. "description": "McpServerNotFoundError",
  3459. "content": {
  3460. "application/json": {
  3461. "schema": {
  3462. "$ref": "#/components/schemas/McpServerNotFoundError"
  3463. }
  3464. }
  3465. }
  3466. }
  3467. },
  3468. "description": "Disconnect an MCP server.",
  3469. "x-codeSamples": [
  3470. {
  3471. "lang": "js",
  3472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3473. }
  3474. ]
  3475. }
  3476. },
  3477. "/project": {
  3478. "get": {
  3479. "tags": ["project"],
  3480. "operationId": "project.list",
  3481. "parameters": [
  3482. {
  3483. "name": "directory",
  3484. "in": "query",
  3485. "schema": {
  3486. "type": "string"
  3487. },
  3488. "required": false
  3489. },
  3490. {
  3491. "name": "workspace",
  3492. "in": "query",
  3493. "schema": {
  3494. "type": "string"
  3495. },
  3496. "required": false
  3497. }
  3498. ],
  3499. "responses": {
  3500. "200": {
  3501. "description": "List of projects",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "type": "array",
  3506. "items": {
  3507. "$ref": "#/components/schemas/Project"
  3508. },
  3509. "description": "List of projects"
  3510. }
  3511. }
  3512. }
  3513. },
  3514. "400": {
  3515. "description": "Bad request",
  3516. "content": {
  3517. "application/json": {
  3518. "schema": {
  3519. "$ref": "#/components/schemas/BadRequestError"
  3520. }
  3521. }
  3522. }
  3523. }
  3524. },
  3525. "description": "Get a list of projects that have been opened with OpenCode.",
  3526. "summary": "List all projects",
  3527. "x-codeSamples": [
  3528. {
  3529. "lang": "js",
  3530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3531. }
  3532. ]
  3533. }
  3534. },
  3535. "/project/current": {
  3536. "get": {
  3537. "tags": ["project"],
  3538. "operationId": "project.current",
  3539. "parameters": [
  3540. {
  3541. "name": "directory",
  3542. "in": "query",
  3543. "schema": {
  3544. "type": "string"
  3545. },
  3546. "required": false
  3547. },
  3548. {
  3549. "name": "workspace",
  3550. "in": "query",
  3551. "schema": {
  3552. "type": "string"
  3553. },
  3554. "required": false
  3555. }
  3556. ],
  3557. "responses": {
  3558. "200": {
  3559. "description": "Current project information",
  3560. "content": {
  3561. "application/json": {
  3562. "schema": {
  3563. "$ref": "#/components/schemas/Project"
  3564. }
  3565. }
  3566. }
  3567. },
  3568. "400": {
  3569. "description": "Bad request",
  3570. "content": {
  3571. "application/json": {
  3572. "schema": {
  3573. "$ref": "#/components/schemas/BadRequestError"
  3574. }
  3575. }
  3576. }
  3577. }
  3578. },
  3579. "description": "Retrieve the currently active project that OpenCode is working with.",
  3580. "summary": "Get current project",
  3581. "x-codeSamples": [
  3582. {
  3583. "lang": "js",
  3584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3585. }
  3586. ]
  3587. }
  3588. },
  3589. "/project/git/init": {
  3590. "post": {
  3591. "tags": ["project"],
  3592. "operationId": "project.initGit",
  3593. "parameters": [
  3594. {
  3595. "name": "directory",
  3596. "in": "query",
  3597. "schema": {
  3598. "type": "string"
  3599. },
  3600. "required": false
  3601. },
  3602. {
  3603. "name": "workspace",
  3604. "in": "query",
  3605. "schema": {
  3606. "type": "string"
  3607. },
  3608. "required": false
  3609. }
  3610. ],
  3611. "responses": {
  3612. "200": {
  3613. "description": "Project information after git initialization",
  3614. "content": {
  3615. "application/json": {
  3616. "schema": {
  3617. "$ref": "#/components/schemas/Project"
  3618. }
  3619. }
  3620. }
  3621. },
  3622. "400": {
  3623. "description": "Bad request",
  3624. "content": {
  3625. "application/json": {
  3626. "schema": {
  3627. "$ref": "#/components/schemas/BadRequestError"
  3628. }
  3629. }
  3630. }
  3631. }
  3632. },
  3633. "description": "Create a git repository for the current project and return the refreshed project info.",
  3634. "summary": "Initialize git repository",
  3635. "x-codeSamples": [
  3636. {
  3637. "lang": "js",
  3638. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3639. }
  3640. ]
  3641. }
  3642. },
  3643. "/project/{projectID}": {
  3644. "patch": {
  3645. "tags": ["project"],
  3646. "operationId": "project.update",
  3647. "parameters": [
  3648. {
  3649. "name": "projectID",
  3650. "in": "path",
  3651. "schema": {
  3652. "type": "string"
  3653. },
  3654. "required": true
  3655. },
  3656. {
  3657. "name": "directory",
  3658. "in": "query",
  3659. "schema": {
  3660. "type": "string"
  3661. },
  3662. "required": false
  3663. },
  3664. {
  3665. "name": "workspace",
  3666. "in": "query",
  3667. "schema": {
  3668. "type": "string"
  3669. },
  3670. "required": false
  3671. }
  3672. ],
  3673. "responses": {
  3674. "200": {
  3675. "description": "Updated project information",
  3676. "content": {
  3677. "application/json": {
  3678. "schema": {
  3679. "$ref": "#/components/schemas/Project"
  3680. }
  3681. }
  3682. }
  3683. },
  3684. "400": {
  3685. "description": "BadRequest | InvalidRequestError",
  3686. "content": {
  3687. "application/json": {
  3688. "schema": {
  3689. "anyOf": [
  3690. {
  3691. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3692. },
  3693. {
  3694. "$ref": "#/components/schemas/InvalidRequestError"
  3695. }
  3696. ]
  3697. }
  3698. }
  3699. }
  3700. },
  3701. "404": {
  3702. "description": "ProjectNotFoundError",
  3703. "content": {
  3704. "application/json": {
  3705. "schema": {
  3706. "$ref": "#/components/schemas/ProjectNotFoundError"
  3707. }
  3708. }
  3709. }
  3710. }
  3711. },
  3712. "description": "Update project properties such as name, icon, and commands.",
  3713. "summary": "Update project",
  3714. "requestBody": {
  3715. "content": {
  3716. "application/json": {
  3717. "schema": {
  3718. "type": "object",
  3719. "properties": {
  3720. "name": {
  3721. "type": "string"
  3722. },
  3723. "icon": {
  3724. "type": "object",
  3725. "properties": {
  3726. "url": {
  3727. "type": "string"
  3728. },
  3729. "override": {
  3730. "type": "string"
  3731. },
  3732. "color": {
  3733. "type": "string"
  3734. }
  3735. },
  3736. "additionalProperties": false
  3737. },
  3738. "commands": {
  3739. "type": "object",
  3740. "properties": {
  3741. "start": {
  3742. "type": "string",
  3743. "description": "Startup script to run when creating a new workspace (worktree)"
  3744. }
  3745. },
  3746. "additionalProperties": false
  3747. }
  3748. },
  3749. "additionalProperties": false
  3750. }
  3751. }
  3752. }
  3753. },
  3754. "x-codeSamples": [
  3755. {
  3756. "lang": "js",
  3757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3758. }
  3759. ]
  3760. }
  3761. },
  3762. "/project/{projectID}/directories": {
  3763. "get": {
  3764. "tags": ["project"],
  3765. "operationId": "project.directories",
  3766. "parameters": [
  3767. {
  3768. "name": "projectID",
  3769. "in": "path",
  3770. "schema": {
  3771. "type": "string"
  3772. },
  3773. "required": true
  3774. },
  3775. {
  3776. "name": "directory",
  3777. "in": "query",
  3778. "schema": {
  3779. "type": "string"
  3780. },
  3781. "required": false
  3782. },
  3783. {
  3784. "name": "workspace",
  3785. "in": "query",
  3786. "schema": {
  3787. "type": "string"
  3788. },
  3789. "required": false
  3790. }
  3791. ],
  3792. "responses": {
  3793. "200": {
  3794. "description": "Project directories",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/ProjectDirectories"
  3799. }
  3800. }
  3801. }
  3802. },
  3803. "400": {
  3804. "description": "Bad request",
  3805. "content": {
  3806. "application/json": {
  3807. "schema": {
  3808. "$ref": "#/components/schemas/BadRequestError"
  3809. }
  3810. }
  3811. }
  3812. }
  3813. },
  3814. "description": "List known local absolute directories for a project.",
  3815. "summary": "List project directories",
  3816. "x-codeSamples": [
  3817. {
  3818. "lang": "js",
  3819. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3820. }
  3821. ]
  3822. }
  3823. },
  3824. "/experimental/project/{projectID}/copy": {
  3825. "post": {
  3826. "tags": ["projectCopy"],
  3827. "operationId": "experimental.projectCopy.create",
  3828. "parameters": [
  3829. {
  3830. "name": "projectID",
  3831. "in": "path",
  3832. "schema": {
  3833. "type": "string"
  3834. },
  3835. "required": true
  3836. },
  3837. {
  3838. "name": "workspace",
  3839. "in": "query",
  3840. "schema": {
  3841. "type": "string"
  3842. },
  3843. "required": false
  3844. }
  3845. ],
  3846. "responses": {
  3847. "200": {
  3848. "description": "Project copy created",
  3849. "content": {
  3850. "application/json": {
  3851. "schema": {
  3852. "$ref": "#/components/schemas/ProjectCopyCopy"
  3853. }
  3854. }
  3855. }
  3856. },
  3857. "400": {
  3858. "description": "ProjectCopyError | InvalidRequestError",
  3859. "content": {
  3860. "application/json": {
  3861. "schema": {
  3862. "anyOf": [
  3863. {
  3864. "$ref": "#/components/schemas/ProjectCopyError"
  3865. },
  3866. {
  3867. "$ref": "#/components/schemas/InvalidRequestError"
  3868. }
  3869. ]
  3870. }
  3871. }
  3872. }
  3873. }
  3874. },
  3875. "description": "Create a local physical copy of a project using the selected strategy.",
  3876. "summary": "Create project copy",
  3877. "requestBody": {
  3878. "content": {
  3879. "application/json": {
  3880. "schema": {
  3881. "type": "object",
  3882. "properties": {
  3883. "strategy": {
  3884. "type": "string",
  3885. "enum": ["git_worktree"]
  3886. },
  3887. "directory": {
  3888. "type": "string"
  3889. },
  3890. "name": {
  3891. "type": "string"
  3892. },
  3893. "context": {
  3894. "type": "string"
  3895. }
  3896. },
  3897. "required": ["strategy", "directory"],
  3898. "additionalProperties": false
  3899. }
  3900. }
  3901. }
  3902. },
  3903. "x-codeSamples": [
  3904. {
  3905. "lang": "js",
  3906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3907. }
  3908. ]
  3909. },
  3910. "delete": {
  3911. "tags": ["projectCopy"],
  3912. "operationId": "experimental.projectCopy.remove",
  3913. "parameters": [
  3914. {
  3915. "name": "projectID",
  3916. "in": "path",
  3917. "schema": {
  3918. "type": "string"
  3919. },
  3920. "required": true
  3921. },
  3922. {
  3923. "name": "directory",
  3924. "in": "query",
  3925. "schema": {
  3926. "type": "string"
  3927. },
  3928. "required": false
  3929. },
  3930. {
  3931. "name": "workspace",
  3932. "in": "query",
  3933. "schema": {
  3934. "type": "string"
  3935. },
  3936. "required": false
  3937. }
  3938. ],
  3939. "responses": {
  3940. "204": {
  3941. "description": "Project copy removed"
  3942. },
  3943. "400": {
  3944. "description": "ProjectCopyError | InvalidRequestError",
  3945. "content": {
  3946. "application/json": {
  3947. "schema": {
  3948. "anyOf": [
  3949. {
  3950. "$ref": "#/components/schemas/ProjectCopyError"
  3951. },
  3952. {
  3953. "$ref": "#/components/schemas/InvalidRequestError"
  3954. }
  3955. ]
  3956. }
  3957. }
  3958. }
  3959. }
  3960. },
  3961. "description": "Remove a local physical copy of a project using the selected strategy.",
  3962. "summary": "Remove project copy",
  3963. "requestBody": {
  3964. "content": {
  3965. "application/json": {
  3966. "schema": {
  3967. "type": "object",
  3968. "properties": {
  3969. "directory": {
  3970. "type": "string"
  3971. }
  3972. },
  3973. "required": ["directory"],
  3974. "additionalProperties": false
  3975. }
  3976. }
  3977. }
  3978. },
  3979. "x-codeSamples": [
  3980. {
  3981. "lang": "js",
  3982. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  3983. }
  3984. ]
  3985. }
  3986. },
  3987. "/experimental/project/{projectID}/copy/refresh": {
  3988. "post": {
  3989. "tags": ["projectCopy"],
  3990. "operationId": "experimental.projectCopy.refresh",
  3991. "parameters": [
  3992. {
  3993. "name": "projectID",
  3994. "in": "path",
  3995. "schema": {
  3996. "type": "string"
  3997. },
  3998. "required": true
  3999. },
  4000. {
  4001. "name": "directory",
  4002. "in": "query",
  4003. "schema": {
  4004. "type": "string"
  4005. },
  4006. "required": false
  4007. },
  4008. {
  4009. "name": "workspace",
  4010. "in": "query",
  4011. "schema": {
  4012. "type": "string"
  4013. },
  4014. "required": false
  4015. }
  4016. ],
  4017. "responses": {
  4018. "204": {
  4019. "description": "Project copies refreshed"
  4020. },
  4021. "400": {
  4022. "description": "ProjectCopyError | InvalidRequestError",
  4023. "content": {
  4024. "application/json": {
  4025. "schema": {
  4026. "anyOf": [
  4027. {
  4028. "$ref": "#/components/schemas/ProjectCopyError"
  4029. },
  4030. {
  4031. "$ref": "#/components/schemas/InvalidRequestError"
  4032. }
  4033. ]
  4034. }
  4035. }
  4036. }
  4037. }
  4038. },
  4039. "description": "Discover local project copies using one or all configured strategies.",
  4040. "summary": "Refresh project copies",
  4041. "x-codeSamples": [
  4042. {
  4043. "lang": "js",
  4044. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  4045. }
  4046. ]
  4047. }
  4048. },
  4049. "/pty/shells": {
  4050. "get": {
  4051. "tags": ["pty"],
  4052. "operationId": "pty.shells",
  4053. "parameters": [
  4054. {
  4055. "name": "directory",
  4056. "in": "query",
  4057. "schema": {
  4058. "type": "string"
  4059. },
  4060. "required": false
  4061. },
  4062. {
  4063. "name": "workspace",
  4064. "in": "query",
  4065. "schema": {
  4066. "type": "string"
  4067. },
  4068. "required": false
  4069. }
  4070. ],
  4071. "responses": {
  4072. "200": {
  4073. "description": "List of shells",
  4074. "content": {
  4075. "application/json": {
  4076. "schema": {
  4077. "type": "array",
  4078. "items": {
  4079. "type": "object",
  4080. "properties": {
  4081. "path": {
  4082. "type": "string"
  4083. },
  4084. "name": {
  4085. "type": "string"
  4086. },
  4087. "acceptable": {
  4088. "type": "boolean"
  4089. }
  4090. },
  4091. "required": ["path", "name", "acceptable"],
  4092. "additionalProperties": false
  4093. },
  4094. "description": "List of shells"
  4095. }
  4096. }
  4097. }
  4098. },
  4099. "400": {
  4100. "description": "Bad request",
  4101. "content": {
  4102. "application/json": {
  4103. "schema": {
  4104. "$ref": "#/components/schemas/BadRequestError"
  4105. }
  4106. }
  4107. }
  4108. }
  4109. },
  4110. "description": "Get a list of available shells on the system.",
  4111. "summary": "List available shells",
  4112. "x-codeSamples": [
  4113. {
  4114. "lang": "js",
  4115. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4116. }
  4117. ]
  4118. }
  4119. },
  4120. "/pty": {
  4121. "get": {
  4122. "tags": ["pty"],
  4123. "operationId": "pty.list",
  4124. "parameters": [
  4125. {
  4126. "name": "directory",
  4127. "in": "query",
  4128. "schema": {
  4129. "type": "string"
  4130. },
  4131. "required": false
  4132. },
  4133. {
  4134. "name": "workspace",
  4135. "in": "query",
  4136. "schema": {
  4137. "type": "string"
  4138. },
  4139. "required": false
  4140. }
  4141. ],
  4142. "responses": {
  4143. "200": {
  4144. "description": "List of sessions",
  4145. "content": {
  4146. "application/json": {
  4147. "schema": {
  4148. "type": "array",
  4149. "items": {
  4150. "$ref": "#/components/schemas/Pty"
  4151. },
  4152. "description": "List of sessions"
  4153. }
  4154. }
  4155. }
  4156. },
  4157. "400": {
  4158. "description": "Bad request",
  4159. "content": {
  4160. "application/json": {
  4161. "schema": {
  4162. "$ref": "#/components/schemas/BadRequestError"
  4163. }
  4164. }
  4165. }
  4166. }
  4167. },
  4168. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4169. "summary": "List PTY sessions",
  4170. "x-codeSamples": [
  4171. {
  4172. "lang": "js",
  4173. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4174. }
  4175. ]
  4176. },
  4177. "post": {
  4178. "tags": ["pty"],
  4179. "operationId": "pty.create",
  4180. "parameters": [
  4181. {
  4182. "name": "directory",
  4183. "in": "query",
  4184. "schema": {
  4185. "type": "string"
  4186. },
  4187. "required": false
  4188. },
  4189. {
  4190. "name": "workspace",
  4191. "in": "query",
  4192. "schema": {
  4193. "type": "string"
  4194. },
  4195. "required": false
  4196. }
  4197. ],
  4198. "responses": {
  4199. "200": {
  4200. "description": "Created session",
  4201. "content": {
  4202. "application/json": {
  4203. "schema": {
  4204. "$ref": "#/components/schemas/Pty"
  4205. }
  4206. }
  4207. }
  4208. },
  4209. "400": {
  4210. "description": "BadRequest | InvalidRequestError",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "anyOf": [
  4215. {
  4216. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4217. },
  4218. {
  4219. "$ref": "#/components/schemas/InvalidRequestError"
  4220. }
  4221. ]
  4222. }
  4223. }
  4224. }
  4225. }
  4226. },
  4227. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4228. "summary": "Create PTY session",
  4229. "requestBody": {
  4230. "content": {
  4231. "application/json": {
  4232. "schema": {
  4233. "type": "object",
  4234. "properties": {
  4235. "command": {
  4236. "type": "string"
  4237. },
  4238. "args": {
  4239. "type": "array",
  4240. "items": {
  4241. "type": "string"
  4242. }
  4243. },
  4244. "cwd": {
  4245. "type": "string"
  4246. },
  4247. "title": {
  4248. "type": "string"
  4249. },
  4250. "env": {
  4251. "type": "object",
  4252. "additionalProperties": {
  4253. "type": "string"
  4254. }
  4255. }
  4256. },
  4257. "additionalProperties": false
  4258. }
  4259. }
  4260. }
  4261. },
  4262. "x-codeSamples": [
  4263. {
  4264. "lang": "js",
  4265. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4266. }
  4267. ]
  4268. }
  4269. },
  4270. "/pty/{ptyID}": {
  4271. "get": {
  4272. "tags": ["pty"],
  4273. "operationId": "pty.get",
  4274. "parameters": [
  4275. {
  4276. "name": "ptyID",
  4277. "in": "path",
  4278. "schema": {
  4279. "type": "string",
  4280. "pattern": "^pty"
  4281. },
  4282. "required": true
  4283. },
  4284. {
  4285. "name": "directory",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. },
  4292. {
  4293. "name": "workspace",
  4294. "in": "query",
  4295. "schema": {
  4296. "type": "string"
  4297. },
  4298. "required": false
  4299. }
  4300. ],
  4301. "responses": {
  4302. "200": {
  4303. "description": "Session info",
  4304. "content": {
  4305. "application/json": {
  4306. "schema": {
  4307. "$ref": "#/components/schemas/Pty"
  4308. }
  4309. }
  4310. }
  4311. },
  4312. "400": {
  4313. "description": "Bad request",
  4314. "content": {
  4315. "application/json": {
  4316. "schema": {
  4317. "$ref": "#/components/schemas/BadRequestError"
  4318. }
  4319. }
  4320. }
  4321. },
  4322. "404": {
  4323. "description": "PtyNotFoundError",
  4324. "content": {
  4325. "application/json": {
  4326. "schema": {
  4327. "$ref": "#/components/schemas/PtyNotFoundError"
  4328. }
  4329. }
  4330. }
  4331. }
  4332. },
  4333. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4334. "summary": "Get PTY session",
  4335. "x-codeSamples": [
  4336. {
  4337. "lang": "js",
  4338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4339. }
  4340. ]
  4341. },
  4342. "put": {
  4343. "tags": ["pty"],
  4344. "operationId": "pty.update",
  4345. "parameters": [
  4346. {
  4347. "name": "ptyID",
  4348. "in": "path",
  4349. "schema": {
  4350. "type": "string",
  4351. "pattern": "^pty"
  4352. },
  4353. "required": true
  4354. },
  4355. {
  4356. "name": "directory",
  4357. "in": "query",
  4358. "schema": {
  4359. "type": "string"
  4360. },
  4361. "required": false
  4362. },
  4363. {
  4364. "name": "workspace",
  4365. "in": "query",
  4366. "schema": {
  4367. "type": "string"
  4368. },
  4369. "required": false
  4370. }
  4371. ],
  4372. "responses": {
  4373. "200": {
  4374. "description": "Updated session",
  4375. "content": {
  4376. "application/json": {
  4377. "schema": {
  4378. "$ref": "#/components/schemas/Pty"
  4379. }
  4380. }
  4381. }
  4382. },
  4383. "400": {
  4384. "description": "BadRequest | InvalidRequestError",
  4385. "content": {
  4386. "application/json": {
  4387. "schema": {
  4388. "anyOf": [
  4389. {
  4390. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4391. },
  4392. {
  4393. "$ref": "#/components/schemas/InvalidRequestError"
  4394. }
  4395. ]
  4396. }
  4397. }
  4398. }
  4399. },
  4400. "404": {
  4401. "description": "PtyNotFoundError",
  4402. "content": {
  4403. "application/json": {
  4404. "schema": {
  4405. "$ref": "#/components/schemas/PtyNotFoundError"
  4406. }
  4407. }
  4408. }
  4409. }
  4410. },
  4411. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4412. "summary": "Update PTY session",
  4413. "requestBody": {
  4414. "content": {
  4415. "application/json": {
  4416. "schema": {
  4417. "type": "object",
  4418. "properties": {
  4419. "title": {
  4420. "type": "string"
  4421. },
  4422. "size": {
  4423. "type": "object",
  4424. "properties": {
  4425. "rows": {
  4426. "type": "integer",
  4427. "exclusiveMinimum": 0
  4428. },
  4429. "cols": {
  4430. "type": "integer",
  4431. "exclusiveMinimum": 0
  4432. }
  4433. },
  4434. "required": ["rows", "cols"],
  4435. "additionalProperties": false
  4436. }
  4437. },
  4438. "additionalProperties": false
  4439. }
  4440. }
  4441. }
  4442. },
  4443. "x-codeSamples": [
  4444. {
  4445. "lang": "js",
  4446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4447. }
  4448. ]
  4449. },
  4450. "delete": {
  4451. "tags": ["pty"],
  4452. "operationId": "pty.remove",
  4453. "parameters": [
  4454. {
  4455. "name": "ptyID",
  4456. "in": "path",
  4457. "schema": {
  4458. "type": "string",
  4459. "pattern": "^pty"
  4460. },
  4461. "required": true
  4462. },
  4463. {
  4464. "name": "directory",
  4465. "in": "query",
  4466. "schema": {
  4467. "type": "string"
  4468. },
  4469. "required": false
  4470. },
  4471. {
  4472. "name": "workspace",
  4473. "in": "query",
  4474. "schema": {
  4475. "type": "string"
  4476. },
  4477. "required": false
  4478. }
  4479. ],
  4480. "responses": {
  4481. "200": {
  4482. "description": "Session removed",
  4483. "content": {
  4484. "application/json": {
  4485. "schema": {
  4486. "type": "boolean",
  4487. "description": "Session removed"
  4488. }
  4489. }
  4490. }
  4491. },
  4492. "400": {
  4493. "description": "Bad request",
  4494. "content": {
  4495. "application/json": {
  4496. "schema": {
  4497. "$ref": "#/components/schemas/BadRequestError"
  4498. }
  4499. }
  4500. }
  4501. },
  4502. "404": {
  4503. "description": "PtyNotFoundError",
  4504. "content": {
  4505. "application/json": {
  4506. "schema": {
  4507. "$ref": "#/components/schemas/PtyNotFoundError"
  4508. }
  4509. }
  4510. }
  4511. }
  4512. },
  4513. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4514. "summary": "Remove PTY session",
  4515. "x-codeSamples": [
  4516. {
  4517. "lang": "js",
  4518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4519. }
  4520. ]
  4521. }
  4522. },
  4523. "/pty/{ptyID}/connect-token": {
  4524. "post": {
  4525. "tags": ["pty"],
  4526. "operationId": "pty.connectToken",
  4527. "parameters": [
  4528. {
  4529. "name": "ptyID",
  4530. "in": "path",
  4531. "schema": {
  4532. "type": "string",
  4533. "pattern": "^pty"
  4534. },
  4535. "required": true
  4536. },
  4537. {
  4538. "name": "directory",
  4539. "in": "query",
  4540. "schema": {
  4541. "type": "string"
  4542. },
  4543. "required": false
  4544. },
  4545. {
  4546. "name": "workspace",
  4547. "in": "query",
  4548. "schema": {
  4549. "type": "string"
  4550. },
  4551. "required": false
  4552. }
  4553. ],
  4554. "responses": {
  4555. "200": {
  4556. "description": "WebSocket connect token",
  4557. "content": {
  4558. "application/json": {
  4559. "schema": {
  4560. "type": "object",
  4561. "properties": {
  4562. "ticket": {
  4563. "type": "string"
  4564. },
  4565. "expires_in": {
  4566. "type": "integer",
  4567. "exclusiveMinimum": 0
  4568. }
  4569. },
  4570. "required": ["ticket", "expires_in"],
  4571. "additionalProperties": false,
  4572. "description": "WebSocket connect token"
  4573. }
  4574. }
  4575. }
  4576. },
  4577. "400": {
  4578. "description": "Bad request",
  4579. "content": {
  4580. "application/json": {
  4581. "schema": {
  4582. "$ref": "#/components/schemas/BadRequestError"
  4583. }
  4584. }
  4585. }
  4586. },
  4587. "403": {
  4588. "description": "PtyForbiddenError",
  4589. "content": {
  4590. "application/json": {
  4591. "schema": {
  4592. "$ref": "#/components/schemas/PtyForbiddenError"
  4593. }
  4594. }
  4595. }
  4596. },
  4597. "404": {
  4598. "description": "PtyNotFoundError",
  4599. "content": {
  4600. "application/json": {
  4601. "schema": {
  4602. "$ref": "#/components/schemas/PtyNotFoundError"
  4603. }
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4609. "summary": "Create PTY WebSocket token",
  4610. "x-codeSamples": [
  4611. {
  4612. "lang": "js",
  4613. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4614. }
  4615. ]
  4616. }
  4617. },
  4618. "/question": {
  4619. "get": {
  4620. "tags": ["question"],
  4621. "operationId": "question.list",
  4622. "parameters": [
  4623. {
  4624. "name": "directory",
  4625. "in": "query",
  4626. "schema": {
  4627. "type": "string"
  4628. },
  4629. "required": false
  4630. },
  4631. {
  4632. "name": "workspace",
  4633. "in": "query",
  4634. "schema": {
  4635. "type": "string"
  4636. },
  4637. "required": false
  4638. }
  4639. ],
  4640. "responses": {
  4641. "200": {
  4642. "description": "List of pending questions",
  4643. "content": {
  4644. "application/json": {
  4645. "schema": {
  4646. "type": "array",
  4647. "items": {
  4648. "$ref": "#/components/schemas/QuestionRequest"
  4649. },
  4650. "description": "List of pending questions"
  4651. }
  4652. }
  4653. }
  4654. },
  4655. "400": {
  4656. "description": "Bad request",
  4657. "content": {
  4658. "application/json": {
  4659. "schema": {
  4660. "$ref": "#/components/schemas/BadRequestError"
  4661. }
  4662. }
  4663. }
  4664. }
  4665. },
  4666. "description": "Get all pending question requests across all sessions.",
  4667. "summary": "List pending questions",
  4668. "x-codeSamples": [
  4669. {
  4670. "lang": "js",
  4671. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4672. }
  4673. ]
  4674. }
  4675. },
  4676. "/question/{requestID}/reply": {
  4677. "post": {
  4678. "tags": ["question"],
  4679. "operationId": "question.reply",
  4680. "parameters": [
  4681. {
  4682. "name": "requestID",
  4683. "in": "path",
  4684. "schema": {
  4685. "type": "string",
  4686. "pattern": "^que"
  4687. },
  4688. "required": true
  4689. },
  4690. {
  4691. "name": "directory",
  4692. "in": "query",
  4693. "schema": {
  4694. "type": "string"
  4695. },
  4696. "required": false
  4697. },
  4698. {
  4699. "name": "workspace",
  4700. "in": "query",
  4701. "schema": {
  4702. "type": "string"
  4703. },
  4704. "required": false
  4705. }
  4706. ],
  4707. "responses": {
  4708. "200": {
  4709. "description": "Question answered successfully",
  4710. "content": {
  4711. "application/json": {
  4712. "schema": {
  4713. "type": "boolean",
  4714. "description": "Question answered successfully"
  4715. }
  4716. }
  4717. }
  4718. },
  4719. "400": {
  4720. "description": "BadRequest | InvalidRequestError",
  4721. "content": {
  4722. "application/json": {
  4723. "schema": {
  4724. "anyOf": [
  4725. {
  4726. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4727. },
  4728. {
  4729. "$ref": "#/components/schemas/InvalidRequestError"
  4730. }
  4731. ]
  4732. }
  4733. }
  4734. }
  4735. },
  4736. "404": {
  4737. "description": "QuestionNotFoundError",
  4738. "content": {
  4739. "application/json": {
  4740. "schema": {
  4741. "$ref": "#/components/schemas/QuestionNotFoundError"
  4742. }
  4743. }
  4744. }
  4745. }
  4746. },
  4747. "description": "Provide answers to a question request from the AI assistant.",
  4748. "summary": "Reply to question request",
  4749. "requestBody": {
  4750. "content": {
  4751. "application/json": {
  4752. "schema": {
  4753. "type": "object",
  4754. "properties": {
  4755. "answers": {
  4756. "type": "array",
  4757. "items": {
  4758. "$ref": "#/components/schemas/QuestionAnswer"
  4759. },
  4760. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4761. }
  4762. },
  4763. "required": ["answers"],
  4764. "additionalProperties": false
  4765. }
  4766. }
  4767. }
  4768. },
  4769. "x-codeSamples": [
  4770. {
  4771. "lang": "js",
  4772. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4773. }
  4774. ]
  4775. }
  4776. },
  4777. "/question/{requestID}/reject": {
  4778. "post": {
  4779. "tags": ["question"],
  4780. "operationId": "question.reject",
  4781. "parameters": [
  4782. {
  4783. "name": "requestID",
  4784. "in": "path",
  4785. "schema": {
  4786. "type": "string",
  4787. "pattern": "^que"
  4788. },
  4789. "required": true
  4790. },
  4791. {
  4792. "name": "directory",
  4793. "in": "query",
  4794. "schema": {
  4795. "type": "string"
  4796. },
  4797. "required": false
  4798. },
  4799. {
  4800. "name": "workspace",
  4801. "in": "query",
  4802. "schema": {
  4803. "type": "string"
  4804. },
  4805. "required": false
  4806. }
  4807. ],
  4808. "responses": {
  4809. "200": {
  4810. "description": "Question rejected successfully",
  4811. "content": {
  4812. "application/json": {
  4813. "schema": {
  4814. "type": "boolean",
  4815. "description": "Question rejected successfully"
  4816. }
  4817. }
  4818. }
  4819. },
  4820. "400": {
  4821. "description": "BadRequest | InvalidRequestError",
  4822. "content": {
  4823. "application/json": {
  4824. "schema": {
  4825. "anyOf": [
  4826. {
  4827. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4828. },
  4829. {
  4830. "$ref": "#/components/schemas/InvalidRequestError"
  4831. }
  4832. ]
  4833. }
  4834. }
  4835. }
  4836. },
  4837. "404": {
  4838. "description": "QuestionNotFoundError",
  4839. "content": {
  4840. "application/json": {
  4841. "schema": {
  4842. "$ref": "#/components/schemas/QuestionNotFoundError"
  4843. }
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "description": "Reject a question request from the AI assistant.",
  4849. "summary": "Reject question request",
  4850. "x-codeSamples": [
  4851. {
  4852. "lang": "js",
  4853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4854. }
  4855. ]
  4856. }
  4857. },
  4858. "/permission": {
  4859. "get": {
  4860. "tags": ["permission"],
  4861. "operationId": "permission.list",
  4862. "parameters": [
  4863. {
  4864. "name": "directory",
  4865. "in": "query",
  4866. "schema": {
  4867. "type": "string"
  4868. },
  4869. "required": false
  4870. },
  4871. {
  4872. "name": "workspace",
  4873. "in": "query",
  4874. "schema": {
  4875. "type": "string"
  4876. },
  4877. "required": false
  4878. }
  4879. ],
  4880. "responses": {
  4881. "200": {
  4882. "description": "List of pending permissions",
  4883. "content": {
  4884. "application/json": {
  4885. "schema": {
  4886. "type": "array",
  4887. "items": {
  4888. "$ref": "#/components/schemas/PermissionRequest"
  4889. },
  4890. "description": "List of pending permissions"
  4891. }
  4892. }
  4893. }
  4894. },
  4895. "400": {
  4896. "description": "Bad request",
  4897. "content": {
  4898. "application/json": {
  4899. "schema": {
  4900. "$ref": "#/components/schemas/BadRequestError"
  4901. }
  4902. }
  4903. }
  4904. }
  4905. },
  4906. "description": "Get all pending permission requests across all sessions.",
  4907. "summary": "List pending permissions",
  4908. "x-codeSamples": [
  4909. {
  4910. "lang": "js",
  4911. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4912. }
  4913. ]
  4914. }
  4915. },
  4916. "/permission/{requestID}/reply": {
  4917. "post": {
  4918. "tags": ["permission"],
  4919. "operationId": "permission.reply",
  4920. "parameters": [
  4921. {
  4922. "name": "requestID",
  4923. "in": "path",
  4924. "schema": {
  4925. "type": "string",
  4926. "pattern": "^per"
  4927. },
  4928. "required": true
  4929. },
  4930. {
  4931. "name": "directory",
  4932. "in": "query",
  4933. "schema": {
  4934. "type": "string"
  4935. },
  4936. "required": false
  4937. },
  4938. {
  4939. "name": "workspace",
  4940. "in": "query",
  4941. "schema": {
  4942. "type": "string"
  4943. },
  4944. "required": false
  4945. }
  4946. ],
  4947. "responses": {
  4948. "200": {
  4949. "description": "Permission processed successfully",
  4950. "content": {
  4951. "application/json": {
  4952. "schema": {
  4953. "type": "boolean",
  4954. "description": "Permission processed successfully"
  4955. }
  4956. }
  4957. }
  4958. },
  4959. "400": {
  4960. "description": "BadRequest | InvalidRequestError",
  4961. "content": {
  4962. "application/json": {
  4963. "schema": {
  4964. "anyOf": [
  4965. {
  4966. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4967. },
  4968. {
  4969. "$ref": "#/components/schemas/InvalidRequestError"
  4970. }
  4971. ]
  4972. }
  4973. }
  4974. }
  4975. },
  4976. "404": {
  4977. "description": "PermissionNotFoundError",
  4978. "content": {
  4979. "application/json": {
  4980. "schema": {
  4981. "$ref": "#/components/schemas/PermissionNotFoundError"
  4982. }
  4983. }
  4984. }
  4985. }
  4986. },
  4987. "description": "Approve or deny a permission request from the AI assistant.",
  4988. "summary": "Respond to permission request",
  4989. "requestBody": {
  4990. "content": {
  4991. "application/json": {
  4992. "schema": {
  4993. "type": "object",
  4994. "properties": {
  4995. "reply": {
  4996. "type": "string",
  4997. "enum": ["once", "always", "reject"]
  4998. },
  4999. "message": {
  5000. "type": "string"
  5001. }
  5002. },
  5003. "required": ["reply"],
  5004. "additionalProperties": false
  5005. }
  5006. }
  5007. }
  5008. },
  5009. "x-codeSamples": [
  5010. {
  5011. "lang": "js",
  5012. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  5013. }
  5014. ]
  5015. }
  5016. },
  5017. "/provider": {
  5018. "get": {
  5019. "tags": ["provider"],
  5020. "operationId": "provider.list",
  5021. "parameters": [
  5022. {
  5023. "name": "directory",
  5024. "in": "query",
  5025. "schema": {
  5026. "type": "string"
  5027. },
  5028. "required": false
  5029. },
  5030. {
  5031. "name": "workspace",
  5032. "in": "query",
  5033. "schema": {
  5034. "type": "string"
  5035. },
  5036. "required": false
  5037. }
  5038. ],
  5039. "responses": {
  5040. "200": {
  5041. "description": "List of providers",
  5042. "content": {
  5043. "application/json": {
  5044. "schema": {
  5045. "type": "object",
  5046. "properties": {
  5047. "all": {
  5048. "type": "array",
  5049. "items": {
  5050. "$ref": "#/components/schemas/Provider"
  5051. }
  5052. },
  5053. "default": {
  5054. "type": "object",
  5055. "additionalProperties": {
  5056. "type": "string"
  5057. }
  5058. },
  5059. "connected": {
  5060. "type": "array",
  5061. "items": {
  5062. "type": "string"
  5063. }
  5064. }
  5065. },
  5066. "required": ["all", "default", "connected"],
  5067. "additionalProperties": false,
  5068. "description": "List of providers"
  5069. }
  5070. }
  5071. }
  5072. },
  5073. "400": {
  5074. "description": "Bad request",
  5075. "content": {
  5076. "application/json": {
  5077. "schema": {
  5078. "$ref": "#/components/schemas/BadRequestError"
  5079. }
  5080. }
  5081. }
  5082. }
  5083. },
  5084. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5085. "summary": "List providers",
  5086. "x-codeSamples": [
  5087. {
  5088. "lang": "js",
  5089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5090. }
  5091. ]
  5092. }
  5093. },
  5094. "/provider/auth": {
  5095. "get": {
  5096. "tags": ["provider"],
  5097. "operationId": "provider.auth",
  5098. "parameters": [
  5099. {
  5100. "name": "directory",
  5101. "in": "query",
  5102. "schema": {
  5103. "type": "string"
  5104. },
  5105. "required": false
  5106. },
  5107. {
  5108. "name": "workspace",
  5109. "in": "query",
  5110. "schema": {
  5111. "type": "string"
  5112. },
  5113. "required": false
  5114. }
  5115. ],
  5116. "responses": {
  5117. "200": {
  5118. "description": "Provider auth methods",
  5119. "content": {
  5120. "application/json": {
  5121. "schema": {
  5122. "type": "object",
  5123. "additionalProperties": {
  5124. "type": "array",
  5125. "items": {
  5126. "$ref": "#/components/schemas/ProviderAuthMethod"
  5127. }
  5128. },
  5129. "description": "Provider auth methods"
  5130. }
  5131. }
  5132. }
  5133. },
  5134. "400": {
  5135. "description": "Bad request",
  5136. "content": {
  5137. "application/json": {
  5138. "schema": {
  5139. "$ref": "#/components/schemas/BadRequestError"
  5140. }
  5141. }
  5142. }
  5143. }
  5144. },
  5145. "description": "Retrieve available authentication methods for all AI providers.",
  5146. "summary": "Get provider auth methods",
  5147. "x-codeSamples": [
  5148. {
  5149. "lang": "js",
  5150. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5151. }
  5152. ]
  5153. }
  5154. },
  5155. "/provider/{providerID}/oauth/authorize": {
  5156. "post": {
  5157. "tags": ["provider"],
  5158. "operationId": "provider.oauth.authorize",
  5159. "parameters": [
  5160. {
  5161. "name": "providerID",
  5162. "in": "path",
  5163. "schema": {
  5164. "type": "string"
  5165. },
  5166. "required": true
  5167. },
  5168. {
  5169. "name": "directory",
  5170. "in": "query",
  5171. "schema": {
  5172. "type": "string"
  5173. },
  5174. "required": false
  5175. },
  5176. {
  5177. "name": "workspace",
  5178. "in": "query",
  5179. "schema": {
  5180. "type": "string"
  5181. },
  5182. "required": false
  5183. }
  5184. ],
  5185. "responses": {
  5186. "200": {
  5187. "description": "Authorization URL and method",
  5188. "content": {
  5189. "application/json": {
  5190. "schema": {
  5191. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5192. }
  5193. }
  5194. }
  5195. },
  5196. "400": {
  5197. "description": "ProviderAuthError | InvalidRequestError",
  5198. "content": {
  5199. "application/json": {
  5200. "schema": {
  5201. "anyOf": [
  5202. {
  5203. "$ref": "#/components/schemas/ProviderAuthError1"
  5204. },
  5205. {
  5206. "$ref": "#/components/schemas/InvalidRequestError"
  5207. }
  5208. ]
  5209. }
  5210. }
  5211. }
  5212. }
  5213. },
  5214. "description": "Start the OAuth authorization flow for a provider.",
  5215. "summary": "Start OAuth authorization",
  5216. "requestBody": {
  5217. "content": {
  5218. "application/json": {
  5219. "schema": {
  5220. "type": "object",
  5221. "properties": {
  5222. "method": {
  5223. "type": "number",
  5224. "description": "Auth method index"
  5225. },
  5226. "inputs": {
  5227. "type": "object",
  5228. "additionalProperties": {
  5229. "type": "string"
  5230. }
  5231. }
  5232. },
  5233. "required": ["method"],
  5234. "additionalProperties": false
  5235. }
  5236. }
  5237. }
  5238. },
  5239. "x-codeSamples": [
  5240. {
  5241. "lang": "js",
  5242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5243. }
  5244. ]
  5245. }
  5246. },
  5247. "/provider/{providerID}/oauth/callback": {
  5248. "post": {
  5249. "tags": ["provider"],
  5250. "operationId": "provider.oauth.callback",
  5251. "parameters": [
  5252. {
  5253. "name": "providerID",
  5254. "in": "path",
  5255. "schema": {
  5256. "type": "string"
  5257. },
  5258. "required": true
  5259. },
  5260. {
  5261. "name": "directory",
  5262. "in": "query",
  5263. "schema": {
  5264. "type": "string"
  5265. },
  5266. "required": false
  5267. },
  5268. {
  5269. "name": "workspace",
  5270. "in": "query",
  5271. "schema": {
  5272. "type": "string"
  5273. },
  5274. "required": false
  5275. }
  5276. ],
  5277. "responses": {
  5278. "200": {
  5279. "description": "OAuth callback processed successfully",
  5280. "content": {
  5281. "application/json": {
  5282. "schema": {
  5283. "type": "boolean",
  5284. "description": "OAuth callback processed successfully"
  5285. }
  5286. }
  5287. }
  5288. },
  5289. "400": {
  5290. "description": "ProviderAuthError | InvalidRequestError",
  5291. "content": {
  5292. "application/json": {
  5293. "schema": {
  5294. "anyOf": [
  5295. {
  5296. "$ref": "#/components/schemas/ProviderAuthError1"
  5297. },
  5298. {
  5299. "$ref": "#/components/schemas/InvalidRequestError"
  5300. }
  5301. ]
  5302. }
  5303. }
  5304. }
  5305. }
  5306. },
  5307. "description": "Handle the OAuth callback from a provider after user authorization.",
  5308. "summary": "Handle OAuth callback",
  5309. "requestBody": {
  5310. "content": {
  5311. "application/json": {
  5312. "schema": {
  5313. "type": "object",
  5314. "properties": {
  5315. "method": {
  5316. "type": "number",
  5317. "description": "Auth method index"
  5318. },
  5319. "code": {
  5320. "type": "string"
  5321. }
  5322. },
  5323. "required": ["method"],
  5324. "additionalProperties": false
  5325. }
  5326. }
  5327. }
  5328. },
  5329. "x-codeSamples": [
  5330. {
  5331. "lang": "js",
  5332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5333. }
  5334. ]
  5335. }
  5336. },
  5337. "/session": {
  5338. "get": {
  5339. "tags": ["session"],
  5340. "operationId": "session.list",
  5341. "parameters": [
  5342. {
  5343. "name": "directory",
  5344. "in": "query",
  5345. "schema": {
  5346. "type": "string"
  5347. },
  5348. "required": false
  5349. },
  5350. {
  5351. "name": "workspace",
  5352. "in": "query",
  5353. "schema": {
  5354. "type": "string"
  5355. },
  5356. "required": false
  5357. },
  5358. {
  5359. "name": "scope",
  5360. "in": "query",
  5361. "schema": {
  5362. "type": "string",
  5363. "enum": ["project"]
  5364. },
  5365. "required": false
  5366. },
  5367. {
  5368. "name": "path",
  5369. "in": "query",
  5370. "schema": {
  5371. "type": "string"
  5372. },
  5373. "required": false
  5374. },
  5375. {
  5376. "name": "roots",
  5377. "in": "query",
  5378. "schema": {
  5379. "anyOf": [
  5380. {
  5381. "type": "boolean"
  5382. },
  5383. {
  5384. "type": "string",
  5385. "enum": ["true", "false"]
  5386. }
  5387. ]
  5388. },
  5389. "required": false
  5390. },
  5391. {
  5392. "name": "start",
  5393. "in": "query",
  5394. "schema": {
  5395. "type": "number"
  5396. },
  5397. "required": false
  5398. },
  5399. {
  5400. "name": "search",
  5401. "in": "query",
  5402. "schema": {
  5403. "type": "string"
  5404. },
  5405. "required": false
  5406. },
  5407. {
  5408. "name": "limit",
  5409. "in": "query",
  5410. "schema": {
  5411. "type": "number"
  5412. },
  5413. "required": false
  5414. }
  5415. ],
  5416. "responses": {
  5417. "200": {
  5418. "description": "List of sessions",
  5419. "content": {
  5420. "application/json": {
  5421. "schema": {
  5422. "type": "array",
  5423. "items": {
  5424. "$ref": "#/components/schemas/Session"
  5425. },
  5426. "description": "List of sessions"
  5427. }
  5428. }
  5429. }
  5430. },
  5431. "400": {
  5432. "description": "Bad request",
  5433. "content": {
  5434. "application/json": {
  5435. "schema": {
  5436. "$ref": "#/components/schemas/BadRequestError"
  5437. }
  5438. }
  5439. }
  5440. }
  5441. },
  5442. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5443. "summary": "List sessions",
  5444. "x-codeSamples": [
  5445. {
  5446. "lang": "js",
  5447. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5448. }
  5449. ]
  5450. },
  5451. "post": {
  5452. "tags": ["session"],
  5453. "operationId": "session.create",
  5454. "parameters": [
  5455. {
  5456. "name": "directory",
  5457. "in": "query",
  5458. "schema": {
  5459. "type": "string"
  5460. },
  5461. "required": false
  5462. },
  5463. {
  5464. "name": "workspace",
  5465. "in": "query",
  5466. "schema": {
  5467. "type": "string"
  5468. },
  5469. "required": false
  5470. }
  5471. ],
  5472. "responses": {
  5473. "200": {
  5474. "description": "Successfully created session",
  5475. "content": {
  5476. "application/json": {
  5477. "schema": {
  5478. "$ref": "#/components/schemas/Session"
  5479. }
  5480. }
  5481. }
  5482. },
  5483. "400": {
  5484. "description": "BadRequest | InvalidRequestError",
  5485. "content": {
  5486. "application/json": {
  5487. "schema": {
  5488. "anyOf": [
  5489. {
  5490. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5491. },
  5492. {
  5493. "$ref": "#/components/schemas/InvalidRequestError"
  5494. }
  5495. ]
  5496. }
  5497. }
  5498. }
  5499. }
  5500. },
  5501. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5502. "summary": "Create session",
  5503. "requestBody": {
  5504. "content": {
  5505. "application/json": {
  5506. "schema": {
  5507. "type": "object",
  5508. "properties": {
  5509. "parentID": {
  5510. "type": "string",
  5511. "pattern": "^ses"
  5512. },
  5513. "title": {
  5514. "type": "string"
  5515. },
  5516. "agent": {
  5517. "type": "string"
  5518. },
  5519. "model": {
  5520. "type": "object",
  5521. "properties": {
  5522. "id": {
  5523. "type": "string"
  5524. },
  5525. "providerID": {
  5526. "type": "string"
  5527. },
  5528. "variant": {
  5529. "type": "string"
  5530. }
  5531. },
  5532. "required": ["id", "providerID"],
  5533. "additionalProperties": false
  5534. },
  5535. "metadata": {
  5536. "type": "object"
  5537. },
  5538. "permission": {
  5539. "$ref": "#/components/schemas/PermissionRuleset"
  5540. },
  5541. "workspaceID": {
  5542. "type": "string",
  5543. "pattern": "^wrk"
  5544. }
  5545. },
  5546. "additionalProperties": false
  5547. }
  5548. }
  5549. }
  5550. },
  5551. "x-codeSamples": [
  5552. {
  5553. "lang": "js",
  5554. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5555. }
  5556. ]
  5557. }
  5558. },
  5559. "/session/status": {
  5560. "get": {
  5561. "tags": ["session"],
  5562. "operationId": "session.status",
  5563. "parameters": [
  5564. {
  5565. "name": "directory",
  5566. "in": "query",
  5567. "schema": {
  5568. "type": "string"
  5569. },
  5570. "required": false
  5571. },
  5572. {
  5573. "name": "workspace",
  5574. "in": "query",
  5575. "schema": {
  5576. "type": "string"
  5577. },
  5578. "required": false
  5579. }
  5580. ],
  5581. "responses": {
  5582. "200": {
  5583. "description": "Get session status",
  5584. "content": {
  5585. "application/json": {
  5586. "schema": {
  5587. "type": "object",
  5588. "additionalProperties": {
  5589. "$ref": "#/components/schemas/SessionStatus"
  5590. },
  5591. "description": "Get session status"
  5592. }
  5593. }
  5594. }
  5595. },
  5596. "400": {
  5597. "description": "BadRequest | InvalidRequestError",
  5598. "content": {
  5599. "application/json": {
  5600. "schema": {
  5601. "anyOf": [
  5602. {
  5603. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5604. },
  5605. {
  5606. "$ref": "#/components/schemas/InvalidRequestError"
  5607. }
  5608. ]
  5609. }
  5610. }
  5611. }
  5612. }
  5613. },
  5614. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5615. "summary": "Get session status",
  5616. "x-codeSamples": [
  5617. {
  5618. "lang": "js",
  5619. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5620. }
  5621. ]
  5622. }
  5623. },
  5624. "/session/{sessionID}": {
  5625. "get": {
  5626. "tags": ["session"],
  5627. "operationId": "session.get",
  5628. "parameters": [
  5629. {
  5630. "name": "sessionID",
  5631. "in": "path",
  5632. "schema": {
  5633. "type": "string",
  5634. "pattern": "^ses"
  5635. },
  5636. "required": true
  5637. },
  5638. {
  5639. "name": "directory",
  5640. "in": "query",
  5641. "schema": {
  5642. "type": "string"
  5643. },
  5644. "required": false
  5645. },
  5646. {
  5647. "name": "workspace",
  5648. "in": "query",
  5649. "schema": {
  5650. "type": "string"
  5651. },
  5652. "required": false
  5653. }
  5654. ],
  5655. "responses": {
  5656. "200": {
  5657. "description": "Get session",
  5658. "content": {
  5659. "application/json": {
  5660. "schema": {
  5661. "$ref": "#/components/schemas/Session"
  5662. }
  5663. }
  5664. }
  5665. },
  5666. "400": {
  5667. "description": "BadRequest | InvalidRequestError",
  5668. "content": {
  5669. "application/json": {
  5670. "schema": {
  5671. "anyOf": [
  5672. {
  5673. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5674. },
  5675. {
  5676. "$ref": "#/components/schemas/InvalidRequestError"
  5677. }
  5678. ]
  5679. }
  5680. }
  5681. }
  5682. },
  5683. "404": {
  5684. "description": "NotFoundError",
  5685. "content": {
  5686. "application/json": {
  5687. "schema": {
  5688. "$ref": "#/components/schemas/NotFoundError"
  5689. }
  5690. }
  5691. }
  5692. }
  5693. },
  5694. "description": "Retrieve detailed information about a specific OpenCode session.",
  5695. "summary": "Get session",
  5696. "x-codeSamples": [
  5697. {
  5698. "lang": "js",
  5699. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5700. }
  5701. ]
  5702. },
  5703. "delete": {
  5704. "tags": ["session"],
  5705. "operationId": "session.delete",
  5706. "parameters": [
  5707. {
  5708. "name": "sessionID",
  5709. "in": "path",
  5710. "schema": {
  5711. "type": "string",
  5712. "pattern": "^ses"
  5713. },
  5714. "required": true
  5715. },
  5716. {
  5717. "name": "directory",
  5718. "in": "query",
  5719. "schema": {
  5720. "type": "string"
  5721. },
  5722. "required": false
  5723. },
  5724. {
  5725. "name": "workspace",
  5726. "in": "query",
  5727. "schema": {
  5728. "type": "string"
  5729. },
  5730. "required": false
  5731. }
  5732. ],
  5733. "responses": {
  5734. "200": {
  5735. "description": "Successfully deleted session",
  5736. "content": {
  5737. "application/json": {
  5738. "schema": {
  5739. "type": "boolean",
  5740. "description": "Successfully deleted session"
  5741. }
  5742. }
  5743. }
  5744. },
  5745. "400": {
  5746. "description": "BadRequest | InvalidRequestError",
  5747. "content": {
  5748. "application/json": {
  5749. "schema": {
  5750. "anyOf": [
  5751. {
  5752. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5753. },
  5754. {
  5755. "$ref": "#/components/schemas/InvalidRequestError"
  5756. }
  5757. ]
  5758. }
  5759. }
  5760. }
  5761. },
  5762. "404": {
  5763. "description": "NotFoundError",
  5764. "content": {
  5765. "application/json": {
  5766. "schema": {
  5767. "$ref": "#/components/schemas/NotFoundError"
  5768. }
  5769. }
  5770. }
  5771. }
  5772. },
  5773. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5774. "summary": "Delete session",
  5775. "x-codeSamples": [
  5776. {
  5777. "lang": "js",
  5778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5779. }
  5780. ]
  5781. },
  5782. "patch": {
  5783. "tags": ["session"],
  5784. "operationId": "session.update",
  5785. "parameters": [
  5786. {
  5787. "name": "sessionID",
  5788. "in": "path",
  5789. "schema": {
  5790. "type": "string",
  5791. "pattern": "^ses"
  5792. },
  5793. "required": true
  5794. },
  5795. {
  5796. "name": "directory",
  5797. "in": "query",
  5798. "schema": {
  5799. "type": "string"
  5800. },
  5801. "required": false
  5802. },
  5803. {
  5804. "name": "workspace",
  5805. "in": "query",
  5806. "schema": {
  5807. "type": "string"
  5808. },
  5809. "required": false
  5810. }
  5811. ],
  5812. "responses": {
  5813. "200": {
  5814. "description": "Successfully updated session",
  5815. "content": {
  5816. "application/json": {
  5817. "schema": {
  5818. "$ref": "#/components/schemas/Session"
  5819. }
  5820. }
  5821. }
  5822. },
  5823. "400": {
  5824. "description": "BadRequest | InvalidRequestError",
  5825. "content": {
  5826. "application/json": {
  5827. "schema": {
  5828. "anyOf": [
  5829. {
  5830. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5831. },
  5832. {
  5833. "$ref": "#/components/schemas/InvalidRequestError"
  5834. }
  5835. ]
  5836. }
  5837. }
  5838. }
  5839. },
  5840. "404": {
  5841. "description": "NotFoundError",
  5842. "content": {
  5843. "application/json": {
  5844. "schema": {
  5845. "$ref": "#/components/schemas/NotFoundError"
  5846. }
  5847. }
  5848. }
  5849. }
  5850. },
  5851. "description": "Update properties of an existing session, such as title or other metadata.",
  5852. "summary": "Update session",
  5853. "requestBody": {
  5854. "content": {
  5855. "application/json": {
  5856. "schema": {
  5857. "type": "object",
  5858. "properties": {
  5859. "title": {
  5860. "type": "string"
  5861. },
  5862. "metadata": {
  5863. "type": "object"
  5864. },
  5865. "permission": {
  5866. "$ref": "#/components/schemas/PermissionRuleset"
  5867. },
  5868. "time": {
  5869. "type": "object",
  5870. "properties": {
  5871. "archived": {
  5872. "type": "number"
  5873. }
  5874. },
  5875. "additionalProperties": false
  5876. }
  5877. },
  5878. "additionalProperties": false
  5879. }
  5880. }
  5881. }
  5882. },
  5883. "x-codeSamples": [
  5884. {
  5885. "lang": "js",
  5886. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5887. }
  5888. ]
  5889. }
  5890. },
  5891. "/session/{sessionID}/children": {
  5892. "get": {
  5893. "tags": ["session"],
  5894. "operationId": "session.children",
  5895. "parameters": [
  5896. {
  5897. "name": "sessionID",
  5898. "in": "path",
  5899. "schema": {
  5900. "type": "string",
  5901. "pattern": "^ses"
  5902. },
  5903. "required": true
  5904. },
  5905. {
  5906. "name": "directory",
  5907. "in": "query",
  5908. "schema": {
  5909. "type": "string"
  5910. },
  5911. "required": false
  5912. },
  5913. {
  5914. "name": "workspace",
  5915. "in": "query",
  5916. "schema": {
  5917. "type": "string"
  5918. },
  5919. "required": false
  5920. }
  5921. ],
  5922. "responses": {
  5923. "200": {
  5924. "description": "List of children",
  5925. "content": {
  5926. "application/json": {
  5927. "schema": {
  5928. "type": "array",
  5929. "items": {
  5930. "$ref": "#/components/schemas/Session"
  5931. },
  5932. "description": "List of children"
  5933. }
  5934. }
  5935. }
  5936. },
  5937. "400": {
  5938. "description": "BadRequest | InvalidRequestError",
  5939. "content": {
  5940. "application/json": {
  5941. "schema": {
  5942. "anyOf": [
  5943. {
  5944. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5945. },
  5946. {
  5947. "$ref": "#/components/schemas/InvalidRequestError"
  5948. }
  5949. ]
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "404": {
  5955. "description": "NotFoundError",
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "$ref": "#/components/schemas/NotFoundError"
  5960. }
  5961. }
  5962. }
  5963. }
  5964. },
  5965. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5966. "summary": "Get session children",
  5967. "x-codeSamples": [
  5968. {
  5969. "lang": "js",
  5970. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5971. }
  5972. ]
  5973. }
  5974. },
  5975. "/session/{sessionID}/todo": {
  5976. "get": {
  5977. "tags": ["session"],
  5978. "operationId": "session.todo",
  5979. "parameters": [
  5980. {
  5981. "name": "sessionID",
  5982. "in": "path",
  5983. "schema": {
  5984. "type": "string",
  5985. "pattern": "^ses"
  5986. },
  5987. "required": true
  5988. },
  5989. {
  5990. "name": "directory",
  5991. "in": "query",
  5992. "schema": {
  5993. "type": "string"
  5994. },
  5995. "required": false
  5996. },
  5997. {
  5998. "name": "workspace",
  5999. "in": "query",
  6000. "schema": {
  6001. "type": "string"
  6002. },
  6003. "required": false
  6004. }
  6005. ],
  6006. "responses": {
  6007. "200": {
  6008. "description": "Todo list",
  6009. "content": {
  6010. "application/json": {
  6011. "schema": {
  6012. "type": "array",
  6013. "items": {
  6014. "$ref": "#/components/schemas/Todo"
  6015. },
  6016. "description": "Todo list"
  6017. }
  6018. }
  6019. }
  6020. },
  6021. "400": {
  6022. "description": "BadRequest | InvalidRequestError",
  6023. "content": {
  6024. "application/json": {
  6025. "schema": {
  6026. "anyOf": [
  6027. {
  6028. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6029. },
  6030. {
  6031. "$ref": "#/components/schemas/InvalidRequestError"
  6032. }
  6033. ]
  6034. }
  6035. }
  6036. }
  6037. },
  6038. "404": {
  6039. "description": "NotFoundError",
  6040. "content": {
  6041. "application/json": {
  6042. "schema": {
  6043. "$ref": "#/components/schemas/NotFoundError"
  6044. }
  6045. }
  6046. }
  6047. }
  6048. },
  6049. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6050. "summary": "Get session todos",
  6051. "x-codeSamples": [
  6052. {
  6053. "lang": "js",
  6054. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6055. }
  6056. ]
  6057. }
  6058. },
  6059. "/session/{sessionID}/diff": {
  6060. "get": {
  6061. "tags": ["session"],
  6062. "operationId": "session.diff",
  6063. "parameters": [
  6064. {
  6065. "name": "sessionID",
  6066. "in": "path",
  6067. "schema": {
  6068. "type": "string",
  6069. "pattern": "^ses"
  6070. },
  6071. "required": true
  6072. },
  6073. {
  6074. "name": "directory",
  6075. "in": "query",
  6076. "schema": {
  6077. "type": "string"
  6078. },
  6079. "required": false
  6080. },
  6081. {
  6082. "name": "workspace",
  6083. "in": "query",
  6084. "schema": {
  6085. "type": "string"
  6086. },
  6087. "required": false
  6088. },
  6089. {
  6090. "name": "messageID",
  6091. "in": "query",
  6092. "schema": {
  6093. "type": "string",
  6094. "pattern": "^msg"
  6095. },
  6096. "required": false
  6097. }
  6098. ],
  6099. "responses": {
  6100. "200": {
  6101. "description": "Successfully retrieved diff",
  6102. "content": {
  6103. "application/json": {
  6104. "schema": {
  6105. "type": "array",
  6106. "items": {
  6107. "$ref": "#/components/schemas/SnapshotFileDiff"
  6108. },
  6109. "description": "Successfully retrieved diff"
  6110. }
  6111. }
  6112. }
  6113. },
  6114. "400": {
  6115. "description": "Bad request",
  6116. "content": {
  6117. "application/json": {
  6118. "schema": {
  6119. "$ref": "#/components/schemas/BadRequestError"
  6120. }
  6121. }
  6122. }
  6123. }
  6124. },
  6125. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6126. "summary": "Get message diff",
  6127. "x-codeSamples": [
  6128. {
  6129. "lang": "js",
  6130. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6131. }
  6132. ]
  6133. }
  6134. },
  6135. "/session/{sessionID}/message": {
  6136. "get": {
  6137. "tags": ["session"],
  6138. "operationId": "session.messages",
  6139. "parameters": [
  6140. {
  6141. "name": "sessionID",
  6142. "in": "path",
  6143. "schema": {
  6144. "type": "string",
  6145. "pattern": "^ses"
  6146. },
  6147. "required": true
  6148. },
  6149. {
  6150. "name": "directory",
  6151. "in": "query",
  6152. "schema": {
  6153. "type": "string"
  6154. },
  6155. "required": false
  6156. },
  6157. {
  6158. "name": "workspace",
  6159. "in": "query",
  6160. "schema": {
  6161. "type": "string"
  6162. },
  6163. "required": false
  6164. },
  6165. {
  6166. "name": "limit",
  6167. "in": "query",
  6168. "schema": {
  6169. "type": "integer",
  6170. "minimum": 0,
  6171. "maximum": 9007199254740991
  6172. },
  6173. "required": false
  6174. },
  6175. {
  6176. "name": "before",
  6177. "in": "query",
  6178. "schema": {
  6179. "type": "string"
  6180. },
  6181. "required": false
  6182. }
  6183. ],
  6184. "responses": {
  6185. "200": {
  6186. "description": "List of messages",
  6187. "content": {
  6188. "application/json": {
  6189. "schema": {
  6190. "type": "array",
  6191. "items": {
  6192. "type": "object",
  6193. "properties": {
  6194. "info": {
  6195. "$ref": "#/components/schemas/Message"
  6196. },
  6197. "parts": {
  6198. "type": "array",
  6199. "items": {
  6200. "$ref": "#/components/schemas/Part"
  6201. }
  6202. }
  6203. },
  6204. "required": ["info", "parts"],
  6205. "additionalProperties": false
  6206. },
  6207. "description": "List of messages"
  6208. }
  6209. }
  6210. }
  6211. },
  6212. "400": {
  6213. "description": "BadRequest | InvalidRequestError",
  6214. "content": {
  6215. "application/json": {
  6216. "schema": {
  6217. "anyOf": [
  6218. {
  6219. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6220. },
  6221. {
  6222. "$ref": "#/components/schemas/InvalidRequestError"
  6223. }
  6224. ]
  6225. }
  6226. }
  6227. }
  6228. },
  6229. "404": {
  6230. "description": "NotFoundError",
  6231. "content": {
  6232. "application/json": {
  6233. "schema": {
  6234. "$ref": "#/components/schemas/NotFoundError"
  6235. }
  6236. }
  6237. }
  6238. }
  6239. },
  6240. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6241. "summary": "Get session messages",
  6242. "x-codeSamples": [
  6243. {
  6244. "lang": "js",
  6245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6246. }
  6247. ]
  6248. },
  6249. "post": {
  6250. "tags": ["session"],
  6251. "operationId": "session.prompt",
  6252. "parameters": [
  6253. {
  6254. "name": "sessionID",
  6255. "in": "path",
  6256. "schema": {
  6257. "type": "string",
  6258. "pattern": "^ses"
  6259. },
  6260. "required": true
  6261. },
  6262. {
  6263. "name": "directory",
  6264. "in": "query",
  6265. "schema": {
  6266. "type": "string"
  6267. },
  6268. "required": false
  6269. },
  6270. {
  6271. "name": "workspace",
  6272. "in": "query",
  6273. "schema": {
  6274. "type": "string"
  6275. },
  6276. "required": false
  6277. }
  6278. ],
  6279. "responses": {
  6280. "200": {
  6281. "description": "Created message",
  6282. "content": {
  6283. "application/json": {
  6284. "schema": {
  6285. "type": "object",
  6286. "required": ["info", "parts"],
  6287. "properties": {
  6288. "info": {
  6289. "$ref": "#/components/schemas/AssistantMessage"
  6290. },
  6291. "parts": {
  6292. "type": "array",
  6293. "items": {
  6294. "$ref": "#/components/schemas/Part"
  6295. }
  6296. }
  6297. }
  6298. }
  6299. }
  6300. }
  6301. },
  6302. "400": {
  6303. "description": "BadRequest | InvalidRequestError",
  6304. "content": {
  6305. "application/json": {
  6306. "schema": {
  6307. "anyOf": [
  6308. {
  6309. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6310. },
  6311. {
  6312. "$ref": "#/components/schemas/InvalidRequestError"
  6313. }
  6314. ]
  6315. }
  6316. }
  6317. }
  6318. },
  6319. "404": {
  6320. "description": "NotFoundError",
  6321. "content": {
  6322. "application/json": {
  6323. "schema": {
  6324. "$ref": "#/components/schemas/NotFoundError"
  6325. }
  6326. }
  6327. }
  6328. }
  6329. },
  6330. "description": "Create and send a new message to a session, streaming the AI response.",
  6331. "summary": "Send message",
  6332. "requestBody": {
  6333. "content": {
  6334. "application/json": {
  6335. "schema": {
  6336. "type": "object",
  6337. "properties": {
  6338. "messageID": {
  6339. "type": "string",
  6340. "pattern": "^msg"
  6341. },
  6342. "model": {
  6343. "type": "object",
  6344. "properties": {
  6345. "providerID": {
  6346. "type": "string"
  6347. },
  6348. "modelID": {
  6349. "type": "string"
  6350. }
  6351. },
  6352. "required": ["providerID", "modelID"],
  6353. "additionalProperties": false
  6354. },
  6355. "agent": {
  6356. "type": "string"
  6357. },
  6358. "noReply": {
  6359. "type": "boolean"
  6360. },
  6361. "tools": {
  6362. "type": "object",
  6363. "additionalProperties": {
  6364. "type": "boolean"
  6365. }
  6366. },
  6367. "format": {
  6368. "$ref": "#/components/schemas/OutputFormat"
  6369. },
  6370. "system": {
  6371. "type": "string"
  6372. },
  6373. "variant": {
  6374. "type": "string"
  6375. },
  6376. "parts": {
  6377. "type": "array",
  6378. "items": {
  6379. "anyOf": [
  6380. {
  6381. "$ref": "#/components/schemas/TextPartInput"
  6382. },
  6383. {
  6384. "$ref": "#/components/schemas/FilePartInput"
  6385. },
  6386. {
  6387. "$ref": "#/components/schemas/AgentPartInput"
  6388. },
  6389. {
  6390. "$ref": "#/components/schemas/SubtaskPartInput"
  6391. }
  6392. ]
  6393. }
  6394. }
  6395. },
  6396. "required": ["parts"],
  6397. "additionalProperties": false
  6398. }
  6399. }
  6400. }
  6401. },
  6402. "x-codeSamples": [
  6403. {
  6404. "lang": "js",
  6405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6406. }
  6407. ]
  6408. }
  6409. },
  6410. "/session/{sessionID}/message/{messageID}": {
  6411. "get": {
  6412. "tags": ["session"],
  6413. "operationId": "session.message",
  6414. "parameters": [
  6415. {
  6416. "name": "sessionID",
  6417. "in": "path",
  6418. "schema": {
  6419. "type": "string",
  6420. "pattern": "^ses"
  6421. },
  6422. "required": true
  6423. },
  6424. {
  6425. "name": "messageID",
  6426. "in": "path",
  6427. "schema": {
  6428. "type": "string",
  6429. "pattern": "^msg"
  6430. },
  6431. "required": true
  6432. },
  6433. {
  6434. "name": "directory",
  6435. "in": "query",
  6436. "schema": {
  6437. "type": "string"
  6438. },
  6439. "required": false
  6440. },
  6441. {
  6442. "name": "workspace",
  6443. "in": "query",
  6444. "schema": {
  6445. "type": "string"
  6446. },
  6447. "required": false
  6448. }
  6449. ],
  6450. "responses": {
  6451. "200": {
  6452. "description": "Message",
  6453. "content": {
  6454. "application/json": {
  6455. "schema": {
  6456. "type": "object",
  6457. "properties": {
  6458. "info": {
  6459. "$ref": "#/components/schemas/Message"
  6460. },
  6461. "parts": {
  6462. "type": "array",
  6463. "items": {
  6464. "$ref": "#/components/schemas/Part"
  6465. }
  6466. }
  6467. },
  6468. "required": ["info", "parts"],
  6469. "additionalProperties": false,
  6470. "description": "Message"
  6471. }
  6472. }
  6473. }
  6474. },
  6475. "400": {
  6476. "description": "BadRequest | InvalidRequestError",
  6477. "content": {
  6478. "application/json": {
  6479. "schema": {
  6480. "anyOf": [
  6481. {
  6482. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6483. },
  6484. {
  6485. "$ref": "#/components/schemas/InvalidRequestError"
  6486. }
  6487. ]
  6488. }
  6489. }
  6490. }
  6491. },
  6492. "404": {
  6493. "description": "NotFoundError",
  6494. "content": {
  6495. "application/json": {
  6496. "schema": {
  6497. "$ref": "#/components/schemas/NotFoundError"
  6498. }
  6499. }
  6500. }
  6501. }
  6502. },
  6503. "description": "Retrieve a specific message from a session by its message ID.",
  6504. "summary": "Get message",
  6505. "x-codeSamples": [
  6506. {
  6507. "lang": "js",
  6508. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6509. }
  6510. ]
  6511. },
  6512. "delete": {
  6513. "tags": ["session"],
  6514. "operationId": "session.deleteMessage",
  6515. "parameters": [
  6516. {
  6517. "name": "sessionID",
  6518. "in": "path",
  6519. "schema": {
  6520. "type": "string",
  6521. "pattern": "^ses"
  6522. },
  6523. "required": true
  6524. },
  6525. {
  6526. "name": "messageID",
  6527. "in": "path",
  6528. "schema": {
  6529. "type": "string",
  6530. "pattern": "^msg"
  6531. },
  6532. "required": true
  6533. },
  6534. {
  6535. "name": "directory",
  6536. "in": "query",
  6537. "schema": {
  6538. "type": "string"
  6539. },
  6540. "required": false
  6541. },
  6542. {
  6543. "name": "workspace",
  6544. "in": "query",
  6545. "schema": {
  6546. "type": "string"
  6547. },
  6548. "required": false
  6549. }
  6550. ],
  6551. "responses": {
  6552. "200": {
  6553. "description": "Successfully deleted message",
  6554. "content": {
  6555. "application/json": {
  6556. "schema": {
  6557. "type": "boolean",
  6558. "description": "Successfully deleted message"
  6559. }
  6560. }
  6561. }
  6562. },
  6563. "400": {
  6564. "description": "BadRequest | InvalidRequestError",
  6565. "content": {
  6566. "application/json": {
  6567. "schema": {
  6568. "anyOf": [
  6569. {
  6570. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6571. },
  6572. {
  6573. "$ref": "#/components/schemas/InvalidRequestError"
  6574. }
  6575. ]
  6576. }
  6577. }
  6578. }
  6579. },
  6580. "404": {
  6581. "description": "NotFoundError",
  6582. "content": {
  6583. "application/json": {
  6584. "schema": {
  6585. "$ref": "#/components/schemas/NotFoundError"
  6586. }
  6587. }
  6588. }
  6589. },
  6590. "409": {
  6591. "description": "SessionBusyError",
  6592. "content": {
  6593. "application/json": {
  6594. "schema": {
  6595. "$ref": "#/components/schemas/SessionBusyError"
  6596. }
  6597. }
  6598. }
  6599. }
  6600. },
  6601. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6602. "summary": "Delete message",
  6603. "x-codeSamples": [
  6604. {
  6605. "lang": "js",
  6606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6607. }
  6608. ]
  6609. }
  6610. },
  6611. "/session/{sessionID}/fork": {
  6612. "post": {
  6613. "tags": ["session"],
  6614. "operationId": "session.fork",
  6615. "parameters": [
  6616. {
  6617. "name": "sessionID",
  6618. "in": "path",
  6619. "schema": {
  6620. "type": "string",
  6621. "pattern": "^ses"
  6622. },
  6623. "required": true
  6624. },
  6625. {
  6626. "name": "directory",
  6627. "in": "query",
  6628. "schema": {
  6629. "type": "string"
  6630. },
  6631. "required": false
  6632. },
  6633. {
  6634. "name": "workspace",
  6635. "in": "query",
  6636. "schema": {
  6637. "type": "string"
  6638. },
  6639. "required": false
  6640. }
  6641. ],
  6642. "responses": {
  6643. "200": {
  6644. "description": "200",
  6645. "content": {
  6646. "application/json": {
  6647. "schema": {
  6648. "$ref": "#/components/schemas/Session"
  6649. }
  6650. }
  6651. }
  6652. },
  6653. "400": {
  6654. "description": "BadRequest | InvalidRequestError",
  6655. "content": {
  6656. "application/json": {
  6657. "schema": {
  6658. "anyOf": [
  6659. {
  6660. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6661. },
  6662. {
  6663. "$ref": "#/components/schemas/InvalidRequestError"
  6664. }
  6665. ]
  6666. }
  6667. }
  6668. }
  6669. },
  6670. "404": {
  6671. "description": "NotFoundError",
  6672. "content": {
  6673. "application/json": {
  6674. "schema": {
  6675. "$ref": "#/components/schemas/NotFoundError"
  6676. }
  6677. }
  6678. }
  6679. }
  6680. },
  6681. "description": "Create a new session by forking an existing session at a specific message point.",
  6682. "summary": "Fork session",
  6683. "requestBody": {
  6684. "content": {
  6685. "application/json": {
  6686. "schema": {
  6687. "type": "object",
  6688. "properties": {
  6689. "messageID": {
  6690. "type": "string",
  6691. "pattern": "^msg"
  6692. }
  6693. },
  6694. "additionalProperties": false
  6695. }
  6696. }
  6697. }
  6698. },
  6699. "x-codeSamples": [
  6700. {
  6701. "lang": "js",
  6702. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6703. }
  6704. ]
  6705. }
  6706. },
  6707. "/session/{sessionID}/abort": {
  6708. "post": {
  6709. "tags": ["session"],
  6710. "operationId": "session.abort",
  6711. "parameters": [
  6712. {
  6713. "name": "sessionID",
  6714. "in": "path",
  6715. "schema": {
  6716. "type": "string",
  6717. "pattern": "^ses"
  6718. },
  6719. "required": true
  6720. },
  6721. {
  6722. "name": "directory",
  6723. "in": "query",
  6724. "schema": {
  6725. "type": "string"
  6726. },
  6727. "required": false
  6728. },
  6729. {
  6730. "name": "workspace",
  6731. "in": "query",
  6732. "schema": {
  6733. "type": "string"
  6734. },
  6735. "required": false
  6736. }
  6737. ],
  6738. "responses": {
  6739. "200": {
  6740. "description": "Aborted session",
  6741. "content": {
  6742. "application/json": {
  6743. "schema": {
  6744. "type": "boolean",
  6745. "description": "Aborted session"
  6746. }
  6747. }
  6748. }
  6749. },
  6750. "400": {
  6751. "description": "BadRequest | InvalidRequestError",
  6752. "content": {
  6753. "application/json": {
  6754. "schema": {
  6755. "anyOf": [
  6756. {
  6757. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6758. },
  6759. {
  6760. "$ref": "#/components/schemas/InvalidRequestError"
  6761. }
  6762. ]
  6763. }
  6764. }
  6765. }
  6766. }
  6767. },
  6768. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6769. "summary": "Abort session",
  6770. "x-codeSamples": [
  6771. {
  6772. "lang": "js",
  6773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6774. }
  6775. ]
  6776. }
  6777. },
  6778. "/session/{sessionID}/init": {
  6779. "post": {
  6780. "tags": ["session"],
  6781. "operationId": "session.init",
  6782. "parameters": [
  6783. {
  6784. "name": "sessionID",
  6785. "in": "path",
  6786. "schema": {
  6787. "type": "string",
  6788. "pattern": "^ses"
  6789. },
  6790. "required": true
  6791. },
  6792. {
  6793. "name": "directory",
  6794. "in": "query",
  6795. "schema": {
  6796. "type": "string"
  6797. },
  6798. "required": false
  6799. },
  6800. {
  6801. "name": "workspace",
  6802. "in": "query",
  6803. "schema": {
  6804. "type": "string"
  6805. },
  6806. "required": false
  6807. }
  6808. ],
  6809. "responses": {
  6810. "200": {
  6811. "description": "200",
  6812. "content": {
  6813. "application/json": {
  6814. "schema": {
  6815. "type": "boolean",
  6816. "description": "200"
  6817. }
  6818. }
  6819. }
  6820. },
  6821. "400": {
  6822. "description": "BadRequest | InvalidRequestError",
  6823. "content": {
  6824. "application/json": {
  6825. "schema": {
  6826. "anyOf": [
  6827. {
  6828. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6829. },
  6830. {
  6831. "$ref": "#/components/schemas/InvalidRequestError"
  6832. }
  6833. ]
  6834. }
  6835. }
  6836. }
  6837. },
  6838. "404": {
  6839. "description": "NotFoundError",
  6840. "content": {
  6841. "application/json": {
  6842. "schema": {
  6843. "$ref": "#/components/schemas/NotFoundError"
  6844. }
  6845. }
  6846. }
  6847. }
  6848. },
  6849. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6850. "summary": "Initialize session",
  6851. "requestBody": {
  6852. "content": {
  6853. "application/json": {
  6854. "schema": {
  6855. "type": "object",
  6856. "properties": {
  6857. "modelID": {
  6858. "type": "string"
  6859. },
  6860. "providerID": {
  6861. "type": "string"
  6862. },
  6863. "messageID": {
  6864. "type": "string",
  6865. "pattern": "^msg"
  6866. }
  6867. },
  6868. "required": ["modelID", "providerID", "messageID"],
  6869. "additionalProperties": false
  6870. }
  6871. }
  6872. }
  6873. },
  6874. "x-codeSamples": [
  6875. {
  6876. "lang": "js",
  6877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6878. }
  6879. ]
  6880. }
  6881. },
  6882. "/session/{sessionID}/share": {
  6883. "post": {
  6884. "tags": ["session"],
  6885. "operationId": "session.share",
  6886. "parameters": [
  6887. {
  6888. "name": "sessionID",
  6889. "in": "path",
  6890. "schema": {
  6891. "type": "string",
  6892. "pattern": "^ses"
  6893. },
  6894. "required": true
  6895. },
  6896. {
  6897. "name": "directory",
  6898. "in": "query",
  6899. "schema": {
  6900. "type": "string"
  6901. },
  6902. "required": false
  6903. },
  6904. {
  6905. "name": "workspace",
  6906. "in": "query",
  6907. "schema": {
  6908. "type": "string"
  6909. },
  6910. "required": false
  6911. }
  6912. ],
  6913. "responses": {
  6914. "200": {
  6915. "description": "Successfully shared session",
  6916. "content": {
  6917. "application/json": {
  6918. "schema": {
  6919. "$ref": "#/components/schemas/Session"
  6920. }
  6921. }
  6922. }
  6923. },
  6924. "400": {
  6925. "description": "Bad request",
  6926. "content": {
  6927. "application/json": {
  6928. "schema": {
  6929. "$ref": "#/components/schemas/BadRequestError"
  6930. }
  6931. }
  6932. }
  6933. },
  6934. "404": {
  6935. "description": "NotFoundError",
  6936. "content": {
  6937. "application/json": {
  6938. "schema": {
  6939. "$ref": "#/components/schemas/NotFoundError"
  6940. }
  6941. }
  6942. }
  6943. },
  6944. "500": {
  6945. "description": "InternalServerError",
  6946. "content": {
  6947. "application/json": {
  6948. "schema": {
  6949. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6950. }
  6951. }
  6952. }
  6953. }
  6954. },
  6955. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6956. "summary": "Share session",
  6957. "x-codeSamples": [
  6958. {
  6959. "lang": "js",
  6960. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6961. }
  6962. ]
  6963. },
  6964. "delete": {
  6965. "tags": ["session"],
  6966. "operationId": "session.unshare",
  6967. "parameters": [
  6968. {
  6969. "name": "sessionID",
  6970. "in": "path",
  6971. "schema": {
  6972. "type": "string",
  6973. "pattern": "^ses"
  6974. },
  6975. "required": true
  6976. },
  6977. {
  6978. "name": "directory",
  6979. "in": "query",
  6980. "schema": {
  6981. "type": "string"
  6982. },
  6983. "required": false
  6984. },
  6985. {
  6986. "name": "workspace",
  6987. "in": "query",
  6988. "schema": {
  6989. "type": "string"
  6990. },
  6991. "required": false
  6992. }
  6993. ],
  6994. "responses": {
  6995. "200": {
  6996. "description": "Successfully unshared session",
  6997. "content": {
  6998. "application/json": {
  6999. "schema": {
  7000. "$ref": "#/components/schemas/Session"
  7001. }
  7002. }
  7003. }
  7004. },
  7005. "400": {
  7006. "description": "Bad request",
  7007. "content": {
  7008. "application/json": {
  7009. "schema": {
  7010. "$ref": "#/components/schemas/BadRequestError"
  7011. }
  7012. }
  7013. }
  7014. },
  7015. "404": {
  7016. "description": "NotFoundError",
  7017. "content": {
  7018. "application/json": {
  7019. "schema": {
  7020. "$ref": "#/components/schemas/NotFoundError"
  7021. }
  7022. }
  7023. }
  7024. },
  7025. "500": {
  7026. "description": "InternalServerError",
  7027. "content": {
  7028. "application/json": {
  7029. "schema": {
  7030. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7031. }
  7032. }
  7033. }
  7034. }
  7035. },
  7036. "description": "Remove the shareable link for a session, making it private again.",
  7037. "summary": "Unshare session",
  7038. "x-codeSamples": [
  7039. {
  7040. "lang": "js",
  7041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7042. }
  7043. ]
  7044. }
  7045. },
  7046. "/session/{sessionID}/summarize": {
  7047. "post": {
  7048. "tags": ["session"],
  7049. "operationId": "session.summarize",
  7050. "parameters": [
  7051. {
  7052. "name": "sessionID",
  7053. "in": "path",
  7054. "schema": {
  7055. "type": "string",
  7056. "pattern": "^ses"
  7057. },
  7058. "required": true
  7059. },
  7060. {
  7061. "name": "directory",
  7062. "in": "query",
  7063. "schema": {
  7064. "type": "string"
  7065. },
  7066. "required": false
  7067. },
  7068. {
  7069. "name": "workspace",
  7070. "in": "query",
  7071. "schema": {
  7072. "type": "string"
  7073. },
  7074. "required": false
  7075. }
  7076. ],
  7077. "responses": {
  7078. "200": {
  7079. "description": "Summarized session",
  7080. "content": {
  7081. "application/json": {
  7082. "schema": {
  7083. "type": "boolean",
  7084. "description": "Summarized session"
  7085. }
  7086. }
  7087. }
  7088. },
  7089. "400": {
  7090. "description": "BadRequest | InvalidRequestError",
  7091. "content": {
  7092. "application/json": {
  7093. "schema": {
  7094. "anyOf": [
  7095. {
  7096. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7097. },
  7098. {
  7099. "$ref": "#/components/schemas/InvalidRequestError"
  7100. }
  7101. ]
  7102. }
  7103. }
  7104. }
  7105. },
  7106. "404": {
  7107. "description": "NotFoundError",
  7108. "content": {
  7109. "application/json": {
  7110. "schema": {
  7111. "$ref": "#/components/schemas/NotFoundError"
  7112. }
  7113. }
  7114. }
  7115. }
  7116. },
  7117. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7118. "summary": "Summarize session",
  7119. "requestBody": {
  7120. "content": {
  7121. "application/json": {
  7122. "schema": {
  7123. "type": "object",
  7124. "properties": {
  7125. "providerID": {
  7126. "type": "string"
  7127. },
  7128. "modelID": {
  7129. "type": "string"
  7130. },
  7131. "auto": {
  7132. "type": "boolean"
  7133. }
  7134. },
  7135. "required": ["providerID", "modelID"],
  7136. "additionalProperties": false
  7137. }
  7138. }
  7139. }
  7140. },
  7141. "x-codeSamples": [
  7142. {
  7143. "lang": "js",
  7144. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7145. }
  7146. ]
  7147. }
  7148. },
  7149. "/session/{sessionID}/prompt_async": {
  7150. "post": {
  7151. "tags": ["session"],
  7152. "operationId": "session.prompt_async",
  7153. "parameters": [
  7154. {
  7155. "name": "sessionID",
  7156. "in": "path",
  7157. "schema": {
  7158. "type": "string",
  7159. "pattern": "^ses"
  7160. },
  7161. "required": true
  7162. },
  7163. {
  7164. "name": "directory",
  7165. "in": "query",
  7166. "schema": {
  7167. "type": "string"
  7168. },
  7169. "required": false
  7170. },
  7171. {
  7172. "name": "workspace",
  7173. "in": "query",
  7174. "schema": {
  7175. "type": "string"
  7176. },
  7177. "required": false
  7178. }
  7179. ],
  7180. "responses": {
  7181. "204": {
  7182. "description": "Prompt accepted"
  7183. },
  7184. "400": {
  7185. "description": "BadRequest | InvalidRequestError",
  7186. "content": {
  7187. "application/json": {
  7188. "schema": {
  7189. "anyOf": [
  7190. {
  7191. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7192. },
  7193. {
  7194. "$ref": "#/components/schemas/InvalidRequestError"
  7195. }
  7196. ]
  7197. }
  7198. }
  7199. }
  7200. },
  7201. "404": {
  7202. "description": "NotFoundError",
  7203. "content": {
  7204. "application/json": {
  7205. "schema": {
  7206. "$ref": "#/components/schemas/NotFoundError"
  7207. }
  7208. }
  7209. }
  7210. }
  7211. },
  7212. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7213. "summary": "Send async message",
  7214. "requestBody": {
  7215. "content": {
  7216. "application/json": {
  7217. "schema": {
  7218. "type": "object",
  7219. "properties": {
  7220. "messageID": {
  7221. "type": "string",
  7222. "pattern": "^msg"
  7223. },
  7224. "model": {
  7225. "type": "object",
  7226. "properties": {
  7227. "providerID": {
  7228. "type": "string"
  7229. },
  7230. "modelID": {
  7231. "type": "string"
  7232. }
  7233. },
  7234. "required": ["providerID", "modelID"],
  7235. "additionalProperties": false
  7236. },
  7237. "agent": {
  7238. "type": "string"
  7239. },
  7240. "noReply": {
  7241. "type": "boolean"
  7242. },
  7243. "tools": {
  7244. "type": "object",
  7245. "additionalProperties": {
  7246. "type": "boolean"
  7247. }
  7248. },
  7249. "format": {
  7250. "$ref": "#/components/schemas/OutputFormat"
  7251. },
  7252. "system": {
  7253. "type": "string"
  7254. },
  7255. "variant": {
  7256. "type": "string"
  7257. },
  7258. "parts": {
  7259. "type": "array",
  7260. "items": {
  7261. "anyOf": [
  7262. {
  7263. "$ref": "#/components/schemas/TextPartInput"
  7264. },
  7265. {
  7266. "$ref": "#/components/schemas/FilePartInput"
  7267. },
  7268. {
  7269. "$ref": "#/components/schemas/AgentPartInput"
  7270. },
  7271. {
  7272. "$ref": "#/components/schemas/SubtaskPartInput"
  7273. }
  7274. ]
  7275. }
  7276. }
  7277. },
  7278. "required": ["parts"],
  7279. "additionalProperties": false
  7280. }
  7281. }
  7282. }
  7283. },
  7284. "x-codeSamples": [
  7285. {
  7286. "lang": "js",
  7287. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7288. }
  7289. ]
  7290. }
  7291. },
  7292. "/session/{sessionID}/command": {
  7293. "post": {
  7294. "tags": ["session"],
  7295. "operationId": "session.command",
  7296. "parameters": [
  7297. {
  7298. "name": "sessionID",
  7299. "in": "path",
  7300. "schema": {
  7301. "type": "string",
  7302. "pattern": "^ses"
  7303. },
  7304. "required": true
  7305. },
  7306. {
  7307. "name": "directory",
  7308. "in": "query",
  7309. "schema": {
  7310. "type": "string"
  7311. },
  7312. "required": false
  7313. },
  7314. {
  7315. "name": "workspace",
  7316. "in": "query",
  7317. "schema": {
  7318. "type": "string"
  7319. },
  7320. "required": false
  7321. }
  7322. ],
  7323. "responses": {
  7324. "200": {
  7325. "description": "Created message",
  7326. "content": {
  7327. "application/json": {
  7328. "schema": {
  7329. "type": "object",
  7330. "required": ["info", "parts"],
  7331. "properties": {
  7332. "info": {
  7333. "$ref": "#/components/schemas/AssistantMessage"
  7334. },
  7335. "parts": {
  7336. "type": "array",
  7337. "items": {
  7338. "$ref": "#/components/schemas/Part"
  7339. }
  7340. }
  7341. }
  7342. }
  7343. }
  7344. }
  7345. },
  7346. "400": {
  7347. "description": "BadRequest | InvalidRequestError",
  7348. "content": {
  7349. "application/json": {
  7350. "schema": {
  7351. "anyOf": [
  7352. {
  7353. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7354. },
  7355. {
  7356. "$ref": "#/components/schemas/InvalidRequestError"
  7357. }
  7358. ]
  7359. }
  7360. }
  7361. }
  7362. },
  7363. "404": {
  7364. "description": "NotFoundError",
  7365. "content": {
  7366. "application/json": {
  7367. "schema": {
  7368. "$ref": "#/components/schemas/NotFoundError"
  7369. }
  7370. }
  7371. }
  7372. }
  7373. },
  7374. "description": "Send a new command to a session for execution by the AI assistant.",
  7375. "summary": "Send command",
  7376. "requestBody": {
  7377. "content": {
  7378. "application/json": {
  7379. "schema": {
  7380. "type": "object",
  7381. "properties": {
  7382. "messageID": {
  7383. "type": "string",
  7384. "pattern": "^msg"
  7385. },
  7386. "agent": {
  7387. "type": "string"
  7388. },
  7389. "model": {
  7390. "type": "string"
  7391. },
  7392. "arguments": {
  7393. "type": "string"
  7394. },
  7395. "command": {
  7396. "type": "string"
  7397. },
  7398. "variant": {
  7399. "type": "string"
  7400. },
  7401. "parts": {
  7402. "type": "array",
  7403. "items": {
  7404. "type": "object",
  7405. "properties": {
  7406. "id": {
  7407. "type": "string",
  7408. "pattern": "^prt"
  7409. },
  7410. "type": {
  7411. "type": "string",
  7412. "enum": ["file"]
  7413. },
  7414. "mime": {
  7415. "type": "string"
  7416. },
  7417. "filename": {
  7418. "type": "string"
  7419. },
  7420. "url": {
  7421. "type": "string"
  7422. },
  7423. "source": {
  7424. "$ref": "#/components/schemas/FilePartSource"
  7425. }
  7426. },
  7427. "required": ["type", "mime", "url"],
  7428. "additionalProperties": false
  7429. }
  7430. }
  7431. },
  7432. "required": ["arguments", "command"],
  7433. "additionalProperties": false
  7434. }
  7435. }
  7436. }
  7437. },
  7438. "x-codeSamples": [
  7439. {
  7440. "lang": "js",
  7441. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7442. }
  7443. ]
  7444. }
  7445. },
  7446. "/session/{sessionID}/shell": {
  7447. "post": {
  7448. "tags": ["session"],
  7449. "operationId": "session.shell",
  7450. "parameters": [
  7451. {
  7452. "name": "sessionID",
  7453. "in": "path",
  7454. "schema": {
  7455. "type": "string",
  7456. "pattern": "^ses"
  7457. },
  7458. "required": true
  7459. },
  7460. {
  7461. "name": "directory",
  7462. "in": "query",
  7463. "schema": {
  7464. "type": "string"
  7465. },
  7466. "required": false
  7467. },
  7468. {
  7469. "name": "workspace",
  7470. "in": "query",
  7471. "schema": {
  7472. "type": "string"
  7473. },
  7474. "required": false
  7475. }
  7476. ],
  7477. "responses": {
  7478. "200": {
  7479. "description": "Created message",
  7480. "content": {
  7481. "application/json": {
  7482. "schema": {
  7483. "type": "object",
  7484. "properties": {
  7485. "info": {
  7486. "$ref": "#/components/schemas/Message"
  7487. },
  7488. "parts": {
  7489. "type": "array",
  7490. "items": {
  7491. "$ref": "#/components/schemas/Part"
  7492. }
  7493. }
  7494. },
  7495. "required": ["info", "parts"],
  7496. "additionalProperties": false,
  7497. "description": "Created message"
  7498. }
  7499. }
  7500. }
  7501. },
  7502. "400": {
  7503. "description": "BadRequest | InvalidRequestError",
  7504. "content": {
  7505. "application/json": {
  7506. "schema": {
  7507. "anyOf": [
  7508. {
  7509. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7510. },
  7511. {
  7512. "$ref": "#/components/schemas/InvalidRequestError"
  7513. }
  7514. ]
  7515. }
  7516. }
  7517. }
  7518. },
  7519. "404": {
  7520. "description": "NotFoundError",
  7521. "content": {
  7522. "application/json": {
  7523. "schema": {
  7524. "$ref": "#/components/schemas/NotFoundError"
  7525. }
  7526. }
  7527. }
  7528. },
  7529. "409": {
  7530. "description": "SessionBusyError",
  7531. "content": {
  7532. "application/json": {
  7533. "schema": {
  7534. "$ref": "#/components/schemas/SessionBusyError"
  7535. }
  7536. }
  7537. }
  7538. }
  7539. },
  7540. "description": "Execute a shell command within the session context and return the AI's response.",
  7541. "summary": "Run shell command",
  7542. "requestBody": {
  7543. "content": {
  7544. "application/json": {
  7545. "schema": {
  7546. "type": "object",
  7547. "properties": {
  7548. "messageID": {
  7549. "type": "string",
  7550. "pattern": "^msg"
  7551. },
  7552. "agent": {
  7553. "type": "string"
  7554. },
  7555. "model": {
  7556. "type": "object",
  7557. "properties": {
  7558. "providerID": {
  7559. "type": "string"
  7560. },
  7561. "modelID": {
  7562. "type": "string"
  7563. }
  7564. },
  7565. "required": ["providerID", "modelID"],
  7566. "additionalProperties": false
  7567. },
  7568. "command": {
  7569. "type": "string"
  7570. }
  7571. },
  7572. "required": ["agent", "command"],
  7573. "additionalProperties": false
  7574. }
  7575. }
  7576. }
  7577. },
  7578. "x-codeSamples": [
  7579. {
  7580. "lang": "js",
  7581. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7582. }
  7583. ]
  7584. }
  7585. },
  7586. "/session/{sessionID}/revert": {
  7587. "post": {
  7588. "tags": ["session"],
  7589. "operationId": "session.revert",
  7590. "parameters": [
  7591. {
  7592. "name": "sessionID",
  7593. "in": "path",
  7594. "schema": {
  7595. "type": "string",
  7596. "pattern": "^ses"
  7597. },
  7598. "required": true
  7599. },
  7600. {
  7601. "name": "directory",
  7602. "in": "query",
  7603. "schema": {
  7604. "type": "string"
  7605. },
  7606. "required": false
  7607. },
  7608. {
  7609. "name": "workspace",
  7610. "in": "query",
  7611. "schema": {
  7612. "type": "string"
  7613. },
  7614. "required": false
  7615. }
  7616. ],
  7617. "responses": {
  7618. "200": {
  7619. "description": "Updated session",
  7620. "content": {
  7621. "application/json": {
  7622. "schema": {
  7623. "$ref": "#/components/schemas/Session"
  7624. }
  7625. }
  7626. }
  7627. },
  7628. "400": {
  7629. "description": "BadRequest | InvalidRequestError",
  7630. "content": {
  7631. "application/json": {
  7632. "schema": {
  7633. "anyOf": [
  7634. {
  7635. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7636. },
  7637. {
  7638. "$ref": "#/components/schemas/InvalidRequestError"
  7639. }
  7640. ]
  7641. }
  7642. }
  7643. }
  7644. },
  7645. "404": {
  7646. "description": "NotFoundError",
  7647. "content": {
  7648. "application/json": {
  7649. "schema": {
  7650. "$ref": "#/components/schemas/NotFoundError"
  7651. }
  7652. }
  7653. }
  7654. },
  7655. "409": {
  7656. "description": "SessionBusyError",
  7657. "content": {
  7658. "application/json": {
  7659. "schema": {
  7660. "$ref": "#/components/schemas/SessionBusyError"
  7661. }
  7662. }
  7663. }
  7664. }
  7665. },
  7666. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7667. "summary": "Revert message",
  7668. "requestBody": {
  7669. "content": {
  7670. "application/json": {
  7671. "schema": {
  7672. "type": "object",
  7673. "properties": {
  7674. "messageID": {
  7675. "type": "string",
  7676. "pattern": "^msg"
  7677. },
  7678. "partID": {
  7679. "type": "string",
  7680. "pattern": "^prt"
  7681. }
  7682. },
  7683. "required": ["messageID"],
  7684. "additionalProperties": false
  7685. }
  7686. }
  7687. }
  7688. },
  7689. "x-codeSamples": [
  7690. {
  7691. "lang": "js",
  7692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7693. }
  7694. ]
  7695. }
  7696. },
  7697. "/session/{sessionID}/unrevert": {
  7698. "post": {
  7699. "tags": ["session"],
  7700. "operationId": "session.unrevert",
  7701. "parameters": [
  7702. {
  7703. "name": "sessionID",
  7704. "in": "path",
  7705. "schema": {
  7706. "type": "string",
  7707. "pattern": "^ses"
  7708. },
  7709. "required": true
  7710. },
  7711. {
  7712. "name": "directory",
  7713. "in": "query",
  7714. "schema": {
  7715. "type": "string"
  7716. },
  7717. "required": false
  7718. },
  7719. {
  7720. "name": "workspace",
  7721. "in": "query",
  7722. "schema": {
  7723. "type": "string"
  7724. },
  7725. "required": false
  7726. }
  7727. ],
  7728. "responses": {
  7729. "200": {
  7730. "description": "Updated session",
  7731. "content": {
  7732. "application/json": {
  7733. "schema": {
  7734. "$ref": "#/components/schemas/Session"
  7735. }
  7736. }
  7737. }
  7738. },
  7739. "400": {
  7740. "description": "BadRequest | InvalidRequestError",
  7741. "content": {
  7742. "application/json": {
  7743. "schema": {
  7744. "anyOf": [
  7745. {
  7746. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7747. },
  7748. {
  7749. "$ref": "#/components/schemas/InvalidRequestError"
  7750. }
  7751. ]
  7752. }
  7753. }
  7754. }
  7755. },
  7756. "404": {
  7757. "description": "NotFoundError",
  7758. "content": {
  7759. "application/json": {
  7760. "schema": {
  7761. "$ref": "#/components/schemas/NotFoundError"
  7762. }
  7763. }
  7764. }
  7765. },
  7766. "409": {
  7767. "description": "SessionBusyError",
  7768. "content": {
  7769. "application/json": {
  7770. "schema": {
  7771. "$ref": "#/components/schemas/SessionBusyError"
  7772. }
  7773. }
  7774. }
  7775. }
  7776. },
  7777. "description": "Restore all previously reverted messages in a session.",
  7778. "summary": "Restore reverted messages",
  7779. "x-codeSamples": [
  7780. {
  7781. "lang": "js",
  7782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7783. }
  7784. ]
  7785. }
  7786. },
  7787. "/session/{sessionID}/permissions/{permissionID}": {
  7788. "post": {
  7789. "tags": ["session"],
  7790. "operationId": "permission.respond",
  7791. "parameters": [
  7792. {
  7793. "name": "sessionID",
  7794. "in": "path",
  7795. "schema": {
  7796. "type": "string",
  7797. "pattern": "^ses"
  7798. },
  7799. "required": true
  7800. },
  7801. {
  7802. "name": "permissionID",
  7803. "in": "path",
  7804. "schema": {
  7805. "type": "string",
  7806. "pattern": "^per"
  7807. },
  7808. "required": true
  7809. },
  7810. {
  7811. "name": "directory",
  7812. "in": "query",
  7813. "schema": {
  7814. "type": "string"
  7815. },
  7816. "required": false
  7817. },
  7818. {
  7819. "name": "workspace",
  7820. "in": "query",
  7821. "schema": {
  7822. "type": "string"
  7823. },
  7824. "required": false
  7825. }
  7826. ],
  7827. "responses": {
  7828. "200": {
  7829. "description": "Permission processed successfully",
  7830. "content": {
  7831. "application/json": {
  7832. "schema": {
  7833. "type": "boolean",
  7834. "description": "Permission processed successfully"
  7835. }
  7836. }
  7837. }
  7838. },
  7839. "400": {
  7840. "description": "BadRequest | InvalidRequestError",
  7841. "content": {
  7842. "application/json": {
  7843. "schema": {
  7844. "anyOf": [
  7845. {
  7846. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7847. },
  7848. {
  7849. "$ref": "#/components/schemas/InvalidRequestError"
  7850. }
  7851. ]
  7852. }
  7853. }
  7854. }
  7855. },
  7856. "404": {
  7857. "description": "NotFoundError | PermissionNotFoundError",
  7858. "content": {
  7859. "application/json": {
  7860. "schema": {
  7861. "anyOf": [
  7862. {
  7863. "$ref": "#/components/schemas/NotFoundError"
  7864. },
  7865. {
  7866. "$ref": "#/components/schemas/PermissionNotFoundError"
  7867. }
  7868. ]
  7869. }
  7870. }
  7871. }
  7872. }
  7873. },
  7874. "description": "Approve or deny a permission request from the AI assistant.",
  7875. "summary": "Respond to permission",
  7876. "deprecated": true,
  7877. "requestBody": {
  7878. "content": {
  7879. "application/json": {
  7880. "schema": {
  7881. "type": "object",
  7882. "properties": {
  7883. "response": {
  7884. "type": "string",
  7885. "enum": ["once", "always", "reject"]
  7886. }
  7887. },
  7888. "required": ["response"],
  7889. "additionalProperties": false
  7890. }
  7891. }
  7892. }
  7893. },
  7894. "x-codeSamples": [
  7895. {
  7896. "lang": "js",
  7897. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7898. }
  7899. ]
  7900. }
  7901. },
  7902. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7903. "delete": {
  7904. "tags": ["session"],
  7905. "operationId": "part.delete",
  7906. "parameters": [
  7907. {
  7908. "name": "sessionID",
  7909. "in": "path",
  7910. "schema": {
  7911. "type": "string",
  7912. "pattern": "^ses"
  7913. },
  7914. "required": true
  7915. },
  7916. {
  7917. "name": "messageID",
  7918. "in": "path",
  7919. "schema": {
  7920. "type": "string",
  7921. "pattern": "^msg"
  7922. },
  7923. "required": true
  7924. },
  7925. {
  7926. "name": "partID",
  7927. "in": "path",
  7928. "schema": {
  7929. "type": "string",
  7930. "pattern": "^prt"
  7931. },
  7932. "required": true
  7933. },
  7934. {
  7935. "name": "directory",
  7936. "in": "query",
  7937. "schema": {
  7938. "type": "string"
  7939. },
  7940. "required": false
  7941. },
  7942. {
  7943. "name": "workspace",
  7944. "in": "query",
  7945. "schema": {
  7946. "type": "string"
  7947. },
  7948. "required": false
  7949. }
  7950. ],
  7951. "responses": {
  7952. "200": {
  7953. "description": "Successfully deleted part",
  7954. "content": {
  7955. "application/json": {
  7956. "schema": {
  7957. "type": "boolean",
  7958. "description": "Successfully deleted part"
  7959. }
  7960. }
  7961. }
  7962. },
  7963. "400": {
  7964. "description": "BadRequest | InvalidRequestError",
  7965. "content": {
  7966. "application/json": {
  7967. "schema": {
  7968. "anyOf": [
  7969. {
  7970. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7971. },
  7972. {
  7973. "$ref": "#/components/schemas/InvalidRequestError"
  7974. }
  7975. ]
  7976. }
  7977. }
  7978. }
  7979. },
  7980. "404": {
  7981. "description": "NotFoundError",
  7982. "content": {
  7983. "application/json": {
  7984. "schema": {
  7985. "$ref": "#/components/schemas/NotFoundError"
  7986. }
  7987. }
  7988. }
  7989. }
  7990. },
  7991. "description": "Delete a part from a message.",
  7992. "x-codeSamples": [
  7993. {
  7994. "lang": "js",
  7995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7996. }
  7997. ]
  7998. },
  7999. "patch": {
  8000. "tags": ["session"],
  8001. "operationId": "part.update",
  8002. "parameters": [
  8003. {
  8004. "name": "sessionID",
  8005. "in": "path",
  8006. "schema": {
  8007. "type": "string",
  8008. "pattern": "^ses"
  8009. },
  8010. "required": true
  8011. },
  8012. {
  8013. "name": "messageID",
  8014. "in": "path",
  8015. "schema": {
  8016. "type": "string",
  8017. "pattern": "^msg"
  8018. },
  8019. "required": true
  8020. },
  8021. {
  8022. "name": "partID",
  8023. "in": "path",
  8024. "schema": {
  8025. "type": "string",
  8026. "pattern": "^prt"
  8027. },
  8028. "required": true
  8029. },
  8030. {
  8031. "name": "directory",
  8032. "in": "query",
  8033. "schema": {
  8034. "type": "string"
  8035. },
  8036. "required": false
  8037. },
  8038. {
  8039. "name": "workspace",
  8040. "in": "query",
  8041. "schema": {
  8042. "type": "string"
  8043. },
  8044. "required": false
  8045. }
  8046. ],
  8047. "responses": {
  8048. "200": {
  8049. "description": "Successfully updated part",
  8050. "content": {
  8051. "application/json": {
  8052. "schema": {
  8053. "$ref": "#/components/schemas/Part"
  8054. }
  8055. }
  8056. }
  8057. },
  8058. "400": {
  8059. "description": "BadRequest | InvalidRequestError",
  8060. "content": {
  8061. "application/json": {
  8062. "schema": {
  8063. "anyOf": [
  8064. {
  8065. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8066. },
  8067. {
  8068. "$ref": "#/components/schemas/InvalidRequestError"
  8069. }
  8070. ]
  8071. }
  8072. }
  8073. }
  8074. },
  8075. "404": {
  8076. "description": "NotFoundError",
  8077. "content": {
  8078. "application/json": {
  8079. "schema": {
  8080. "$ref": "#/components/schemas/NotFoundError"
  8081. }
  8082. }
  8083. }
  8084. }
  8085. },
  8086. "description": "Update a part in a message.",
  8087. "requestBody": {
  8088. "content": {
  8089. "application/json": {
  8090. "schema": {
  8091. "$ref": "#/components/schemas/Part"
  8092. }
  8093. }
  8094. }
  8095. },
  8096. "x-codeSamples": [
  8097. {
  8098. "lang": "js",
  8099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8100. }
  8101. ]
  8102. }
  8103. },
  8104. "/sync/start": {
  8105. "post": {
  8106. "tags": ["sync"],
  8107. "operationId": "sync.start",
  8108. "parameters": [
  8109. {
  8110. "name": "directory",
  8111. "in": "query",
  8112. "schema": {
  8113. "type": "string"
  8114. },
  8115. "required": false
  8116. },
  8117. {
  8118. "name": "workspace",
  8119. "in": "query",
  8120. "schema": {
  8121. "type": "string"
  8122. },
  8123. "required": false
  8124. }
  8125. ],
  8126. "responses": {
  8127. "200": {
  8128. "description": "Workspace sync started",
  8129. "content": {
  8130. "application/json": {
  8131. "schema": {
  8132. "type": "boolean",
  8133. "description": "Workspace sync started"
  8134. }
  8135. }
  8136. }
  8137. },
  8138. "400": {
  8139. "description": "Bad request",
  8140. "content": {
  8141. "application/json": {
  8142. "schema": {
  8143. "$ref": "#/components/schemas/BadRequestError"
  8144. }
  8145. }
  8146. }
  8147. }
  8148. },
  8149. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8150. "summary": "Start workspace sync",
  8151. "x-codeSamples": [
  8152. {
  8153. "lang": "js",
  8154. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8155. }
  8156. ]
  8157. }
  8158. },
  8159. "/sync/replay": {
  8160. "post": {
  8161. "tags": ["sync"],
  8162. "operationId": "sync.replay",
  8163. "parameters": [
  8164. {
  8165. "name": "directory",
  8166. "in": "query",
  8167. "schema": {
  8168. "type": "string"
  8169. },
  8170. "required": false
  8171. },
  8172. {
  8173. "name": "workspace",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string"
  8177. },
  8178. "required": false
  8179. }
  8180. ],
  8181. "responses": {
  8182. "200": {
  8183. "description": "Replayed sync events",
  8184. "content": {
  8185. "application/json": {
  8186. "schema": {
  8187. "type": "object",
  8188. "properties": {
  8189. "sessionID": {
  8190. "type": "string"
  8191. }
  8192. },
  8193. "required": ["sessionID"],
  8194. "additionalProperties": false,
  8195. "description": "Replayed sync events"
  8196. }
  8197. }
  8198. }
  8199. },
  8200. "400": {
  8201. "description": "BadRequest | InvalidRequestError",
  8202. "content": {
  8203. "application/json": {
  8204. "schema": {
  8205. "anyOf": [
  8206. {
  8207. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8208. },
  8209. {
  8210. "$ref": "#/components/schemas/InvalidRequestError"
  8211. }
  8212. ]
  8213. }
  8214. }
  8215. }
  8216. }
  8217. },
  8218. "description": "Validate and replay a complete sync event history.",
  8219. "summary": "Replay sync events",
  8220. "requestBody": {
  8221. "content": {
  8222. "application/json": {
  8223. "schema": {
  8224. "type": "object",
  8225. "properties": {
  8226. "directory": {
  8227. "type": "string"
  8228. },
  8229. "events": {
  8230. "type": "array",
  8231. "minItems": 1,
  8232. "items": {
  8233. "type": "object",
  8234. "properties": {
  8235. "id": {
  8236. "type": "string",
  8237. "pattern": "^evt_"
  8238. },
  8239. "aggregateID": {
  8240. "type": "string"
  8241. },
  8242. "seq": {
  8243. "type": "integer",
  8244. "minimum": 0
  8245. },
  8246. "type": {
  8247. "type": "string"
  8248. },
  8249. "data": {
  8250. "type": "object"
  8251. }
  8252. },
  8253. "required": ["id", "aggregateID", "seq", "type", "data"],
  8254. "additionalProperties": false
  8255. }
  8256. }
  8257. },
  8258. "required": ["directory", "events"],
  8259. "additionalProperties": false
  8260. }
  8261. }
  8262. }
  8263. },
  8264. "x-codeSamples": [
  8265. {
  8266. "lang": "js",
  8267. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8268. }
  8269. ]
  8270. }
  8271. },
  8272. "/sync/steal": {
  8273. "post": {
  8274. "tags": ["sync"],
  8275. "operationId": "sync.steal",
  8276. "parameters": [
  8277. {
  8278. "name": "directory",
  8279. "in": "query",
  8280. "schema": {
  8281. "type": "string"
  8282. },
  8283. "required": false
  8284. },
  8285. {
  8286. "name": "workspace",
  8287. "in": "query",
  8288. "schema": {
  8289. "type": "string"
  8290. },
  8291. "required": false
  8292. }
  8293. ],
  8294. "responses": {
  8295. "200": {
  8296. "description": "Session stolen into workspace",
  8297. "content": {
  8298. "application/json": {
  8299. "schema": {
  8300. "type": "object",
  8301. "properties": {
  8302. "sessionID": {
  8303. "type": "string",
  8304. "pattern": "^ses"
  8305. }
  8306. },
  8307. "required": ["sessionID"],
  8308. "additionalProperties": false,
  8309. "description": "Session stolen into workspace"
  8310. }
  8311. }
  8312. }
  8313. },
  8314. "400": {
  8315. "description": "BadRequest | InvalidRequestError",
  8316. "content": {
  8317. "application/json": {
  8318. "schema": {
  8319. "anyOf": [
  8320. {
  8321. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8322. },
  8323. {
  8324. "$ref": "#/components/schemas/InvalidRequestError"
  8325. }
  8326. ]
  8327. }
  8328. }
  8329. }
  8330. }
  8331. },
  8332. "description": "Update a session to belong to the current workspace through the sync event system.",
  8333. "summary": "Steal session into workspace",
  8334. "requestBody": {
  8335. "content": {
  8336. "application/json": {
  8337. "schema": {
  8338. "type": "object",
  8339. "properties": {
  8340. "sessionID": {
  8341. "type": "string",
  8342. "pattern": "^ses"
  8343. }
  8344. },
  8345. "required": ["sessionID"],
  8346. "additionalProperties": false
  8347. }
  8348. }
  8349. }
  8350. },
  8351. "x-codeSamples": [
  8352. {
  8353. "lang": "js",
  8354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8355. }
  8356. ]
  8357. }
  8358. },
  8359. "/sync/history": {
  8360. "post": {
  8361. "tags": ["sync"],
  8362. "operationId": "sync.history.list",
  8363. "parameters": [
  8364. {
  8365. "name": "directory",
  8366. "in": "query",
  8367. "schema": {
  8368. "type": "string"
  8369. },
  8370. "required": false
  8371. },
  8372. {
  8373. "name": "workspace",
  8374. "in": "query",
  8375. "schema": {
  8376. "type": "string"
  8377. },
  8378. "required": false
  8379. }
  8380. ],
  8381. "responses": {
  8382. "200": {
  8383. "description": "Sync events",
  8384. "content": {
  8385. "application/json": {
  8386. "schema": {
  8387. "type": "array",
  8388. "items": {
  8389. "type": "object",
  8390. "properties": {
  8391. "id": {
  8392. "type": "string",
  8393. "pattern": "^evt_"
  8394. },
  8395. "aggregate_id": {
  8396. "type": "string"
  8397. },
  8398. "seq": {
  8399. "type": "integer",
  8400. "minimum": 0
  8401. },
  8402. "type": {
  8403. "type": "string"
  8404. },
  8405. "data": {
  8406. "type": "object"
  8407. }
  8408. },
  8409. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8410. "additionalProperties": false
  8411. },
  8412. "description": "Sync events"
  8413. }
  8414. }
  8415. }
  8416. },
  8417. "400": {
  8418. "description": "BadRequest | InvalidRequestError",
  8419. "content": {
  8420. "application/json": {
  8421. "schema": {
  8422. "anyOf": [
  8423. {
  8424. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8425. },
  8426. {
  8427. "$ref": "#/components/schemas/InvalidRequestError"
  8428. }
  8429. ]
  8430. }
  8431. }
  8432. }
  8433. }
  8434. },
  8435. "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.",
  8436. "summary": "List sync events",
  8437. "requestBody": {
  8438. "content": {
  8439. "application/json": {
  8440. "schema": {
  8441. "type": "object",
  8442. "additionalProperties": {
  8443. "type": "integer",
  8444. "minimum": 0
  8445. }
  8446. }
  8447. }
  8448. }
  8449. },
  8450. "x-codeSamples": [
  8451. {
  8452. "lang": "js",
  8453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8454. }
  8455. ]
  8456. }
  8457. },
  8458. "/tui/append-prompt": {
  8459. "post": {
  8460. "tags": ["tui"],
  8461. "operationId": "tui.appendPrompt",
  8462. "parameters": [
  8463. {
  8464. "name": "directory",
  8465. "in": "query",
  8466. "schema": {
  8467. "type": "string"
  8468. },
  8469. "required": false
  8470. },
  8471. {
  8472. "name": "workspace",
  8473. "in": "query",
  8474. "schema": {
  8475. "type": "string"
  8476. },
  8477. "required": false
  8478. }
  8479. ],
  8480. "responses": {
  8481. "200": {
  8482. "description": "Prompt processed successfully",
  8483. "content": {
  8484. "application/json": {
  8485. "schema": {
  8486. "type": "boolean",
  8487. "description": "Prompt processed successfully"
  8488. }
  8489. }
  8490. }
  8491. },
  8492. "400": {
  8493. "description": "BadRequest | InvalidRequestError",
  8494. "content": {
  8495. "application/json": {
  8496. "schema": {
  8497. "anyOf": [
  8498. {
  8499. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8500. },
  8501. {
  8502. "$ref": "#/components/schemas/InvalidRequestError"
  8503. }
  8504. ]
  8505. }
  8506. }
  8507. }
  8508. }
  8509. },
  8510. "description": "Append prompt to the TUI.",
  8511. "summary": "Append TUI prompt",
  8512. "requestBody": {
  8513. "content": {
  8514. "application/json": {
  8515. "schema": {
  8516. "type": "object",
  8517. "properties": {
  8518. "text": {
  8519. "type": "string"
  8520. }
  8521. },
  8522. "required": ["text"],
  8523. "additionalProperties": false
  8524. }
  8525. }
  8526. }
  8527. },
  8528. "x-codeSamples": [
  8529. {
  8530. "lang": "js",
  8531. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8532. }
  8533. ]
  8534. }
  8535. },
  8536. "/tui/open-help": {
  8537. "post": {
  8538. "tags": ["tui"],
  8539. "operationId": "tui.openHelp",
  8540. "parameters": [
  8541. {
  8542. "name": "directory",
  8543. "in": "query",
  8544. "schema": {
  8545. "type": "string"
  8546. },
  8547. "required": false
  8548. },
  8549. {
  8550. "name": "workspace",
  8551. "in": "query",
  8552. "schema": {
  8553. "type": "string"
  8554. },
  8555. "required": false
  8556. }
  8557. ],
  8558. "responses": {
  8559. "200": {
  8560. "description": "Help dialog opened successfully",
  8561. "content": {
  8562. "application/json": {
  8563. "schema": {
  8564. "type": "boolean",
  8565. "description": "Help dialog opened successfully"
  8566. }
  8567. }
  8568. }
  8569. },
  8570. "400": {
  8571. "description": "Bad request",
  8572. "content": {
  8573. "application/json": {
  8574. "schema": {
  8575. "$ref": "#/components/schemas/BadRequestError"
  8576. }
  8577. }
  8578. }
  8579. }
  8580. },
  8581. "description": "Open the help dialog in the TUI to display user assistance information.",
  8582. "summary": "Open help dialog",
  8583. "x-codeSamples": [
  8584. {
  8585. "lang": "js",
  8586. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8587. }
  8588. ]
  8589. }
  8590. },
  8591. "/tui/open-sessions": {
  8592. "post": {
  8593. "tags": ["tui"],
  8594. "operationId": "tui.openSessions",
  8595. "parameters": [
  8596. {
  8597. "name": "directory",
  8598. "in": "query",
  8599. "schema": {
  8600. "type": "string"
  8601. },
  8602. "required": false
  8603. },
  8604. {
  8605. "name": "workspace",
  8606. "in": "query",
  8607. "schema": {
  8608. "type": "string"
  8609. },
  8610. "required": false
  8611. }
  8612. ],
  8613. "responses": {
  8614. "200": {
  8615. "description": "Session dialog opened successfully",
  8616. "content": {
  8617. "application/json": {
  8618. "schema": {
  8619. "type": "boolean",
  8620. "description": "Session dialog opened successfully"
  8621. }
  8622. }
  8623. }
  8624. },
  8625. "400": {
  8626. "description": "Bad request",
  8627. "content": {
  8628. "application/json": {
  8629. "schema": {
  8630. "$ref": "#/components/schemas/BadRequestError"
  8631. }
  8632. }
  8633. }
  8634. }
  8635. },
  8636. "description": "Open the session dialog.",
  8637. "summary": "Open sessions dialog",
  8638. "x-codeSamples": [
  8639. {
  8640. "lang": "js",
  8641. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8642. }
  8643. ]
  8644. }
  8645. },
  8646. "/tui/open-themes": {
  8647. "post": {
  8648. "tags": ["tui"],
  8649. "operationId": "tui.openThemes",
  8650. "parameters": [
  8651. {
  8652. "name": "directory",
  8653. "in": "query",
  8654. "schema": {
  8655. "type": "string"
  8656. },
  8657. "required": false
  8658. },
  8659. {
  8660. "name": "workspace",
  8661. "in": "query",
  8662. "schema": {
  8663. "type": "string"
  8664. },
  8665. "required": false
  8666. }
  8667. ],
  8668. "responses": {
  8669. "200": {
  8670. "description": "Theme dialog opened successfully",
  8671. "content": {
  8672. "application/json": {
  8673. "schema": {
  8674. "type": "boolean",
  8675. "description": "Theme dialog opened successfully"
  8676. }
  8677. }
  8678. }
  8679. },
  8680. "400": {
  8681. "description": "Bad request",
  8682. "content": {
  8683. "application/json": {
  8684. "schema": {
  8685. "$ref": "#/components/schemas/BadRequestError"
  8686. }
  8687. }
  8688. }
  8689. }
  8690. },
  8691. "description": "Open the theme dialog.",
  8692. "summary": "Open themes dialog",
  8693. "x-codeSamples": [
  8694. {
  8695. "lang": "js",
  8696. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8697. }
  8698. ]
  8699. }
  8700. },
  8701. "/tui/open-models": {
  8702. "post": {
  8703. "tags": ["tui"],
  8704. "operationId": "tui.openModels",
  8705. "parameters": [
  8706. {
  8707. "name": "directory",
  8708. "in": "query",
  8709. "schema": {
  8710. "type": "string"
  8711. },
  8712. "required": false
  8713. },
  8714. {
  8715. "name": "workspace",
  8716. "in": "query",
  8717. "schema": {
  8718. "type": "string"
  8719. },
  8720. "required": false
  8721. }
  8722. ],
  8723. "responses": {
  8724. "200": {
  8725. "description": "Model dialog opened successfully",
  8726. "content": {
  8727. "application/json": {
  8728. "schema": {
  8729. "type": "boolean",
  8730. "description": "Model dialog opened successfully"
  8731. }
  8732. }
  8733. }
  8734. },
  8735. "400": {
  8736. "description": "Bad request",
  8737. "content": {
  8738. "application/json": {
  8739. "schema": {
  8740. "$ref": "#/components/schemas/BadRequestError"
  8741. }
  8742. }
  8743. }
  8744. }
  8745. },
  8746. "description": "Open the model dialog.",
  8747. "summary": "Open models dialog",
  8748. "x-codeSamples": [
  8749. {
  8750. "lang": "js",
  8751. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8752. }
  8753. ]
  8754. }
  8755. },
  8756. "/tui/submit-prompt": {
  8757. "post": {
  8758. "tags": ["tui"],
  8759. "operationId": "tui.submitPrompt",
  8760. "parameters": [
  8761. {
  8762. "name": "directory",
  8763. "in": "query",
  8764. "schema": {
  8765. "type": "string"
  8766. },
  8767. "required": false
  8768. },
  8769. {
  8770. "name": "workspace",
  8771. "in": "query",
  8772. "schema": {
  8773. "type": "string"
  8774. },
  8775. "required": false
  8776. }
  8777. ],
  8778. "responses": {
  8779. "200": {
  8780. "description": "Prompt submitted successfully",
  8781. "content": {
  8782. "application/json": {
  8783. "schema": {
  8784. "type": "boolean",
  8785. "description": "Prompt submitted successfully"
  8786. }
  8787. }
  8788. }
  8789. },
  8790. "400": {
  8791. "description": "Bad request",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "$ref": "#/components/schemas/BadRequestError"
  8796. }
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "description": "Submit the prompt.",
  8802. "summary": "Submit TUI prompt",
  8803. "x-codeSamples": [
  8804. {
  8805. "lang": "js",
  8806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8807. }
  8808. ]
  8809. }
  8810. },
  8811. "/tui/clear-prompt": {
  8812. "post": {
  8813. "tags": ["tui"],
  8814. "operationId": "tui.clearPrompt",
  8815. "parameters": [
  8816. {
  8817. "name": "directory",
  8818. "in": "query",
  8819. "schema": {
  8820. "type": "string"
  8821. },
  8822. "required": false
  8823. },
  8824. {
  8825. "name": "workspace",
  8826. "in": "query",
  8827. "schema": {
  8828. "type": "string"
  8829. },
  8830. "required": false
  8831. }
  8832. ],
  8833. "responses": {
  8834. "200": {
  8835. "description": "Prompt cleared successfully",
  8836. "content": {
  8837. "application/json": {
  8838. "schema": {
  8839. "type": "boolean",
  8840. "description": "Prompt cleared successfully"
  8841. }
  8842. }
  8843. }
  8844. },
  8845. "400": {
  8846. "description": "Bad request",
  8847. "content": {
  8848. "application/json": {
  8849. "schema": {
  8850. "$ref": "#/components/schemas/BadRequestError"
  8851. }
  8852. }
  8853. }
  8854. }
  8855. },
  8856. "description": "Clear the prompt.",
  8857. "summary": "Clear TUI prompt",
  8858. "x-codeSamples": [
  8859. {
  8860. "lang": "js",
  8861. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8862. }
  8863. ]
  8864. }
  8865. },
  8866. "/tui/execute-command": {
  8867. "post": {
  8868. "tags": ["tui"],
  8869. "operationId": "tui.executeCommand",
  8870. "parameters": [
  8871. {
  8872. "name": "directory",
  8873. "in": "query",
  8874. "schema": {
  8875. "type": "string"
  8876. },
  8877. "required": false
  8878. },
  8879. {
  8880. "name": "workspace",
  8881. "in": "query",
  8882. "schema": {
  8883. "type": "string"
  8884. },
  8885. "required": false
  8886. }
  8887. ],
  8888. "responses": {
  8889. "200": {
  8890. "description": "Command executed successfully",
  8891. "content": {
  8892. "application/json": {
  8893. "schema": {
  8894. "type": "boolean",
  8895. "description": "Command executed successfully"
  8896. }
  8897. }
  8898. }
  8899. },
  8900. "400": {
  8901. "description": "BadRequest | InvalidRequestError",
  8902. "content": {
  8903. "application/json": {
  8904. "schema": {
  8905. "anyOf": [
  8906. {
  8907. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8908. },
  8909. {
  8910. "$ref": "#/components/schemas/InvalidRequestError"
  8911. }
  8912. ]
  8913. }
  8914. }
  8915. }
  8916. }
  8917. },
  8918. "description": "Execute a TUI command.",
  8919. "summary": "Execute TUI command",
  8920. "requestBody": {
  8921. "content": {
  8922. "application/json": {
  8923. "schema": {
  8924. "type": "object",
  8925. "properties": {
  8926. "command": {
  8927. "type": "string"
  8928. }
  8929. },
  8930. "required": ["command"],
  8931. "additionalProperties": false
  8932. }
  8933. }
  8934. }
  8935. },
  8936. "x-codeSamples": [
  8937. {
  8938. "lang": "js",
  8939. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8940. }
  8941. ]
  8942. }
  8943. },
  8944. "/tui/show-toast": {
  8945. "post": {
  8946. "tags": ["tui"],
  8947. "operationId": "tui.showToast",
  8948. "parameters": [
  8949. {
  8950. "name": "directory",
  8951. "in": "query",
  8952. "schema": {
  8953. "type": "string"
  8954. },
  8955. "required": false
  8956. },
  8957. {
  8958. "name": "workspace",
  8959. "in": "query",
  8960. "schema": {
  8961. "type": "string"
  8962. },
  8963. "required": false
  8964. }
  8965. ],
  8966. "responses": {
  8967. "200": {
  8968. "description": "Toast notification shown successfully",
  8969. "content": {
  8970. "application/json": {
  8971. "schema": {
  8972. "type": "boolean",
  8973. "description": "Toast notification shown successfully"
  8974. }
  8975. }
  8976. }
  8977. },
  8978. "400": {
  8979. "description": "Bad request",
  8980. "content": {
  8981. "application/json": {
  8982. "schema": {
  8983. "$ref": "#/components/schemas/BadRequestError"
  8984. }
  8985. }
  8986. }
  8987. }
  8988. },
  8989. "description": "Show a toast notification in the TUI.",
  8990. "summary": "Show TUI toast",
  8991. "requestBody": {
  8992. "content": {
  8993. "application/json": {
  8994. "schema": {
  8995. "type": "object",
  8996. "properties": {
  8997. "title": {
  8998. "type": "string"
  8999. },
  9000. "message": {
  9001. "type": "string"
  9002. },
  9003. "variant": {
  9004. "type": "string",
  9005. "enum": ["info", "success", "warning", "error"]
  9006. },
  9007. "duration": {
  9008. "type": "integer",
  9009. "exclusiveMinimum": 0
  9010. }
  9011. },
  9012. "required": ["message", "variant"],
  9013. "additionalProperties": false
  9014. }
  9015. }
  9016. }
  9017. },
  9018. "x-codeSamples": [
  9019. {
  9020. "lang": "js",
  9021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9022. }
  9023. ]
  9024. }
  9025. },
  9026. "/tui/publish": {
  9027. "post": {
  9028. "tags": ["tui"],
  9029. "operationId": "tui.publish",
  9030. "parameters": [
  9031. {
  9032. "name": "directory",
  9033. "in": "query",
  9034. "schema": {
  9035. "type": "string"
  9036. },
  9037. "required": false
  9038. },
  9039. {
  9040. "name": "workspace",
  9041. "in": "query",
  9042. "schema": {
  9043. "type": "string"
  9044. },
  9045. "required": false
  9046. }
  9047. ],
  9048. "responses": {
  9049. "200": {
  9050. "description": "Event published successfully",
  9051. "content": {
  9052. "application/json": {
  9053. "schema": {
  9054. "type": "boolean",
  9055. "description": "Event published successfully"
  9056. }
  9057. }
  9058. }
  9059. },
  9060. "400": {
  9061. "description": "BadRequest | InvalidRequestError",
  9062. "content": {
  9063. "application/json": {
  9064. "schema": {
  9065. "anyOf": [
  9066. {
  9067. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9068. },
  9069. {
  9070. "$ref": "#/components/schemas/InvalidRequestError"
  9071. }
  9072. ]
  9073. }
  9074. }
  9075. }
  9076. }
  9077. },
  9078. "description": "Publish a TUI event.",
  9079. "summary": "Publish TUI event",
  9080. "requestBody": {
  9081. "content": {
  9082. "application/json": {
  9083. "schema": {
  9084. "anyOf": [
  9085. {
  9086. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9087. },
  9088. {
  9089. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9090. },
  9091. {
  9092. "$ref": "#/components/schemas/EventTuiToastShow"
  9093. },
  9094. {
  9095. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9096. }
  9097. ]
  9098. }
  9099. }
  9100. }
  9101. },
  9102. "x-codeSamples": [
  9103. {
  9104. "lang": "js",
  9105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9106. }
  9107. ]
  9108. }
  9109. },
  9110. "/tui/select-session": {
  9111. "post": {
  9112. "tags": ["tui"],
  9113. "operationId": "tui.selectSession",
  9114. "parameters": [
  9115. {
  9116. "name": "directory",
  9117. "in": "query",
  9118. "schema": {
  9119. "type": "string"
  9120. },
  9121. "required": false
  9122. },
  9123. {
  9124. "name": "workspace",
  9125. "in": "query",
  9126. "schema": {
  9127. "type": "string"
  9128. },
  9129. "required": false
  9130. }
  9131. ],
  9132. "responses": {
  9133. "200": {
  9134. "description": "Session selected successfully",
  9135. "content": {
  9136. "application/json": {
  9137. "schema": {
  9138. "type": "boolean",
  9139. "description": "Session selected successfully"
  9140. }
  9141. }
  9142. }
  9143. },
  9144. "400": {
  9145. "description": "BadRequest | InvalidRequestError",
  9146. "content": {
  9147. "application/json": {
  9148. "schema": {
  9149. "anyOf": [
  9150. {
  9151. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9152. },
  9153. {
  9154. "$ref": "#/components/schemas/InvalidRequestError"
  9155. }
  9156. ]
  9157. }
  9158. }
  9159. }
  9160. },
  9161. "404": {
  9162. "description": "NotFoundError",
  9163. "content": {
  9164. "application/json": {
  9165. "schema": {
  9166. "$ref": "#/components/schemas/NotFoundError"
  9167. }
  9168. }
  9169. }
  9170. }
  9171. },
  9172. "description": "Navigate the TUI to display the specified session.",
  9173. "summary": "Select session",
  9174. "requestBody": {
  9175. "content": {
  9176. "application/json": {
  9177. "schema": {
  9178. "type": "object",
  9179. "properties": {
  9180. "sessionID": {
  9181. "type": "string",
  9182. "pattern": "^ses",
  9183. "description": "Session ID to navigate to"
  9184. }
  9185. },
  9186. "required": ["sessionID"],
  9187. "additionalProperties": false
  9188. }
  9189. }
  9190. }
  9191. },
  9192. "x-codeSamples": [
  9193. {
  9194. "lang": "js",
  9195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9196. }
  9197. ]
  9198. }
  9199. },
  9200. "/tui/control/next": {
  9201. "get": {
  9202. "tags": ["tui"],
  9203. "operationId": "tui.control.next",
  9204. "parameters": [
  9205. {
  9206. "name": "directory",
  9207. "in": "query",
  9208. "schema": {
  9209. "type": "string"
  9210. },
  9211. "required": false
  9212. },
  9213. {
  9214. "name": "workspace",
  9215. "in": "query",
  9216. "schema": {
  9217. "type": "string"
  9218. },
  9219. "required": false
  9220. }
  9221. ],
  9222. "responses": {
  9223. "200": {
  9224. "description": "Next TUI request",
  9225. "content": {
  9226. "application/json": {
  9227. "schema": {
  9228. "type": "object",
  9229. "properties": {
  9230. "path": {
  9231. "type": "string"
  9232. },
  9233. "body": {}
  9234. },
  9235. "required": ["path", "body"],
  9236. "additionalProperties": false,
  9237. "description": "Next TUI request"
  9238. }
  9239. }
  9240. }
  9241. },
  9242. "400": {
  9243. "description": "Bad request",
  9244. "content": {
  9245. "application/json": {
  9246. "schema": {
  9247. "$ref": "#/components/schemas/BadRequestError"
  9248. }
  9249. }
  9250. }
  9251. }
  9252. },
  9253. "description": "Retrieve the next TUI request from the queue for processing.",
  9254. "summary": "Get next TUI request",
  9255. "x-codeSamples": [
  9256. {
  9257. "lang": "js",
  9258. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9259. }
  9260. ]
  9261. }
  9262. },
  9263. "/tui/control/response": {
  9264. "post": {
  9265. "tags": ["tui"],
  9266. "operationId": "tui.control.response",
  9267. "parameters": [
  9268. {
  9269. "name": "directory",
  9270. "in": "query",
  9271. "schema": {
  9272. "type": "string"
  9273. },
  9274. "required": false
  9275. },
  9276. {
  9277. "name": "workspace",
  9278. "in": "query",
  9279. "schema": {
  9280. "type": "string"
  9281. },
  9282. "required": false
  9283. }
  9284. ],
  9285. "responses": {
  9286. "200": {
  9287. "description": "Response submitted successfully",
  9288. "content": {
  9289. "application/json": {
  9290. "schema": {
  9291. "type": "boolean",
  9292. "description": "Response submitted successfully"
  9293. }
  9294. }
  9295. }
  9296. },
  9297. "400": {
  9298. "description": "Bad request",
  9299. "content": {
  9300. "application/json": {
  9301. "schema": {
  9302. "$ref": "#/components/schemas/BadRequestError"
  9303. }
  9304. }
  9305. }
  9306. }
  9307. },
  9308. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9309. "summary": "Submit TUI response",
  9310. "requestBody": {
  9311. "content": {
  9312. "application/json": {
  9313. "schema": {}
  9314. }
  9315. }
  9316. },
  9317. "x-codeSamples": [
  9318. {
  9319. "lang": "js",
  9320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9321. }
  9322. ]
  9323. }
  9324. },
  9325. "/experimental/workspace/adapter": {
  9326. "get": {
  9327. "tags": ["workspace"],
  9328. "operationId": "experimental.workspace.adapter.list",
  9329. "parameters": [
  9330. {
  9331. "name": "directory",
  9332. "in": "query",
  9333. "schema": {
  9334. "type": "string"
  9335. },
  9336. "required": false
  9337. },
  9338. {
  9339. "name": "workspace",
  9340. "in": "query",
  9341. "schema": {
  9342. "type": "string"
  9343. },
  9344. "required": false
  9345. }
  9346. ],
  9347. "responses": {
  9348. "200": {
  9349. "description": "Workspace adapters",
  9350. "content": {
  9351. "application/json": {
  9352. "schema": {
  9353. "type": "array",
  9354. "items": {
  9355. "type": "object",
  9356. "properties": {
  9357. "type": {
  9358. "type": "string"
  9359. },
  9360. "name": {
  9361. "type": "string"
  9362. },
  9363. "description": {
  9364. "type": "string"
  9365. }
  9366. },
  9367. "required": ["type", "name", "description"],
  9368. "additionalProperties": false
  9369. },
  9370. "description": "Workspace adapters"
  9371. }
  9372. }
  9373. }
  9374. },
  9375. "400": {
  9376. "description": "Bad request",
  9377. "content": {
  9378. "application/json": {
  9379. "schema": {
  9380. "$ref": "#/components/schemas/BadRequestError"
  9381. }
  9382. }
  9383. }
  9384. }
  9385. },
  9386. "description": "List all available workspace adapters for the current project.",
  9387. "summary": "List workspace adapters",
  9388. "x-codeSamples": [
  9389. {
  9390. "lang": "js",
  9391. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9392. }
  9393. ]
  9394. }
  9395. },
  9396. "/experimental/workspace": {
  9397. "get": {
  9398. "tags": ["workspace"],
  9399. "operationId": "experimental.workspace.list",
  9400. "parameters": [
  9401. {
  9402. "name": "directory",
  9403. "in": "query",
  9404. "schema": {
  9405. "type": "string"
  9406. },
  9407. "required": false
  9408. },
  9409. {
  9410. "name": "workspace",
  9411. "in": "query",
  9412. "schema": {
  9413. "type": "string"
  9414. },
  9415. "required": false
  9416. }
  9417. ],
  9418. "responses": {
  9419. "200": {
  9420. "description": "Workspaces",
  9421. "content": {
  9422. "application/json": {
  9423. "schema": {
  9424. "type": "array",
  9425. "items": {
  9426. "$ref": "#/components/schemas/Workspace"
  9427. },
  9428. "description": "Workspaces"
  9429. }
  9430. }
  9431. }
  9432. },
  9433. "400": {
  9434. "description": "Bad request",
  9435. "content": {
  9436. "application/json": {
  9437. "schema": {
  9438. "$ref": "#/components/schemas/BadRequestError"
  9439. }
  9440. }
  9441. }
  9442. }
  9443. },
  9444. "description": "List all workspaces.",
  9445. "summary": "List workspaces",
  9446. "x-codeSamples": [
  9447. {
  9448. "lang": "js",
  9449. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9450. }
  9451. ]
  9452. },
  9453. "post": {
  9454. "tags": ["workspace"],
  9455. "operationId": "experimental.workspace.create",
  9456. "parameters": [
  9457. {
  9458. "name": "directory",
  9459. "in": "query",
  9460. "schema": {
  9461. "type": "string"
  9462. },
  9463. "required": false
  9464. },
  9465. {
  9466. "name": "workspace",
  9467. "in": "query",
  9468. "schema": {
  9469. "type": "string"
  9470. },
  9471. "required": false
  9472. }
  9473. ],
  9474. "responses": {
  9475. "200": {
  9476. "description": "Workspace created",
  9477. "content": {
  9478. "application/json": {
  9479. "schema": {
  9480. "$ref": "#/components/schemas/Workspace"
  9481. }
  9482. }
  9483. }
  9484. },
  9485. "400": {
  9486. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9487. "content": {
  9488. "application/json": {
  9489. "schema": {
  9490. "anyOf": [
  9491. {
  9492. "$ref": "#/components/schemas/WorkspaceCreateError"
  9493. },
  9494. {
  9495. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9496. },
  9497. {
  9498. "$ref": "#/components/schemas/InvalidRequestError"
  9499. }
  9500. ]
  9501. }
  9502. }
  9503. }
  9504. }
  9505. },
  9506. "description": "Create a workspace for the current project.",
  9507. "summary": "Create workspace",
  9508. "requestBody": {
  9509. "content": {
  9510. "application/json": {
  9511. "schema": {
  9512. "type": "object",
  9513. "properties": {
  9514. "id": {
  9515. "type": "string",
  9516. "pattern": "^wrk"
  9517. },
  9518. "type": {
  9519. "type": "string"
  9520. },
  9521. "branch": {
  9522. "anyOf": [
  9523. {
  9524. "type": "string"
  9525. },
  9526. {
  9527. "type": "null"
  9528. }
  9529. ]
  9530. },
  9531. "extra": {
  9532. "anyOf": [
  9533. {},
  9534. {
  9535. "type": "null"
  9536. }
  9537. ]
  9538. }
  9539. },
  9540. "required": ["type"],
  9541. "additionalProperties": false
  9542. }
  9543. }
  9544. }
  9545. },
  9546. "x-codeSamples": [
  9547. {
  9548. "lang": "js",
  9549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9550. }
  9551. ]
  9552. }
  9553. },
  9554. "/experimental/workspace/sync-list": {
  9555. "post": {
  9556. "tags": ["workspace"],
  9557. "operationId": "experimental.workspace.syncList",
  9558. "parameters": [
  9559. {
  9560. "name": "directory",
  9561. "in": "query",
  9562. "schema": {
  9563. "type": "string"
  9564. },
  9565. "required": false
  9566. },
  9567. {
  9568. "name": "workspace",
  9569. "in": "query",
  9570. "schema": {
  9571. "type": "string"
  9572. },
  9573. "required": false
  9574. }
  9575. ],
  9576. "responses": {
  9577. "204": {
  9578. "description": "Workspace list synced"
  9579. },
  9580. "400": {
  9581. "description": "Bad request",
  9582. "content": {
  9583. "application/json": {
  9584. "schema": {
  9585. "$ref": "#/components/schemas/BadRequestError"
  9586. }
  9587. }
  9588. }
  9589. }
  9590. },
  9591. "description": "Register missing workspaces returned by workspace adapters.",
  9592. "summary": "Sync workspace list",
  9593. "x-codeSamples": [
  9594. {
  9595. "lang": "js",
  9596. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9597. }
  9598. ]
  9599. }
  9600. },
  9601. "/experimental/workspace/status": {
  9602. "get": {
  9603. "tags": ["workspace"],
  9604. "operationId": "experimental.workspace.status",
  9605. "parameters": [
  9606. {
  9607. "name": "directory",
  9608. "in": "query",
  9609. "schema": {
  9610. "type": "string"
  9611. },
  9612. "required": false
  9613. },
  9614. {
  9615. "name": "workspace",
  9616. "in": "query",
  9617. "schema": {
  9618. "type": "string"
  9619. },
  9620. "required": false
  9621. }
  9622. ],
  9623. "responses": {
  9624. "200": {
  9625. "description": "Workspace status",
  9626. "content": {
  9627. "application/json": {
  9628. "schema": {
  9629. "type": "array",
  9630. "items": {
  9631. "type": "object",
  9632. "properties": {
  9633. "workspaceID": {
  9634. "type": "string",
  9635. "pattern": "^wrk"
  9636. },
  9637. "status": {
  9638. "type": "string",
  9639. "enum": ["connected", "connecting", "disconnected", "error"]
  9640. }
  9641. },
  9642. "required": ["workspaceID", "status"],
  9643. "additionalProperties": false
  9644. },
  9645. "description": "Workspace status"
  9646. }
  9647. }
  9648. }
  9649. },
  9650. "400": {
  9651. "description": "Bad request",
  9652. "content": {
  9653. "application/json": {
  9654. "schema": {
  9655. "$ref": "#/components/schemas/BadRequestError"
  9656. }
  9657. }
  9658. }
  9659. }
  9660. },
  9661. "description": "Get connection status for workspaces in the current project.",
  9662. "summary": "Workspace status",
  9663. "x-codeSamples": [
  9664. {
  9665. "lang": "js",
  9666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9667. }
  9668. ]
  9669. }
  9670. },
  9671. "/experimental/workspace/{id}": {
  9672. "delete": {
  9673. "tags": ["workspace"],
  9674. "operationId": "experimental.workspace.remove",
  9675. "parameters": [
  9676. {
  9677. "name": "id",
  9678. "in": "path",
  9679. "schema": {
  9680. "type": "string",
  9681. "pattern": "^wrk"
  9682. },
  9683. "required": true
  9684. },
  9685. {
  9686. "name": "directory",
  9687. "in": "query",
  9688. "schema": {
  9689. "type": "string"
  9690. },
  9691. "required": false
  9692. },
  9693. {
  9694. "name": "workspace",
  9695. "in": "query",
  9696. "schema": {
  9697. "type": "string"
  9698. },
  9699. "required": false
  9700. }
  9701. ],
  9702. "responses": {
  9703. "200": {
  9704. "description": "Workspace removed",
  9705. "content": {
  9706. "application/json": {
  9707. "schema": {
  9708. "$ref": "#/components/schemas/Workspace"
  9709. }
  9710. }
  9711. }
  9712. },
  9713. "400": {
  9714. "description": "BadRequest | InvalidRequestError",
  9715. "content": {
  9716. "application/json": {
  9717. "schema": {
  9718. "anyOf": [
  9719. {
  9720. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9721. },
  9722. {
  9723. "$ref": "#/components/schemas/InvalidRequestError"
  9724. }
  9725. ]
  9726. }
  9727. }
  9728. }
  9729. }
  9730. },
  9731. "description": "Remove an existing workspace.",
  9732. "summary": "Remove workspace",
  9733. "x-codeSamples": [
  9734. {
  9735. "lang": "js",
  9736. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9737. }
  9738. ]
  9739. }
  9740. },
  9741. "/experimental/workspace/warp": {
  9742. "post": {
  9743. "tags": ["workspace"],
  9744. "operationId": "experimental.workspace.warp",
  9745. "parameters": [
  9746. {
  9747. "name": "directory",
  9748. "in": "query",
  9749. "schema": {
  9750. "type": "string"
  9751. },
  9752. "required": false
  9753. },
  9754. {
  9755. "name": "workspace",
  9756. "in": "query",
  9757. "schema": {
  9758. "type": "string"
  9759. },
  9760. "required": false
  9761. }
  9762. ],
  9763. "responses": {
  9764. "204": {
  9765. "description": "Session warped"
  9766. },
  9767. "400": {
  9768. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9769. "content": {
  9770. "application/json": {
  9771. "schema": {
  9772. "anyOf": [
  9773. {
  9774. "$ref": "#/components/schemas/WorkspaceWarpError"
  9775. },
  9776. {
  9777. "$ref": "#/components/schemas/VcsApplyError"
  9778. },
  9779. {
  9780. "$ref": "#/components/schemas/InvalidRequestError"
  9781. }
  9782. ]
  9783. }
  9784. }
  9785. }
  9786. },
  9787. "404": {
  9788. "description": "NotFoundError",
  9789. "content": {
  9790. "application/json": {
  9791. "schema": {
  9792. "$ref": "#/components/schemas/NotFoundError"
  9793. }
  9794. }
  9795. }
  9796. }
  9797. },
  9798. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9799. "summary": "Warp session into workspace",
  9800. "requestBody": {
  9801. "content": {
  9802. "application/json": {
  9803. "schema": {
  9804. "type": "object",
  9805. "properties": {
  9806. "id": {
  9807. "anyOf": [
  9808. {
  9809. "type": "string",
  9810. "pattern": "^wrk"
  9811. },
  9812. {
  9813. "type": "null"
  9814. }
  9815. ]
  9816. },
  9817. "sessionID": {
  9818. "type": "string",
  9819. "pattern": "^ses"
  9820. },
  9821. "copyChanges": {
  9822. "type": "boolean"
  9823. }
  9824. },
  9825. "required": ["id", "sessionID"],
  9826. "additionalProperties": false
  9827. }
  9828. }
  9829. }
  9830. },
  9831. "x-codeSamples": [
  9832. {
  9833. "lang": "js",
  9834. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9835. }
  9836. ]
  9837. }
  9838. },
  9839. "/api/health": {
  9840. "get": {
  9841. "tags": ["opencode experimental HttpApi"],
  9842. "operationId": "v2.health.get",
  9843. "parameters": [],
  9844. "security": [],
  9845. "responses": {
  9846. "200": {
  9847. "description": "Success",
  9848. "content": {
  9849. "application/json": {
  9850. "schema": {
  9851. "type": "object",
  9852. "properties": {
  9853. "healthy": {
  9854. "type": "boolean",
  9855. "enum": [true]
  9856. }
  9857. },
  9858. "required": ["healthy"],
  9859. "additionalProperties": false
  9860. }
  9861. }
  9862. }
  9863. },
  9864. "400": {
  9865. "description": "InvalidRequestError",
  9866. "content": {
  9867. "application/json": {
  9868. "schema": {
  9869. "$ref": "#/components/schemas/InvalidRequestError"
  9870. }
  9871. }
  9872. }
  9873. },
  9874. "401": {
  9875. "description": "UnauthorizedError",
  9876. "content": {
  9877. "application/json": {
  9878. "schema": {
  9879. "$ref": "#/components/schemas/UnauthorizedError"
  9880. }
  9881. }
  9882. }
  9883. }
  9884. },
  9885. "description": "Check whether the v2 API server is ready to accept requests.",
  9886. "summary": "Check v2 server health",
  9887. "x-codeSamples": [
  9888. {
  9889. "lang": "js",
  9890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9891. }
  9892. ]
  9893. }
  9894. },
  9895. "/api/agent": {
  9896. "get": {
  9897. "tags": ["opencode experimental HttpApi"],
  9898. "operationId": "v2.agent.list",
  9899. "parameters": [
  9900. {
  9901. "name": "location",
  9902. "in": "query",
  9903. "schema": {
  9904. "type": "object",
  9905. "properties": {
  9906. "directory": {
  9907. "type": "string"
  9908. },
  9909. "workspace": {
  9910. "type": "string"
  9911. }
  9912. },
  9913. "additionalProperties": false
  9914. },
  9915. "required": false,
  9916. "style": "deepObject",
  9917. "explode": true
  9918. }
  9919. ],
  9920. "security": [],
  9921. "responses": {
  9922. "200": {
  9923. "description": "Success",
  9924. "content": {
  9925. "application/json": {
  9926. "schema": {
  9927. "type": "object",
  9928. "properties": {
  9929. "location": {
  9930. "$ref": "#/components/schemas/LocationInfo"
  9931. },
  9932. "data": {
  9933. "type": "array",
  9934. "items": {
  9935. "$ref": "#/components/schemas/AgentV2Info"
  9936. }
  9937. }
  9938. },
  9939. "required": ["location", "data"],
  9940. "additionalProperties": false
  9941. }
  9942. }
  9943. }
  9944. },
  9945. "400": {
  9946. "description": "InvalidRequestError",
  9947. "content": {
  9948. "application/json": {
  9949. "schema": {
  9950. "$ref": "#/components/schemas/InvalidRequestError"
  9951. }
  9952. }
  9953. }
  9954. },
  9955. "401": {
  9956. "description": "UnauthorizedError",
  9957. "content": {
  9958. "application/json": {
  9959. "schema": {
  9960. "$ref": "#/components/schemas/UnauthorizedError"
  9961. }
  9962. }
  9963. }
  9964. }
  9965. },
  9966. "description": "Retrieve currently registered v2 agents.",
  9967. "summary": "List v2 agents",
  9968. "x-codeSamples": [
  9969. {
  9970. "lang": "js",
  9971. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9972. }
  9973. ]
  9974. }
  9975. },
  9976. "/api/session": {
  9977. "get": {
  9978. "tags": ["v2"],
  9979. "operationId": "v2.session.list",
  9980. "parameters": [
  9981. {
  9982. "name": "workspace",
  9983. "in": "query",
  9984. "schema": {
  9985. "type": "string",
  9986. "pattern": "^wrk"
  9987. },
  9988. "required": false
  9989. },
  9990. {
  9991. "name": "limit",
  9992. "in": "query",
  9993. "schema": {
  9994. "type": "number"
  9995. },
  9996. "required": false
  9997. },
  9998. {
  9999. "name": "order",
  10000. "in": "query",
  10001. "schema": {
  10002. "type": "string",
  10003. "enum": ["asc", "desc"]
  10004. },
  10005. "required": false
  10006. },
  10007. {
  10008. "name": "search",
  10009. "in": "query",
  10010. "schema": {
  10011. "type": "string"
  10012. },
  10013. "required": false
  10014. },
  10015. {
  10016. "name": "directory",
  10017. "in": "query",
  10018. "schema": {
  10019. "type": "string"
  10020. },
  10021. "required": false
  10022. },
  10023. {
  10024. "name": "project",
  10025. "in": "query",
  10026. "schema": {
  10027. "type": "string"
  10028. },
  10029. "required": false
  10030. },
  10031. {
  10032. "name": "subpath",
  10033. "in": "query",
  10034. "schema": {
  10035. "type": "string"
  10036. },
  10037. "required": false
  10038. },
  10039. {
  10040. "name": "cursor",
  10041. "in": "query",
  10042. "schema": {
  10043. "type": "string",
  10044. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10045. },
  10046. "required": false
  10047. }
  10048. ],
  10049. "security": [],
  10050. "responses": {
  10051. "200": {
  10052. "description": "V2SessionsResponse",
  10053. "content": {
  10054. "application/json": {
  10055. "schema": {
  10056. "$ref": "#/components/schemas/V2SessionsResponse"
  10057. }
  10058. }
  10059. }
  10060. },
  10061. "400": {
  10062. "description": "InvalidCursorError | InvalidRequestError",
  10063. "content": {
  10064. "application/json": {
  10065. "schema": {
  10066. "anyOf": [
  10067. {
  10068. "$ref": "#/components/schemas/InvalidCursorError"
  10069. },
  10070. {
  10071. "$ref": "#/components/schemas/InvalidRequestError"
  10072. },
  10073. {
  10074. "$ref": "#/components/schemas/InvalidRequestError"
  10075. }
  10076. ]
  10077. }
  10078. }
  10079. }
  10080. },
  10081. "401": {
  10082. "description": "UnauthorizedError",
  10083. "content": {
  10084. "application/json": {
  10085. "schema": {
  10086. "$ref": "#/components/schemas/UnauthorizedError"
  10087. }
  10088. }
  10089. }
  10090. }
  10091. },
  10092. "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.",
  10093. "summary": "List v2 sessions",
  10094. "x-codeSamples": [
  10095. {
  10096. "lang": "js",
  10097. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10098. }
  10099. ]
  10100. }
  10101. },
  10102. "/api/session/{sessionID}/prompt": {
  10103. "post": {
  10104. "tags": ["v2"],
  10105. "operationId": "v2.session.prompt",
  10106. "parameters": [
  10107. {
  10108. "name": "sessionID",
  10109. "in": "path",
  10110. "schema": {
  10111. "type": "string",
  10112. "pattern": "^ses"
  10113. },
  10114. "required": true
  10115. }
  10116. ],
  10117. "security": [],
  10118. "responses": {
  10119. "200": {
  10120. "description": "Success",
  10121. "content": {
  10122. "application/json": {
  10123. "schema": {
  10124. "type": "object",
  10125. "properties": {
  10126. "data": {
  10127. "$ref": "#/components/schemas/SessionInputAdmitted"
  10128. }
  10129. },
  10130. "required": ["data"],
  10131. "additionalProperties": false
  10132. }
  10133. }
  10134. }
  10135. },
  10136. "400": {
  10137. "description": "InvalidRequestError",
  10138. "content": {
  10139. "application/json": {
  10140. "schema": {
  10141. "$ref": "#/components/schemas/InvalidRequestError"
  10142. }
  10143. }
  10144. }
  10145. },
  10146. "401": {
  10147. "description": "UnauthorizedError",
  10148. "content": {
  10149. "application/json": {
  10150. "schema": {
  10151. "$ref": "#/components/schemas/UnauthorizedError"
  10152. }
  10153. }
  10154. }
  10155. },
  10156. "404": {
  10157. "description": "SessionNotFoundError",
  10158. "content": {
  10159. "application/json": {
  10160. "schema": {
  10161. "$ref": "#/components/schemas/SessionNotFoundError"
  10162. }
  10163. }
  10164. }
  10165. },
  10166. "409": {
  10167. "description": "ConflictError",
  10168. "content": {
  10169. "application/json": {
  10170. "schema": {
  10171. "$ref": "#/components/schemas/ConflictError"
  10172. }
  10173. }
  10174. }
  10175. }
  10176. },
  10177. "description": "Durably admit one v2 session input and schedule agent-loop execution unless resume is false.",
  10178. "summary": "Send v2 message",
  10179. "requestBody": {
  10180. "content": {
  10181. "application/json": {
  10182. "schema": {
  10183. "type": "object",
  10184. "properties": {
  10185. "id": {
  10186. "type": "string",
  10187. "pattern": "^msg_"
  10188. },
  10189. "prompt": {
  10190. "$ref": "#/components/schemas/Prompt"
  10191. },
  10192. "delivery": {
  10193. "type": "string",
  10194. "enum": ["steer", "queue"]
  10195. },
  10196. "resume": {
  10197. "type": "boolean"
  10198. }
  10199. },
  10200. "required": ["prompt"],
  10201. "additionalProperties": false
  10202. }
  10203. }
  10204. },
  10205. "required": true
  10206. },
  10207. "x-codeSamples": [
  10208. {
  10209. "lang": "js",
  10210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10211. }
  10212. ]
  10213. }
  10214. },
  10215. "/api/session/{sessionID}/compact": {
  10216. "post": {
  10217. "tags": ["v2"],
  10218. "operationId": "v2.session.compact",
  10219. "parameters": [
  10220. {
  10221. "name": "sessionID",
  10222. "in": "path",
  10223. "schema": {
  10224. "type": "string",
  10225. "pattern": "^ses"
  10226. },
  10227. "required": true
  10228. }
  10229. ],
  10230. "security": [],
  10231. "responses": {
  10232. "204": {
  10233. "description": "<No Content>"
  10234. },
  10235. "400": {
  10236. "description": "InvalidRequestError",
  10237. "content": {
  10238. "application/json": {
  10239. "schema": {
  10240. "$ref": "#/components/schemas/InvalidRequestError"
  10241. }
  10242. }
  10243. }
  10244. },
  10245. "401": {
  10246. "description": "UnauthorizedError",
  10247. "content": {
  10248. "application/json": {
  10249. "schema": {
  10250. "$ref": "#/components/schemas/UnauthorizedError"
  10251. }
  10252. }
  10253. }
  10254. },
  10255. "404": {
  10256. "description": "SessionNotFoundError",
  10257. "content": {
  10258. "application/json": {
  10259. "schema": {
  10260. "$ref": "#/components/schemas/SessionNotFoundError"
  10261. }
  10262. }
  10263. }
  10264. },
  10265. "503": {
  10266. "description": "ServiceUnavailableError",
  10267. "content": {
  10268. "application/json": {
  10269. "schema": {
  10270. "$ref": "#/components/schemas/ServiceUnavailableError"
  10271. }
  10272. }
  10273. }
  10274. }
  10275. },
  10276. "description": "Compact a v2 session conversation.",
  10277. "summary": "Compact v2 session",
  10278. "x-codeSamples": [
  10279. {
  10280. "lang": "js",
  10281. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10282. }
  10283. ]
  10284. }
  10285. },
  10286. "/api/session/{sessionID}/wait": {
  10287. "post": {
  10288. "tags": ["v2"],
  10289. "operationId": "v2.session.wait",
  10290. "parameters": [
  10291. {
  10292. "name": "sessionID",
  10293. "in": "path",
  10294. "schema": {
  10295. "type": "string",
  10296. "pattern": "^ses"
  10297. },
  10298. "required": true
  10299. }
  10300. ],
  10301. "security": [],
  10302. "responses": {
  10303. "204": {
  10304. "description": "<No Content>"
  10305. },
  10306. "400": {
  10307. "description": "InvalidRequestError",
  10308. "content": {
  10309. "application/json": {
  10310. "schema": {
  10311. "$ref": "#/components/schemas/InvalidRequestError"
  10312. }
  10313. }
  10314. }
  10315. },
  10316. "401": {
  10317. "description": "UnauthorizedError",
  10318. "content": {
  10319. "application/json": {
  10320. "schema": {
  10321. "$ref": "#/components/schemas/UnauthorizedError"
  10322. }
  10323. }
  10324. }
  10325. },
  10326. "404": {
  10327. "description": "SessionNotFoundError",
  10328. "content": {
  10329. "application/json": {
  10330. "schema": {
  10331. "$ref": "#/components/schemas/SessionNotFoundError"
  10332. }
  10333. }
  10334. }
  10335. },
  10336. "503": {
  10337. "description": "ServiceUnavailableError",
  10338. "content": {
  10339. "application/json": {
  10340. "schema": {
  10341. "$ref": "#/components/schemas/ServiceUnavailableError"
  10342. }
  10343. }
  10344. }
  10345. }
  10346. },
  10347. "description": "Wait for a v2 session agent loop to become idle.",
  10348. "summary": "Wait for v2 session",
  10349. "x-codeSamples": [
  10350. {
  10351. "lang": "js",
  10352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10353. }
  10354. ]
  10355. }
  10356. },
  10357. "/api/session/{sessionID}/context": {
  10358. "get": {
  10359. "tags": ["v2"],
  10360. "operationId": "v2.session.context",
  10361. "parameters": [
  10362. {
  10363. "name": "sessionID",
  10364. "in": "path",
  10365. "schema": {
  10366. "type": "string",
  10367. "pattern": "^ses"
  10368. },
  10369. "required": true
  10370. }
  10371. ],
  10372. "security": [],
  10373. "responses": {
  10374. "200": {
  10375. "description": "Success",
  10376. "content": {
  10377. "application/json": {
  10378. "schema": {
  10379. "type": "object",
  10380. "properties": {
  10381. "data": {
  10382. "type": "array",
  10383. "items": {
  10384. "$ref": "#/components/schemas/SessionMessage"
  10385. }
  10386. }
  10387. },
  10388. "required": ["data"],
  10389. "additionalProperties": false
  10390. }
  10391. }
  10392. }
  10393. },
  10394. "400": {
  10395. "description": "InvalidRequestError",
  10396. "content": {
  10397. "application/json": {
  10398. "schema": {
  10399. "$ref": "#/components/schemas/InvalidRequestError"
  10400. }
  10401. }
  10402. }
  10403. },
  10404. "401": {
  10405. "description": "UnauthorizedError",
  10406. "content": {
  10407. "application/json": {
  10408. "schema": {
  10409. "$ref": "#/components/schemas/UnauthorizedError"
  10410. }
  10411. }
  10412. }
  10413. },
  10414. "404": {
  10415. "description": "SessionNotFoundError",
  10416. "content": {
  10417. "application/json": {
  10418. "schema": {
  10419. "$ref": "#/components/schemas/SessionNotFoundError"
  10420. }
  10421. }
  10422. }
  10423. },
  10424. "500": {
  10425. "description": "UnknownError",
  10426. "content": {
  10427. "application/json": {
  10428. "schema": {
  10429. "$ref": "#/components/schemas/UnknownError1"
  10430. }
  10431. }
  10432. }
  10433. }
  10434. },
  10435. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  10436. "summary": "Get v2 session context",
  10437. "x-codeSamples": [
  10438. {
  10439. "lang": "js",
  10440. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10441. }
  10442. ]
  10443. }
  10444. },
  10445. "/api/session/{sessionID}/message": {
  10446. "get": {
  10447. "tags": ["v2 messages"],
  10448. "operationId": "v2.session.messages",
  10449. "parameters": [
  10450. {
  10451. "name": "sessionID",
  10452. "in": "path",
  10453. "schema": {
  10454. "type": "string",
  10455. "pattern": "^ses"
  10456. },
  10457. "required": true
  10458. },
  10459. {
  10460. "name": "limit",
  10461. "in": "query",
  10462. "schema": {
  10463. "type": "number"
  10464. },
  10465. "required": false
  10466. },
  10467. {
  10468. "name": "order",
  10469. "in": "query",
  10470. "schema": {
  10471. "type": "string",
  10472. "enum": ["asc", "desc"]
  10473. },
  10474. "required": false
  10475. },
  10476. {
  10477. "name": "cursor",
  10478. "in": "query",
  10479. "schema": {
  10480. "type": "string",
  10481. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10482. },
  10483. "required": false
  10484. }
  10485. ],
  10486. "security": [],
  10487. "responses": {
  10488. "200": {
  10489. "description": "V2SessionMessagesResponse",
  10490. "content": {
  10491. "application/json": {
  10492. "schema": {
  10493. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  10494. }
  10495. }
  10496. }
  10497. },
  10498. "400": {
  10499. "description": "InvalidCursorError | InvalidRequestError",
  10500. "content": {
  10501. "application/json": {
  10502. "schema": {
  10503. "anyOf": [
  10504. {
  10505. "$ref": "#/components/schemas/InvalidCursorError"
  10506. },
  10507. {
  10508. "$ref": "#/components/schemas/InvalidRequestError"
  10509. }
  10510. ]
  10511. }
  10512. }
  10513. }
  10514. },
  10515. "401": {
  10516. "description": "UnauthorizedError",
  10517. "content": {
  10518. "application/json": {
  10519. "schema": {
  10520. "$ref": "#/components/schemas/UnauthorizedError"
  10521. }
  10522. }
  10523. }
  10524. },
  10525. "404": {
  10526. "description": "SessionNotFoundError",
  10527. "content": {
  10528. "application/json": {
  10529. "schema": {
  10530. "$ref": "#/components/schemas/SessionNotFoundError"
  10531. }
  10532. }
  10533. }
  10534. },
  10535. "500": {
  10536. "description": "UnknownError",
  10537. "content": {
  10538. "application/json": {
  10539. "schema": {
  10540. "$ref": "#/components/schemas/UnknownError1"
  10541. }
  10542. }
  10543. }
  10544. }
  10545. },
  10546. "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.",
  10547. "summary": "Get v2 session messages",
  10548. "x-codeSamples": [
  10549. {
  10550. "lang": "js",
  10551. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10552. }
  10553. ]
  10554. }
  10555. },
  10556. "/api/model": {
  10557. "get": {
  10558. "tags": ["v2 models"],
  10559. "operationId": "v2.model.list",
  10560. "parameters": [
  10561. {
  10562. "name": "location",
  10563. "in": "query",
  10564. "schema": {
  10565. "type": "object",
  10566. "properties": {
  10567. "directory": {
  10568. "type": "string"
  10569. },
  10570. "workspace": {
  10571. "type": "string"
  10572. }
  10573. },
  10574. "additionalProperties": false
  10575. },
  10576. "required": false,
  10577. "style": "deepObject",
  10578. "explode": true
  10579. }
  10580. ],
  10581. "security": [],
  10582. "responses": {
  10583. "200": {
  10584. "description": "Success",
  10585. "content": {
  10586. "application/json": {
  10587. "schema": {
  10588. "type": "object",
  10589. "properties": {
  10590. "location": {
  10591. "$ref": "#/components/schemas/LocationInfo"
  10592. },
  10593. "data": {
  10594. "type": "array",
  10595. "items": {
  10596. "$ref": "#/components/schemas/ModelV2Info"
  10597. }
  10598. }
  10599. },
  10600. "required": ["location", "data"],
  10601. "additionalProperties": false
  10602. }
  10603. }
  10604. }
  10605. },
  10606. "400": {
  10607. "description": "InvalidRequestError",
  10608. "content": {
  10609. "application/json": {
  10610. "schema": {
  10611. "$ref": "#/components/schemas/InvalidRequestError"
  10612. }
  10613. }
  10614. }
  10615. },
  10616. "401": {
  10617. "description": "UnauthorizedError",
  10618. "content": {
  10619. "application/json": {
  10620. "schema": {
  10621. "$ref": "#/components/schemas/UnauthorizedError"
  10622. }
  10623. }
  10624. }
  10625. },
  10626. "503": {
  10627. "description": "ServiceUnavailableError",
  10628. "content": {
  10629. "application/json": {
  10630. "schema": {
  10631. "$ref": "#/components/schemas/ServiceUnavailableError"
  10632. }
  10633. }
  10634. }
  10635. }
  10636. },
  10637. "description": "Retrieve available v2 models ordered by release date.",
  10638. "summary": "List v2 models",
  10639. "x-codeSamples": [
  10640. {
  10641. "lang": "js",
  10642. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10643. }
  10644. ]
  10645. }
  10646. },
  10647. "/api/provider": {
  10648. "get": {
  10649. "tags": ["v2 providers"],
  10650. "operationId": "v2.provider.list",
  10651. "parameters": [
  10652. {
  10653. "name": "location",
  10654. "in": "query",
  10655. "schema": {
  10656. "type": "object",
  10657. "properties": {
  10658. "directory": {
  10659. "type": "string"
  10660. },
  10661. "workspace": {
  10662. "type": "string"
  10663. }
  10664. },
  10665. "additionalProperties": false
  10666. },
  10667. "required": false,
  10668. "style": "deepObject",
  10669. "explode": true
  10670. }
  10671. ],
  10672. "security": [],
  10673. "responses": {
  10674. "200": {
  10675. "description": "Success",
  10676. "content": {
  10677. "application/json": {
  10678. "schema": {
  10679. "type": "object",
  10680. "properties": {
  10681. "location": {
  10682. "$ref": "#/components/schemas/LocationInfo"
  10683. },
  10684. "data": {
  10685. "type": "array",
  10686. "items": {
  10687. "$ref": "#/components/schemas/ProviderV2Info"
  10688. }
  10689. }
  10690. },
  10691. "required": ["location", "data"],
  10692. "additionalProperties": false
  10693. }
  10694. }
  10695. }
  10696. },
  10697. "400": {
  10698. "description": "InvalidRequestError",
  10699. "content": {
  10700. "application/json": {
  10701. "schema": {
  10702. "$ref": "#/components/schemas/InvalidRequestError"
  10703. }
  10704. }
  10705. }
  10706. },
  10707. "401": {
  10708. "description": "UnauthorizedError",
  10709. "content": {
  10710. "application/json": {
  10711. "schema": {
  10712. "$ref": "#/components/schemas/UnauthorizedError"
  10713. }
  10714. }
  10715. }
  10716. },
  10717. "503": {
  10718. "description": "ServiceUnavailableError",
  10719. "content": {
  10720. "application/json": {
  10721. "schema": {
  10722. "$ref": "#/components/schemas/ServiceUnavailableError"
  10723. }
  10724. }
  10725. }
  10726. }
  10727. },
  10728. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  10729. "summary": "List v2 providers",
  10730. "x-codeSamples": [
  10731. {
  10732. "lang": "js",
  10733. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10734. }
  10735. ]
  10736. }
  10737. },
  10738. "/api/provider/{providerID}": {
  10739. "get": {
  10740. "tags": ["v2 providers"],
  10741. "operationId": "v2.provider.get",
  10742. "parameters": [
  10743. {
  10744. "name": "providerID",
  10745. "in": "path",
  10746. "schema": {
  10747. "type": "string"
  10748. },
  10749. "required": true
  10750. },
  10751. {
  10752. "name": "location",
  10753. "in": "query",
  10754. "schema": {
  10755. "type": "object",
  10756. "properties": {
  10757. "directory": {
  10758. "type": "string"
  10759. },
  10760. "workspace": {
  10761. "type": "string"
  10762. }
  10763. },
  10764. "additionalProperties": false
  10765. },
  10766. "required": false,
  10767. "style": "deepObject",
  10768. "explode": true
  10769. }
  10770. ],
  10771. "security": [],
  10772. "responses": {
  10773. "200": {
  10774. "description": "Success",
  10775. "content": {
  10776. "application/json": {
  10777. "schema": {
  10778. "type": "object",
  10779. "properties": {
  10780. "location": {
  10781. "$ref": "#/components/schemas/LocationInfo"
  10782. },
  10783. "data": {
  10784. "$ref": "#/components/schemas/ProviderV2Info"
  10785. }
  10786. },
  10787. "required": ["location", "data"],
  10788. "additionalProperties": false
  10789. }
  10790. }
  10791. }
  10792. },
  10793. "400": {
  10794. "description": "InvalidRequestError",
  10795. "content": {
  10796. "application/json": {
  10797. "schema": {
  10798. "$ref": "#/components/schemas/InvalidRequestError"
  10799. }
  10800. }
  10801. }
  10802. },
  10803. "401": {
  10804. "description": "UnauthorizedError",
  10805. "content": {
  10806. "application/json": {
  10807. "schema": {
  10808. "$ref": "#/components/schemas/UnauthorizedError"
  10809. }
  10810. }
  10811. }
  10812. },
  10813. "404": {
  10814. "description": "ProviderNotFoundError",
  10815. "content": {
  10816. "application/json": {
  10817. "schema": {
  10818. "$ref": "#/components/schemas/ProviderNotFoundError"
  10819. }
  10820. }
  10821. }
  10822. },
  10823. "503": {
  10824. "description": "ServiceUnavailableError",
  10825. "content": {
  10826. "application/json": {
  10827. "schema": {
  10828. "$ref": "#/components/schemas/ServiceUnavailableError"
  10829. }
  10830. }
  10831. }
  10832. }
  10833. },
  10834. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  10835. "summary": "Get v2 provider",
  10836. "x-codeSamples": [
  10837. {
  10838. "lang": "js",
  10839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  10840. }
  10841. ]
  10842. }
  10843. },
  10844. "/api/permission/request": {
  10845. "get": {
  10846. "tags": ["v2 permissions"],
  10847. "operationId": "v2.permission.request.list",
  10848. "parameters": [
  10849. {
  10850. "name": "location",
  10851. "in": "query",
  10852. "schema": {
  10853. "type": "object",
  10854. "properties": {
  10855. "directory": {
  10856. "type": "string"
  10857. },
  10858. "workspace": {
  10859. "type": "string"
  10860. }
  10861. },
  10862. "additionalProperties": false
  10863. },
  10864. "required": false,
  10865. "style": "deepObject",
  10866. "explode": true
  10867. }
  10868. ],
  10869. "security": [],
  10870. "responses": {
  10871. "200": {
  10872. "description": "Success",
  10873. "content": {
  10874. "application/json": {
  10875. "schema": {
  10876. "type": "object",
  10877. "properties": {
  10878. "location": {
  10879. "$ref": "#/components/schemas/LocationInfo"
  10880. },
  10881. "data": {
  10882. "type": "array",
  10883. "items": {
  10884. "$ref": "#/components/schemas/PermissionV2Request"
  10885. }
  10886. }
  10887. },
  10888. "required": ["location", "data"],
  10889. "additionalProperties": false
  10890. }
  10891. }
  10892. }
  10893. },
  10894. "400": {
  10895. "description": "InvalidRequestError",
  10896. "content": {
  10897. "application/json": {
  10898. "schema": {
  10899. "$ref": "#/components/schemas/InvalidRequestError"
  10900. }
  10901. }
  10902. }
  10903. },
  10904. "401": {
  10905. "description": "UnauthorizedError",
  10906. "content": {
  10907. "application/json": {
  10908. "schema": {
  10909. "$ref": "#/components/schemas/UnauthorizedError"
  10910. }
  10911. }
  10912. }
  10913. }
  10914. },
  10915. "description": "Retrieve pending permission requests for a location.",
  10916. "summary": "List pending permission requests",
  10917. "x-codeSamples": [
  10918. {
  10919. "lang": "js",
  10920. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  10921. }
  10922. ]
  10923. }
  10924. },
  10925. "/api/session/{sessionID}/permission/request": {
  10926. "get": {
  10927. "tags": ["v2 session permissions"],
  10928. "operationId": "v2.session.permission.list",
  10929. "parameters": [
  10930. {
  10931. "name": "sessionID",
  10932. "in": "path",
  10933. "schema": {
  10934. "type": "string",
  10935. "pattern": "^ses"
  10936. },
  10937. "required": true
  10938. }
  10939. ],
  10940. "security": [],
  10941. "responses": {
  10942. "200": {
  10943. "description": "Success",
  10944. "content": {
  10945. "application/json": {
  10946. "schema": {
  10947. "type": "object",
  10948. "properties": {
  10949. "data": {
  10950. "type": "array",
  10951. "items": {
  10952. "$ref": "#/components/schemas/PermissionV2Request"
  10953. }
  10954. }
  10955. },
  10956. "required": ["data"],
  10957. "additionalProperties": false
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "400": {
  10963. "description": "InvalidRequestError",
  10964. "content": {
  10965. "application/json": {
  10966. "schema": {
  10967. "$ref": "#/components/schemas/InvalidRequestError"
  10968. }
  10969. }
  10970. }
  10971. },
  10972. "401": {
  10973. "description": "UnauthorizedError",
  10974. "content": {
  10975. "application/json": {
  10976. "schema": {
  10977. "$ref": "#/components/schemas/UnauthorizedError"
  10978. }
  10979. }
  10980. }
  10981. },
  10982. "404": {
  10983. "description": "SessionNotFoundError",
  10984. "content": {
  10985. "application/json": {
  10986. "schema": {
  10987. "$ref": "#/components/schemas/SessionNotFoundError"
  10988. }
  10989. }
  10990. }
  10991. }
  10992. },
  10993. "description": "Retrieve pending permission requests owned by a session.",
  10994. "summary": "List session permission requests",
  10995. "x-codeSamples": [
  10996. {
  10997. "lang": "js",
  10998. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  10999. }
  11000. ]
  11001. }
  11002. },
  11003. "/api/session/{sessionID}/permission/request/{requestID}/reply": {
  11004. "post": {
  11005. "tags": ["v2 session permissions"],
  11006. "operationId": "v2.session.permission.reply",
  11007. "parameters": [
  11008. {
  11009. "name": "sessionID",
  11010. "in": "path",
  11011. "schema": {
  11012. "type": "string",
  11013. "pattern": "^ses"
  11014. },
  11015. "required": true
  11016. },
  11017. {
  11018. "name": "requestID",
  11019. "in": "path",
  11020. "schema": {
  11021. "type": "string",
  11022. "pattern": "^per"
  11023. },
  11024. "required": true
  11025. }
  11026. ],
  11027. "security": [],
  11028. "responses": {
  11029. "204": {
  11030. "description": "<No Content>"
  11031. },
  11032. "400": {
  11033. "description": "InvalidRequestError",
  11034. "content": {
  11035. "application/json": {
  11036. "schema": {
  11037. "$ref": "#/components/schemas/InvalidRequestError"
  11038. }
  11039. }
  11040. }
  11041. },
  11042. "401": {
  11043. "description": "UnauthorizedError",
  11044. "content": {
  11045. "application/json": {
  11046. "schema": {
  11047. "$ref": "#/components/schemas/UnauthorizedError"
  11048. }
  11049. }
  11050. }
  11051. },
  11052. "404": {
  11053. "description": "SessionNotFoundError | PermissionNotFoundError",
  11054. "content": {
  11055. "application/json": {
  11056. "schema": {
  11057. "anyOf": [
  11058. {
  11059. "$ref": "#/components/schemas/SessionNotFoundError"
  11060. },
  11061. {
  11062. "$ref": "#/components/schemas/PermissionNotFoundError"
  11063. }
  11064. ]
  11065. }
  11066. }
  11067. }
  11068. }
  11069. },
  11070. "description": "Respond to a pending permission request owned by a session.",
  11071. "summary": "Reply to pending permission request",
  11072. "requestBody": {
  11073. "content": {
  11074. "application/json": {
  11075. "schema": {
  11076. "type": "object",
  11077. "properties": {
  11078. "reply": {
  11079. "$ref": "#/components/schemas/PermissionV2Reply"
  11080. },
  11081. "message": {
  11082. "type": "string"
  11083. }
  11084. },
  11085. "required": ["reply"],
  11086. "additionalProperties": false
  11087. }
  11088. }
  11089. },
  11090. "required": true
  11091. },
  11092. "x-codeSamples": [
  11093. {
  11094. "lang": "js",
  11095. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  11096. }
  11097. ]
  11098. }
  11099. },
  11100. "/api/permission/saved": {
  11101. "get": {
  11102. "tags": ["v2 saved permissions"],
  11103. "operationId": "v2.permission.saved.list",
  11104. "parameters": [
  11105. {
  11106. "name": "projectID",
  11107. "in": "query",
  11108. "schema": {
  11109. "type": "string"
  11110. },
  11111. "required": false
  11112. }
  11113. ],
  11114. "security": [],
  11115. "responses": {
  11116. "200": {
  11117. "description": "Success",
  11118. "content": {
  11119. "application/json": {
  11120. "schema": {
  11121. "type": "object",
  11122. "properties": {
  11123. "data": {
  11124. "type": "array",
  11125. "items": {
  11126. "$ref": "#/components/schemas/PermissionSavedInfo"
  11127. }
  11128. }
  11129. },
  11130. "required": ["data"],
  11131. "additionalProperties": false
  11132. }
  11133. }
  11134. }
  11135. },
  11136. "400": {
  11137. "description": "InvalidRequestError",
  11138. "content": {
  11139. "application/json": {
  11140. "schema": {
  11141. "$ref": "#/components/schemas/InvalidRequestError"
  11142. }
  11143. }
  11144. }
  11145. },
  11146. "401": {
  11147. "description": "UnauthorizedError",
  11148. "content": {
  11149. "application/json": {
  11150. "schema": {
  11151. "$ref": "#/components/schemas/UnauthorizedError"
  11152. }
  11153. }
  11154. }
  11155. }
  11156. },
  11157. "description": "Retrieve saved permissions, optionally filtered by project.",
  11158. "summary": "List saved permissions",
  11159. "x-codeSamples": [
  11160. {
  11161. "lang": "js",
  11162. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  11163. }
  11164. ]
  11165. }
  11166. },
  11167. "/api/permission/saved/{id}": {
  11168. "delete": {
  11169. "tags": ["v2 saved permissions"],
  11170. "operationId": "v2.permission.saved.remove",
  11171. "parameters": [
  11172. {
  11173. "name": "id",
  11174. "in": "path",
  11175. "schema": {
  11176. "type": "string"
  11177. },
  11178. "required": true
  11179. }
  11180. ],
  11181. "security": [],
  11182. "responses": {
  11183. "204": {
  11184. "description": "<No Content>"
  11185. },
  11186. "400": {
  11187. "description": "InvalidRequestError",
  11188. "content": {
  11189. "application/json": {
  11190. "schema": {
  11191. "$ref": "#/components/schemas/InvalidRequestError"
  11192. }
  11193. }
  11194. }
  11195. },
  11196. "401": {
  11197. "description": "UnauthorizedError",
  11198. "content": {
  11199. "application/json": {
  11200. "schema": {
  11201. "$ref": "#/components/schemas/UnauthorizedError"
  11202. }
  11203. }
  11204. }
  11205. }
  11206. },
  11207. "description": "Remove a saved permission by ID.",
  11208. "summary": "Remove saved permission",
  11209. "x-codeSamples": [
  11210. {
  11211. "lang": "js",
  11212. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  11213. }
  11214. ]
  11215. }
  11216. },
  11217. "/api/fs/read": {
  11218. "get": {
  11219. "tags": ["v2 filesystem"],
  11220. "operationId": "v2.fs.read",
  11221. "parameters": [
  11222. {
  11223. "name": "location",
  11224. "in": "query",
  11225. "schema": {
  11226. "type": "object",
  11227. "properties": {
  11228. "directory": {
  11229. "type": "string"
  11230. },
  11231. "workspace": {
  11232. "type": "string"
  11233. }
  11234. },
  11235. "additionalProperties": false
  11236. },
  11237. "required": false,
  11238. "style": "deepObject",
  11239. "explode": true
  11240. },
  11241. {
  11242. "name": "path",
  11243. "in": "query",
  11244. "schema": {
  11245. "type": "string"
  11246. },
  11247. "required": true
  11248. },
  11249. {
  11250. "name": "reference",
  11251. "in": "query",
  11252. "schema": {
  11253. "type": "string"
  11254. },
  11255. "required": false
  11256. }
  11257. ],
  11258. "security": [],
  11259. "responses": {
  11260. "200": {
  11261. "description": "Success",
  11262. "content": {
  11263. "application/json": {
  11264. "schema": {
  11265. "type": "object",
  11266. "properties": {
  11267. "location": {
  11268. "$ref": "#/components/schemas/LocationInfo"
  11269. },
  11270. "data": {
  11271. "anyOf": [
  11272. {
  11273. "$ref": "#/components/schemas/FileSystemTextContent"
  11274. },
  11275. {
  11276. "$ref": "#/components/schemas/FileSystemBinaryContent"
  11277. }
  11278. ]
  11279. }
  11280. },
  11281. "required": ["location", "data"],
  11282. "additionalProperties": false
  11283. }
  11284. }
  11285. }
  11286. },
  11287. "400": {
  11288. "description": "InvalidRequestError",
  11289. "content": {
  11290. "application/json": {
  11291. "schema": {
  11292. "$ref": "#/components/schemas/InvalidRequestError"
  11293. }
  11294. }
  11295. }
  11296. },
  11297. "401": {
  11298. "description": "UnauthorizedError",
  11299. "content": {
  11300. "application/json": {
  11301. "schema": {
  11302. "$ref": "#/components/schemas/UnauthorizedError"
  11303. }
  11304. }
  11305. }
  11306. }
  11307. },
  11308. "description": "Read one file relative to the requested location.",
  11309. "summary": "Read file",
  11310. "x-codeSamples": [
  11311. {
  11312. "lang": "js",
  11313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  11314. }
  11315. ]
  11316. }
  11317. },
  11318. "/api/fs/list": {
  11319. "get": {
  11320. "tags": ["v2 filesystem"],
  11321. "operationId": "v2.fs.list",
  11322. "parameters": [
  11323. {
  11324. "name": "location",
  11325. "in": "query",
  11326. "schema": {
  11327. "type": "object",
  11328. "properties": {
  11329. "directory": {
  11330. "type": "string"
  11331. },
  11332. "workspace": {
  11333. "type": "string"
  11334. }
  11335. },
  11336. "additionalProperties": false
  11337. },
  11338. "required": false,
  11339. "style": "deepObject",
  11340. "explode": true
  11341. },
  11342. {
  11343. "name": "path",
  11344. "in": "query",
  11345. "schema": {
  11346. "type": "string"
  11347. },
  11348. "required": false
  11349. },
  11350. {
  11351. "name": "reference",
  11352. "in": "query",
  11353. "schema": {
  11354. "type": "string"
  11355. },
  11356. "required": false
  11357. }
  11358. ],
  11359. "security": [],
  11360. "responses": {
  11361. "200": {
  11362. "description": "Success",
  11363. "content": {
  11364. "application/json": {
  11365. "schema": {
  11366. "type": "object",
  11367. "properties": {
  11368. "location": {
  11369. "$ref": "#/components/schemas/LocationInfo"
  11370. },
  11371. "data": {
  11372. "type": "array",
  11373. "items": {
  11374. "$ref": "#/components/schemas/FileSystemEntry"
  11375. }
  11376. }
  11377. },
  11378. "required": ["location", "data"],
  11379. "additionalProperties": false
  11380. }
  11381. }
  11382. }
  11383. },
  11384. "400": {
  11385. "description": "InvalidRequestError",
  11386. "content": {
  11387. "application/json": {
  11388. "schema": {
  11389. "$ref": "#/components/schemas/InvalidRequestError"
  11390. }
  11391. }
  11392. }
  11393. },
  11394. "401": {
  11395. "description": "UnauthorizedError",
  11396. "content": {
  11397. "application/json": {
  11398. "schema": {
  11399. "$ref": "#/components/schemas/UnauthorizedError"
  11400. }
  11401. }
  11402. }
  11403. }
  11404. },
  11405. "description": "List direct children of one directory relative to the requested location.",
  11406. "summary": "List directory",
  11407. "x-codeSamples": [
  11408. {
  11409. "lang": "js",
  11410. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  11411. }
  11412. ]
  11413. }
  11414. },
  11415. "/api/command": {
  11416. "get": {
  11417. "tags": ["v2 commands"],
  11418. "operationId": "v2.command.list",
  11419. "parameters": [
  11420. {
  11421. "name": "location",
  11422. "in": "query",
  11423. "schema": {
  11424. "type": "object",
  11425. "properties": {
  11426. "directory": {
  11427. "type": "string"
  11428. },
  11429. "workspace": {
  11430. "type": "string"
  11431. }
  11432. },
  11433. "additionalProperties": false
  11434. },
  11435. "required": false,
  11436. "style": "deepObject",
  11437. "explode": true
  11438. }
  11439. ],
  11440. "security": [],
  11441. "responses": {
  11442. "200": {
  11443. "description": "Success",
  11444. "content": {
  11445. "application/json": {
  11446. "schema": {
  11447. "type": "object",
  11448. "properties": {
  11449. "location": {
  11450. "$ref": "#/components/schemas/LocationInfo"
  11451. },
  11452. "data": {
  11453. "type": "array",
  11454. "items": {
  11455. "$ref": "#/components/schemas/CommandV2Info"
  11456. }
  11457. }
  11458. },
  11459. "required": ["location", "data"],
  11460. "additionalProperties": false
  11461. }
  11462. }
  11463. }
  11464. },
  11465. "400": {
  11466. "description": "InvalidRequestError",
  11467. "content": {
  11468. "application/json": {
  11469. "schema": {
  11470. "$ref": "#/components/schemas/InvalidRequestError"
  11471. }
  11472. }
  11473. }
  11474. },
  11475. "401": {
  11476. "description": "UnauthorizedError",
  11477. "content": {
  11478. "application/json": {
  11479. "schema": {
  11480. "$ref": "#/components/schemas/UnauthorizedError"
  11481. }
  11482. }
  11483. }
  11484. }
  11485. },
  11486. "description": "Retrieve currently registered v2 commands.",
  11487. "summary": "List v2 commands",
  11488. "x-codeSamples": [
  11489. {
  11490. "lang": "js",
  11491. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  11492. }
  11493. ]
  11494. }
  11495. },
  11496. "/api/skill": {
  11497. "get": {
  11498. "tags": ["v2 skills"],
  11499. "operationId": "v2.skill.list",
  11500. "parameters": [
  11501. {
  11502. "name": "location",
  11503. "in": "query",
  11504. "schema": {
  11505. "type": "object",
  11506. "properties": {
  11507. "directory": {
  11508. "type": "string"
  11509. },
  11510. "workspace": {
  11511. "type": "string"
  11512. }
  11513. },
  11514. "additionalProperties": false
  11515. },
  11516. "required": false,
  11517. "style": "deepObject",
  11518. "explode": true
  11519. }
  11520. ],
  11521. "security": [],
  11522. "responses": {
  11523. "200": {
  11524. "description": "Success",
  11525. "content": {
  11526. "application/json": {
  11527. "schema": {
  11528. "type": "object",
  11529. "properties": {
  11530. "location": {
  11531. "$ref": "#/components/schemas/LocationInfo"
  11532. },
  11533. "data": {
  11534. "type": "array",
  11535. "items": {
  11536. "$ref": "#/components/schemas/SkillV2Info"
  11537. }
  11538. }
  11539. },
  11540. "required": ["location", "data"],
  11541. "additionalProperties": false
  11542. }
  11543. }
  11544. }
  11545. },
  11546. "400": {
  11547. "description": "InvalidRequestError",
  11548. "content": {
  11549. "application/json": {
  11550. "schema": {
  11551. "$ref": "#/components/schemas/InvalidRequestError"
  11552. }
  11553. }
  11554. }
  11555. },
  11556. "401": {
  11557. "description": "UnauthorizedError",
  11558. "content": {
  11559. "application/json": {
  11560. "schema": {
  11561. "$ref": "#/components/schemas/UnauthorizedError"
  11562. }
  11563. }
  11564. }
  11565. }
  11566. },
  11567. "description": "Retrieve currently registered v2 skills.",
  11568. "summary": "List v2 skills",
  11569. "x-codeSamples": [
  11570. {
  11571. "lang": "js",
  11572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  11573. }
  11574. ]
  11575. }
  11576. },
  11577. "/api/event": {
  11578. "get": {
  11579. "tags": ["v2 events"],
  11580. "operationId": "v2.event.subscribe",
  11581. "parameters": [
  11582. {
  11583. "name": "location",
  11584. "in": "query",
  11585. "schema": {
  11586. "type": "object",
  11587. "properties": {
  11588. "directory": {
  11589. "type": "string"
  11590. },
  11591. "workspace": {
  11592. "type": "string"
  11593. }
  11594. },
  11595. "additionalProperties": false
  11596. },
  11597. "required": false,
  11598. "style": "deepObject",
  11599. "explode": true
  11600. }
  11601. ],
  11602. "security": [],
  11603. "responses": {
  11604. "200": {
  11605. "description": "Success",
  11606. "content": {
  11607. "text/event-stream": {
  11608. "schema": {
  11609. "type": "string"
  11610. }
  11611. }
  11612. }
  11613. },
  11614. "400": {
  11615. "description": "InvalidRequestError",
  11616. "content": {
  11617. "application/json": {
  11618. "schema": {
  11619. "$ref": "#/components/schemas/InvalidRequestError"
  11620. }
  11621. }
  11622. }
  11623. },
  11624. "401": {
  11625. "description": "UnauthorizedError",
  11626. "content": {
  11627. "application/json": {
  11628. "schema": {
  11629. "$ref": "#/components/schemas/UnauthorizedError"
  11630. }
  11631. }
  11632. }
  11633. }
  11634. },
  11635. "description": "Subscribe to native EventV2 payloads for a location.",
  11636. "summary": "Subscribe to v2 events",
  11637. "x-codeSamples": [
  11638. {
  11639. "lang": "js",
  11640. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  11641. }
  11642. ]
  11643. }
  11644. },
  11645. "/api/question/request": {
  11646. "get": {
  11647. "tags": ["v2 questions"],
  11648. "operationId": "v2.question.request.list",
  11649. "parameters": [
  11650. {
  11651. "name": "location",
  11652. "in": "query",
  11653. "schema": {
  11654. "type": "object",
  11655. "properties": {
  11656. "directory": {
  11657. "type": "string"
  11658. },
  11659. "workspace": {
  11660. "type": "string"
  11661. }
  11662. },
  11663. "additionalProperties": false
  11664. },
  11665. "required": false,
  11666. "style": "deepObject",
  11667. "explode": true
  11668. }
  11669. ],
  11670. "security": [],
  11671. "responses": {
  11672. "200": {
  11673. "description": "Success",
  11674. "content": {
  11675. "application/json": {
  11676. "schema": {
  11677. "type": "object",
  11678. "properties": {
  11679. "location": {
  11680. "$ref": "#/components/schemas/LocationInfo"
  11681. },
  11682. "data": {
  11683. "type": "array",
  11684. "items": {
  11685. "$ref": "#/components/schemas/QuestionV2Request"
  11686. }
  11687. }
  11688. },
  11689. "required": ["location", "data"],
  11690. "additionalProperties": false
  11691. }
  11692. }
  11693. }
  11694. },
  11695. "400": {
  11696. "description": "InvalidRequestError",
  11697. "content": {
  11698. "application/json": {
  11699. "schema": {
  11700. "$ref": "#/components/schemas/InvalidRequestError"
  11701. }
  11702. }
  11703. }
  11704. },
  11705. "401": {
  11706. "description": "UnauthorizedError",
  11707. "content": {
  11708. "application/json": {
  11709. "schema": {
  11710. "$ref": "#/components/schemas/UnauthorizedError"
  11711. }
  11712. }
  11713. }
  11714. }
  11715. },
  11716. "description": "Retrieve pending question requests for a location.",
  11717. "summary": "List pending question requests",
  11718. "x-codeSamples": [
  11719. {
  11720. "lang": "js",
  11721. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  11722. }
  11723. ]
  11724. }
  11725. },
  11726. "/api/session/{sessionID}/question/request/{requestID}/reply": {
  11727. "post": {
  11728. "tags": ["v2 session questions"],
  11729. "operationId": "v2.session.question.reply",
  11730. "parameters": [
  11731. {
  11732. "name": "sessionID",
  11733. "in": "path",
  11734. "schema": {
  11735. "type": "string",
  11736. "pattern": "^ses"
  11737. },
  11738. "required": true
  11739. },
  11740. {
  11741. "name": "requestID",
  11742. "in": "path",
  11743. "schema": {
  11744. "type": "string",
  11745. "pattern": "^que"
  11746. },
  11747. "required": true
  11748. }
  11749. ],
  11750. "security": [],
  11751. "responses": {
  11752. "204": {
  11753. "description": "<No Content>"
  11754. },
  11755. "400": {
  11756. "description": "InvalidRequestError",
  11757. "content": {
  11758. "application/json": {
  11759. "schema": {
  11760. "$ref": "#/components/schemas/InvalidRequestError"
  11761. }
  11762. }
  11763. }
  11764. },
  11765. "401": {
  11766. "description": "UnauthorizedError",
  11767. "content": {
  11768. "application/json": {
  11769. "schema": {
  11770. "$ref": "#/components/schemas/UnauthorizedError"
  11771. }
  11772. }
  11773. }
  11774. },
  11775. "404": {
  11776. "description": "SessionNotFoundError | QuestionNotFoundError",
  11777. "content": {
  11778. "application/json": {
  11779. "schema": {
  11780. "anyOf": [
  11781. {
  11782. "$ref": "#/components/schemas/SessionNotFoundError"
  11783. },
  11784. {
  11785. "$ref": "#/components/schemas/QuestionNotFoundError"
  11786. }
  11787. ]
  11788. }
  11789. }
  11790. }
  11791. }
  11792. },
  11793. "description": "Answer a pending question request owned by a session.",
  11794. "summary": "Reply to pending question request",
  11795. "requestBody": {
  11796. "content": {
  11797. "application/json": {
  11798. "schema": {
  11799. "$ref": "#/components/schemas/QuestionV2Reply"
  11800. }
  11801. }
  11802. },
  11803. "required": true
  11804. },
  11805. "x-codeSamples": [
  11806. {
  11807. "lang": "js",
  11808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  11809. }
  11810. ]
  11811. }
  11812. },
  11813. "/api/session/{sessionID}/question/request/{requestID}/reject": {
  11814. "post": {
  11815. "tags": ["v2 session questions"],
  11816. "operationId": "v2.session.question.reject",
  11817. "parameters": [
  11818. {
  11819. "name": "sessionID",
  11820. "in": "path",
  11821. "schema": {
  11822. "type": "string",
  11823. "pattern": "^ses"
  11824. },
  11825. "required": true
  11826. },
  11827. {
  11828. "name": "requestID",
  11829. "in": "path",
  11830. "schema": {
  11831. "type": "string",
  11832. "pattern": "^que"
  11833. },
  11834. "required": true
  11835. }
  11836. ],
  11837. "security": [],
  11838. "responses": {
  11839. "204": {
  11840. "description": "<No Content>"
  11841. },
  11842. "400": {
  11843. "description": "InvalidRequestError",
  11844. "content": {
  11845. "application/json": {
  11846. "schema": {
  11847. "$ref": "#/components/schemas/InvalidRequestError"
  11848. }
  11849. }
  11850. }
  11851. },
  11852. "401": {
  11853. "description": "UnauthorizedError",
  11854. "content": {
  11855. "application/json": {
  11856. "schema": {
  11857. "$ref": "#/components/schemas/UnauthorizedError"
  11858. }
  11859. }
  11860. }
  11861. },
  11862. "404": {
  11863. "description": "SessionNotFoundError | QuestionNotFoundError",
  11864. "content": {
  11865. "application/json": {
  11866. "schema": {
  11867. "anyOf": [
  11868. {
  11869. "$ref": "#/components/schemas/SessionNotFoundError"
  11870. },
  11871. {
  11872. "$ref": "#/components/schemas/QuestionNotFoundError"
  11873. }
  11874. ]
  11875. }
  11876. }
  11877. }
  11878. }
  11879. },
  11880. "description": "Reject a pending question request owned by a session.",
  11881. "summary": "Reject pending question request",
  11882. "x-codeSamples": [
  11883. {
  11884. "lang": "js",
  11885. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  11886. }
  11887. ]
  11888. }
  11889. },
  11890. "/pty/{ptyID}/connect": {
  11891. "get": {
  11892. "tags": ["pty"],
  11893. "operationId": "pty.connect",
  11894. "parameters": [
  11895. {
  11896. "name": "ptyID",
  11897. "in": "path",
  11898. "schema": {
  11899. "type": "string",
  11900. "pattern": "^pty"
  11901. },
  11902. "required": true
  11903. },
  11904. {
  11905. "in": "query",
  11906. "name": "directory",
  11907. "schema": {
  11908. "type": "string"
  11909. }
  11910. },
  11911. {
  11912. "in": "query",
  11913. "name": "workspace",
  11914. "schema": {
  11915. "type": "string"
  11916. }
  11917. },
  11918. {
  11919. "in": "query",
  11920. "name": "cursor",
  11921. "schema": {
  11922. "type": "string"
  11923. }
  11924. },
  11925. {
  11926. "in": "query",
  11927. "name": "ticket",
  11928. "schema": {
  11929. "type": "string"
  11930. }
  11931. }
  11932. ],
  11933. "responses": {
  11934. "200": {
  11935. "description": "Connected session",
  11936. "content": {
  11937. "application/json": {
  11938. "schema": {
  11939. "type": "boolean",
  11940. "description": "Connected session"
  11941. }
  11942. }
  11943. }
  11944. },
  11945. "403": {
  11946. "description": "Forbidden",
  11947. "content": {
  11948. "application/json": {
  11949. "schema": {
  11950. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  11951. }
  11952. }
  11953. }
  11954. },
  11955. "404": {
  11956. "description": "Not found",
  11957. "content": {
  11958. "application/json": {
  11959. "schema": {
  11960. "$ref": "#/components/schemas/NotFoundError"
  11961. }
  11962. }
  11963. }
  11964. }
  11965. },
  11966. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  11967. "summary": "Connect to PTY session",
  11968. "x-codeSamples": [
  11969. {
  11970. "lang": "js",
  11971. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  11972. }
  11973. ]
  11974. }
  11975. }
  11976. },
  11977. "components": {
  11978. "schemas": {
  11979. "Event": {
  11980. "anyOf": [
  11981. {
  11982. "$ref": "#/components/schemas/EventModels-devRefreshed"
  11983. },
  11984. {
  11985. "$ref": "#/components/schemas/EventPluginAdded"
  11986. },
  11987. {
  11988. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  11989. },
  11990. {
  11991. "$ref": "#/components/schemas/EventSessionCreated"
  11992. },
  11993. {
  11994. "$ref": "#/components/schemas/EventSessionUpdated"
  11995. },
  11996. {
  11997. "$ref": "#/components/schemas/EventSessionDeleted"
  11998. },
  11999. {
  12000. "$ref": "#/components/schemas/EventMessageUpdated"
  12001. },
  12002. {
  12003. "$ref": "#/components/schemas/EventMessageRemoved"
  12004. },
  12005. {
  12006. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12007. },
  12008. {
  12009. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12010. },
  12011. {
  12012. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12013. },
  12014. {
  12015. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12016. },
  12017. {
  12018. "$ref": "#/components/schemas/EventSessionNextMoved"
  12019. },
  12020. {
  12021. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12022. },
  12023. {
  12024. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  12025. },
  12026. {
  12027. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  12028. },
  12029. {
  12030. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  12031. },
  12032. {
  12033. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12034. },
  12035. {
  12036. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12037. },
  12038. {
  12039. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12040. },
  12041. {
  12042. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12043. },
  12044. {
  12045. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12046. },
  12047. {
  12048. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12049. },
  12050. {
  12051. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12052. },
  12053. {
  12054. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12055. },
  12056. {
  12057. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12058. },
  12059. {
  12060. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12061. },
  12062. {
  12063. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12064. },
  12065. {
  12066. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12067. },
  12068. {
  12069. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12070. },
  12071. {
  12072. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12073. },
  12074. {
  12075. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12076. },
  12077. {
  12078. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12079. },
  12080. {
  12081. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12082. },
  12083. {
  12084. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12085. },
  12086. {
  12087. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12088. },
  12089. {
  12090. "$ref": "#/components/schemas/EventSessionNextRetried"
  12091. },
  12092. {
  12093. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12094. },
  12095. {
  12096. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12097. },
  12098. {
  12099. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12100. },
  12101. {
  12102. "$ref": "#/components/schemas/EventMessagePartDelta"
  12103. },
  12104. {
  12105. "$ref": "#/components/schemas/EventSessionDiff"
  12106. },
  12107. {
  12108. "$ref": "#/components/schemas/EventSessionError"
  12109. },
  12110. {
  12111. "$ref": "#/components/schemas/EventInstallationUpdated"
  12112. },
  12113. {
  12114. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12115. },
  12116. {
  12117. "$ref": "#/components/schemas/EventFileEdited"
  12118. },
  12119. {
  12120. "$ref": "#/components/schemas/EventAccountAdded"
  12121. },
  12122. {
  12123. "$ref": "#/components/schemas/EventAccountRemoved"
  12124. },
  12125. {
  12126. "$ref": "#/components/schemas/EventAccountSwitched"
  12127. },
  12128. {
  12129. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12130. },
  12131. {
  12132. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12133. },
  12134. {
  12135. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12136. },
  12137. {
  12138. "$ref": "#/components/schemas/EventPtyCreated"
  12139. },
  12140. {
  12141. "$ref": "#/components/schemas/EventPtyUpdated"
  12142. },
  12143. {
  12144. "$ref": "#/components/schemas/EventPtyExited"
  12145. },
  12146. {
  12147. "$ref": "#/components/schemas/EventPtyDeleted"
  12148. },
  12149. {
  12150. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12151. },
  12152. {
  12153. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12154. },
  12155. {
  12156. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12157. },
  12158. {
  12159. "$ref": "#/components/schemas/EventTodoUpdated"
  12160. },
  12161. {
  12162. "$ref": "#/components/schemas/EventLspUpdated"
  12163. },
  12164. {
  12165. "$ref": "#/components/schemas/EventPermissionAsked"
  12166. },
  12167. {
  12168. "$ref": "#/components/schemas/EventPermissionReplied"
  12169. },
  12170. {
  12171. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12172. },
  12173. {
  12174. "$ref": "#/components/schemas/Event.tui.command.execute"
  12175. },
  12176. {
  12177. "$ref": "#/components/schemas/Event.tui.toast.show"
  12178. },
  12179. {
  12180. "$ref": "#/components/schemas/Event.tui.session.select"
  12181. },
  12182. {
  12183. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12184. },
  12185. {
  12186. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12187. },
  12188. {
  12189. "$ref": "#/components/schemas/EventCommandExecuted"
  12190. },
  12191. {
  12192. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12193. },
  12194. {
  12195. "$ref": "#/components/schemas/EventProjectUpdated"
  12196. },
  12197. {
  12198. "$ref": "#/components/schemas/EventQuestionAsked"
  12199. },
  12200. {
  12201. "$ref": "#/components/schemas/EventQuestionReplied"
  12202. },
  12203. {
  12204. "$ref": "#/components/schemas/EventQuestionRejected"
  12205. },
  12206. {
  12207. "$ref": "#/components/schemas/EventSessionStatus"
  12208. },
  12209. {
  12210. "$ref": "#/components/schemas/EventSessionIdle"
  12211. },
  12212. {
  12213. "$ref": "#/components/schemas/EventSessionCompacted"
  12214. },
  12215. {
  12216. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12217. },
  12218. {
  12219. "$ref": "#/components/schemas/EventWorktreeReady"
  12220. },
  12221. {
  12222. "$ref": "#/components/schemas/EventWorktreeFailed"
  12223. },
  12224. {
  12225. "$ref": "#/components/schemas/EventWorkspaceReady"
  12226. },
  12227. {
  12228. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12229. },
  12230. {
  12231. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12232. },
  12233. {
  12234. "$ref": "#/components/schemas/EventServerConnected"
  12235. },
  12236. {
  12237. "$ref": "#/components/schemas/EventGlobalDisposed"
  12238. },
  12239. {
  12240. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12241. }
  12242. ]
  12243. },
  12244. "QuestionReplied": {
  12245. "type": "object",
  12246. "properties": {
  12247. "sessionID": {
  12248. "type": "string",
  12249. "pattern": "^ses"
  12250. },
  12251. "requestID": {
  12252. "type": "string",
  12253. "pattern": "^que"
  12254. },
  12255. "answers": {
  12256. "type": "array",
  12257. "items": {
  12258. "$ref": "#/components/schemas/QuestionAnswer"
  12259. }
  12260. }
  12261. },
  12262. "required": ["sessionID", "requestID", "answers"],
  12263. "additionalProperties": false
  12264. },
  12265. "QuestionRejected": {
  12266. "type": "object",
  12267. "properties": {
  12268. "sessionID": {
  12269. "type": "string",
  12270. "pattern": "^ses"
  12271. },
  12272. "requestID": {
  12273. "type": "string",
  12274. "pattern": "^que"
  12275. }
  12276. },
  12277. "required": ["sessionID", "requestID"],
  12278. "additionalProperties": false
  12279. },
  12280. "OAuth": {
  12281. "type": "object",
  12282. "properties": {
  12283. "type": {
  12284. "type": "string",
  12285. "enum": ["oauth"]
  12286. },
  12287. "refresh": {
  12288. "type": "string"
  12289. },
  12290. "access": {
  12291. "type": "string"
  12292. },
  12293. "expires": {
  12294. "type": "integer",
  12295. "minimum": 0
  12296. },
  12297. "accountId": {
  12298. "type": "string"
  12299. },
  12300. "enterpriseUrl": {
  12301. "type": "string"
  12302. }
  12303. },
  12304. "required": ["type", "refresh", "access", "expires"],
  12305. "additionalProperties": false
  12306. },
  12307. "ApiAuth": {
  12308. "type": "object",
  12309. "properties": {
  12310. "type": {
  12311. "type": "string",
  12312. "enum": ["api"]
  12313. },
  12314. "key": {
  12315. "type": "string"
  12316. },
  12317. "metadata": {
  12318. "type": "object",
  12319. "additionalProperties": {
  12320. "type": "string"
  12321. }
  12322. }
  12323. },
  12324. "required": ["type", "key"],
  12325. "additionalProperties": false
  12326. },
  12327. "WellKnownAuth": {
  12328. "type": "object",
  12329. "properties": {
  12330. "type": {
  12331. "type": "string",
  12332. "enum": ["wellknown"]
  12333. },
  12334. "key": {
  12335. "type": "string"
  12336. },
  12337. "token": {
  12338. "type": "string"
  12339. }
  12340. },
  12341. "required": ["type", "key", "token"],
  12342. "additionalProperties": false
  12343. },
  12344. "Auth": {
  12345. "anyOf": [
  12346. {
  12347. "$ref": "#/components/schemas/OAuth"
  12348. },
  12349. {
  12350. "$ref": "#/components/schemas/ApiAuth"
  12351. },
  12352. {
  12353. "$ref": "#/components/schemas/WellKnownAuth"
  12354. }
  12355. ]
  12356. },
  12357. "effect_HttpApiError_BadRequest": {
  12358. "type": "object",
  12359. "properties": {
  12360. "_tag": {
  12361. "type": "string",
  12362. "enum": ["BadRequest"]
  12363. }
  12364. },
  12365. "required": ["_tag"],
  12366. "additionalProperties": false
  12367. },
  12368. "InvalidRequestError": {
  12369. "type": "object",
  12370. "properties": {
  12371. "_tag": {
  12372. "type": "string",
  12373. "enum": ["InvalidRequestError"]
  12374. },
  12375. "message": {
  12376. "type": "string"
  12377. },
  12378. "kind": {
  12379. "type": "string"
  12380. },
  12381. "field": {
  12382. "type": "string"
  12383. }
  12384. },
  12385. "required": ["_tag", "message"],
  12386. "additionalProperties": false
  12387. },
  12388. "MoveSessionError": {
  12389. "type": "object",
  12390. "properties": {
  12391. "name": {
  12392. "type": "string",
  12393. "enum": ["MoveSessionError"]
  12394. },
  12395. "data": {
  12396. "type": "object",
  12397. "properties": {
  12398. "message": {
  12399. "type": "string"
  12400. }
  12401. },
  12402. "required": ["message"],
  12403. "additionalProperties": false
  12404. }
  12405. },
  12406. "required": ["name", "data"],
  12407. "additionalProperties": false
  12408. },
  12409. "SnapshotFileDiff": {
  12410. "type": "object",
  12411. "properties": {
  12412. "file": {
  12413. "type": "string"
  12414. },
  12415. "patch": {
  12416. "type": "string"
  12417. },
  12418. "additions": {
  12419. "type": "number"
  12420. },
  12421. "deletions": {
  12422. "type": "number"
  12423. },
  12424. "status": {
  12425. "type": "string",
  12426. "enum": ["added", "deleted", "modified"]
  12427. }
  12428. },
  12429. "required": ["additions", "deletions"],
  12430. "additionalProperties": false
  12431. },
  12432. "PermissionAction": {
  12433. "type": "string",
  12434. "enum": ["allow", "deny", "ask"]
  12435. },
  12436. "PermissionRule": {
  12437. "type": "object",
  12438. "properties": {
  12439. "permission": {
  12440. "type": "string"
  12441. },
  12442. "pattern": {
  12443. "type": "string"
  12444. },
  12445. "action": {
  12446. "$ref": "#/components/schemas/PermissionAction"
  12447. }
  12448. },
  12449. "required": ["permission", "pattern", "action"],
  12450. "additionalProperties": false
  12451. },
  12452. "PermissionRuleset": {
  12453. "type": "array",
  12454. "items": {
  12455. "$ref": "#/components/schemas/PermissionRule"
  12456. }
  12457. },
  12458. "Session": {
  12459. "type": "object",
  12460. "properties": {
  12461. "id": {
  12462. "type": "string",
  12463. "pattern": "^ses"
  12464. },
  12465. "slug": {
  12466. "type": "string"
  12467. },
  12468. "projectID": {
  12469. "type": "string"
  12470. },
  12471. "workspaceID": {
  12472. "type": "string",
  12473. "pattern": "^wrk"
  12474. },
  12475. "directory": {
  12476. "type": "string"
  12477. },
  12478. "path": {
  12479. "type": "string"
  12480. },
  12481. "parentID": {
  12482. "type": "string",
  12483. "pattern": "^ses"
  12484. },
  12485. "summary": {
  12486. "type": "object",
  12487. "properties": {
  12488. "additions": {
  12489. "type": "number"
  12490. },
  12491. "deletions": {
  12492. "type": "number"
  12493. },
  12494. "files": {
  12495. "type": "number"
  12496. },
  12497. "diffs": {
  12498. "type": "array",
  12499. "items": {
  12500. "$ref": "#/components/schemas/SnapshotFileDiff"
  12501. }
  12502. }
  12503. },
  12504. "required": ["additions", "deletions", "files"],
  12505. "additionalProperties": false
  12506. },
  12507. "cost": {
  12508. "type": "number"
  12509. },
  12510. "tokens": {
  12511. "type": "object",
  12512. "properties": {
  12513. "input": {
  12514. "type": "number"
  12515. },
  12516. "output": {
  12517. "type": "number"
  12518. },
  12519. "reasoning": {
  12520. "type": "number"
  12521. },
  12522. "cache": {
  12523. "type": "object",
  12524. "properties": {
  12525. "read": {
  12526. "type": "number"
  12527. },
  12528. "write": {
  12529. "type": "number"
  12530. }
  12531. },
  12532. "required": ["read", "write"],
  12533. "additionalProperties": false
  12534. }
  12535. },
  12536. "required": ["input", "output", "reasoning", "cache"],
  12537. "additionalProperties": false
  12538. },
  12539. "share": {
  12540. "type": "object",
  12541. "properties": {
  12542. "url": {
  12543. "type": "string"
  12544. }
  12545. },
  12546. "required": ["url"],
  12547. "additionalProperties": false
  12548. },
  12549. "title": {
  12550. "type": "string"
  12551. },
  12552. "agent": {
  12553. "type": "string"
  12554. },
  12555. "model": {
  12556. "type": "object",
  12557. "properties": {
  12558. "id": {
  12559. "type": "string"
  12560. },
  12561. "providerID": {
  12562. "type": "string"
  12563. },
  12564. "variant": {
  12565. "type": "string"
  12566. }
  12567. },
  12568. "required": ["id", "providerID"],
  12569. "additionalProperties": false
  12570. },
  12571. "version": {
  12572. "type": "string"
  12573. },
  12574. "metadata": {
  12575. "type": "object"
  12576. },
  12577. "time": {
  12578. "type": "object",
  12579. "properties": {
  12580. "created": {
  12581. "type": "integer",
  12582. "minimum": 0
  12583. },
  12584. "updated": {
  12585. "type": "integer",
  12586. "minimum": 0
  12587. },
  12588. "compacting": {
  12589. "type": "integer",
  12590. "minimum": 0
  12591. },
  12592. "archived": {
  12593. "type": "number"
  12594. }
  12595. },
  12596. "required": ["created", "updated"],
  12597. "additionalProperties": false
  12598. },
  12599. "permission": {
  12600. "$ref": "#/components/schemas/PermissionRuleset"
  12601. },
  12602. "revert": {
  12603. "type": "object",
  12604. "properties": {
  12605. "messageID": {
  12606. "type": "string",
  12607. "pattern": "^msg"
  12608. },
  12609. "partID": {
  12610. "type": "string",
  12611. "pattern": "^prt"
  12612. },
  12613. "snapshot": {
  12614. "type": "string"
  12615. },
  12616. "diff": {
  12617. "type": "string"
  12618. }
  12619. },
  12620. "required": ["messageID"],
  12621. "additionalProperties": false
  12622. }
  12623. },
  12624. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12625. "additionalProperties": false
  12626. },
  12627. "OutputFormatText": {
  12628. "type": "object",
  12629. "properties": {
  12630. "type": {
  12631. "type": "string",
  12632. "enum": ["text"]
  12633. }
  12634. },
  12635. "required": ["type"],
  12636. "additionalProperties": false
  12637. },
  12638. "JSONSchema": {
  12639. "type": "object"
  12640. },
  12641. "OutputFormatJsonSchema": {
  12642. "type": "object",
  12643. "properties": {
  12644. "type": {
  12645. "type": "string",
  12646. "enum": ["json_schema"]
  12647. },
  12648. "schema": {
  12649. "$ref": "#/components/schemas/JSONSchema"
  12650. },
  12651. "retryCount": {
  12652. "type": "integer",
  12653. "minimum": 0
  12654. }
  12655. },
  12656. "required": ["type", "schema"],
  12657. "additionalProperties": false
  12658. },
  12659. "OutputFormat": {
  12660. "anyOf": [
  12661. {
  12662. "$ref": "#/components/schemas/OutputFormatText"
  12663. },
  12664. {
  12665. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  12666. }
  12667. ]
  12668. },
  12669. "UserMessage": {
  12670. "type": "object",
  12671. "properties": {
  12672. "id": {
  12673. "type": "string",
  12674. "pattern": "^msg"
  12675. },
  12676. "sessionID": {
  12677. "type": "string",
  12678. "pattern": "^ses"
  12679. },
  12680. "role": {
  12681. "type": "string",
  12682. "enum": ["user"]
  12683. },
  12684. "time": {
  12685. "type": "object",
  12686. "properties": {
  12687. "created": {
  12688. "type": "number",
  12689. "minimum": 0
  12690. }
  12691. },
  12692. "required": ["created"],
  12693. "additionalProperties": false
  12694. },
  12695. "format": {
  12696. "$ref": "#/components/schemas/OutputFormat"
  12697. },
  12698. "summary": {
  12699. "type": "object",
  12700. "properties": {
  12701. "title": {
  12702. "type": "string"
  12703. },
  12704. "body": {
  12705. "type": "string"
  12706. },
  12707. "diffs": {
  12708. "type": "array",
  12709. "items": {
  12710. "$ref": "#/components/schemas/SnapshotFileDiff"
  12711. }
  12712. }
  12713. },
  12714. "required": ["diffs"],
  12715. "additionalProperties": false
  12716. },
  12717. "agent": {
  12718. "type": "string"
  12719. },
  12720. "model": {
  12721. "type": "object",
  12722. "properties": {
  12723. "providerID": {
  12724. "type": "string"
  12725. },
  12726. "modelID": {
  12727. "type": "string"
  12728. },
  12729. "variant": {
  12730. "type": "string"
  12731. }
  12732. },
  12733. "required": ["providerID", "modelID"],
  12734. "additionalProperties": false
  12735. },
  12736. "system": {
  12737. "type": "string"
  12738. },
  12739. "tools": {
  12740. "type": "object",
  12741. "additionalProperties": {
  12742. "type": "boolean"
  12743. }
  12744. }
  12745. },
  12746. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  12747. "additionalProperties": false
  12748. },
  12749. "ProviderAuthError": {
  12750. "type": "object",
  12751. "properties": {
  12752. "name": {
  12753. "type": "string",
  12754. "enum": ["ProviderAuthError"]
  12755. },
  12756. "data": {
  12757. "type": "object",
  12758. "properties": {
  12759. "providerID": {
  12760. "type": "string"
  12761. },
  12762. "message": {
  12763. "type": "string"
  12764. }
  12765. },
  12766. "required": ["providerID", "message"],
  12767. "additionalProperties": false
  12768. }
  12769. },
  12770. "required": ["name", "data"],
  12771. "additionalProperties": false
  12772. },
  12773. "UnknownError": {
  12774. "type": "object",
  12775. "properties": {
  12776. "name": {
  12777. "type": "string",
  12778. "enum": ["UnknownError"]
  12779. },
  12780. "data": {
  12781. "type": "object",
  12782. "properties": {
  12783. "message": {
  12784. "type": "string"
  12785. },
  12786. "ref": {
  12787. "type": "string"
  12788. }
  12789. },
  12790. "required": ["message"],
  12791. "additionalProperties": false
  12792. }
  12793. },
  12794. "required": ["name", "data"],
  12795. "additionalProperties": false
  12796. },
  12797. "MessageOutputLengthError": {
  12798. "type": "object",
  12799. "properties": {
  12800. "name": {
  12801. "type": "string",
  12802. "enum": ["MessageOutputLengthError"]
  12803. },
  12804. "data": {
  12805. "type": "object",
  12806. "properties": {}
  12807. }
  12808. },
  12809. "required": ["name", "data"],
  12810. "additionalProperties": false
  12811. },
  12812. "MessageAbortedError": {
  12813. "type": "object",
  12814. "properties": {
  12815. "name": {
  12816. "type": "string",
  12817. "enum": ["MessageAbortedError"]
  12818. },
  12819. "data": {
  12820. "type": "object",
  12821. "properties": {
  12822. "message": {
  12823. "type": "string"
  12824. }
  12825. },
  12826. "required": ["message"],
  12827. "additionalProperties": false
  12828. }
  12829. },
  12830. "required": ["name", "data"],
  12831. "additionalProperties": false
  12832. },
  12833. "StructuredOutputError": {
  12834. "type": "object",
  12835. "properties": {
  12836. "name": {
  12837. "type": "string",
  12838. "enum": ["StructuredOutputError"]
  12839. },
  12840. "data": {
  12841. "type": "object",
  12842. "properties": {
  12843. "message": {
  12844. "type": "string"
  12845. },
  12846. "retries": {
  12847. "type": "integer",
  12848. "minimum": 0
  12849. }
  12850. },
  12851. "required": ["message", "retries"],
  12852. "additionalProperties": false
  12853. }
  12854. },
  12855. "required": ["name", "data"],
  12856. "additionalProperties": false
  12857. },
  12858. "ContextOverflowError": {
  12859. "type": "object",
  12860. "properties": {
  12861. "name": {
  12862. "type": "string",
  12863. "enum": ["ContextOverflowError"]
  12864. },
  12865. "data": {
  12866. "type": "object",
  12867. "properties": {
  12868. "message": {
  12869. "type": "string"
  12870. },
  12871. "responseBody": {
  12872. "type": "string"
  12873. }
  12874. },
  12875. "required": ["message"],
  12876. "additionalProperties": false
  12877. }
  12878. },
  12879. "required": ["name", "data"],
  12880. "additionalProperties": false
  12881. },
  12882. "APIError": {
  12883. "type": "object",
  12884. "properties": {
  12885. "name": {
  12886. "type": "string",
  12887. "enum": ["APIError"]
  12888. },
  12889. "data": {
  12890. "type": "object",
  12891. "properties": {
  12892. "message": {
  12893. "type": "string"
  12894. },
  12895. "statusCode": {
  12896. "type": "integer",
  12897. "minimum": 0
  12898. },
  12899. "isRetryable": {
  12900. "type": "boolean"
  12901. },
  12902. "responseHeaders": {
  12903. "type": "object",
  12904. "additionalProperties": {
  12905. "type": "string"
  12906. }
  12907. },
  12908. "responseBody": {
  12909. "type": "string"
  12910. },
  12911. "metadata": {
  12912. "type": "object",
  12913. "additionalProperties": {
  12914. "type": "string"
  12915. }
  12916. }
  12917. },
  12918. "required": ["message", "isRetryable"],
  12919. "additionalProperties": false
  12920. }
  12921. },
  12922. "required": ["name", "data"],
  12923. "additionalProperties": false
  12924. },
  12925. "AssistantMessage": {
  12926. "type": "object",
  12927. "properties": {
  12928. "id": {
  12929. "type": "string",
  12930. "pattern": "^msg"
  12931. },
  12932. "sessionID": {
  12933. "type": "string",
  12934. "pattern": "^ses"
  12935. },
  12936. "role": {
  12937. "type": "string",
  12938. "enum": ["assistant"]
  12939. },
  12940. "time": {
  12941. "type": "object",
  12942. "properties": {
  12943. "created": {
  12944. "type": "integer",
  12945. "minimum": 0
  12946. },
  12947. "completed": {
  12948. "type": "integer",
  12949. "minimum": 0
  12950. }
  12951. },
  12952. "required": ["created"],
  12953. "additionalProperties": false
  12954. },
  12955. "error": {
  12956. "anyOf": [
  12957. {
  12958. "$ref": "#/components/schemas/ProviderAuthError"
  12959. },
  12960. {
  12961. "$ref": "#/components/schemas/UnknownError"
  12962. },
  12963. {
  12964. "$ref": "#/components/schemas/MessageOutputLengthError"
  12965. },
  12966. {
  12967. "$ref": "#/components/schemas/MessageAbortedError"
  12968. },
  12969. {
  12970. "$ref": "#/components/schemas/StructuredOutputError"
  12971. },
  12972. {
  12973. "$ref": "#/components/schemas/ContextOverflowError"
  12974. },
  12975. {
  12976. "$ref": "#/components/schemas/APIError"
  12977. }
  12978. ]
  12979. },
  12980. "parentID": {
  12981. "type": "string",
  12982. "pattern": "^msg"
  12983. },
  12984. "modelID": {
  12985. "type": "string"
  12986. },
  12987. "providerID": {
  12988. "type": "string"
  12989. },
  12990. "mode": {
  12991. "type": "string"
  12992. },
  12993. "agent": {
  12994. "type": "string"
  12995. },
  12996. "path": {
  12997. "type": "object",
  12998. "properties": {
  12999. "cwd": {
  13000. "type": "string"
  13001. },
  13002. "root": {
  13003. "type": "string"
  13004. }
  13005. },
  13006. "required": ["cwd", "root"],
  13007. "additionalProperties": false
  13008. },
  13009. "summary": {
  13010. "type": "boolean"
  13011. },
  13012. "cost": {
  13013. "type": "number"
  13014. },
  13015. "tokens": {
  13016. "type": "object",
  13017. "properties": {
  13018. "total": {
  13019. "type": "number"
  13020. },
  13021. "input": {
  13022. "type": "number"
  13023. },
  13024. "output": {
  13025. "type": "number"
  13026. },
  13027. "reasoning": {
  13028. "type": "number"
  13029. },
  13030. "cache": {
  13031. "type": "object",
  13032. "properties": {
  13033. "read": {
  13034. "type": "number"
  13035. },
  13036. "write": {
  13037. "type": "number"
  13038. }
  13039. },
  13040. "required": ["read", "write"],
  13041. "additionalProperties": false
  13042. }
  13043. },
  13044. "required": ["input", "output", "reasoning", "cache"],
  13045. "additionalProperties": false
  13046. },
  13047. "structured": {},
  13048. "variant": {
  13049. "type": "string"
  13050. },
  13051. "finish": {
  13052. "type": "string"
  13053. }
  13054. },
  13055. "required": [
  13056. "id",
  13057. "sessionID",
  13058. "role",
  13059. "time",
  13060. "parentID",
  13061. "modelID",
  13062. "providerID",
  13063. "mode",
  13064. "agent",
  13065. "path",
  13066. "cost",
  13067. "tokens"
  13068. ],
  13069. "additionalProperties": false
  13070. },
  13071. "Message": {
  13072. "anyOf": [
  13073. {
  13074. "$ref": "#/components/schemas/UserMessage"
  13075. },
  13076. {
  13077. "$ref": "#/components/schemas/AssistantMessage"
  13078. }
  13079. ]
  13080. },
  13081. "TextPart": {
  13082. "type": "object",
  13083. "properties": {
  13084. "id": {
  13085. "type": "string",
  13086. "pattern": "^prt"
  13087. },
  13088. "sessionID": {
  13089. "type": "string",
  13090. "pattern": "^ses"
  13091. },
  13092. "messageID": {
  13093. "type": "string",
  13094. "pattern": "^msg"
  13095. },
  13096. "type": {
  13097. "type": "string",
  13098. "enum": ["text"]
  13099. },
  13100. "text": {
  13101. "type": "string"
  13102. },
  13103. "synthetic": {
  13104. "type": "boolean"
  13105. },
  13106. "ignored": {
  13107. "type": "boolean"
  13108. },
  13109. "time": {
  13110. "type": "object",
  13111. "properties": {
  13112. "start": {
  13113. "type": "integer",
  13114. "minimum": 0
  13115. },
  13116. "end": {
  13117. "type": "integer",
  13118. "minimum": 0
  13119. }
  13120. },
  13121. "required": ["start"],
  13122. "additionalProperties": false
  13123. },
  13124. "metadata": {
  13125. "type": "object"
  13126. }
  13127. },
  13128. "required": ["id", "sessionID", "messageID", "type", "text"],
  13129. "additionalProperties": false
  13130. },
  13131. "SubtaskPart": {
  13132. "type": "object",
  13133. "properties": {
  13134. "id": {
  13135. "type": "string",
  13136. "pattern": "^prt"
  13137. },
  13138. "sessionID": {
  13139. "type": "string",
  13140. "pattern": "^ses"
  13141. },
  13142. "messageID": {
  13143. "type": "string",
  13144. "pattern": "^msg"
  13145. },
  13146. "type": {
  13147. "type": "string",
  13148. "enum": ["subtask"]
  13149. },
  13150. "prompt": {
  13151. "type": "string"
  13152. },
  13153. "description": {
  13154. "type": "string"
  13155. },
  13156. "agent": {
  13157. "type": "string"
  13158. },
  13159. "model": {
  13160. "type": "object",
  13161. "properties": {
  13162. "providerID": {
  13163. "type": "string"
  13164. },
  13165. "modelID": {
  13166. "type": "string"
  13167. }
  13168. },
  13169. "required": ["providerID", "modelID"],
  13170. "additionalProperties": false
  13171. },
  13172. "command": {
  13173. "type": "string"
  13174. }
  13175. },
  13176. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13177. "additionalProperties": false
  13178. },
  13179. "ReasoningPart": {
  13180. "type": "object",
  13181. "properties": {
  13182. "id": {
  13183. "type": "string",
  13184. "pattern": "^prt"
  13185. },
  13186. "sessionID": {
  13187. "type": "string",
  13188. "pattern": "^ses"
  13189. },
  13190. "messageID": {
  13191. "type": "string",
  13192. "pattern": "^msg"
  13193. },
  13194. "type": {
  13195. "type": "string",
  13196. "enum": ["reasoning"]
  13197. },
  13198. "text": {
  13199. "type": "string"
  13200. },
  13201. "metadata": {
  13202. "type": "object"
  13203. },
  13204. "time": {
  13205. "type": "object",
  13206. "properties": {
  13207. "start": {
  13208. "type": "integer",
  13209. "minimum": 0
  13210. },
  13211. "end": {
  13212. "type": "integer",
  13213. "minimum": 0
  13214. }
  13215. },
  13216. "required": ["start"],
  13217. "additionalProperties": false
  13218. }
  13219. },
  13220. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13221. "additionalProperties": false
  13222. },
  13223. "FilePartSourceText": {
  13224. "type": "object",
  13225. "properties": {
  13226. "value": {
  13227. "type": "string"
  13228. },
  13229. "start": {
  13230. "type": "number"
  13231. },
  13232. "end": {
  13233. "type": "number"
  13234. }
  13235. },
  13236. "required": ["value", "start", "end"],
  13237. "additionalProperties": false
  13238. },
  13239. "FileSource": {
  13240. "type": "object",
  13241. "properties": {
  13242. "text": {
  13243. "$ref": "#/components/schemas/FilePartSourceText"
  13244. },
  13245. "type": {
  13246. "type": "string",
  13247. "enum": ["file"]
  13248. },
  13249. "path": {
  13250. "type": "string"
  13251. }
  13252. },
  13253. "required": ["text", "type", "path"],
  13254. "additionalProperties": false
  13255. },
  13256. "Range": {
  13257. "type": "object",
  13258. "properties": {
  13259. "start": {
  13260. "type": "object",
  13261. "properties": {
  13262. "line": {
  13263. "type": "integer",
  13264. "minimum": 0
  13265. },
  13266. "character": {
  13267. "type": "integer",
  13268. "minimum": 0
  13269. }
  13270. },
  13271. "required": ["line", "character"],
  13272. "additionalProperties": false
  13273. },
  13274. "end": {
  13275. "type": "object",
  13276. "properties": {
  13277. "line": {
  13278. "type": "integer",
  13279. "minimum": 0
  13280. },
  13281. "character": {
  13282. "type": "integer",
  13283. "minimum": 0
  13284. }
  13285. },
  13286. "required": ["line", "character"],
  13287. "additionalProperties": false
  13288. }
  13289. },
  13290. "required": ["start", "end"],
  13291. "additionalProperties": false
  13292. },
  13293. "SymbolSource": {
  13294. "type": "object",
  13295. "properties": {
  13296. "text": {
  13297. "$ref": "#/components/schemas/FilePartSourceText"
  13298. },
  13299. "type": {
  13300. "type": "string",
  13301. "enum": ["symbol"]
  13302. },
  13303. "path": {
  13304. "type": "string"
  13305. },
  13306. "range": {
  13307. "$ref": "#/components/schemas/Range"
  13308. },
  13309. "name": {
  13310. "type": "string"
  13311. },
  13312. "kind": {
  13313. "type": "integer",
  13314. "minimum": 0
  13315. }
  13316. },
  13317. "required": ["text", "type", "path", "range", "name", "kind"],
  13318. "additionalProperties": false
  13319. },
  13320. "ResourceSource": {
  13321. "type": "object",
  13322. "properties": {
  13323. "text": {
  13324. "$ref": "#/components/schemas/FilePartSourceText"
  13325. },
  13326. "type": {
  13327. "type": "string",
  13328. "enum": ["resource"]
  13329. },
  13330. "clientName": {
  13331. "type": "string"
  13332. },
  13333. "uri": {
  13334. "type": "string"
  13335. }
  13336. },
  13337. "required": ["text", "type", "clientName", "uri"],
  13338. "additionalProperties": false
  13339. },
  13340. "FilePartSource": {
  13341. "anyOf": [
  13342. {
  13343. "$ref": "#/components/schemas/FileSource"
  13344. },
  13345. {
  13346. "$ref": "#/components/schemas/SymbolSource"
  13347. },
  13348. {
  13349. "$ref": "#/components/schemas/ResourceSource"
  13350. }
  13351. ]
  13352. },
  13353. "FilePart": {
  13354. "type": "object",
  13355. "properties": {
  13356. "id": {
  13357. "type": "string",
  13358. "pattern": "^prt"
  13359. },
  13360. "sessionID": {
  13361. "type": "string",
  13362. "pattern": "^ses"
  13363. },
  13364. "messageID": {
  13365. "type": "string",
  13366. "pattern": "^msg"
  13367. },
  13368. "type": {
  13369. "type": "string",
  13370. "enum": ["file"]
  13371. },
  13372. "mime": {
  13373. "type": "string"
  13374. },
  13375. "filename": {
  13376. "type": "string"
  13377. },
  13378. "url": {
  13379. "type": "string"
  13380. },
  13381. "source": {
  13382. "$ref": "#/components/schemas/FilePartSource"
  13383. }
  13384. },
  13385. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  13386. "additionalProperties": false
  13387. },
  13388. "ToolStatePending": {
  13389. "type": "object",
  13390. "properties": {
  13391. "status": {
  13392. "type": "string",
  13393. "enum": ["pending"]
  13394. },
  13395. "input": {
  13396. "type": "object"
  13397. },
  13398. "raw": {
  13399. "type": "string"
  13400. }
  13401. },
  13402. "required": ["status", "input", "raw"],
  13403. "additionalProperties": false
  13404. },
  13405. "ToolStateRunning": {
  13406. "type": "object",
  13407. "properties": {
  13408. "status": {
  13409. "type": "string",
  13410. "enum": ["running"]
  13411. },
  13412. "input": {
  13413. "type": "object"
  13414. },
  13415. "title": {
  13416. "type": "string"
  13417. },
  13418. "metadata": {
  13419. "type": "object"
  13420. },
  13421. "time": {
  13422. "type": "object",
  13423. "properties": {
  13424. "start": {
  13425. "type": "integer",
  13426. "minimum": 0
  13427. }
  13428. },
  13429. "required": ["start"],
  13430. "additionalProperties": false
  13431. }
  13432. },
  13433. "required": ["status", "input", "time"],
  13434. "additionalProperties": false
  13435. },
  13436. "ToolStateCompleted": {
  13437. "type": "object",
  13438. "properties": {
  13439. "status": {
  13440. "type": "string",
  13441. "enum": ["completed"]
  13442. },
  13443. "input": {
  13444. "type": "object"
  13445. },
  13446. "output": {
  13447. "type": "string"
  13448. },
  13449. "title": {
  13450. "type": "string"
  13451. },
  13452. "metadata": {
  13453. "type": "object"
  13454. },
  13455. "time": {
  13456. "type": "object",
  13457. "properties": {
  13458. "start": {
  13459. "type": "integer",
  13460. "minimum": 0
  13461. },
  13462. "end": {
  13463. "type": "integer",
  13464. "minimum": 0
  13465. },
  13466. "compacted": {
  13467. "type": "integer",
  13468. "minimum": 0
  13469. }
  13470. },
  13471. "required": ["start", "end"],
  13472. "additionalProperties": false
  13473. },
  13474. "attachments": {
  13475. "type": "array",
  13476. "items": {
  13477. "$ref": "#/components/schemas/FilePart"
  13478. }
  13479. }
  13480. },
  13481. "required": ["status", "input", "output", "title", "metadata", "time"],
  13482. "additionalProperties": false
  13483. },
  13484. "ToolStateError": {
  13485. "type": "object",
  13486. "properties": {
  13487. "status": {
  13488. "type": "string",
  13489. "enum": ["error"]
  13490. },
  13491. "input": {
  13492. "type": "object"
  13493. },
  13494. "error": {
  13495. "type": "string"
  13496. },
  13497. "metadata": {
  13498. "type": "object"
  13499. },
  13500. "time": {
  13501. "type": "object",
  13502. "properties": {
  13503. "start": {
  13504. "type": "integer",
  13505. "minimum": 0
  13506. },
  13507. "end": {
  13508. "type": "integer",
  13509. "minimum": 0
  13510. }
  13511. },
  13512. "required": ["start", "end"],
  13513. "additionalProperties": false
  13514. }
  13515. },
  13516. "required": ["status", "input", "error", "time"],
  13517. "additionalProperties": false
  13518. },
  13519. "ToolState": {
  13520. "anyOf": [
  13521. {
  13522. "$ref": "#/components/schemas/ToolStatePending"
  13523. },
  13524. {
  13525. "$ref": "#/components/schemas/ToolStateRunning"
  13526. },
  13527. {
  13528. "$ref": "#/components/schemas/ToolStateCompleted"
  13529. },
  13530. {
  13531. "$ref": "#/components/schemas/ToolStateError"
  13532. }
  13533. ]
  13534. },
  13535. "ToolPart": {
  13536. "type": "object",
  13537. "properties": {
  13538. "id": {
  13539. "type": "string",
  13540. "pattern": "^prt"
  13541. },
  13542. "sessionID": {
  13543. "type": "string",
  13544. "pattern": "^ses"
  13545. },
  13546. "messageID": {
  13547. "type": "string",
  13548. "pattern": "^msg"
  13549. },
  13550. "type": {
  13551. "type": "string",
  13552. "enum": ["tool"]
  13553. },
  13554. "callID": {
  13555. "type": "string"
  13556. },
  13557. "tool": {
  13558. "type": "string"
  13559. },
  13560. "state": {
  13561. "$ref": "#/components/schemas/ToolState"
  13562. },
  13563. "metadata": {
  13564. "type": "object"
  13565. }
  13566. },
  13567. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  13568. "additionalProperties": false
  13569. },
  13570. "StepStartPart": {
  13571. "type": "object",
  13572. "properties": {
  13573. "id": {
  13574. "type": "string",
  13575. "pattern": "^prt"
  13576. },
  13577. "sessionID": {
  13578. "type": "string",
  13579. "pattern": "^ses"
  13580. },
  13581. "messageID": {
  13582. "type": "string",
  13583. "pattern": "^msg"
  13584. },
  13585. "type": {
  13586. "type": "string",
  13587. "enum": ["step-start"]
  13588. },
  13589. "snapshot": {
  13590. "type": "string"
  13591. }
  13592. },
  13593. "required": ["id", "sessionID", "messageID", "type"],
  13594. "additionalProperties": false
  13595. },
  13596. "StepFinishPart": {
  13597. "type": "object",
  13598. "properties": {
  13599. "id": {
  13600. "type": "string",
  13601. "pattern": "^prt"
  13602. },
  13603. "sessionID": {
  13604. "type": "string",
  13605. "pattern": "^ses"
  13606. },
  13607. "messageID": {
  13608. "type": "string",
  13609. "pattern": "^msg"
  13610. },
  13611. "type": {
  13612. "type": "string",
  13613. "enum": ["step-finish"]
  13614. },
  13615. "reason": {
  13616. "type": "string"
  13617. },
  13618. "snapshot": {
  13619. "type": "string"
  13620. },
  13621. "cost": {
  13622. "type": "number"
  13623. },
  13624. "tokens": {
  13625. "type": "object",
  13626. "properties": {
  13627. "total": {
  13628. "type": "number"
  13629. },
  13630. "input": {
  13631. "type": "number"
  13632. },
  13633. "output": {
  13634. "type": "number"
  13635. },
  13636. "reasoning": {
  13637. "type": "number"
  13638. },
  13639. "cache": {
  13640. "type": "object",
  13641. "properties": {
  13642. "read": {
  13643. "type": "number"
  13644. },
  13645. "write": {
  13646. "type": "number"
  13647. }
  13648. },
  13649. "required": ["read", "write"],
  13650. "additionalProperties": false
  13651. }
  13652. },
  13653. "required": ["input", "output", "reasoning", "cache"],
  13654. "additionalProperties": false
  13655. }
  13656. },
  13657. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  13658. "additionalProperties": false
  13659. },
  13660. "SnapshotPart": {
  13661. "type": "object",
  13662. "properties": {
  13663. "id": {
  13664. "type": "string",
  13665. "pattern": "^prt"
  13666. },
  13667. "sessionID": {
  13668. "type": "string",
  13669. "pattern": "^ses"
  13670. },
  13671. "messageID": {
  13672. "type": "string",
  13673. "pattern": "^msg"
  13674. },
  13675. "type": {
  13676. "type": "string",
  13677. "enum": ["snapshot"]
  13678. },
  13679. "snapshot": {
  13680. "type": "string"
  13681. }
  13682. },
  13683. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  13684. "additionalProperties": false
  13685. },
  13686. "PatchPart": {
  13687. "type": "object",
  13688. "properties": {
  13689. "id": {
  13690. "type": "string",
  13691. "pattern": "^prt"
  13692. },
  13693. "sessionID": {
  13694. "type": "string",
  13695. "pattern": "^ses"
  13696. },
  13697. "messageID": {
  13698. "type": "string",
  13699. "pattern": "^msg"
  13700. },
  13701. "type": {
  13702. "type": "string",
  13703. "enum": ["patch"]
  13704. },
  13705. "hash": {
  13706. "type": "string"
  13707. },
  13708. "files": {
  13709. "type": "array",
  13710. "items": {
  13711. "type": "string"
  13712. }
  13713. }
  13714. },
  13715. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  13716. "additionalProperties": false
  13717. },
  13718. "AgentPart": {
  13719. "type": "object",
  13720. "properties": {
  13721. "id": {
  13722. "type": "string",
  13723. "pattern": "^prt"
  13724. },
  13725. "sessionID": {
  13726. "type": "string",
  13727. "pattern": "^ses"
  13728. },
  13729. "messageID": {
  13730. "type": "string",
  13731. "pattern": "^msg"
  13732. },
  13733. "type": {
  13734. "type": "string",
  13735. "enum": ["agent"]
  13736. },
  13737. "name": {
  13738. "type": "string"
  13739. },
  13740. "source": {
  13741. "type": "object",
  13742. "properties": {
  13743. "value": {
  13744. "type": "string"
  13745. },
  13746. "start": {
  13747. "type": "integer",
  13748. "minimum": 0
  13749. },
  13750. "end": {
  13751. "type": "integer",
  13752. "minimum": 0
  13753. }
  13754. },
  13755. "required": ["value", "start", "end"],
  13756. "additionalProperties": false
  13757. }
  13758. },
  13759. "required": ["id", "sessionID", "messageID", "type", "name"],
  13760. "additionalProperties": false
  13761. },
  13762. "RetryPart": {
  13763. "type": "object",
  13764. "properties": {
  13765. "id": {
  13766. "type": "string",
  13767. "pattern": "^prt"
  13768. },
  13769. "sessionID": {
  13770. "type": "string",
  13771. "pattern": "^ses"
  13772. },
  13773. "messageID": {
  13774. "type": "string",
  13775. "pattern": "^msg"
  13776. },
  13777. "type": {
  13778. "type": "string",
  13779. "enum": ["retry"]
  13780. },
  13781. "attempt": {
  13782. "type": "integer",
  13783. "minimum": 0
  13784. },
  13785. "error": {
  13786. "$ref": "#/components/schemas/APIError"
  13787. },
  13788. "time": {
  13789. "type": "object",
  13790. "properties": {
  13791. "created": {
  13792. "type": "integer",
  13793. "minimum": 0
  13794. }
  13795. },
  13796. "required": ["created"],
  13797. "additionalProperties": false
  13798. }
  13799. },
  13800. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  13801. "additionalProperties": false
  13802. },
  13803. "CompactionPart": {
  13804. "type": "object",
  13805. "properties": {
  13806. "id": {
  13807. "type": "string",
  13808. "pattern": "^prt"
  13809. },
  13810. "sessionID": {
  13811. "type": "string",
  13812. "pattern": "^ses"
  13813. },
  13814. "messageID": {
  13815. "type": "string",
  13816. "pattern": "^msg"
  13817. },
  13818. "type": {
  13819. "type": "string",
  13820. "enum": ["compaction"]
  13821. },
  13822. "auto": {
  13823. "type": "boolean"
  13824. },
  13825. "overflow": {
  13826. "type": "boolean"
  13827. },
  13828. "tail_start_id": {
  13829. "type": "string",
  13830. "pattern": "^msg"
  13831. }
  13832. },
  13833. "required": ["id", "sessionID", "messageID", "type", "auto"],
  13834. "additionalProperties": false
  13835. },
  13836. "Part": {
  13837. "anyOf": [
  13838. {
  13839. "$ref": "#/components/schemas/TextPart"
  13840. },
  13841. {
  13842. "$ref": "#/components/schemas/SubtaskPart"
  13843. },
  13844. {
  13845. "$ref": "#/components/schemas/ReasoningPart"
  13846. },
  13847. {
  13848. "$ref": "#/components/schemas/FilePart"
  13849. },
  13850. {
  13851. "$ref": "#/components/schemas/ToolPart"
  13852. },
  13853. {
  13854. "$ref": "#/components/schemas/StepStartPart"
  13855. },
  13856. {
  13857. "$ref": "#/components/schemas/StepFinishPart"
  13858. },
  13859. {
  13860. "$ref": "#/components/schemas/SnapshotPart"
  13861. },
  13862. {
  13863. "$ref": "#/components/schemas/PatchPart"
  13864. },
  13865. {
  13866. "$ref": "#/components/schemas/AgentPart"
  13867. },
  13868. {
  13869. "$ref": "#/components/schemas/RetryPart"
  13870. },
  13871. {
  13872. "$ref": "#/components/schemas/CompactionPart"
  13873. }
  13874. ]
  13875. },
  13876. "Prompt": {
  13877. "type": "object",
  13878. "properties": {
  13879. "text": {
  13880. "type": "string"
  13881. },
  13882. "files": {
  13883. "type": "array",
  13884. "items": {
  13885. "$ref": "#/components/schemas/PromptFileAttachment"
  13886. }
  13887. },
  13888. "agents": {
  13889. "type": "array",
  13890. "items": {
  13891. "$ref": "#/components/schemas/PromptAgentAttachment"
  13892. }
  13893. },
  13894. "references": {
  13895. "type": "array",
  13896. "items": {
  13897. "$ref": "#/components/schemas/PromptReferenceAttachment"
  13898. }
  13899. }
  13900. },
  13901. "required": ["text"],
  13902. "additionalProperties": false
  13903. },
  13904. "Pty": {
  13905. "type": "object",
  13906. "properties": {
  13907. "id": {
  13908. "type": "string",
  13909. "pattern": "^pty"
  13910. },
  13911. "title": {
  13912. "type": "string"
  13913. },
  13914. "command": {
  13915. "type": "string"
  13916. },
  13917. "args": {
  13918. "type": "array",
  13919. "items": {
  13920. "type": "string"
  13921. }
  13922. },
  13923. "cwd": {
  13924. "type": "string"
  13925. },
  13926. "status": {
  13927. "type": "string",
  13928. "enum": ["running", "exited"]
  13929. },
  13930. "pid": {
  13931. "type": "integer",
  13932. "minimum": 0
  13933. }
  13934. },
  13935. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  13936. "additionalProperties": false
  13937. },
  13938. "Todo": {
  13939. "type": "object",
  13940. "properties": {
  13941. "content": {
  13942. "type": "string",
  13943. "description": "Brief description of the task"
  13944. },
  13945. "status": {
  13946. "type": "string",
  13947. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  13948. },
  13949. "priority": {
  13950. "type": "string",
  13951. "description": "Priority level of the task: high, medium, low"
  13952. }
  13953. },
  13954. "required": ["content", "status", "priority"],
  13955. "additionalProperties": false
  13956. },
  13957. "QuestionOption": {
  13958. "type": "object",
  13959. "properties": {
  13960. "label": {
  13961. "type": "string",
  13962. "description": "Display text (1-5 words, concise)"
  13963. },
  13964. "description": {
  13965. "type": "string",
  13966. "description": "Explanation of choice"
  13967. }
  13968. },
  13969. "required": ["label", "description"],
  13970. "additionalProperties": false
  13971. },
  13972. "QuestionInfo": {
  13973. "type": "object",
  13974. "properties": {
  13975. "question": {
  13976. "type": "string",
  13977. "description": "Complete question"
  13978. },
  13979. "header": {
  13980. "type": "string",
  13981. "description": "Very short label (max 30 chars)"
  13982. },
  13983. "options": {
  13984. "type": "array",
  13985. "items": {
  13986. "$ref": "#/components/schemas/QuestionOption"
  13987. },
  13988. "description": "Available choices"
  13989. },
  13990. "multiple": {
  13991. "type": "boolean"
  13992. },
  13993. "custom": {
  13994. "type": "boolean"
  13995. }
  13996. },
  13997. "required": ["question", "header", "options"],
  13998. "additionalProperties": false
  13999. },
  14000. "QuestionTool": {
  14001. "type": "object",
  14002. "properties": {
  14003. "messageID": {
  14004. "type": "string",
  14005. "pattern": "^msg"
  14006. },
  14007. "callID": {
  14008. "type": "string"
  14009. }
  14010. },
  14011. "required": ["messageID", "callID"],
  14012. "additionalProperties": false
  14013. },
  14014. "QuestionAnswer": {
  14015. "type": "array",
  14016. "items": {
  14017. "type": "string"
  14018. }
  14019. },
  14020. "SessionStatus": {
  14021. "anyOf": [
  14022. {
  14023. "type": "object",
  14024. "properties": {
  14025. "type": {
  14026. "type": "string",
  14027. "enum": ["idle"]
  14028. }
  14029. },
  14030. "required": ["type"],
  14031. "additionalProperties": false
  14032. },
  14033. {
  14034. "type": "object",
  14035. "properties": {
  14036. "type": {
  14037. "type": "string",
  14038. "enum": ["retry"]
  14039. },
  14040. "attempt": {
  14041. "type": "integer",
  14042. "minimum": 0
  14043. },
  14044. "message": {
  14045. "type": "string"
  14046. },
  14047. "action": {
  14048. "type": "object",
  14049. "properties": {
  14050. "reason": {
  14051. "type": "string"
  14052. },
  14053. "provider": {
  14054. "type": "string"
  14055. },
  14056. "title": {
  14057. "type": "string"
  14058. },
  14059. "message": {
  14060. "type": "string"
  14061. },
  14062. "label": {
  14063. "type": "string"
  14064. },
  14065. "link": {
  14066. "type": "string"
  14067. }
  14068. },
  14069. "required": ["reason", "provider", "title", "message", "label"],
  14070. "additionalProperties": false
  14071. },
  14072. "next": {
  14073. "type": "integer",
  14074. "minimum": 0
  14075. }
  14076. },
  14077. "required": ["type", "attempt", "message", "next"],
  14078. "additionalProperties": false
  14079. },
  14080. {
  14081. "type": "object",
  14082. "properties": {
  14083. "type": {
  14084. "type": "string",
  14085. "enum": ["busy"]
  14086. }
  14087. },
  14088. "required": ["type"],
  14089. "additionalProperties": false
  14090. }
  14091. ]
  14092. },
  14093. "GlobalEvent": {
  14094. "type": "object",
  14095. "properties": {
  14096. "directory": {
  14097. "type": "string"
  14098. },
  14099. "project": {
  14100. "type": "string"
  14101. },
  14102. "workspace": {
  14103. "type": "string"
  14104. },
  14105. "payload": {
  14106. "anyOf": [
  14107. {
  14108. "type": "object",
  14109. "properties": {
  14110. "id": {
  14111. "type": "string",
  14112. "pattern": "^evt_"
  14113. },
  14114. "type": {
  14115. "type": "string",
  14116. "enum": ["models-dev.refreshed"]
  14117. },
  14118. "properties": {
  14119. "type": "object",
  14120. "properties": {}
  14121. }
  14122. },
  14123. "required": ["id", "type", "properties"],
  14124. "additionalProperties": false
  14125. },
  14126. {
  14127. "type": "object",
  14128. "properties": {
  14129. "id": {
  14130. "type": "string",
  14131. "pattern": "^evt_"
  14132. },
  14133. "type": {
  14134. "type": "string",
  14135. "enum": ["plugin.added"]
  14136. },
  14137. "properties": {
  14138. "type": "object",
  14139. "properties": {
  14140. "id": {
  14141. "type": "string"
  14142. }
  14143. },
  14144. "required": ["id"],
  14145. "additionalProperties": false
  14146. }
  14147. },
  14148. "required": ["id", "type", "properties"],
  14149. "additionalProperties": false
  14150. },
  14151. {
  14152. "type": "object",
  14153. "properties": {
  14154. "id": {
  14155. "type": "string",
  14156. "pattern": "^evt_"
  14157. },
  14158. "type": {
  14159. "type": "string",
  14160. "enum": ["catalog.model.updated"]
  14161. },
  14162. "properties": {
  14163. "type": "object",
  14164. "properties": {
  14165. "model": {
  14166. "$ref": "#/components/schemas/ModelV2Info"
  14167. }
  14168. },
  14169. "required": ["model"],
  14170. "additionalProperties": false
  14171. }
  14172. },
  14173. "required": ["id", "type", "properties"],
  14174. "additionalProperties": false
  14175. },
  14176. {
  14177. "type": "object",
  14178. "properties": {
  14179. "id": {
  14180. "type": "string",
  14181. "pattern": "^evt_"
  14182. },
  14183. "type": {
  14184. "type": "string",
  14185. "enum": ["session.created"]
  14186. },
  14187. "properties": {
  14188. "type": "object",
  14189. "properties": {
  14190. "sessionID": {
  14191. "type": "string",
  14192. "pattern": "^ses"
  14193. },
  14194. "info": {
  14195. "$ref": "#/components/schemas/Session"
  14196. }
  14197. },
  14198. "required": ["sessionID", "info"],
  14199. "additionalProperties": false
  14200. }
  14201. },
  14202. "required": ["id", "type", "properties"],
  14203. "additionalProperties": false
  14204. },
  14205. {
  14206. "type": "object",
  14207. "properties": {
  14208. "id": {
  14209. "type": "string",
  14210. "pattern": "^evt_"
  14211. },
  14212. "type": {
  14213. "type": "string",
  14214. "enum": ["session.updated"]
  14215. },
  14216. "properties": {
  14217. "type": "object",
  14218. "properties": {
  14219. "sessionID": {
  14220. "type": "string",
  14221. "pattern": "^ses"
  14222. },
  14223. "info": {
  14224. "$ref": "#/components/schemas/Session"
  14225. }
  14226. },
  14227. "required": ["sessionID", "info"],
  14228. "additionalProperties": false
  14229. }
  14230. },
  14231. "required": ["id", "type", "properties"],
  14232. "additionalProperties": false
  14233. },
  14234. {
  14235. "type": "object",
  14236. "properties": {
  14237. "id": {
  14238. "type": "string",
  14239. "pattern": "^evt_"
  14240. },
  14241. "type": {
  14242. "type": "string",
  14243. "enum": ["session.deleted"]
  14244. },
  14245. "properties": {
  14246. "type": "object",
  14247. "properties": {
  14248. "sessionID": {
  14249. "type": "string",
  14250. "pattern": "^ses"
  14251. },
  14252. "info": {
  14253. "$ref": "#/components/schemas/Session"
  14254. }
  14255. },
  14256. "required": ["sessionID", "info"],
  14257. "additionalProperties": false
  14258. }
  14259. },
  14260. "required": ["id", "type", "properties"],
  14261. "additionalProperties": false
  14262. },
  14263. {
  14264. "type": "object",
  14265. "properties": {
  14266. "id": {
  14267. "type": "string",
  14268. "pattern": "^evt_"
  14269. },
  14270. "type": {
  14271. "type": "string",
  14272. "enum": ["message.updated"]
  14273. },
  14274. "properties": {
  14275. "type": "object",
  14276. "properties": {
  14277. "sessionID": {
  14278. "type": "string",
  14279. "pattern": "^ses"
  14280. },
  14281. "info": {
  14282. "$ref": "#/components/schemas/Message"
  14283. }
  14284. },
  14285. "required": ["sessionID", "info"],
  14286. "additionalProperties": false
  14287. }
  14288. },
  14289. "required": ["id", "type", "properties"],
  14290. "additionalProperties": false
  14291. },
  14292. {
  14293. "type": "object",
  14294. "properties": {
  14295. "id": {
  14296. "type": "string",
  14297. "pattern": "^evt_"
  14298. },
  14299. "type": {
  14300. "type": "string",
  14301. "enum": ["message.removed"]
  14302. },
  14303. "properties": {
  14304. "type": "object",
  14305. "properties": {
  14306. "sessionID": {
  14307. "type": "string",
  14308. "pattern": "^ses"
  14309. },
  14310. "messageID": {
  14311. "type": "string",
  14312. "pattern": "^msg"
  14313. }
  14314. },
  14315. "required": ["sessionID", "messageID"],
  14316. "additionalProperties": false
  14317. }
  14318. },
  14319. "required": ["id", "type", "properties"],
  14320. "additionalProperties": false
  14321. },
  14322. {
  14323. "type": "object",
  14324. "properties": {
  14325. "id": {
  14326. "type": "string",
  14327. "pattern": "^evt_"
  14328. },
  14329. "type": {
  14330. "type": "string",
  14331. "enum": ["message.part.updated"]
  14332. },
  14333. "properties": {
  14334. "type": "object",
  14335. "properties": {
  14336. "sessionID": {
  14337. "type": "string",
  14338. "pattern": "^ses"
  14339. },
  14340. "part": {
  14341. "$ref": "#/components/schemas/Part"
  14342. },
  14343. "time": {
  14344. "type": "number"
  14345. }
  14346. },
  14347. "required": ["sessionID", "part", "time"],
  14348. "additionalProperties": false
  14349. }
  14350. },
  14351. "required": ["id", "type", "properties"],
  14352. "additionalProperties": false
  14353. },
  14354. {
  14355. "type": "object",
  14356. "properties": {
  14357. "id": {
  14358. "type": "string",
  14359. "pattern": "^evt_"
  14360. },
  14361. "type": {
  14362. "type": "string",
  14363. "enum": ["message.part.removed"]
  14364. },
  14365. "properties": {
  14366. "type": "object",
  14367. "properties": {
  14368. "sessionID": {
  14369. "type": "string",
  14370. "pattern": "^ses"
  14371. },
  14372. "messageID": {
  14373. "type": "string",
  14374. "pattern": "^msg"
  14375. },
  14376. "partID": {
  14377. "type": "string",
  14378. "pattern": "^prt"
  14379. }
  14380. },
  14381. "required": ["sessionID", "messageID", "partID"],
  14382. "additionalProperties": false
  14383. }
  14384. },
  14385. "required": ["id", "type", "properties"],
  14386. "additionalProperties": false
  14387. },
  14388. {
  14389. "type": "object",
  14390. "properties": {
  14391. "id": {
  14392. "type": "string",
  14393. "pattern": "^evt_"
  14394. },
  14395. "type": {
  14396. "type": "string",
  14397. "enum": ["session.next.agent.switched"]
  14398. },
  14399. "properties": {
  14400. "type": "object",
  14401. "properties": {
  14402. "timestamp": {
  14403. "type": "number"
  14404. },
  14405. "sessionID": {
  14406. "type": "string",
  14407. "pattern": "^ses"
  14408. },
  14409. "messageID": {
  14410. "type": "string",
  14411. "pattern": "^msg_"
  14412. },
  14413. "agent": {
  14414. "type": "string"
  14415. }
  14416. },
  14417. "required": ["timestamp", "sessionID", "messageID", "agent"],
  14418. "additionalProperties": false
  14419. }
  14420. },
  14421. "required": ["id", "type", "properties"],
  14422. "additionalProperties": false
  14423. },
  14424. {
  14425. "type": "object",
  14426. "properties": {
  14427. "id": {
  14428. "type": "string",
  14429. "pattern": "^evt_"
  14430. },
  14431. "type": {
  14432. "type": "string",
  14433. "enum": ["session.next.model.switched"]
  14434. },
  14435. "properties": {
  14436. "type": "object",
  14437. "properties": {
  14438. "timestamp": {
  14439. "type": "number"
  14440. },
  14441. "sessionID": {
  14442. "type": "string",
  14443. "pattern": "^ses"
  14444. },
  14445. "messageID": {
  14446. "type": "string",
  14447. "pattern": "^msg_"
  14448. },
  14449. "model": {
  14450. "type": "object",
  14451. "properties": {
  14452. "id": {
  14453. "type": "string"
  14454. },
  14455. "providerID": {
  14456. "type": "string"
  14457. },
  14458. "variant": {
  14459. "type": "string"
  14460. }
  14461. },
  14462. "required": ["id", "providerID"],
  14463. "additionalProperties": false
  14464. }
  14465. },
  14466. "required": ["timestamp", "sessionID", "messageID", "model"],
  14467. "additionalProperties": false
  14468. }
  14469. },
  14470. "required": ["id", "type", "properties"],
  14471. "additionalProperties": false
  14472. },
  14473. {
  14474. "type": "object",
  14475. "properties": {
  14476. "id": {
  14477. "type": "string",
  14478. "pattern": "^evt_"
  14479. },
  14480. "type": {
  14481. "type": "string",
  14482. "enum": ["session.next.moved"]
  14483. },
  14484. "properties": {
  14485. "type": "object",
  14486. "properties": {
  14487. "timestamp": {
  14488. "type": "number"
  14489. },
  14490. "sessionID": {
  14491. "type": "string",
  14492. "pattern": "^ses"
  14493. },
  14494. "location": {
  14495. "$ref": "#/components/schemas/LocationRef"
  14496. },
  14497. "subdirectory": {
  14498. "type": "string"
  14499. }
  14500. },
  14501. "required": ["timestamp", "sessionID", "location"],
  14502. "additionalProperties": false
  14503. }
  14504. },
  14505. "required": ["id", "type", "properties"],
  14506. "additionalProperties": false
  14507. },
  14508. {
  14509. "type": "object",
  14510. "properties": {
  14511. "id": {
  14512. "type": "string",
  14513. "pattern": "^evt_"
  14514. },
  14515. "type": {
  14516. "type": "string",
  14517. "enum": ["session.next.prompted"]
  14518. },
  14519. "properties": {
  14520. "type": "object",
  14521. "properties": {
  14522. "timestamp": {
  14523. "type": "number"
  14524. },
  14525. "sessionID": {
  14526. "type": "string",
  14527. "pattern": "^ses"
  14528. },
  14529. "messageID": {
  14530. "type": "string",
  14531. "pattern": "^msg_"
  14532. },
  14533. "prompt": {
  14534. "$ref": "#/components/schemas/Prompt"
  14535. },
  14536. "delivery": {
  14537. "type": "string",
  14538. "enum": ["steer", "queue"]
  14539. }
  14540. },
  14541. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14542. "additionalProperties": false
  14543. }
  14544. },
  14545. "required": ["id", "type", "properties"],
  14546. "additionalProperties": false
  14547. },
  14548. {
  14549. "type": "object",
  14550. "properties": {
  14551. "id": {
  14552. "type": "string",
  14553. "pattern": "^evt_"
  14554. },
  14555. "type": {
  14556. "type": "string",
  14557. "enum": ["session.next.prompt.admitted"]
  14558. },
  14559. "properties": {
  14560. "type": "object",
  14561. "properties": {
  14562. "timestamp": {
  14563. "type": "number"
  14564. },
  14565. "sessionID": {
  14566. "type": "string",
  14567. "pattern": "^ses"
  14568. },
  14569. "messageID": {
  14570. "type": "string",
  14571. "pattern": "^msg_"
  14572. },
  14573. "prompt": {
  14574. "$ref": "#/components/schemas/Prompt"
  14575. },
  14576. "delivery": {
  14577. "type": "string",
  14578. "enum": ["steer", "queue"]
  14579. }
  14580. },
  14581. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14582. "additionalProperties": false
  14583. }
  14584. },
  14585. "required": ["id", "type", "properties"],
  14586. "additionalProperties": false
  14587. },
  14588. {
  14589. "type": "object",
  14590. "properties": {
  14591. "id": {
  14592. "type": "string",
  14593. "pattern": "^evt_"
  14594. },
  14595. "type": {
  14596. "type": "string",
  14597. "enum": ["session.next.prompt.promoted"]
  14598. },
  14599. "properties": {
  14600. "type": "object",
  14601. "properties": {
  14602. "timestamp": {
  14603. "type": "number"
  14604. },
  14605. "sessionID": {
  14606. "type": "string",
  14607. "pattern": "^ses"
  14608. },
  14609. "messageID": {
  14610. "type": "string",
  14611. "pattern": "^msg_"
  14612. },
  14613. "prompt": {
  14614. "$ref": "#/components/schemas/Prompt"
  14615. },
  14616. "timeCreated": {
  14617. "type": "number"
  14618. }
  14619. },
  14620. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  14621. "additionalProperties": false
  14622. }
  14623. },
  14624. "required": ["id", "type", "properties"],
  14625. "additionalProperties": false
  14626. },
  14627. {
  14628. "type": "object",
  14629. "properties": {
  14630. "id": {
  14631. "type": "string",
  14632. "pattern": "^evt_"
  14633. },
  14634. "type": {
  14635. "type": "string",
  14636. "enum": ["session.next.context.updated"]
  14637. },
  14638. "properties": {
  14639. "type": "object",
  14640. "properties": {
  14641. "timestamp": {
  14642. "type": "number"
  14643. },
  14644. "sessionID": {
  14645. "type": "string",
  14646. "pattern": "^ses"
  14647. },
  14648. "messageID": {
  14649. "type": "string",
  14650. "pattern": "^msg_"
  14651. },
  14652. "text": {
  14653. "type": "string"
  14654. }
  14655. },
  14656. "required": ["timestamp", "sessionID", "messageID", "text"],
  14657. "additionalProperties": false
  14658. }
  14659. },
  14660. "required": ["id", "type", "properties"],
  14661. "additionalProperties": false
  14662. },
  14663. {
  14664. "type": "object",
  14665. "properties": {
  14666. "id": {
  14667. "type": "string",
  14668. "pattern": "^evt_"
  14669. },
  14670. "type": {
  14671. "type": "string",
  14672. "enum": ["session.next.synthetic"]
  14673. },
  14674. "properties": {
  14675. "type": "object",
  14676. "properties": {
  14677. "timestamp": {
  14678. "type": "number"
  14679. },
  14680. "sessionID": {
  14681. "type": "string",
  14682. "pattern": "^ses"
  14683. },
  14684. "messageID": {
  14685. "type": "string",
  14686. "pattern": "^msg_"
  14687. },
  14688. "text": {
  14689. "type": "string"
  14690. }
  14691. },
  14692. "required": ["timestamp", "sessionID", "messageID", "text"],
  14693. "additionalProperties": false
  14694. }
  14695. },
  14696. "required": ["id", "type", "properties"],
  14697. "additionalProperties": false
  14698. },
  14699. {
  14700. "type": "object",
  14701. "properties": {
  14702. "id": {
  14703. "type": "string",
  14704. "pattern": "^evt_"
  14705. },
  14706. "type": {
  14707. "type": "string",
  14708. "enum": ["session.next.shell.started"]
  14709. },
  14710. "properties": {
  14711. "type": "object",
  14712. "properties": {
  14713. "timestamp": {
  14714. "type": "number"
  14715. },
  14716. "sessionID": {
  14717. "type": "string",
  14718. "pattern": "^ses"
  14719. },
  14720. "messageID": {
  14721. "type": "string",
  14722. "pattern": "^msg_"
  14723. },
  14724. "callID": {
  14725. "type": "string"
  14726. },
  14727. "command": {
  14728. "type": "string"
  14729. }
  14730. },
  14731. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  14732. "additionalProperties": false
  14733. }
  14734. },
  14735. "required": ["id", "type", "properties"],
  14736. "additionalProperties": false
  14737. },
  14738. {
  14739. "type": "object",
  14740. "properties": {
  14741. "id": {
  14742. "type": "string",
  14743. "pattern": "^evt_"
  14744. },
  14745. "type": {
  14746. "type": "string",
  14747. "enum": ["session.next.shell.ended"]
  14748. },
  14749. "properties": {
  14750. "type": "object",
  14751. "properties": {
  14752. "timestamp": {
  14753. "type": "number"
  14754. },
  14755. "sessionID": {
  14756. "type": "string",
  14757. "pattern": "^ses"
  14758. },
  14759. "callID": {
  14760. "type": "string"
  14761. },
  14762. "output": {
  14763. "type": "string"
  14764. }
  14765. },
  14766. "required": ["timestamp", "sessionID", "callID", "output"],
  14767. "additionalProperties": false
  14768. }
  14769. },
  14770. "required": ["id", "type", "properties"],
  14771. "additionalProperties": false
  14772. },
  14773. {
  14774. "type": "object",
  14775. "properties": {
  14776. "id": {
  14777. "type": "string",
  14778. "pattern": "^evt_"
  14779. },
  14780. "type": {
  14781. "type": "string",
  14782. "enum": ["session.next.step.started"]
  14783. },
  14784. "properties": {
  14785. "type": "object",
  14786. "properties": {
  14787. "timestamp": {
  14788. "type": "number"
  14789. },
  14790. "sessionID": {
  14791. "type": "string",
  14792. "pattern": "^ses"
  14793. },
  14794. "assistantMessageID": {
  14795. "type": "string",
  14796. "pattern": "^msg_"
  14797. },
  14798. "agent": {
  14799. "type": "string"
  14800. },
  14801. "model": {
  14802. "type": "object",
  14803. "properties": {
  14804. "id": {
  14805. "type": "string"
  14806. },
  14807. "providerID": {
  14808. "type": "string"
  14809. },
  14810. "variant": {
  14811. "type": "string"
  14812. }
  14813. },
  14814. "required": ["id", "providerID"],
  14815. "additionalProperties": false
  14816. },
  14817. "snapshot": {
  14818. "type": "string"
  14819. }
  14820. },
  14821. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  14822. "additionalProperties": false
  14823. }
  14824. },
  14825. "required": ["id", "type", "properties"],
  14826. "additionalProperties": false
  14827. },
  14828. {
  14829. "type": "object",
  14830. "properties": {
  14831. "id": {
  14832. "type": "string",
  14833. "pattern": "^evt_"
  14834. },
  14835. "type": {
  14836. "type": "string",
  14837. "enum": ["session.next.step.ended"]
  14838. },
  14839. "properties": {
  14840. "type": "object",
  14841. "properties": {
  14842. "timestamp": {
  14843. "type": "number"
  14844. },
  14845. "sessionID": {
  14846. "type": "string",
  14847. "pattern": "^ses"
  14848. },
  14849. "assistantMessageID": {
  14850. "type": "string",
  14851. "pattern": "^msg_"
  14852. },
  14853. "finish": {
  14854. "type": "string"
  14855. },
  14856. "cost": {
  14857. "type": "number"
  14858. },
  14859. "tokens": {
  14860. "type": "object",
  14861. "properties": {
  14862. "input": {
  14863. "type": "number"
  14864. },
  14865. "output": {
  14866. "type": "number"
  14867. },
  14868. "reasoning": {
  14869. "type": "number"
  14870. },
  14871. "cache": {
  14872. "type": "object",
  14873. "properties": {
  14874. "read": {
  14875. "type": "number"
  14876. },
  14877. "write": {
  14878. "type": "number"
  14879. }
  14880. },
  14881. "required": ["read", "write"],
  14882. "additionalProperties": false
  14883. }
  14884. },
  14885. "required": ["input", "output", "reasoning", "cache"],
  14886. "additionalProperties": false
  14887. },
  14888. "snapshot": {
  14889. "type": "string"
  14890. }
  14891. },
  14892. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  14893. "additionalProperties": false
  14894. }
  14895. },
  14896. "required": ["id", "type", "properties"],
  14897. "additionalProperties": false
  14898. },
  14899. {
  14900. "type": "object",
  14901. "properties": {
  14902. "id": {
  14903. "type": "string",
  14904. "pattern": "^evt_"
  14905. },
  14906. "type": {
  14907. "type": "string",
  14908. "enum": ["session.next.step.failed"]
  14909. },
  14910. "properties": {
  14911. "type": "object",
  14912. "properties": {
  14913. "timestamp": {
  14914. "type": "number"
  14915. },
  14916. "sessionID": {
  14917. "type": "string",
  14918. "pattern": "^ses"
  14919. },
  14920. "assistantMessageID": {
  14921. "type": "string",
  14922. "pattern": "^msg_"
  14923. },
  14924. "error": {
  14925. "$ref": "#/components/schemas/SessionErrorUnknown"
  14926. }
  14927. },
  14928. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  14929. "additionalProperties": false
  14930. }
  14931. },
  14932. "required": ["id", "type", "properties"],
  14933. "additionalProperties": false
  14934. },
  14935. {
  14936. "type": "object",
  14937. "properties": {
  14938. "id": {
  14939. "type": "string",
  14940. "pattern": "^evt_"
  14941. },
  14942. "type": {
  14943. "type": "string",
  14944. "enum": ["session.next.text.started"]
  14945. },
  14946. "properties": {
  14947. "type": "object",
  14948. "properties": {
  14949. "timestamp": {
  14950. "type": "number"
  14951. },
  14952. "sessionID": {
  14953. "type": "string",
  14954. "pattern": "^ses"
  14955. },
  14956. "assistantMessageID": {
  14957. "type": "string",
  14958. "pattern": "^msg_"
  14959. },
  14960. "textID": {
  14961. "type": "string"
  14962. }
  14963. },
  14964. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  14965. "additionalProperties": false
  14966. }
  14967. },
  14968. "required": ["id", "type", "properties"],
  14969. "additionalProperties": false
  14970. },
  14971. {
  14972. "type": "object",
  14973. "properties": {
  14974. "id": {
  14975. "type": "string",
  14976. "pattern": "^evt_"
  14977. },
  14978. "type": {
  14979. "type": "string",
  14980. "enum": ["session.next.text.delta"]
  14981. },
  14982. "properties": {
  14983. "type": "object",
  14984. "properties": {
  14985. "timestamp": {
  14986. "type": "number"
  14987. },
  14988. "sessionID": {
  14989. "type": "string",
  14990. "pattern": "^ses"
  14991. },
  14992. "assistantMessageID": {
  14993. "type": "string",
  14994. "pattern": "^msg_"
  14995. },
  14996. "textID": {
  14997. "type": "string"
  14998. },
  14999. "delta": {
  15000. "type": "string"
  15001. }
  15002. },
  15003. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  15004. "additionalProperties": false
  15005. }
  15006. },
  15007. "required": ["id", "type", "properties"],
  15008. "additionalProperties": false
  15009. },
  15010. {
  15011. "type": "object",
  15012. "properties": {
  15013. "id": {
  15014. "type": "string",
  15015. "pattern": "^evt_"
  15016. },
  15017. "type": {
  15018. "type": "string",
  15019. "enum": ["session.next.text.ended"]
  15020. },
  15021. "properties": {
  15022. "type": "object",
  15023. "properties": {
  15024. "timestamp": {
  15025. "type": "number"
  15026. },
  15027. "sessionID": {
  15028. "type": "string",
  15029. "pattern": "^ses"
  15030. },
  15031. "assistantMessageID": {
  15032. "type": "string",
  15033. "pattern": "^msg_"
  15034. },
  15035. "textID": {
  15036. "type": "string"
  15037. },
  15038. "text": {
  15039. "type": "string"
  15040. }
  15041. },
  15042. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  15043. "additionalProperties": false
  15044. }
  15045. },
  15046. "required": ["id", "type", "properties"],
  15047. "additionalProperties": false
  15048. },
  15049. {
  15050. "type": "object",
  15051. "properties": {
  15052. "id": {
  15053. "type": "string",
  15054. "pattern": "^evt_"
  15055. },
  15056. "type": {
  15057. "type": "string",
  15058. "enum": ["session.next.reasoning.started"]
  15059. },
  15060. "properties": {
  15061. "type": "object",
  15062. "properties": {
  15063. "timestamp": {
  15064. "type": "number"
  15065. },
  15066. "sessionID": {
  15067. "type": "string",
  15068. "pattern": "^ses"
  15069. },
  15070. "assistantMessageID": {
  15071. "type": "string",
  15072. "pattern": "^msg_"
  15073. },
  15074. "reasoningID": {
  15075. "type": "string"
  15076. },
  15077. "providerMetadata": {
  15078. "type": "object",
  15079. "additionalProperties": {
  15080. "type": "object"
  15081. }
  15082. }
  15083. },
  15084. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  15085. "additionalProperties": false
  15086. }
  15087. },
  15088. "required": ["id", "type", "properties"],
  15089. "additionalProperties": false
  15090. },
  15091. {
  15092. "type": "object",
  15093. "properties": {
  15094. "id": {
  15095. "type": "string",
  15096. "pattern": "^evt_"
  15097. },
  15098. "type": {
  15099. "type": "string",
  15100. "enum": ["session.next.reasoning.delta"]
  15101. },
  15102. "properties": {
  15103. "type": "object",
  15104. "properties": {
  15105. "timestamp": {
  15106. "type": "number"
  15107. },
  15108. "sessionID": {
  15109. "type": "string",
  15110. "pattern": "^ses"
  15111. },
  15112. "assistantMessageID": {
  15113. "type": "string",
  15114. "pattern": "^msg_"
  15115. },
  15116. "reasoningID": {
  15117. "type": "string"
  15118. },
  15119. "delta": {
  15120. "type": "string"
  15121. }
  15122. },
  15123. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  15124. "additionalProperties": false
  15125. }
  15126. },
  15127. "required": ["id", "type", "properties"],
  15128. "additionalProperties": false
  15129. },
  15130. {
  15131. "type": "object",
  15132. "properties": {
  15133. "id": {
  15134. "type": "string",
  15135. "pattern": "^evt_"
  15136. },
  15137. "type": {
  15138. "type": "string",
  15139. "enum": ["session.next.reasoning.ended"]
  15140. },
  15141. "properties": {
  15142. "type": "object",
  15143. "properties": {
  15144. "timestamp": {
  15145. "type": "number"
  15146. },
  15147. "sessionID": {
  15148. "type": "string",
  15149. "pattern": "^ses"
  15150. },
  15151. "assistantMessageID": {
  15152. "type": "string",
  15153. "pattern": "^msg_"
  15154. },
  15155. "reasoningID": {
  15156. "type": "string"
  15157. },
  15158. "text": {
  15159. "type": "string"
  15160. },
  15161. "providerMetadata": {
  15162. "type": "object",
  15163. "additionalProperties": {
  15164. "type": "object"
  15165. }
  15166. }
  15167. },
  15168. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  15169. "additionalProperties": false
  15170. }
  15171. },
  15172. "required": ["id", "type", "properties"],
  15173. "additionalProperties": false
  15174. },
  15175. {
  15176. "type": "object",
  15177. "properties": {
  15178. "id": {
  15179. "type": "string",
  15180. "pattern": "^evt_"
  15181. },
  15182. "type": {
  15183. "type": "string",
  15184. "enum": ["session.next.tool.input.started"]
  15185. },
  15186. "properties": {
  15187. "type": "object",
  15188. "properties": {
  15189. "timestamp": {
  15190. "type": "number"
  15191. },
  15192. "sessionID": {
  15193. "type": "string",
  15194. "pattern": "^ses"
  15195. },
  15196. "assistantMessageID": {
  15197. "type": "string",
  15198. "pattern": "^msg_"
  15199. },
  15200. "callID": {
  15201. "type": "string"
  15202. },
  15203. "name": {
  15204. "type": "string"
  15205. }
  15206. },
  15207. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  15208. "additionalProperties": false
  15209. }
  15210. },
  15211. "required": ["id", "type", "properties"],
  15212. "additionalProperties": false
  15213. },
  15214. {
  15215. "type": "object",
  15216. "properties": {
  15217. "id": {
  15218. "type": "string",
  15219. "pattern": "^evt_"
  15220. },
  15221. "type": {
  15222. "type": "string",
  15223. "enum": ["session.next.tool.input.delta"]
  15224. },
  15225. "properties": {
  15226. "type": "object",
  15227. "properties": {
  15228. "timestamp": {
  15229. "type": "number"
  15230. },
  15231. "sessionID": {
  15232. "type": "string",
  15233. "pattern": "^ses"
  15234. },
  15235. "assistantMessageID": {
  15236. "type": "string",
  15237. "pattern": "^msg_"
  15238. },
  15239. "callID": {
  15240. "type": "string"
  15241. },
  15242. "delta": {
  15243. "type": "string"
  15244. }
  15245. },
  15246. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  15247. "additionalProperties": false
  15248. }
  15249. },
  15250. "required": ["id", "type", "properties"],
  15251. "additionalProperties": false
  15252. },
  15253. {
  15254. "type": "object",
  15255. "properties": {
  15256. "id": {
  15257. "type": "string",
  15258. "pattern": "^evt_"
  15259. },
  15260. "type": {
  15261. "type": "string",
  15262. "enum": ["session.next.tool.input.ended"]
  15263. },
  15264. "properties": {
  15265. "type": "object",
  15266. "properties": {
  15267. "timestamp": {
  15268. "type": "number"
  15269. },
  15270. "sessionID": {
  15271. "type": "string",
  15272. "pattern": "^ses"
  15273. },
  15274. "assistantMessageID": {
  15275. "type": "string",
  15276. "pattern": "^msg_"
  15277. },
  15278. "callID": {
  15279. "type": "string"
  15280. },
  15281. "text": {
  15282. "type": "string"
  15283. }
  15284. },
  15285. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  15286. "additionalProperties": false
  15287. }
  15288. },
  15289. "required": ["id", "type", "properties"],
  15290. "additionalProperties": false
  15291. },
  15292. {
  15293. "type": "object",
  15294. "properties": {
  15295. "id": {
  15296. "type": "string",
  15297. "pattern": "^evt_"
  15298. },
  15299. "type": {
  15300. "type": "string",
  15301. "enum": ["session.next.tool.called"]
  15302. },
  15303. "properties": {
  15304. "type": "object",
  15305. "properties": {
  15306. "timestamp": {
  15307. "type": "number"
  15308. },
  15309. "sessionID": {
  15310. "type": "string",
  15311. "pattern": "^ses"
  15312. },
  15313. "assistantMessageID": {
  15314. "type": "string",
  15315. "pattern": "^msg_"
  15316. },
  15317. "callID": {
  15318. "type": "string"
  15319. },
  15320. "tool": {
  15321. "type": "string"
  15322. },
  15323. "input": {
  15324. "type": "object"
  15325. },
  15326. "provider": {
  15327. "type": "object",
  15328. "properties": {
  15329. "executed": {
  15330. "type": "boolean"
  15331. },
  15332. "metadata": {
  15333. "type": "object",
  15334. "additionalProperties": {
  15335. "type": "object"
  15336. }
  15337. }
  15338. },
  15339. "required": ["executed"],
  15340. "additionalProperties": false
  15341. }
  15342. },
  15343. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15344. "additionalProperties": false
  15345. }
  15346. },
  15347. "required": ["id", "type", "properties"],
  15348. "additionalProperties": false
  15349. },
  15350. {
  15351. "type": "object",
  15352. "properties": {
  15353. "id": {
  15354. "type": "string",
  15355. "pattern": "^evt_"
  15356. },
  15357. "type": {
  15358. "type": "string",
  15359. "enum": ["session.next.tool.progress"]
  15360. },
  15361. "properties": {
  15362. "type": "object",
  15363. "properties": {
  15364. "timestamp": {
  15365. "type": "number"
  15366. },
  15367. "sessionID": {
  15368. "type": "string",
  15369. "pattern": "^ses"
  15370. },
  15371. "assistantMessageID": {
  15372. "type": "string",
  15373. "pattern": "^msg_"
  15374. },
  15375. "callID": {
  15376. "type": "string"
  15377. },
  15378. "structured": {
  15379. "type": "object"
  15380. },
  15381. "content": {
  15382. "type": "array",
  15383. "items": {
  15384. "anyOf": [
  15385. {
  15386. "$ref": "#/components/schemas/ToolTextContent"
  15387. },
  15388. {
  15389. "$ref": "#/components/schemas/ToolFileContent"
  15390. }
  15391. ]
  15392. }
  15393. }
  15394. },
  15395. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  15396. "additionalProperties": false
  15397. }
  15398. },
  15399. "required": ["id", "type", "properties"],
  15400. "additionalProperties": false
  15401. },
  15402. {
  15403. "type": "object",
  15404. "properties": {
  15405. "id": {
  15406. "type": "string",
  15407. "pattern": "^evt_"
  15408. },
  15409. "type": {
  15410. "type": "string",
  15411. "enum": ["session.next.tool.success"]
  15412. },
  15413. "properties": {
  15414. "type": "object",
  15415. "properties": {
  15416. "timestamp": {
  15417. "type": "number"
  15418. },
  15419. "sessionID": {
  15420. "type": "string",
  15421. "pattern": "^ses"
  15422. },
  15423. "assistantMessageID": {
  15424. "type": "string",
  15425. "pattern": "^msg_"
  15426. },
  15427. "callID": {
  15428. "type": "string"
  15429. },
  15430. "structured": {
  15431. "type": "object"
  15432. },
  15433. "content": {
  15434. "type": "array",
  15435. "items": {
  15436. "anyOf": [
  15437. {
  15438. "$ref": "#/components/schemas/ToolTextContent"
  15439. },
  15440. {
  15441. "$ref": "#/components/schemas/ToolFileContent"
  15442. }
  15443. ]
  15444. }
  15445. },
  15446. "result": {},
  15447. "provider": {
  15448. "type": "object",
  15449. "properties": {
  15450. "executed": {
  15451. "type": "boolean"
  15452. },
  15453. "metadata": {
  15454. "type": "object",
  15455. "additionalProperties": {
  15456. "type": "object"
  15457. }
  15458. }
  15459. },
  15460. "required": ["executed"],
  15461. "additionalProperties": false
  15462. }
  15463. },
  15464. "required": [
  15465. "timestamp",
  15466. "sessionID",
  15467. "assistantMessageID",
  15468. "callID",
  15469. "structured",
  15470. "content",
  15471. "provider"
  15472. ],
  15473. "additionalProperties": false
  15474. }
  15475. },
  15476. "required": ["id", "type", "properties"],
  15477. "additionalProperties": false
  15478. },
  15479. {
  15480. "type": "object",
  15481. "properties": {
  15482. "id": {
  15483. "type": "string",
  15484. "pattern": "^evt_"
  15485. },
  15486. "type": {
  15487. "type": "string",
  15488. "enum": ["session.next.tool.failed"]
  15489. },
  15490. "properties": {
  15491. "type": "object",
  15492. "properties": {
  15493. "timestamp": {
  15494. "type": "number"
  15495. },
  15496. "sessionID": {
  15497. "type": "string",
  15498. "pattern": "^ses"
  15499. },
  15500. "assistantMessageID": {
  15501. "type": "string",
  15502. "pattern": "^msg_"
  15503. },
  15504. "callID": {
  15505. "type": "string"
  15506. },
  15507. "error": {
  15508. "$ref": "#/components/schemas/SessionErrorUnknown"
  15509. },
  15510. "result": {},
  15511. "provider": {
  15512. "type": "object",
  15513. "properties": {
  15514. "executed": {
  15515. "type": "boolean"
  15516. },
  15517. "metadata": {
  15518. "type": "object",
  15519. "additionalProperties": {
  15520. "type": "object"
  15521. }
  15522. }
  15523. },
  15524. "required": ["executed"],
  15525. "additionalProperties": false
  15526. }
  15527. },
  15528. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  15529. "additionalProperties": false
  15530. }
  15531. },
  15532. "required": ["id", "type", "properties"],
  15533. "additionalProperties": false
  15534. },
  15535. {
  15536. "type": "object",
  15537. "properties": {
  15538. "id": {
  15539. "type": "string",
  15540. "pattern": "^evt_"
  15541. },
  15542. "type": {
  15543. "type": "string",
  15544. "enum": ["session.next.retried"]
  15545. },
  15546. "properties": {
  15547. "type": "object",
  15548. "properties": {
  15549. "timestamp": {
  15550. "type": "number"
  15551. },
  15552. "sessionID": {
  15553. "type": "string",
  15554. "pattern": "^ses"
  15555. },
  15556. "attempt": {
  15557. "type": "number"
  15558. },
  15559. "error": {
  15560. "$ref": "#/components/schemas/SessionNextRetry_error"
  15561. }
  15562. },
  15563. "required": ["timestamp", "sessionID", "attempt", "error"],
  15564. "additionalProperties": false
  15565. }
  15566. },
  15567. "required": ["id", "type", "properties"],
  15568. "additionalProperties": false
  15569. },
  15570. {
  15571. "type": "object",
  15572. "properties": {
  15573. "id": {
  15574. "type": "string",
  15575. "pattern": "^evt_"
  15576. },
  15577. "type": {
  15578. "type": "string",
  15579. "enum": ["session.next.compaction.started"]
  15580. },
  15581. "properties": {
  15582. "type": "object",
  15583. "properties": {
  15584. "timestamp": {
  15585. "type": "number"
  15586. },
  15587. "sessionID": {
  15588. "type": "string",
  15589. "pattern": "^ses"
  15590. },
  15591. "messageID": {
  15592. "type": "string",
  15593. "pattern": "^msg_"
  15594. },
  15595. "reason": {
  15596. "type": "string",
  15597. "enum": ["auto", "manual"]
  15598. }
  15599. },
  15600. "required": ["timestamp", "sessionID", "messageID", "reason"],
  15601. "additionalProperties": false
  15602. }
  15603. },
  15604. "required": ["id", "type", "properties"],
  15605. "additionalProperties": false
  15606. },
  15607. {
  15608. "type": "object",
  15609. "properties": {
  15610. "id": {
  15611. "type": "string",
  15612. "pattern": "^evt_"
  15613. },
  15614. "type": {
  15615. "type": "string",
  15616. "enum": ["session.next.compaction.delta"]
  15617. },
  15618. "properties": {
  15619. "type": "object",
  15620. "properties": {
  15621. "timestamp": {
  15622. "type": "number"
  15623. },
  15624. "sessionID": {
  15625. "type": "string",
  15626. "pattern": "^ses"
  15627. },
  15628. "text": {
  15629. "type": "string"
  15630. }
  15631. },
  15632. "required": ["timestamp", "sessionID", "text"],
  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.compaction.ended"]
  15649. },
  15650. "properties": {
  15651. "type": "object",
  15652. "properties": {
  15653. "timestamp": {
  15654. "type": "number"
  15655. },
  15656. "sessionID": {
  15657. "type": "string",
  15658. "pattern": "^ses"
  15659. },
  15660. "text": {
  15661. "type": "string"
  15662. },
  15663. "include": {
  15664. "type": "string"
  15665. }
  15666. },
  15667. "required": ["timestamp", "sessionID", "text"],
  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": ["message.part.delta"]
  15684. },
  15685. "properties": {
  15686. "type": "object",
  15687. "properties": {
  15688. "sessionID": {
  15689. "type": "string",
  15690. "pattern": "^ses"
  15691. },
  15692. "messageID": {
  15693. "type": "string",
  15694. "pattern": "^msg"
  15695. },
  15696. "partID": {
  15697. "type": "string",
  15698. "pattern": "^prt"
  15699. },
  15700. "field": {
  15701. "type": "string"
  15702. },
  15703. "delta": {
  15704. "type": "string"
  15705. }
  15706. },
  15707. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15708. "additionalProperties": false
  15709. }
  15710. },
  15711. "required": ["id", "type", "properties"],
  15712. "additionalProperties": false
  15713. },
  15714. {
  15715. "type": "object",
  15716. "properties": {
  15717. "id": {
  15718. "type": "string",
  15719. "pattern": "^evt_"
  15720. },
  15721. "type": {
  15722. "type": "string",
  15723. "enum": ["session.diff"]
  15724. },
  15725. "properties": {
  15726. "type": "object",
  15727. "properties": {
  15728. "sessionID": {
  15729. "type": "string",
  15730. "pattern": "^ses"
  15731. },
  15732. "diff": {
  15733. "type": "array",
  15734. "items": {
  15735. "$ref": "#/components/schemas/SnapshotFileDiff"
  15736. }
  15737. }
  15738. },
  15739. "required": ["sessionID", "diff"],
  15740. "additionalProperties": false
  15741. }
  15742. },
  15743. "required": ["id", "type", "properties"],
  15744. "additionalProperties": false
  15745. },
  15746. {
  15747. "type": "object",
  15748. "properties": {
  15749. "id": {
  15750. "type": "string",
  15751. "pattern": "^evt_"
  15752. },
  15753. "type": {
  15754. "type": "string",
  15755. "enum": ["session.error"]
  15756. },
  15757. "properties": {
  15758. "type": "object",
  15759. "properties": {
  15760. "sessionID": {
  15761. "type": "string",
  15762. "pattern": "^ses"
  15763. },
  15764. "error": {
  15765. "anyOf": [
  15766. {
  15767. "$ref": "#/components/schemas/ProviderAuthError"
  15768. },
  15769. {
  15770. "$ref": "#/components/schemas/UnknownError"
  15771. },
  15772. {
  15773. "$ref": "#/components/schemas/MessageOutputLengthError"
  15774. },
  15775. {
  15776. "$ref": "#/components/schemas/MessageAbortedError"
  15777. },
  15778. {
  15779. "$ref": "#/components/schemas/StructuredOutputError"
  15780. },
  15781. {
  15782. "$ref": "#/components/schemas/ContextOverflowError"
  15783. },
  15784. {
  15785. "$ref": "#/components/schemas/APIError"
  15786. }
  15787. ]
  15788. }
  15789. },
  15790. "additionalProperties": false
  15791. }
  15792. },
  15793. "required": ["id", "type", "properties"],
  15794. "additionalProperties": false
  15795. },
  15796. {
  15797. "type": "object",
  15798. "properties": {
  15799. "id": {
  15800. "type": "string",
  15801. "pattern": "^evt_"
  15802. },
  15803. "type": {
  15804. "type": "string",
  15805. "enum": ["installation.updated"]
  15806. },
  15807. "properties": {
  15808. "type": "object",
  15809. "properties": {
  15810. "version": {
  15811. "type": "string"
  15812. }
  15813. },
  15814. "required": ["version"],
  15815. "additionalProperties": false
  15816. }
  15817. },
  15818. "required": ["id", "type", "properties"],
  15819. "additionalProperties": false
  15820. },
  15821. {
  15822. "type": "object",
  15823. "properties": {
  15824. "id": {
  15825. "type": "string",
  15826. "pattern": "^evt_"
  15827. },
  15828. "type": {
  15829. "type": "string",
  15830. "enum": ["installation.update-available"]
  15831. },
  15832. "properties": {
  15833. "type": "object",
  15834. "properties": {
  15835. "version": {
  15836. "type": "string"
  15837. }
  15838. },
  15839. "required": ["version"],
  15840. "additionalProperties": false
  15841. }
  15842. },
  15843. "required": ["id", "type", "properties"],
  15844. "additionalProperties": false
  15845. },
  15846. {
  15847. "type": "object",
  15848. "properties": {
  15849. "id": {
  15850. "type": "string",
  15851. "pattern": "^evt_"
  15852. },
  15853. "type": {
  15854. "type": "string",
  15855. "enum": ["file.edited"]
  15856. },
  15857. "properties": {
  15858. "type": "object",
  15859. "properties": {
  15860. "file": {
  15861. "type": "string"
  15862. }
  15863. },
  15864. "required": ["file"],
  15865. "additionalProperties": false
  15866. }
  15867. },
  15868. "required": ["id", "type", "properties"],
  15869. "additionalProperties": false
  15870. },
  15871. {
  15872. "type": "object",
  15873. "properties": {
  15874. "id": {
  15875. "type": "string",
  15876. "pattern": "^evt_"
  15877. },
  15878. "type": {
  15879. "type": "string",
  15880. "enum": ["account.added"]
  15881. },
  15882. "properties": {
  15883. "type": "object",
  15884. "properties": {
  15885. "account": {
  15886. "$ref": "#/components/schemas/AuthInfo"
  15887. }
  15888. },
  15889. "required": ["account"],
  15890. "additionalProperties": false
  15891. }
  15892. },
  15893. "required": ["id", "type", "properties"],
  15894. "additionalProperties": false
  15895. },
  15896. {
  15897. "type": "object",
  15898. "properties": {
  15899. "id": {
  15900. "type": "string",
  15901. "pattern": "^evt_"
  15902. },
  15903. "type": {
  15904. "type": "string",
  15905. "enum": ["account.removed"]
  15906. },
  15907. "properties": {
  15908. "type": "object",
  15909. "properties": {
  15910. "account": {
  15911. "$ref": "#/components/schemas/AuthInfo"
  15912. }
  15913. },
  15914. "required": ["account"],
  15915. "additionalProperties": false
  15916. }
  15917. },
  15918. "required": ["id", "type", "properties"],
  15919. "additionalProperties": false
  15920. },
  15921. {
  15922. "type": "object",
  15923. "properties": {
  15924. "id": {
  15925. "type": "string",
  15926. "pattern": "^evt_"
  15927. },
  15928. "type": {
  15929. "type": "string",
  15930. "enum": ["account.switched"]
  15931. },
  15932. "properties": {
  15933. "type": "object",
  15934. "properties": {
  15935. "serviceID": {
  15936. "type": "string"
  15937. },
  15938. "from": {
  15939. "type": "string"
  15940. },
  15941. "to": {
  15942. "type": "string"
  15943. }
  15944. },
  15945. "required": ["serviceID"],
  15946. "additionalProperties": false
  15947. }
  15948. },
  15949. "required": ["id", "type", "properties"],
  15950. "additionalProperties": false
  15951. },
  15952. {
  15953. "type": "object",
  15954. "properties": {
  15955. "id": {
  15956. "type": "string",
  15957. "pattern": "^evt_"
  15958. },
  15959. "type": {
  15960. "type": "string",
  15961. "enum": ["permission.v2.asked"]
  15962. },
  15963. "properties": {
  15964. "type": "object",
  15965. "properties": {
  15966. "id": {
  15967. "type": "string",
  15968. "pattern": "^per"
  15969. },
  15970. "sessionID": {
  15971. "type": "string",
  15972. "pattern": "^ses"
  15973. },
  15974. "action": {
  15975. "type": "string"
  15976. },
  15977. "resources": {
  15978. "type": "array",
  15979. "items": {
  15980. "type": "string"
  15981. }
  15982. },
  15983. "save": {
  15984. "type": "array",
  15985. "items": {
  15986. "type": "string"
  15987. }
  15988. },
  15989. "metadata": {
  15990. "type": "object"
  15991. },
  15992. "source": {
  15993. "$ref": "#/components/schemas/PermissionV2Source"
  15994. }
  15995. },
  15996. "required": ["id", "sessionID", "action", "resources"],
  15997. "additionalProperties": false
  15998. }
  15999. },
  16000. "required": ["id", "type", "properties"],
  16001. "additionalProperties": false
  16002. },
  16003. {
  16004. "type": "object",
  16005. "properties": {
  16006. "id": {
  16007. "type": "string",
  16008. "pattern": "^evt_"
  16009. },
  16010. "type": {
  16011. "type": "string",
  16012. "enum": ["permission.v2.replied"]
  16013. },
  16014. "properties": {
  16015. "type": "object",
  16016. "properties": {
  16017. "sessionID": {
  16018. "type": "string",
  16019. "pattern": "^ses"
  16020. },
  16021. "requestID": {
  16022. "type": "string",
  16023. "pattern": "^per"
  16024. },
  16025. "reply": {
  16026. "$ref": "#/components/schemas/PermissionV2Reply"
  16027. }
  16028. },
  16029. "required": ["sessionID", "requestID", "reply"],
  16030. "additionalProperties": false
  16031. }
  16032. },
  16033. "required": ["id", "type", "properties"],
  16034. "additionalProperties": false
  16035. },
  16036. {
  16037. "type": "object",
  16038. "properties": {
  16039. "id": {
  16040. "type": "string",
  16041. "pattern": "^evt_"
  16042. },
  16043. "type": {
  16044. "type": "string",
  16045. "enum": ["file.watcher.updated"]
  16046. },
  16047. "properties": {
  16048. "type": "object",
  16049. "properties": {
  16050. "file": {
  16051. "type": "string"
  16052. },
  16053. "event": {
  16054. "type": "string",
  16055. "enum": ["add", "change", "unlink"]
  16056. }
  16057. },
  16058. "required": ["file", "event"],
  16059. "additionalProperties": false
  16060. }
  16061. },
  16062. "required": ["id", "type", "properties"],
  16063. "additionalProperties": false
  16064. },
  16065. {
  16066. "type": "object",
  16067. "properties": {
  16068. "id": {
  16069. "type": "string",
  16070. "pattern": "^evt_"
  16071. },
  16072. "type": {
  16073. "type": "string",
  16074. "enum": ["pty.created"]
  16075. },
  16076. "properties": {
  16077. "type": "object",
  16078. "properties": {
  16079. "info": {
  16080. "$ref": "#/components/schemas/Pty"
  16081. }
  16082. },
  16083. "required": ["info"],
  16084. "additionalProperties": false
  16085. }
  16086. },
  16087. "required": ["id", "type", "properties"],
  16088. "additionalProperties": false
  16089. },
  16090. {
  16091. "type": "object",
  16092. "properties": {
  16093. "id": {
  16094. "type": "string",
  16095. "pattern": "^evt_"
  16096. },
  16097. "type": {
  16098. "type": "string",
  16099. "enum": ["pty.updated"]
  16100. },
  16101. "properties": {
  16102. "type": "object",
  16103. "properties": {
  16104. "info": {
  16105. "$ref": "#/components/schemas/Pty"
  16106. }
  16107. },
  16108. "required": ["info"],
  16109. "additionalProperties": false
  16110. }
  16111. },
  16112. "required": ["id", "type", "properties"],
  16113. "additionalProperties": false
  16114. },
  16115. {
  16116. "type": "object",
  16117. "properties": {
  16118. "id": {
  16119. "type": "string",
  16120. "pattern": "^evt_"
  16121. },
  16122. "type": {
  16123. "type": "string",
  16124. "enum": ["pty.exited"]
  16125. },
  16126. "properties": {
  16127. "type": "object",
  16128. "properties": {
  16129. "id": {
  16130. "type": "string",
  16131. "pattern": "^pty"
  16132. },
  16133. "exitCode": {
  16134. "type": "integer",
  16135. "minimum": 0
  16136. }
  16137. },
  16138. "required": ["id", "exitCode"],
  16139. "additionalProperties": false
  16140. }
  16141. },
  16142. "required": ["id", "type", "properties"],
  16143. "additionalProperties": false
  16144. },
  16145. {
  16146. "type": "object",
  16147. "properties": {
  16148. "id": {
  16149. "type": "string",
  16150. "pattern": "^evt_"
  16151. },
  16152. "type": {
  16153. "type": "string",
  16154. "enum": ["pty.deleted"]
  16155. },
  16156. "properties": {
  16157. "type": "object",
  16158. "properties": {
  16159. "id": {
  16160. "type": "string",
  16161. "pattern": "^pty"
  16162. }
  16163. },
  16164. "required": ["id"],
  16165. "additionalProperties": false
  16166. }
  16167. },
  16168. "required": ["id", "type", "properties"],
  16169. "additionalProperties": false
  16170. },
  16171. {
  16172. "type": "object",
  16173. "properties": {
  16174. "id": {
  16175. "type": "string",
  16176. "pattern": "^evt_"
  16177. },
  16178. "type": {
  16179. "type": "string",
  16180. "enum": ["question.v2.asked"]
  16181. },
  16182. "properties": {
  16183. "type": "object",
  16184. "properties": {
  16185. "id": {
  16186. "type": "string",
  16187. "pattern": "^que"
  16188. },
  16189. "sessionID": {
  16190. "type": "string",
  16191. "pattern": "^ses"
  16192. },
  16193. "questions": {
  16194. "type": "array",
  16195. "items": {
  16196. "$ref": "#/components/schemas/QuestionV2Info"
  16197. },
  16198. "description": "Questions to ask"
  16199. },
  16200. "tool": {
  16201. "$ref": "#/components/schemas/QuestionV2Tool"
  16202. }
  16203. },
  16204. "required": ["id", "sessionID", "questions"],
  16205. "additionalProperties": false
  16206. }
  16207. },
  16208. "required": ["id", "type", "properties"],
  16209. "additionalProperties": false
  16210. },
  16211. {
  16212. "type": "object",
  16213. "properties": {
  16214. "id": {
  16215. "type": "string",
  16216. "pattern": "^evt_"
  16217. },
  16218. "type": {
  16219. "type": "string",
  16220. "enum": ["question.v2.replied"]
  16221. },
  16222. "properties": {
  16223. "type": "object",
  16224. "properties": {
  16225. "sessionID": {
  16226. "type": "string",
  16227. "pattern": "^ses"
  16228. },
  16229. "requestID": {
  16230. "type": "string",
  16231. "pattern": "^que"
  16232. },
  16233. "answers": {
  16234. "type": "array",
  16235. "items": {
  16236. "$ref": "#/components/schemas/QuestionV2Answer"
  16237. }
  16238. }
  16239. },
  16240. "required": ["sessionID", "requestID", "answers"],
  16241. "additionalProperties": false
  16242. }
  16243. },
  16244. "required": ["id", "type", "properties"],
  16245. "additionalProperties": false
  16246. },
  16247. {
  16248. "type": "object",
  16249. "properties": {
  16250. "id": {
  16251. "type": "string",
  16252. "pattern": "^evt_"
  16253. },
  16254. "type": {
  16255. "type": "string",
  16256. "enum": ["question.v2.rejected"]
  16257. },
  16258. "properties": {
  16259. "type": "object",
  16260. "properties": {
  16261. "sessionID": {
  16262. "type": "string",
  16263. "pattern": "^ses"
  16264. },
  16265. "requestID": {
  16266. "type": "string",
  16267. "pattern": "^que"
  16268. }
  16269. },
  16270. "required": ["sessionID", "requestID"],
  16271. "additionalProperties": false
  16272. }
  16273. },
  16274. "required": ["id", "type", "properties"],
  16275. "additionalProperties": false
  16276. },
  16277. {
  16278. "type": "object",
  16279. "properties": {
  16280. "id": {
  16281. "type": "string",
  16282. "pattern": "^evt_"
  16283. },
  16284. "type": {
  16285. "type": "string",
  16286. "enum": ["todo.updated"]
  16287. },
  16288. "properties": {
  16289. "type": "object",
  16290. "properties": {
  16291. "sessionID": {
  16292. "type": "string",
  16293. "pattern": "^ses"
  16294. },
  16295. "todos": {
  16296. "type": "array",
  16297. "items": {
  16298. "$ref": "#/components/schemas/Todo"
  16299. }
  16300. }
  16301. },
  16302. "required": ["sessionID", "todos"],
  16303. "additionalProperties": false
  16304. }
  16305. },
  16306. "required": ["id", "type", "properties"],
  16307. "additionalProperties": false
  16308. },
  16309. {
  16310. "type": "object",
  16311. "properties": {
  16312. "id": {
  16313. "type": "string",
  16314. "pattern": "^evt_"
  16315. },
  16316. "type": {
  16317. "type": "string",
  16318. "enum": ["lsp.updated"]
  16319. },
  16320. "properties": {
  16321. "type": "object",
  16322. "properties": {}
  16323. }
  16324. },
  16325. "required": ["id", "type", "properties"],
  16326. "additionalProperties": false
  16327. },
  16328. {
  16329. "type": "object",
  16330. "properties": {
  16331. "id": {
  16332. "type": "string",
  16333. "pattern": "^evt_"
  16334. },
  16335. "type": {
  16336. "type": "string",
  16337. "enum": ["permission.asked"]
  16338. },
  16339. "properties": {
  16340. "type": "object",
  16341. "properties": {
  16342. "id": {
  16343. "type": "string",
  16344. "pattern": "^per"
  16345. },
  16346. "sessionID": {
  16347. "type": "string",
  16348. "pattern": "^ses"
  16349. },
  16350. "permission": {
  16351. "type": "string"
  16352. },
  16353. "patterns": {
  16354. "type": "array",
  16355. "items": {
  16356. "type": "string"
  16357. }
  16358. },
  16359. "metadata": {
  16360. "type": "object"
  16361. },
  16362. "always": {
  16363. "type": "array",
  16364. "items": {
  16365. "type": "string"
  16366. }
  16367. },
  16368. "tool": {
  16369. "type": "object",
  16370. "properties": {
  16371. "messageID": {
  16372. "type": "string"
  16373. },
  16374. "callID": {
  16375. "type": "string"
  16376. }
  16377. },
  16378. "required": ["messageID", "callID"],
  16379. "additionalProperties": false
  16380. }
  16381. },
  16382. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  16383. "additionalProperties": false
  16384. }
  16385. },
  16386. "required": ["id", "type", "properties"],
  16387. "additionalProperties": false
  16388. },
  16389. {
  16390. "type": "object",
  16391. "properties": {
  16392. "id": {
  16393. "type": "string",
  16394. "pattern": "^evt_"
  16395. },
  16396. "type": {
  16397. "type": "string",
  16398. "enum": ["permission.replied"]
  16399. },
  16400. "properties": {
  16401. "type": "object",
  16402. "properties": {
  16403. "sessionID": {
  16404. "type": "string",
  16405. "pattern": "^ses"
  16406. },
  16407. "requestID": {
  16408. "type": "string",
  16409. "pattern": "^per"
  16410. },
  16411. "reply": {
  16412. "type": "string",
  16413. "enum": ["once", "always", "reject"]
  16414. }
  16415. },
  16416. "required": ["sessionID", "requestID", "reply"],
  16417. "additionalProperties": false
  16418. }
  16419. },
  16420. "required": ["id", "type", "properties"],
  16421. "additionalProperties": false
  16422. },
  16423. {
  16424. "type": "object",
  16425. "properties": {
  16426. "id": {
  16427. "type": "string",
  16428. "pattern": "^evt_"
  16429. },
  16430. "type": {
  16431. "type": "string",
  16432. "enum": ["tui.prompt.append"]
  16433. },
  16434. "properties": {
  16435. "type": "object",
  16436. "properties": {
  16437. "text": {
  16438. "type": "string"
  16439. }
  16440. },
  16441. "required": ["text"],
  16442. "additionalProperties": false
  16443. }
  16444. },
  16445. "required": ["id", "type", "properties"],
  16446. "additionalProperties": false
  16447. },
  16448. {
  16449. "type": "object",
  16450. "properties": {
  16451. "id": {
  16452. "type": "string",
  16453. "pattern": "^evt_"
  16454. },
  16455. "type": {
  16456. "type": "string",
  16457. "enum": ["tui.command.execute"]
  16458. },
  16459. "properties": {
  16460. "type": "object",
  16461. "properties": {
  16462. "command": {
  16463. "anyOf": [
  16464. {
  16465. "type": "string",
  16466. "enum": [
  16467. "session.list",
  16468. "session.new",
  16469. "session.share",
  16470. "session.interrupt",
  16471. "session.compact",
  16472. "session.page.up",
  16473. "session.page.down",
  16474. "session.line.up",
  16475. "session.line.down",
  16476. "session.half.page.up",
  16477. "session.half.page.down",
  16478. "session.first",
  16479. "session.last",
  16480. "prompt.clear",
  16481. "prompt.submit",
  16482. "agent.cycle"
  16483. ]
  16484. },
  16485. {
  16486. "type": "string"
  16487. }
  16488. ]
  16489. }
  16490. },
  16491. "required": ["command"],
  16492. "additionalProperties": false
  16493. }
  16494. },
  16495. "required": ["id", "type", "properties"],
  16496. "additionalProperties": false
  16497. },
  16498. {
  16499. "type": "object",
  16500. "properties": {
  16501. "id": {
  16502. "type": "string",
  16503. "pattern": "^evt_"
  16504. },
  16505. "type": {
  16506. "type": "string",
  16507. "enum": ["tui.toast.show"]
  16508. },
  16509. "properties": {
  16510. "type": "object",
  16511. "properties": {
  16512. "title": {
  16513. "type": "string"
  16514. },
  16515. "message": {
  16516. "type": "string"
  16517. },
  16518. "variant": {
  16519. "type": "string",
  16520. "enum": ["info", "success", "warning", "error"]
  16521. },
  16522. "duration": {
  16523. "type": "integer",
  16524. "exclusiveMinimum": 0
  16525. }
  16526. },
  16527. "required": ["message", "variant"],
  16528. "additionalProperties": false
  16529. }
  16530. },
  16531. "required": ["id", "type", "properties"],
  16532. "additionalProperties": false
  16533. },
  16534. {
  16535. "type": "object",
  16536. "properties": {
  16537. "id": {
  16538. "type": "string",
  16539. "pattern": "^evt_"
  16540. },
  16541. "type": {
  16542. "type": "string",
  16543. "enum": ["tui.session.select"]
  16544. },
  16545. "properties": {
  16546. "type": "object",
  16547. "properties": {
  16548. "sessionID": {
  16549. "type": "string",
  16550. "pattern": "^ses",
  16551. "description": "Session ID to navigate to"
  16552. }
  16553. },
  16554. "required": ["sessionID"],
  16555. "additionalProperties": false
  16556. }
  16557. },
  16558. "required": ["id", "type", "properties"],
  16559. "additionalProperties": false
  16560. },
  16561. {
  16562. "type": "object",
  16563. "properties": {
  16564. "id": {
  16565. "type": "string",
  16566. "pattern": "^evt_"
  16567. },
  16568. "type": {
  16569. "type": "string",
  16570. "enum": ["mcp.tools.changed"]
  16571. },
  16572. "properties": {
  16573. "type": "object",
  16574. "properties": {
  16575. "server": {
  16576. "type": "string"
  16577. }
  16578. },
  16579. "required": ["server"],
  16580. "additionalProperties": false
  16581. }
  16582. },
  16583. "required": ["id", "type", "properties"],
  16584. "additionalProperties": false
  16585. },
  16586. {
  16587. "type": "object",
  16588. "properties": {
  16589. "id": {
  16590. "type": "string",
  16591. "pattern": "^evt_"
  16592. },
  16593. "type": {
  16594. "type": "string",
  16595. "enum": ["mcp.browser.open.failed"]
  16596. },
  16597. "properties": {
  16598. "type": "object",
  16599. "properties": {
  16600. "mcpName": {
  16601. "type": "string"
  16602. },
  16603. "url": {
  16604. "type": "string"
  16605. }
  16606. },
  16607. "required": ["mcpName", "url"],
  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": ["command.executed"]
  16624. },
  16625. "properties": {
  16626. "type": "object",
  16627. "properties": {
  16628. "name": {
  16629. "type": "string"
  16630. },
  16631. "sessionID": {
  16632. "type": "string",
  16633. "pattern": "^ses"
  16634. },
  16635. "arguments": {
  16636. "type": "string"
  16637. },
  16638. "messageID": {
  16639. "type": "string",
  16640. "pattern": "^msg"
  16641. }
  16642. },
  16643. "required": ["name", "sessionID", "arguments", "messageID"],
  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": ["project.directories.updated"]
  16660. },
  16661. "properties": {
  16662. "type": "object",
  16663. "properties": {
  16664. "projectID": {
  16665. "type": "string"
  16666. }
  16667. },
  16668. "required": ["projectID"],
  16669. "additionalProperties": false
  16670. }
  16671. },
  16672. "required": ["id", "type", "properties"],
  16673. "additionalProperties": false
  16674. },
  16675. {
  16676. "type": "object",
  16677. "properties": {
  16678. "id": {
  16679. "type": "string",
  16680. "pattern": "^evt_"
  16681. },
  16682. "type": {
  16683. "type": "string",
  16684. "enum": ["project.updated"]
  16685. },
  16686. "properties": {
  16687. "type": "object",
  16688. "properties": {
  16689. "id": {
  16690. "type": "string"
  16691. },
  16692. "worktree": {
  16693. "type": "string"
  16694. },
  16695. "vcs": {
  16696. "type": "string",
  16697. "enum": ["git"]
  16698. },
  16699. "name": {
  16700. "type": "string"
  16701. },
  16702. "icon": {
  16703. "type": "object",
  16704. "properties": {
  16705. "url": {
  16706. "type": "string"
  16707. },
  16708. "override": {
  16709. "type": "string"
  16710. },
  16711. "color": {
  16712. "type": "string"
  16713. }
  16714. },
  16715. "additionalProperties": false
  16716. },
  16717. "commands": {
  16718. "type": "object",
  16719. "properties": {
  16720. "start": {
  16721. "type": "string",
  16722. "description": "Startup script to run when creating a new workspace (worktree)"
  16723. }
  16724. },
  16725. "additionalProperties": false
  16726. },
  16727. "time": {
  16728. "type": "object",
  16729. "properties": {
  16730. "created": {
  16731. "type": "integer",
  16732. "minimum": 0
  16733. },
  16734. "updated": {
  16735. "type": "integer",
  16736. "minimum": 0
  16737. },
  16738. "initialized": {
  16739. "type": "integer",
  16740. "minimum": 0
  16741. }
  16742. },
  16743. "required": ["created", "updated"],
  16744. "additionalProperties": false
  16745. },
  16746. "sandboxes": {
  16747. "type": "array",
  16748. "items": {
  16749. "type": "string"
  16750. }
  16751. }
  16752. },
  16753. "required": ["id", "worktree", "time", "sandboxes"],
  16754. "additionalProperties": false
  16755. }
  16756. },
  16757. "required": ["id", "type", "properties"],
  16758. "additionalProperties": false
  16759. },
  16760. {
  16761. "type": "object",
  16762. "properties": {
  16763. "id": {
  16764. "type": "string",
  16765. "pattern": "^evt_"
  16766. },
  16767. "type": {
  16768. "type": "string",
  16769. "enum": ["question.asked"]
  16770. },
  16771. "properties": {
  16772. "type": "object",
  16773. "properties": {
  16774. "id": {
  16775. "type": "string",
  16776. "pattern": "^que"
  16777. },
  16778. "sessionID": {
  16779. "type": "string",
  16780. "pattern": "^ses"
  16781. },
  16782. "questions": {
  16783. "type": "array",
  16784. "items": {
  16785. "$ref": "#/components/schemas/QuestionInfo"
  16786. },
  16787. "description": "Questions to ask"
  16788. },
  16789. "tool": {
  16790. "$ref": "#/components/schemas/QuestionTool"
  16791. }
  16792. },
  16793. "required": ["id", "sessionID", "questions"],
  16794. "additionalProperties": false
  16795. }
  16796. },
  16797. "required": ["id", "type", "properties"],
  16798. "additionalProperties": false
  16799. },
  16800. {
  16801. "type": "object",
  16802. "properties": {
  16803. "id": {
  16804. "type": "string",
  16805. "pattern": "^evt_"
  16806. },
  16807. "type": {
  16808. "type": "string",
  16809. "enum": ["question.replied"]
  16810. },
  16811. "properties": {
  16812. "type": "object",
  16813. "properties": {
  16814. "sessionID": {
  16815. "type": "string",
  16816. "pattern": "^ses"
  16817. },
  16818. "requestID": {
  16819. "type": "string",
  16820. "pattern": "^que"
  16821. },
  16822. "answers": {
  16823. "type": "array",
  16824. "items": {
  16825. "$ref": "#/components/schemas/QuestionAnswer"
  16826. }
  16827. }
  16828. },
  16829. "required": ["sessionID", "requestID", "answers"],
  16830. "additionalProperties": false
  16831. }
  16832. },
  16833. "required": ["id", "type", "properties"],
  16834. "additionalProperties": false
  16835. },
  16836. {
  16837. "type": "object",
  16838. "properties": {
  16839. "id": {
  16840. "type": "string",
  16841. "pattern": "^evt_"
  16842. },
  16843. "type": {
  16844. "type": "string",
  16845. "enum": ["question.rejected"]
  16846. },
  16847. "properties": {
  16848. "type": "object",
  16849. "properties": {
  16850. "sessionID": {
  16851. "type": "string",
  16852. "pattern": "^ses"
  16853. },
  16854. "requestID": {
  16855. "type": "string",
  16856. "pattern": "^que"
  16857. }
  16858. },
  16859. "required": ["sessionID", "requestID"],
  16860. "additionalProperties": false
  16861. }
  16862. },
  16863. "required": ["id", "type", "properties"],
  16864. "additionalProperties": false
  16865. },
  16866. {
  16867. "type": "object",
  16868. "properties": {
  16869. "id": {
  16870. "type": "string",
  16871. "pattern": "^evt_"
  16872. },
  16873. "type": {
  16874. "type": "string",
  16875. "enum": ["session.status"]
  16876. },
  16877. "properties": {
  16878. "type": "object",
  16879. "properties": {
  16880. "sessionID": {
  16881. "type": "string",
  16882. "pattern": "^ses"
  16883. },
  16884. "status": {
  16885. "$ref": "#/components/schemas/SessionStatus"
  16886. }
  16887. },
  16888. "required": ["sessionID", "status"],
  16889. "additionalProperties": false
  16890. }
  16891. },
  16892. "required": ["id", "type", "properties"],
  16893. "additionalProperties": false
  16894. },
  16895. {
  16896. "type": "object",
  16897. "properties": {
  16898. "id": {
  16899. "type": "string",
  16900. "pattern": "^evt_"
  16901. },
  16902. "type": {
  16903. "type": "string",
  16904. "enum": ["session.idle"]
  16905. },
  16906. "properties": {
  16907. "type": "object",
  16908. "properties": {
  16909. "sessionID": {
  16910. "type": "string",
  16911. "pattern": "^ses"
  16912. }
  16913. },
  16914. "required": ["sessionID"],
  16915. "additionalProperties": false
  16916. }
  16917. },
  16918. "required": ["id", "type", "properties"],
  16919. "additionalProperties": false
  16920. },
  16921. {
  16922. "type": "object",
  16923. "properties": {
  16924. "id": {
  16925. "type": "string",
  16926. "pattern": "^evt_"
  16927. },
  16928. "type": {
  16929. "type": "string",
  16930. "enum": ["session.compacted"]
  16931. },
  16932. "properties": {
  16933. "type": "object",
  16934. "properties": {
  16935. "sessionID": {
  16936. "type": "string",
  16937. "pattern": "^ses"
  16938. }
  16939. },
  16940. "required": ["sessionID"],
  16941. "additionalProperties": false
  16942. }
  16943. },
  16944. "required": ["id", "type", "properties"],
  16945. "additionalProperties": false
  16946. },
  16947. {
  16948. "type": "object",
  16949. "properties": {
  16950. "id": {
  16951. "type": "string",
  16952. "pattern": "^evt_"
  16953. },
  16954. "type": {
  16955. "type": "string",
  16956. "enum": ["vcs.branch.updated"]
  16957. },
  16958. "properties": {
  16959. "type": "object",
  16960. "properties": {
  16961. "branch": {
  16962. "type": "string"
  16963. }
  16964. },
  16965. "additionalProperties": false
  16966. }
  16967. },
  16968. "required": ["id", "type", "properties"],
  16969. "additionalProperties": false
  16970. },
  16971. {
  16972. "type": "object",
  16973. "properties": {
  16974. "id": {
  16975. "type": "string",
  16976. "pattern": "^evt_"
  16977. },
  16978. "type": {
  16979. "type": "string",
  16980. "enum": ["worktree.ready"]
  16981. },
  16982. "properties": {
  16983. "type": "object",
  16984. "properties": {
  16985. "name": {
  16986. "type": "string"
  16987. },
  16988. "branch": {
  16989. "type": "string"
  16990. }
  16991. },
  16992. "required": ["name"],
  16993. "additionalProperties": false
  16994. }
  16995. },
  16996. "required": ["id", "type", "properties"],
  16997. "additionalProperties": false
  16998. },
  16999. {
  17000. "type": "object",
  17001. "properties": {
  17002. "id": {
  17003. "type": "string",
  17004. "pattern": "^evt_"
  17005. },
  17006. "type": {
  17007. "type": "string",
  17008. "enum": ["worktree.failed"]
  17009. },
  17010. "properties": {
  17011. "type": "object",
  17012. "properties": {
  17013. "message": {
  17014. "type": "string"
  17015. }
  17016. },
  17017. "required": ["message"],
  17018. "additionalProperties": false
  17019. }
  17020. },
  17021. "required": ["id", "type", "properties"],
  17022. "additionalProperties": false
  17023. },
  17024. {
  17025. "type": "object",
  17026. "properties": {
  17027. "id": {
  17028. "type": "string",
  17029. "pattern": "^evt_"
  17030. },
  17031. "type": {
  17032. "type": "string",
  17033. "enum": ["workspace.ready"]
  17034. },
  17035. "properties": {
  17036. "type": "object",
  17037. "properties": {
  17038. "name": {
  17039. "type": "string"
  17040. }
  17041. },
  17042. "required": ["name"],
  17043. "additionalProperties": false
  17044. }
  17045. },
  17046. "required": ["id", "type", "properties"],
  17047. "additionalProperties": false
  17048. },
  17049. {
  17050. "type": "object",
  17051. "properties": {
  17052. "id": {
  17053. "type": "string",
  17054. "pattern": "^evt_"
  17055. },
  17056. "type": {
  17057. "type": "string",
  17058. "enum": ["workspace.failed"]
  17059. },
  17060. "properties": {
  17061. "type": "object",
  17062. "properties": {
  17063. "message": {
  17064. "type": "string"
  17065. }
  17066. },
  17067. "required": ["message"],
  17068. "additionalProperties": false
  17069. }
  17070. },
  17071. "required": ["id", "type", "properties"],
  17072. "additionalProperties": false
  17073. },
  17074. {
  17075. "type": "object",
  17076. "properties": {
  17077. "id": {
  17078. "type": "string",
  17079. "pattern": "^evt_"
  17080. },
  17081. "type": {
  17082. "type": "string",
  17083. "enum": ["workspace.status"]
  17084. },
  17085. "properties": {
  17086. "type": "object",
  17087. "properties": {
  17088. "workspaceID": {
  17089. "type": "string",
  17090. "pattern": "^wrk"
  17091. },
  17092. "status": {
  17093. "type": "string",
  17094. "enum": ["connected", "connecting", "disconnected", "error"]
  17095. }
  17096. },
  17097. "required": ["workspaceID", "status"],
  17098. "additionalProperties": false
  17099. }
  17100. },
  17101. "required": ["id", "type", "properties"],
  17102. "additionalProperties": false
  17103. },
  17104. {
  17105. "type": "object",
  17106. "properties": {
  17107. "id": {
  17108. "type": "string",
  17109. "pattern": "^evt_"
  17110. },
  17111. "type": {
  17112. "type": "string",
  17113. "enum": ["server.connected"]
  17114. },
  17115. "properties": {
  17116. "type": "object",
  17117. "properties": {}
  17118. }
  17119. },
  17120. "required": ["id", "type", "properties"],
  17121. "additionalProperties": false
  17122. },
  17123. {
  17124. "type": "object",
  17125. "properties": {
  17126. "id": {
  17127. "type": "string",
  17128. "pattern": "^evt_"
  17129. },
  17130. "type": {
  17131. "type": "string",
  17132. "enum": ["global.disposed"]
  17133. },
  17134. "properties": {
  17135. "type": "object",
  17136. "properties": {}
  17137. }
  17138. },
  17139. "required": ["id", "type", "properties"],
  17140. "additionalProperties": false
  17141. },
  17142. {
  17143. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  17144. },
  17145. {
  17146. "$ref": "#/components/schemas/SyncEventSessionCreated"
  17147. },
  17148. {
  17149. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  17150. },
  17151. {
  17152. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  17153. },
  17154. {
  17155. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  17156. },
  17157. {
  17158. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  17159. },
  17160. {
  17161. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  17162. },
  17163. {
  17164. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  17165. },
  17166. {
  17167. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  17168. },
  17169. {
  17170. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  17171. },
  17172. {
  17173. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  17174. },
  17175. {
  17176. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  17177. },
  17178. {
  17179. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  17180. },
  17181. {
  17182. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  17183. },
  17184. {
  17185. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  17186. },
  17187. {
  17188. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  17189. },
  17190. {
  17191. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  17192. },
  17193. {
  17194. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  17195. },
  17196. {
  17197. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  17198. },
  17199. {
  17200. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  17201. },
  17202. {
  17203. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  17204. },
  17205. {
  17206. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  17207. },
  17208. {
  17209. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  17210. },
  17211. {
  17212. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  17213. },
  17214. {
  17215. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  17216. },
  17217. {
  17218. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  17219. },
  17220. {
  17221. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  17222. },
  17223. {
  17224. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  17225. },
  17226. {
  17227. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  17228. },
  17229. {
  17230. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  17231. },
  17232. {
  17233. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  17234. },
  17235. {
  17236. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  17237. },
  17238. {
  17239. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  17240. },
  17241. {
  17242. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  17243. },
  17244. {
  17245. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  17246. }
  17247. ]
  17248. }
  17249. },
  17250. "required": ["directory", "payload"],
  17251. "additionalProperties": false
  17252. },
  17253. "LogLevel": {
  17254. "type": "string",
  17255. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  17256. "description": "Log level"
  17257. },
  17258. "ServerConfig": {
  17259. "type": "object",
  17260. "properties": {
  17261. "port": {
  17262. "type": "integer",
  17263. "exclusiveMinimum": 0
  17264. },
  17265. "hostname": {
  17266. "type": "string"
  17267. },
  17268. "mdns": {
  17269. "type": "boolean"
  17270. },
  17271. "mdnsDomain": {
  17272. "type": "string"
  17273. },
  17274. "cors": {
  17275. "type": "array",
  17276. "items": {
  17277. "type": "string"
  17278. }
  17279. }
  17280. },
  17281. "additionalProperties": false,
  17282. "description": "Server configuration for opencode serve and web commands"
  17283. },
  17284. "ReferenceConfigEntry": {
  17285. "anyOf": [
  17286. {
  17287. "type": "string"
  17288. },
  17289. {
  17290. "type": "object",
  17291. "properties": {
  17292. "repository": {
  17293. "type": "string",
  17294. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  17295. },
  17296. "branch": {
  17297. "type": "string"
  17298. }
  17299. },
  17300. "required": ["repository"],
  17301. "additionalProperties": false
  17302. },
  17303. {
  17304. "type": "object",
  17305. "properties": {
  17306. "path": {
  17307. "type": "string",
  17308. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  17309. }
  17310. },
  17311. "required": ["path"],
  17312. "additionalProperties": false
  17313. }
  17314. ]
  17315. },
  17316. "ReferenceConfig": {
  17317. "type": "object",
  17318. "additionalProperties": {
  17319. "$ref": "#/components/schemas/ReferenceConfigEntry"
  17320. }
  17321. },
  17322. "PermissionActionConfig": {
  17323. "type": "string",
  17324. "enum": ["ask", "allow", "deny"]
  17325. },
  17326. "PermissionObjectConfig": {
  17327. "type": "object",
  17328. "additionalProperties": {
  17329. "$ref": "#/components/schemas/PermissionActionConfig"
  17330. }
  17331. },
  17332. "PermissionRuleConfig": {
  17333. "anyOf": [
  17334. {
  17335. "$ref": "#/components/schemas/PermissionActionConfig"
  17336. },
  17337. {
  17338. "$ref": "#/components/schemas/PermissionObjectConfig"
  17339. }
  17340. ]
  17341. },
  17342. "PermissionConfig": {
  17343. "anyOf": [
  17344. {
  17345. "$ref": "#/components/schemas/PermissionActionConfig"
  17346. },
  17347. {
  17348. "type": "object",
  17349. "properties": {
  17350. "read": {
  17351. "$ref": "#/components/schemas/PermissionRuleConfig"
  17352. },
  17353. "edit": {
  17354. "$ref": "#/components/schemas/PermissionRuleConfig"
  17355. },
  17356. "glob": {
  17357. "$ref": "#/components/schemas/PermissionRuleConfig"
  17358. },
  17359. "grep": {
  17360. "$ref": "#/components/schemas/PermissionRuleConfig"
  17361. },
  17362. "list": {
  17363. "$ref": "#/components/schemas/PermissionRuleConfig"
  17364. },
  17365. "bash": {
  17366. "$ref": "#/components/schemas/PermissionRuleConfig"
  17367. },
  17368. "task": {
  17369. "$ref": "#/components/schemas/PermissionRuleConfig"
  17370. },
  17371. "external_directory": {
  17372. "$ref": "#/components/schemas/PermissionRuleConfig"
  17373. },
  17374. "todowrite": {
  17375. "$ref": "#/components/schemas/PermissionActionConfig"
  17376. },
  17377. "question": {
  17378. "$ref": "#/components/schemas/PermissionActionConfig"
  17379. },
  17380. "webfetch": {
  17381. "$ref": "#/components/schemas/PermissionActionConfig"
  17382. },
  17383. "websearch": {
  17384. "$ref": "#/components/schemas/PermissionActionConfig"
  17385. },
  17386. "lsp": {
  17387. "$ref": "#/components/schemas/PermissionRuleConfig"
  17388. },
  17389. "doom_loop": {
  17390. "$ref": "#/components/schemas/PermissionActionConfig"
  17391. },
  17392. "skill": {
  17393. "$ref": "#/components/schemas/PermissionRuleConfig"
  17394. }
  17395. },
  17396. "additionalProperties": {
  17397. "$ref": "#/components/schemas/PermissionRuleConfig"
  17398. }
  17399. }
  17400. ]
  17401. },
  17402. "AgentConfig": {
  17403. "type": "object",
  17404. "properties": {
  17405. "model": {
  17406. "type": "string"
  17407. },
  17408. "variant": {
  17409. "type": "string"
  17410. },
  17411. "temperature": {
  17412. "type": "number"
  17413. },
  17414. "top_p": {
  17415. "type": "number"
  17416. },
  17417. "prompt": {
  17418. "type": "string"
  17419. },
  17420. "tools": {
  17421. "type": "object",
  17422. "additionalProperties": {
  17423. "type": "boolean"
  17424. }
  17425. },
  17426. "disable": {
  17427. "type": "boolean"
  17428. },
  17429. "description": {
  17430. "type": "string"
  17431. },
  17432. "mode": {
  17433. "type": "string",
  17434. "enum": ["subagent", "primary", "all"]
  17435. },
  17436. "hidden": {
  17437. "type": "boolean"
  17438. },
  17439. "options": {
  17440. "type": "object"
  17441. },
  17442. "color": {
  17443. "anyOf": [
  17444. {
  17445. "type": "string",
  17446. "pattern": "^#[0-9a-fA-F]{6}$"
  17447. },
  17448. {
  17449. "type": "string",
  17450. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  17451. }
  17452. ],
  17453. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  17454. },
  17455. "steps": {
  17456. "type": "integer",
  17457. "exclusiveMinimum": 0
  17458. },
  17459. "maxSteps": {
  17460. "type": "integer",
  17461. "exclusiveMinimum": 0
  17462. },
  17463. "permission": {
  17464. "$ref": "#/components/schemas/PermissionConfig"
  17465. }
  17466. },
  17467. "additionalProperties": {}
  17468. },
  17469. "ProviderConfig": {
  17470. "type": "object",
  17471. "properties": {
  17472. "api": {
  17473. "type": "string"
  17474. },
  17475. "name": {
  17476. "type": "string"
  17477. },
  17478. "env": {
  17479. "type": "array",
  17480. "items": {
  17481. "type": "string"
  17482. }
  17483. },
  17484. "id": {
  17485. "type": "string"
  17486. },
  17487. "npm": {
  17488. "type": "string"
  17489. },
  17490. "whitelist": {
  17491. "type": "array",
  17492. "items": {
  17493. "type": "string"
  17494. }
  17495. },
  17496. "blacklist": {
  17497. "type": "array",
  17498. "items": {
  17499. "type": "string"
  17500. }
  17501. },
  17502. "options": {
  17503. "type": "object",
  17504. "properties": {
  17505. "apiKey": {
  17506. "type": "string"
  17507. },
  17508. "baseURL": {
  17509. "type": "string"
  17510. },
  17511. "enterpriseUrl": {
  17512. "type": "string"
  17513. },
  17514. "setCacheKey": {
  17515. "type": "boolean"
  17516. },
  17517. "timeout": {
  17518. "anyOf": [
  17519. {
  17520. "type": "integer",
  17521. "exclusiveMinimum": 0
  17522. },
  17523. {
  17524. "type": "boolean",
  17525. "enum": [false]
  17526. }
  17527. ],
  17528. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  17529. },
  17530. "headerTimeout": {
  17531. "anyOf": [
  17532. {
  17533. "type": "integer",
  17534. "exclusiveMinimum": 0
  17535. },
  17536. {
  17537. "type": "boolean",
  17538. "enum": [false]
  17539. }
  17540. ],
  17541. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  17542. },
  17543. "chunkTimeout": {
  17544. "type": "integer",
  17545. "exclusiveMinimum": 0
  17546. }
  17547. },
  17548. "additionalProperties": {}
  17549. },
  17550. "models": {
  17551. "type": "object",
  17552. "additionalProperties": {
  17553. "type": "object",
  17554. "properties": {
  17555. "id": {
  17556. "type": "string"
  17557. },
  17558. "name": {
  17559. "type": "string"
  17560. },
  17561. "family": {
  17562. "type": "string"
  17563. },
  17564. "release_date": {
  17565. "type": "string"
  17566. },
  17567. "attachment": {
  17568. "type": "boolean"
  17569. },
  17570. "reasoning": {
  17571. "type": "boolean"
  17572. },
  17573. "temperature": {
  17574. "type": "boolean"
  17575. },
  17576. "tool_call": {
  17577. "type": "boolean"
  17578. },
  17579. "interleaved": {
  17580. "anyOf": [
  17581. {
  17582. "type": "boolean",
  17583. "enum": [true]
  17584. },
  17585. {
  17586. "type": "object",
  17587. "properties": {
  17588. "field": {
  17589. "type": "string",
  17590. "enum": ["reasoning_content", "reasoning_details"]
  17591. }
  17592. },
  17593. "required": ["field"],
  17594. "additionalProperties": false
  17595. }
  17596. ]
  17597. },
  17598. "cost": {
  17599. "type": "object",
  17600. "properties": {
  17601. "input": {
  17602. "type": "number"
  17603. },
  17604. "output": {
  17605. "type": "number"
  17606. },
  17607. "cache_read": {
  17608. "type": "number"
  17609. },
  17610. "cache_write": {
  17611. "type": "number"
  17612. },
  17613. "context_over_200k": {
  17614. "type": "object",
  17615. "properties": {
  17616. "input": {
  17617. "type": "number"
  17618. },
  17619. "output": {
  17620. "type": "number"
  17621. },
  17622. "cache_read": {
  17623. "type": "number"
  17624. },
  17625. "cache_write": {
  17626. "type": "number"
  17627. }
  17628. },
  17629. "required": ["input", "output"],
  17630. "additionalProperties": false
  17631. }
  17632. },
  17633. "required": ["input", "output"],
  17634. "additionalProperties": false
  17635. },
  17636. "limit": {
  17637. "type": "object",
  17638. "properties": {
  17639. "context": {
  17640. "type": "number"
  17641. },
  17642. "input": {
  17643. "type": "number"
  17644. },
  17645. "output": {
  17646. "type": "number"
  17647. }
  17648. },
  17649. "required": ["context", "output"],
  17650. "additionalProperties": false
  17651. },
  17652. "modalities": {
  17653. "type": "object",
  17654. "properties": {
  17655. "input": {
  17656. "type": "array",
  17657. "items": {
  17658. "type": "string",
  17659. "enum": ["text", "audio", "image", "video", "pdf"]
  17660. }
  17661. },
  17662. "output": {
  17663. "type": "array",
  17664. "items": {
  17665. "type": "string",
  17666. "enum": ["text", "audio", "image", "video", "pdf"]
  17667. }
  17668. }
  17669. },
  17670. "additionalProperties": false
  17671. },
  17672. "experimental": {
  17673. "type": "boolean"
  17674. },
  17675. "status": {
  17676. "type": "string",
  17677. "enum": ["alpha", "beta", "deprecated", "active"]
  17678. },
  17679. "provider": {
  17680. "type": "object",
  17681. "properties": {
  17682. "npm": {
  17683. "type": "string"
  17684. },
  17685. "api": {
  17686. "type": "string"
  17687. }
  17688. },
  17689. "additionalProperties": false
  17690. },
  17691. "options": {
  17692. "type": "object"
  17693. },
  17694. "headers": {
  17695. "type": "object",
  17696. "additionalProperties": {
  17697. "type": "string"
  17698. }
  17699. },
  17700. "variants": {
  17701. "type": "object",
  17702. "additionalProperties": {
  17703. "type": "object",
  17704. "properties": {
  17705. "disabled": {
  17706. "type": "boolean"
  17707. }
  17708. },
  17709. "additionalProperties": {}
  17710. },
  17711. "description": "Variant-specific configuration"
  17712. }
  17713. },
  17714. "additionalProperties": false
  17715. }
  17716. }
  17717. },
  17718. "additionalProperties": false
  17719. },
  17720. "McpLocalConfig": {
  17721. "type": "object",
  17722. "properties": {
  17723. "type": {
  17724. "type": "string",
  17725. "enum": ["local"],
  17726. "description": "Type of MCP server connection"
  17727. },
  17728. "command": {
  17729. "type": "array",
  17730. "items": {
  17731. "type": "string"
  17732. },
  17733. "description": "Command and arguments to run the MCP server"
  17734. },
  17735. "environment": {
  17736. "type": "object",
  17737. "additionalProperties": {
  17738. "type": "string"
  17739. }
  17740. },
  17741. "enabled": {
  17742. "type": "boolean"
  17743. },
  17744. "timeout": {
  17745. "type": "integer",
  17746. "exclusiveMinimum": 0
  17747. }
  17748. },
  17749. "required": ["type", "command"],
  17750. "additionalProperties": false
  17751. },
  17752. "McpOAuthConfig": {
  17753. "type": "object",
  17754. "properties": {
  17755. "clientId": {
  17756. "type": "string"
  17757. },
  17758. "clientSecret": {
  17759. "type": "string"
  17760. },
  17761. "scope": {
  17762. "type": "string"
  17763. },
  17764. "callbackPort": {
  17765. "type": "integer",
  17766. "minimum": 1,
  17767. "maximum": 65535
  17768. },
  17769. "redirectUri": {
  17770. "type": "string"
  17771. }
  17772. },
  17773. "additionalProperties": false
  17774. },
  17775. "McpRemoteConfig": {
  17776. "type": "object",
  17777. "properties": {
  17778. "type": {
  17779. "type": "string",
  17780. "enum": ["remote"],
  17781. "description": "Type of MCP server connection"
  17782. },
  17783. "url": {
  17784. "type": "string",
  17785. "description": "URL of the remote MCP server"
  17786. },
  17787. "enabled": {
  17788. "type": "boolean"
  17789. },
  17790. "headers": {
  17791. "type": "object",
  17792. "additionalProperties": {
  17793. "type": "string"
  17794. }
  17795. },
  17796. "oauth": {
  17797. "anyOf": [
  17798. {
  17799. "$ref": "#/components/schemas/McpOAuthConfig"
  17800. },
  17801. {
  17802. "type": "boolean",
  17803. "enum": [false]
  17804. }
  17805. ],
  17806. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  17807. },
  17808. "timeout": {
  17809. "type": "integer",
  17810. "exclusiveMinimum": 0
  17811. }
  17812. },
  17813. "required": ["type", "url"],
  17814. "additionalProperties": false
  17815. },
  17816. "LayoutConfig": {
  17817. "type": "string",
  17818. "enum": ["auto", "stretch"],
  17819. "description": "@deprecated Always uses stretch layout."
  17820. },
  17821. "ImageAttachmentConfig": {
  17822. "type": "object",
  17823. "properties": {
  17824. "auto_resize": {
  17825. "type": "boolean"
  17826. },
  17827. "max_width": {
  17828. "type": "integer",
  17829. "exclusiveMinimum": 0
  17830. },
  17831. "max_height": {
  17832. "type": "integer",
  17833. "exclusiveMinimum": 0
  17834. },
  17835. "max_base64_bytes": {
  17836. "type": "integer",
  17837. "exclusiveMinimum": 0
  17838. }
  17839. },
  17840. "additionalProperties": false
  17841. },
  17842. "AttachmentConfig": {
  17843. "type": "object",
  17844. "properties": {
  17845. "image": {
  17846. "$ref": "#/components/schemas/ImageAttachmentConfig"
  17847. }
  17848. },
  17849. "additionalProperties": false
  17850. },
  17851. "Config": {
  17852. "type": "object",
  17853. "properties": {
  17854. "$schema": {
  17855. "type": "string"
  17856. },
  17857. "shell": {
  17858. "type": "string"
  17859. },
  17860. "logLevel": {
  17861. "$ref": "#/components/schemas/LogLevel"
  17862. },
  17863. "server": {
  17864. "$ref": "#/components/schemas/ServerConfig"
  17865. },
  17866. "command": {
  17867. "type": "object",
  17868. "additionalProperties": {
  17869. "type": "object",
  17870. "properties": {
  17871. "template": {
  17872. "type": "string"
  17873. },
  17874. "description": {
  17875. "type": "string"
  17876. },
  17877. "agent": {
  17878. "type": "string"
  17879. },
  17880. "model": {
  17881. "type": "string"
  17882. },
  17883. "variant": {
  17884. "type": "string"
  17885. },
  17886. "subtask": {
  17887. "type": "boolean"
  17888. }
  17889. },
  17890. "required": ["template"],
  17891. "additionalProperties": false
  17892. }
  17893. },
  17894. "skills": {
  17895. "type": "object",
  17896. "properties": {
  17897. "paths": {
  17898. "type": "array",
  17899. "items": {
  17900. "type": "string"
  17901. }
  17902. },
  17903. "urls": {
  17904. "type": "array",
  17905. "items": {
  17906. "type": "string"
  17907. }
  17908. }
  17909. },
  17910. "additionalProperties": false
  17911. },
  17912. "reference": {
  17913. "$ref": "#/components/schemas/ReferenceConfig"
  17914. },
  17915. "watcher": {
  17916. "type": "object",
  17917. "properties": {
  17918. "ignore": {
  17919. "type": "array",
  17920. "items": {
  17921. "type": "string"
  17922. }
  17923. }
  17924. },
  17925. "additionalProperties": false
  17926. },
  17927. "snapshot": {
  17928. "type": "boolean"
  17929. },
  17930. "plugin": {
  17931. "type": "array",
  17932. "items": {
  17933. "anyOf": [
  17934. {
  17935. "type": "string"
  17936. },
  17937. {
  17938. "type": "array",
  17939. "prefixItems": [
  17940. {
  17941. "type": "string"
  17942. },
  17943. {
  17944. "type": "object"
  17945. }
  17946. ],
  17947. "maxItems": 2,
  17948. "minItems": 2
  17949. }
  17950. ]
  17951. }
  17952. },
  17953. "share": {
  17954. "type": "string",
  17955. "enum": ["manual", "auto", "disabled"]
  17956. },
  17957. "autoshare": {
  17958. "type": "boolean"
  17959. },
  17960. "autoupdate": {
  17961. "anyOf": [
  17962. {
  17963. "type": "boolean"
  17964. },
  17965. {
  17966. "type": "string",
  17967. "enum": ["notify"]
  17968. }
  17969. ],
  17970. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  17971. },
  17972. "disabled_providers": {
  17973. "type": "array",
  17974. "items": {
  17975. "type": "string"
  17976. }
  17977. },
  17978. "enabled_providers": {
  17979. "type": "array",
  17980. "items": {
  17981. "type": "string"
  17982. }
  17983. },
  17984. "model": {
  17985. "type": "string"
  17986. },
  17987. "small_model": {
  17988. "type": "string"
  17989. },
  17990. "default_agent": {
  17991. "type": "string"
  17992. },
  17993. "username": {
  17994. "type": "string"
  17995. },
  17996. "mode": {
  17997. "type": "object",
  17998. "properties": {
  17999. "build": {
  18000. "$ref": "#/components/schemas/AgentConfig"
  18001. },
  18002. "plan": {
  18003. "$ref": "#/components/schemas/AgentConfig"
  18004. }
  18005. },
  18006. "additionalProperties": {
  18007. "$ref": "#/components/schemas/AgentConfig"
  18008. }
  18009. },
  18010. "agent": {
  18011. "type": "object",
  18012. "properties": {
  18013. "plan": {
  18014. "$ref": "#/components/schemas/AgentConfig"
  18015. },
  18016. "build": {
  18017. "$ref": "#/components/schemas/AgentConfig"
  18018. },
  18019. "general": {
  18020. "$ref": "#/components/schemas/AgentConfig"
  18021. },
  18022. "explore": {
  18023. "$ref": "#/components/schemas/AgentConfig"
  18024. },
  18025. "title": {
  18026. "$ref": "#/components/schemas/AgentConfig"
  18027. },
  18028. "summary": {
  18029. "$ref": "#/components/schemas/AgentConfig"
  18030. },
  18031. "compaction": {
  18032. "$ref": "#/components/schemas/AgentConfig"
  18033. }
  18034. },
  18035. "additionalProperties": {
  18036. "$ref": "#/components/schemas/AgentConfig"
  18037. }
  18038. },
  18039. "provider": {
  18040. "type": "object",
  18041. "additionalProperties": {
  18042. "$ref": "#/components/schemas/ProviderConfig"
  18043. }
  18044. },
  18045. "mcp": {
  18046. "type": "object",
  18047. "additionalProperties": {
  18048. "anyOf": [
  18049. {
  18050. "$ref": "#/components/schemas/McpLocalConfig"
  18051. },
  18052. {
  18053. "$ref": "#/components/schemas/McpRemoteConfig"
  18054. },
  18055. {
  18056. "type": "object",
  18057. "properties": {
  18058. "enabled": {
  18059. "type": "boolean"
  18060. }
  18061. },
  18062. "required": ["enabled"],
  18063. "additionalProperties": false
  18064. }
  18065. ]
  18066. }
  18067. },
  18068. "formatter": {
  18069. "anyOf": [
  18070. {
  18071. "type": "boolean"
  18072. },
  18073. {
  18074. "type": "object",
  18075. "additionalProperties": {
  18076. "type": "object",
  18077. "properties": {
  18078. "disabled": {
  18079. "type": "boolean"
  18080. },
  18081. "command": {
  18082. "type": "array",
  18083. "items": {
  18084. "type": "string"
  18085. }
  18086. },
  18087. "environment": {
  18088. "type": "object",
  18089. "additionalProperties": {
  18090. "type": "string"
  18091. }
  18092. },
  18093. "extensions": {
  18094. "type": "array",
  18095. "items": {
  18096. "type": "string"
  18097. }
  18098. }
  18099. },
  18100. "additionalProperties": false
  18101. }
  18102. }
  18103. ],
  18104. "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."
  18105. },
  18106. "lsp": {
  18107. "anyOf": [
  18108. {
  18109. "type": "boolean"
  18110. },
  18111. {
  18112. "type": "object",
  18113. "additionalProperties": {
  18114. "anyOf": [
  18115. {
  18116. "type": "object",
  18117. "properties": {
  18118. "disabled": {
  18119. "type": "boolean",
  18120. "enum": [true]
  18121. }
  18122. },
  18123. "required": ["disabled"],
  18124. "additionalProperties": false
  18125. },
  18126. {
  18127. "type": "object",
  18128. "properties": {
  18129. "command": {
  18130. "type": "array",
  18131. "items": {
  18132. "type": "string"
  18133. }
  18134. },
  18135. "extensions": {
  18136. "type": "array",
  18137. "items": {
  18138. "type": "string"
  18139. }
  18140. },
  18141. "disabled": {
  18142. "type": "boolean"
  18143. },
  18144. "env": {
  18145. "type": "object",
  18146. "additionalProperties": {
  18147. "type": "string"
  18148. }
  18149. },
  18150. "initialization": {
  18151. "type": "object"
  18152. }
  18153. },
  18154. "required": ["command"],
  18155. "additionalProperties": false
  18156. }
  18157. ]
  18158. }
  18159. }
  18160. ],
  18161. "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."
  18162. },
  18163. "instructions": {
  18164. "type": "array",
  18165. "items": {
  18166. "type": "string"
  18167. }
  18168. },
  18169. "layout": {
  18170. "$ref": "#/components/schemas/LayoutConfig"
  18171. },
  18172. "permission": {
  18173. "$ref": "#/components/schemas/PermissionConfig"
  18174. },
  18175. "tools": {
  18176. "type": "object",
  18177. "additionalProperties": {
  18178. "type": "boolean"
  18179. }
  18180. },
  18181. "attachment": {
  18182. "$ref": "#/components/schemas/AttachmentConfig"
  18183. },
  18184. "enterprise": {
  18185. "type": "object",
  18186. "properties": {
  18187. "url": {
  18188. "type": "string"
  18189. }
  18190. },
  18191. "additionalProperties": false
  18192. },
  18193. "tool_output": {
  18194. "type": "object",
  18195. "properties": {
  18196. "max_lines": {
  18197. "type": "integer",
  18198. "exclusiveMinimum": 0
  18199. },
  18200. "max_bytes": {
  18201. "type": "integer",
  18202. "exclusiveMinimum": 0
  18203. }
  18204. },
  18205. "additionalProperties": false
  18206. },
  18207. "compaction": {
  18208. "type": "object",
  18209. "properties": {
  18210. "auto": {
  18211. "type": "boolean"
  18212. },
  18213. "prune": {
  18214. "type": "boolean"
  18215. },
  18216. "tail_turns": {
  18217. "type": "integer",
  18218. "minimum": 0
  18219. },
  18220. "preserve_recent_tokens": {
  18221. "type": "integer",
  18222. "minimum": 0
  18223. },
  18224. "reserved": {
  18225. "type": "integer",
  18226. "minimum": 0
  18227. }
  18228. },
  18229. "additionalProperties": false
  18230. },
  18231. "experimental": {
  18232. "type": "object",
  18233. "properties": {
  18234. "disable_paste_summary": {
  18235. "type": "boolean"
  18236. },
  18237. "batch_tool": {
  18238. "type": "boolean"
  18239. },
  18240. "openTelemetry": {
  18241. "type": "boolean"
  18242. },
  18243. "primary_tools": {
  18244. "type": "array",
  18245. "items": {
  18246. "type": "string"
  18247. }
  18248. },
  18249. "continue_loop_on_deny": {
  18250. "type": "boolean"
  18251. },
  18252. "mcp_timeout": {
  18253. "type": "integer",
  18254. "exclusiveMinimum": 0
  18255. },
  18256. "policies": {
  18257. "type": "array",
  18258. "items": {
  18259. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  18260. }
  18261. }
  18262. },
  18263. "additionalProperties": false
  18264. }
  18265. },
  18266. "additionalProperties": false
  18267. },
  18268. "Model": {
  18269. "type": "object",
  18270. "properties": {
  18271. "id": {
  18272. "type": "string"
  18273. },
  18274. "providerID": {
  18275. "type": "string"
  18276. },
  18277. "api": {
  18278. "type": "object",
  18279. "properties": {
  18280. "id": {
  18281. "type": "string"
  18282. },
  18283. "url": {
  18284. "type": "string"
  18285. },
  18286. "npm": {
  18287. "type": "string"
  18288. }
  18289. },
  18290. "required": ["id", "url", "npm"],
  18291. "additionalProperties": false
  18292. },
  18293. "name": {
  18294. "type": "string"
  18295. },
  18296. "family": {
  18297. "type": "string"
  18298. },
  18299. "capabilities": {
  18300. "type": "object",
  18301. "properties": {
  18302. "temperature": {
  18303. "type": "boolean"
  18304. },
  18305. "reasoning": {
  18306. "type": "boolean"
  18307. },
  18308. "attachment": {
  18309. "type": "boolean"
  18310. },
  18311. "toolcall": {
  18312. "type": "boolean"
  18313. },
  18314. "input": {
  18315. "type": "object",
  18316. "properties": {
  18317. "text": {
  18318. "type": "boolean"
  18319. },
  18320. "audio": {
  18321. "type": "boolean"
  18322. },
  18323. "image": {
  18324. "type": "boolean"
  18325. },
  18326. "video": {
  18327. "type": "boolean"
  18328. },
  18329. "pdf": {
  18330. "type": "boolean"
  18331. }
  18332. },
  18333. "required": ["text", "audio", "image", "video", "pdf"],
  18334. "additionalProperties": false
  18335. },
  18336. "output": {
  18337. "type": "object",
  18338. "properties": {
  18339. "text": {
  18340. "type": "boolean"
  18341. },
  18342. "audio": {
  18343. "type": "boolean"
  18344. },
  18345. "image": {
  18346. "type": "boolean"
  18347. },
  18348. "video": {
  18349. "type": "boolean"
  18350. },
  18351. "pdf": {
  18352. "type": "boolean"
  18353. }
  18354. },
  18355. "required": ["text", "audio", "image", "video", "pdf"],
  18356. "additionalProperties": false
  18357. },
  18358. "interleaved": {
  18359. "anyOf": [
  18360. {
  18361. "type": "boolean"
  18362. },
  18363. {
  18364. "type": "object",
  18365. "properties": {
  18366. "field": {
  18367. "type": "string",
  18368. "enum": ["reasoning_content", "reasoning_details"]
  18369. }
  18370. },
  18371. "required": ["field"],
  18372. "additionalProperties": false
  18373. }
  18374. ]
  18375. }
  18376. },
  18377. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  18378. "additionalProperties": false
  18379. },
  18380. "cost": {
  18381. "type": "object",
  18382. "properties": {
  18383. "input": {
  18384. "type": "number"
  18385. },
  18386. "output": {
  18387. "type": "number"
  18388. },
  18389. "cache": {
  18390. "type": "object",
  18391. "properties": {
  18392. "read": {
  18393. "type": "number"
  18394. },
  18395. "write": {
  18396. "type": "number"
  18397. }
  18398. },
  18399. "required": ["read", "write"],
  18400. "additionalProperties": false
  18401. },
  18402. "tiers": {
  18403. "type": "array",
  18404. "items": {
  18405. "type": "object",
  18406. "properties": {
  18407. "input": {
  18408. "type": "number"
  18409. },
  18410. "output": {
  18411. "type": "number"
  18412. },
  18413. "cache": {
  18414. "type": "object",
  18415. "properties": {
  18416. "read": {
  18417. "type": "number"
  18418. },
  18419. "write": {
  18420. "type": "number"
  18421. }
  18422. },
  18423. "required": ["read", "write"],
  18424. "additionalProperties": false
  18425. },
  18426. "tier": {
  18427. "type": "object",
  18428. "properties": {
  18429. "type": {
  18430. "type": "string",
  18431. "enum": ["context"]
  18432. },
  18433. "size": {
  18434. "type": "number"
  18435. }
  18436. },
  18437. "required": ["type", "size"],
  18438. "additionalProperties": false
  18439. }
  18440. },
  18441. "required": ["input", "output", "cache", "tier"],
  18442. "additionalProperties": false
  18443. }
  18444. },
  18445. "experimentalOver200K": {
  18446. "type": "object",
  18447. "properties": {
  18448. "input": {
  18449. "type": "number"
  18450. },
  18451. "output": {
  18452. "type": "number"
  18453. },
  18454. "cache": {
  18455. "type": "object",
  18456. "properties": {
  18457. "read": {
  18458. "type": "number"
  18459. },
  18460. "write": {
  18461. "type": "number"
  18462. }
  18463. },
  18464. "required": ["read", "write"],
  18465. "additionalProperties": false
  18466. }
  18467. },
  18468. "required": ["input", "output", "cache"],
  18469. "additionalProperties": false
  18470. }
  18471. },
  18472. "required": ["input", "output", "cache"],
  18473. "additionalProperties": false
  18474. },
  18475. "limit": {
  18476. "type": "object",
  18477. "properties": {
  18478. "context": {
  18479. "type": "number"
  18480. },
  18481. "input": {
  18482. "type": "number"
  18483. },
  18484. "output": {
  18485. "type": "number"
  18486. }
  18487. },
  18488. "required": ["context", "output"],
  18489. "additionalProperties": false
  18490. },
  18491. "status": {
  18492. "type": "string",
  18493. "enum": ["alpha", "beta", "deprecated", "active"]
  18494. },
  18495. "options": {
  18496. "type": "object"
  18497. },
  18498. "headers": {
  18499. "type": "object",
  18500. "additionalProperties": {
  18501. "type": "string"
  18502. }
  18503. },
  18504. "release_date": {
  18505. "type": "string"
  18506. },
  18507. "variants": {
  18508. "type": "object",
  18509. "additionalProperties": {
  18510. "type": "object"
  18511. }
  18512. }
  18513. },
  18514. "required": [
  18515. "id",
  18516. "providerID",
  18517. "api",
  18518. "name",
  18519. "capabilities",
  18520. "cost",
  18521. "limit",
  18522. "status",
  18523. "options",
  18524. "headers",
  18525. "release_date"
  18526. ],
  18527. "additionalProperties": false
  18528. },
  18529. "Provider": {
  18530. "type": "object",
  18531. "properties": {
  18532. "id": {
  18533. "type": "string"
  18534. },
  18535. "name": {
  18536. "type": "string"
  18537. },
  18538. "source": {
  18539. "type": "string",
  18540. "enum": ["env", "config", "custom", "api"]
  18541. },
  18542. "env": {
  18543. "type": "array",
  18544. "items": {
  18545. "type": "string"
  18546. }
  18547. },
  18548. "key": {
  18549. "type": "string"
  18550. },
  18551. "options": {
  18552. "type": "object"
  18553. },
  18554. "models": {
  18555. "type": "object",
  18556. "additionalProperties": {
  18557. "$ref": "#/components/schemas/Model"
  18558. }
  18559. }
  18560. },
  18561. "required": ["id", "name", "source", "env", "options", "models"],
  18562. "additionalProperties": false
  18563. },
  18564. "ConsoleState": {
  18565. "type": "object",
  18566. "properties": {
  18567. "consoleManagedProviders": {
  18568. "type": "array",
  18569. "items": {
  18570. "type": "string"
  18571. }
  18572. },
  18573. "activeOrgName": {
  18574. "type": "string"
  18575. },
  18576. "switchableOrgCount": {
  18577. "type": "integer",
  18578. "minimum": 0
  18579. }
  18580. },
  18581. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18582. "additionalProperties": false
  18583. },
  18584. "effect_HttpApiError_InternalServerError": {
  18585. "type": "object",
  18586. "properties": {
  18587. "_tag": {
  18588. "type": "string",
  18589. "enum": ["InternalServerError"]
  18590. }
  18591. },
  18592. "required": ["_tag"],
  18593. "additionalProperties": false
  18594. },
  18595. "ToolListItem": {
  18596. "type": "object",
  18597. "properties": {
  18598. "id": {
  18599. "type": "string"
  18600. },
  18601. "description": {
  18602. "type": "string"
  18603. },
  18604. "parameters": {}
  18605. },
  18606. "required": ["id", "description", "parameters"],
  18607. "additionalProperties": false
  18608. },
  18609. "ToolList": {
  18610. "type": "array",
  18611. "items": {
  18612. "$ref": "#/components/schemas/ToolListItem"
  18613. }
  18614. },
  18615. "ToolIDs": {
  18616. "type": "array",
  18617. "items": {
  18618. "type": "string"
  18619. }
  18620. },
  18621. "WorktreeError": {
  18622. "type": "object",
  18623. "properties": {
  18624. "name": {
  18625. "type": "string",
  18626. "enum": [
  18627. "WorktreeNotGitError",
  18628. "WorktreeNameGenerationFailedError",
  18629. "WorktreeCreateFailedError",
  18630. "WorktreeStartCommandFailedError",
  18631. "WorktreeRemoveFailedError",
  18632. "WorktreeResetFailedError",
  18633. "WorktreeListFailedError"
  18634. ]
  18635. },
  18636. "data": {
  18637. "type": "object",
  18638. "properties": {
  18639. "message": {
  18640. "type": "string"
  18641. }
  18642. },
  18643. "required": ["message"],
  18644. "additionalProperties": false
  18645. }
  18646. },
  18647. "required": ["name", "data"],
  18648. "additionalProperties": false
  18649. },
  18650. "WorktreeCreateInput": {
  18651. "type": "object",
  18652. "properties": {
  18653. "name": {
  18654. "type": "string"
  18655. },
  18656. "startCommand": {
  18657. "type": "string",
  18658. "description": "Additional startup script to run after the project's start command"
  18659. }
  18660. },
  18661. "additionalProperties": false
  18662. },
  18663. "Worktree": {
  18664. "type": "object",
  18665. "properties": {
  18666. "name": {
  18667. "type": "string"
  18668. },
  18669. "branch": {
  18670. "type": "string"
  18671. },
  18672. "directory": {
  18673. "type": "string"
  18674. }
  18675. },
  18676. "required": ["name", "directory"],
  18677. "additionalProperties": false
  18678. },
  18679. "WorktreeRemoveInput": {
  18680. "type": "object",
  18681. "properties": {
  18682. "directory": {
  18683. "type": "string"
  18684. }
  18685. },
  18686. "required": ["directory"],
  18687. "additionalProperties": false
  18688. },
  18689. "WorktreeResetInput": {
  18690. "type": "object",
  18691. "properties": {
  18692. "directory": {
  18693. "type": "string"
  18694. }
  18695. },
  18696. "required": ["directory"],
  18697. "additionalProperties": false
  18698. },
  18699. "ProjectSummary": {
  18700. "type": "object",
  18701. "properties": {
  18702. "id": {
  18703. "type": "string"
  18704. },
  18705. "name": {
  18706. "type": "string"
  18707. },
  18708. "worktree": {
  18709. "type": "string"
  18710. }
  18711. },
  18712. "required": ["id", "worktree"],
  18713. "additionalProperties": false
  18714. },
  18715. "GlobalSession": {
  18716. "type": "object",
  18717. "properties": {
  18718. "id": {
  18719. "type": "string",
  18720. "pattern": "^ses"
  18721. },
  18722. "slug": {
  18723. "type": "string"
  18724. },
  18725. "projectID": {
  18726. "type": "string"
  18727. },
  18728. "workspaceID": {
  18729. "type": "string",
  18730. "pattern": "^wrk"
  18731. },
  18732. "directory": {
  18733. "type": "string"
  18734. },
  18735. "path": {
  18736. "type": "string"
  18737. },
  18738. "parentID": {
  18739. "type": "string",
  18740. "pattern": "^ses"
  18741. },
  18742. "summary": {
  18743. "type": "object",
  18744. "properties": {
  18745. "additions": {
  18746. "type": "number"
  18747. },
  18748. "deletions": {
  18749. "type": "number"
  18750. },
  18751. "files": {
  18752. "type": "number"
  18753. },
  18754. "diffs": {
  18755. "type": "array",
  18756. "items": {
  18757. "$ref": "#/components/schemas/SnapshotFileDiff"
  18758. }
  18759. }
  18760. },
  18761. "required": ["additions", "deletions", "files"],
  18762. "additionalProperties": false
  18763. },
  18764. "cost": {
  18765. "type": "number"
  18766. },
  18767. "tokens": {
  18768. "type": "object",
  18769. "properties": {
  18770. "input": {
  18771. "type": "number"
  18772. },
  18773. "output": {
  18774. "type": "number"
  18775. },
  18776. "reasoning": {
  18777. "type": "number"
  18778. },
  18779. "cache": {
  18780. "type": "object",
  18781. "properties": {
  18782. "read": {
  18783. "type": "number"
  18784. },
  18785. "write": {
  18786. "type": "number"
  18787. }
  18788. },
  18789. "required": ["read", "write"],
  18790. "additionalProperties": false
  18791. }
  18792. },
  18793. "required": ["input", "output", "reasoning", "cache"],
  18794. "additionalProperties": false
  18795. },
  18796. "share": {
  18797. "type": "object",
  18798. "properties": {
  18799. "url": {
  18800. "type": "string"
  18801. }
  18802. },
  18803. "required": ["url"],
  18804. "additionalProperties": false
  18805. },
  18806. "title": {
  18807. "type": "string"
  18808. },
  18809. "agent": {
  18810. "type": "string"
  18811. },
  18812. "model": {
  18813. "type": "object",
  18814. "properties": {
  18815. "id": {
  18816. "type": "string"
  18817. },
  18818. "providerID": {
  18819. "type": "string"
  18820. },
  18821. "variant": {
  18822. "type": "string"
  18823. }
  18824. },
  18825. "required": ["id", "providerID"],
  18826. "additionalProperties": false
  18827. },
  18828. "version": {
  18829. "type": "string"
  18830. },
  18831. "metadata": {
  18832. "type": "object"
  18833. },
  18834. "time": {
  18835. "type": "object",
  18836. "properties": {
  18837. "created": {
  18838. "type": "integer",
  18839. "minimum": 0
  18840. },
  18841. "updated": {
  18842. "type": "integer",
  18843. "minimum": 0
  18844. },
  18845. "compacting": {
  18846. "type": "integer",
  18847. "minimum": 0
  18848. },
  18849. "archived": {
  18850. "type": "number"
  18851. }
  18852. },
  18853. "required": ["created", "updated"],
  18854. "additionalProperties": false
  18855. },
  18856. "permission": {
  18857. "$ref": "#/components/schemas/PermissionRuleset"
  18858. },
  18859. "revert": {
  18860. "type": "object",
  18861. "properties": {
  18862. "messageID": {
  18863. "type": "string",
  18864. "pattern": "^msg"
  18865. },
  18866. "partID": {
  18867. "type": "string",
  18868. "pattern": "^prt"
  18869. },
  18870. "snapshot": {
  18871. "type": "string"
  18872. },
  18873. "diff": {
  18874. "type": "string"
  18875. }
  18876. },
  18877. "required": ["messageID"],
  18878. "additionalProperties": false
  18879. },
  18880. "project": {
  18881. "anyOf": [
  18882. {
  18883. "$ref": "#/components/schemas/ProjectSummary"
  18884. },
  18885. {
  18886. "type": "null"
  18887. }
  18888. ]
  18889. }
  18890. },
  18891. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  18892. "additionalProperties": false
  18893. },
  18894. "McpResource": {
  18895. "type": "object",
  18896. "properties": {
  18897. "name": {
  18898. "type": "string"
  18899. },
  18900. "uri": {
  18901. "type": "string"
  18902. },
  18903. "description": {
  18904. "type": "string"
  18905. },
  18906. "mimeType": {
  18907. "type": "string"
  18908. },
  18909. "client": {
  18910. "type": "string"
  18911. }
  18912. },
  18913. "required": ["name", "uri", "client"],
  18914. "additionalProperties": false
  18915. },
  18916. "Symbol": {
  18917. "type": "object",
  18918. "properties": {
  18919. "name": {
  18920. "type": "string"
  18921. },
  18922. "kind": {
  18923. "type": "integer",
  18924. "minimum": 0
  18925. },
  18926. "location": {
  18927. "type": "object",
  18928. "properties": {
  18929. "uri": {
  18930. "type": "string"
  18931. },
  18932. "range": {
  18933. "$ref": "#/components/schemas/Range"
  18934. }
  18935. },
  18936. "required": ["uri", "range"],
  18937. "additionalProperties": false
  18938. }
  18939. },
  18940. "required": ["name", "kind", "location"],
  18941. "additionalProperties": false
  18942. },
  18943. "FileNode": {
  18944. "type": "object",
  18945. "properties": {
  18946. "name": {
  18947. "type": "string"
  18948. },
  18949. "path": {
  18950. "type": "string"
  18951. },
  18952. "absolute": {
  18953. "type": "string"
  18954. },
  18955. "type": {
  18956. "type": "string",
  18957. "enum": ["file", "directory"]
  18958. },
  18959. "ignored": {
  18960. "type": "boolean"
  18961. }
  18962. },
  18963. "required": ["name", "path", "absolute", "type", "ignored"],
  18964. "additionalProperties": false
  18965. },
  18966. "FileContent": {
  18967. "type": "object",
  18968. "properties": {
  18969. "type": {
  18970. "type": "string",
  18971. "enum": ["text", "binary"]
  18972. },
  18973. "content": {
  18974. "type": "string"
  18975. },
  18976. "diff": {
  18977. "type": "string"
  18978. },
  18979. "patch": {
  18980. "type": "object",
  18981. "properties": {
  18982. "oldFileName": {
  18983. "type": "string"
  18984. },
  18985. "newFileName": {
  18986. "type": "string"
  18987. },
  18988. "oldHeader": {
  18989. "type": "string"
  18990. },
  18991. "newHeader": {
  18992. "type": "string"
  18993. },
  18994. "hunks": {
  18995. "type": "array",
  18996. "items": {
  18997. "type": "object",
  18998. "properties": {
  18999. "oldStart": {
  19000. "type": "integer",
  19001. "minimum": 0
  19002. },
  19003. "oldLines": {
  19004. "type": "integer",
  19005. "minimum": 0
  19006. },
  19007. "newStart": {
  19008. "type": "integer",
  19009. "minimum": 0
  19010. },
  19011. "newLines": {
  19012. "type": "integer",
  19013. "minimum": 0
  19014. },
  19015. "lines": {
  19016. "type": "array",
  19017. "items": {
  19018. "type": "string"
  19019. }
  19020. }
  19021. },
  19022. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  19023. "additionalProperties": false
  19024. }
  19025. },
  19026. "index": {
  19027. "type": "string"
  19028. }
  19029. },
  19030. "required": ["oldFileName", "newFileName", "hunks"],
  19031. "additionalProperties": false
  19032. },
  19033. "encoding": {
  19034. "type": "string",
  19035. "enum": ["base64"]
  19036. },
  19037. "mimeType": {
  19038. "type": "string"
  19039. }
  19040. },
  19041. "required": ["type", "content"],
  19042. "additionalProperties": false
  19043. },
  19044. "File": {
  19045. "type": "object",
  19046. "properties": {
  19047. "path": {
  19048. "type": "string"
  19049. },
  19050. "added": {
  19051. "type": "integer",
  19052. "minimum": 0
  19053. },
  19054. "removed": {
  19055. "type": "integer",
  19056. "minimum": 0
  19057. },
  19058. "status": {
  19059. "type": "string",
  19060. "enum": ["added", "deleted", "modified"]
  19061. }
  19062. },
  19063. "required": ["path", "added", "removed", "status"],
  19064. "additionalProperties": false
  19065. },
  19066. "Path": {
  19067. "type": "object",
  19068. "properties": {
  19069. "home": {
  19070. "type": "string"
  19071. },
  19072. "state": {
  19073. "type": "string"
  19074. },
  19075. "config": {
  19076. "type": "string"
  19077. },
  19078. "worktree": {
  19079. "type": "string"
  19080. },
  19081. "directory": {
  19082. "type": "string"
  19083. }
  19084. },
  19085. "required": ["home", "state", "config", "worktree", "directory"],
  19086. "additionalProperties": false
  19087. },
  19088. "VcsInfo": {
  19089. "type": "object",
  19090. "properties": {
  19091. "branch": {
  19092. "type": "string"
  19093. },
  19094. "default_branch": {
  19095. "type": "string"
  19096. }
  19097. },
  19098. "additionalProperties": false
  19099. },
  19100. "VcsFileStatus": {
  19101. "type": "object",
  19102. "properties": {
  19103. "file": {
  19104. "type": "string"
  19105. },
  19106. "additions": {
  19107. "type": "number"
  19108. },
  19109. "deletions": {
  19110. "type": "number"
  19111. },
  19112. "status": {
  19113. "type": "string",
  19114. "enum": ["added", "deleted", "modified"]
  19115. }
  19116. },
  19117. "required": ["file", "additions", "deletions", "status"],
  19118. "additionalProperties": false
  19119. },
  19120. "VcsFileDiff": {
  19121. "type": "object",
  19122. "properties": {
  19123. "file": {
  19124. "type": "string"
  19125. },
  19126. "patch": {
  19127. "type": "string"
  19128. },
  19129. "additions": {
  19130. "type": "number"
  19131. },
  19132. "deletions": {
  19133. "type": "number"
  19134. },
  19135. "status": {
  19136. "type": "string",
  19137. "enum": ["added", "deleted", "modified"]
  19138. }
  19139. },
  19140. "required": ["file", "additions", "deletions"],
  19141. "additionalProperties": false
  19142. },
  19143. "VcsApplyError": {
  19144. "type": "object",
  19145. "properties": {
  19146. "name": {
  19147. "type": "string",
  19148. "enum": ["VcsApplyError"]
  19149. },
  19150. "data": {
  19151. "type": "object",
  19152. "properties": {
  19153. "message": {
  19154. "type": "string"
  19155. },
  19156. "reason": {
  19157. "type": "string",
  19158. "enum": ["non-git", "not-clean"]
  19159. }
  19160. },
  19161. "required": ["message", "reason"],
  19162. "additionalProperties": false
  19163. }
  19164. },
  19165. "required": ["name", "data"],
  19166. "additionalProperties": false
  19167. },
  19168. "Command": {
  19169. "type": "object",
  19170. "properties": {
  19171. "name": {
  19172. "type": "string"
  19173. },
  19174. "description": {
  19175. "type": "string"
  19176. },
  19177. "agent": {
  19178. "type": "string"
  19179. },
  19180. "model": {
  19181. "type": "string"
  19182. },
  19183. "source": {
  19184. "type": "string",
  19185. "enum": ["command", "mcp", "skill"]
  19186. },
  19187. "template": {
  19188. "type": "string"
  19189. },
  19190. "subtask": {
  19191. "type": "boolean"
  19192. },
  19193. "hints": {
  19194. "type": "array",
  19195. "items": {
  19196. "type": "string"
  19197. }
  19198. }
  19199. },
  19200. "required": ["name", "template", "hints"],
  19201. "additionalProperties": false
  19202. },
  19203. "Agent": {
  19204. "type": "object",
  19205. "properties": {
  19206. "name": {
  19207. "type": "string"
  19208. },
  19209. "description": {
  19210. "type": "string"
  19211. },
  19212. "mode": {
  19213. "type": "string",
  19214. "enum": ["subagent", "primary", "all"]
  19215. },
  19216. "native": {
  19217. "type": "boolean"
  19218. },
  19219. "hidden": {
  19220. "type": "boolean"
  19221. },
  19222. "topP": {
  19223. "type": "number"
  19224. },
  19225. "temperature": {
  19226. "type": "number"
  19227. },
  19228. "color": {
  19229. "type": "string"
  19230. },
  19231. "permission": {
  19232. "$ref": "#/components/schemas/PermissionRuleset"
  19233. },
  19234. "model": {
  19235. "type": "object",
  19236. "properties": {
  19237. "modelID": {
  19238. "type": "string"
  19239. },
  19240. "providerID": {
  19241. "type": "string"
  19242. }
  19243. },
  19244. "required": ["modelID", "providerID"],
  19245. "additionalProperties": false
  19246. },
  19247. "variant": {
  19248. "type": "string"
  19249. },
  19250. "prompt": {
  19251. "type": "string"
  19252. },
  19253. "options": {
  19254. "type": "object"
  19255. },
  19256. "steps": {
  19257. "type": "number"
  19258. }
  19259. },
  19260. "required": ["name", "mode", "permission", "options"],
  19261. "additionalProperties": false
  19262. },
  19263. "LSPStatus": {
  19264. "type": "object",
  19265. "properties": {
  19266. "id": {
  19267. "type": "string"
  19268. },
  19269. "name": {
  19270. "type": "string"
  19271. },
  19272. "root": {
  19273. "type": "string"
  19274. },
  19275. "status": {
  19276. "type": "string",
  19277. "enum": ["connected", "error"]
  19278. }
  19279. },
  19280. "required": ["id", "name", "root", "status"],
  19281. "additionalProperties": false
  19282. },
  19283. "FormatterStatus": {
  19284. "type": "object",
  19285. "properties": {
  19286. "name": {
  19287. "type": "string"
  19288. },
  19289. "extensions": {
  19290. "type": "array",
  19291. "items": {
  19292. "type": "string"
  19293. }
  19294. },
  19295. "enabled": {
  19296. "type": "boolean"
  19297. }
  19298. },
  19299. "required": ["name", "extensions", "enabled"],
  19300. "additionalProperties": false
  19301. },
  19302. "MCPStatusConnected": {
  19303. "type": "object",
  19304. "properties": {
  19305. "status": {
  19306. "type": "string",
  19307. "enum": ["connected"]
  19308. }
  19309. },
  19310. "required": ["status"],
  19311. "additionalProperties": false
  19312. },
  19313. "MCPStatusDisabled": {
  19314. "type": "object",
  19315. "properties": {
  19316. "status": {
  19317. "type": "string",
  19318. "enum": ["disabled"]
  19319. }
  19320. },
  19321. "required": ["status"],
  19322. "additionalProperties": false
  19323. },
  19324. "MCPStatusFailed": {
  19325. "type": "object",
  19326. "properties": {
  19327. "status": {
  19328. "type": "string",
  19329. "enum": ["failed"]
  19330. },
  19331. "error": {
  19332. "type": "string"
  19333. }
  19334. },
  19335. "required": ["status", "error"],
  19336. "additionalProperties": false
  19337. },
  19338. "MCPStatusNeedsAuth": {
  19339. "type": "object",
  19340. "properties": {
  19341. "status": {
  19342. "type": "string",
  19343. "enum": ["needs_auth"]
  19344. }
  19345. },
  19346. "required": ["status"],
  19347. "additionalProperties": false
  19348. },
  19349. "MCPStatusNeedsClientRegistration": {
  19350. "type": "object",
  19351. "properties": {
  19352. "status": {
  19353. "type": "string",
  19354. "enum": ["needs_client_registration"]
  19355. },
  19356. "error": {
  19357. "type": "string"
  19358. }
  19359. },
  19360. "required": ["status", "error"],
  19361. "additionalProperties": false
  19362. },
  19363. "MCPStatus": {
  19364. "anyOf": [
  19365. {
  19366. "$ref": "#/components/schemas/MCPStatusConnected"
  19367. },
  19368. {
  19369. "$ref": "#/components/schemas/MCPStatusDisabled"
  19370. },
  19371. {
  19372. "$ref": "#/components/schemas/MCPStatusFailed"
  19373. },
  19374. {
  19375. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  19376. },
  19377. {
  19378. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  19379. }
  19380. ]
  19381. },
  19382. "McpUnsupportedOAuthError": {
  19383. "type": "object",
  19384. "properties": {
  19385. "error": {
  19386. "type": "string"
  19387. }
  19388. },
  19389. "required": ["error"],
  19390. "additionalProperties": false
  19391. },
  19392. "McpServerNotFoundError": {
  19393. "type": "object",
  19394. "properties": {
  19395. "_tag": {
  19396. "type": "string",
  19397. "enum": ["McpServerNotFoundError"]
  19398. },
  19399. "name": {
  19400. "type": "string"
  19401. },
  19402. "message": {
  19403. "type": "string"
  19404. }
  19405. },
  19406. "required": ["_tag", "name", "message"],
  19407. "additionalProperties": false
  19408. },
  19409. "Project": {
  19410. "type": "object",
  19411. "properties": {
  19412. "id": {
  19413. "type": "string"
  19414. },
  19415. "worktree": {
  19416. "type": "string"
  19417. },
  19418. "vcs": {
  19419. "type": "string",
  19420. "enum": ["git"]
  19421. },
  19422. "name": {
  19423. "type": "string"
  19424. },
  19425. "icon": {
  19426. "type": "object",
  19427. "properties": {
  19428. "url": {
  19429. "type": "string"
  19430. },
  19431. "override": {
  19432. "type": "string"
  19433. },
  19434. "color": {
  19435. "type": "string"
  19436. }
  19437. },
  19438. "additionalProperties": false
  19439. },
  19440. "commands": {
  19441. "type": "object",
  19442. "properties": {
  19443. "start": {
  19444. "type": "string",
  19445. "description": "Startup script to run when creating a new workspace (worktree)"
  19446. }
  19447. },
  19448. "additionalProperties": false
  19449. },
  19450. "time": {
  19451. "type": "object",
  19452. "properties": {
  19453. "created": {
  19454. "type": "integer",
  19455. "minimum": 0
  19456. },
  19457. "updated": {
  19458. "type": "integer",
  19459. "minimum": 0
  19460. },
  19461. "initialized": {
  19462. "type": "integer",
  19463. "minimum": 0
  19464. }
  19465. },
  19466. "required": ["created", "updated"],
  19467. "additionalProperties": false
  19468. },
  19469. "sandboxes": {
  19470. "type": "array",
  19471. "items": {
  19472. "type": "string"
  19473. }
  19474. }
  19475. },
  19476. "required": ["id", "worktree", "time", "sandboxes"],
  19477. "additionalProperties": false
  19478. },
  19479. "ProjectNotFoundError": {
  19480. "type": "object",
  19481. "properties": {
  19482. "_tag": {
  19483. "type": "string",
  19484. "enum": ["ProjectNotFoundError"]
  19485. },
  19486. "projectID": {
  19487. "type": "string"
  19488. },
  19489. "message": {
  19490. "type": "string"
  19491. }
  19492. },
  19493. "required": ["_tag", "projectID", "message"],
  19494. "additionalProperties": false
  19495. },
  19496. "ProjectCopyError": {
  19497. "type": "object",
  19498. "properties": {
  19499. "name": {
  19500. "type": "string",
  19501. "enum": ["ProjectCopyError"]
  19502. },
  19503. "data": {
  19504. "type": "object",
  19505. "properties": {
  19506. "message": {
  19507. "type": "string"
  19508. }
  19509. },
  19510. "required": ["message"],
  19511. "additionalProperties": false
  19512. }
  19513. },
  19514. "required": ["name", "data"],
  19515. "additionalProperties": false
  19516. },
  19517. "PtyNotFoundError": {
  19518. "type": "object",
  19519. "properties": {
  19520. "_tag": {
  19521. "type": "string",
  19522. "enum": ["PtyNotFoundError"]
  19523. },
  19524. "ptyID": {
  19525. "type": "string"
  19526. },
  19527. "message": {
  19528. "type": "string"
  19529. }
  19530. },
  19531. "required": ["_tag", "ptyID", "message"],
  19532. "additionalProperties": false
  19533. },
  19534. "PtyForbiddenError": {
  19535. "type": "object",
  19536. "properties": {
  19537. "_tag": {
  19538. "type": "string",
  19539. "enum": ["PtyForbiddenError"]
  19540. },
  19541. "message": {
  19542. "type": "string"
  19543. }
  19544. },
  19545. "required": ["_tag", "message"],
  19546. "additionalProperties": false
  19547. },
  19548. "QuestionRequest": {
  19549. "type": "object",
  19550. "properties": {
  19551. "id": {
  19552. "type": "string",
  19553. "pattern": "^que"
  19554. },
  19555. "sessionID": {
  19556. "type": "string",
  19557. "pattern": "^ses"
  19558. },
  19559. "questions": {
  19560. "type": "array",
  19561. "items": {
  19562. "$ref": "#/components/schemas/QuestionInfo"
  19563. },
  19564. "description": "Questions to ask"
  19565. },
  19566. "tool": {
  19567. "$ref": "#/components/schemas/QuestionTool"
  19568. }
  19569. },
  19570. "required": ["id", "sessionID", "questions"],
  19571. "additionalProperties": false
  19572. },
  19573. "QuestionNotFoundError": {
  19574. "type": "object",
  19575. "properties": {
  19576. "_tag": {
  19577. "type": "string",
  19578. "enum": ["QuestionNotFoundError"]
  19579. },
  19580. "requestID": {
  19581. "type": "string"
  19582. },
  19583. "message": {
  19584. "type": "string"
  19585. }
  19586. },
  19587. "required": ["_tag", "requestID", "message"],
  19588. "additionalProperties": false
  19589. },
  19590. "PermissionRequest": {
  19591. "type": "object",
  19592. "properties": {
  19593. "id": {
  19594. "type": "string",
  19595. "pattern": "^per"
  19596. },
  19597. "sessionID": {
  19598. "type": "string",
  19599. "pattern": "^ses"
  19600. },
  19601. "permission": {
  19602. "type": "string"
  19603. },
  19604. "patterns": {
  19605. "type": "array",
  19606. "items": {
  19607. "type": "string"
  19608. }
  19609. },
  19610. "metadata": {
  19611. "type": "object"
  19612. },
  19613. "always": {
  19614. "type": "array",
  19615. "items": {
  19616. "type": "string"
  19617. }
  19618. },
  19619. "tool": {
  19620. "type": "object",
  19621. "properties": {
  19622. "messageID": {
  19623. "type": "string"
  19624. },
  19625. "callID": {
  19626. "type": "string"
  19627. }
  19628. },
  19629. "required": ["messageID", "callID"],
  19630. "additionalProperties": false
  19631. }
  19632. },
  19633. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19634. "additionalProperties": false
  19635. },
  19636. "PermissionNotFoundError": {
  19637. "type": "object",
  19638. "properties": {
  19639. "_tag": {
  19640. "type": "string",
  19641. "enum": ["PermissionNotFoundError"]
  19642. },
  19643. "requestID": {
  19644. "type": "string"
  19645. },
  19646. "message": {
  19647. "type": "string"
  19648. }
  19649. },
  19650. "required": ["_tag", "requestID", "message"],
  19651. "additionalProperties": false
  19652. },
  19653. "ProviderAuthMethod": {
  19654. "type": "object",
  19655. "properties": {
  19656. "type": {
  19657. "type": "string",
  19658. "enum": ["oauth", "api"]
  19659. },
  19660. "label": {
  19661. "type": "string"
  19662. },
  19663. "prompts": {
  19664. "type": "array",
  19665. "items": {
  19666. "anyOf": [
  19667. {
  19668. "type": "object",
  19669. "properties": {
  19670. "type": {
  19671. "type": "string",
  19672. "enum": ["text"]
  19673. },
  19674. "key": {
  19675. "type": "string"
  19676. },
  19677. "message": {
  19678. "type": "string"
  19679. },
  19680. "placeholder": {
  19681. "type": "string"
  19682. },
  19683. "when": {
  19684. "type": "object",
  19685. "properties": {
  19686. "key": {
  19687. "type": "string"
  19688. },
  19689. "op": {
  19690. "type": "string",
  19691. "enum": ["eq", "neq"]
  19692. },
  19693. "value": {
  19694. "type": "string"
  19695. }
  19696. },
  19697. "required": ["key", "op", "value"],
  19698. "additionalProperties": false
  19699. }
  19700. },
  19701. "required": ["type", "key", "message"],
  19702. "additionalProperties": false
  19703. },
  19704. {
  19705. "type": "object",
  19706. "properties": {
  19707. "type": {
  19708. "type": "string",
  19709. "enum": ["select"]
  19710. },
  19711. "key": {
  19712. "type": "string"
  19713. },
  19714. "message": {
  19715. "type": "string"
  19716. },
  19717. "options": {
  19718. "type": "array",
  19719. "items": {
  19720. "type": "object",
  19721. "properties": {
  19722. "label": {
  19723. "type": "string"
  19724. },
  19725. "value": {
  19726. "type": "string"
  19727. },
  19728. "hint": {
  19729. "type": "string"
  19730. }
  19731. },
  19732. "required": ["label", "value"],
  19733. "additionalProperties": false
  19734. }
  19735. },
  19736. "when": {
  19737. "type": "object",
  19738. "properties": {
  19739. "key": {
  19740. "type": "string"
  19741. },
  19742. "op": {
  19743. "type": "string",
  19744. "enum": ["eq", "neq"]
  19745. },
  19746. "value": {
  19747. "type": "string"
  19748. }
  19749. },
  19750. "required": ["key", "op", "value"],
  19751. "additionalProperties": false
  19752. }
  19753. },
  19754. "required": ["type", "key", "message", "options"],
  19755. "additionalProperties": false
  19756. }
  19757. ]
  19758. }
  19759. }
  19760. },
  19761. "required": ["type", "label"],
  19762. "additionalProperties": false
  19763. },
  19764. "ProviderAuthAuthorization": {
  19765. "type": "object",
  19766. "properties": {
  19767. "url": {
  19768. "type": "string"
  19769. },
  19770. "method": {
  19771. "type": "string",
  19772. "enum": ["auto", "code"]
  19773. },
  19774. "instructions": {
  19775. "type": "string"
  19776. }
  19777. },
  19778. "required": ["url", "method", "instructions"],
  19779. "additionalProperties": false
  19780. },
  19781. "ProviderAuthError1": {
  19782. "type": "object",
  19783. "properties": {
  19784. "name": {
  19785. "type": "string",
  19786. "enum": [
  19787. "BadRequest",
  19788. "ProviderAuthOauthMissing",
  19789. "ProviderAuthOauthCodeMissing",
  19790. "ProviderAuthOauthCallbackFailed",
  19791. "ProviderAuthValidationFailed"
  19792. ]
  19793. },
  19794. "data": {
  19795. "type": "object",
  19796. "properties": {
  19797. "providerID": {
  19798. "type": "string"
  19799. },
  19800. "field": {
  19801. "type": "string"
  19802. },
  19803. "message": {
  19804. "type": "string"
  19805. },
  19806. "kind": {
  19807. "type": "string"
  19808. }
  19809. },
  19810. "additionalProperties": false
  19811. }
  19812. },
  19813. "required": ["name", "data"],
  19814. "additionalProperties": false
  19815. },
  19816. "NotFoundError": {
  19817. "type": "object",
  19818. "required": ["name", "data"],
  19819. "properties": {
  19820. "name": {
  19821. "type": "string",
  19822. "enum": ["NotFoundError"]
  19823. },
  19824. "data": {
  19825. "type": "object",
  19826. "required": ["message"],
  19827. "properties": {
  19828. "message": {
  19829. "type": "string"
  19830. }
  19831. }
  19832. }
  19833. }
  19834. },
  19835. "TextPartInput": {
  19836. "type": "object",
  19837. "properties": {
  19838. "id": {
  19839. "type": "string",
  19840. "pattern": "^prt"
  19841. },
  19842. "type": {
  19843. "type": "string",
  19844. "enum": ["text"]
  19845. },
  19846. "text": {
  19847. "type": "string"
  19848. },
  19849. "synthetic": {
  19850. "type": "boolean"
  19851. },
  19852. "ignored": {
  19853. "type": "boolean"
  19854. },
  19855. "time": {
  19856. "type": "object",
  19857. "properties": {
  19858. "start": {
  19859. "type": "integer",
  19860. "minimum": 0
  19861. },
  19862. "end": {
  19863. "type": "integer",
  19864. "minimum": 0
  19865. }
  19866. },
  19867. "required": ["start"],
  19868. "additionalProperties": false
  19869. },
  19870. "metadata": {
  19871. "type": "object"
  19872. }
  19873. },
  19874. "required": ["type", "text"],
  19875. "additionalProperties": false
  19876. },
  19877. "FilePartInput": {
  19878. "type": "object",
  19879. "properties": {
  19880. "id": {
  19881. "type": "string",
  19882. "pattern": "^prt"
  19883. },
  19884. "type": {
  19885. "type": "string",
  19886. "enum": ["file"]
  19887. },
  19888. "mime": {
  19889. "type": "string"
  19890. },
  19891. "filename": {
  19892. "type": "string"
  19893. },
  19894. "url": {
  19895. "type": "string"
  19896. },
  19897. "source": {
  19898. "$ref": "#/components/schemas/FilePartSource"
  19899. }
  19900. },
  19901. "required": ["type", "mime", "url"],
  19902. "additionalProperties": false
  19903. },
  19904. "AgentPartInput": {
  19905. "type": "object",
  19906. "properties": {
  19907. "id": {
  19908. "type": "string",
  19909. "pattern": "^prt"
  19910. },
  19911. "type": {
  19912. "type": "string",
  19913. "enum": ["agent"]
  19914. },
  19915. "name": {
  19916. "type": "string"
  19917. },
  19918. "source": {
  19919. "type": "object",
  19920. "properties": {
  19921. "value": {
  19922. "type": "string"
  19923. },
  19924. "start": {
  19925. "type": "integer",
  19926. "minimum": 0
  19927. },
  19928. "end": {
  19929. "type": "integer",
  19930. "minimum": 0
  19931. }
  19932. },
  19933. "required": ["value", "start", "end"],
  19934. "additionalProperties": false
  19935. }
  19936. },
  19937. "required": ["type", "name"],
  19938. "additionalProperties": false
  19939. },
  19940. "SubtaskPartInput": {
  19941. "type": "object",
  19942. "properties": {
  19943. "id": {
  19944. "type": "string",
  19945. "pattern": "^prt"
  19946. },
  19947. "type": {
  19948. "type": "string",
  19949. "enum": ["subtask"]
  19950. },
  19951. "prompt": {
  19952. "type": "string"
  19953. },
  19954. "description": {
  19955. "type": "string"
  19956. },
  19957. "agent": {
  19958. "type": "string"
  19959. },
  19960. "model": {
  19961. "type": "object",
  19962. "properties": {
  19963. "providerID": {
  19964. "type": "string"
  19965. },
  19966. "modelID": {
  19967. "type": "string"
  19968. }
  19969. },
  19970. "required": ["providerID", "modelID"],
  19971. "additionalProperties": false
  19972. },
  19973. "command": {
  19974. "type": "string"
  19975. }
  19976. },
  19977. "required": ["type", "prompt", "description", "agent"],
  19978. "additionalProperties": false
  19979. },
  19980. "SessionBusyError": {
  19981. "type": "object",
  19982. "properties": {
  19983. "_tag": {
  19984. "type": "string",
  19985. "enum": ["SessionBusyError"]
  19986. },
  19987. "sessionID": {
  19988. "type": "string"
  19989. },
  19990. "message": {
  19991. "type": "string"
  19992. }
  19993. },
  19994. "required": ["_tag", "sessionID", "message"],
  19995. "additionalProperties": false
  19996. },
  19997. "EventTuiPromptAppend": {
  19998. "type": "object",
  19999. "properties": {
  20000. "type": {
  20001. "type": "string",
  20002. "enum": ["tui.prompt.append"]
  20003. },
  20004. "properties": {
  20005. "type": "object",
  20006. "properties": {
  20007. "text": {
  20008. "type": "string"
  20009. }
  20010. },
  20011. "required": ["text"],
  20012. "additionalProperties": false
  20013. }
  20014. },
  20015. "required": ["type", "properties"],
  20016. "additionalProperties": false
  20017. },
  20018. "EventTuiCommandExecute": {
  20019. "type": "object",
  20020. "properties": {
  20021. "type": {
  20022. "type": "string",
  20023. "enum": ["tui.command.execute"]
  20024. },
  20025. "properties": {
  20026. "type": "object",
  20027. "properties": {
  20028. "command": {
  20029. "anyOf": [
  20030. {
  20031. "type": "string",
  20032. "enum": [
  20033. "session.list",
  20034. "session.new",
  20035. "session.share",
  20036. "session.interrupt",
  20037. "session.compact",
  20038. "session.page.up",
  20039. "session.page.down",
  20040. "session.line.up",
  20041. "session.line.down",
  20042. "session.half.page.up",
  20043. "session.half.page.down",
  20044. "session.first",
  20045. "session.last",
  20046. "prompt.clear",
  20047. "prompt.submit",
  20048. "agent.cycle"
  20049. ]
  20050. },
  20051. {
  20052. "type": "string"
  20053. }
  20054. ]
  20055. }
  20056. },
  20057. "required": ["command"],
  20058. "additionalProperties": false
  20059. }
  20060. },
  20061. "required": ["type", "properties"],
  20062. "additionalProperties": false
  20063. },
  20064. "EventTuiToastShow": {
  20065. "type": "object",
  20066. "properties": {
  20067. "type": {
  20068. "type": "string",
  20069. "enum": ["tui.toast.show"]
  20070. },
  20071. "properties": {
  20072. "type": "object",
  20073. "properties": {
  20074. "title": {
  20075. "type": "string"
  20076. },
  20077. "message": {
  20078. "type": "string"
  20079. },
  20080. "variant": {
  20081. "type": "string",
  20082. "enum": ["info", "success", "warning", "error"]
  20083. },
  20084. "duration": {
  20085. "type": "integer",
  20086. "exclusiveMinimum": 0
  20087. }
  20088. },
  20089. "required": ["message", "variant"],
  20090. "additionalProperties": false
  20091. }
  20092. },
  20093. "required": ["type", "properties"],
  20094. "additionalProperties": false
  20095. },
  20096. "EventTuiSessionSelect": {
  20097. "type": "object",
  20098. "properties": {
  20099. "type": {
  20100. "type": "string",
  20101. "enum": ["tui.session.select"]
  20102. },
  20103. "properties": {
  20104. "type": "object",
  20105. "properties": {
  20106. "sessionID": {
  20107. "type": "string",
  20108. "pattern": "^ses",
  20109. "description": "Session ID to navigate to"
  20110. }
  20111. },
  20112. "required": ["sessionID"],
  20113. "additionalProperties": false
  20114. }
  20115. },
  20116. "required": ["type", "properties"],
  20117. "additionalProperties": false
  20118. },
  20119. "Workspace": {
  20120. "type": "object",
  20121. "properties": {
  20122. "id": {
  20123. "type": "string",
  20124. "pattern": "^wrk"
  20125. },
  20126. "type": {
  20127. "type": "string"
  20128. },
  20129. "name": {
  20130. "type": "string"
  20131. },
  20132. "branch": {
  20133. "anyOf": [
  20134. {
  20135. "type": "string"
  20136. },
  20137. {
  20138. "type": "null"
  20139. }
  20140. ]
  20141. },
  20142. "directory": {
  20143. "anyOf": [
  20144. {
  20145. "type": "string"
  20146. },
  20147. {
  20148. "type": "null"
  20149. }
  20150. ]
  20151. },
  20152. "extra": {
  20153. "anyOf": [
  20154. {},
  20155. {
  20156. "type": "null"
  20157. }
  20158. ]
  20159. },
  20160. "projectID": {
  20161. "type": "string"
  20162. },
  20163. "timeUsed": {
  20164. "anyOf": [
  20165. {
  20166. "type": "number"
  20167. },
  20168. {
  20169. "type": "string",
  20170. "enum": ["NaN"]
  20171. },
  20172. {
  20173. "type": "string",
  20174. "enum": ["Infinity"]
  20175. },
  20176. {
  20177. "type": "string",
  20178. "enum": ["-Infinity"]
  20179. },
  20180. {
  20181. "type": "string",
  20182. "enum": ["Infinity", "-Infinity", "NaN"]
  20183. }
  20184. ]
  20185. }
  20186. },
  20187. "required": ["id", "type", "name", "projectID", "timeUsed"],
  20188. "additionalProperties": false
  20189. },
  20190. "WorkspaceCreateError": {
  20191. "type": "object",
  20192. "properties": {
  20193. "name": {
  20194. "type": "string",
  20195. "enum": ["WorkspaceCreateError"]
  20196. },
  20197. "data": {
  20198. "type": "object",
  20199. "properties": {
  20200. "message": {
  20201. "type": "string"
  20202. }
  20203. },
  20204. "required": ["message"],
  20205. "additionalProperties": false
  20206. }
  20207. },
  20208. "required": ["name", "data"],
  20209. "additionalProperties": false
  20210. },
  20211. "WorkspaceWarpError": {
  20212. "type": "object",
  20213. "properties": {
  20214. "name": {
  20215. "type": "string",
  20216. "enum": ["WorkspaceWarpError"]
  20217. },
  20218. "data": {
  20219. "type": "object",
  20220. "properties": {
  20221. "message": {
  20222. "type": "string"
  20223. }
  20224. },
  20225. "required": ["message"],
  20226. "additionalProperties": false
  20227. }
  20228. },
  20229. "required": ["name", "data"],
  20230. "additionalProperties": false
  20231. },
  20232. "UnauthorizedError": {
  20233. "type": "object",
  20234. "properties": {
  20235. "_tag": {
  20236. "type": "string",
  20237. "enum": ["UnauthorizedError"]
  20238. },
  20239. "message": {
  20240. "type": "string"
  20241. }
  20242. },
  20243. "required": ["_tag", "message"],
  20244. "additionalProperties": false
  20245. },
  20246. "V2SessionsResponse": {
  20247. "type": "object",
  20248. "properties": {
  20249. "data": {
  20250. "type": "array",
  20251. "items": {
  20252. "$ref": "#/components/schemas/SessionV2Info"
  20253. }
  20254. },
  20255. "cursor": {
  20256. "type": "object",
  20257. "properties": {
  20258. "previous": {
  20259. "type": "string"
  20260. },
  20261. "next": {
  20262. "type": "string"
  20263. }
  20264. },
  20265. "additionalProperties": false
  20266. }
  20267. },
  20268. "required": ["data", "cursor"],
  20269. "additionalProperties": false
  20270. },
  20271. "InvalidCursorError": {
  20272. "type": "object",
  20273. "properties": {
  20274. "_tag": {
  20275. "type": "string",
  20276. "enum": ["InvalidCursorError"]
  20277. },
  20278. "message": {
  20279. "type": "string"
  20280. }
  20281. },
  20282. "required": ["_tag", "message"],
  20283. "additionalProperties": false
  20284. },
  20285. "ConflictError": {
  20286. "type": "object",
  20287. "properties": {
  20288. "_tag": {
  20289. "type": "string",
  20290. "enum": ["ConflictError"]
  20291. },
  20292. "message": {
  20293. "type": "string"
  20294. },
  20295. "resource": {
  20296. "type": "string"
  20297. }
  20298. },
  20299. "required": ["_tag", "message"],
  20300. "additionalProperties": false
  20301. },
  20302. "SessionNotFoundError": {
  20303. "type": "object",
  20304. "properties": {
  20305. "_tag": {
  20306. "type": "string",
  20307. "enum": ["SessionNotFoundError"]
  20308. },
  20309. "sessionID": {
  20310. "type": "string"
  20311. },
  20312. "message": {
  20313. "type": "string"
  20314. }
  20315. },
  20316. "required": ["_tag", "sessionID", "message"],
  20317. "additionalProperties": false
  20318. },
  20319. "ServiceUnavailableError": {
  20320. "type": "object",
  20321. "properties": {
  20322. "_tag": {
  20323. "type": "string",
  20324. "enum": ["ServiceUnavailableError"]
  20325. },
  20326. "message": {
  20327. "type": "string"
  20328. },
  20329. "service": {
  20330. "type": "string"
  20331. }
  20332. },
  20333. "required": ["_tag", "message"],
  20334. "additionalProperties": false
  20335. },
  20336. "UnknownError1": {
  20337. "type": "object",
  20338. "properties": {
  20339. "_tag": {
  20340. "type": "string",
  20341. "enum": ["UnknownError"]
  20342. },
  20343. "message": {
  20344. "type": "string"
  20345. },
  20346. "ref": {
  20347. "type": "string"
  20348. }
  20349. },
  20350. "required": ["_tag", "message"],
  20351. "additionalProperties": false
  20352. },
  20353. "V2SessionMessagesResponse": {
  20354. "type": "object",
  20355. "properties": {
  20356. "data": {
  20357. "type": "array",
  20358. "items": {
  20359. "$ref": "#/components/schemas/SessionMessage"
  20360. }
  20361. },
  20362. "cursor": {
  20363. "type": "object",
  20364. "properties": {
  20365. "previous": {
  20366. "type": "string"
  20367. },
  20368. "next": {
  20369. "type": "string"
  20370. }
  20371. },
  20372. "additionalProperties": false
  20373. }
  20374. },
  20375. "required": ["data", "cursor"],
  20376. "additionalProperties": false
  20377. },
  20378. "ProviderNotFoundError": {
  20379. "type": "object",
  20380. "properties": {
  20381. "_tag": {
  20382. "type": "string",
  20383. "enum": ["ProviderNotFoundError"]
  20384. },
  20385. "providerID": {
  20386. "type": "string"
  20387. },
  20388. "message": {
  20389. "type": "string"
  20390. }
  20391. },
  20392. "required": ["_tag", "providerID", "message"],
  20393. "additionalProperties": false
  20394. },
  20395. "effect_HttpApiError_Forbidden": {
  20396. "type": "object",
  20397. "properties": {
  20398. "_tag": {
  20399. "type": "string",
  20400. "enum": ["Forbidden"]
  20401. }
  20402. },
  20403. "required": ["_tag"],
  20404. "additionalProperties": false
  20405. },
  20406. "Event.tui.prompt.append": {
  20407. "type": "object",
  20408. "properties": {
  20409. "id": {
  20410. "type": "string",
  20411. "pattern": "^evt_"
  20412. },
  20413. "type": {
  20414. "type": "string",
  20415. "enum": ["tui.prompt.append"]
  20416. },
  20417. "properties": {
  20418. "type": "object",
  20419. "properties": {
  20420. "text": {
  20421. "type": "string"
  20422. }
  20423. },
  20424. "required": ["text"],
  20425. "additionalProperties": false
  20426. }
  20427. },
  20428. "required": ["id", "type", "properties"],
  20429. "additionalProperties": false
  20430. },
  20431. "Event.tui.command.execute": {
  20432. "type": "object",
  20433. "properties": {
  20434. "id": {
  20435. "type": "string",
  20436. "pattern": "^evt_"
  20437. },
  20438. "type": {
  20439. "type": "string",
  20440. "enum": ["tui.command.execute"]
  20441. },
  20442. "properties": {
  20443. "type": "object",
  20444. "properties": {
  20445. "command": {
  20446. "anyOf": [
  20447. {
  20448. "type": "string",
  20449. "enum": [
  20450. "session.list",
  20451. "session.new",
  20452. "session.share",
  20453. "session.interrupt",
  20454. "session.compact",
  20455. "session.page.up",
  20456. "session.page.down",
  20457. "session.line.up",
  20458. "session.line.down",
  20459. "session.half.page.up",
  20460. "session.half.page.down",
  20461. "session.first",
  20462. "session.last",
  20463. "prompt.clear",
  20464. "prompt.submit",
  20465. "agent.cycle"
  20466. ]
  20467. },
  20468. {
  20469. "type": "string"
  20470. }
  20471. ]
  20472. }
  20473. },
  20474. "required": ["command"],
  20475. "additionalProperties": false
  20476. }
  20477. },
  20478. "required": ["id", "type", "properties"],
  20479. "additionalProperties": false
  20480. },
  20481. "Event.tui.toast.show": {
  20482. "type": "object",
  20483. "properties": {
  20484. "id": {
  20485. "type": "string",
  20486. "pattern": "^evt_"
  20487. },
  20488. "type": {
  20489. "type": "string",
  20490. "enum": ["tui.toast.show"]
  20491. },
  20492. "properties": {
  20493. "type": "object",
  20494. "properties": {
  20495. "title": {
  20496. "type": "string"
  20497. },
  20498. "message": {
  20499. "type": "string"
  20500. },
  20501. "variant": {
  20502. "type": "string",
  20503. "enum": ["info", "success", "warning", "error"]
  20504. },
  20505. "duration": {
  20506. "type": "integer",
  20507. "exclusiveMinimum": 0
  20508. }
  20509. },
  20510. "required": ["message", "variant"],
  20511. "additionalProperties": false
  20512. }
  20513. },
  20514. "required": ["id", "type", "properties"],
  20515. "additionalProperties": false
  20516. },
  20517. "Event.tui.session.select": {
  20518. "type": "object",
  20519. "properties": {
  20520. "id": {
  20521. "type": "string",
  20522. "pattern": "^evt_"
  20523. },
  20524. "type": {
  20525. "type": "string",
  20526. "enum": ["tui.session.select"]
  20527. },
  20528. "properties": {
  20529. "type": "object",
  20530. "properties": {
  20531. "sessionID": {
  20532. "type": "string",
  20533. "pattern": "^ses",
  20534. "description": "Session ID to navigate to"
  20535. }
  20536. },
  20537. "required": ["sessionID"],
  20538. "additionalProperties": false
  20539. }
  20540. },
  20541. "required": ["id", "type", "properties"],
  20542. "additionalProperties": false
  20543. },
  20544. "MoveSessionDestination": {
  20545. "type": "object",
  20546. "properties": {
  20547. "directory": {
  20548. "type": "string"
  20549. }
  20550. },
  20551. "required": ["directory"],
  20552. "additionalProperties": false
  20553. },
  20554. "ModelV2Info": {
  20555. "type": "object",
  20556. "properties": {
  20557. "id": {
  20558. "type": "string"
  20559. },
  20560. "providerID": {
  20561. "type": "string"
  20562. },
  20563. "family": {
  20564. "type": "string"
  20565. },
  20566. "name": {
  20567. "type": "string"
  20568. },
  20569. "api": {
  20570. "anyOf": [
  20571. {
  20572. "type": "object",
  20573. "properties": {
  20574. "id": {
  20575. "type": "string"
  20576. },
  20577. "type": {
  20578. "type": "string",
  20579. "enum": ["aisdk"]
  20580. },
  20581. "package": {
  20582. "type": "string"
  20583. },
  20584. "url": {
  20585. "type": "string"
  20586. },
  20587. "settings": {
  20588. "type": "object"
  20589. }
  20590. },
  20591. "required": ["id", "type", "package"],
  20592. "additionalProperties": false
  20593. },
  20594. {
  20595. "type": "object",
  20596. "properties": {
  20597. "id": {
  20598. "type": "string"
  20599. },
  20600. "type": {
  20601. "type": "string",
  20602. "enum": ["native"]
  20603. },
  20604. "url": {
  20605. "type": "string"
  20606. },
  20607. "settings": {
  20608. "type": "object"
  20609. }
  20610. },
  20611. "required": ["id", "type", "settings"],
  20612. "additionalProperties": false
  20613. }
  20614. ]
  20615. },
  20616. "capabilities": {
  20617. "type": "object",
  20618. "properties": {
  20619. "tools": {
  20620. "type": "boolean"
  20621. },
  20622. "input": {
  20623. "type": "array",
  20624. "items": {
  20625. "type": "string"
  20626. }
  20627. },
  20628. "output": {
  20629. "type": "array",
  20630. "items": {
  20631. "type": "string"
  20632. }
  20633. }
  20634. },
  20635. "required": ["tools", "input", "output"],
  20636. "additionalProperties": false
  20637. },
  20638. "request": {
  20639. "type": "object",
  20640. "properties": {
  20641. "headers": {
  20642. "type": "object",
  20643. "additionalProperties": {
  20644. "type": "string"
  20645. }
  20646. },
  20647. "body": {
  20648. "type": "object"
  20649. },
  20650. "variant": {
  20651. "type": "string"
  20652. }
  20653. },
  20654. "required": ["headers", "body"],
  20655. "additionalProperties": false
  20656. },
  20657. "variants": {
  20658. "type": "array",
  20659. "items": {
  20660. "type": "object",
  20661. "properties": {
  20662. "id": {
  20663. "type": "string"
  20664. },
  20665. "headers": {
  20666. "type": "object",
  20667. "additionalProperties": {
  20668. "type": "string"
  20669. }
  20670. },
  20671. "body": {
  20672. "type": "object"
  20673. }
  20674. },
  20675. "required": ["id", "headers", "body"],
  20676. "additionalProperties": false
  20677. }
  20678. },
  20679. "time": {
  20680. "type": "object",
  20681. "properties": {
  20682. "released": {
  20683. "anyOf": [
  20684. {
  20685. "type": "number"
  20686. },
  20687. {
  20688. "type": "string",
  20689. "enum": ["NaN"]
  20690. },
  20691. {
  20692. "type": "string",
  20693. "enum": ["Infinity"]
  20694. },
  20695. {
  20696. "type": "string",
  20697. "enum": ["-Infinity"]
  20698. },
  20699. {
  20700. "type": "string",
  20701. "enum": ["Infinity", "-Infinity", "NaN"]
  20702. }
  20703. ]
  20704. }
  20705. },
  20706. "required": ["released"],
  20707. "additionalProperties": false
  20708. },
  20709. "cost": {
  20710. "type": "array",
  20711. "items": {
  20712. "type": "object",
  20713. "properties": {
  20714. "tier": {
  20715. "type": "object",
  20716. "properties": {
  20717. "type": {
  20718. "type": "string",
  20719. "enum": ["context"]
  20720. },
  20721. "size": {
  20722. "type": "integer"
  20723. }
  20724. },
  20725. "required": ["type", "size"],
  20726. "additionalProperties": false
  20727. },
  20728. "input": {
  20729. "type": "number"
  20730. },
  20731. "output": {
  20732. "type": "number"
  20733. },
  20734. "cache": {
  20735. "type": "object",
  20736. "properties": {
  20737. "read": {
  20738. "type": "number"
  20739. },
  20740. "write": {
  20741. "type": "number"
  20742. }
  20743. },
  20744. "required": ["read", "write"],
  20745. "additionalProperties": false
  20746. }
  20747. },
  20748. "required": ["input", "output", "cache"],
  20749. "additionalProperties": false
  20750. }
  20751. },
  20752. "status": {
  20753. "type": "string",
  20754. "enum": ["alpha", "beta", "deprecated", "active"]
  20755. },
  20756. "enabled": {
  20757. "type": "boolean"
  20758. },
  20759. "limit": {
  20760. "type": "object",
  20761. "properties": {
  20762. "context": {
  20763. "type": "integer"
  20764. },
  20765. "input": {
  20766. "type": "integer"
  20767. },
  20768. "output": {
  20769. "type": "integer"
  20770. }
  20771. },
  20772. "required": ["context", "output"],
  20773. "additionalProperties": false
  20774. }
  20775. },
  20776. "required": [
  20777. "id",
  20778. "providerID",
  20779. "name",
  20780. "api",
  20781. "capabilities",
  20782. "request",
  20783. "variants",
  20784. "time",
  20785. "cost",
  20786. "status",
  20787. "enabled",
  20788. "limit"
  20789. ],
  20790. "additionalProperties": false
  20791. },
  20792. "LocationRef": {
  20793. "type": "object",
  20794. "properties": {
  20795. "directory": {
  20796. "type": "string"
  20797. },
  20798. "workspaceID": {
  20799. "type": "string",
  20800. "pattern": "^wrk"
  20801. }
  20802. },
  20803. "required": ["directory"],
  20804. "additionalProperties": false
  20805. },
  20806. "PromptSource": {
  20807. "type": "object",
  20808. "properties": {
  20809. "start": {
  20810. "type": "number"
  20811. },
  20812. "end": {
  20813. "type": "number"
  20814. },
  20815. "text": {
  20816. "type": "string"
  20817. }
  20818. },
  20819. "required": ["start", "end", "text"],
  20820. "additionalProperties": false
  20821. },
  20822. "PromptFileAttachment": {
  20823. "type": "object",
  20824. "properties": {
  20825. "uri": {
  20826. "type": "string"
  20827. },
  20828. "mime": {
  20829. "type": "string"
  20830. },
  20831. "name": {
  20832. "type": "string"
  20833. },
  20834. "description": {
  20835. "type": "string"
  20836. },
  20837. "source": {
  20838. "$ref": "#/components/schemas/PromptSource"
  20839. }
  20840. },
  20841. "required": ["uri", "mime"],
  20842. "additionalProperties": false
  20843. },
  20844. "PromptAgentAttachment": {
  20845. "type": "object",
  20846. "properties": {
  20847. "name": {
  20848. "type": "string"
  20849. },
  20850. "source": {
  20851. "$ref": "#/components/schemas/PromptSource"
  20852. }
  20853. },
  20854. "required": ["name"],
  20855. "additionalProperties": false
  20856. },
  20857. "PromptReferenceAttachment": {
  20858. "type": "object",
  20859. "properties": {
  20860. "name": {
  20861. "type": "string"
  20862. },
  20863. "kind": {
  20864. "type": "string",
  20865. "enum": ["local", "git", "invalid"]
  20866. },
  20867. "uri": {
  20868. "type": "string"
  20869. },
  20870. "repository": {
  20871. "type": "string"
  20872. },
  20873. "branch": {
  20874. "type": "string"
  20875. },
  20876. "target": {
  20877. "type": "string"
  20878. },
  20879. "targetUri": {
  20880. "type": "string"
  20881. },
  20882. "problem": {
  20883. "type": "string"
  20884. },
  20885. "source": {
  20886. "$ref": "#/components/schemas/PromptSource"
  20887. }
  20888. },
  20889. "required": ["name", "kind"],
  20890. "additionalProperties": false
  20891. },
  20892. "SessionErrorUnknown": {
  20893. "type": "object",
  20894. "properties": {
  20895. "type": {
  20896. "type": "string",
  20897. "enum": ["unknown"]
  20898. },
  20899. "message": {
  20900. "type": "string"
  20901. }
  20902. },
  20903. "required": ["type", "message"],
  20904. "additionalProperties": false
  20905. },
  20906. "ToolTextContent": {
  20907. "type": "object",
  20908. "properties": {
  20909. "type": {
  20910. "type": "string",
  20911. "enum": ["text"]
  20912. },
  20913. "text": {
  20914. "type": "string"
  20915. }
  20916. },
  20917. "required": ["type", "text"],
  20918. "additionalProperties": false
  20919. },
  20920. "ToolFileContent": {
  20921. "type": "object",
  20922. "properties": {
  20923. "type": {
  20924. "type": "string",
  20925. "enum": ["file"]
  20926. },
  20927. "source": {
  20928. "anyOf": [
  20929. {
  20930. "type": "object",
  20931. "properties": {
  20932. "type": {
  20933. "type": "string",
  20934. "enum": ["data"]
  20935. },
  20936. "data": {
  20937. "type": "string"
  20938. }
  20939. },
  20940. "required": ["type", "data"],
  20941. "additionalProperties": false
  20942. },
  20943. {
  20944. "type": "object",
  20945. "properties": {
  20946. "type": {
  20947. "type": "string",
  20948. "enum": ["url"]
  20949. },
  20950. "url": {
  20951. "type": "string"
  20952. }
  20953. },
  20954. "required": ["type", "url"],
  20955. "additionalProperties": false
  20956. },
  20957. {
  20958. "type": "object",
  20959. "properties": {
  20960. "type": {
  20961. "type": "string",
  20962. "enum": ["file"]
  20963. },
  20964. "uri": {
  20965. "type": "string"
  20966. }
  20967. },
  20968. "required": ["type", "uri"],
  20969. "additionalProperties": false
  20970. }
  20971. ]
  20972. },
  20973. "mime": {
  20974. "type": "string"
  20975. },
  20976. "name": {
  20977. "type": "string"
  20978. }
  20979. },
  20980. "required": ["type", "source", "mime"],
  20981. "additionalProperties": false
  20982. },
  20983. "SessionNextRetry_error": {
  20984. "type": "object",
  20985. "properties": {
  20986. "message": {
  20987. "type": "string"
  20988. },
  20989. "statusCode": {
  20990. "type": "number"
  20991. },
  20992. "isRetryable": {
  20993. "type": "boolean"
  20994. },
  20995. "responseHeaders": {
  20996. "type": "object",
  20997. "additionalProperties": {
  20998. "type": "string"
  20999. }
  21000. },
  21001. "responseBody": {
  21002. "type": "string"
  21003. },
  21004. "metadata": {
  21005. "type": "object",
  21006. "additionalProperties": {
  21007. "type": "string"
  21008. }
  21009. }
  21010. },
  21011. "required": ["message", "isRetryable"],
  21012. "additionalProperties": false
  21013. },
  21014. "AuthOAuthCredential": {
  21015. "type": "object",
  21016. "properties": {
  21017. "type": {
  21018. "type": "string",
  21019. "enum": ["oauth"]
  21020. },
  21021. "refresh": {
  21022. "type": "string"
  21023. },
  21024. "access": {
  21025. "type": "string"
  21026. },
  21027. "expires": {
  21028. "type": "integer",
  21029. "minimum": 0
  21030. }
  21031. },
  21032. "required": ["type", "refresh", "access", "expires"],
  21033. "additionalProperties": false
  21034. },
  21035. "AuthApiKeyCredential": {
  21036. "type": "object",
  21037. "properties": {
  21038. "type": {
  21039. "type": "string",
  21040. "enum": ["api"]
  21041. },
  21042. "key": {
  21043. "type": "string"
  21044. },
  21045. "metadata": {
  21046. "type": "object",
  21047. "additionalProperties": {
  21048. "type": "string"
  21049. }
  21050. }
  21051. },
  21052. "required": ["type", "key"],
  21053. "additionalProperties": false
  21054. },
  21055. "AuthCredential": {
  21056. "anyOf": [
  21057. {
  21058. "$ref": "#/components/schemas/AuthOAuthCredential"
  21059. },
  21060. {
  21061. "$ref": "#/components/schemas/AuthApiKeyCredential"
  21062. }
  21063. ]
  21064. },
  21065. "AuthInfo": {
  21066. "type": "object",
  21067. "properties": {
  21068. "id": {
  21069. "type": "string"
  21070. },
  21071. "serviceID": {
  21072. "type": "string"
  21073. },
  21074. "description": {
  21075. "type": "string"
  21076. },
  21077. "credential": {
  21078. "$ref": "#/components/schemas/AuthCredential"
  21079. }
  21080. },
  21081. "required": ["id", "serviceID", "description", "credential"],
  21082. "additionalProperties": false
  21083. },
  21084. "PermissionV2Source": {
  21085. "type": "object",
  21086. "properties": {
  21087. "type": {
  21088. "type": "string",
  21089. "enum": ["tool"]
  21090. },
  21091. "messageID": {
  21092. "type": "string"
  21093. },
  21094. "callID": {
  21095. "type": "string"
  21096. }
  21097. },
  21098. "required": ["type", "messageID", "callID"],
  21099. "additionalProperties": false
  21100. },
  21101. "PermissionV2Reply": {
  21102. "type": "string",
  21103. "enum": ["once", "always", "reject"]
  21104. },
  21105. "QuestionV2Option": {
  21106. "type": "object",
  21107. "properties": {
  21108. "label": {
  21109. "type": "string",
  21110. "description": "Display text (1-5 words, concise)"
  21111. },
  21112. "description": {
  21113. "type": "string",
  21114. "description": "Explanation of choice"
  21115. }
  21116. },
  21117. "required": ["label", "description"],
  21118. "additionalProperties": false
  21119. },
  21120. "QuestionV2Info": {
  21121. "type": "object",
  21122. "properties": {
  21123. "question": {
  21124. "type": "string",
  21125. "description": "Complete question"
  21126. },
  21127. "header": {
  21128. "type": "string",
  21129. "description": "Very short label (max 30 chars)"
  21130. },
  21131. "options": {
  21132. "type": "array",
  21133. "items": {
  21134. "$ref": "#/components/schemas/QuestionV2Option"
  21135. },
  21136. "description": "Available choices"
  21137. },
  21138. "multiple": {
  21139. "type": "boolean"
  21140. },
  21141. "custom": {
  21142. "type": "boolean"
  21143. }
  21144. },
  21145. "required": ["question", "header", "options"],
  21146. "additionalProperties": false
  21147. },
  21148. "QuestionV2Tool": {
  21149. "type": "object",
  21150. "properties": {
  21151. "messageID": {
  21152. "type": "string"
  21153. },
  21154. "callID": {
  21155. "type": "string"
  21156. }
  21157. },
  21158. "required": ["messageID", "callID"],
  21159. "additionalProperties": false
  21160. },
  21161. "QuestionV2Answer": {
  21162. "type": "array",
  21163. "items": {
  21164. "type": "string"
  21165. }
  21166. },
  21167. "EventServerInstanceDisposed": {
  21168. "type": "object",
  21169. "properties": {
  21170. "id": {
  21171. "type": "string"
  21172. },
  21173. "type": {
  21174. "type": "string",
  21175. "enum": ["server.instance.disposed"]
  21176. },
  21177. "properties": {
  21178. "type": "object",
  21179. "properties": {
  21180. "directory": {
  21181. "type": "string"
  21182. }
  21183. },
  21184. "required": ["directory"],
  21185. "additionalProperties": false
  21186. }
  21187. },
  21188. "required": ["id", "type", "properties"],
  21189. "additionalProperties": false
  21190. },
  21191. "SyncEventSessionCreated": {
  21192. "type": "object",
  21193. "properties": {
  21194. "type": {
  21195. "type": "string",
  21196. "enum": ["sync"]
  21197. },
  21198. "id": {
  21199. "type": "string",
  21200. "pattern": "^evt_"
  21201. },
  21202. "syncEvent": {
  21203. "type": "object",
  21204. "properties": {
  21205. "type": {
  21206. "type": "string",
  21207. "enum": ["session.created.1"]
  21208. },
  21209. "id": {
  21210. "type": "string",
  21211. "pattern": "^evt_"
  21212. },
  21213. "seq": {
  21214. "type": "number"
  21215. },
  21216. "aggregateID": {
  21217. "type": "string"
  21218. },
  21219. "data": {
  21220. "type": "object",
  21221. "properties": {
  21222. "sessionID": {
  21223. "type": "string",
  21224. "pattern": "^ses"
  21225. },
  21226. "info": {
  21227. "$ref": "#/components/schemas/Session"
  21228. }
  21229. },
  21230. "required": ["sessionID", "info"],
  21231. "additionalProperties": false
  21232. }
  21233. },
  21234. "required": ["type", "id", "seq", "aggregateID", "data"],
  21235. "additionalProperties": false
  21236. }
  21237. },
  21238. "required": ["type", "id", "syncEvent"],
  21239. "additionalProperties": false
  21240. },
  21241. "SyncEventSessionUpdated": {
  21242. "type": "object",
  21243. "properties": {
  21244. "type": {
  21245. "type": "string",
  21246. "enum": ["sync"]
  21247. },
  21248. "id": {
  21249. "type": "string",
  21250. "pattern": "^evt_"
  21251. },
  21252. "syncEvent": {
  21253. "type": "object",
  21254. "properties": {
  21255. "type": {
  21256. "type": "string",
  21257. "enum": ["session.updated.1"]
  21258. },
  21259. "id": {
  21260. "type": "string",
  21261. "pattern": "^evt_"
  21262. },
  21263. "seq": {
  21264. "type": "number"
  21265. },
  21266. "aggregateID": {
  21267. "type": "string"
  21268. },
  21269. "data": {
  21270. "type": "object",
  21271. "properties": {
  21272. "sessionID": {
  21273. "type": "string",
  21274. "pattern": "^ses"
  21275. },
  21276. "info": {
  21277. "$ref": "#/components/schemas/Session"
  21278. }
  21279. },
  21280. "required": ["sessionID", "info"],
  21281. "additionalProperties": false
  21282. }
  21283. },
  21284. "required": ["type", "id", "seq", "aggregateID", "data"],
  21285. "additionalProperties": false
  21286. }
  21287. },
  21288. "required": ["type", "id", "syncEvent"],
  21289. "additionalProperties": false
  21290. },
  21291. "SyncEventSessionDeleted": {
  21292. "type": "object",
  21293. "properties": {
  21294. "type": {
  21295. "type": "string",
  21296. "enum": ["sync"]
  21297. },
  21298. "id": {
  21299. "type": "string",
  21300. "pattern": "^evt_"
  21301. },
  21302. "syncEvent": {
  21303. "type": "object",
  21304. "properties": {
  21305. "type": {
  21306. "type": "string",
  21307. "enum": ["session.deleted.1"]
  21308. },
  21309. "id": {
  21310. "type": "string",
  21311. "pattern": "^evt_"
  21312. },
  21313. "seq": {
  21314. "type": "number"
  21315. },
  21316. "aggregateID": {
  21317. "type": "string"
  21318. },
  21319. "data": {
  21320. "type": "object",
  21321. "properties": {
  21322. "sessionID": {
  21323. "type": "string",
  21324. "pattern": "^ses"
  21325. },
  21326. "info": {
  21327. "$ref": "#/components/schemas/Session"
  21328. }
  21329. },
  21330. "required": ["sessionID", "info"],
  21331. "additionalProperties": false
  21332. }
  21333. },
  21334. "required": ["type", "id", "seq", "aggregateID", "data"],
  21335. "additionalProperties": false
  21336. }
  21337. },
  21338. "required": ["type", "id", "syncEvent"],
  21339. "additionalProperties": false
  21340. },
  21341. "SyncEventMessageUpdated": {
  21342. "type": "object",
  21343. "properties": {
  21344. "type": {
  21345. "type": "string",
  21346. "enum": ["sync"]
  21347. },
  21348. "id": {
  21349. "type": "string",
  21350. "pattern": "^evt_"
  21351. },
  21352. "syncEvent": {
  21353. "type": "object",
  21354. "properties": {
  21355. "type": {
  21356. "type": "string",
  21357. "enum": ["message.updated.1"]
  21358. },
  21359. "id": {
  21360. "type": "string",
  21361. "pattern": "^evt_"
  21362. },
  21363. "seq": {
  21364. "type": "number"
  21365. },
  21366. "aggregateID": {
  21367. "type": "string"
  21368. },
  21369. "data": {
  21370. "type": "object",
  21371. "properties": {
  21372. "sessionID": {
  21373. "type": "string",
  21374. "pattern": "^ses"
  21375. },
  21376. "info": {
  21377. "$ref": "#/components/schemas/Message"
  21378. }
  21379. },
  21380. "required": ["sessionID", "info"],
  21381. "additionalProperties": false
  21382. }
  21383. },
  21384. "required": ["type", "id", "seq", "aggregateID", "data"],
  21385. "additionalProperties": false
  21386. }
  21387. },
  21388. "required": ["type", "id", "syncEvent"],
  21389. "additionalProperties": false
  21390. },
  21391. "SyncEventMessageRemoved": {
  21392. "type": "object",
  21393. "properties": {
  21394. "type": {
  21395. "type": "string",
  21396. "enum": ["sync"]
  21397. },
  21398. "id": {
  21399. "type": "string",
  21400. "pattern": "^evt_"
  21401. },
  21402. "syncEvent": {
  21403. "type": "object",
  21404. "properties": {
  21405. "type": {
  21406. "type": "string",
  21407. "enum": ["message.removed.1"]
  21408. },
  21409. "id": {
  21410. "type": "string",
  21411. "pattern": "^evt_"
  21412. },
  21413. "seq": {
  21414. "type": "number"
  21415. },
  21416. "aggregateID": {
  21417. "type": "string"
  21418. },
  21419. "data": {
  21420. "type": "object",
  21421. "properties": {
  21422. "sessionID": {
  21423. "type": "string",
  21424. "pattern": "^ses"
  21425. },
  21426. "messageID": {
  21427. "type": "string",
  21428. "pattern": "^msg"
  21429. }
  21430. },
  21431. "required": ["sessionID", "messageID"],
  21432. "additionalProperties": false
  21433. }
  21434. },
  21435. "required": ["type", "id", "seq", "aggregateID", "data"],
  21436. "additionalProperties": false
  21437. }
  21438. },
  21439. "required": ["type", "id", "syncEvent"],
  21440. "additionalProperties": false
  21441. },
  21442. "SyncEventMessagePartUpdated": {
  21443. "type": "object",
  21444. "properties": {
  21445. "type": {
  21446. "type": "string",
  21447. "enum": ["sync"]
  21448. },
  21449. "id": {
  21450. "type": "string",
  21451. "pattern": "^evt_"
  21452. },
  21453. "syncEvent": {
  21454. "type": "object",
  21455. "properties": {
  21456. "type": {
  21457. "type": "string",
  21458. "enum": ["message.part.updated.1"]
  21459. },
  21460. "id": {
  21461. "type": "string",
  21462. "pattern": "^evt_"
  21463. },
  21464. "seq": {
  21465. "type": "number"
  21466. },
  21467. "aggregateID": {
  21468. "type": "string"
  21469. },
  21470. "data": {
  21471. "type": "object",
  21472. "properties": {
  21473. "sessionID": {
  21474. "type": "string",
  21475. "pattern": "^ses"
  21476. },
  21477. "part": {
  21478. "$ref": "#/components/schemas/Part"
  21479. },
  21480. "time": {
  21481. "type": "number"
  21482. }
  21483. },
  21484. "required": ["sessionID", "part", "time"],
  21485. "additionalProperties": false
  21486. }
  21487. },
  21488. "required": ["type", "id", "seq", "aggregateID", "data"],
  21489. "additionalProperties": false
  21490. }
  21491. },
  21492. "required": ["type", "id", "syncEvent"],
  21493. "additionalProperties": false
  21494. },
  21495. "SyncEventMessagePartRemoved": {
  21496. "type": "object",
  21497. "properties": {
  21498. "type": {
  21499. "type": "string",
  21500. "enum": ["sync"]
  21501. },
  21502. "id": {
  21503. "type": "string",
  21504. "pattern": "^evt_"
  21505. },
  21506. "syncEvent": {
  21507. "type": "object",
  21508. "properties": {
  21509. "type": {
  21510. "type": "string",
  21511. "enum": ["message.part.removed.1"]
  21512. },
  21513. "id": {
  21514. "type": "string",
  21515. "pattern": "^evt_"
  21516. },
  21517. "seq": {
  21518. "type": "number"
  21519. },
  21520. "aggregateID": {
  21521. "type": "string"
  21522. },
  21523. "data": {
  21524. "type": "object",
  21525. "properties": {
  21526. "sessionID": {
  21527. "type": "string",
  21528. "pattern": "^ses"
  21529. },
  21530. "messageID": {
  21531. "type": "string",
  21532. "pattern": "^msg"
  21533. },
  21534. "partID": {
  21535. "type": "string",
  21536. "pattern": "^prt"
  21537. }
  21538. },
  21539. "required": ["sessionID", "messageID", "partID"],
  21540. "additionalProperties": false
  21541. }
  21542. },
  21543. "required": ["type", "id", "seq", "aggregateID", "data"],
  21544. "additionalProperties": false
  21545. }
  21546. },
  21547. "required": ["type", "id", "syncEvent"],
  21548. "additionalProperties": false
  21549. },
  21550. "SyncEventSessionNextAgentSwitched": {
  21551. "type": "object",
  21552. "properties": {
  21553. "type": {
  21554. "type": "string",
  21555. "enum": ["sync"]
  21556. },
  21557. "id": {
  21558. "type": "string",
  21559. "pattern": "^evt_"
  21560. },
  21561. "syncEvent": {
  21562. "type": "object",
  21563. "properties": {
  21564. "type": {
  21565. "type": "string",
  21566. "enum": ["session.next.agent.switched.1"]
  21567. },
  21568. "id": {
  21569. "type": "string",
  21570. "pattern": "^evt_"
  21571. },
  21572. "seq": {
  21573. "type": "number"
  21574. },
  21575. "aggregateID": {
  21576. "type": "string"
  21577. },
  21578. "data": {
  21579. "type": "object",
  21580. "properties": {
  21581. "timestamp": {
  21582. "type": "number"
  21583. },
  21584. "sessionID": {
  21585. "type": "string",
  21586. "pattern": "^ses"
  21587. },
  21588. "messageID": {
  21589. "type": "string",
  21590. "pattern": "^msg_"
  21591. },
  21592. "agent": {
  21593. "type": "string"
  21594. }
  21595. },
  21596. "required": ["timestamp", "sessionID", "messageID", "agent"],
  21597. "additionalProperties": false
  21598. }
  21599. },
  21600. "required": ["type", "id", "seq", "aggregateID", "data"],
  21601. "additionalProperties": false
  21602. }
  21603. },
  21604. "required": ["type", "id", "syncEvent"],
  21605. "additionalProperties": false
  21606. },
  21607. "SyncEventSessionNextModelSwitched": {
  21608. "type": "object",
  21609. "properties": {
  21610. "type": {
  21611. "type": "string",
  21612. "enum": ["sync"]
  21613. },
  21614. "id": {
  21615. "type": "string",
  21616. "pattern": "^evt_"
  21617. },
  21618. "syncEvent": {
  21619. "type": "object",
  21620. "properties": {
  21621. "type": {
  21622. "type": "string",
  21623. "enum": ["session.next.model.switched.1"]
  21624. },
  21625. "id": {
  21626. "type": "string",
  21627. "pattern": "^evt_"
  21628. },
  21629. "seq": {
  21630. "type": "number"
  21631. },
  21632. "aggregateID": {
  21633. "type": "string"
  21634. },
  21635. "data": {
  21636. "type": "object",
  21637. "properties": {
  21638. "timestamp": {
  21639. "type": "number"
  21640. },
  21641. "sessionID": {
  21642. "type": "string",
  21643. "pattern": "^ses"
  21644. },
  21645. "messageID": {
  21646. "type": "string",
  21647. "pattern": "^msg_"
  21648. },
  21649. "model": {
  21650. "type": "object",
  21651. "properties": {
  21652. "id": {
  21653. "type": "string"
  21654. },
  21655. "providerID": {
  21656. "type": "string"
  21657. },
  21658. "variant": {
  21659. "type": "string"
  21660. }
  21661. },
  21662. "required": ["id", "providerID"],
  21663. "additionalProperties": false
  21664. }
  21665. },
  21666. "required": ["timestamp", "sessionID", "messageID", "model"],
  21667. "additionalProperties": false
  21668. }
  21669. },
  21670. "required": ["type", "id", "seq", "aggregateID", "data"],
  21671. "additionalProperties": false
  21672. }
  21673. },
  21674. "required": ["type", "id", "syncEvent"],
  21675. "additionalProperties": false
  21676. },
  21677. "SyncEventSessionNextMoved": {
  21678. "type": "object",
  21679. "properties": {
  21680. "type": {
  21681. "type": "string",
  21682. "enum": ["sync"]
  21683. },
  21684. "id": {
  21685. "type": "string",
  21686. "pattern": "^evt_"
  21687. },
  21688. "syncEvent": {
  21689. "type": "object",
  21690. "properties": {
  21691. "type": {
  21692. "type": "string",
  21693. "enum": ["session.next.moved.1"]
  21694. },
  21695. "id": {
  21696. "type": "string",
  21697. "pattern": "^evt_"
  21698. },
  21699. "seq": {
  21700. "type": "number"
  21701. },
  21702. "aggregateID": {
  21703. "type": "string"
  21704. },
  21705. "data": {
  21706. "type": "object",
  21707. "properties": {
  21708. "timestamp": {
  21709. "type": "number"
  21710. },
  21711. "sessionID": {
  21712. "type": "string",
  21713. "pattern": "^ses"
  21714. },
  21715. "location": {
  21716. "$ref": "#/components/schemas/LocationRef"
  21717. },
  21718. "subdirectory": {
  21719. "type": "string"
  21720. }
  21721. },
  21722. "required": ["timestamp", "sessionID", "location"],
  21723. "additionalProperties": false
  21724. }
  21725. },
  21726. "required": ["type", "id", "seq", "aggregateID", "data"],
  21727. "additionalProperties": false
  21728. }
  21729. },
  21730. "required": ["type", "id", "syncEvent"],
  21731. "additionalProperties": false
  21732. },
  21733. "SyncEventSessionNextPrompted": {
  21734. "type": "object",
  21735. "properties": {
  21736. "type": {
  21737. "type": "string",
  21738. "enum": ["sync"]
  21739. },
  21740. "id": {
  21741. "type": "string",
  21742. "pattern": "^evt_"
  21743. },
  21744. "syncEvent": {
  21745. "type": "object",
  21746. "properties": {
  21747. "type": {
  21748. "type": "string",
  21749. "enum": ["session.next.prompted.1"]
  21750. },
  21751. "id": {
  21752. "type": "string",
  21753. "pattern": "^evt_"
  21754. },
  21755. "seq": {
  21756. "type": "number"
  21757. },
  21758. "aggregateID": {
  21759. "type": "string"
  21760. },
  21761. "data": {
  21762. "type": "object",
  21763. "properties": {
  21764. "timestamp": {
  21765. "type": "number"
  21766. },
  21767. "sessionID": {
  21768. "type": "string",
  21769. "pattern": "^ses"
  21770. },
  21771. "messageID": {
  21772. "type": "string",
  21773. "pattern": "^msg_"
  21774. },
  21775. "prompt": {
  21776. "$ref": "#/components/schemas/Prompt"
  21777. },
  21778. "delivery": {
  21779. "type": "string",
  21780. "enum": ["steer", "queue"]
  21781. }
  21782. },
  21783. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  21784. "additionalProperties": false
  21785. }
  21786. },
  21787. "required": ["type", "id", "seq", "aggregateID", "data"],
  21788. "additionalProperties": false
  21789. }
  21790. },
  21791. "required": ["type", "id", "syncEvent"],
  21792. "additionalProperties": false
  21793. },
  21794. "SyncEventSessionNextPromptAdmitted": {
  21795. "type": "object",
  21796. "properties": {
  21797. "type": {
  21798. "type": "string",
  21799. "enum": ["sync"]
  21800. },
  21801. "id": {
  21802. "type": "string",
  21803. "pattern": "^evt_"
  21804. },
  21805. "syncEvent": {
  21806. "type": "object",
  21807. "properties": {
  21808. "type": {
  21809. "type": "string",
  21810. "enum": ["session.next.prompt.admitted.1"]
  21811. },
  21812. "id": {
  21813. "type": "string",
  21814. "pattern": "^evt_"
  21815. },
  21816. "seq": {
  21817. "type": "number"
  21818. },
  21819. "aggregateID": {
  21820. "type": "string"
  21821. },
  21822. "data": {
  21823. "type": "object",
  21824. "properties": {
  21825. "timestamp": {
  21826. "type": "number"
  21827. },
  21828. "sessionID": {
  21829. "type": "string",
  21830. "pattern": "^ses"
  21831. },
  21832. "messageID": {
  21833. "type": "string",
  21834. "pattern": "^msg_"
  21835. },
  21836. "prompt": {
  21837. "$ref": "#/components/schemas/Prompt"
  21838. },
  21839. "delivery": {
  21840. "type": "string",
  21841. "enum": ["steer", "queue"]
  21842. }
  21843. },
  21844. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  21845. "additionalProperties": false
  21846. }
  21847. },
  21848. "required": ["type", "id", "seq", "aggregateID", "data"],
  21849. "additionalProperties": false
  21850. }
  21851. },
  21852. "required": ["type", "id", "syncEvent"],
  21853. "additionalProperties": false
  21854. },
  21855. "SyncEventSessionNextPromptPromoted": {
  21856. "type": "object",
  21857. "properties": {
  21858. "type": {
  21859. "type": "string",
  21860. "enum": ["sync"]
  21861. },
  21862. "id": {
  21863. "type": "string",
  21864. "pattern": "^evt_"
  21865. },
  21866. "syncEvent": {
  21867. "type": "object",
  21868. "properties": {
  21869. "type": {
  21870. "type": "string",
  21871. "enum": ["session.next.prompt.promoted.1"]
  21872. },
  21873. "id": {
  21874. "type": "string",
  21875. "pattern": "^evt_"
  21876. },
  21877. "seq": {
  21878. "type": "number"
  21879. },
  21880. "aggregateID": {
  21881. "type": "string"
  21882. },
  21883. "data": {
  21884. "type": "object",
  21885. "properties": {
  21886. "timestamp": {
  21887. "type": "number"
  21888. },
  21889. "sessionID": {
  21890. "type": "string",
  21891. "pattern": "^ses"
  21892. },
  21893. "messageID": {
  21894. "type": "string",
  21895. "pattern": "^msg_"
  21896. },
  21897. "prompt": {
  21898. "$ref": "#/components/schemas/Prompt"
  21899. },
  21900. "timeCreated": {
  21901. "type": "number"
  21902. }
  21903. },
  21904. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  21905. "additionalProperties": false
  21906. }
  21907. },
  21908. "required": ["type", "id", "seq", "aggregateID", "data"],
  21909. "additionalProperties": false
  21910. }
  21911. },
  21912. "required": ["type", "id", "syncEvent"],
  21913. "additionalProperties": false
  21914. },
  21915. "SyncEventSessionNextContextUpdated": {
  21916. "type": "object",
  21917. "properties": {
  21918. "type": {
  21919. "type": "string",
  21920. "enum": ["sync"]
  21921. },
  21922. "id": {
  21923. "type": "string",
  21924. "pattern": "^evt_"
  21925. },
  21926. "syncEvent": {
  21927. "type": "object",
  21928. "properties": {
  21929. "type": {
  21930. "type": "string",
  21931. "enum": ["session.next.context.updated.1"]
  21932. },
  21933. "id": {
  21934. "type": "string",
  21935. "pattern": "^evt_"
  21936. },
  21937. "seq": {
  21938. "type": "number"
  21939. },
  21940. "aggregateID": {
  21941. "type": "string"
  21942. },
  21943. "data": {
  21944. "type": "object",
  21945. "properties": {
  21946. "timestamp": {
  21947. "type": "number"
  21948. },
  21949. "sessionID": {
  21950. "type": "string",
  21951. "pattern": "^ses"
  21952. },
  21953. "messageID": {
  21954. "type": "string",
  21955. "pattern": "^msg_"
  21956. },
  21957. "text": {
  21958. "type": "string"
  21959. }
  21960. },
  21961. "required": ["timestamp", "sessionID", "messageID", "text"],
  21962. "additionalProperties": false
  21963. }
  21964. },
  21965. "required": ["type", "id", "seq", "aggregateID", "data"],
  21966. "additionalProperties": false
  21967. }
  21968. },
  21969. "required": ["type", "id", "syncEvent"],
  21970. "additionalProperties": false
  21971. },
  21972. "SyncEventSessionNextSynthetic": {
  21973. "type": "object",
  21974. "properties": {
  21975. "type": {
  21976. "type": "string",
  21977. "enum": ["sync"]
  21978. },
  21979. "id": {
  21980. "type": "string",
  21981. "pattern": "^evt_"
  21982. },
  21983. "syncEvent": {
  21984. "type": "object",
  21985. "properties": {
  21986. "type": {
  21987. "type": "string",
  21988. "enum": ["session.next.synthetic.1"]
  21989. },
  21990. "id": {
  21991. "type": "string",
  21992. "pattern": "^evt_"
  21993. },
  21994. "seq": {
  21995. "type": "number"
  21996. },
  21997. "aggregateID": {
  21998. "type": "string"
  21999. },
  22000. "data": {
  22001. "type": "object",
  22002. "properties": {
  22003. "timestamp": {
  22004. "type": "number"
  22005. },
  22006. "sessionID": {
  22007. "type": "string",
  22008. "pattern": "^ses"
  22009. },
  22010. "messageID": {
  22011. "type": "string",
  22012. "pattern": "^msg_"
  22013. },
  22014. "text": {
  22015. "type": "string"
  22016. }
  22017. },
  22018. "required": ["timestamp", "sessionID", "messageID", "text"],
  22019. "additionalProperties": false
  22020. }
  22021. },
  22022. "required": ["type", "id", "seq", "aggregateID", "data"],
  22023. "additionalProperties": false
  22024. }
  22025. },
  22026. "required": ["type", "id", "syncEvent"],
  22027. "additionalProperties": false
  22028. },
  22029. "SyncEventSessionNextShellStarted": {
  22030. "type": "object",
  22031. "properties": {
  22032. "type": {
  22033. "type": "string",
  22034. "enum": ["sync"]
  22035. },
  22036. "id": {
  22037. "type": "string",
  22038. "pattern": "^evt_"
  22039. },
  22040. "syncEvent": {
  22041. "type": "object",
  22042. "properties": {
  22043. "type": {
  22044. "type": "string",
  22045. "enum": ["session.next.shell.started.1"]
  22046. },
  22047. "id": {
  22048. "type": "string",
  22049. "pattern": "^evt_"
  22050. },
  22051. "seq": {
  22052. "type": "number"
  22053. },
  22054. "aggregateID": {
  22055. "type": "string"
  22056. },
  22057. "data": {
  22058. "type": "object",
  22059. "properties": {
  22060. "timestamp": {
  22061. "type": "number"
  22062. },
  22063. "sessionID": {
  22064. "type": "string",
  22065. "pattern": "^ses"
  22066. },
  22067. "messageID": {
  22068. "type": "string",
  22069. "pattern": "^msg_"
  22070. },
  22071. "callID": {
  22072. "type": "string"
  22073. },
  22074. "command": {
  22075. "type": "string"
  22076. }
  22077. },
  22078. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  22079. "additionalProperties": false
  22080. }
  22081. },
  22082. "required": ["type", "id", "seq", "aggregateID", "data"],
  22083. "additionalProperties": false
  22084. }
  22085. },
  22086. "required": ["type", "id", "syncEvent"],
  22087. "additionalProperties": false
  22088. },
  22089. "SyncEventSessionNextShellEnded": {
  22090. "type": "object",
  22091. "properties": {
  22092. "type": {
  22093. "type": "string",
  22094. "enum": ["sync"]
  22095. },
  22096. "id": {
  22097. "type": "string",
  22098. "pattern": "^evt_"
  22099. },
  22100. "syncEvent": {
  22101. "type": "object",
  22102. "properties": {
  22103. "type": {
  22104. "type": "string",
  22105. "enum": ["session.next.shell.ended.1"]
  22106. },
  22107. "id": {
  22108. "type": "string",
  22109. "pattern": "^evt_"
  22110. },
  22111. "seq": {
  22112. "type": "number"
  22113. },
  22114. "aggregateID": {
  22115. "type": "string"
  22116. },
  22117. "data": {
  22118. "type": "object",
  22119. "properties": {
  22120. "timestamp": {
  22121. "type": "number"
  22122. },
  22123. "sessionID": {
  22124. "type": "string",
  22125. "pattern": "^ses"
  22126. },
  22127. "callID": {
  22128. "type": "string"
  22129. },
  22130. "output": {
  22131. "type": "string"
  22132. }
  22133. },
  22134. "required": ["timestamp", "sessionID", "callID", "output"],
  22135. "additionalProperties": false
  22136. }
  22137. },
  22138. "required": ["type", "id", "seq", "aggregateID", "data"],
  22139. "additionalProperties": false
  22140. }
  22141. },
  22142. "required": ["type", "id", "syncEvent"],
  22143. "additionalProperties": false
  22144. },
  22145. "SyncEventSessionNextStepStarted": {
  22146. "type": "object",
  22147. "properties": {
  22148. "type": {
  22149. "type": "string",
  22150. "enum": ["sync"]
  22151. },
  22152. "id": {
  22153. "type": "string",
  22154. "pattern": "^evt_"
  22155. },
  22156. "syncEvent": {
  22157. "type": "object",
  22158. "properties": {
  22159. "type": {
  22160. "type": "string",
  22161. "enum": ["session.next.step.started.1"]
  22162. },
  22163. "id": {
  22164. "type": "string",
  22165. "pattern": "^evt_"
  22166. },
  22167. "seq": {
  22168. "type": "number"
  22169. },
  22170. "aggregateID": {
  22171. "type": "string"
  22172. },
  22173. "data": {
  22174. "type": "object",
  22175. "properties": {
  22176. "timestamp": {
  22177. "type": "number"
  22178. },
  22179. "sessionID": {
  22180. "type": "string",
  22181. "pattern": "^ses"
  22182. },
  22183. "assistantMessageID": {
  22184. "type": "string",
  22185. "pattern": "^msg_"
  22186. },
  22187. "agent": {
  22188. "type": "string"
  22189. },
  22190. "model": {
  22191. "type": "object",
  22192. "properties": {
  22193. "id": {
  22194. "type": "string"
  22195. },
  22196. "providerID": {
  22197. "type": "string"
  22198. },
  22199. "variant": {
  22200. "type": "string"
  22201. }
  22202. },
  22203. "required": ["id", "providerID"],
  22204. "additionalProperties": false
  22205. },
  22206. "snapshot": {
  22207. "type": "string"
  22208. }
  22209. },
  22210. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  22211. "additionalProperties": false
  22212. }
  22213. },
  22214. "required": ["type", "id", "seq", "aggregateID", "data"],
  22215. "additionalProperties": false
  22216. }
  22217. },
  22218. "required": ["type", "id", "syncEvent"],
  22219. "additionalProperties": false
  22220. },
  22221. "SyncEventSessionNextStepEnded": {
  22222. "type": "object",
  22223. "properties": {
  22224. "type": {
  22225. "type": "string",
  22226. "enum": ["sync"]
  22227. },
  22228. "id": {
  22229. "type": "string",
  22230. "pattern": "^evt_"
  22231. },
  22232. "syncEvent": {
  22233. "type": "object",
  22234. "properties": {
  22235. "type": {
  22236. "type": "string",
  22237. "enum": ["session.next.step.ended.2"]
  22238. },
  22239. "id": {
  22240. "type": "string",
  22241. "pattern": "^evt_"
  22242. },
  22243. "seq": {
  22244. "type": "number"
  22245. },
  22246. "aggregateID": {
  22247. "type": "string"
  22248. },
  22249. "data": {
  22250. "type": "object",
  22251. "properties": {
  22252. "timestamp": {
  22253. "type": "number"
  22254. },
  22255. "sessionID": {
  22256. "type": "string",
  22257. "pattern": "^ses"
  22258. },
  22259. "assistantMessageID": {
  22260. "type": "string",
  22261. "pattern": "^msg_"
  22262. },
  22263. "finish": {
  22264. "type": "string"
  22265. },
  22266. "cost": {
  22267. "type": "number"
  22268. },
  22269. "tokens": {
  22270. "type": "object",
  22271. "properties": {
  22272. "input": {
  22273. "type": "number"
  22274. },
  22275. "output": {
  22276. "type": "number"
  22277. },
  22278. "reasoning": {
  22279. "type": "number"
  22280. },
  22281. "cache": {
  22282. "type": "object",
  22283. "properties": {
  22284. "read": {
  22285. "type": "number"
  22286. },
  22287. "write": {
  22288. "type": "number"
  22289. }
  22290. },
  22291. "required": ["read", "write"],
  22292. "additionalProperties": false
  22293. }
  22294. },
  22295. "required": ["input", "output", "reasoning", "cache"],
  22296. "additionalProperties": false
  22297. },
  22298. "snapshot": {
  22299. "type": "string"
  22300. }
  22301. },
  22302. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  22303. "additionalProperties": false
  22304. }
  22305. },
  22306. "required": ["type", "id", "seq", "aggregateID", "data"],
  22307. "additionalProperties": false
  22308. }
  22309. },
  22310. "required": ["type", "id", "syncEvent"],
  22311. "additionalProperties": false
  22312. },
  22313. "SyncEventSessionNextStepFailed": {
  22314. "type": "object",
  22315. "properties": {
  22316. "type": {
  22317. "type": "string",
  22318. "enum": ["sync"]
  22319. },
  22320. "id": {
  22321. "type": "string",
  22322. "pattern": "^evt_"
  22323. },
  22324. "syncEvent": {
  22325. "type": "object",
  22326. "properties": {
  22327. "type": {
  22328. "type": "string",
  22329. "enum": ["session.next.step.failed.2"]
  22330. },
  22331. "id": {
  22332. "type": "string",
  22333. "pattern": "^evt_"
  22334. },
  22335. "seq": {
  22336. "type": "number"
  22337. },
  22338. "aggregateID": {
  22339. "type": "string"
  22340. },
  22341. "data": {
  22342. "type": "object",
  22343. "properties": {
  22344. "timestamp": {
  22345. "type": "number"
  22346. },
  22347. "sessionID": {
  22348. "type": "string",
  22349. "pattern": "^ses"
  22350. },
  22351. "assistantMessageID": {
  22352. "type": "string",
  22353. "pattern": "^msg_"
  22354. },
  22355. "error": {
  22356. "$ref": "#/components/schemas/SessionErrorUnknown"
  22357. }
  22358. },
  22359. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  22360. "additionalProperties": false
  22361. }
  22362. },
  22363. "required": ["type", "id", "seq", "aggregateID", "data"],
  22364. "additionalProperties": false
  22365. }
  22366. },
  22367. "required": ["type", "id", "syncEvent"],
  22368. "additionalProperties": false
  22369. },
  22370. "SyncEventSessionNextTextStarted": {
  22371. "type": "object",
  22372. "properties": {
  22373. "type": {
  22374. "type": "string",
  22375. "enum": ["sync"]
  22376. },
  22377. "id": {
  22378. "type": "string",
  22379. "pattern": "^evt_"
  22380. },
  22381. "syncEvent": {
  22382. "type": "object",
  22383. "properties": {
  22384. "type": {
  22385. "type": "string",
  22386. "enum": ["session.next.text.started.1"]
  22387. },
  22388. "id": {
  22389. "type": "string",
  22390. "pattern": "^evt_"
  22391. },
  22392. "seq": {
  22393. "type": "number"
  22394. },
  22395. "aggregateID": {
  22396. "type": "string"
  22397. },
  22398. "data": {
  22399. "type": "object",
  22400. "properties": {
  22401. "timestamp": {
  22402. "type": "number"
  22403. },
  22404. "sessionID": {
  22405. "type": "string",
  22406. "pattern": "^ses"
  22407. },
  22408. "assistantMessageID": {
  22409. "type": "string",
  22410. "pattern": "^msg_"
  22411. },
  22412. "textID": {
  22413. "type": "string"
  22414. }
  22415. },
  22416. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  22417. "additionalProperties": false
  22418. }
  22419. },
  22420. "required": ["type", "id", "seq", "aggregateID", "data"],
  22421. "additionalProperties": false
  22422. }
  22423. },
  22424. "required": ["type", "id", "syncEvent"],
  22425. "additionalProperties": false
  22426. },
  22427. "SyncEventSessionNextTextEnded": {
  22428. "type": "object",
  22429. "properties": {
  22430. "type": {
  22431. "type": "string",
  22432. "enum": ["sync"]
  22433. },
  22434. "id": {
  22435. "type": "string",
  22436. "pattern": "^evt_"
  22437. },
  22438. "syncEvent": {
  22439. "type": "object",
  22440. "properties": {
  22441. "type": {
  22442. "type": "string",
  22443. "enum": ["session.next.text.ended.1"]
  22444. },
  22445. "id": {
  22446. "type": "string",
  22447. "pattern": "^evt_"
  22448. },
  22449. "seq": {
  22450. "type": "number"
  22451. },
  22452. "aggregateID": {
  22453. "type": "string"
  22454. },
  22455. "data": {
  22456. "type": "object",
  22457. "properties": {
  22458. "timestamp": {
  22459. "type": "number"
  22460. },
  22461. "sessionID": {
  22462. "type": "string",
  22463. "pattern": "^ses"
  22464. },
  22465. "assistantMessageID": {
  22466. "type": "string",
  22467. "pattern": "^msg_"
  22468. },
  22469. "textID": {
  22470. "type": "string"
  22471. },
  22472. "text": {
  22473. "type": "string"
  22474. }
  22475. },
  22476. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  22477. "additionalProperties": false
  22478. }
  22479. },
  22480. "required": ["type", "id", "seq", "aggregateID", "data"],
  22481. "additionalProperties": false
  22482. }
  22483. },
  22484. "required": ["type", "id", "syncEvent"],
  22485. "additionalProperties": false
  22486. },
  22487. "SyncEventSessionNextReasoningStarted": {
  22488. "type": "object",
  22489. "properties": {
  22490. "type": {
  22491. "type": "string",
  22492. "enum": ["sync"]
  22493. },
  22494. "id": {
  22495. "type": "string",
  22496. "pattern": "^evt_"
  22497. },
  22498. "syncEvent": {
  22499. "type": "object",
  22500. "properties": {
  22501. "type": {
  22502. "type": "string",
  22503. "enum": ["session.next.reasoning.started.1"]
  22504. },
  22505. "id": {
  22506. "type": "string",
  22507. "pattern": "^evt_"
  22508. },
  22509. "seq": {
  22510. "type": "number"
  22511. },
  22512. "aggregateID": {
  22513. "type": "string"
  22514. },
  22515. "data": {
  22516. "type": "object",
  22517. "properties": {
  22518. "timestamp": {
  22519. "type": "number"
  22520. },
  22521. "sessionID": {
  22522. "type": "string",
  22523. "pattern": "^ses"
  22524. },
  22525. "assistantMessageID": {
  22526. "type": "string",
  22527. "pattern": "^msg_"
  22528. },
  22529. "reasoningID": {
  22530. "type": "string"
  22531. },
  22532. "providerMetadata": {
  22533. "type": "object",
  22534. "additionalProperties": {
  22535. "type": "object"
  22536. }
  22537. }
  22538. },
  22539. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  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. "SyncEventSessionNextReasoningEnded": {
  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.reasoning.ended.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. "assistantMessageID": {
  22589. "type": "string",
  22590. "pattern": "^msg_"
  22591. },
  22592. "reasoningID": {
  22593. "type": "string"
  22594. },
  22595. "text": {
  22596. "type": "string"
  22597. },
  22598. "providerMetadata": {
  22599. "type": "object",
  22600. "additionalProperties": {
  22601. "type": "object"
  22602. }
  22603. }
  22604. },
  22605. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  22606. "additionalProperties": false
  22607. }
  22608. },
  22609. "required": ["type", "id", "seq", "aggregateID", "data"],
  22610. "additionalProperties": false
  22611. }
  22612. },
  22613. "required": ["type", "id", "syncEvent"],
  22614. "additionalProperties": false
  22615. },
  22616. "SyncEventSessionNextToolInputStarted": {
  22617. "type": "object",
  22618. "properties": {
  22619. "type": {
  22620. "type": "string",
  22621. "enum": ["sync"]
  22622. },
  22623. "id": {
  22624. "type": "string",
  22625. "pattern": "^evt_"
  22626. },
  22627. "syncEvent": {
  22628. "type": "object",
  22629. "properties": {
  22630. "type": {
  22631. "type": "string",
  22632. "enum": ["session.next.tool.input.started.1"]
  22633. },
  22634. "id": {
  22635. "type": "string",
  22636. "pattern": "^evt_"
  22637. },
  22638. "seq": {
  22639. "type": "number"
  22640. },
  22641. "aggregateID": {
  22642. "type": "string"
  22643. },
  22644. "data": {
  22645. "type": "object",
  22646. "properties": {
  22647. "timestamp": {
  22648. "type": "number"
  22649. },
  22650. "sessionID": {
  22651. "type": "string",
  22652. "pattern": "^ses"
  22653. },
  22654. "assistantMessageID": {
  22655. "type": "string",
  22656. "pattern": "^msg_"
  22657. },
  22658. "callID": {
  22659. "type": "string"
  22660. },
  22661. "name": {
  22662. "type": "string"
  22663. }
  22664. },
  22665. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  22666. "additionalProperties": false
  22667. }
  22668. },
  22669. "required": ["type", "id", "seq", "aggregateID", "data"],
  22670. "additionalProperties": false
  22671. }
  22672. },
  22673. "required": ["type", "id", "syncEvent"],
  22674. "additionalProperties": false
  22675. },
  22676. "SyncEventSessionNextToolInputEnded": {
  22677. "type": "object",
  22678. "properties": {
  22679. "type": {
  22680. "type": "string",
  22681. "enum": ["sync"]
  22682. },
  22683. "id": {
  22684. "type": "string",
  22685. "pattern": "^evt_"
  22686. },
  22687. "syncEvent": {
  22688. "type": "object",
  22689. "properties": {
  22690. "type": {
  22691. "type": "string",
  22692. "enum": ["session.next.tool.input.ended.1"]
  22693. },
  22694. "id": {
  22695. "type": "string",
  22696. "pattern": "^evt_"
  22697. },
  22698. "seq": {
  22699. "type": "number"
  22700. },
  22701. "aggregateID": {
  22702. "type": "string"
  22703. },
  22704. "data": {
  22705. "type": "object",
  22706. "properties": {
  22707. "timestamp": {
  22708. "type": "number"
  22709. },
  22710. "sessionID": {
  22711. "type": "string",
  22712. "pattern": "^ses"
  22713. },
  22714. "assistantMessageID": {
  22715. "type": "string",
  22716. "pattern": "^msg_"
  22717. },
  22718. "callID": {
  22719. "type": "string"
  22720. },
  22721. "text": {
  22722. "type": "string"
  22723. }
  22724. },
  22725. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  22726. "additionalProperties": false
  22727. }
  22728. },
  22729. "required": ["type", "id", "seq", "aggregateID", "data"],
  22730. "additionalProperties": false
  22731. }
  22732. },
  22733. "required": ["type", "id", "syncEvent"],
  22734. "additionalProperties": false
  22735. },
  22736. "SyncEventSessionNextToolCalled": {
  22737. "type": "object",
  22738. "properties": {
  22739. "type": {
  22740. "type": "string",
  22741. "enum": ["sync"]
  22742. },
  22743. "id": {
  22744. "type": "string",
  22745. "pattern": "^evt_"
  22746. },
  22747. "syncEvent": {
  22748. "type": "object",
  22749. "properties": {
  22750. "type": {
  22751. "type": "string",
  22752. "enum": ["session.next.tool.called.1"]
  22753. },
  22754. "id": {
  22755. "type": "string",
  22756. "pattern": "^evt_"
  22757. },
  22758. "seq": {
  22759. "type": "number"
  22760. },
  22761. "aggregateID": {
  22762. "type": "string"
  22763. },
  22764. "data": {
  22765. "type": "object",
  22766. "properties": {
  22767. "timestamp": {
  22768. "type": "number"
  22769. },
  22770. "sessionID": {
  22771. "type": "string",
  22772. "pattern": "^ses"
  22773. },
  22774. "assistantMessageID": {
  22775. "type": "string",
  22776. "pattern": "^msg_"
  22777. },
  22778. "callID": {
  22779. "type": "string"
  22780. },
  22781. "tool": {
  22782. "type": "string"
  22783. },
  22784. "input": {
  22785. "type": "object"
  22786. },
  22787. "provider": {
  22788. "type": "object",
  22789. "properties": {
  22790. "executed": {
  22791. "type": "boolean"
  22792. },
  22793. "metadata": {
  22794. "type": "object",
  22795. "additionalProperties": {
  22796. "type": "object"
  22797. }
  22798. }
  22799. },
  22800. "required": ["executed"],
  22801. "additionalProperties": false
  22802. }
  22803. },
  22804. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  22805. "additionalProperties": false
  22806. }
  22807. },
  22808. "required": ["type", "id", "seq", "aggregateID", "data"],
  22809. "additionalProperties": false
  22810. }
  22811. },
  22812. "required": ["type", "id", "syncEvent"],
  22813. "additionalProperties": false
  22814. },
  22815. "SyncEventSessionNextToolProgress": {
  22816. "type": "object",
  22817. "properties": {
  22818. "type": {
  22819. "type": "string",
  22820. "enum": ["sync"]
  22821. },
  22822. "id": {
  22823. "type": "string",
  22824. "pattern": "^evt_"
  22825. },
  22826. "syncEvent": {
  22827. "type": "object",
  22828. "properties": {
  22829. "type": {
  22830. "type": "string",
  22831. "enum": ["session.next.tool.progress.1"]
  22832. },
  22833. "id": {
  22834. "type": "string",
  22835. "pattern": "^evt_"
  22836. },
  22837. "seq": {
  22838. "type": "number"
  22839. },
  22840. "aggregateID": {
  22841. "type": "string"
  22842. },
  22843. "data": {
  22844. "type": "object",
  22845. "properties": {
  22846. "timestamp": {
  22847. "type": "number"
  22848. },
  22849. "sessionID": {
  22850. "type": "string",
  22851. "pattern": "^ses"
  22852. },
  22853. "assistantMessageID": {
  22854. "type": "string",
  22855. "pattern": "^msg_"
  22856. },
  22857. "callID": {
  22858. "type": "string"
  22859. },
  22860. "structured": {
  22861. "type": "object"
  22862. },
  22863. "content": {
  22864. "type": "array",
  22865. "items": {
  22866. "anyOf": [
  22867. {
  22868. "$ref": "#/components/schemas/ToolTextContent"
  22869. },
  22870. {
  22871. "$ref": "#/components/schemas/ToolFileContent"
  22872. }
  22873. ]
  22874. }
  22875. }
  22876. },
  22877. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  22878. "additionalProperties": false
  22879. }
  22880. },
  22881. "required": ["type", "id", "seq", "aggregateID", "data"],
  22882. "additionalProperties": false
  22883. }
  22884. },
  22885. "required": ["type", "id", "syncEvent"],
  22886. "additionalProperties": false
  22887. },
  22888. "SyncEventSessionNextToolSuccess": {
  22889. "type": "object",
  22890. "properties": {
  22891. "type": {
  22892. "type": "string",
  22893. "enum": ["sync"]
  22894. },
  22895. "id": {
  22896. "type": "string",
  22897. "pattern": "^evt_"
  22898. },
  22899. "syncEvent": {
  22900. "type": "object",
  22901. "properties": {
  22902. "type": {
  22903. "type": "string",
  22904. "enum": ["session.next.tool.success.1"]
  22905. },
  22906. "id": {
  22907. "type": "string",
  22908. "pattern": "^evt_"
  22909. },
  22910. "seq": {
  22911. "type": "number"
  22912. },
  22913. "aggregateID": {
  22914. "type": "string"
  22915. },
  22916. "data": {
  22917. "type": "object",
  22918. "properties": {
  22919. "timestamp": {
  22920. "type": "number"
  22921. },
  22922. "sessionID": {
  22923. "type": "string",
  22924. "pattern": "^ses"
  22925. },
  22926. "assistantMessageID": {
  22927. "type": "string",
  22928. "pattern": "^msg_"
  22929. },
  22930. "callID": {
  22931. "type": "string"
  22932. },
  22933. "structured": {
  22934. "type": "object"
  22935. },
  22936. "content": {
  22937. "type": "array",
  22938. "items": {
  22939. "anyOf": [
  22940. {
  22941. "$ref": "#/components/schemas/ToolTextContent"
  22942. },
  22943. {
  22944. "$ref": "#/components/schemas/ToolFileContent"
  22945. }
  22946. ]
  22947. }
  22948. },
  22949. "result": {},
  22950. "provider": {
  22951. "type": "object",
  22952. "properties": {
  22953. "executed": {
  22954. "type": "boolean"
  22955. },
  22956. "metadata": {
  22957. "type": "object",
  22958. "additionalProperties": {
  22959. "type": "object"
  22960. }
  22961. }
  22962. },
  22963. "required": ["executed"],
  22964. "additionalProperties": false
  22965. }
  22966. },
  22967. "required": [
  22968. "timestamp",
  22969. "sessionID",
  22970. "assistantMessageID",
  22971. "callID",
  22972. "structured",
  22973. "content",
  22974. "provider"
  22975. ],
  22976. "additionalProperties": false
  22977. }
  22978. },
  22979. "required": ["type", "id", "seq", "aggregateID", "data"],
  22980. "additionalProperties": false
  22981. }
  22982. },
  22983. "required": ["type", "id", "syncEvent"],
  22984. "additionalProperties": false
  22985. },
  22986. "SyncEventSessionNextToolFailed": {
  22987. "type": "object",
  22988. "properties": {
  22989. "type": {
  22990. "type": "string",
  22991. "enum": ["sync"]
  22992. },
  22993. "id": {
  22994. "type": "string",
  22995. "pattern": "^evt_"
  22996. },
  22997. "syncEvent": {
  22998. "type": "object",
  22999. "properties": {
  23000. "type": {
  23001. "type": "string",
  23002. "enum": ["session.next.tool.failed.1"]
  23003. },
  23004. "id": {
  23005. "type": "string",
  23006. "pattern": "^evt_"
  23007. },
  23008. "seq": {
  23009. "type": "number"
  23010. },
  23011. "aggregateID": {
  23012. "type": "string"
  23013. },
  23014. "data": {
  23015. "type": "object",
  23016. "properties": {
  23017. "timestamp": {
  23018. "type": "number"
  23019. },
  23020. "sessionID": {
  23021. "type": "string",
  23022. "pattern": "^ses"
  23023. },
  23024. "assistantMessageID": {
  23025. "type": "string",
  23026. "pattern": "^msg_"
  23027. },
  23028. "callID": {
  23029. "type": "string"
  23030. },
  23031. "error": {
  23032. "$ref": "#/components/schemas/SessionErrorUnknown"
  23033. },
  23034. "result": {},
  23035. "provider": {
  23036. "type": "object",
  23037. "properties": {
  23038. "executed": {
  23039. "type": "boolean"
  23040. },
  23041. "metadata": {
  23042. "type": "object",
  23043. "additionalProperties": {
  23044. "type": "object"
  23045. }
  23046. }
  23047. },
  23048. "required": ["executed"],
  23049. "additionalProperties": false
  23050. }
  23051. },
  23052. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  23053. "additionalProperties": false
  23054. }
  23055. },
  23056. "required": ["type", "id", "seq", "aggregateID", "data"],
  23057. "additionalProperties": false
  23058. }
  23059. },
  23060. "required": ["type", "id", "syncEvent"],
  23061. "additionalProperties": false
  23062. },
  23063. "SyncEventSessionNextRetried": {
  23064. "type": "object",
  23065. "properties": {
  23066. "type": {
  23067. "type": "string",
  23068. "enum": ["sync"]
  23069. },
  23070. "id": {
  23071. "type": "string",
  23072. "pattern": "^evt_"
  23073. },
  23074. "syncEvent": {
  23075. "type": "object",
  23076. "properties": {
  23077. "type": {
  23078. "type": "string",
  23079. "enum": ["session.next.retried.1"]
  23080. },
  23081. "id": {
  23082. "type": "string",
  23083. "pattern": "^evt_"
  23084. },
  23085. "seq": {
  23086. "type": "number"
  23087. },
  23088. "aggregateID": {
  23089. "type": "string"
  23090. },
  23091. "data": {
  23092. "type": "object",
  23093. "properties": {
  23094. "timestamp": {
  23095. "type": "number"
  23096. },
  23097. "sessionID": {
  23098. "type": "string",
  23099. "pattern": "^ses"
  23100. },
  23101. "attempt": {
  23102. "type": "number"
  23103. },
  23104. "error": {
  23105. "$ref": "#/components/schemas/SessionNextRetry_error"
  23106. }
  23107. },
  23108. "required": ["timestamp", "sessionID", "attempt", "error"],
  23109. "additionalProperties": false
  23110. }
  23111. },
  23112. "required": ["type", "id", "seq", "aggregateID", "data"],
  23113. "additionalProperties": false
  23114. }
  23115. },
  23116. "required": ["type", "id", "syncEvent"],
  23117. "additionalProperties": false
  23118. },
  23119. "SyncEventSessionNextCompactionStarted": {
  23120. "type": "object",
  23121. "properties": {
  23122. "type": {
  23123. "type": "string",
  23124. "enum": ["sync"]
  23125. },
  23126. "id": {
  23127. "type": "string",
  23128. "pattern": "^evt_"
  23129. },
  23130. "syncEvent": {
  23131. "type": "object",
  23132. "properties": {
  23133. "type": {
  23134. "type": "string",
  23135. "enum": ["session.next.compaction.started.1"]
  23136. },
  23137. "id": {
  23138. "type": "string",
  23139. "pattern": "^evt_"
  23140. },
  23141. "seq": {
  23142. "type": "number"
  23143. },
  23144. "aggregateID": {
  23145. "type": "string"
  23146. },
  23147. "data": {
  23148. "type": "object",
  23149. "properties": {
  23150. "timestamp": {
  23151. "type": "number"
  23152. },
  23153. "sessionID": {
  23154. "type": "string",
  23155. "pattern": "^ses"
  23156. },
  23157. "messageID": {
  23158. "type": "string",
  23159. "pattern": "^msg_"
  23160. },
  23161. "reason": {
  23162. "type": "string",
  23163. "enum": ["auto", "manual"]
  23164. }
  23165. },
  23166. "required": ["timestamp", "sessionID", "messageID", "reason"],
  23167. "additionalProperties": false
  23168. }
  23169. },
  23170. "required": ["type", "id", "seq", "aggregateID", "data"],
  23171. "additionalProperties": false
  23172. }
  23173. },
  23174. "required": ["type", "id", "syncEvent"],
  23175. "additionalProperties": false
  23176. },
  23177. "SyncEventSessionNextCompactionDelta": {
  23178. "type": "object",
  23179. "properties": {
  23180. "type": {
  23181. "type": "string",
  23182. "enum": ["sync"]
  23183. },
  23184. "id": {
  23185. "type": "string",
  23186. "pattern": "^evt_"
  23187. },
  23188. "syncEvent": {
  23189. "type": "object",
  23190. "properties": {
  23191. "type": {
  23192. "type": "string",
  23193. "enum": ["session.next.compaction.delta.1"]
  23194. },
  23195. "id": {
  23196. "type": "string",
  23197. "pattern": "^evt_"
  23198. },
  23199. "seq": {
  23200. "type": "number"
  23201. },
  23202. "aggregateID": {
  23203. "type": "string"
  23204. },
  23205. "data": {
  23206. "type": "object",
  23207. "properties": {
  23208. "timestamp": {
  23209. "type": "number"
  23210. },
  23211. "sessionID": {
  23212. "type": "string",
  23213. "pattern": "^ses"
  23214. },
  23215. "text": {
  23216. "type": "string"
  23217. }
  23218. },
  23219. "required": ["timestamp", "sessionID", "text"],
  23220. "additionalProperties": false
  23221. }
  23222. },
  23223. "required": ["type", "id", "seq", "aggregateID", "data"],
  23224. "additionalProperties": false
  23225. }
  23226. },
  23227. "required": ["type", "id", "syncEvent"],
  23228. "additionalProperties": false
  23229. },
  23230. "SyncEventSessionNextCompactionEnded": {
  23231. "type": "object",
  23232. "properties": {
  23233. "type": {
  23234. "type": "string",
  23235. "enum": ["sync"]
  23236. },
  23237. "id": {
  23238. "type": "string",
  23239. "pattern": "^evt_"
  23240. },
  23241. "syncEvent": {
  23242. "type": "object",
  23243. "properties": {
  23244. "type": {
  23245. "type": "string",
  23246. "enum": ["session.next.compaction.ended.1"]
  23247. },
  23248. "id": {
  23249. "type": "string",
  23250. "pattern": "^evt_"
  23251. },
  23252. "seq": {
  23253. "type": "number"
  23254. },
  23255. "aggregateID": {
  23256. "type": "string"
  23257. },
  23258. "data": {
  23259. "type": "object",
  23260. "properties": {
  23261. "timestamp": {
  23262. "type": "number"
  23263. },
  23264. "sessionID": {
  23265. "type": "string",
  23266. "pattern": "^ses"
  23267. },
  23268. "text": {
  23269. "type": "string"
  23270. },
  23271. "include": {
  23272. "type": "string"
  23273. }
  23274. },
  23275. "required": ["timestamp", "sessionID", "text"],
  23276. "additionalProperties": false
  23277. }
  23278. },
  23279. "required": ["type", "id", "seq", "aggregateID", "data"],
  23280. "additionalProperties": false
  23281. }
  23282. },
  23283. "required": ["type", "id", "syncEvent"],
  23284. "additionalProperties": false
  23285. },
  23286. "PolicyEffect": {
  23287. "type": "string",
  23288. "enum": ["allow", "deny"]
  23289. },
  23290. "ConfigV2ExperimentalPolicy": {
  23291. "type": "object",
  23292. "properties": {
  23293. "action": {
  23294. "type": "string",
  23295. "enum": ["provider.use"]
  23296. },
  23297. "effect": {
  23298. "$ref": "#/components/schemas/PolicyEffect"
  23299. },
  23300. "resource": {
  23301. "type": "string"
  23302. }
  23303. },
  23304. "required": ["action", "effect", "resource"],
  23305. "additionalProperties": false
  23306. },
  23307. "ProjectDirectories": {
  23308. "type": "array",
  23309. "items": {
  23310. "type": "string"
  23311. }
  23312. },
  23313. "ProjectCopyCopy": {
  23314. "type": "object",
  23315. "properties": {
  23316. "directory": {
  23317. "type": "string"
  23318. }
  23319. },
  23320. "required": ["directory"],
  23321. "additionalProperties": false
  23322. },
  23323. "LocationInfo": {
  23324. "type": "object",
  23325. "properties": {
  23326. "directory": {
  23327. "type": "string"
  23328. },
  23329. "workspaceID": {
  23330. "type": "string",
  23331. "pattern": "^wrk"
  23332. },
  23333. "project": {
  23334. "type": "object",
  23335. "properties": {
  23336. "id": {
  23337. "type": "string"
  23338. },
  23339. "directory": {
  23340. "type": "string"
  23341. }
  23342. },
  23343. "required": ["id", "directory"],
  23344. "additionalProperties": false
  23345. }
  23346. },
  23347. "required": ["directory", "project"],
  23348. "additionalProperties": false
  23349. },
  23350. "PermissionV2Effect": {
  23351. "type": "string",
  23352. "enum": ["allow", "deny", "ask"]
  23353. },
  23354. "PermissionV2Rule": {
  23355. "type": "object",
  23356. "properties": {
  23357. "action": {
  23358. "type": "string"
  23359. },
  23360. "resource": {
  23361. "type": "string"
  23362. },
  23363. "effect": {
  23364. "$ref": "#/components/schemas/PermissionV2Effect"
  23365. }
  23366. },
  23367. "required": ["action", "resource", "effect"],
  23368. "additionalProperties": false
  23369. },
  23370. "PermissionV2Ruleset": {
  23371. "type": "array",
  23372. "items": {
  23373. "$ref": "#/components/schemas/PermissionV2Rule"
  23374. }
  23375. },
  23376. "AgentV2Info": {
  23377. "type": "object",
  23378. "properties": {
  23379. "id": {
  23380. "type": "string"
  23381. },
  23382. "model": {
  23383. "type": "object",
  23384. "properties": {
  23385. "id": {
  23386. "type": "string"
  23387. },
  23388. "providerID": {
  23389. "type": "string"
  23390. },
  23391. "variant": {
  23392. "type": "string"
  23393. }
  23394. },
  23395. "required": ["id", "providerID"],
  23396. "additionalProperties": false
  23397. },
  23398. "request": {
  23399. "type": "object",
  23400. "properties": {
  23401. "headers": {
  23402. "type": "object",
  23403. "additionalProperties": {
  23404. "type": "string"
  23405. }
  23406. },
  23407. "body": {
  23408. "type": "object"
  23409. }
  23410. },
  23411. "required": ["headers", "body"],
  23412. "additionalProperties": false
  23413. },
  23414. "system": {
  23415. "type": "string"
  23416. },
  23417. "description": {
  23418. "type": "string"
  23419. },
  23420. "mode": {
  23421. "type": "string",
  23422. "enum": ["subagent", "primary", "all"]
  23423. },
  23424. "hidden": {
  23425. "type": "boolean"
  23426. },
  23427. "color": {
  23428. "anyOf": [
  23429. {
  23430. "type": "string",
  23431. "pattern": "^#[0-9a-fA-F]{6}$"
  23432. },
  23433. {
  23434. "type": "string",
  23435. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  23436. }
  23437. ]
  23438. },
  23439. "steps": {
  23440. "type": "integer",
  23441. "exclusiveMinimum": 0
  23442. },
  23443. "permissions": {
  23444. "$ref": "#/components/schemas/PermissionV2Ruleset"
  23445. }
  23446. },
  23447. "required": ["id", "request", "mode", "hidden", "permissions"],
  23448. "additionalProperties": false
  23449. },
  23450. "SessionV2Info": {
  23451. "type": "object",
  23452. "properties": {
  23453. "id": {
  23454. "type": "string",
  23455. "pattern": "^ses"
  23456. },
  23457. "parentID": {
  23458. "type": "string",
  23459. "pattern": "^ses"
  23460. },
  23461. "projectID": {
  23462. "type": "string"
  23463. },
  23464. "agent": {
  23465. "type": "string"
  23466. },
  23467. "model": {
  23468. "type": "object",
  23469. "properties": {
  23470. "id": {
  23471. "type": "string"
  23472. },
  23473. "providerID": {
  23474. "type": "string"
  23475. },
  23476. "variant": {
  23477. "type": "string"
  23478. }
  23479. },
  23480. "required": ["id", "providerID"],
  23481. "additionalProperties": false
  23482. },
  23483. "cost": {
  23484. "type": "number"
  23485. },
  23486. "tokens": {
  23487. "type": "object",
  23488. "properties": {
  23489. "input": {
  23490. "type": "number"
  23491. },
  23492. "output": {
  23493. "type": "number"
  23494. },
  23495. "reasoning": {
  23496. "type": "number"
  23497. },
  23498. "cache": {
  23499. "type": "object",
  23500. "properties": {
  23501. "read": {
  23502. "type": "number"
  23503. },
  23504. "write": {
  23505. "type": "number"
  23506. }
  23507. },
  23508. "required": ["read", "write"],
  23509. "additionalProperties": false
  23510. }
  23511. },
  23512. "required": ["input", "output", "reasoning", "cache"],
  23513. "additionalProperties": false
  23514. },
  23515. "time": {
  23516. "type": "object",
  23517. "properties": {
  23518. "created": {
  23519. "type": "number"
  23520. },
  23521. "updated": {
  23522. "type": "number"
  23523. },
  23524. "archived": {
  23525. "type": "number"
  23526. }
  23527. },
  23528. "required": ["created", "updated"],
  23529. "additionalProperties": false
  23530. },
  23531. "title": {
  23532. "type": "string"
  23533. },
  23534. "location": {
  23535. "$ref": "#/components/schemas/LocationRef"
  23536. },
  23537. "subpath": {
  23538. "type": "string"
  23539. }
  23540. },
  23541. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  23542. "additionalProperties": false
  23543. },
  23544. "SessionInputAdmitted": {
  23545. "type": "object",
  23546. "properties": {
  23547. "admittedSeq": {
  23548. "type": "integer",
  23549. "minimum": 0
  23550. },
  23551. "id": {
  23552. "type": "string",
  23553. "pattern": "^msg_"
  23554. },
  23555. "sessionID": {
  23556. "type": "string",
  23557. "pattern": "^ses"
  23558. },
  23559. "prompt": {
  23560. "$ref": "#/components/schemas/Prompt"
  23561. },
  23562. "delivery": {
  23563. "type": "string",
  23564. "enum": ["steer", "queue"]
  23565. },
  23566. "timeCreated": {
  23567. "type": "number"
  23568. },
  23569. "promotedSeq": {
  23570. "type": "integer",
  23571. "minimum": 0
  23572. }
  23573. },
  23574. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  23575. "additionalProperties": false
  23576. },
  23577. "SessionMessageAgentSwitched": {
  23578. "type": "object",
  23579. "properties": {
  23580. "id": {
  23581. "type": "string",
  23582. "pattern": "^msg_"
  23583. },
  23584. "metadata": {
  23585. "type": "object"
  23586. },
  23587. "time": {
  23588. "type": "object",
  23589. "properties": {
  23590. "created": {
  23591. "type": "number"
  23592. }
  23593. },
  23594. "required": ["created"],
  23595. "additionalProperties": false
  23596. },
  23597. "type": {
  23598. "type": "string",
  23599. "enum": ["agent-switched"]
  23600. },
  23601. "agent": {
  23602. "type": "string"
  23603. }
  23604. },
  23605. "required": ["id", "time", "type", "agent"],
  23606. "additionalProperties": false
  23607. },
  23608. "SessionMessageModelSwitched": {
  23609. "type": "object",
  23610. "properties": {
  23611. "id": {
  23612. "type": "string",
  23613. "pattern": "^msg_"
  23614. },
  23615. "metadata": {
  23616. "type": "object"
  23617. },
  23618. "time": {
  23619. "type": "object",
  23620. "properties": {
  23621. "created": {
  23622. "type": "number"
  23623. }
  23624. },
  23625. "required": ["created"],
  23626. "additionalProperties": false
  23627. },
  23628. "type": {
  23629. "type": "string",
  23630. "enum": ["model-switched"]
  23631. },
  23632. "model": {
  23633. "type": "object",
  23634. "properties": {
  23635. "id": {
  23636. "type": "string"
  23637. },
  23638. "providerID": {
  23639. "type": "string"
  23640. },
  23641. "variant": {
  23642. "type": "string"
  23643. }
  23644. },
  23645. "required": ["id", "providerID"],
  23646. "additionalProperties": false
  23647. }
  23648. },
  23649. "required": ["id", "time", "type", "model"],
  23650. "additionalProperties": false
  23651. },
  23652. "SessionMessageUser": {
  23653. "type": "object",
  23654. "properties": {
  23655. "id": {
  23656. "type": "string",
  23657. "pattern": "^msg_"
  23658. },
  23659. "metadata": {
  23660. "type": "object"
  23661. },
  23662. "time": {
  23663. "type": "object",
  23664. "properties": {
  23665. "created": {
  23666. "type": "number"
  23667. }
  23668. },
  23669. "required": ["created"],
  23670. "additionalProperties": false
  23671. },
  23672. "text": {
  23673. "type": "string"
  23674. },
  23675. "files": {
  23676. "type": "array",
  23677. "items": {
  23678. "$ref": "#/components/schemas/PromptFileAttachment"
  23679. }
  23680. },
  23681. "agents": {
  23682. "type": "array",
  23683. "items": {
  23684. "$ref": "#/components/schemas/PromptAgentAttachment"
  23685. }
  23686. },
  23687. "references": {
  23688. "type": "array",
  23689. "items": {
  23690. "$ref": "#/components/schemas/PromptReferenceAttachment"
  23691. }
  23692. },
  23693. "type": {
  23694. "type": "string",
  23695. "enum": ["user"]
  23696. }
  23697. },
  23698. "required": ["id", "time", "text", "type"],
  23699. "additionalProperties": false
  23700. },
  23701. "SessionMessageSynthetic": {
  23702. "type": "object",
  23703. "properties": {
  23704. "id": {
  23705. "type": "string",
  23706. "pattern": "^msg_"
  23707. },
  23708. "metadata": {
  23709. "type": "object"
  23710. },
  23711. "time": {
  23712. "type": "object",
  23713. "properties": {
  23714. "created": {
  23715. "type": "number"
  23716. }
  23717. },
  23718. "required": ["created"],
  23719. "additionalProperties": false
  23720. },
  23721. "sessionID": {
  23722. "type": "string",
  23723. "pattern": "^ses"
  23724. },
  23725. "text": {
  23726. "type": "string"
  23727. },
  23728. "type": {
  23729. "type": "string",
  23730. "enum": ["synthetic"]
  23731. }
  23732. },
  23733. "required": ["id", "time", "sessionID", "text", "type"],
  23734. "additionalProperties": false
  23735. },
  23736. "SessionMessageSystem": {
  23737. "type": "object",
  23738. "properties": {
  23739. "id": {
  23740. "type": "string",
  23741. "pattern": "^msg_"
  23742. },
  23743. "metadata": {
  23744. "type": "object"
  23745. },
  23746. "time": {
  23747. "type": "object",
  23748. "properties": {
  23749. "created": {
  23750. "type": "number"
  23751. }
  23752. },
  23753. "required": ["created"],
  23754. "additionalProperties": false
  23755. },
  23756. "type": {
  23757. "type": "string",
  23758. "enum": ["system"]
  23759. },
  23760. "text": {
  23761. "type": "string"
  23762. }
  23763. },
  23764. "required": ["id", "time", "type", "text"],
  23765. "additionalProperties": false
  23766. },
  23767. "SessionMessageShell": {
  23768. "type": "object",
  23769. "properties": {
  23770. "id": {
  23771. "type": "string",
  23772. "pattern": "^msg_"
  23773. },
  23774. "metadata": {
  23775. "type": "object"
  23776. },
  23777. "time": {
  23778. "type": "object",
  23779. "properties": {
  23780. "created": {
  23781. "type": "number"
  23782. },
  23783. "completed": {
  23784. "type": "number"
  23785. }
  23786. },
  23787. "required": ["created"],
  23788. "additionalProperties": false
  23789. },
  23790. "type": {
  23791. "type": "string",
  23792. "enum": ["shell"]
  23793. },
  23794. "callID": {
  23795. "type": "string"
  23796. },
  23797. "command": {
  23798. "type": "string"
  23799. },
  23800. "output": {
  23801. "type": "string"
  23802. }
  23803. },
  23804. "required": ["id", "time", "type", "callID", "command", "output"],
  23805. "additionalProperties": false
  23806. },
  23807. "SessionMessageAssistantText": {
  23808. "type": "object",
  23809. "properties": {
  23810. "type": {
  23811. "type": "string",
  23812. "enum": ["text"]
  23813. },
  23814. "id": {
  23815. "type": "string"
  23816. },
  23817. "text": {
  23818. "type": "string"
  23819. }
  23820. },
  23821. "required": ["type", "id", "text"],
  23822. "additionalProperties": false
  23823. },
  23824. "SessionMessageAssistantReasoning": {
  23825. "type": "object",
  23826. "properties": {
  23827. "type": {
  23828. "type": "string",
  23829. "enum": ["reasoning"]
  23830. },
  23831. "id": {
  23832. "type": "string"
  23833. },
  23834. "text": {
  23835. "type": "string"
  23836. },
  23837. "providerMetadata": {
  23838. "type": "object",
  23839. "additionalProperties": {
  23840. "type": "object"
  23841. }
  23842. }
  23843. },
  23844. "required": ["type", "id", "text"],
  23845. "additionalProperties": false
  23846. },
  23847. "SessionMessageToolStatePending": {
  23848. "type": "object",
  23849. "properties": {
  23850. "status": {
  23851. "type": "string",
  23852. "enum": ["pending"]
  23853. },
  23854. "input": {
  23855. "type": "string"
  23856. }
  23857. },
  23858. "required": ["status", "input"],
  23859. "additionalProperties": false
  23860. },
  23861. "SessionMessageToolStateRunning": {
  23862. "type": "object",
  23863. "properties": {
  23864. "status": {
  23865. "type": "string",
  23866. "enum": ["running"]
  23867. },
  23868. "input": {
  23869. "type": "object"
  23870. },
  23871. "structured": {
  23872. "type": "object"
  23873. },
  23874. "content": {
  23875. "type": "array",
  23876. "items": {
  23877. "anyOf": [
  23878. {
  23879. "$ref": "#/components/schemas/ToolTextContent"
  23880. },
  23881. {
  23882. "$ref": "#/components/schemas/ToolFileContent"
  23883. }
  23884. ]
  23885. }
  23886. }
  23887. },
  23888. "required": ["status", "input", "structured", "content"],
  23889. "additionalProperties": false
  23890. },
  23891. "SessionMessageToolStateCompleted": {
  23892. "type": "object",
  23893. "properties": {
  23894. "status": {
  23895. "type": "string",
  23896. "enum": ["completed"]
  23897. },
  23898. "input": {
  23899. "type": "object"
  23900. },
  23901. "attachments": {
  23902. "type": "array",
  23903. "items": {
  23904. "$ref": "#/components/schemas/PromptFileAttachment"
  23905. }
  23906. },
  23907. "content": {
  23908. "type": "array",
  23909. "items": {
  23910. "anyOf": [
  23911. {
  23912. "$ref": "#/components/schemas/ToolTextContent"
  23913. },
  23914. {
  23915. "$ref": "#/components/schemas/ToolFileContent"
  23916. }
  23917. ]
  23918. }
  23919. },
  23920. "structured": {
  23921. "type": "object"
  23922. },
  23923. "result": {}
  23924. },
  23925. "required": ["status", "input", "content", "structured"],
  23926. "additionalProperties": false
  23927. },
  23928. "SessionMessageToolStateError": {
  23929. "type": "object",
  23930. "properties": {
  23931. "status": {
  23932. "type": "string",
  23933. "enum": ["error"]
  23934. },
  23935. "input": {
  23936. "type": "object"
  23937. },
  23938. "content": {
  23939. "type": "array",
  23940. "items": {
  23941. "anyOf": [
  23942. {
  23943. "$ref": "#/components/schemas/ToolTextContent"
  23944. },
  23945. {
  23946. "$ref": "#/components/schemas/ToolFileContent"
  23947. }
  23948. ]
  23949. }
  23950. },
  23951. "structured": {
  23952. "type": "object"
  23953. },
  23954. "error": {
  23955. "$ref": "#/components/schemas/SessionErrorUnknown"
  23956. },
  23957. "result": {}
  23958. },
  23959. "required": ["status", "input", "content", "structured", "error"],
  23960. "additionalProperties": false
  23961. },
  23962. "SessionMessageAssistantTool": {
  23963. "type": "object",
  23964. "properties": {
  23965. "type": {
  23966. "type": "string",
  23967. "enum": ["tool"]
  23968. },
  23969. "id": {
  23970. "type": "string"
  23971. },
  23972. "name": {
  23973. "type": "string"
  23974. },
  23975. "provider": {
  23976. "type": "object",
  23977. "properties": {
  23978. "executed": {
  23979. "type": "boolean"
  23980. },
  23981. "metadata": {
  23982. "type": "object",
  23983. "additionalProperties": {
  23984. "type": "object"
  23985. }
  23986. },
  23987. "resultMetadata": {
  23988. "type": "object",
  23989. "additionalProperties": {
  23990. "type": "object"
  23991. }
  23992. }
  23993. },
  23994. "required": ["executed"],
  23995. "additionalProperties": false
  23996. },
  23997. "state": {
  23998. "anyOf": [
  23999. {
  24000. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  24001. },
  24002. {
  24003. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  24004. },
  24005. {
  24006. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  24007. },
  24008. {
  24009. "$ref": "#/components/schemas/SessionMessageToolStateError"
  24010. }
  24011. ]
  24012. },
  24013. "time": {
  24014. "type": "object",
  24015. "properties": {
  24016. "created": {
  24017. "type": "number"
  24018. },
  24019. "ran": {
  24020. "type": "number"
  24021. },
  24022. "completed": {
  24023. "type": "number"
  24024. },
  24025. "pruned": {
  24026. "type": "number"
  24027. }
  24028. },
  24029. "required": ["created"],
  24030. "additionalProperties": false
  24031. }
  24032. },
  24033. "required": ["type", "id", "name", "state", "time"],
  24034. "additionalProperties": false
  24035. },
  24036. "SessionMessageAssistant": {
  24037. "type": "object",
  24038. "properties": {
  24039. "id": {
  24040. "type": "string",
  24041. "pattern": "^msg_"
  24042. },
  24043. "metadata": {
  24044. "type": "object"
  24045. },
  24046. "time": {
  24047. "type": "object",
  24048. "properties": {
  24049. "created": {
  24050. "type": "number"
  24051. },
  24052. "completed": {
  24053. "type": "number"
  24054. }
  24055. },
  24056. "required": ["created"],
  24057. "additionalProperties": false
  24058. },
  24059. "type": {
  24060. "type": "string",
  24061. "enum": ["assistant"]
  24062. },
  24063. "agent": {
  24064. "type": "string"
  24065. },
  24066. "model": {
  24067. "type": "object",
  24068. "properties": {
  24069. "id": {
  24070. "type": "string"
  24071. },
  24072. "providerID": {
  24073. "type": "string"
  24074. },
  24075. "variant": {
  24076. "type": "string"
  24077. }
  24078. },
  24079. "required": ["id", "providerID"],
  24080. "additionalProperties": false
  24081. },
  24082. "content": {
  24083. "type": "array",
  24084. "items": {
  24085. "anyOf": [
  24086. {
  24087. "$ref": "#/components/schemas/SessionMessageAssistantText"
  24088. },
  24089. {
  24090. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  24091. },
  24092. {
  24093. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  24094. }
  24095. ]
  24096. }
  24097. },
  24098. "snapshot": {
  24099. "type": "object",
  24100. "properties": {
  24101. "start": {
  24102. "type": "string"
  24103. },
  24104. "end": {
  24105. "type": "string"
  24106. }
  24107. },
  24108. "additionalProperties": false
  24109. },
  24110. "finish": {
  24111. "type": "string"
  24112. },
  24113. "cost": {
  24114. "type": "number"
  24115. },
  24116. "tokens": {
  24117. "type": "object",
  24118. "properties": {
  24119. "input": {
  24120. "type": "number"
  24121. },
  24122. "output": {
  24123. "type": "number"
  24124. },
  24125. "reasoning": {
  24126. "type": "number"
  24127. },
  24128. "cache": {
  24129. "type": "object",
  24130. "properties": {
  24131. "read": {
  24132. "type": "number"
  24133. },
  24134. "write": {
  24135. "type": "number"
  24136. }
  24137. },
  24138. "required": ["read", "write"],
  24139. "additionalProperties": false
  24140. }
  24141. },
  24142. "required": ["input", "output", "reasoning", "cache"],
  24143. "additionalProperties": false
  24144. },
  24145. "error": {
  24146. "$ref": "#/components/schemas/SessionErrorUnknown"
  24147. }
  24148. },
  24149. "required": ["id", "time", "type", "agent", "model", "content"],
  24150. "additionalProperties": false
  24151. },
  24152. "SessionMessageCompaction": {
  24153. "type": "object",
  24154. "properties": {
  24155. "type": {
  24156. "type": "string",
  24157. "enum": ["compaction"]
  24158. },
  24159. "reason": {
  24160. "type": "string",
  24161. "enum": ["auto", "manual"]
  24162. },
  24163. "summary": {
  24164. "type": "string"
  24165. },
  24166. "include": {
  24167. "type": "string"
  24168. },
  24169. "id": {
  24170. "type": "string",
  24171. "pattern": "^msg_"
  24172. },
  24173. "metadata": {
  24174. "type": "object"
  24175. },
  24176. "time": {
  24177. "type": "object",
  24178. "properties": {
  24179. "created": {
  24180. "type": "number"
  24181. }
  24182. },
  24183. "required": ["created"],
  24184. "additionalProperties": false
  24185. }
  24186. },
  24187. "required": ["type", "reason", "summary", "id", "time"],
  24188. "additionalProperties": false
  24189. },
  24190. "SessionMessage": {
  24191. "anyOf": [
  24192. {
  24193. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  24194. },
  24195. {
  24196. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  24197. },
  24198. {
  24199. "$ref": "#/components/schemas/SessionMessageUser"
  24200. },
  24201. {
  24202. "$ref": "#/components/schemas/SessionMessageSynthetic"
  24203. },
  24204. {
  24205. "$ref": "#/components/schemas/SessionMessageSystem"
  24206. },
  24207. {
  24208. "$ref": "#/components/schemas/SessionMessageShell"
  24209. },
  24210. {
  24211. "$ref": "#/components/schemas/SessionMessageAssistant"
  24212. },
  24213. {
  24214. "$ref": "#/components/schemas/SessionMessageCompaction"
  24215. }
  24216. ]
  24217. },
  24218. "ProviderV2Info": {
  24219. "type": "object",
  24220. "properties": {
  24221. "id": {
  24222. "type": "string"
  24223. },
  24224. "name": {
  24225. "type": "string"
  24226. },
  24227. "enabled": {
  24228. "anyOf": [
  24229. {
  24230. "type": "boolean",
  24231. "enum": [false]
  24232. },
  24233. {
  24234. "type": "object",
  24235. "properties": {
  24236. "via": {
  24237. "type": "string",
  24238. "enum": ["env"]
  24239. },
  24240. "name": {
  24241. "type": "string"
  24242. }
  24243. },
  24244. "required": ["via", "name"],
  24245. "additionalProperties": false
  24246. },
  24247. {
  24248. "type": "object",
  24249. "properties": {
  24250. "via": {
  24251. "type": "string",
  24252. "enum": ["account"]
  24253. },
  24254. "service": {
  24255. "type": "string"
  24256. }
  24257. },
  24258. "required": ["via", "service"],
  24259. "additionalProperties": false
  24260. },
  24261. {
  24262. "type": "object",
  24263. "properties": {
  24264. "via": {
  24265. "type": "string",
  24266. "enum": ["custom"]
  24267. },
  24268. "data": {
  24269. "type": "object"
  24270. }
  24271. },
  24272. "required": ["via", "data"],
  24273. "additionalProperties": false
  24274. }
  24275. ]
  24276. },
  24277. "env": {
  24278. "type": "array",
  24279. "items": {
  24280. "type": "string"
  24281. }
  24282. },
  24283. "api": {
  24284. "anyOf": [
  24285. {
  24286. "type": "object",
  24287. "properties": {
  24288. "type": {
  24289. "type": "string",
  24290. "enum": ["aisdk"]
  24291. },
  24292. "package": {
  24293. "type": "string"
  24294. },
  24295. "url": {
  24296. "type": "string"
  24297. },
  24298. "settings": {
  24299. "type": "object"
  24300. }
  24301. },
  24302. "required": ["type", "package"],
  24303. "additionalProperties": false
  24304. },
  24305. {
  24306. "type": "object",
  24307. "properties": {
  24308. "type": {
  24309. "type": "string",
  24310. "enum": ["native"]
  24311. },
  24312. "url": {
  24313. "type": "string"
  24314. },
  24315. "settings": {
  24316. "type": "object"
  24317. }
  24318. },
  24319. "required": ["type", "settings"],
  24320. "additionalProperties": false
  24321. }
  24322. ]
  24323. },
  24324. "request": {
  24325. "type": "object",
  24326. "properties": {
  24327. "headers": {
  24328. "type": "object",
  24329. "additionalProperties": {
  24330. "type": "string"
  24331. }
  24332. },
  24333. "body": {
  24334. "type": "object"
  24335. }
  24336. },
  24337. "required": ["headers", "body"],
  24338. "additionalProperties": false
  24339. }
  24340. },
  24341. "required": ["id", "name", "enabled", "env", "api", "request"],
  24342. "additionalProperties": false
  24343. },
  24344. "PermissionV2Request": {
  24345. "type": "object",
  24346. "properties": {
  24347. "id": {
  24348. "type": "string",
  24349. "pattern": "^per"
  24350. },
  24351. "sessionID": {
  24352. "type": "string",
  24353. "pattern": "^ses"
  24354. },
  24355. "action": {
  24356. "type": "string"
  24357. },
  24358. "resources": {
  24359. "type": "array",
  24360. "items": {
  24361. "type": "string"
  24362. }
  24363. },
  24364. "save": {
  24365. "type": "array",
  24366. "items": {
  24367. "type": "string"
  24368. }
  24369. },
  24370. "metadata": {
  24371. "type": "object"
  24372. },
  24373. "source": {
  24374. "$ref": "#/components/schemas/PermissionV2Source"
  24375. }
  24376. },
  24377. "required": ["id", "sessionID", "action", "resources"],
  24378. "additionalProperties": false
  24379. },
  24380. "PermissionSavedInfo": {
  24381. "type": "object",
  24382. "properties": {
  24383. "id": {
  24384. "type": "string"
  24385. },
  24386. "projectID": {
  24387. "type": "string"
  24388. },
  24389. "action": {
  24390. "type": "string"
  24391. },
  24392. "resource": {
  24393. "type": "string"
  24394. }
  24395. },
  24396. "required": ["id", "projectID", "action", "resource"],
  24397. "additionalProperties": false
  24398. },
  24399. "FileSystemTextContent": {
  24400. "type": "object",
  24401. "properties": {
  24402. "type": {
  24403. "type": "string",
  24404. "enum": ["text"]
  24405. },
  24406. "content": {
  24407. "type": "string"
  24408. },
  24409. "mime": {
  24410. "type": "string"
  24411. }
  24412. },
  24413. "required": ["type", "content", "mime"],
  24414. "additionalProperties": false
  24415. },
  24416. "FileSystemBinaryContent": {
  24417. "type": "object",
  24418. "properties": {
  24419. "type": {
  24420. "type": "string",
  24421. "enum": ["binary"]
  24422. },
  24423. "content": {
  24424. "type": "string"
  24425. },
  24426. "encoding": {
  24427. "type": "string",
  24428. "enum": ["base64"]
  24429. },
  24430. "mime": {
  24431. "type": "string"
  24432. }
  24433. },
  24434. "required": ["type", "content", "encoding", "mime"],
  24435. "additionalProperties": false
  24436. },
  24437. "FileSystemEntry": {
  24438. "type": "object",
  24439. "properties": {
  24440. "path": {
  24441. "type": "string"
  24442. },
  24443. "uri": {
  24444. "type": "string"
  24445. },
  24446. "type": {
  24447. "type": "string",
  24448. "enum": ["file", "directory"]
  24449. },
  24450. "mime": {
  24451. "type": "string"
  24452. }
  24453. },
  24454. "required": ["path", "uri", "type", "mime"],
  24455. "additionalProperties": false
  24456. },
  24457. "CommandV2Info": {
  24458. "type": "object",
  24459. "properties": {
  24460. "name": {
  24461. "type": "string"
  24462. },
  24463. "template": {
  24464. "type": "string"
  24465. },
  24466. "description": {
  24467. "type": "string"
  24468. },
  24469. "agent": {
  24470. "type": "string"
  24471. },
  24472. "model": {
  24473. "type": "object",
  24474. "properties": {
  24475. "id": {
  24476. "type": "string"
  24477. },
  24478. "providerID": {
  24479. "type": "string"
  24480. },
  24481. "variant": {
  24482. "type": "string"
  24483. }
  24484. },
  24485. "required": ["id", "providerID"],
  24486. "additionalProperties": false
  24487. },
  24488. "subtask": {
  24489. "type": "boolean"
  24490. }
  24491. },
  24492. "required": ["name", "template"],
  24493. "additionalProperties": false
  24494. },
  24495. "SkillV2Info": {
  24496. "type": "object",
  24497. "properties": {
  24498. "name": {
  24499. "type": "string"
  24500. },
  24501. "description": {
  24502. "type": "string"
  24503. },
  24504. "slash": {
  24505. "type": "boolean"
  24506. },
  24507. "location": {
  24508. "type": "string"
  24509. },
  24510. "content": {
  24511. "type": "string"
  24512. }
  24513. },
  24514. "required": ["name", "location", "content"],
  24515. "additionalProperties": false
  24516. },
  24517. "QuestionV2Request": {
  24518. "type": "object",
  24519. "properties": {
  24520. "id": {
  24521. "type": "string",
  24522. "pattern": "^que"
  24523. },
  24524. "sessionID": {
  24525. "type": "string",
  24526. "pattern": "^ses"
  24527. },
  24528. "questions": {
  24529. "type": "array",
  24530. "items": {
  24531. "$ref": "#/components/schemas/QuestionV2Info"
  24532. },
  24533. "description": "Questions to ask"
  24534. },
  24535. "tool": {
  24536. "$ref": "#/components/schemas/QuestionV2Tool"
  24537. }
  24538. },
  24539. "required": ["id", "sessionID", "questions"],
  24540. "additionalProperties": false
  24541. },
  24542. "QuestionV2Reply": {
  24543. "type": "object",
  24544. "properties": {
  24545. "answers": {
  24546. "type": "array",
  24547. "items": {
  24548. "$ref": "#/components/schemas/QuestionV2Answer"
  24549. },
  24550. "description": "User answers in order of questions (each answer is an array of selected labels)"
  24551. }
  24552. },
  24553. "required": ["answers"],
  24554. "additionalProperties": false
  24555. },
  24556. "EventModels-devRefreshed": {
  24557. "type": "object",
  24558. "properties": {
  24559. "id": {
  24560. "type": "string",
  24561. "pattern": "^evt_"
  24562. },
  24563. "type": {
  24564. "type": "string",
  24565. "enum": ["models-dev.refreshed"]
  24566. },
  24567. "properties": {
  24568. "type": "object",
  24569. "properties": {}
  24570. }
  24571. },
  24572. "required": ["id", "type", "properties"],
  24573. "additionalProperties": false
  24574. },
  24575. "EventPluginAdded": {
  24576. "type": "object",
  24577. "properties": {
  24578. "id": {
  24579. "type": "string",
  24580. "pattern": "^evt_"
  24581. },
  24582. "type": {
  24583. "type": "string",
  24584. "enum": ["plugin.added"]
  24585. },
  24586. "properties": {
  24587. "type": "object",
  24588. "properties": {
  24589. "id": {
  24590. "type": "string"
  24591. }
  24592. },
  24593. "required": ["id"],
  24594. "additionalProperties": false
  24595. }
  24596. },
  24597. "required": ["id", "type", "properties"],
  24598. "additionalProperties": false
  24599. },
  24600. "ModelV2Info1": {
  24601. "type": "object",
  24602. "properties": {
  24603. "id": {
  24604. "type": "string"
  24605. },
  24606. "providerID": {
  24607. "type": "string"
  24608. },
  24609. "family": {
  24610. "type": "string"
  24611. },
  24612. "name": {
  24613. "type": "string"
  24614. },
  24615. "api": {
  24616. "anyOf": [
  24617. {
  24618. "type": "object",
  24619. "properties": {
  24620. "id": {
  24621. "type": "string"
  24622. },
  24623. "type": {
  24624. "type": "string",
  24625. "enum": ["aisdk"]
  24626. },
  24627. "package": {
  24628. "type": "string"
  24629. },
  24630. "url": {
  24631. "type": "string"
  24632. },
  24633. "settings": {
  24634. "type": "object"
  24635. }
  24636. },
  24637. "required": ["id", "type", "package"],
  24638. "additionalProperties": false
  24639. },
  24640. {
  24641. "type": "object",
  24642. "properties": {
  24643. "id": {
  24644. "type": "string"
  24645. },
  24646. "type": {
  24647. "type": "string",
  24648. "enum": ["native"]
  24649. },
  24650. "url": {
  24651. "type": "string"
  24652. },
  24653. "settings": {
  24654. "type": "object"
  24655. }
  24656. },
  24657. "required": ["id", "type", "settings"],
  24658. "additionalProperties": false
  24659. }
  24660. ]
  24661. },
  24662. "capabilities": {
  24663. "type": "object",
  24664. "properties": {
  24665. "tools": {
  24666. "type": "boolean"
  24667. },
  24668. "input": {
  24669. "type": "array",
  24670. "items": {
  24671. "type": "string"
  24672. }
  24673. },
  24674. "output": {
  24675. "type": "array",
  24676. "items": {
  24677. "type": "string"
  24678. }
  24679. }
  24680. },
  24681. "required": ["tools", "input", "output"],
  24682. "additionalProperties": false
  24683. },
  24684. "request": {
  24685. "type": "object",
  24686. "properties": {
  24687. "headers": {
  24688. "type": "object",
  24689. "additionalProperties": {
  24690. "type": "string"
  24691. }
  24692. },
  24693. "body": {
  24694. "type": "object"
  24695. },
  24696. "variant": {
  24697. "type": "string"
  24698. }
  24699. },
  24700. "required": ["headers", "body"],
  24701. "additionalProperties": false
  24702. },
  24703. "variants": {
  24704. "type": "array",
  24705. "items": {
  24706. "type": "object",
  24707. "properties": {
  24708. "id": {
  24709. "type": "string"
  24710. },
  24711. "headers": {
  24712. "type": "object",
  24713. "additionalProperties": {
  24714. "type": "string"
  24715. }
  24716. },
  24717. "body": {
  24718. "type": "object"
  24719. }
  24720. },
  24721. "required": ["id", "headers", "body"],
  24722. "additionalProperties": false
  24723. }
  24724. },
  24725. "time": {
  24726. "type": "object",
  24727. "properties": {
  24728. "released": {
  24729. "anyOf": [
  24730. {
  24731. "type": "number"
  24732. },
  24733. {
  24734. "type": "string",
  24735. "enum": ["NaN"]
  24736. },
  24737. {
  24738. "type": "string",
  24739. "enum": ["Infinity"]
  24740. },
  24741. {
  24742. "type": "string",
  24743. "enum": ["-Infinity"]
  24744. }
  24745. ]
  24746. }
  24747. },
  24748. "required": ["released"],
  24749. "additionalProperties": false
  24750. },
  24751. "cost": {
  24752. "type": "array",
  24753. "items": {
  24754. "type": "object",
  24755. "properties": {
  24756. "tier": {
  24757. "type": "object",
  24758. "properties": {
  24759. "type": {
  24760. "type": "string",
  24761. "enum": ["context"]
  24762. },
  24763. "size": {
  24764. "type": "integer"
  24765. }
  24766. },
  24767. "required": ["type", "size"],
  24768. "additionalProperties": false
  24769. },
  24770. "input": {
  24771. "type": "number"
  24772. },
  24773. "output": {
  24774. "type": "number"
  24775. },
  24776. "cache": {
  24777. "type": "object",
  24778. "properties": {
  24779. "read": {
  24780. "type": "number"
  24781. },
  24782. "write": {
  24783. "type": "number"
  24784. }
  24785. },
  24786. "required": ["read", "write"],
  24787. "additionalProperties": false
  24788. }
  24789. },
  24790. "required": ["input", "output", "cache"],
  24791. "additionalProperties": false
  24792. }
  24793. },
  24794. "status": {
  24795. "type": "string",
  24796. "enum": ["alpha", "beta", "deprecated", "active"]
  24797. },
  24798. "enabled": {
  24799. "type": "boolean"
  24800. },
  24801. "limit": {
  24802. "type": "object",
  24803. "properties": {
  24804. "context": {
  24805. "type": "integer"
  24806. },
  24807. "input": {
  24808. "type": "integer"
  24809. },
  24810. "output": {
  24811. "type": "integer"
  24812. }
  24813. },
  24814. "required": ["context", "output"],
  24815. "additionalProperties": false
  24816. }
  24817. },
  24818. "required": [
  24819. "id",
  24820. "providerID",
  24821. "name",
  24822. "api",
  24823. "capabilities",
  24824. "request",
  24825. "variants",
  24826. "time",
  24827. "cost",
  24828. "status",
  24829. "enabled",
  24830. "limit"
  24831. ],
  24832. "additionalProperties": false
  24833. },
  24834. "EventCatalogModelUpdated": {
  24835. "type": "object",
  24836. "properties": {
  24837. "id": {
  24838. "type": "string",
  24839. "pattern": "^evt_"
  24840. },
  24841. "type": {
  24842. "type": "string",
  24843. "enum": ["catalog.model.updated"]
  24844. },
  24845. "properties": {
  24846. "type": "object",
  24847. "properties": {
  24848. "model": {
  24849. "$ref": "#/components/schemas/ModelV2Info1"
  24850. }
  24851. },
  24852. "required": ["model"],
  24853. "additionalProperties": false
  24854. }
  24855. },
  24856. "required": ["id", "type", "properties"],
  24857. "additionalProperties": false
  24858. },
  24859. "EventSessionCreated": {
  24860. "type": "object",
  24861. "properties": {
  24862. "id": {
  24863. "type": "string",
  24864. "pattern": "^evt_"
  24865. },
  24866. "type": {
  24867. "type": "string",
  24868. "enum": ["session.created"]
  24869. },
  24870. "properties": {
  24871. "type": "object",
  24872. "properties": {
  24873. "sessionID": {
  24874. "type": "string",
  24875. "pattern": "^ses"
  24876. },
  24877. "info": {
  24878. "$ref": "#/components/schemas/Session"
  24879. }
  24880. },
  24881. "required": ["sessionID", "info"],
  24882. "additionalProperties": false
  24883. }
  24884. },
  24885. "required": ["id", "type", "properties"],
  24886. "additionalProperties": false
  24887. },
  24888. "EventSessionUpdated": {
  24889. "type": "object",
  24890. "properties": {
  24891. "id": {
  24892. "type": "string",
  24893. "pattern": "^evt_"
  24894. },
  24895. "type": {
  24896. "type": "string",
  24897. "enum": ["session.updated"]
  24898. },
  24899. "properties": {
  24900. "type": "object",
  24901. "properties": {
  24902. "sessionID": {
  24903. "type": "string",
  24904. "pattern": "^ses"
  24905. },
  24906. "info": {
  24907. "$ref": "#/components/schemas/Session"
  24908. }
  24909. },
  24910. "required": ["sessionID", "info"],
  24911. "additionalProperties": false
  24912. }
  24913. },
  24914. "required": ["id", "type", "properties"],
  24915. "additionalProperties": false
  24916. },
  24917. "EventSessionDeleted": {
  24918. "type": "object",
  24919. "properties": {
  24920. "id": {
  24921. "type": "string",
  24922. "pattern": "^evt_"
  24923. },
  24924. "type": {
  24925. "type": "string",
  24926. "enum": ["session.deleted"]
  24927. },
  24928. "properties": {
  24929. "type": "object",
  24930. "properties": {
  24931. "sessionID": {
  24932. "type": "string",
  24933. "pattern": "^ses"
  24934. },
  24935. "info": {
  24936. "$ref": "#/components/schemas/Session"
  24937. }
  24938. },
  24939. "required": ["sessionID", "info"],
  24940. "additionalProperties": false
  24941. }
  24942. },
  24943. "required": ["id", "type", "properties"],
  24944. "additionalProperties": false
  24945. },
  24946. "EventMessageUpdated": {
  24947. "type": "object",
  24948. "properties": {
  24949. "id": {
  24950. "type": "string",
  24951. "pattern": "^evt_"
  24952. },
  24953. "type": {
  24954. "type": "string",
  24955. "enum": ["message.updated"]
  24956. },
  24957. "properties": {
  24958. "type": "object",
  24959. "properties": {
  24960. "sessionID": {
  24961. "type": "string",
  24962. "pattern": "^ses"
  24963. },
  24964. "info": {
  24965. "$ref": "#/components/schemas/Message"
  24966. }
  24967. },
  24968. "required": ["sessionID", "info"],
  24969. "additionalProperties": false
  24970. }
  24971. },
  24972. "required": ["id", "type", "properties"],
  24973. "additionalProperties": false
  24974. },
  24975. "EventMessageRemoved": {
  24976. "type": "object",
  24977. "properties": {
  24978. "id": {
  24979. "type": "string",
  24980. "pattern": "^evt_"
  24981. },
  24982. "type": {
  24983. "type": "string",
  24984. "enum": ["message.removed"]
  24985. },
  24986. "properties": {
  24987. "type": "object",
  24988. "properties": {
  24989. "sessionID": {
  24990. "type": "string",
  24991. "pattern": "^ses"
  24992. },
  24993. "messageID": {
  24994. "type": "string",
  24995. "pattern": "^msg"
  24996. }
  24997. },
  24998. "required": ["sessionID", "messageID"],
  24999. "additionalProperties": false
  25000. }
  25001. },
  25002. "required": ["id", "type", "properties"],
  25003. "additionalProperties": false
  25004. },
  25005. "EventMessagePartUpdated": {
  25006. "type": "object",
  25007. "properties": {
  25008. "id": {
  25009. "type": "string",
  25010. "pattern": "^evt_"
  25011. },
  25012. "type": {
  25013. "type": "string",
  25014. "enum": ["message.part.updated"]
  25015. },
  25016. "properties": {
  25017. "type": "object",
  25018. "properties": {
  25019. "sessionID": {
  25020. "type": "string",
  25021. "pattern": "^ses"
  25022. },
  25023. "part": {
  25024. "$ref": "#/components/schemas/Part"
  25025. },
  25026. "time": {
  25027. "type": "number"
  25028. }
  25029. },
  25030. "required": ["sessionID", "part", "time"],
  25031. "additionalProperties": false
  25032. }
  25033. },
  25034. "required": ["id", "type", "properties"],
  25035. "additionalProperties": false
  25036. },
  25037. "EventMessagePartRemoved": {
  25038. "type": "object",
  25039. "properties": {
  25040. "id": {
  25041. "type": "string",
  25042. "pattern": "^evt_"
  25043. },
  25044. "type": {
  25045. "type": "string",
  25046. "enum": ["message.part.removed"]
  25047. },
  25048. "properties": {
  25049. "type": "object",
  25050. "properties": {
  25051. "sessionID": {
  25052. "type": "string",
  25053. "pattern": "^ses"
  25054. },
  25055. "messageID": {
  25056. "type": "string",
  25057. "pattern": "^msg"
  25058. },
  25059. "partID": {
  25060. "type": "string",
  25061. "pattern": "^prt"
  25062. }
  25063. },
  25064. "required": ["sessionID", "messageID", "partID"],
  25065. "additionalProperties": false
  25066. }
  25067. },
  25068. "required": ["id", "type", "properties"],
  25069. "additionalProperties": false
  25070. },
  25071. "EventSessionNextAgentSwitched": {
  25072. "type": "object",
  25073. "properties": {
  25074. "id": {
  25075. "type": "string",
  25076. "pattern": "^evt_"
  25077. },
  25078. "type": {
  25079. "type": "string",
  25080. "enum": ["session.next.agent.switched"]
  25081. },
  25082. "properties": {
  25083. "type": "object",
  25084. "properties": {
  25085. "timestamp": {
  25086. "type": "number"
  25087. },
  25088. "sessionID": {
  25089. "type": "string",
  25090. "pattern": "^ses"
  25091. },
  25092. "messageID": {
  25093. "type": "string",
  25094. "pattern": "^msg_"
  25095. },
  25096. "agent": {
  25097. "type": "string"
  25098. }
  25099. },
  25100. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25101. "additionalProperties": false
  25102. }
  25103. },
  25104. "required": ["id", "type", "properties"],
  25105. "additionalProperties": false
  25106. },
  25107. "EventSessionNextModelSwitched": {
  25108. "type": "object",
  25109. "properties": {
  25110. "id": {
  25111. "type": "string",
  25112. "pattern": "^evt_"
  25113. },
  25114. "type": {
  25115. "type": "string",
  25116. "enum": ["session.next.model.switched"]
  25117. },
  25118. "properties": {
  25119. "type": "object",
  25120. "properties": {
  25121. "timestamp": {
  25122. "type": "number"
  25123. },
  25124. "sessionID": {
  25125. "type": "string",
  25126. "pattern": "^ses"
  25127. },
  25128. "messageID": {
  25129. "type": "string",
  25130. "pattern": "^msg_"
  25131. },
  25132. "model": {
  25133. "type": "object",
  25134. "properties": {
  25135. "id": {
  25136. "type": "string"
  25137. },
  25138. "providerID": {
  25139. "type": "string"
  25140. },
  25141. "variant": {
  25142. "type": "string"
  25143. }
  25144. },
  25145. "required": ["id", "providerID"],
  25146. "additionalProperties": false
  25147. }
  25148. },
  25149. "required": ["timestamp", "sessionID", "messageID", "model"],
  25150. "additionalProperties": false
  25151. }
  25152. },
  25153. "required": ["id", "type", "properties"],
  25154. "additionalProperties": false
  25155. },
  25156. "EventSessionNextMoved": {
  25157. "type": "object",
  25158. "properties": {
  25159. "id": {
  25160. "type": "string",
  25161. "pattern": "^evt_"
  25162. },
  25163. "type": {
  25164. "type": "string",
  25165. "enum": ["session.next.moved"]
  25166. },
  25167. "properties": {
  25168. "type": "object",
  25169. "properties": {
  25170. "timestamp": {
  25171. "type": "number"
  25172. },
  25173. "sessionID": {
  25174. "type": "string",
  25175. "pattern": "^ses"
  25176. },
  25177. "location": {
  25178. "$ref": "#/components/schemas/LocationRef"
  25179. },
  25180. "subdirectory": {
  25181. "type": "string"
  25182. }
  25183. },
  25184. "required": ["timestamp", "sessionID", "location"],
  25185. "additionalProperties": false
  25186. }
  25187. },
  25188. "required": ["id", "type", "properties"],
  25189. "additionalProperties": false
  25190. },
  25191. "EventSessionNextPrompted": {
  25192. "type": "object",
  25193. "properties": {
  25194. "id": {
  25195. "type": "string",
  25196. "pattern": "^evt_"
  25197. },
  25198. "type": {
  25199. "type": "string",
  25200. "enum": ["session.next.prompted"]
  25201. },
  25202. "properties": {
  25203. "type": "object",
  25204. "properties": {
  25205. "timestamp": {
  25206. "type": "number"
  25207. },
  25208. "sessionID": {
  25209. "type": "string",
  25210. "pattern": "^ses"
  25211. },
  25212. "messageID": {
  25213. "type": "string",
  25214. "pattern": "^msg_"
  25215. },
  25216. "prompt": {
  25217. "$ref": "#/components/schemas/Prompt"
  25218. },
  25219. "delivery": {
  25220. "type": "string",
  25221. "enum": ["steer", "queue"]
  25222. }
  25223. },
  25224. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25225. "additionalProperties": false
  25226. }
  25227. },
  25228. "required": ["id", "type", "properties"],
  25229. "additionalProperties": false
  25230. },
  25231. "EventSessionNextPromptAdmitted": {
  25232. "type": "object",
  25233. "properties": {
  25234. "id": {
  25235. "type": "string",
  25236. "pattern": "^evt_"
  25237. },
  25238. "type": {
  25239. "type": "string",
  25240. "enum": ["session.next.prompt.admitted"]
  25241. },
  25242. "properties": {
  25243. "type": "object",
  25244. "properties": {
  25245. "timestamp": {
  25246. "type": "number"
  25247. },
  25248. "sessionID": {
  25249. "type": "string",
  25250. "pattern": "^ses"
  25251. },
  25252. "messageID": {
  25253. "type": "string",
  25254. "pattern": "^msg_"
  25255. },
  25256. "prompt": {
  25257. "$ref": "#/components/schemas/Prompt"
  25258. },
  25259. "delivery": {
  25260. "type": "string",
  25261. "enum": ["steer", "queue"]
  25262. }
  25263. },
  25264. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25265. "additionalProperties": false
  25266. }
  25267. },
  25268. "required": ["id", "type", "properties"],
  25269. "additionalProperties": false
  25270. },
  25271. "EventSessionNextPromptPromoted": {
  25272. "type": "object",
  25273. "properties": {
  25274. "id": {
  25275. "type": "string",
  25276. "pattern": "^evt_"
  25277. },
  25278. "type": {
  25279. "type": "string",
  25280. "enum": ["session.next.prompt.promoted"]
  25281. },
  25282. "properties": {
  25283. "type": "object",
  25284. "properties": {
  25285. "timestamp": {
  25286. "type": "number"
  25287. },
  25288. "sessionID": {
  25289. "type": "string",
  25290. "pattern": "^ses"
  25291. },
  25292. "messageID": {
  25293. "type": "string",
  25294. "pattern": "^msg_"
  25295. },
  25296. "prompt": {
  25297. "$ref": "#/components/schemas/Prompt"
  25298. },
  25299. "timeCreated": {
  25300. "type": "number"
  25301. }
  25302. },
  25303. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  25304. "additionalProperties": false
  25305. }
  25306. },
  25307. "required": ["id", "type", "properties"],
  25308. "additionalProperties": false
  25309. },
  25310. "EventSessionNextContextUpdated": {
  25311. "type": "object",
  25312. "properties": {
  25313. "id": {
  25314. "type": "string",
  25315. "pattern": "^evt_"
  25316. },
  25317. "type": {
  25318. "type": "string",
  25319. "enum": ["session.next.context.updated"]
  25320. },
  25321. "properties": {
  25322. "type": "object",
  25323. "properties": {
  25324. "timestamp": {
  25325. "type": "number"
  25326. },
  25327. "sessionID": {
  25328. "type": "string",
  25329. "pattern": "^ses"
  25330. },
  25331. "messageID": {
  25332. "type": "string",
  25333. "pattern": "^msg_"
  25334. },
  25335. "text": {
  25336. "type": "string"
  25337. }
  25338. },
  25339. "required": ["timestamp", "sessionID", "messageID", "text"],
  25340. "additionalProperties": false
  25341. }
  25342. },
  25343. "required": ["id", "type", "properties"],
  25344. "additionalProperties": false
  25345. },
  25346. "EventSessionNextSynthetic": {
  25347. "type": "object",
  25348. "properties": {
  25349. "id": {
  25350. "type": "string",
  25351. "pattern": "^evt_"
  25352. },
  25353. "type": {
  25354. "type": "string",
  25355. "enum": ["session.next.synthetic"]
  25356. },
  25357. "properties": {
  25358. "type": "object",
  25359. "properties": {
  25360. "timestamp": {
  25361. "type": "number"
  25362. },
  25363. "sessionID": {
  25364. "type": "string",
  25365. "pattern": "^ses"
  25366. },
  25367. "messageID": {
  25368. "type": "string",
  25369. "pattern": "^msg_"
  25370. },
  25371. "text": {
  25372. "type": "string"
  25373. }
  25374. },
  25375. "required": ["timestamp", "sessionID", "messageID", "text"],
  25376. "additionalProperties": false
  25377. }
  25378. },
  25379. "required": ["id", "type", "properties"],
  25380. "additionalProperties": false
  25381. },
  25382. "EventSessionNextShellStarted": {
  25383. "type": "object",
  25384. "properties": {
  25385. "id": {
  25386. "type": "string",
  25387. "pattern": "^evt_"
  25388. },
  25389. "type": {
  25390. "type": "string",
  25391. "enum": ["session.next.shell.started"]
  25392. },
  25393. "properties": {
  25394. "type": "object",
  25395. "properties": {
  25396. "timestamp": {
  25397. "type": "number"
  25398. },
  25399. "sessionID": {
  25400. "type": "string",
  25401. "pattern": "^ses"
  25402. },
  25403. "messageID": {
  25404. "type": "string",
  25405. "pattern": "^msg_"
  25406. },
  25407. "callID": {
  25408. "type": "string"
  25409. },
  25410. "command": {
  25411. "type": "string"
  25412. }
  25413. },
  25414. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25415. "additionalProperties": false
  25416. }
  25417. },
  25418. "required": ["id", "type", "properties"],
  25419. "additionalProperties": false
  25420. },
  25421. "EventSessionNextShellEnded": {
  25422. "type": "object",
  25423. "properties": {
  25424. "id": {
  25425. "type": "string",
  25426. "pattern": "^evt_"
  25427. },
  25428. "type": {
  25429. "type": "string",
  25430. "enum": ["session.next.shell.ended"]
  25431. },
  25432. "properties": {
  25433. "type": "object",
  25434. "properties": {
  25435. "timestamp": {
  25436. "type": "number"
  25437. },
  25438. "sessionID": {
  25439. "type": "string",
  25440. "pattern": "^ses"
  25441. },
  25442. "callID": {
  25443. "type": "string"
  25444. },
  25445. "output": {
  25446. "type": "string"
  25447. }
  25448. },
  25449. "required": ["timestamp", "sessionID", "callID", "output"],
  25450. "additionalProperties": false
  25451. }
  25452. },
  25453. "required": ["id", "type", "properties"],
  25454. "additionalProperties": false
  25455. },
  25456. "EventSessionNextStepStarted": {
  25457. "type": "object",
  25458. "properties": {
  25459. "id": {
  25460. "type": "string",
  25461. "pattern": "^evt_"
  25462. },
  25463. "type": {
  25464. "type": "string",
  25465. "enum": ["session.next.step.started"]
  25466. },
  25467. "properties": {
  25468. "type": "object",
  25469. "properties": {
  25470. "timestamp": {
  25471. "type": "number"
  25472. },
  25473. "sessionID": {
  25474. "type": "string",
  25475. "pattern": "^ses"
  25476. },
  25477. "assistantMessageID": {
  25478. "type": "string",
  25479. "pattern": "^msg_"
  25480. },
  25481. "agent": {
  25482. "type": "string"
  25483. },
  25484. "model": {
  25485. "type": "object",
  25486. "properties": {
  25487. "id": {
  25488. "type": "string"
  25489. },
  25490. "providerID": {
  25491. "type": "string"
  25492. },
  25493. "variant": {
  25494. "type": "string"
  25495. }
  25496. },
  25497. "required": ["id", "providerID"],
  25498. "additionalProperties": false
  25499. },
  25500. "snapshot": {
  25501. "type": "string"
  25502. }
  25503. },
  25504. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25505. "additionalProperties": false
  25506. }
  25507. },
  25508. "required": ["id", "type", "properties"],
  25509. "additionalProperties": false
  25510. },
  25511. "EventSessionNextStepEnded": {
  25512. "type": "object",
  25513. "properties": {
  25514. "id": {
  25515. "type": "string",
  25516. "pattern": "^evt_"
  25517. },
  25518. "type": {
  25519. "type": "string",
  25520. "enum": ["session.next.step.ended"]
  25521. },
  25522. "properties": {
  25523. "type": "object",
  25524. "properties": {
  25525. "timestamp": {
  25526. "type": "number"
  25527. },
  25528. "sessionID": {
  25529. "type": "string",
  25530. "pattern": "^ses"
  25531. },
  25532. "assistantMessageID": {
  25533. "type": "string",
  25534. "pattern": "^msg_"
  25535. },
  25536. "finish": {
  25537. "type": "string"
  25538. },
  25539. "cost": {
  25540. "type": "number"
  25541. },
  25542. "tokens": {
  25543. "type": "object",
  25544. "properties": {
  25545. "input": {
  25546. "type": "number"
  25547. },
  25548. "output": {
  25549. "type": "number"
  25550. },
  25551. "reasoning": {
  25552. "type": "number"
  25553. },
  25554. "cache": {
  25555. "type": "object",
  25556. "properties": {
  25557. "read": {
  25558. "type": "number"
  25559. },
  25560. "write": {
  25561. "type": "number"
  25562. }
  25563. },
  25564. "required": ["read", "write"],
  25565. "additionalProperties": false
  25566. }
  25567. },
  25568. "required": ["input", "output", "reasoning", "cache"],
  25569. "additionalProperties": false
  25570. },
  25571. "snapshot": {
  25572. "type": "string"
  25573. }
  25574. },
  25575. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25576. "additionalProperties": false
  25577. }
  25578. },
  25579. "required": ["id", "type", "properties"],
  25580. "additionalProperties": false
  25581. },
  25582. "EventSessionNextStepFailed": {
  25583. "type": "object",
  25584. "properties": {
  25585. "id": {
  25586. "type": "string",
  25587. "pattern": "^evt_"
  25588. },
  25589. "type": {
  25590. "type": "string",
  25591. "enum": ["session.next.step.failed"]
  25592. },
  25593. "properties": {
  25594. "type": "object",
  25595. "properties": {
  25596. "timestamp": {
  25597. "type": "number"
  25598. },
  25599. "sessionID": {
  25600. "type": "string",
  25601. "pattern": "^ses"
  25602. },
  25603. "assistantMessageID": {
  25604. "type": "string",
  25605. "pattern": "^msg_"
  25606. },
  25607. "error": {
  25608. "$ref": "#/components/schemas/SessionErrorUnknown"
  25609. }
  25610. },
  25611. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25612. "additionalProperties": false
  25613. }
  25614. },
  25615. "required": ["id", "type", "properties"],
  25616. "additionalProperties": false
  25617. },
  25618. "EventSessionNextTextStarted": {
  25619. "type": "object",
  25620. "properties": {
  25621. "id": {
  25622. "type": "string",
  25623. "pattern": "^evt_"
  25624. },
  25625. "type": {
  25626. "type": "string",
  25627. "enum": ["session.next.text.started"]
  25628. },
  25629. "properties": {
  25630. "type": "object",
  25631. "properties": {
  25632. "timestamp": {
  25633. "type": "number"
  25634. },
  25635. "sessionID": {
  25636. "type": "string",
  25637. "pattern": "^ses"
  25638. },
  25639. "assistantMessageID": {
  25640. "type": "string",
  25641. "pattern": "^msg_"
  25642. },
  25643. "textID": {
  25644. "type": "string"
  25645. }
  25646. },
  25647. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25648. "additionalProperties": false
  25649. }
  25650. },
  25651. "required": ["id", "type", "properties"],
  25652. "additionalProperties": false
  25653. },
  25654. "EventSessionNextTextDelta": {
  25655. "type": "object",
  25656. "properties": {
  25657. "id": {
  25658. "type": "string",
  25659. "pattern": "^evt_"
  25660. },
  25661. "type": {
  25662. "type": "string",
  25663. "enum": ["session.next.text.delta"]
  25664. },
  25665. "properties": {
  25666. "type": "object",
  25667. "properties": {
  25668. "timestamp": {
  25669. "type": "number"
  25670. },
  25671. "sessionID": {
  25672. "type": "string",
  25673. "pattern": "^ses"
  25674. },
  25675. "assistantMessageID": {
  25676. "type": "string",
  25677. "pattern": "^msg_"
  25678. },
  25679. "textID": {
  25680. "type": "string"
  25681. },
  25682. "delta": {
  25683. "type": "string"
  25684. }
  25685. },
  25686. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  25687. "additionalProperties": false
  25688. }
  25689. },
  25690. "required": ["id", "type", "properties"],
  25691. "additionalProperties": false
  25692. },
  25693. "EventSessionNextTextEnded": {
  25694. "type": "object",
  25695. "properties": {
  25696. "id": {
  25697. "type": "string",
  25698. "pattern": "^evt_"
  25699. },
  25700. "type": {
  25701. "type": "string",
  25702. "enum": ["session.next.text.ended"]
  25703. },
  25704. "properties": {
  25705. "type": "object",
  25706. "properties": {
  25707. "timestamp": {
  25708. "type": "number"
  25709. },
  25710. "sessionID": {
  25711. "type": "string",
  25712. "pattern": "^ses"
  25713. },
  25714. "assistantMessageID": {
  25715. "type": "string",
  25716. "pattern": "^msg_"
  25717. },
  25718. "textID": {
  25719. "type": "string"
  25720. },
  25721. "text": {
  25722. "type": "string"
  25723. }
  25724. },
  25725. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25726. "additionalProperties": false
  25727. }
  25728. },
  25729. "required": ["id", "type", "properties"],
  25730. "additionalProperties": false
  25731. },
  25732. "EventSessionNextReasoningStarted": {
  25733. "type": "object",
  25734. "properties": {
  25735. "id": {
  25736. "type": "string",
  25737. "pattern": "^evt_"
  25738. },
  25739. "type": {
  25740. "type": "string",
  25741. "enum": ["session.next.reasoning.started"]
  25742. },
  25743. "properties": {
  25744. "type": "object",
  25745. "properties": {
  25746. "timestamp": {
  25747. "type": "number"
  25748. },
  25749. "sessionID": {
  25750. "type": "string",
  25751. "pattern": "^ses"
  25752. },
  25753. "assistantMessageID": {
  25754. "type": "string",
  25755. "pattern": "^msg_"
  25756. },
  25757. "reasoningID": {
  25758. "type": "string"
  25759. },
  25760. "providerMetadata": {
  25761. "type": "object",
  25762. "additionalProperties": {
  25763. "type": "object"
  25764. }
  25765. }
  25766. },
  25767. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25768. "additionalProperties": false
  25769. }
  25770. },
  25771. "required": ["id", "type", "properties"],
  25772. "additionalProperties": false
  25773. },
  25774. "EventSessionNextReasoningDelta": {
  25775. "type": "object",
  25776. "properties": {
  25777. "id": {
  25778. "type": "string",
  25779. "pattern": "^evt_"
  25780. },
  25781. "type": {
  25782. "type": "string",
  25783. "enum": ["session.next.reasoning.delta"]
  25784. },
  25785. "properties": {
  25786. "type": "object",
  25787. "properties": {
  25788. "timestamp": {
  25789. "type": "number"
  25790. },
  25791. "sessionID": {
  25792. "type": "string",
  25793. "pattern": "^ses"
  25794. },
  25795. "assistantMessageID": {
  25796. "type": "string",
  25797. "pattern": "^msg_"
  25798. },
  25799. "reasoningID": {
  25800. "type": "string"
  25801. },
  25802. "delta": {
  25803. "type": "string"
  25804. }
  25805. },
  25806. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  25807. "additionalProperties": false
  25808. }
  25809. },
  25810. "required": ["id", "type", "properties"],
  25811. "additionalProperties": false
  25812. },
  25813. "EventSessionNextReasoningEnded": {
  25814. "type": "object",
  25815. "properties": {
  25816. "id": {
  25817. "type": "string",
  25818. "pattern": "^evt_"
  25819. },
  25820. "type": {
  25821. "type": "string",
  25822. "enum": ["session.next.reasoning.ended"]
  25823. },
  25824. "properties": {
  25825. "type": "object",
  25826. "properties": {
  25827. "timestamp": {
  25828. "type": "number"
  25829. },
  25830. "sessionID": {
  25831. "type": "string",
  25832. "pattern": "^ses"
  25833. },
  25834. "assistantMessageID": {
  25835. "type": "string",
  25836. "pattern": "^msg_"
  25837. },
  25838. "reasoningID": {
  25839. "type": "string"
  25840. },
  25841. "text": {
  25842. "type": "string"
  25843. },
  25844. "providerMetadata": {
  25845. "type": "object",
  25846. "additionalProperties": {
  25847. "type": "object"
  25848. }
  25849. }
  25850. },
  25851. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25852. "additionalProperties": false
  25853. }
  25854. },
  25855. "required": ["id", "type", "properties"],
  25856. "additionalProperties": false
  25857. },
  25858. "EventSessionNextToolInputStarted": {
  25859. "type": "object",
  25860. "properties": {
  25861. "id": {
  25862. "type": "string",
  25863. "pattern": "^evt_"
  25864. },
  25865. "type": {
  25866. "type": "string",
  25867. "enum": ["session.next.tool.input.started"]
  25868. },
  25869. "properties": {
  25870. "type": "object",
  25871. "properties": {
  25872. "timestamp": {
  25873. "type": "number"
  25874. },
  25875. "sessionID": {
  25876. "type": "string",
  25877. "pattern": "^ses"
  25878. },
  25879. "assistantMessageID": {
  25880. "type": "string",
  25881. "pattern": "^msg_"
  25882. },
  25883. "callID": {
  25884. "type": "string"
  25885. },
  25886. "name": {
  25887. "type": "string"
  25888. }
  25889. },
  25890. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25891. "additionalProperties": false
  25892. }
  25893. },
  25894. "required": ["id", "type", "properties"],
  25895. "additionalProperties": false
  25896. },
  25897. "EventSessionNextToolInputDelta": {
  25898. "type": "object",
  25899. "properties": {
  25900. "id": {
  25901. "type": "string",
  25902. "pattern": "^evt_"
  25903. },
  25904. "type": {
  25905. "type": "string",
  25906. "enum": ["session.next.tool.input.delta"]
  25907. },
  25908. "properties": {
  25909. "type": "object",
  25910. "properties": {
  25911. "timestamp": {
  25912. "type": "number"
  25913. },
  25914. "sessionID": {
  25915. "type": "string",
  25916. "pattern": "^ses"
  25917. },
  25918. "assistantMessageID": {
  25919. "type": "string",
  25920. "pattern": "^msg_"
  25921. },
  25922. "callID": {
  25923. "type": "string"
  25924. },
  25925. "delta": {
  25926. "type": "string"
  25927. }
  25928. },
  25929. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  25930. "additionalProperties": false
  25931. }
  25932. },
  25933. "required": ["id", "type", "properties"],
  25934. "additionalProperties": false
  25935. },
  25936. "EventSessionNextToolInputEnded": {
  25937. "type": "object",
  25938. "properties": {
  25939. "id": {
  25940. "type": "string",
  25941. "pattern": "^evt_"
  25942. },
  25943. "type": {
  25944. "type": "string",
  25945. "enum": ["session.next.tool.input.ended"]
  25946. },
  25947. "properties": {
  25948. "type": "object",
  25949. "properties": {
  25950. "timestamp": {
  25951. "type": "number"
  25952. },
  25953. "sessionID": {
  25954. "type": "string",
  25955. "pattern": "^ses"
  25956. },
  25957. "assistantMessageID": {
  25958. "type": "string",
  25959. "pattern": "^msg_"
  25960. },
  25961. "callID": {
  25962. "type": "string"
  25963. },
  25964. "text": {
  25965. "type": "string"
  25966. }
  25967. },
  25968. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25969. "additionalProperties": false
  25970. }
  25971. },
  25972. "required": ["id", "type", "properties"],
  25973. "additionalProperties": false
  25974. },
  25975. "EventSessionNextToolCalled": {
  25976. "type": "object",
  25977. "properties": {
  25978. "id": {
  25979. "type": "string",
  25980. "pattern": "^evt_"
  25981. },
  25982. "type": {
  25983. "type": "string",
  25984. "enum": ["session.next.tool.called"]
  25985. },
  25986. "properties": {
  25987. "type": "object",
  25988. "properties": {
  25989. "timestamp": {
  25990. "type": "number"
  25991. },
  25992. "sessionID": {
  25993. "type": "string",
  25994. "pattern": "^ses"
  25995. },
  25996. "assistantMessageID": {
  25997. "type": "string",
  25998. "pattern": "^msg_"
  25999. },
  26000. "callID": {
  26001. "type": "string"
  26002. },
  26003. "tool": {
  26004. "type": "string"
  26005. },
  26006. "input": {
  26007. "type": "object"
  26008. },
  26009. "provider": {
  26010. "type": "object",
  26011. "properties": {
  26012. "executed": {
  26013. "type": "boolean"
  26014. },
  26015. "metadata": {
  26016. "type": "object",
  26017. "additionalProperties": {
  26018. "type": "object"
  26019. }
  26020. }
  26021. },
  26022. "required": ["executed"],
  26023. "additionalProperties": false
  26024. }
  26025. },
  26026. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26027. "additionalProperties": false
  26028. }
  26029. },
  26030. "required": ["id", "type", "properties"],
  26031. "additionalProperties": false
  26032. },
  26033. "EventSessionNextToolProgress": {
  26034. "type": "object",
  26035. "properties": {
  26036. "id": {
  26037. "type": "string",
  26038. "pattern": "^evt_"
  26039. },
  26040. "type": {
  26041. "type": "string",
  26042. "enum": ["session.next.tool.progress"]
  26043. },
  26044. "properties": {
  26045. "type": "object",
  26046. "properties": {
  26047. "timestamp": {
  26048. "type": "number"
  26049. },
  26050. "sessionID": {
  26051. "type": "string",
  26052. "pattern": "^ses"
  26053. },
  26054. "assistantMessageID": {
  26055. "type": "string",
  26056. "pattern": "^msg_"
  26057. },
  26058. "callID": {
  26059. "type": "string"
  26060. },
  26061. "structured": {
  26062. "type": "object"
  26063. },
  26064. "content": {
  26065. "type": "array",
  26066. "items": {
  26067. "anyOf": [
  26068. {
  26069. "$ref": "#/components/schemas/ToolTextContent"
  26070. },
  26071. {
  26072. "$ref": "#/components/schemas/ToolFileContent"
  26073. }
  26074. ]
  26075. }
  26076. }
  26077. },
  26078. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26079. "additionalProperties": false
  26080. }
  26081. },
  26082. "required": ["id", "type", "properties"],
  26083. "additionalProperties": false
  26084. },
  26085. "EventSessionNextToolSuccess": {
  26086. "type": "object",
  26087. "properties": {
  26088. "id": {
  26089. "type": "string",
  26090. "pattern": "^evt_"
  26091. },
  26092. "type": {
  26093. "type": "string",
  26094. "enum": ["session.next.tool.success"]
  26095. },
  26096. "properties": {
  26097. "type": "object",
  26098. "properties": {
  26099. "timestamp": {
  26100. "type": "number"
  26101. },
  26102. "sessionID": {
  26103. "type": "string",
  26104. "pattern": "^ses"
  26105. },
  26106. "assistantMessageID": {
  26107. "type": "string",
  26108. "pattern": "^msg_"
  26109. },
  26110. "callID": {
  26111. "type": "string"
  26112. },
  26113. "structured": {
  26114. "type": "object"
  26115. },
  26116. "content": {
  26117. "type": "array",
  26118. "items": {
  26119. "anyOf": [
  26120. {
  26121. "$ref": "#/components/schemas/ToolTextContent"
  26122. },
  26123. {
  26124. "$ref": "#/components/schemas/ToolFileContent"
  26125. }
  26126. ]
  26127. }
  26128. },
  26129. "result": {},
  26130. "provider": {
  26131. "type": "object",
  26132. "properties": {
  26133. "executed": {
  26134. "type": "boolean"
  26135. },
  26136. "metadata": {
  26137. "type": "object",
  26138. "additionalProperties": {
  26139. "type": "object"
  26140. }
  26141. }
  26142. },
  26143. "required": ["executed"],
  26144. "additionalProperties": false
  26145. }
  26146. },
  26147. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  26148. "additionalProperties": false
  26149. }
  26150. },
  26151. "required": ["id", "type", "properties"],
  26152. "additionalProperties": false
  26153. },
  26154. "EventSessionNextToolFailed": {
  26155. "type": "object",
  26156. "properties": {
  26157. "id": {
  26158. "type": "string",
  26159. "pattern": "^evt_"
  26160. },
  26161. "type": {
  26162. "type": "string",
  26163. "enum": ["session.next.tool.failed"]
  26164. },
  26165. "properties": {
  26166. "type": "object",
  26167. "properties": {
  26168. "timestamp": {
  26169. "type": "number"
  26170. },
  26171. "sessionID": {
  26172. "type": "string",
  26173. "pattern": "^ses"
  26174. },
  26175. "assistantMessageID": {
  26176. "type": "string",
  26177. "pattern": "^msg_"
  26178. },
  26179. "callID": {
  26180. "type": "string"
  26181. },
  26182. "error": {
  26183. "$ref": "#/components/schemas/SessionErrorUnknown"
  26184. },
  26185. "result": {},
  26186. "provider": {
  26187. "type": "object",
  26188. "properties": {
  26189. "executed": {
  26190. "type": "boolean"
  26191. },
  26192. "metadata": {
  26193. "type": "object",
  26194. "additionalProperties": {
  26195. "type": "object"
  26196. }
  26197. }
  26198. },
  26199. "required": ["executed"],
  26200. "additionalProperties": false
  26201. }
  26202. },
  26203. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26204. "additionalProperties": false
  26205. }
  26206. },
  26207. "required": ["id", "type", "properties"],
  26208. "additionalProperties": false
  26209. },
  26210. "EventSessionNextRetried": {
  26211. "type": "object",
  26212. "properties": {
  26213. "id": {
  26214. "type": "string",
  26215. "pattern": "^evt_"
  26216. },
  26217. "type": {
  26218. "type": "string",
  26219. "enum": ["session.next.retried"]
  26220. },
  26221. "properties": {
  26222. "type": "object",
  26223. "properties": {
  26224. "timestamp": {
  26225. "type": "number"
  26226. },
  26227. "sessionID": {
  26228. "type": "string",
  26229. "pattern": "^ses"
  26230. },
  26231. "attempt": {
  26232. "type": "number"
  26233. },
  26234. "error": {
  26235. "$ref": "#/components/schemas/SessionNextRetry_error"
  26236. }
  26237. },
  26238. "required": ["timestamp", "sessionID", "attempt", "error"],
  26239. "additionalProperties": false
  26240. }
  26241. },
  26242. "required": ["id", "type", "properties"],
  26243. "additionalProperties": false
  26244. },
  26245. "EventSessionNextCompactionStarted": {
  26246. "type": "object",
  26247. "properties": {
  26248. "id": {
  26249. "type": "string",
  26250. "pattern": "^evt_"
  26251. },
  26252. "type": {
  26253. "type": "string",
  26254. "enum": ["session.next.compaction.started"]
  26255. },
  26256. "properties": {
  26257. "type": "object",
  26258. "properties": {
  26259. "timestamp": {
  26260. "type": "number"
  26261. },
  26262. "sessionID": {
  26263. "type": "string",
  26264. "pattern": "^ses"
  26265. },
  26266. "messageID": {
  26267. "type": "string",
  26268. "pattern": "^msg_"
  26269. },
  26270. "reason": {
  26271. "type": "string",
  26272. "enum": ["auto", "manual"]
  26273. }
  26274. },
  26275. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26276. "additionalProperties": false
  26277. }
  26278. },
  26279. "required": ["id", "type", "properties"],
  26280. "additionalProperties": false
  26281. },
  26282. "EventSessionNextCompactionDelta": {
  26283. "type": "object",
  26284. "properties": {
  26285. "id": {
  26286. "type": "string",
  26287. "pattern": "^evt_"
  26288. },
  26289. "type": {
  26290. "type": "string",
  26291. "enum": ["session.next.compaction.delta"]
  26292. },
  26293. "properties": {
  26294. "type": "object",
  26295. "properties": {
  26296. "timestamp": {
  26297. "type": "number"
  26298. },
  26299. "sessionID": {
  26300. "type": "string",
  26301. "pattern": "^ses"
  26302. },
  26303. "text": {
  26304. "type": "string"
  26305. }
  26306. },
  26307. "required": ["timestamp", "sessionID", "text"],
  26308. "additionalProperties": false
  26309. }
  26310. },
  26311. "required": ["id", "type", "properties"],
  26312. "additionalProperties": false
  26313. },
  26314. "EventSessionNextCompactionEnded": {
  26315. "type": "object",
  26316. "properties": {
  26317. "id": {
  26318. "type": "string",
  26319. "pattern": "^evt_"
  26320. },
  26321. "type": {
  26322. "type": "string",
  26323. "enum": ["session.next.compaction.ended"]
  26324. },
  26325. "properties": {
  26326. "type": "object",
  26327. "properties": {
  26328. "timestamp": {
  26329. "type": "number"
  26330. },
  26331. "sessionID": {
  26332. "type": "string",
  26333. "pattern": "^ses"
  26334. },
  26335. "text": {
  26336. "type": "string"
  26337. },
  26338. "include": {
  26339. "type": "string"
  26340. }
  26341. },
  26342. "required": ["timestamp", "sessionID", "text"],
  26343. "additionalProperties": false
  26344. }
  26345. },
  26346. "required": ["id", "type", "properties"],
  26347. "additionalProperties": false
  26348. },
  26349. "EventMessagePartDelta": {
  26350. "type": "object",
  26351. "properties": {
  26352. "id": {
  26353. "type": "string",
  26354. "pattern": "^evt_"
  26355. },
  26356. "type": {
  26357. "type": "string",
  26358. "enum": ["message.part.delta"]
  26359. },
  26360. "properties": {
  26361. "type": "object",
  26362. "properties": {
  26363. "sessionID": {
  26364. "type": "string",
  26365. "pattern": "^ses"
  26366. },
  26367. "messageID": {
  26368. "type": "string",
  26369. "pattern": "^msg"
  26370. },
  26371. "partID": {
  26372. "type": "string",
  26373. "pattern": "^prt"
  26374. },
  26375. "field": {
  26376. "type": "string"
  26377. },
  26378. "delta": {
  26379. "type": "string"
  26380. }
  26381. },
  26382. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  26383. "additionalProperties": false
  26384. }
  26385. },
  26386. "required": ["id", "type", "properties"],
  26387. "additionalProperties": false
  26388. },
  26389. "EventSessionDiff": {
  26390. "type": "object",
  26391. "properties": {
  26392. "id": {
  26393. "type": "string",
  26394. "pattern": "^evt_"
  26395. },
  26396. "type": {
  26397. "type": "string",
  26398. "enum": ["session.diff"]
  26399. },
  26400. "properties": {
  26401. "type": "object",
  26402. "properties": {
  26403. "sessionID": {
  26404. "type": "string",
  26405. "pattern": "^ses"
  26406. },
  26407. "diff": {
  26408. "type": "array",
  26409. "items": {
  26410. "$ref": "#/components/schemas/SnapshotFileDiff"
  26411. }
  26412. }
  26413. },
  26414. "required": ["sessionID", "diff"],
  26415. "additionalProperties": false
  26416. }
  26417. },
  26418. "required": ["id", "type", "properties"],
  26419. "additionalProperties": false
  26420. },
  26421. "EventSessionError": {
  26422. "type": "object",
  26423. "properties": {
  26424. "id": {
  26425. "type": "string",
  26426. "pattern": "^evt_"
  26427. },
  26428. "type": {
  26429. "type": "string",
  26430. "enum": ["session.error"]
  26431. },
  26432. "properties": {
  26433. "type": "object",
  26434. "properties": {
  26435. "sessionID": {
  26436. "type": "string",
  26437. "pattern": "^ses"
  26438. },
  26439. "error": {
  26440. "anyOf": [
  26441. {
  26442. "$ref": "#/components/schemas/ProviderAuthError"
  26443. },
  26444. {
  26445. "$ref": "#/components/schemas/UnknownError"
  26446. },
  26447. {
  26448. "$ref": "#/components/schemas/MessageOutputLengthError"
  26449. },
  26450. {
  26451. "$ref": "#/components/schemas/MessageAbortedError"
  26452. },
  26453. {
  26454. "$ref": "#/components/schemas/StructuredOutputError"
  26455. },
  26456. {
  26457. "$ref": "#/components/schemas/ContextOverflowError"
  26458. },
  26459. {
  26460. "$ref": "#/components/schemas/APIError"
  26461. }
  26462. ]
  26463. }
  26464. },
  26465. "additionalProperties": false
  26466. }
  26467. },
  26468. "required": ["id", "type", "properties"],
  26469. "additionalProperties": false
  26470. },
  26471. "EventInstallationUpdated": {
  26472. "type": "object",
  26473. "properties": {
  26474. "id": {
  26475. "type": "string",
  26476. "pattern": "^evt_"
  26477. },
  26478. "type": {
  26479. "type": "string",
  26480. "enum": ["installation.updated"]
  26481. },
  26482. "properties": {
  26483. "type": "object",
  26484. "properties": {
  26485. "version": {
  26486. "type": "string"
  26487. }
  26488. },
  26489. "required": ["version"],
  26490. "additionalProperties": false
  26491. }
  26492. },
  26493. "required": ["id", "type", "properties"],
  26494. "additionalProperties": false
  26495. },
  26496. "EventInstallationUpdate-available": {
  26497. "type": "object",
  26498. "properties": {
  26499. "id": {
  26500. "type": "string",
  26501. "pattern": "^evt_"
  26502. },
  26503. "type": {
  26504. "type": "string",
  26505. "enum": ["installation.update-available"]
  26506. },
  26507. "properties": {
  26508. "type": "object",
  26509. "properties": {
  26510. "version": {
  26511. "type": "string"
  26512. }
  26513. },
  26514. "required": ["version"],
  26515. "additionalProperties": false
  26516. }
  26517. },
  26518. "required": ["id", "type", "properties"],
  26519. "additionalProperties": false
  26520. },
  26521. "EventFileEdited": {
  26522. "type": "object",
  26523. "properties": {
  26524. "id": {
  26525. "type": "string",
  26526. "pattern": "^evt_"
  26527. },
  26528. "type": {
  26529. "type": "string",
  26530. "enum": ["file.edited"]
  26531. },
  26532. "properties": {
  26533. "type": "object",
  26534. "properties": {
  26535. "file": {
  26536. "type": "string"
  26537. }
  26538. },
  26539. "required": ["file"],
  26540. "additionalProperties": false
  26541. }
  26542. },
  26543. "required": ["id", "type", "properties"],
  26544. "additionalProperties": false
  26545. },
  26546. "EventAccountAdded": {
  26547. "type": "object",
  26548. "properties": {
  26549. "id": {
  26550. "type": "string",
  26551. "pattern": "^evt_"
  26552. },
  26553. "type": {
  26554. "type": "string",
  26555. "enum": ["account.added"]
  26556. },
  26557. "properties": {
  26558. "type": "object",
  26559. "properties": {
  26560. "account": {
  26561. "$ref": "#/components/schemas/AuthInfo"
  26562. }
  26563. },
  26564. "required": ["account"],
  26565. "additionalProperties": false
  26566. }
  26567. },
  26568. "required": ["id", "type", "properties"],
  26569. "additionalProperties": false
  26570. },
  26571. "EventAccountRemoved": {
  26572. "type": "object",
  26573. "properties": {
  26574. "id": {
  26575. "type": "string",
  26576. "pattern": "^evt_"
  26577. },
  26578. "type": {
  26579. "type": "string",
  26580. "enum": ["account.removed"]
  26581. },
  26582. "properties": {
  26583. "type": "object",
  26584. "properties": {
  26585. "account": {
  26586. "$ref": "#/components/schemas/AuthInfo"
  26587. }
  26588. },
  26589. "required": ["account"],
  26590. "additionalProperties": false
  26591. }
  26592. },
  26593. "required": ["id", "type", "properties"],
  26594. "additionalProperties": false
  26595. },
  26596. "EventAccountSwitched": {
  26597. "type": "object",
  26598. "properties": {
  26599. "id": {
  26600. "type": "string",
  26601. "pattern": "^evt_"
  26602. },
  26603. "type": {
  26604. "type": "string",
  26605. "enum": ["account.switched"]
  26606. },
  26607. "properties": {
  26608. "type": "object",
  26609. "properties": {
  26610. "serviceID": {
  26611. "type": "string"
  26612. },
  26613. "from": {
  26614. "type": "string"
  26615. },
  26616. "to": {
  26617. "type": "string"
  26618. }
  26619. },
  26620. "required": ["serviceID"],
  26621. "additionalProperties": false
  26622. }
  26623. },
  26624. "required": ["id", "type", "properties"],
  26625. "additionalProperties": false
  26626. },
  26627. "EventPermissionV2Asked": {
  26628. "type": "object",
  26629. "properties": {
  26630. "id": {
  26631. "type": "string",
  26632. "pattern": "^evt_"
  26633. },
  26634. "type": {
  26635. "type": "string",
  26636. "enum": ["permission.v2.asked"]
  26637. },
  26638. "properties": {
  26639. "type": "object",
  26640. "properties": {
  26641. "id": {
  26642. "type": "string",
  26643. "pattern": "^per"
  26644. },
  26645. "sessionID": {
  26646. "type": "string",
  26647. "pattern": "^ses"
  26648. },
  26649. "action": {
  26650. "type": "string"
  26651. },
  26652. "resources": {
  26653. "type": "array",
  26654. "items": {
  26655. "type": "string"
  26656. }
  26657. },
  26658. "save": {
  26659. "type": "array",
  26660. "items": {
  26661. "type": "string"
  26662. }
  26663. },
  26664. "metadata": {
  26665. "type": "object"
  26666. },
  26667. "source": {
  26668. "$ref": "#/components/schemas/PermissionV2Source"
  26669. }
  26670. },
  26671. "required": ["id", "sessionID", "action", "resources"],
  26672. "additionalProperties": false
  26673. }
  26674. },
  26675. "required": ["id", "type", "properties"],
  26676. "additionalProperties": false
  26677. },
  26678. "EventPermissionV2Replied": {
  26679. "type": "object",
  26680. "properties": {
  26681. "id": {
  26682. "type": "string",
  26683. "pattern": "^evt_"
  26684. },
  26685. "type": {
  26686. "type": "string",
  26687. "enum": ["permission.v2.replied"]
  26688. },
  26689. "properties": {
  26690. "type": "object",
  26691. "properties": {
  26692. "sessionID": {
  26693. "type": "string",
  26694. "pattern": "^ses"
  26695. },
  26696. "requestID": {
  26697. "type": "string",
  26698. "pattern": "^per"
  26699. },
  26700. "reply": {
  26701. "$ref": "#/components/schemas/PermissionV2Reply"
  26702. }
  26703. },
  26704. "required": ["sessionID", "requestID", "reply"],
  26705. "additionalProperties": false
  26706. }
  26707. },
  26708. "required": ["id", "type", "properties"],
  26709. "additionalProperties": false
  26710. },
  26711. "EventFileWatcherUpdated": {
  26712. "type": "object",
  26713. "properties": {
  26714. "id": {
  26715. "type": "string",
  26716. "pattern": "^evt_"
  26717. },
  26718. "type": {
  26719. "type": "string",
  26720. "enum": ["file.watcher.updated"]
  26721. },
  26722. "properties": {
  26723. "type": "object",
  26724. "properties": {
  26725. "file": {
  26726. "type": "string"
  26727. },
  26728. "event": {
  26729. "type": "string",
  26730. "enum": ["add", "change", "unlink"]
  26731. }
  26732. },
  26733. "required": ["file", "event"],
  26734. "additionalProperties": false
  26735. }
  26736. },
  26737. "required": ["id", "type", "properties"],
  26738. "additionalProperties": false
  26739. },
  26740. "EventPtyCreated": {
  26741. "type": "object",
  26742. "properties": {
  26743. "id": {
  26744. "type": "string",
  26745. "pattern": "^evt_"
  26746. },
  26747. "type": {
  26748. "type": "string",
  26749. "enum": ["pty.created"]
  26750. },
  26751. "properties": {
  26752. "type": "object",
  26753. "properties": {
  26754. "info": {
  26755. "$ref": "#/components/schemas/Pty"
  26756. }
  26757. },
  26758. "required": ["info"],
  26759. "additionalProperties": false
  26760. }
  26761. },
  26762. "required": ["id", "type", "properties"],
  26763. "additionalProperties": false
  26764. },
  26765. "EventPtyUpdated": {
  26766. "type": "object",
  26767. "properties": {
  26768. "id": {
  26769. "type": "string",
  26770. "pattern": "^evt_"
  26771. },
  26772. "type": {
  26773. "type": "string",
  26774. "enum": ["pty.updated"]
  26775. },
  26776. "properties": {
  26777. "type": "object",
  26778. "properties": {
  26779. "info": {
  26780. "$ref": "#/components/schemas/Pty"
  26781. }
  26782. },
  26783. "required": ["info"],
  26784. "additionalProperties": false
  26785. }
  26786. },
  26787. "required": ["id", "type", "properties"],
  26788. "additionalProperties": false
  26789. },
  26790. "EventPtyExited": {
  26791. "type": "object",
  26792. "properties": {
  26793. "id": {
  26794. "type": "string",
  26795. "pattern": "^evt_"
  26796. },
  26797. "type": {
  26798. "type": "string",
  26799. "enum": ["pty.exited"]
  26800. },
  26801. "properties": {
  26802. "type": "object",
  26803. "properties": {
  26804. "id": {
  26805. "type": "string",
  26806. "pattern": "^pty"
  26807. },
  26808. "exitCode": {
  26809. "type": "integer",
  26810. "minimum": 0
  26811. }
  26812. },
  26813. "required": ["id", "exitCode"],
  26814. "additionalProperties": false
  26815. }
  26816. },
  26817. "required": ["id", "type", "properties"],
  26818. "additionalProperties": false
  26819. },
  26820. "EventPtyDeleted": {
  26821. "type": "object",
  26822. "properties": {
  26823. "id": {
  26824. "type": "string",
  26825. "pattern": "^evt_"
  26826. },
  26827. "type": {
  26828. "type": "string",
  26829. "enum": ["pty.deleted"]
  26830. },
  26831. "properties": {
  26832. "type": "object",
  26833. "properties": {
  26834. "id": {
  26835. "type": "string",
  26836. "pattern": "^pty"
  26837. }
  26838. },
  26839. "required": ["id"],
  26840. "additionalProperties": false
  26841. }
  26842. },
  26843. "required": ["id", "type", "properties"],
  26844. "additionalProperties": false
  26845. },
  26846. "EventQuestionV2Asked": {
  26847. "type": "object",
  26848. "properties": {
  26849. "id": {
  26850. "type": "string",
  26851. "pattern": "^evt_"
  26852. },
  26853. "type": {
  26854. "type": "string",
  26855. "enum": ["question.v2.asked"]
  26856. },
  26857. "properties": {
  26858. "type": "object",
  26859. "properties": {
  26860. "id": {
  26861. "type": "string",
  26862. "pattern": "^que"
  26863. },
  26864. "sessionID": {
  26865. "type": "string",
  26866. "pattern": "^ses"
  26867. },
  26868. "questions": {
  26869. "type": "array",
  26870. "items": {
  26871. "$ref": "#/components/schemas/QuestionV2Info"
  26872. },
  26873. "description": "Questions to ask"
  26874. },
  26875. "tool": {
  26876. "$ref": "#/components/schemas/QuestionV2Tool"
  26877. }
  26878. },
  26879. "required": ["id", "sessionID", "questions"],
  26880. "additionalProperties": false
  26881. }
  26882. },
  26883. "required": ["id", "type", "properties"],
  26884. "additionalProperties": false
  26885. },
  26886. "EventQuestionV2Replied": {
  26887. "type": "object",
  26888. "properties": {
  26889. "id": {
  26890. "type": "string",
  26891. "pattern": "^evt_"
  26892. },
  26893. "type": {
  26894. "type": "string",
  26895. "enum": ["question.v2.replied"]
  26896. },
  26897. "properties": {
  26898. "type": "object",
  26899. "properties": {
  26900. "sessionID": {
  26901. "type": "string",
  26902. "pattern": "^ses"
  26903. },
  26904. "requestID": {
  26905. "type": "string",
  26906. "pattern": "^que"
  26907. },
  26908. "answers": {
  26909. "type": "array",
  26910. "items": {
  26911. "$ref": "#/components/schemas/QuestionV2Answer"
  26912. }
  26913. }
  26914. },
  26915. "required": ["sessionID", "requestID", "answers"],
  26916. "additionalProperties": false
  26917. }
  26918. },
  26919. "required": ["id", "type", "properties"],
  26920. "additionalProperties": false
  26921. },
  26922. "EventQuestionV2Rejected": {
  26923. "type": "object",
  26924. "properties": {
  26925. "id": {
  26926. "type": "string",
  26927. "pattern": "^evt_"
  26928. },
  26929. "type": {
  26930. "type": "string",
  26931. "enum": ["question.v2.rejected"]
  26932. },
  26933. "properties": {
  26934. "type": "object",
  26935. "properties": {
  26936. "sessionID": {
  26937. "type": "string",
  26938. "pattern": "^ses"
  26939. },
  26940. "requestID": {
  26941. "type": "string",
  26942. "pattern": "^que"
  26943. }
  26944. },
  26945. "required": ["sessionID", "requestID"],
  26946. "additionalProperties": false
  26947. }
  26948. },
  26949. "required": ["id", "type", "properties"],
  26950. "additionalProperties": false
  26951. },
  26952. "EventTodoUpdated": {
  26953. "type": "object",
  26954. "properties": {
  26955. "id": {
  26956. "type": "string",
  26957. "pattern": "^evt_"
  26958. },
  26959. "type": {
  26960. "type": "string",
  26961. "enum": ["todo.updated"]
  26962. },
  26963. "properties": {
  26964. "type": "object",
  26965. "properties": {
  26966. "sessionID": {
  26967. "type": "string",
  26968. "pattern": "^ses"
  26969. },
  26970. "todos": {
  26971. "type": "array",
  26972. "items": {
  26973. "$ref": "#/components/schemas/Todo"
  26974. }
  26975. }
  26976. },
  26977. "required": ["sessionID", "todos"],
  26978. "additionalProperties": false
  26979. }
  26980. },
  26981. "required": ["id", "type", "properties"],
  26982. "additionalProperties": false
  26983. },
  26984. "EventLspUpdated": {
  26985. "type": "object",
  26986. "properties": {
  26987. "id": {
  26988. "type": "string",
  26989. "pattern": "^evt_"
  26990. },
  26991. "type": {
  26992. "type": "string",
  26993. "enum": ["lsp.updated"]
  26994. },
  26995. "properties": {
  26996. "type": "object",
  26997. "properties": {}
  26998. }
  26999. },
  27000. "required": ["id", "type", "properties"],
  27001. "additionalProperties": false
  27002. },
  27003. "EventPermissionAsked": {
  27004. "type": "object",
  27005. "properties": {
  27006. "id": {
  27007. "type": "string",
  27008. "pattern": "^evt_"
  27009. },
  27010. "type": {
  27011. "type": "string",
  27012. "enum": ["permission.asked"]
  27013. },
  27014. "properties": {
  27015. "type": "object",
  27016. "properties": {
  27017. "id": {
  27018. "type": "string",
  27019. "pattern": "^per"
  27020. },
  27021. "sessionID": {
  27022. "type": "string",
  27023. "pattern": "^ses"
  27024. },
  27025. "permission": {
  27026. "type": "string"
  27027. },
  27028. "patterns": {
  27029. "type": "array",
  27030. "items": {
  27031. "type": "string"
  27032. }
  27033. },
  27034. "metadata": {
  27035. "type": "object"
  27036. },
  27037. "always": {
  27038. "type": "array",
  27039. "items": {
  27040. "type": "string"
  27041. }
  27042. },
  27043. "tool": {
  27044. "type": "object",
  27045. "properties": {
  27046. "messageID": {
  27047. "type": "string"
  27048. },
  27049. "callID": {
  27050. "type": "string"
  27051. }
  27052. },
  27053. "required": ["messageID", "callID"],
  27054. "additionalProperties": false
  27055. }
  27056. },
  27057. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  27058. "additionalProperties": false
  27059. }
  27060. },
  27061. "required": ["id", "type", "properties"],
  27062. "additionalProperties": false
  27063. },
  27064. "EventPermissionReplied": {
  27065. "type": "object",
  27066. "properties": {
  27067. "id": {
  27068. "type": "string",
  27069. "pattern": "^evt_"
  27070. },
  27071. "type": {
  27072. "type": "string",
  27073. "enum": ["permission.replied"]
  27074. },
  27075. "properties": {
  27076. "type": "object",
  27077. "properties": {
  27078. "sessionID": {
  27079. "type": "string",
  27080. "pattern": "^ses"
  27081. },
  27082. "requestID": {
  27083. "type": "string",
  27084. "pattern": "^per"
  27085. },
  27086. "reply": {
  27087. "type": "string",
  27088. "enum": ["once", "always", "reject"]
  27089. }
  27090. },
  27091. "required": ["sessionID", "requestID", "reply"],
  27092. "additionalProperties": false
  27093. }
  27094. },
  27095. "required": ["id", "type", "properties"],
  27096. "additionalProperties": false
  27097. },
  27098. "EventMcpToolsChanged": {
  27099. "type": "object",
  27100. "properties": {
  27101. "id": {
  27102. "type": "string",
  27103. "pattern": "^evt_"
  27104. },
  27105. "type": {
  27106. "type": "string",
  27107. "enum": ["mcp.tools.changed"]
  27108. },
  27109. "properties": {
  27110. "type": "object",
  27111. "properties": {
  27112. "server": {
  27113. "type": "string"
  27114. }
  27115. },
  27116. "required": ["server"],
  27117. "additionalProperties": false
  27118. }
  27119. },
  27120. "required": ["id", "type", "properties"],
  27121. "additionalProperties": false
  27122. },
  27123. "EventMcpBrowserOpenFailed": {
  27124. "type": "object",
  27125. "properties": {
  27126. "id": {
  27127. "type": "string",
  27128. "pattern": "^evt_"
  27129. },
  27130. "type": {
  27131. "type": "string",
  27132. "enum": ["mcp.browser.open.failed"]
  27133. },
  27134. "properties": {
  27135. "type": "object",
  27136. "properties": {
  27137. "mcpName": {
  27138. "type": "string"
  27139. },
  27140. "url": {
  27141. "type": "string"
  27142. }
  27143. },
  27144. "required": ["mcpName", "url"],
  27145. "additionalProperties": false
  27146. }
  27147. },
  27148. "required": ["id", "type", "properties"],
  27149. "additionalProperties": false
  27150. },
  27151. "EventCommandExecuted": {
  27152. "type": "object",
  27153. "properties": {
  27154. "id": {
  27155. "type": "string",
  27156. "pattern": "^evt_"
  27157. },
  27158. "type": {
  27159. "type": "string",
  27160. "enum": ["command.executed"]
  27161. },
  27162. "properties": {
  27163. "type": "object",
  27164. "properties": {
  27165. "name": {
  27166. "type": "string"
  27167. },
  27168. "sessionID": {
  27169. "type": "string",
  27170. "pattern": "^ses"
  27171. },
  27172. "arguments": {
  27173. "type": "string"
  27174. },
  27175. "messageID": {
  27176. "type": "string",
  27177. "pattern": "^msg"
  27178. }
  27179. },
  27180. "required": ["name", "sessionID", "arguments", "messageID"],
  27181. "additionalProperties": false
  27182. }
  27183. },
  27184. "required": ["id", "type", "properties"],
  27185. "additionalProperties": false
  27186. },
  27187. "EventProjectDirectoriesUpdated": {
  27188. "type": "object",
  27189. "properties": {
  27190. "id": {
  27191. "type": "string",
  27192. "pattern": "^evt_"
  27193. },
  27194. "type": {
  27195. "type": "string",
  27196. "enum": ["project.directories.updated"]
  27197. },
  27198. "properties": {
  27199. "type": "object",
  27200. "properties": {
  27201. "projectID": {
  27202. "type": "string"
  27203. }
  27204. },
  27205. "required": ["projectID"],
  27206. "additionalProperties": false
  27207. }
  27208. },
  27209. "required": ["id", "type", "properties"],
  27210. "additionalProperties": false
  27211. },
  27212. "EventProjectUpdated": {
  27213. "type": "object",
  27214. "properties": {
  27215. "id": {
  27216. "type": "string",
  27217. "pattern": "^evt_"
  27218. },
  27219. "type": {
  27220. "type": "string",
  27221. "enum": ["project.updated"]
  27222. },
  27223. "properties": {
  27224. "type": "object",
  27225. "properties": {
  27226. "id": {
  27227. "type": "string"
  27228. },
  27229. "worktree": {
  27230. "type": "string"
  27231. },
  27232. "vcs": {
  27233. "type": "string",
  27234. "enum": ["git"]
  27235. },
  27236. "name": {
  27237. "type": "string"
  27238. },
  27239. "icon": {
  27240. "type": "object",
  27241. "properties": {
  27242. "url": {
  27243. "type": "string"
  27244. },
  27245. "override": {
  27246. "type": "string"
  27247. },
  27248. "color": {
  27249. "type": "string"
  27250. }
  27251. },
  27252. "additionalProperties": false
  27253. },
  27254. "commands": {
  27255. "type": "object",
  27256. "properties": {
  27257. "start": {
  27258. "type": "string",
  27259. "description": "Startup script to run when creating a new workspace (worktree)"
  27260. }
  27261. },
  27262. "additionalProperties": false
  27263. },
  27264. "time": {
  27265. "type": "object",
  27266. "properties": {
  27267. "created": {
  27268. "type": "integer",
  27269. "minimum": 0
  27270. },
  27271. "updated": {
  27272. "type": "integer",
  27273. "minimum": 0
  27274. },
  27275. "initialized": {
  27276. "type": "integer",
  27277. "minimum": 0
  27278. }
  27279. },
  27280. "required": ["created", "updated"],
  27281. "additionalProperties": false
  27282. },
  27283. "sandboxes": {
  27284. "type": "array",
  27285. "items": {
  27286. "type": "string"
  27287. }
  27288. }
  27289. },
  27290. "required": ["id", "worktree", "time", "sandboxes"],
  27291. "additionalProperties": false
  27292. }
  27293. },
  27294. "required": ["id", "type", "properties"],
  27295. "additionalProperties": false
  27296. },
  27297. "EventQuestionAsked": {
  27298. "type": "object",
  27299. "properties": {
  27300. "id": {
  27301. "type": "string",
  27302. "pattern": "^evt_"
  27303. },
  27304. "type": {
  27305. "type": "string",
  27306. "enum": ["question.asked"]
  27307. },
  27308. "properties": {
  27309. "type": "object",
  27310. "properties": {
  27311. "id": {
  27312. "type": "string",
  27313. "pattern": "^que"
  27314. },
  27315. "sessionID": {
  27316. "type": "string",
  27317. "pattern": "^ses"
  27318. },
  27319. "questions": {
  27320. "type": "array",
  27321. "items": {
  27322. "$ref": "#/components/schemas/QuestionInfo"
  27323. },
  27324. "description": "Questions to ask"
  27325. },
  27326. "tool": {
  27327. "$ref": "#/components/schemas/QuestionTool"
  27328. }
  27329. },
  27330. "required": ["id", "sessionID", "questions"],
  27331. "additionalProperties": false
  27332. }
  27333. },
  27334. "required": ["id", "type", "properties"],
  27335. "additionalProperties": false
  27336. },
  27337. "EventQuestionReplied": {
  27338. "type": "object",
  27339. "properties": {
  27340. "id": {
  27341. "type": "string",
  27342. "pattern": "^evt_"
  27343. },
  27344. "type": {
  27345. "type": "string",
  27346. "enum": ["question.replied"]
  27347. },
  27348. "properties": {
  27349. "type": "object",
  27350. "properties": {
  27351. "sessionID": {
  27352. "type": "string",
  27353. "pattern": "^ses"
  27354. },
  27355. "requestID": {
  27356. "type": "string",
  27357. "pattern": "^que"
  27358. },
  27359. "answers": {
  27360. "type": "array",
  27361. "items": {
  27362. "$ref": "#/components/schemas/QuestionAnswer"
  27363. }
  27364. }
  27365. },
  27366. "required": ["sessionID", "requestID", "answers"],
  27367. "additionalProperties": false
  27368. }
  27369. },
  27370. "required": ["id", "type", "properties"],
  27371. "additionalProperties": false
  27372. },
  27373. "EventQuestionRejected": {
  27374. "type": "object",
  27375. "properties": {
  27376. "id": {
  27377. "type": "string",
  27378. "pattern": "^evt_"
  27379. },
  27380. "type": {
  27381. "type": "string",
  27382. "enum": ["question.rejected"]
  27383. },
  27384. "properties": {
  27385. "type": "object",
  27386. "properties": {
  27387. "sessionID": {
  27388. "type": "string",
  27389. "pattern": "^ses"
  27390. },
  27391. "requestID": {
  27392. "type": "string",
  27393. "pattern": "^que"
  27394. }
  27395. },
  27396. "required": ["sessionID", "requestID"],
  27397. "additionalProperties": false
  27398. }
  27399. },
  27400. "required": ["id", "type", "properties"],
  27401. "additionalProperties": false
  27402. },
  27403. "EventSessionStatus": {
  27404. "type": "object",
  27405. "properties": {
  27406. "id": {
  27407. "type": "string",
  27408. "pattern": "^evt_"
  27409. },
  27410. "type": {
  27411. "type": "string",
  27412. "enum": ["session.status"]
  27413. },
  27414. "properties": {
  27415. "type": "object",
  27416. "properties": {
  27417. "sessionID": {
  27418. "type": "string",
  27419. "pattern": "^ses"
  27420. },
  27421. "status": {
  27422. "$ref": "#/components/schemas/SessionStatus"
  27423. }
  27424. },
  27425. "required": ["sessionID", "status"],
  27426. "additionalProperties": false
  27427. }
  27428. },
  27429. "required": ["id", "type", "properties"],
  27430. "additionalProperties": false
  27431. },
  27432. "EventSessionIdle": {
  27433. "type": "object",
  27434. "properties": {
  27435. "id": {
  27436. "type": "string",
  27437. "pattern": "^evt_"
  27438. },
  27439. "type": {
  27440. "type": "string",
  27441. "enum": ["session.idle"]
  27442. },
  27443. "properties": {
  27444. "type": "object",
  27445. "properties": {
  27446. "sessionID": {
  27447. "type": "string",
  27448. "pattern": "^ses"
  27449. }
  27450. },
  27451. "required": ["sessionID"],
  27452. "additionalProperties": false
  27453. }
  27454. },
  27455. "required": ["id", "type", "properties"],
  27456. "additionalProperties": false
  27457. },
  27458. "EventSessionCompacted": {
  27459. "type": "object",
  27460. "properties": {
  27461. "id": {
  27462. "type": "string",
  27463. "pattern": "^evt_"
  27464. },
  27465. "type": {
  27466. "type": "string",
  27467. "enum": ["session.compacted"]
  27468. },
  27469. "properties": {
  27470. "type": "object",
  27471. "properties": {
  27472. "sessionID": {
  27473. "type": "string",
  27474. "pattern": "^ses"
  27475. }
  27476. },
  27477. "required": ["sessionID"],
  27478. "additionalProperties": false
  27479. }
  27480. },
  27481. "required": ["id", "type", "properties"],
  27482. "additionalProperties": false
  27483. },
  27484. "EventVcsBranchUpdated": {
  27485. "type": "object",
  27486. "properties": {
  27487. "id": {
  27488. "type": "string",
  27489. "pattern": "^evt_"
  27490. },
  27491. "type": {
  27492. "type": "string",
  27493. "enum": ["vcs.branch.updated"]
  27494. },
  27495. "properties": {
  27496. "type": "object",
  27497. "properties": {
  27498. "branch": {
  27499. "type": "string"
  27500. }
  27501. },
  27502. "additionalProperties": false
  27503. }
  27504. },
  27505. "required": ["id", "type", "properties"],
  27506. "additionalProperties": false
  27507. },
  27508. "EventWorktreeReady": {
  27509. "type": "object",
  27510. "properties": {
  27511. "id": {
  27512. "type": "string",
  27513. "pattern": "^evt_"
  27514. },
  27515. "type": {
  27516. "type": "string",
  27517. "enum": ["worktree.ready"]
  27518. },
  27519. "properties": {
  27520. "type": "object",
  27521. "properties": {
  27522. "name": {
  27523. "type": "string"
  27524. },
  27525. "branch": {
  27526. "type": "string"
  27527. }
  27528. },
  27529. "required": ["name"],
  27530. "additionalProperties": false
  27531. }
  27532. },
  27533. "required": ["id", "type", "properties"],
  27534. "additionalProperties": false
  27535. },
  27536. "EventWorktreeFailed": {
  27537. "type": "object",
  27538. "properties": {
  27539. "id": {
  27540. "type": "string",
  27541. "pattern": "^evt_"
  27542. },
  27543. "type": {
  27544. "type": "string",
  27545. "enum": ["worktree.failed"]
  27546. },
  27547. "properties": {
  27548. "type": "object",
  27549. "properties": {
  27550. "message": {
  27551. "type": "string"
  27552. }
  27553. },
  27554. "required": ["message"],
  27555. "additionalProperties": false
  27556. }
  27557. },
  27558. "required": ["id", "type", "properties"],
  27559. "additionalProperties": false
  27560. },
  27561. "EventWorkspaceReady": {
  27562. "type": "object",
  27563. "properties": {
  27564. "id": {
  27565. "type": "string",
  27566. "pattern": "^evt_"
  27567. },
  27568. "type": {
  27569. "type": "string",
  27570. "enum": ["workspace.ready"]
  27571. },
  27572. "properties": {
  27573. "type": "object",
  27574. "properties": {
  27575. "name": {
  27576. "type": "string"
  27577. }
  27578. },
  27579. "required": ["name"],
  27580. "additionalProperties": false
  27581. }
  27582. },
  27583. "required": ["id", "type", "properties"],
  27584. "additionalProperties": false
  27585. },
  27586. "EventWorkspaceFailed": {
  27587. "type": "object",
  27588. "properties": {
  27589. "id": {
  27590. "type": "string",
  27591. "pattern": "^evt_"
  27592. },
  27593. "type": {
  27594. "type": "string",
  27595. "enum": ["workspace.failed"]
  27596. },
  27597. "properties": {
  27598. "type": "object",
  27599. "properties": {
  27600. "message": {
  27601. "type": "string"
  27602. }
  27603. },
  27604. "required": ["message"],
  27605. "additionalProperties": false
  27606. }
  27607. },
  27608. "required": ["id", "type", "properties"],
  27609. "additionalProperties": false
  27610. },
  27611. "EventWorkspaceStatus": {
  27612. "type": "object",
  27613. "properties": {
  27614. "id": {
  27615. "type": "string",
  27616. "pattern": "^evt_"
  27617. },
  27618. "type": {
  27619. "type": "string",
  27620. "enum": ["workspace.status"]
  27621. },
  27622. "properties": {
  27623. "type": "object",
  27624. "properties": {
  27625. "workspaceID": {
  27626. "type": "string",
  27627. "pattern": "^wrk"
  27628. },
  27629. "status": {
  27630. "type": "string",
  27631. "enum": ["connected", "connecting", "disconnected", "error"]
  27632. }
  27633. },
  27634. "required": ["workspaceID", "status"],
  27635. "additionalProperties": false
  27636. }
  27637. },
  27638. "required": ["id", "type", "properties"],
  27639. "additionalProperties": false
  27640. },
  27641. "EventServerConnected": {
  27642. "type": "object",
  27643. "properties": {
  27644. "id": {
  27645. "type": "string",
  27646. "pattern": "^evt_"
  27647. },
  27648. "type": {
  27649. "type": "string",
  27650. "enum": ["server.connected"]
  27651. },
  27652. "properties": {
  27653. "type": "object",
  27654. "properties": {}
  27655. }
  27656. },
  27657. "required": ["id", "type", "properties"],
  27658. "additionalProperties": false
  27659. },
  27660. "EventGlobalDisposed": {
  27661. "type": "object",
  27662. "properties": {
  27663. "id": {
  27664. "type": "string",
  27665. "pattern": "^evt_"
  27666. },
  27667. "type": {
  27668. "type": "string",
  27669. "enum": ["global.disposed"]
  27670. },
  27671. "properties": {
  27672. "type": "object",
  27673. "properties": {}
  27674. }
  27675. },
  27676. "required": ["id", "type", "properties"],
  27677. "additionalProperties": false
  27678. },
  27679. "BadRequestError": {
  27680. "type": "object",
  27681. "required": ["name", "data"],
  27682. "properties": {
  27683. "name": {
  27684. "type": "string",
  27685. "enum": ["BadRequest"]
  27686. },
  27687. "data": {
  27688. "type": "object",
  27689. "required": ["message"],
  27690. "properties": {
  27691. "message": {
  27692. "type": "string"
  27693. },
  27694. "kind": {
  27695. "type": "string",
  27696. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  27697. }
  27698. }
  27699. }
  27700. }
  27701. }
  27702. }
  27703. },
  27704. "security": [],
  27705. "tags": [
  27706. {
  27707. "name": "control",
  27708. "description": "Control plane routes."
  27709. },
  27710. {
  27711. "name": "controlPlane",
  27712. "description": "Control-plane orchestration routes."
  27713. },
  27714. {
  27715. "name": "global",
  27716. "description": "Global server routes."
  27717. },
  27718. {
  27719. "name": "event",
  27720. "description": "Instance event stream route."
  27721. },
  27722. {
  27723. "name": "config",
  27724. "description": "Experimental HttpApi config routes."
  27725. },
  27726. {
  27727. "name": "experimental",
  27728. "description": "Experimental HttpApi read-only routes."
  27729. },
  27730. {
  27731. "name": "file",
  27732. "description": "Experimental HttpApi file routes."
  27733. },
  27734. {
  27735. "name": "instance",
  27736. "description": "Experimental HttpApi instance read routes."
  27737. },
  27738. {
  27739. "name": "mcp",
  27740. "description": "Experimental HttpApi MCP routes."
  27741. },
  27742. {
  27743. "name": "project",
  27744. "description": "Experimental HttpApi project routes."
  27745. },
  27746. {
  27747. "name": "projectCopy",
  27748. "description": "Project copy management routes."
  27749. },
  27750. {
  27751. "name": "pty",
  27752. "description": "Experimental HttpApi PTY routes."
  27753. },
  27754. {
  27755. "name": "question",
  27756. "description": "Question routes."
  27757. },
  27758. {
  27759. "name": "permission",
  27760. "description": "Experimental HttpApi permission routes."
  27761. },
  27762. {
  27763. "name": "provider",
  27764. "description": "Experimental HttpApi provider routes."
  27765. },
  27766. {
  27767. "name": "session",
  27768. "description": "Experimental HttpApi session routes."
  27769. },
  27770. {
  27771. "name": "sync",
  27772. "description": "Experimental HttpApi sync routes."
  27773. },
  27774. {
  27775. "name": "tui",
  27776. "description": "Experimental HttpApi TUI routes."
  27777. },
  27778. {
  27779. "name": "workspace",
  27780. "description": "Experimental HttpApi workspace routes."
  27781. },
  27782. {
  27783. "name": "opencode experimental HttpApi",
  27784. "description": "Experimental HttpApi surface for selected instance routes."
  27785. },
  27786. {
  27787. "name": "opencode experimental HttpApi",
  27788. "description": "Experimental HttpApi surface for selected instance routes."
  27789. },
  27790. {
  27791. "name": "v2",
  27792. "description": "Experimental v2 routes."
  27793. },
  27794. {
  27795. "name": "v2 messages",
  27796. "description": "Experimental v2 message routes."
  27797. },
  27798. {
  27799. "name": "v2 models",
  27800. "description": "Experimental v2 model routes."
  27801. },
  27802. {
  27803. "name": "v2 providers",
  27804. "description": "Experimental v2 provider routes."
  27805. },
  27806. {
  27807. "name": "v2 permissions",
  27808. "description": "Experimental v2 permission routes."
  27809. },
  27810. {
  27811. "name": "v2 session permissions",
  27812. "description": "Experimental v2 session permission routes."
  27813. },
  27814. {
  27815. "name": "v2 saved permissions",
  27816. "description": "Experimental v2 saved permission routes."
  27817. },
  27818. {
  27819. "name": "v2 filesystem",
  27820. "description": "Experimental v2 location-scoped filesystem routes."
  27821. },
  27822. {
  27823. "name": "v2 commands",
  27824. "description": "Experimental v2 command routes."
  27825. },
  27826. {
  27827. "name": "v2 skills",
  27828. "description": "Experimental v2 skill routes."
  27829. },
  27830. {
  27831. "name": "v2 events",
  27832. "description": "Experimental v2 event stream route."
  27833. },
  27834. {
  27835. "name": "v2 questions",
  27836. "description": "Experimental v2 question routes."
  27837. },
  27838. {
  27839. "name": "v2 session questions",
  27840. "description": "Experimental v2 session question routes."
  27841. },
  27842. {
  27843. "name": "pty",
  27844. "description": "PTY websocket route."
  27845. }
  27846. ]
  27847. }