openapi.json 821 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/console": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.console.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Active Console provider metadata",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ConsoleState"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. },
  856. "500": {
  857. "description": "InternalServerError",
  858. "content": {
  859. "application/json": {
  860. "schema": {
  861. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  868. "summary": "Get active Console provider metadata",
  869. "x-codeSamples": [
  870. {
  871. "lang": "js",
  872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  873. }
  874. ]
  875. }
  876. },
  877. "/experimental/console/orgs": {
  878. "get": {
  879. "tags": ["experimental"],
  880. "operationId": "experimental.console.listOrgs",
  881. "parameters": [
  882. {
  883. "name": "directory",
  884. "in": "query",
  885. "schema": {
  886. "type": "string"
  887. },
  888. "required": false
  889. },
  890. {
  891. "name": "workspace",
  892. "in": "query",
  893. "schema": {
  894. "type": "string"
  895. },
  896. "required": false
  897. }
  898. ],
  899. "responses": {
  900. "200": {
  901. "description": "Switchable Console orgs",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "type": "object",
  906. "properties": {
  907. "orgs": {
  908. "type": "array",
  909. "items": {
  910. "type": "object",
  911. "properties": {
  912. "accountID": {
  913. "type": "string"
  914. },
  915. "accountEmail": {
  916. "type": "string"
  917. },
  918. "accountUrl": {
  919. "type": "string"
  920. },
  921. "orgID": {
  922. "type": "string"
  923. },
  924. "orgName": {
  925. "type": "string"
  926. },
  927. "active": {
  928. "type": "boolean"
  929. }
  930. },
  931. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  932. "additionalProperties": false
  933. }
  934. }
  935. },
  936. "required": ["orgs"],
  937. "additionalProperties": false,
  938. "description": "Switchable Console orgs"
  939. }
  940. }
  941. }
  942. },
  943. "400": {
  944. "description": "Bad request",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/BadRequestError"
  949. }
  950. }
  951. }
  952. },
  953. "500": {
  954. "description": "InternalServerError",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  959. }
  960. }
  961. }
  962. }
  963. },
  964. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  965. "summary": "List switchable Console orgs",
  966. "x-codeSamples": [
  967. {
  968. "lang": "js",
  969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  970. }
  971. ]
  972. }
  973. },
  974. "/experimental/console/switch": {
  975. "post": {
  976. "tags": ["experimental"],
  977. "operationId": "experimental.console.switchOrg",
  978. "parameters": [
  979. {
  980. "name": "directory",
  981. "in": "query",
  982. "schema": {
  983. "type": "string"
  984. },
  985. "required": false
  986. },
  987. {
  988. "name": "workspace",
  989. "in": "query",
  990. "schema": {
  991. "type": "string"
  992. },
  993. "required": false
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "Switch success",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "boolean",
  1003. "description": "Switch success"
  1004. }
  1005. }
  1006. }
  1007. }
  1008. },
  1009. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1010. "summary": "Switch active Console org",
  1011. "requestBody": {
  1012. "content": {
  1013. "application/json": {
  1014. "schema": {
  1015. "type": "object",
  1016. "properties": {
  1017. "accountID": {
  1018. "type": "string"
  1019. },
  1020. "orgID": {
  1021. "type": "string"
  1022. }
  1023. },
  1024. "required": ["accountID", "orgID"],
  1025. "additionalProperties": false
  1026. }
  1027. }
  1028. }
  1029. },
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1034. }
  1035. ]
  1036. }
  1037. },
  1038. "/experimental/tool": {
  1039. "get": {
  1040. "tags": ["experimental"],
  1041. "operationId": "tool.list",
  1042. "parameters": [
  1043. {
  1044. "name": "directory",
  1045. "in": "query",
  1046. "schema": {
  1047. "type": "string"
  1048. },
  1049. "required": false
  1050. },
  1051. {
  1052. "name": "workspace",
  1053. "in": "query",
  1054. "schema": {
  1055. "type": "string"
  1056. },
  1057. "required": false
  1058. },
  1059. {
  1060. "name": "provider",
  1061. "in": "query",
  1062. "schema": {
  1063. "type": "string"
  1064. },
  1065. "required": true
  1066. },
  1067. {
  1068. "name": "model",
  1069. "in": "query",
  1070. "schema": {
  1071. "type": "string"
  1072. },
  1073. "required": true
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "Tools",
  1079. "content": {
  1080. "application/json": {
  1081. "schema": {
  1082. "$ref": "#/components/schemas/ToolList"
  1083. }
  1084. }
  1085. }
  1086. },
  1087. "400": {
  1088. "description": "BadRequest | InvalidRequestError",
  1089. "content": {
  1090. "application/json": {
  1091. "schema": {
  1092. "anyOf": [
  1093. {
  1094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1095. },
  1096. {
  1097. "$ref": "#/components/schemas/InvalidRequestError"
  1098. }
  1099. ]
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1106. "summary": "List tools",
  1107. "x-codeSamples": [
  1108. {
  1109. "lang": "js",
  1110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1111. }
  1112. ]
  1113. }
  1114. },
  1115. "/experimental/tool/ids": {
  1116. "get": {
  1117. "tags": ["experimental"],
  1118. "operationId": "tool.ids",
  1119. "parameters": [
  1120. {
  1121. "name": "directory",
  1122. "in": "query",
  1123. "schema": {
  1124. "type": "string"
  1125. },
  1126. "required": false
  1127. },
  1128. {
  1129. "name": "workspace",
  1130. "in": "query",
  1131. "schema": {
  1132. "type": "string"
  1133. },
  1134. "required": false
  1135. }
  1136. ],
  1137. "responses": {
  1138. "200": {
  1139. "description": "Tool IDs",
  1140. "content": {
  1141. "application/json": {
  1142. "schema": {
  1143. "$ref": "#/components/schemas/ToolIDs"
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "400": {
  1149. "description": "BadRequest | InvalidRequestError",
  1150. "content": {
  1151. "application/json": {
  1152. "schema": {
  1153. "anyOf": [
  1154. {
  1155. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1156. },
  1157. {
  1158. "$ref": "#/components/schemas/InvalidRequestError"
  1159. }
  1160. ]
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1167. "summary": "List tool IDs",
  1168. "x-codeSamples": [
  1169. {
  1170. "lang": "js",
  1171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1172. }
  1173. ]
  1174. }
  1175. },
  1176. "/experimental/worktree": {
  1177. "get": {
  1178. "tags": ["experimental"],
  1179. "operationId": "worktree.list",
  1180. "parameters": [
  1181. {
  1182. "name": "directory",
  1183. "in": "query",
  1184. "schema": {
  1185. "type": "string"
  1186. },
  1187. "required": false
  1188. },
  1189. {
  1190. "name": "workspace",
  1191. "in": "query",
  1192. "schema": {
  1193. "type": "string"
  1194. },
  1195. "required": false
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "List of worktree directories",
  1201. "content": {
  1202. "application/json": {
  1203. "schema": {
  1204. "type": "array",
  1205. "items": {
  1206. "type": "string"
  1207. },
  1208. "description": "List of worktree directories"
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "400": {
  1214. "description": "WorktreeError | InvalidRequestError",
  1215. "content": {
  1216. "application/json": {
  1217. "schema": {
  1218. "anyOf": [
  1219. {
  1220. "$ref": "#/components/schemas/WorktreeError"
  1221. },
  1222. {
  1223. "$ref": "#/components/schemas/InvalidRequestError"
  1224. }
  1225. ]
  1226. }
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "description": "List all sandbox worktrees for the current project.",
  1232. "summary": "List worktrees",
  1233. "x-codeSamples": [
  1234. {
  1235. "lang": "js",
  1236. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1237. }
  1238. ]
  1239. },
  1240. "post": {
  1241. "tags": ["experimental"],
  1242. "operationId": "worktree.create",
  1243. "parameters": [
  1244. {
  1245. "name": "directory",
  1246. "in": "query",
  1247. "schema": {
  1248. "type": "string"
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "workspace",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. }
  1260. ],
  1261. "responses": {
  1262. "200": {
  1263. "description": "Worktree created",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/Worktree"
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "400": {
  1273. "description": "WorktreeError | InvalidRequestError",
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/components/schemas/WorktreeError"
  1280. },
  1281. {
  1282. "$ref": "#/components/schemas/InvalidRequestError"
  1283. }
  1284. ]
  1285. }
  1286. }
  1287. }
  1288. }
  1289. },
  1290. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1291. "summary": "Create worktree",
  1292. "requestBody": {
  1293. "content": {
  1294. "application/json": {
  1295. "schema": {
  1296. "$ref": "#/components/schemas/WorktreeCreateInput"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "x-codeSamples": [
  1302. {
  1303. "lang": "js",
  1304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1305. }
  1306. ]
  1307. },
  1308. "delete": {
  1309. "tags": ["experimental"],
  1310. "operationId": "worktree.remove",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "schema": {
  1316. "type": "string"
  1317. },
  1318. "required": false
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "schema": {
  1324. "type": "string"
  1325. },
  1326. "required": false
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "Worktree removed",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "boolean",
  1336. "description": "Worktree removed"
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "400": {
  1342. "description": "WorktreeError | InvalidRequestError",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "anyOf": [
  1347. {
  1348. "$ref": "#/components/schemas/WorktreeError"
  1349. },
  1350. {
  1351. "$ref": "#/components/schemas/InvalidRequestError"
  1352. }
  1353. ]
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "description": "Remove a git worktree and delete its branch.",
  1360. "summary": "Remove worktree",
  1361. "requestBody": {
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "x-codeSamples": [
  1371. {
  1372. "lang": "js",
  1373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1374. }
  1375. ]
  1376. }
  1377. },
  1378. "/experimental/worktree/reset": {
  1379. "post": {
  1380. "tags": ["experimental"],
  1381. "operationId": "worktree.reset",
  1382. "parameters": [
  1383. {
  1384. "name": "directory",
  1385. "in": "query",
  1386. "schema": {
  1387. "type": "string"
  1388. },
  1389. "required": false
  1390. },
  1391. {
  1392. "name": "workspace",
  1393. "in": "query",
  1394. "schema": {
  1395. "type": "string"
  1396. },
  1397. "required": false
  1398. }
  1399. ],
  1400. "responses": {
  1401. "200": {
  1402. "description": "Worktree reset",
  1403. "content": {
  1404. "application/json": {
  1405. "schema": {
  1406. "type": "boolean",
  1407. "description": "Worktree reset"
  1408. }
  1409. }
  1410. }
  1411. },
  1412. "400": {
  1413. "description": "WorktreeError | InvalidRequestError",
  1414. "content": {
  1415. "application/json": {
  1416. "schema": {
  1417. "anyOf": [
  1418. {
  1419. "$ref": "#/components/schemas/WorktreeError"
  1420. },
  1421. {
  1422. "$ref": "#/components/schemas/InvalidRequestError"
  1423. }
  1424. ]
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "description": "Reset a worktree branch to the primary default branch.",
  1431. "summary": "Reset worktree",
  1432. "requestBody": {
  1433. "content": {
  1434. "application/json": {
  1435. "schema": {
  1436. "$ref": "#/components/schemas/WorktreeResetInput"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "x-codeSamples": [
  1442. {
  1443. "lang": "js",
  1444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1445. }
  1446. ]
  1447. }
  1448. },
  1449. "/experimental/session": {
  1450. "get": {
  1451. "tags": ["experimental"],
  1452. "operationId": "experimental.session.list",
  1453. "parameters": [
  1454. {
  1455. "name": "directory",
  1456. "in": "query",
  1457. "schema": {
  1458. "type": "string"
  1459. },
  1460. "required": false
  1461. },
  1462. {
  1463. "name": "workspace",
  1464. "in": "query",
  1465. "schema": {
  1466. "type": "string"
  1467. },
  1468. "required": false
  1469. },
  1470. {
  1471. "name": "roots",
  1472. "in": "query",
  1473. "schema": {
  1474. "anyOf": [
  1475. {
  1476. "type": "boolean"
  1477. },
  1478. {
  1479. "type": "string",
  1480. "enum": ["true", "false"]
  1481. }
  1482. ]
  1483. },
  1484. "required": false
  1485. },
  1486. {
  1487. "name": "start",
  1488. "in": "query",
  1489. "schema": {
  1490. "type": "number"
  1491. },
  1492. "required": false
  1493. },
  1494. {
  1495. "name": "cursor",
  1496. "in": "query",
  1497. "schema": {
  1498. "type": "number"
  1499. },
  1500. "required": false
  1501. },
  1502. {
  1503. "name": "search",
  1504. "in": "query",
  1505. "schema": {
  1506. "type": "string"
  1507. },
  1508. "required": false
  1509. },
  1510. {
  1511. "name": "limit",
  1512. "in": "query",
  1513. "schema": {
  1514. "type": "number"
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "archived",
  1520. "in": "query",
  1521. "schema": {
  1522. "anyOf": [
  1523. {
  1524. "type": "boolean"
  1525. },
  1526. {
  1527. "type": "string",
  1528. "enum": ["true", "false"]
  1529. }
  1530. ]
  1531. },
  1532. "required": false
  1533. }
  1534. ],
  1535. "responses": {
  1536. "200": {
  1537. "description": "List of sessions",
  1538. "content": {
  1539. "application/json": {
  1540. "schema": {
  1541. "type": "array",
  1542. "items": {
  1543. "$ref": "#/components/schemas/GlobalSession"
  1544. },
  1545. "description": "List of sessions"
  1546. }
  1547. }
  1548. }
  1549. },
  1550. "400": {
  1551. "description": "Bad request",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "$ref": "#/components/schemas/BadRequestError"
  1556. }
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1562. "summary": "List sessions",
  1563. "x-codeSamples": [
  1564. {
  1565. "lang": "js",
  1566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1567. }
  1568. ]
  1569. }
  1570. },
  1571. "/experimental/session/{sessionID}/background": {
  1572. "post": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.session.background",
  1575. "parameters": [
  1576. {
  1577. "name": "sessionID",
  1578. "in": "path",
  1579. "schema": {
  1580. "type": "string",
  1581. "pattern": "^ses"
  1582. },
  1583. "required": true
  1584. },
  1585. {
  1586. "name": "directory",
  1587. "in": "query",
  1588. "schema": {
  1589. "type": "string"
  1590. },
  1591. "required": false
  1592. },
  1593. {
  1594. "name": "workspace",
  1595. "in": "query",
  1596. "schema": {
  1597. "type": "string"
  1598. },
  1599. "required": false
  1600. }
  1601. ],
  1602. "responses": {
  1603. "200": {
  1604. "description": "Backgrounded subagents",
  1605. "content": {
  1606. "application/json": {
  1607. "schema": {
  1608. "type": "boolean",
  1609. "description": "Backgrounded subagents"
  1610. }
  1611. }
  1612. }
  1613. },
  1614. "400": {
  1615. "description": "BadRequest | InvalidRequestError",
  1616. "content": {
  1617. "application/json": {
  1618. "schema": {
  1619. "anyOf": [
  1620. {
  1621. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1622. },
  1623. {
  1624. "$ref": "#/components/schemas/InvalidRequestError"
  1625. }
  1626. ]
  1627. }
  1628. }
  1629. }
  1630. }
  1631. },
  1632. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1633. "summary": "Background subagents",
  1634. "x-codeSamples": [
  1635. {
  1636. "lang": "js",
  1637. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1638. }
  1639. ]
  1640. }
  1641. },
  1642. "/experimental/resource": {
  1643. "get": {
  1644. "tags": ["experimental"],
  1645. "operationId": "experimental.resource.list",
  1646. "parameters": [
  1647. {
  1648. "name": "directory",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. },
  1655. {
  1656. "name": "workspace",
  1657. "in": "query",
  1658. "schema": {
  1659. "type": "string"
  1660. },
  1661. "required": false
  1662. }
  1663. ],
  1664. "responses": {
  1665. "200": {
  1666. "description": "MCP resources",
  1667. "content": {
  1668. "application/json": {
  1669. "schema": {
  1670. "type": "object",
  1671. "additionalProperties": {
  1672. "$ref": "#/components/schemas/McpResource"
  1673. },
  1674. "description": "MCP resources"
  1675. }
  1676. }
  1677. }
  1678. },
  1679. "400": {
  1680. "description": "Bad request",
  1681. "content": {
  1682. "application/json": {
  1683. "schema": {
  1684. "$ref": "#/components/schemas/BadRequestError"
  1685. }
  1686. }
  1687. }
  1688. }
  1689. },
  1690. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1691. "summary": "Get MCP resources",
  1692. "x-codeSamples": [
  1693. {
  1694. "lang": "js",
  1695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1696. }
  1697. ]
  1698. }
  1699. },
  1700. "/find": {
  1701. "get": {
  1702. "tags": ["file"],
  1703. "operationId": "find.text",
  1704. "parameters": [
  1705. {
  1706. "name": "directory",
  1707. "in": "query",
  1708. "schema": {
  1709. "type": "string"
  1710. },
  1711. "required": false
  1712. },
  1713. {
  1714. "name": "workspace",
  1715. "in": "query",
  1716. "schema": {
  1717. "type": "string"
  1718. },
  1719. "required": false
  1720. },
  1721. {
  1722. "name": "pattern",
  1723. "in": "query",
  1724. "schema": {
  1725. "type": "string"
  1726. },
  1727. "required": true
  1728. }
  1729. ],
  1730. "responses": {
  1731. "200": {
  1732. "description": "Matches",
  1733. "content": {
  1734. "application/json": {
  1735. "schema": {
  1736. "type": "array",
  1737. "items": {
  1738. "type": "object",
  1739. "properties": {
  1740. "path": {
  1741. "type": "object",
  1742. "properties": {
  1743. "text": {
  1744. "type": "string"
  1745. }
  1746. },
  1747. "required": ["text"],
  1748. "additionalProperties": false
  1749. },
  1750. "lines": {
  1751. "type": "object",
  1752. "properties": {
  1753. "text": {
  1754. "type": "string"
  1755. }
  1756. },
  1757. "required": ["text"],
  1758. "additionalProperties": false
  1759. },
  1760. "line_number": {
  1761. "type": "integer",
  1762. "minimum": 0
  1763. },
  1764. "absolute_offset": {
  1765. "type": "integer",
  1766. "minimum": 0
  1767. },
  1768. "submatches": {
  1769. "type": "array",
  1770. "items": {
  1771. "type": "object",
  1772. "properties": {
  1773. "match": {
  1774. "type": "object",
  1775. "properties": {
  1776. "text": {
  1777. "type": "string"
  1778. }
  1779. },
  1780. "required": ["text"],
  1781. "additionalProperties": false
  1782. },
  1783. "start": {
  1784. "type": "integer",
  1785. "minimum": 0
  1786. },
  1787. "end": {
  1788. "type": "integer",
  1789. "minimum": 0
  1790. }
  1791. },
  1792. "required": ["match", "start", "end"],
  1793. "additionalProperties": false
  1794. }
  1795. }
  1796. },
  1797. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1798. "additionalProperties": false
  1799. },
  1800. "description": "Matches"
  1801. }
  1802. }
  1803. }
  1804. },
  1805. "400": {
  1806. "description": "Bad request",
  1807. "content": {
  1808. "application/json": {
  1809. "schema": {
  1810. "$ref": "#/components/schemas/BadRequestError"
  1811. }
  1812. }
  1813. }
  1814. }
  1815. },
  1816. "description": "Search for text patterns across files in the project using ripgrep.",
  1817. "summary": "Find text",
  1818. "x-codeSamples": [
  1819. {
  1820. "lang": "js",
  1821. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1822. }
  1823. ]
  1824. }
  1825. },
  1826. "/find/file": {
  1827. "get": {
  1828. "tags": ["file"],
  1829. "operationId": "find.files",
  1830. "parameters": [
  1831. {
  1832. "name": "directory",
  1833. "in": "query",
  1834. "schema": {
  1835. "type": "string"
  1836. },
  1837. "required": false
  1838. },
  1839. {
  1840. "name": "workspace",
  1841. "in": "query",
  1842. "schema": {
  1843. "type": "string"
  1844. },
  1845. "required": false
  1846. },
  1847. {
  1848. "name": "query",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": true
  1854. },
  1855. {
  1856. "name": "dirs",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string",
  1860. "enum": ["true", "false"]
  1861. },
  1862. "required": false
  1863. },
  1864. {
  1865. "name": "type",
  1866. "in": "query",
  1867. "schema": {
  1868. "type": "string",
  1869. "enum": ["file", "directory"]
  1870. },
  1871. "required": false
  1872. },
  1873. {
  1874. "name": "limit",
  1875. "in": "query",
  1876. "schema": {
  1877. "type": "integer",
  1878. "minimum": 1,
  1879. "maximum": 200
  1880. },
  1881. "required": false
  1882. }
  1883. ],
  1884. "responses": {
  1885. "200": {
  1886. "description": "File paths",
  1887. "content": {
  1888. "application/json": {
  1889. "schema": {
  1890. "type": "array",
  1891. "items": {
  1892. "type": "string"
  1893. },
  1894. "description": "File paths"
  1895. }
  1896. }
  1897. }
  1898. },
  1899. "400": {
  1900. "description": "Bad request",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/BadRequestError"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Search for files or directories by name or pattern in the project directory.",
  1911. "summary": "Find files",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/find/symbol": {
  1921. "get": {
  1922. "tags": ["file"],
  1923. "operationId": "find.symbols",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. },
  1941. {
  1942. "name": "query",
  1943. "in": "query",
  1944. "schema": {
  1945. "type": "string"
  1946. },
  1947. "required": true
  1948. }
  1949. ],
  1950. "responses": {
  1951. "200": {
  1952. "description": "Symbols",
  1953. "content": {
  1954. "application/json": {
  1955. "schema": {
  1956. "type": "array",
  1957. "items": {
  1958. "$ref": "#/components/schemas/Symbol"
  1959. },
  1960. "description": "Symbols"
  1961. }
  1962. }
  1963. }
  1964. },
  1965. "400": {
  1966. "description": "Bad request",
  1967. "content": {
  1968. "application/json": {
  1969. "schema": {
  1970. "$ref": "#/components/schemas/BadRequestError"
  1971. }
  1972. }
  1973. }
  1974. }
  1975. },
  1976. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1977. "summary": "Find symbols",
  1978. "x-codeSamples": [
  1979. {
  1980. "lang": "js",
  1981. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1982. }
  1983. ]
  1984. }
  1985. },
  1986. "/file": {
  1987. "get": {
  1988. "tags": ["file"],
  1989. "operationId": "file.list",
  1990. "parameters": [
  1991. {
  1992. "name": "directory",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "workspace",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string"
  2004. },
  2005. "required": false
  2006. },
  2007. {
  2008. "name": "path",
  2009. "in": "query",
  2010. "schema": {
  2011. "type": "string"
  2012. },
  2013. "required": true
  2014. }
  2015. ],
  2016. "responses": {
  2017. "200": {
  2018. "description": "Files and directories",
  2019. "content": {
  2020. "application/json": {
  2021. "schema": {
  2022. "type": "array",
  2023. "items": {
  2024. "$ref": "#/components/schemas/FileNode"
  2025. },
  2026. "description": "Files and directories"
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "400": {
  2032. "description": "Bad request",
  2033. "content": {
  2034. "application/json": {
  2035. "schema": {
  2036. "$ref": "#/components/schemas/BadRequestError"
  2037. }
  2038. }
  2039. }
  2040. }
  2041. },
  2042. "description": "List files and directories in a specified path.",
  2043. "summary": "List files",
  2044. "x-codeSamples": [
  2045. {
  2046. "lang": "js",
  2047. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2048. }
  2049. ]
  2050. }
  2051. },
  2052. "/file/content": {
  2053. "get": {
  2054. "tags": ["file"],
  2055. "operationId": "file.read",
  2056. "parameters": [
  2057. {
  2058. "name": "directory",
  2059. "in": "query",
  2060. "schema": {
  2061. "type": "string"
  2062. },
  2063. "required": false
  2064. },
  2065. {
  2066. "name": "workspace",
  2067. "in": "query",
  2068. "schema": {
  2069. "type": "string"
  2070. },
  2071. "required": false
  2072. },
  2073. {
  2074. "name": "path",
  2075. "in": "query",
  2076. "schema": {
  2077. "type": "string"
  2078. },
  2079. "required": true
  2080. }
  2081. ],
  2082. "responses": {
  2083. "200": {
  2084. "description": "File content",
  2085. "content": {
  2086. "application/json": {
  2087. "schema": {
  2088. "$ref": "#/components/schemas/FileContent"
  2089. }
  2090. }
  2091. }
  2092. },
  2093. "400": {
  2094. "description": "Bad request",
  2095. "content": {
  2096. "application/json": {
  2097. "schema": {
  2098. "$ref": "#/components/schemas/BadRequestError"
  2099. }
  2100. }
  2101. }
  2102. }
  2103. },
  2104. "description": "Read the content of a specified file.",
  2105. "summary": "Read file",
  2106. "x-codeSamples": [
  2107. {
  2108. "lang": "js",
  2109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2110. }
  2111. ]
  2112. }
  2113. },
  2114. "/file/status": {
  2115. "get": {
  2116. "tags": ["file"],
  2117. "operationId": "file.status",
  2118. "parameters": [
  2119. {
  2120. "name": "directory",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "workspace",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": false
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File status",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "type": "array",
  2143. "items": {
  2144. "$ref": "#/components/schemas/File"
  2145. },
  2146. "description": "File status"
  2147. }
  2148. }
  2149. }
  2150. },
  2151. "400": {
  2152. "description": "Bad request",
  2153. "content": {
  2154. "application/json": {
  2155. "schema": {
  2156. "$ref": "#/components/schemas/BadRequestError"
  2157. }
  2158. }
  2159. }
  2160. }
  2161. },
  2162. "description": "Get the git status of all files in the project.",
  2163. "summary": "Get file status",
  2164. "x-codeSamples": [
  2165. {
  2166. "lang": "js",
  2167. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2168. }
  2169. ]
  2170. }
  2171. },
  2172. "/instance/dispose": {
  2173. "post": {
  2174. "tags": ["instance"],
  2175. "operationId": "instance.dispose",
  2176. "parameters": [
  2177. {
  2178. "name": "directory",
  2179. "in": "query",
  2180. "schema": {
  2181. "type": "string"
  2182. },
  2183. "required": false
  2184. },
  2185. {
  2186. "name": "workspace",
  2187. "in": "query",
  2188. "schema": {
  2189. "type": "string"
  2190. },
  2191. "required": false
  2192. }
  2193. ],
  2194. "responses": {
  2195. "200": {
  2196. "description": "Instance disposed",
  2197. "content": {
  2198. "application/json": {
  2199. "schema": {
  2200. "type": "boolean",
  2201. "description": "Instance disposed"
  2202. }
  2203. }
  2204. }
  2205. },
  2206. "400": {
  2207. "description": "Bad request",
  2208. "content": {
  2209. "application/json": {
  2210. "schema": {
  2211. "$ref": "#/components/schemas/BadRequestError"
  2212. }
  2213. }
  2214. }
  2215. }
  2216. },
  2217. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2218. "summary": "Dispose instance",
  2219. "x-codeSamples": [
  2220. {
  2221. "lang": "js",
  2222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2223. }
  2224. ]
  2225. }
  2226. },
  2227. "/path": {
  2228. "get": {
  2229. "tags": ["instance"],
  2230. "operationId": "path.get",
  2231. "parameters": [
  2232. {
  2233. "name": "directory",
  2234. "in": "query",
  2235. "schema": {
  2236. "type": "string"
  2237. },
  2238. "required": false
  2239. },
  2240. {
  2241. "name": "workspace",
  2242. "in": "query",
  2243. "schema": {
  2244. "type": "string"
  2245. },
  2246. "required": false
  2247. }
  2248. ],
  2249. "responses": {
  2250. "200": {
  2251. "description": "Path",
  2252. "content": {
  2253. "application/json": {
  2254. "schema": {
  2255. "$ref": "#/components/schemas/Path"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2272. "summary": "Get paths",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/vcs": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "vcs.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "VCS info",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/VcsInfo"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2326. "summary": "Get VCS info",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs/status": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.status",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS status",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "type": "array",
  2364. "items": {
  2365. "$ref": "#/components/schemas/VcsFileStatus"
  2366. },
  2367. "description": "VCS status"
  2368. }
  2369. }
  2370. }
  2371. },
  2372. "400": {
  2373. "description": "Bad request",
  2374. "content": {
  2375. "application/json": {
  2376. "schema": {
  2377. "$ref": "#/components/schemas/BadRequestError"
  2378. }
  2379. }
  2380. }
  2381. }
  2382. },
  2383. "description": "Retrieve changed files in the current working tree without patches.",
  2384. "summary": "Get VCS status",
  2385. "x-codeSamples": [
  2386. {
  2387. "lang": "js",
  2388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2389. }
  2390. ]
  2391. }
  2392. },
  2393. "/vcs/diff": {
  2394. "get": {
  2395. "tags": ["instance"],
  2396. "operationId": "vcs.diff",
  2397. "parameters": [
  2398. {
  2399. "name": "directory",
  2400. "in": "query",
  2401. "schema": {
  2402. "type": "string"
  2403. },
  2404. "required": false
  2405. },
  2406. {
  2407. "name": "workspace",
  2408. "in": "query",
  2409. "schema": {
  2410. "type": "string"
  2411. },
  2412. "required": false
  2413. },
  2414. {
  2415. "name": "mode",
  2416. "in": "query",
  2417. "schema": {
  2418. "type": "string",
  2419. "enum": ["git", "branch"]
  2420. },
  2421. "required": true
  2422. },
  2423. {
  2424. "name": "context",
  2425. "in": "query",
  2426. "schema": {
  2427. "type": "integer",
  2428. "minimum": 0
  2429. },
  2430. "required": false
  2431. }
  2432. ],
  2433. "responses": {
  2434. "200": {
  2435. "description": "VCS diff",
  2436. "content": {
  2437. "application/json": {
  2438. "schema": {
  2439. "type": "array",
  2440. "items": {
  2441. "$ref": "#/components/schemas/VcsFileDiff"
  2442. },
  2443. "description": "VCS diff"
  2444. }
  2445. }
  2446. }
  2447. },
  2448. "400": {
  2449. "description": "Bad request",
  2450. "content": {
  2451. "application/json": {
  2452. "schema": {
  2453. "$ref": "#/components/schemas/BadRequestError"
  2454. }
  2455. }
  2456. }
  2457. }
  2458. },
  2459. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2460. "summary": "Get VCS diff",
  2461. "x-codeSamples": [
  2462. {
  2463. "lang": "js",
  2464. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2465. }
  2466. ]
  2467. }
  2468. },
  2469. "/vcs/diff/raw": {
  2470. "get": {
  2471. "tags": ["instance"],
  2472. "operationId": "vcs.diff.raw",
  2473. "parameters": [
  2474. {
  2475. "name": "directory",
  2476. "in": "query",
  2477. "schema": {
  2478. "type": "string"
  2479. },
  2480. "required": false
  2481. },
  2482. {
  2483. "name": "workspace",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. }
  2490. ],
  2491. "responses": {
  2492. "200": {
  2493. "description": "Raw VCS diff",
  2494. "content": {
  2495. "text/x-diff; charset=utf-8": {
  2496. "schema": {
  2497. "type": "string"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve a raw patch for current uncommitted changes.",
  2514. "summary": "Get raw VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/apply": {
  2524. "post": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.apply",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "VCS patch applied",
  2548. "content": {
  2549. "application/json": {
  2550. "schema": {
  2551. "type": "object",
  2552. "properties": {
  2553. "applied": {
  2554. "type": "boolean"
  2555. }
  2556. },
  2557. "required": ["applied"],
  2558. "additionalProperties": false,
  2559. "description": "VCS patch applied"
  2560. }
  2561. }
  2562. }
  2563. },
  2564. "400": {
  2565. "description": "VcsApplyError | InvalidRequestError",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "anyOf": [
  2570. {
  2571. "$ref": "#/components/schemas/VcsApplyError"
  2572. },
  2573. {
  2574. "$ref": "#/components/schemas/InvalidRequestError"
  2575. }
  2576. ]
  2577. }
  2578. }
  2579. }
  2580. }
  2581. },
  2582. "description": "Apply a raw patch to the current working tree.",
  2583. "summary": "Apply VCS patch",
  2584. "requestBody": {
  2585. "content": {
  2586. "application/json": {
  2587. "schema": {
  2588. "type": "object",
  2589. "properties": {
  2590. "patch": {
  2591. "type": "string"
  2592. }
  2593. },
  2594. "required": ["patch"],
  2595. "additionalProperties": false
  2596. }
  2597. }
  2598. }
  2599. },
  2600. "x-codeSamples": [
  2601. {
  2602. "lang": "js",
  2603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2604. }
  2605. ]
  2606. }
  2607. },
  2608. "/command": {
  2609. "get": {
  2610. "tags": ["instance"],
  2611. "operationId": "command.list",
  2612. "parameters": [
  2613. {
  2614. "name": "directory",
  2615. "in": "query",
  2616. "schema": {
  2617. "type": "string"
  2618. },
  2619. "required": false
  2620. },
  2621. {
  2622. "name": "workspace",
  2623. "in": "query",
  2624. "schema": {
  2625. "type": "string"
  2626. },
  2627. "required": false
  2628. }
  2629. ],
  2630. "responses": {
  2631. "200": {
  2632. "description": "List of commands",
  2633. "content": {
  2634. "application/json": {
  2635. "schema": {
  2636. "type": "array",
  2637. "items": {
  2638. "$ref": "#/components/schemas/Command"
  2639. },
  2640. "description": "List of commands"
  2641. }
  2642. }
  2643. }
  2644. },
  2645. "400": {
  2646. "description": "Bad request",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "$ref": "#/components/schemas/BadRequestError"
  2651. }
  2652. }
  2653. }
  2654. }
  2655. },
  2656. "description": "Get a list of all available commands in the OpenCode system.",
  2657. "summary": "List commands",
  2658. "x-codeSamples": [
  2659. {
  2660. "lang": "js",
  2661. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2662. }
  2663. ]
  2664. }
  2665. },
  2666. "/agent": {
  2667. "get": {
  2668. "tags": ["instance"],
  2669. "operationId": "app.agents",
  2670. "parameters": [
  2671. {
  2672. "name": "directory",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. },
  2679. {
  2680. "name": "workspace",
  2681. "in": "query",
  2682. "schema": {
  2683. "type": "string"
  2684. },
  2685. "required": false
  2686. }
  2687. ],
  2688. "responses": {
  2689. "200": {
  2690. "description": "List of agents",
  2691. "content": {
  2692. "application/json": {
  2693. "schema": {
  2694. "type": "array",
  2695. "items": {
  2696. "$ref": "#/components/schemas/Agent"
  2697. },
  2698. "description": "List of agents"
  2699. }
  2700. }
  2701. }
  2702. },
  2703. "400": {
  2704. "description": "Bad request",
  2705. "content": {
  2706. "application/json": {
  2707. "schema": {
  2708. "$ref": "#/components/schemas/BadRequestError"
  2709. }
  2710. }
  2711. }
  2712. }
  2713. },
  2714. "description": "Get a list of all available AI agents in the OpenCode system.",
  2715. "summary": "List agents",
  2716. "x-codeSamples": [
  2717. {
  2718. "lang": "js",
  2719. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2720. }
  2721. ]
  2722. }
  2723. },
  2724. "/skill": {
  2725. "get": {
  2726. "tags": ["instance"],
  2727. "operationId": "app.skills",
  2728. "parameters": [
  2729. {
  2730. "name": "directory",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. },
  2737. {
  2738. "name": "workspace",
  2739. "in": "query",
  2740. "schema": {
  2741. "type": "string"
  2742. },
  2743. "required": false
  2744. }
  2745. ],
  2746. "responses": {
  2747. "200": {
  2748. "description": "List of skills",
  2749. "content": {
  2750. "application/json": {
  2751. "schema": {
  2752. "type": "array",
  2753. "items": {
  2754. "type": "object",
  2755. "properties": {
  2756. "name": {
  2757. "type": "string"
  2758. },
  2759. "description": {
  2760. "type": "string"
  2761. },
  2762. "location": {
  2763. "type": "string"
  2764. },
  2765. "content": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["name", "location", "content"],
  2770. "additionalProperties": false
  2771. },
  2772. "description": "List of skills"
  2773. }
  2774. }
  2775. }
  2776. },
  2777. "400": {
  2778. "description": "Bad request",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "$ref": "#/components/schemas/BadRequestError"
  2783. }
  2784. }
  2785. }
  2786. }
  2787. },
  2788. "description": "Get a list of all available skills in the OpenCode system.",
  2789. "summary": "List skills",
  2790. "x-codeSamples": [
  2791. {
  2792. "lang": "js",
  2793. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2794. }
  2795. ]
  2796. }
  2797. },
  2798. "/lsp": {
  2799. "get": {
  2800. "tags": ["instance"],
  2801. "operationId": "lsp.status",
  2802. "parameters": [
  2803. {
  2804. "name": "directory",
  2805. "in": "query",
  2806. "schema": {
  2807. "type": "string"
  2808. },
  2809. "required": false
  2810. },
  2811. {
  2812. "name": "workspace",
  2813. "in": "query",
  2814. "schema": {
  2815. "type": "string"
  2816. },
  2817. "required": false
  2818. }
  2819. ],
  2820. "responses": {
  2821. "200": {
  2822. "description": "LSP server status",
  2823. "content": {
  2824. "application/json": {
  2825. "schema": {
  2826. "type": "array",
  2827. "items": {
  2828. "$ref": "#/components/schemas/LSPStatus"
  2829. },
  2830. "description": "LSP server status"
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "400": {
  2836. "description": "Bad request",
  2837. "content": {
  2838. "application/json": {
  2839. "schema": {
  2840. "$ref": "#/components/schemas/BadRequestError"
  2841. }
  2842. }
  2843. }
  2844. }
  2845. },
  2846. "description": "Get LSP server status",
  2847. "summary": "Get LSP status",
  2848. "x-codeSamples": [
  2849. {
  2850. "lang": "js",
  2851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2852. }
  2853. ]
  2854. }
  2855. },
  2856. "/formatter": {
  2857. "get": {
  2858. "tags": ["instance"],
  2859. "operationId": "formatter.status",
  2860. "parameters": [
  2861. {
  2862. "name": "directory",
  2863. "in": "query",
  2864. "schema": {
  2865. "type": "string"
  2866. },
  2867. "required": false
  2868. },
  2869. {
  2870. "name": "workspace",
  2871. "in": "query",
  2872. "schema": {
  2873. "type": "string"
  2874. },
  2875. "required": false
  2876. }
  2877. ],
  2878. "responses": {
  2879. "200": {
  2880. "description": "Formatter status",
  2881. "content": {
  2882. "application/json": {
  2883. "schema": {
  2884. "type": "array",
  2885. "items": {
  2886. "$ref": "#/components/schemas/FormatterStatus"
  2887. },
  2888. "description": "Formatter status"
  2889. }
  2890. }
  2891. }
  2892. },
  2893. "400": {
  2894. "description": "Bad request",
  2895. "content": {
  2896. "application/json": {
  2897. "schema": {
  2898. "$ref": "#/components/schemas/BadRequestError"
  2899. }
  2900. }
  2901. }
  2902. }
  2903. },
  2904. "description": "Get formatter status",
  2905. "summary": "Get formatter status",
  2906. "x-codeSamples": [
  2907. {
  2908. "lang": "js",
  2909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2910. }
  2911. ]
  2912. }
  2913. },
  2914. "/mcp": {
  2915. "get": {
  2916. "tags": ["mcp"],
  2917. "operationId": "mcp.status",
  2918. "parameters": [
  2919. {
  2920. "name": "directory",
  2921. "in": "query",
  2922. "schema": {
  2923. "type": "string"
  2924. },
  2925. "required": false
  2926. },
  2927. {
  2928. "name": "workspace",
  2929. "in": "query",
  2930. "schema": {
  2931. "type": "string"
  2932. },
  2933. "required": false
  2934. }
  2935. ],
  2936. "responses": {
  2937. "200": {
  2938. "description": "MCP server status",
  2939. "content": {
  2940. "application/json": {
  2941. "schema": {
  2942. "type": "object",
  2943. "additionalProperties": {
  2944. "$ref": "#/components/schemas/MCPStatus"
  2945. },
  2946. "description": "MCP server status"
  2947. }
  2948. }
  2949. }
  2950. },
  2951. "400": {
  2952. "description": "Bad request",
  2953. "content": {
  2954. "application/json": {
  2955. "schema": {
  2956. "$ref": "#/components/schemas/BadRequestError"
  2957. }
  2958. }
  2959. }
  2960. }
  2961. },
  2962. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2963. "summary": "Get MCP status",
  2964. "x-codeSamples": [
  2965. {
  2966. "lang": "js",
  2967. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2968. }
  2969. ]
  2970. },
  2971. "post": {
  2972. "tags": ["mcp"],
  2973. "operationId": "mcp.add",
  2974. "parameters": [
  2975. {
  2976. "name": "directory",
  2977. "in": "query",
  2978. "schema": {
  2979. "type": "string"
  2980. },
  2981. "required": false
  2982. },
  2983. {
  2984. "name": "workspace",
  2985. "in": "query",
  2986. "schema": {
  2987. "type": "string"
  2988. },
  2989. "required": false
  2990. }
  2991. ],
  2992. "responses": {
  2993. "200": {
  2994. "description": "MCP server added successfully",
  2995. "content": {
  2996. "application/json": {
  2997. "schema": {
  2998. "type": "object",
  2999. "additionalProperties": {
  3000. "$ref": "#/components/schemas/MCPStatus"
  3001. },
  3002. "description": "MCP server added successfully"
  3003. }
  3004. }
  3005. }
  3006. },
  3007. "400": {
  3008. "description": "BadRequest | InvalidRequestError",
  3009. "content": {
  3010. "application/json": {
  3011. "schema": {
  3012. "anyOf": [
  3013. {
  3014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3015. },
  3016. {
  3017. "$ref": "#/components/schemas/InvalidRequestError"
  3018. }
  3019. ]
  3020. }
  3021. }
  3022. }
  3023. }
  3024. },
  3025. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3026. "summary": "Add MCP server",
  3027. "requestBody": {
  3028. "content": {
  3029. "application/json": {
  3030. "schema": {
  3031. "type": "object",
  3032. "properties": {
  3033. "name": {
  3034. "type": "string"
  3035. },
  3036. "config": {
  3037. "anyOf": [
  3038. {
  3039. "$ref": "#/components/schemas/McpLocalConfig"
  3040. },
  3041. {
  3042. "$ref": "#/components/schemas/McpRemoteConfig"
  3043. }
  3044. ]
  3045. }
  3046. },
  3047. "required": ["name", "config"],
  3048. "additionalProperties": false
  3049. }
  3050. }
  3051. }
  3052. },
  3053. "x-codeSamples": [
  3054. {
  3055. "lang": "js",
  3056. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3057. }
  3058. ]
  3059. }
  3060. },
  3061. "/mcp/{name}/auth": {
  3062. "post": {
  3063. "tags": ["mcp"],
  3064. "operationId": "mcp.auth.start",
  3065. "parameters": [
  3066. {
  3067. "name": "name",
  3068. "in": "path",
  3069. "schema": {
  3070. "type": "string"
  3071. },
  3072. "required": true
  3073. },
  3074. {
  3075. "name": "directory",
  3076. "in": "query",
  3077. "schema": {
  3078. "type": "string"
  3079. },
  3080. "required": false
  3081. },
  3082. {
  3083. "name": "workspace",
  3084. "in": "query",
  3085. "schema": {
  3086. "type": "string"
  3087. },
  3088. "required": false
  3089. }
  3090. ],
  3091. "responses": {
  3092. "200": {
  3093. "description": "OAuth flow started",
  3094. "content": {
  3095. "application/json": {
  3096. "schema": {
  3097. "type": "object",
  3098. "properties": {
  3099. "authorizationUrl": {
  3100. "type": "string"
  3101. },
  3102. "oauthState": {
  3103. "type": "string"
  3104. }
  3105. },
  3106. "required": ["authorizationUrl", "oauthState"],
  3107. "additionalProperties": false,
  3108. "description": "OAuth flow started"
  3109. }
  3110. }
  3111. }
  3112. },
  3113. "400": {
  3114. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3115. "content": {
  3116. "application/json": {
  3117. "schema": {
  3118. "anyOf": [
  3119. {
  3120. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3121. },
  3122. {
  3123. "$ref": "#/components/schemas/InvalidRequestError"
  3124. }
  3125. ]
  3126. }
  3127. }
  3128. }
  3129. },
  3130. "404": {
  3131. "description": "McpServerNotFoundError",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/McpServerNotFoundError"
  3136. }
  3137. }
  3138. }
  3139. }
  3140. },
  3141. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3142. "summary": "Start MCP OAuth",
  3143. "x-codeSamples": [
  3144. {
  3145. "lang": "js",
  3146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3147. }
  3148. ]
  3149. },
  3150. "delete": {
  3151. "tags": ["mcp"],
  3152. "operationId": "mcp.auth.remove",
  3153. "parameters": [
  3154. {
  3155. "name": "name",
  3156. "in": "path",
  3157. "schema": {
  3158. "type": "string"
  3159. },
  3160. "required": true
  3161. },
  3162. {
  3163. "name": "directory",
  3164. "in": "query",
  3165. "schema": {
  3166. "type": "string"
  3167. },
  3168. "required": false
  3169. },
  3170. {
  3171. "name": "workspace",
  3172. "in": "query",
  3173. "schema": {
  3174. "type": "string"
  3175. },
  3176. "required": false
  3177. }
  3178. ],
  3179. "responses": {
  3180. "200": {
  3181. "description": "OAuth credentials removed",
  3182. "content": {
  3183. "application/json": {
  3184. "schema": {
  3185. "type": "object",
  3186. "properties": {
  3187. "success": {
  3188. "type": "boolean",
  3189. "enum": [true]
  3190. }
  3191. },
  3192. "required": ["success"],
  3193. "additionalProperties": false,
  3194. "description": "OAuth credentials removed"
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "400": {
  3200. "description": "Bad request",
  3201. "content": {
  3202. "application/json": {
  3203. "schema": {
  3204. "$ref": "#/components/schemas/BadRequestError"
  3205. }
  3206. }
  3207. }
  3208. },
  3209. "404": {
  3210. "description": "McpServerNotFoundError",
  3211. "content": {
  3212. "application/json": {
  3213. "schema": {
  3214. "$ref": "#/components/schemas/McpServerNotFoundError"
  3215. }
  3216. }
  3217. }
  3218. }
  3219. },
  3220. "description": "Remove OAuth credentials for an MCP server.",
  3221. "summary": "Remove MCP OAuth",
  3222. "x-codeSamples": [
  3223. {
  3224. "lang": "js",
  3225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3226. }
  3227. ]
  3228. }
  3229. },
  3230. "/mcp/{name}/auth/callback": {
  3231. "post": {
  3232. "tags": ["mcp"],
  3233. "operationId": "mcp.auth.callback",
  3234. "parameters": [
  3235. {
  3236. "name": "name",
  3237. "in": "path",
  3238. "schema": {
  3239. "type": "string"
  3240. },
  3241. "required": true
  3242. },
  3243. {
  3244. "name": "directory",
  3245. "in": "query",
  3246. "schema": {
  3247. "type": "string"
  3248. },
  3249. "required": false
  3250. },
  3251. {
  3252. "name": "workspace",
  3253. "in": "query",
  3254. "schema": {
  3255. "type": "string"
  3256. },
  3257. "required": false
  3258. }
  3259. ],
  3260. "responses": {
  3261. "200": {
  3262. "description": "OAuth authentication completed",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "$ref": "#/components/schemas/MCPStatus"
  3267. }
  3268. }
  3269. }
  3270. },
  3271. "400": {
  3272. "description": "BadRequest | InvalidRequestError",
  3273. "content": {
  3274. "application/json": {
  3275. "schema": {
  3276. "anyOf": [
  3277. {
  3278. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3279. },
  3280. {
  3281. "$ref": "#/components/schemas/InvalidRequestError"
  3282. }
  3283. ]
  3284. }
  3285. }
  3286. }
  3287. },
  3288. "404": {
  3289. "description": "McpServerNotFoundError",
  3290. "content": {
  3291. "application/json": {
  3292. "schema": {
  3293. "$ref": "#/components/schemas/McpServerNotFoundError"
  3294. }
  3295. }
  3296. }
  3297. }
  3298. },
  3299. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3300. "summary": "Complete MCP OAuth",
  3301. "requestBody": {
  3302. "content": {
  3303. "application/json": {
  3304. "schema": {
  3305. "type": "object",
  3306. "properties": {
  3307. "code": {
  3308. "type": "string"
  3309. }
  3310. },
  3311. "required": ["code"],
  3312. "additionalProperties": false
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "x-codeSamples": [
  3318. {
  3319. "lang": "js",
  3320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3321. }
  3322. ]
  3323. }
  3324. },
  3325. "/mcp/{name}/auth/authenticate": {
  3326. "post": {
  3327. "tags": ["mcp"],
  3328. "operationId": "mcp.auth.authenticate",
  3329. "parameters": [
  3330. {
  3331. "name": "name",
  3332. "in": "path",
  3333. "schema": {
  3334. "type": "string"
  3335. },
  3336. "required": true
  3337. },
  3338. {
  3339. "name": "directory",
  3340. "in": "query",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": false
  3345. },
  3346. {
  3347. "name": "workspace",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. }
  3354. ],
  3355. "responses": {
  3356. "200": {
  3357. "description": "OAuth authentication completed",
  3358. "content": {
  3359. "application/json": {
  3360. "schema": {
  3361. "$ref": "#/components/schemas/MCPStatus"
  3362. }
  3363. }
  3364. }
  3365. },
  3366. "400": {
  3367. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3368. "content": {
  3369. "application/json": {
  3370. "schema": {
  3371. "anyOf": [
  3372. {
  3373. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3374. },
  3375. {
  3376. "$ref": "#/components/schemas/InvalidRequestError"
  3377. }
  3378. ]
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "404": {
  3384. "description": "McpServerNotFoundError",
  3385. "content": {
  3386. "application/json": {
  3387. "schema": {
  3388. "$ref": "#/components/schemas/McpServerNotFoundError"
  3389. }
  3390. }
  3391. }
  3392. }
  3393. },
  3394. "description": "Start OAuth flow and wait for callback (opens browser).",
  3395. "summary": "Authenticate MCP OAuth",
  3396. "x-codeSamples": [
  3397. {
  3398. "lang": "js",
  3399. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3400. }
  3401. ]
  3402. }
  3403. },
  3404. "/mcp/{name}/connect": {
  3405. "post": {
  3406. "tags": ["mcp"],
  3407. "operationId": "mcp.connect",
  3408. "parameters": [
  3409. {
  3410. "name": "name",
  3411. "in": "path",
  3412. "schema": {
  3413. "type": "string"
  3414. },
  3415. "required": true
  3416. },
  3417. {
  3418. "name": "directory",
  3419. "in": "query",
  3420. "schema": {
  3421. "type": "string"
  3422. },
  3423. "required": false
  3424. },
  3425. {
  3426. "name": "workspace",
  3427. "in": "query",
  3428. "schema": {
  3429. "type": "string"
  3430. },
  3431. "required": false
  3432. }
  3433. ],
  3434. "responses": {
  3435. "200": {
  3436. "description": "MCP server connected successfully",
  3437. "content": {
  3438. "application/json": {
  3439. "schema": {
  3440. "type": "boolean",
  3441. "description": "MCP server connected successfully"
  3442. }
  3443. }
  3444. }
  3445. },
  3446. "400": {
  3447. "description": "Bad request",
  3448. "content": {
  3449. "application/json": {
  3450. "schema": {
  3451. "$ref": "#/components/schemas/BadRequestError"
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "404": {
  3457. "description": "McpServerNotFoundError",
  3458. "content": {
  3459. "application/json": {
  3460. "schema": {
  3461. "$ref": "#/components/schemas/McpServerNotFoundError"
  3462. }
  3463. }
  3464. }
  3465. }
  3466. },
  3467. "description": "Connect an MCP server.",
  3468. "x-codeSamples": [
  3469. {
  3470. "lang": "js",
  3471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3472. }
  3473. ]
  3474. }
  3475. },
  3476. "/mcp/{name}/disconnect": {
  3477. "post": {
  3478. "tags": ["mcp"],
  3479. "operationId": "mcp.disconnect",
  3480. "parameters": [
  3481. {
  3482. "name": "name",
  3483. "in": "path",
  3484. "schema": {
  3485. "type": "string"
  3486. },
  3487. "required": true
  3488. },
  3489. {
  3490. "name": "directory",
  3491. "in": "query",
  3492. "schema": {
  3493. "type": "string"
  3494. },
  3495. "required": false
  3496. },
  3497. {
  3498. "name": "workspace",
  3499. "in": "query",
  3500. "schema": {
  3501. "type": "string"
  3502. },
  3503. "required": false
  3504. }
  3505. ],
  3506. "responses": {
  3507. "200": {
  3508. "description": "MCP server disconnected successfully",
  3509. "content": {
  3510. "application/json": {
  3511. "schema": {
  3512. "type": "boolean",
  3513. "description": "MCP server disconnected successfully"
  3514. }
  3515. }
  3516. }
  3517. },
  3518. "400": {
  3519. "description": "Bad request",
  3520. "content": {
  3521. "application/json": {
  3522. "schema": {
  3523. "$ref": "#/components/schemas/BadRequestError"
  3524. }
  3525. }
  3526. }
  3527. },
  3528. "404": {
  3529. "description": "McpServerNotFoundError",
  3530. "content": {
  3531. "application/json": {
  3532. "schema": {
  3533. "$ref": "#/components/schemas/McpServerNotFoundError"
  3534. }
  3535. }
  3536. }
  3537. }
  3538. },
  3539. "description": "Disconnect an MCP server.",
  3540. "x-codeSamples": [
  3541. {
  3542. "lang": "js",
  3543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3544. }
  3545. ]
  3546. }
  3547. },
  3548. "/project": {
  3549. "get": {
  3550. "tags": ["project"],
  3551. "operationId": "project.list",
  3552. "parameters": [
  3553. {
  3554. "name": "directory",
  3555. "in": "query",
  3556. "schema": {
  3557. "type": "string"
  3558. },
  3559. "required": false
  3560. },
  3561. {
  3562. "name": "workspace",
  3563. "in": "query",
  3564. "schema": {
  3565. "type": "string"
  3566. },
  3567. "required": false
  3568. }
  3569. ],
  3570. "responses": {
  3571. "200": {
  3572. "description": "List of projects",
  3573. "content": {
  3574. "application/json": {
  3575. "schema": {
  3576. "type": "array",
  3577. "items": {
  3578. "$ref": "#/components/schemas/Project"
  3579. },
  3580. "description": "List of projects"
  3581. }
  3582. }
  3583. }
  3584. },
  3585. "400": {
  3586. "description": "Bad request",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/BadRequestError"
  3591. }
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "description": "Get a list of projects that have been opened with OpenCode.",
  3597. "summary": "List all projects",
  3598. "x-codeSamples": [
  3599. {
  3600. "lang": "js",
  3601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3602. }
  3603. ]
  3604. }
  3605. },
  3606. "/project/current": {
  3607. "get": {
  3608. "tags": ["project"],
  3609. "operationId": "project.current",
  3610. "parameters": [
  3611. {
  3612. "name": "directory",
  3613. "in": "query",
  3614. "schema": {
  3615. "type": "string"
  3616. },
  3617. "required": false
  3618. },
  3619. {
  3620. "name": "workspace",
  3621. "in": "query",
  3622. "schema": {
  3623. "type": "string"
  3624. },
  3625. "required": false
  3626. }
  3627. ],
  3628. "responses": {
  3629. "200": {
  3630. "description": "Current project information",
  3631. "content": {
  3632. "application/json": {
  3633. "schema": {
  3634. "$ref": "#/components/schemas/Project"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Retrieve the currently active project that OpenCode is working with.",
  3651. "summary": "Get current project",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/git/init": {
  3661. "post": {
  3662. "tags": ["project"],
  3663. "operationId": "project.initGit",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Project information after git initialization",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Create a git repository for the current project and return the refreshed project info.",
  3705. "summary": "Initialize git repository",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/{projectID}": {
  3715. "patch": {
  3716. "tags": ["project"],
  3717. "operationId": "project.update",
  3718. "parameters": [
  3719. {
  3720. "name": "projectID",
  3721. "in": "path",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": true
  3726. },
  3727. {
  3728. "name": "directory",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. },
  3735. {
  3736. "name": "workspace",
  3737. "in": "query",
  3738. "schema": {
  3739. "type": "string"
  3740. },
  3741. "required": false
  3742. }
  3743. ],
  3744. "responses": {
  3745. "200": {
  3746. "description": "Updated project information",
  3747. "content": {
  3748. "application/json": {
  3749. "schema": {
  3750. "$ref": "#/components/schemas/Project"
  3751. }
  3752. }
  3753. }
  3754. },
  3755. "400": {
  3756. "description": "BadRequest | InvalidRequestError",
  3757. "content": {
  3758. "application/json": {
  3759. "schema": {
  3760. "anyOf": [
  3761. {
  3762. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3763. },
  3764. {
  3765. "$ref": "#/components/schemas/InvalidRequestError"
  3766. }
  3767. ]
  3768. }
  3769. }
  3770. }
  3771. },
  3772. "404": {
  3773. "description": "ProjectNotFoundError",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "$ref": "#/components/schemas/ProjectNotFoundError"
  3778. }
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "description": "Update project properties such as name, icon, and commands.",
  3784. "summary": "Update project",
  3785. "requestBody": {
  3786. "content": {
  3787. "application/json": {
  3788. "schema": {
  3789. "type": "object",
  3790. "properties": {
  3791. "name": {
  3792. "type": "string"
  3793. },
  3794. "icon": {
  3795. "type": "object",
  3796. "properties": {
  3797. "url": {
  3798. "type": "string"
  3799. },
  3800. "override": {
  3801. "type": "string"
  3802. },
  3803. "color": {
  3804. "type": "string"
  3805. }
  3806. },
  3807. "additionalProperties": false
  3808. },
  3809. "commands": {
  3810. "type": "object",
  3811. "properties": {
  3812. "start": {
  3813. "type": "string",
  3814. "description": "Startup script to run when creating a new workspace (worktree)"
  3815. }
  3816. },
  3817. "additionalProperties": false
  3818. }
  3819. },
  3820. "additionalProperties": false
  3821. }
  3822. }
  3823. }
  3824. },
  3825. "x-codeSamples": [
  3826. {
  3827. "lang": "js",
  3828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3829. }
  3830. ]
  3831. }
  3832. },
  3833. "/project/{projectID}/directories": {
  3834. "get": {
  3835. "tags": ["project"],
  3836. "operationId": "project.directories",
  3837. "parameters": [
  3838. {
  3839. "name": "projectID",
  3840. "in": "path",
  3841. "schema": {
  3842. "type": "string"
  3843. },
  3844. "required": true
  3845. },
  3846. {
  3847. "name": "directory",
  3848. "in": "query",
  3849. "schema": {
  3850. "type": "string"
  3851. },
  3852. "required": false
  3853. },
  3854. {
  3855. "name": "workspace",
  3856. "in": "query",
  3857. "schema": {
  3858. "type": "string"
  3859. },
  3860. "required": false
  3861. }
  3862. ],
  3863. "responses": {
  3864. "200": {
  3865. "description": "Project directories",
  3866. "content": {
  3867. "application/json": {
  3868. "schema": {
  3869. "$ref": "#/components/schemas/ProjectDirectories"
  3870. }
  3871. }
  3872. }
  3873. },
  3874. "400": {
  3875. "description": "Bad request",
  3876. "content": {
  3877. "application/json": {
  3878. "schema": {
  3879. "$ref": "#/components/schemas/BadRequestError"
  3880. }
  3881. }
  3882. }
  3883. }
  3884. },
  3885. "description": "List known local absolute directories for a project.",
  3886. "summary": "List project directories",
  3887. "x-codeSamples": [
  3888. {
  3889. "lang": "js",
  3890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3891. }
  3892. ]
  3893. }
  3894. },
  3895. "/experimental/project/{projectID}/copy": {
  3896. "post": {
  3897. "tags": ["projectCopy"],
  3898. "operationId": "experimental.projectCopy.create",
  3899. "parameters": [
  3900. {
  3901. "name": "projectID",
  3902. "in": "path",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": true
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project copy created",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectCopyCopy"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "ProjectCopyError | InvalidRequestError",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "anyOf": [
  3934. {
  3935. "$ref": "#/components/schemas/ProjectCopyError"
  3936. },
  3937. {
  3938. "$ref": "#/components/schemas/InvalidRequestError"
  3939. }
  3940. ]
  3941. }
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "description": "Create a local physical copy of a project using the selected strategy.",
  3947. "summary": "Create project copy",
  3948. "requestBody": {
  3949. "content": {
  3950. "application/json": {
  3951. "schema": {
  3952. "type": "object",
  3953. "properties": {
  3954. "strategy": {
  3955. "type": "string",
  3956. "enum": ["git_worktree"]
  3957. },
  3958. "directory": {
  3959. "type": "string"
  3960. },
  3961. "name": {
  3962. "type": "string"
  3963. },
  3964. "context": {
  3965. "type": "string"
  3966. }
  3967. },
  3968. "required": ["strategy", "directory"],
  3969. "additionalProperties": false
  3970. }
  3971. }
  3972. }
  3973. },
  3974. "x-codeSamples": [
  3975. {
  3976. "lang": "js",
  3977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3978. }
  3979. ]
  3980. },
  3981. "delete": {
  3982. "tags": ["projectCopy"],
  3983. "operationId": "experimental.projectCopy.remove",
  3984. "parameters": [
  3985. {
  3986. "name": "projectID",
  3987. "in": "path",
  3988. "schema": {
  3989. "type": "string"
  3990. },
  3991. "required": true
  3992. },
  3993. {
  3994. "name": "workspace",
  3995. "in": "query",
  3996. "schema": {
  3997. "type": "string"
  3998. },
  3999. "required": false
  4000. }
  4001. ],
  4002. "responses": {
  4003. "204": {
  4004. "description": "Project copy removed"
  4005. },
  4006. "400": {
  4007. "description": "ProjectCopyError | InvalidRequestError",
  4008. "content": {
  4009. "application/json": {
  4010. "schema": {
  4011. "anyOf": [
  4012. {
  4013. "$ref": "#/components/schemas/ProjectCopyError"
  4014. },
  4015. {
  4016. "$ref": "#/components/schemas/InvalidRequestError"
  4017. }
  4018. ]
  4019. }
  4020. }
  4021. }
  4022. }
  4023. },
  4024. "description": "Remove a local physical copy of a project using the selected strategy.",
  4025. "summary": "Remove project copy",
  4026. "requestBody": {
  4027. "content": {
  4028. "application/json": {
  4029. "schema": {
  4030. "type": "object",
  4031. "properties": {
  4032. "directory": {
  4033. "type": "string"
  4034. },
  4035. "force": {
  4036. "type": "boolean"
  4037. }
  4038. },
  4039. "required": ["directory", "force"],
  4040. "additionalProperties": false
  4041. }
  4042. }
  4043. }
  4044. },
  4045. "x-codeSamples": [
  4046. {
  4047. "lang": "js",
  4048. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  4049. }
  4050. ]
  4051. }
  4052. },
  4053. "/experimental/project/{projectID}/copy/refresh": {
  4054. "post": {
  4055. "tags": ["projectCopy"],
  4056. "operationId": "experimental.projectCopy.refresh",
  4057. "parameters": [
  4058. {
  4059. "name": "projectID",
  4060. "in": "path",
  4061. "schema": {
  4062. "type": "string"
  4063. },
  4064. "required": true
  4065. },
  4066. {
  4067. "name": "directory",
  4068. "in": "query",
  4069. "schema": {
  4070. "type": "string"
  4071. },
  4072. "required": false
  4073. },
  4074. {
  4075. "name": "workspace",
  4076. "in": "query",
  4077. "schema": {
  4078. "type": "string"
  4079. },
  4080. "required": false
  4081. }
  4082. ],
  4083. "responses": {
  4084. "204": {
  4085. "description": "Project copies refreshed"
  4086. },
  4087. "400": {
  4088. "description": "ProjectCopyError | InvalidRequestError",
  4089. "content": {
  4090. "application/json": {
  4091. "schema": {
  4092. "anyOf": [
  4093. {
  4094. "$ref": "#/components/schemas/ProjectCopyError"
  4095. },
  4096. {
  4097. "$ref": "#/components/schemas/InvalidRequestError"
  4098. }
  4099. ]
  4100. }
  4101. }
  4102. }
  4103. }
  4104. },
  4105. "description": "Discover local project copies using one or all configured strategies.",
  4106. "summary": "Refresh project copies",
  4107. "x-codeSamples": [
  4108. {
  4109. "lang": "js",
  4110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  4111. }
  4112. ]
  4113. }
  4114. },
  4115. "/pty/shells": {
  4116. "get": {
  4117. "tags": ["pty"],
  4118. "operationId": "pty.shells",
  4119. "parameters": [
  4120. {
  4121. "name": "directory",
  4122. "in": "query",
  4123. "schema": {
  4124. "type": "string"
  4125. },
  4126. "required": false
  4127. },
  4128. {
  4129. "name": "workspace",
  4130. "in": "query",
  4131. "schema": {
  4132. "type": "string"
  4133. },
  4134. "required": false
  4135. }
  4136. ],
  4137. "responses": {
  4138. "200": {
  4139. "description": "List of shells",
  4140. "content": {
  4141. "application/json": {
  4142. "schema": {
  4143. "type": "array",
  4144. "items": {
  4145. "type": "object",
  4146. "properties": {
  4147. "path": {
  4148. "type": "string"
  4149. },
  4150. "name": {
  4151. "type": "string"
  4152. },
  4153. "acceptable": {
  4154. "type": "boolean"
  4155. }
  4156. },
  4157. "required": ["path", "name", "acceptable"],
  4158. "additionalProperties": false
  4159. },
  4160. "description": "List of shells"
  4161. }
  4162. }
  4163. }
  4164. },
  4165. "400": {
  4166. "description": "Bad request",
  4167. "content": {
  4168. "application/json": {
  4169. "schema": {
  4170. "$ref": "#/components/schemas/BadRequestError"
  4171. }
  4172. }
  4173. }
  4174. }
  4175. },
  4176. "description": "Get a list of available shells on the system.",
  4177. "summary": "List available shells",
  4178. "x-codeSamples": [
  4179. {
  4180. "lang": "js",
  4181. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4182. }
  4183. ]
  4184. }
  4185. },
  4186. "/pty": {
  4187. "get": {
  4188. "tags": ["pty"],
  4189. "operationId": "pty.list",
  4190. "parameters": [
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "List of sessions",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "type": "array",
  4215. "items": {
  4216. "$ref": "#/components/schemas/Pty"
  4217. },
  4218. "description": "List of sessions"
  4219. }
  4220. }
  4221. }
  4222. },
  4223. "400": {
  4224. "description": "Bad request",
  4225. "content": {
  4226. "application/json": {
  4227. "schema": {
  4228. "$ref": "#/components/schemas/BadRequestError"
  4229. }
  4230. }
  4231. }
  4232. }
  4233. },
  4234. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4235. "summary": "List PTY sessions",
  4236. "x-codeSamples": [
  4237. {
  4238. "lang": "js",
  4239. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4240. }
  4241. ]
  4242. },
  4243. "post": {
  4244. "tags": ["pty"],
  4245. "operationId": "pty.create",
  4246. "parameters": [
  4247. {
  4248. "name": "directory",
  4249. "in": "query",
  4250. "schema": {
  4251. "type": "string"
  4252. },
  4253. "required": false
  4254. },
  4255. {
  4256. "name": "workspace",
  4257. "in": "query",
  4258. "schema": {
  4259. "type": "string"
  4260. },
  4261. "required": false
  4262. }
  4263. ],
  4264. "responses": {
  4265. "200": {
  4266. "description": "Created session",
  4267. "content": {
  4268. "application/json": {
  4269. "schema": {
  4270. "$ref": "#/components/schemas/Pty"
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "400": {
  4276. "description": "BadRequest | InvalidRequestError",
  4277. "content": {
  4278. "application/json": {
  4279. "schema": {
  4280. "anyOf": [
  4281. {
  4282. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4283. },
  4284. {
  4285. "$ref": "#/components/schemas/InvalidRequestError"
  4286. }
  4287. ]
  4288. }
  4289. }
  4290. }
  4291. }
  4292. },
  4293. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4294. "summary": "Create PTY session",
  4295. "requestBody": {
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "object",
  4300. "properties": {
  4301. "command": {
  4302. "type": "string"
  4303. },
  4304. "args": {
  4305. "type": "array",
  4306. "items": {
  4307. "type": "string"
  4308. }
  4309. },
  4310. "cwd": {
  4311. "type": "string"
  4312. },
  4313. "title": {
  4314. "type": "string"
  4315. },
  4316. "env": {
  4317. "type": "object",
  4318. "additionalProperties": {
  4319. "type": "string"
  4320. }
  4321. }
  4322. },
  4323. "additionalProperties": false
  4324. }
  4325. }
  4326. }
  4327. },
  4328. "x-codeSamples": [
  4329. {
  4330. "lang": "js",
  4331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4332. }
  4333. ]
  4334. }
  4335. },
  4336. "/pty/{ptyID}": {
  4337. "get": {
  4338. "tags": ["pty"],
  4339. "operationId": "pty.get",
  4340. "parameters": [
  4341. {
  4342. "name": "ptyID",
  4343. "in": "path",
  4344. "schema": {
  4345. "type": "string",
  4346. "pattern": "^pty"
  4347. },
  4348. "required": true
  4349. },
  4350. {
  4351. "name": "directory",
  4352. "in": "query",
  4353. "schema": {
  4354. "type": "string"
  4355. },
  4356. "required": false
  4357. },
  4358. {
  4359. "name": "workspace",
  4360. "in": "query",
  4361. "schema": {
  4362. "type": "string"
  4363. },
  4364. "required": false
  4365. }
  4366. ],
  4367. "responses": {
  4368. "200": {
  4369. "description": "Session info",
  4370. "content": {
  4371. "application/json": {
  4372. "schema": {
  4373. "$ref": "#/components/schemas/Pty"
  4374. }
  4375. }
  4376. }
  4377. },
  4378. "400": {
  4379. "description": "Bad request",
  4380. "content": {
  4381. "application/json": {
  4382. "schema": {
  4383. "$ref": "#/components/schemas/BadRequestError"
  4384. }
  4385. }
  4386. }
  4387. },
  4388. "404": {
  4389. "description": "PtyNotFoundError",
  4390. "content": {
  4391. "application/json": {
  4392. "schema": {
  4393. "$ref": "#/components/schemas/PtyNotFoundError"
  4394. }
  4395. }
  4396. }
  4397. }
  4398. },
  4399. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4400. "summary": "Get PTY session",
  4401. "x-codeSamples": [
  4402. {
  4403. "lang": "js",
  4404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4405. }
  4406. ]
  4407. },
  4408. "put": {
  4409. "tags": ["pty"],
  4410. "operationId": "pty.update",
  4411. "parameters": [
  4412. {
  4413. "name": "ptyID",
  4414. "in": "path",
  4415. "schema": {
  4416. "type": "string",
  4417. "pattern": "^pty"
  4418. },
  4419. "required": true
  4420. },
  4421. {
  4422. "name": "directory",
  4423. "in": "query",
  4424. "schema": {
  4425. "type": "string"
  4426. },
  4427. "required": false
  4428. },
  4429. {
  4430. "name": "workspace",
  4431. "in": "query",
  4432. "schema": {
  4433. "type": "string"
  4434. },
  4435. "required": false
  4436. }
  4437. ],
  4438. "responses": {
  4439. "200": {
  4440. "description": "Updated session",
  4441. "content": {
  4442. "application/json": {
  4443. "schema": {
  4444. "$ref": "#/components/schemas/Pty"
  4445. }
  4446. }
  4447. }
  4448. },
  4449. "400": {
  4450. "description": "BadRequest | InvalidRequestError",
  4451. "content": {
  4452. "application/json": {
  4453. "schema": {
  4454. "anyOf": [
  4455. {
  4456. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4457. },
  4458. {
  4459. "$ref": "#/components/schemas/InvalidRequestError"
  4460. }
  4461. ]
  4462. }
  4463. }
  4464. }
  4465. },
  4466. "404": {
  4467. "description": "PtyNotFoundError",
  4468. "content": {
  4469. "application/json": {
  4470. "schema": {
  4471. "$ref": "#/components/schemas/PtyNotFoundError"
  4472. }
  4473. }
  4474. }
  4475. }
  4476. },
  4477. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4478. "summary": "Update PTY session",
  4479. "requestBody": {
  4480. "content": {
  4481. "application/json": {
  4482. "schema": {
  4483. "type": "object",
  4484. "properties": {
  4485. "title": {
  4486. "type": "string"
  4487. },
  4488. "size": {
  4489. "type": "object",
  4490. "properties": {
  4491. "rows": {
  4492. "type": "integer",
  4493. "exclusiveMinimum": 0
  4494. },
  4495. "cols": {
  4496. "type": "integer",
  4497. "exclusiveMinimum": 0
  4498. }
  4499. },
  4500. "required": ["rows", "cols"],
  4501. "additionalProperties": false
  4502. }
  4503. },
  4504. "additionalProperties": false
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "x-codeSamples": [
  4510. {
  4511. "lang": "js",
  4512. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4513. }
  4514. ]
  4515. },
  4516. "delete": {
  4517. "tags": ["pty"],
  4518. "operationId": "pty.remove",
  4519. "parameters": [
  4520. {
  4521. "name": "ptyID",
  4522. "in": "path",
  4523. "schema": {
  4524. "type": "string",
  4525. "pattern": "^pty"
  4526. },
  4527. "required": true
  4528. },
  4529. {
  4530. "name": "directory",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. },
  4537. {
  4538. "name": "workspace",
  4539. "in": "query",
  4540. "schema": {
  4541. "type": "string"
  4542. },
  4543. "required": false
  4544. }
  4545. ],
  4546. "responses": {
  4547. "200": {
  4548. "description": "Session removed",
  4549. "content": {
  4550. "application/json": {
  4551. "schema": {
  4552. "type": "boolean",
  4553. "description": "Session removed"
  4554. }
  4555. }
  4556. }
  4557. },
  4558. "400": {
  4559. "description": "Bad request",
  4560. "content": {
  4561. "application/json": {
  4562. "schema": {
  4563. "$ref": "#/components/schemas/BadRequestError"
  4564. }
  4565. }
  4566. }
  4567. },
  4568. "404": {
  4569. "description": "PtyNotFoundError",
  4570. "content": {
  4571. "application/json": {
  4572. "schema": {
  4573. "$ref": "#/components/schemas/PtyNotFoundError"
  4574. }
  4575. }
  4576. }
  4577. }
  4578. },
  4579. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4580. "summary": "Remove PTY session",
  4581. "x-codeSamples": [
  4582. {
  4583. "lang": "js",
  4584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4585. }
  4586. ]
  4587. }
  4588. },
  4589. "/pty/{ptyID}/connect-token": {
  4590. "post": {
  4591. "tags": ["pty"],
  4592. "operationId": "pty.connectToken",
  4593. "parameters": [
  4594. {
  4595. "name": "ptyID",
  4596. "in": "path",
  4597. "schema": {
  4598. "type": "string",
  4599. "pattern": "^pty"
  4600. },
  4601. "required": true
  4602. },
  4603. {
  4604. "name": "directory",
  4605. "in": "query",
  4606. "schema": {
  4607. "type": "string"
  4608. },
  4609. "required": false
  4610. },
  4611. {
  4612. "name": "workspace",
  4613. "in": "query",
  4614. "schema": {
  4615. "type": "string"
  4616. },
  4617. "required": false
  4618. }
  4619. ],
  4620. "responses": {
  4621. "200": {
  4622. "description": "WebSocket connect token",
  4623. "content": {
  4624. "application/json": {
  4625. "schema": {
  4626. "type": "object",
  4627. "properties": {
  4628. "ticket": {
  4629. "type": "string"
  4630. },
  4631. "expires_in": {
  4632. "type": "integer",
  4633. "exclusiveMinimum": 0
  4634. }
  4635. },
  4636. "required": ["ticket", "expires_in"],
  4637. "additionalProperties": false,
  4638. "description": "WebSocket connect token"
  4639. }
  4640. }
  4641. }
  4642. },
  4643. "400": {
  4644. "description": "Bad request",
  4645. "content": {
  4646. "application/json": {
  4647. "schema": {
  4648. "$ref": "#/components/schemas/BadRequestError"
  4649. }
  4650. }
  4651. }
  4652. },
  4653. "403": {
  4654. "description": "PtyForbiddenError",
  4655. "content": {
  4656. "application/json": {
  4657. "schema": {
  4658. "$ref": "#/components/schemas/PtyForbiddenError"
  4659. }
  4660. }
  4661. }
  4662. },
  4663. "404": {
  4664. "description": "PtyNotFoundError",
  4665. "content": {
  4666. "application/json": {
  4667. "schema": {
  4668. "$ref": "#/components/schemas/PtyNotFoundError"
  4669. }
  4670. }
  4671. }
  4672. }
  4673. },
  4674. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4675. "summary": "Create PTY WebSocket token",
  4676. "x-codeSamples": [
  4677. {
  4678. "lang": "js",
  4679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4680. }
  4681. ]
  4682. }
  4683. },
  4684. "/question": {
  4685. "get": {
  4686. "tags": ["question"],
  4687. "operationId": "question.list",
  4688. "parameters": [
  4689. {
  4690. "name": "directory",
  4691. "in": "query",
  4692. "schema": {
  4693. "type": "string"
  4694. },
  4695. "required": false
  4696. },
  4697. {
  4698. "name": "workspace",
  4699. "in": "query",
  4700. "schema": {
  4701. "type": "string"
  4702. },
  4703. "required": false
  4704. }
  4705. ],
  4706. "responses": {
  4707. "200": {
  4708. "description": "List of pending questions",
  4709. "content": {
  4710. "application/json": {
  4711. "schema": {
  4712. "type": "array",
  4713. "items": {
  4714. "$ref": "#/components/schemas/QuestionRequest"
  4715. },
  4716. "description": "List of pending questions"
  4717. }
  4718. }
  4719. }
  4720. },
  4721. "400": {
  4722. "description": "Bad request",
  4723. "content": {
  4724. "application/json": {
  4725. "schema": {
  4726. "$ref": "#/components/schemas/BadRequestError"
  4727. }
  4728. }
  4729. }
  4730. }
  4731. },
  4732. "description": "Get all pending question requests across all sessions.",
  4733. "summary": "List pending questions",
  4734. "x-codeSamples": [
  4735. {
  4736. "lang": "js",
  4737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4738. }
  4739. ]
  4740. }
  4741. },
  4742. "/question/{requestID}/reply": {
  4743. "post": {
  4744. "tags": ["question"],
  4745. "operationId": "question.reply",
  4746. "parameters": [
  4747. {
  4748. "name": "requestID",
  4749. "in": "path",
  4750. "schema": {
  4751. "type": "string",
  4752. "pattern": "^que"
  4753. },
  4754. "required": true
  4755. },
  4756. {
  4757. "name": "directory",
  4758. "in": "query",
  4759. "schema": {
  4760. "type": "string"
  4761. },
  4762. "required": false
  4763. },
  4764. {
  4765. "name": "workspace",
  4766. "in": "query",
  4767. "schema": {
  4768. "type": "string"
  4769. },
  4770. "required": false
  4771. }
  4772. ],
  4773. "responses": {
  4774. "200": {
  4775. "description": "Question answered successfully",
  4776. "content": {
  4777. "application/json": {
  4778. "schema": {
  4779. "type": "boolean",
  4780. "description": "Question answered successfully"
  4781. }
  4782. }
  4783. }
  4784. },
  4785. "400": {
  4786. "description": "BadRequest | InvalidRequestError",
  4787. "content": {
  4788. "application/json": {
  4789. "schema": {
  4790. "anyOf": [
  4791. {
  4792. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4793. },
  4794. {
  4795. "$ref": "#/components/schemas/InvalidRequestError"
  4796. }
  4797. ]
  4798. }
  4799. }
  4800. }
  4801. },
  4802. "404": {
  4803. "description": "QuestionNotFoundError",
  4804. "content": {
  4805. "application/json": {
  4806. "schema": {
  4807. "$ref": "#/components/schemas/QuestionNotFoundError"
  4808. }
  4809. }
  4810. }
  4811. }
  4812. },
  4813. "description": "Provide answers to a question request from the AI assistant.",
  4814. "summary": "Reply to question request",
  4815. "requestBody": {
  4816. "content": {
  4817. "application/json": {
  4818. "schema": {
  4819. "type": "object",
  4820. "properties": {
  4821. "answers": {
  4822. "type": "array",
  4823. "items": {
  4824. "$ref": "#/components/schemas/QuestionAnswer"
  4825. },
  4826. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4827. }
  4828. },
  4829. "required": ["answers"],
  4830. "additionalProperties": false
  4831. }
  4832. }
  4833. }
  4834. },
  4835. "x-codeSamples": [
  4836. {
  4837. "lang": "js",
  4838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4839. }
  4840. ]
  4841. }
  4842. },
  4843. "/question/{requestID}/reject": {
  4844. "post": {
  4845. "tags": ["question"],
  4846. "operationId": "question.reject",
  4847. "parameters": [
  4848. {
  4849. "name": "requestID",
  4850. "in": "path",
  4851. "schema": {
  4852. "type": "string",
  4853. "pattern": "^que"
  4854. },
  4855. "required": true
  4856. },
  4857. {
  4858. "name": "directory",
  4859. "in": "query",
  4860. "schema": {
  4861. "type": "string"
  4862. },
  4863. "required": false
  4864. },
  4865. {
  4866. "name": "workspace",
  4867. "in": "query",
  4868. "schema": {
  4869. "type": "string"
  4870. },
  4871. "required": false
  4872. }
  4873. ],
  4874. "responses": {
  4875. "200": {
  4876. "description": "Question rejected successfully",
  4877. "content": {
  4878. "application/json": {
  4879. "schema": {
  4880. "type": "boolean",
  4881. "description": "Question rejected successfully"
  4882. }
  4883. }
  4884. }
  4885. },
  4886. "400": {
  4887. "description": "BadRequest | InvalidRequestError",
  4888. "content": {
  4889. "application/json": {
  4890. "schema": {
  4891. "anyOf": [
  4892. {
  4893. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4894. },
  4895. {
  4896. "$ref": "#/components/schemas/InvalidRequestError"
  4897. }
  4898. ]
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "404": {
  4904. "description": "QuestionNotFoundError",
  4905. "content": {
  4906. "application/json": {
  4907. "schema": {
  4908. "$ref": "#/components/schemas/QuestionNotFoundError"
  4909. }
  4910. }
  4911. }
  4912. }
  4913. },
  4914. "description": "Reject a question request from the AI assistant.",
  4915. "summary": "Reject question request",
  4916. "x-codeSamples": [
  4917. {
  4918. "lang": "js",
  4919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4920. }
  4921. ]
  4922. }
  4923. },
  4924. "/permission": {
  4925. "get": {
  4926. "tags": ["permission"],
  4927. "operationId": "permission.list",
  4928. "parameters": [
  4929. {
  4930. "name": "directory",
  4931. "in": "query",
  4932. "schema": {
  4933. "type": "string"
  4934. },
  4935. "required": false
  4936. },
  4937. {
  4938. "name": "workspace",
  4939. "in": "query",
  4940. "schema": {
  4941. "type": "string"
  4942. },
  4943. "required": false
  4944. }
  4945. ],
  4946. "responses": {
  4947. "200": {
  4948. "description": "List of pending permissions",
  4949. "content": {
  4950. "application/json": {
  4951. "schema": {
  4952. "type": "array",
  4953. "items": {
  4954. "$ref": "#/components/schemas/PermissionRequest"
  4955. },
  4956. "description": "List of pending permissions"
  4957. }
  4958. }
  4959. }
  4960. },
  4961. "400": {
  4962. "description": "Bad request",
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "$ref": "#/components/schemas/BadRequestError"
  4967. }
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "description": "Get all pending permission requests across all sessions.",
  4973. "summary": "List pending permissions",
  4974. "x-codeSamples": [
  4975. {
  4976. "lang": "js",
  4977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4978. }
  4979. ]
  4980. }
  4981. },
  4982. "/permission/{requestID}/reply": {
  4983. "post": {
  4984. "tags": ["permission"],
  4985. "operationId": "permission.reply",
  4986. "parameters": [
  4987. {
  4988. "name": "requestID",
  4989. "in": "path",
  4990. "schema": {
  4991. "type": "string",
  4992. "pattern": "^per"
  4993. },
  4994. "required": true
  4995. },
  4996. {
  4997. "name": "directory",
  4998. "in": "query",
  4999. "schema": {
  5000. "type": "string"
  5001. },
  5002. "required": false
  5003. },
  5004. {
  5005. "name": "workspace",
  5006. "in": "query",
  5007. "schema": {
  5008. "type": "string"
  5009. },
  5010. "required": false
  5011. }
  5012. ],
  5013. "responses": {
  5014. "200": {
  5015. "description": "Permission processed successfully",
  5016. "content": {
  5017. "application/json": {
  5018. "schema": {
  5019. "type": "boolean",
  5020. "description": "Permission processed successfully"
  5021. }
  5022. }
  5023. }
  5024. },
  5025. "400": {
  5026. "description": "BadRequest | InvalidRequestError",
  5027. "content": {
  5028. "application/json": {
  5029. "schema": {
  5030. "anyOf": [
  5031. {
  5032. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5033. },
  5034. {
  5035. "$ref": "#/components/schemas/InvalidRequestError"
  5036. }
  5037. ]
  5038. }
  5039. }
  5040. }
  5041. },
  5042. "404": {
  5043. "description": "PermissionNotFoundError",
  5044. "content": {
  5045. "application/json": {
  5046. "schema": {
  5047. "$ref": "#/components/schemas/PermissionNotFoundError"
  5048. }
  5049. }
  5050. }
  5051. }
  5052. },
  5053. "description": "Approve or deny a permission request from the AI assistant.",
  5054. "summary": "Respond to permission request",
  5055. "requestBody": {
  5056. "content": {
  5057. "application/json": {
  5058. "schema": {
  5059. "type": "object",
  5060. "properties": {
  5061. "reply": {
  5062. "type": "string",
  5063. "enum": ["once", "always", "reject"]
  5064. },
  5065. "message": {
  5066. "type": "string"
  5067. }
  5068. },
  5069. "required": ["reply"],
  5070. "additionalProperties": false
  5071. }
  5072. }
  5073. }
  5074. },
  5075. "x-codeSamples": [
  5076. {
  5077. "lang": "js",
  5078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  5079. }
  5080. ]
  5081. }
  5082. },
  5083. "/provider": {
  5084. "get": {
  5085. "tags": ["provider"],
  5086. "operationId": "provider.list",
  5087. "parameters": [
  5088. {
  5089. "name": "directory",
  5090. "in": "query",
  5091. "schema": {
  5092. "type": "string"
  5093. },
  5094. "required": false
  5095. },
  5096. {
  5097. "name": "workspace",
  5098. "in": "query",
  5099. "schema": {
  5100. "type": "string"
  5101. },
  5102. "required": false
  5103. }
  5104. ],
  5105. "responses": {
  5106. "200": {
  5107. "description": "List of providers",
  5108. "content": {
  5109. "application/json": {
  5110. "schema": {
  5111. "type": "object",
  5112. "properties": {
  5113. "all": {
  5114. "type": "array",
  5115. "items": {
  5116. "$ref": "#/components/schemas/Provider"
  5117. }
  5118. },
  5119. "default": {
  5120. "type": "object",
  5121. "additionalProperties": {
  5122. "type": "string"
  5123. }
  5124. },
  5125. "connected": {
  5126. "type": "array",
  5127. "items": {
  5128. "type": "string"
  5129. }
  5130. }
  5131. },
  5132. "required": ["all", "default", "connected"],
  5133. "additionalProperties": false,
  5134. "description": "List of providers"
  5135. }
  5136. }
  5137. }
  5138. },
  5139. "400": {
  5140. "description": "Bad request",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/BadRequestError"
  5145. }
  5146. }
  5147. }
  5148. }
  5149. },
  5150. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5151. "summary": "List providers",
  5152. "x-codeSamples": [
  5153. {
  5154. "lang": "js",
  5155. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5156. }
  5157. ]
  5158. }
  5159. },
  5160. "/provider/auth": {
  5161. "get": {
  5162. "tags": ["provider"],
  5163. "operationId": "provider.auth",
  5164. "parameters": [
  5165. {
  5166. "name": "directory",
  5167. "in": "query",
  5168. "schema": {
  5169. "type": "string"
  5170. },
  5171. "required": false
  5172. },
  5173. {
  5174. "name": "workspace",
  5175. "in": "query",
  5176. "schema": {
  5177. "type": "string"
  5178. },
  5179. "required": false
  5180. }
  5181. ],
  5182. "responses": {
  5183. "200": {
  5184. "description": "Provider auth methods",
  5185. "content": {
  5186. "application/json": {
  5187. "schema": {
  5188. "type": "object",
  5189. "additionalProperties": {
  5190. "type": "array",
  5191. "items": {
  5192. "$ref": "#/components/schemas/ProviderAuthMethod"
  5193. }
  5194. },
  5195. "description": "Provider auth methods"
  5196. }
  5197. }
  5198. }
  5199. },
  5200. "400": {
  5201. "description": "Bad request",
  5202. "content": {
  5203. "application/json": {
  5204. "schema": {
  5205. "$ref": "#/components/schemas/BadRequestError"
  5206. }
  5207. }
  5208. }
  5209. }
  5210. },
  5211. "description": "Retrieve available authentication methods for all AI providers.",
  5212. "summary": "Get provider auth methods",
  5213. "x-codeSamples": [
  5214. {
  5215. "lang": "js",
  5216. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5217. }
  5218. ]
  5219. }
  5220. },
  5221. "/provider/{providerID}/oauth/authorize": {
  5222. "post": {
  5223. "tags": ["provider"],
  5224. "operationId": "provider.oauth.authorize",
  5225. "parameters": [
  5226. {
  5227. "name": "providerID",
  5228. "in": "path",
  5229. "schema": {
  5230. "type": "string"
  5231. },
  5232. "required": true
  5233. },
  5234. {
  5235. "name": "directory",
  5236. "in": "query",
  5237. "schema": {
  5238. "type": "string"
  5239. },
  5240. "required": false
  5241. },
  5242. {
  5243. "name": "workspace",
  5244. "in": "query",
  5245. "schema": {
  5246. "type": "string"
  5247. },
  5248. "required": false
  5249. }
  5250. ],
  5251. "responses": {
  5252. "200": {
  5253. "description": "Authorization URL and method",
  5254. "content": {
  5255. "application/json": {
  5256. "schema": {
  5257. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5258. }
  5259. }
  5260. }
  5261. },
  5262. "400": {
  5263. "description": "ProviderAuthError | InvalidRequestError",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "anyOf": [
  5268. {
  5269. "$ref": "#/components/schemas/ProviderAuthError1"
  5270. },
  5271. {
  5272. "$ref": "#/components/schemas/InvalidRequestError"
  5273. }
  5274. ]
  5275. }
  5276. }
  5277. }
  5278. }
  5279. },
  5280. "description": "Start the OAuth authorization flow for a provider.",
  5281. "summary": "Start OAuth authorization",
  5282. "requestBody": {
  5283. "content": {
  5284. "application/json": {
  5285. "schema": {
  5286. "type": "object",
  5287. "properties": {
  5288. "method": {
  5289. "type": "number",
  5290. "description": "Auth method index"
  5291. },
  5292. "inputs": {
  5293. "type": "object",
  5294. "additionalProperties": {
  5295. "type": "string"
  5296. }
  5297. }
  5298. },
  5299. "required": ["method"],
  5300. "additionalProperties": false
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "x-codeSamples": [
  5306. {
  5307. "lang": "js",
  5308. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5309. }
  5310. ]
  5311. }
  5312. },
  5313. "/provider/{providerID}/oauth/callback": {
  5314. "post": {
  5315. "tags": ["provider"],
  5316. "operationId": "provider.oauth.callback",
  5317. "parameters": [
  5318. {
  5319. "name": "providerID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string"
  5323. },
  5324. "required": true
  5325. },
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. }
  5342. ],
  5343. "responses": {
  5344. "200": {
  5345. "description": "OAuth callback processed successfully",
  5346. "content": {
  5347. "application/json": {
  5348. "schema": {
  5349. "type": "boolean",
  5350. "description": "OAuth callback processed successfully"
  5351. }
  5352. }
  5353. }
  5354. },
  5355. "400": {
  5356. "description": "ProviderAuthError | InvalidRequestError",
  5357. "content": {
  5358. "application/json": {
  5359. "schema": {
  5360. "anyOf": [
  5361. {
  5362. "$ref": "#/components/schemas/ProviderAuthError1"
  5363. },
  5364. {
  5365. "$ref": "#/components/schemas/InvalidRequestError"
  5366. }
  5367. ]
  5368. }
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "description": "Handle the OAuth callback from a provider after user authorization.",
  5374. "summary": "Handle OAuth callback",
  5375. "requestBody": {
  5376. "content": {
  5377. "application/json": {
  5378. "schema": {
  5379. "type": "object",
  5380. "properties": {
  5381. "method": {
  5382. "type": "number",
  5383. "description": "Auth method index"
  5384. },
  5385. "code": {
  5386. "type": "string"
  5387. }
  5388. },
  5389. "required": ["method"],
  5390. "additionalProperties": false
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "x-codeSamples": [
  5396. {
  5397. "lang": "js",
  5398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5399. }
  5400. ]
  5401. }
  5402. },
  5403. "/session": {
  5404. "get": {
  5405. "tags": ["session"],
  5406. "operationId": "session.list",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. },
  5424. {
  5425. "name": "scope",
  5426. "in": "query",
  5427. "schema": {
  5428. "type": "string",
  5429. "enum": ["project"]
  5430. },
  5431. "required": false
  5432. },
  5433. {
  5434. "name": "path",
  5435. "in": "query",
  5436. "schema": {
  5437. "type": "string"
  5438. },
  5439. "required": false
  5440. },
  5441. {
  5442. "name": "roots",
  5443. "in": "query",
  5444. "schema": {
  5445. "anyOf": [
  5446. {
  5447. "type": "boolean"
  5448. },
  5449. {
  5450. "type": "string",
  5451. "enum": ["true", "false"]
  5452. }
  5453. ]
  5454. },
  5455. "required": false
  5456. },
  5457. {
  5458. "name": "start",
  5459. "in": "query",
  5460. "schema": {
  5461. "type": "number"
  5462. },
  5463. "required": false
  5464. },
  5465. {
  5466. "name": "search",
  5467. "in": "query",
  5468. "schema": {
  5469. "type": "string"
  5470. },
  5471. "required": false
  5472. },
  5473. {
  5474. "name": "limit",
  5475. "in": "query",
  5476. "schema": {
  5477. "type": "number"
  5478. },
  5479. "required": false
  5480. }
  5481. ],
  5482. "responses": {
  5483. "200": {
  5484. "description": "List of sessions",
  5485. "content": {
  5486. "application/json": {
  5487. "schema": {
  5488. "type": "array",
  5489. "items": {
  5490. "$ref": "#/components/schemas/Session"
  5491. },
  5492. "description": "List of sessions"
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "400": {
  5498. "description": "Bad request",
  5499. "content": {
  5500. "application/json": {
  5501. "schema": {
  5502. "$ref": "#/components/schemas/BadRequestError"
  5503. }
  5504. }
  5505. }
  5506. }
  5507. },
  5508. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5509. "summary": "List sessions",
  5510. "x-codeSamples": [
  5511. {
  5512. "lang": "js",
  5513. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5514. }
  5515. ]
  5516. },
  5517. "post": {
  5518. "tags": ["session"],
  5519. "operationId": "session.create",
  5520. "parameters": [
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "Successfully created session",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5568. "summary": "Create session",
  5569. "requestBody": {
  5570. "content": {
  5571. "application/json": {
  5572. "schema": {
  5573. "type": "object",
  5574. "properties": {
  5575. "parentID": {
  5576. "type": "string",
  5577. "pattern": "^ses"
  5578. },
  5579. "title": {
  5580. "type": "string"
  5581. },
  5582. "agent": {
  5583. "type": "string"
  5584. },
  5585. "model": {
  5586. "type": "object",
  5587. "properties": {
  5588. "id": {
  5589. "type": "string"
  5590. },
  5591. "providerID": {
  5592. "type": "string"
  5593. },
  5594. "variant": {
  5595. "type": "string"
  5596. }
  5597. },
  5598. "required": ["id", "providerID"],
  5599. "additionalProperties": false
  5600. },
  5601. "metadata": {
  5602. "type": "object"
  5603. },
  5604. "permission": {
  5605. "$ref": "#/components/schemas/PermissionRuleset"
  5606. },
  5607. "workspaceID": {
  5608. "type": "string",
  5609. "pattern": "^wrk"
  5610. }
  5611. },
  5612. "additionalProperties": false
  5613. }
  5614. }
  5615. }
  5616. },
  5617. "x-codeSamples": [
  5618. {
  5619. "lang": "js",
  5620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5621. }
  5622. ]
  5623. }
  5624. },
  5625. "/session/status": {
  5626. "get": {
  5627. "tags": ["session"],
  5628. "operationId": "session.status",
  5629. "parameters": [
  5630. {
  5631. "name": "directory",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. },
  5638. {
  5639. "name": "workspace",
  5640. "in": "query",
  5641. "schema": {
  5642. "type": "string"
  5643. },
  5644. "required": false
  5645. }
  5646. ],
  5647. "responses": {
  5648. "200": {
  5649. "description": "Get session status",
  5650. "content": {
  5651. "application/json": {
  5652. "schema": {
  5653. "type": "object",
  5654. "additionalProperties": {
  5655. "$ref": "#/components/schemas/SessionStatus"
  5656. },
  5657. "description": "Get session status"
  5658. }
  5659. }
  5660. }
  5661. },
  5662. "400": {
  5663. "description": "BadRequest | InvalidRequestError",
  5664. "content": {
  5665. "application/json": {
  5666. "schema": {
  5667. "anyOf": [
  5668. {
  5669. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5670. },
  5671. {
  5672. "$ref": "#/components/schemas/InvalidRequestError"
  5673. }
  5674. ]
  5675. }
  5676. }
  5677. }
  5678. }
  5679. },
  5680. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5681. "summary": "Get session status",
  5682. "x-codeSamples": [
  5683. {
  5684. "lang": "js",
  5685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5686. }
  5687. ]
  5688. }
  5689. },
  5690. "/session/{sessionID}": {
  5691. "get": {
  5692. "tags": ["session"],
  5693. "operationId": "session.get",
  5694. "parameters": [
  5695. {
  5696. "name": "sessionID",
  5697. "in": "path",
  5698. "schema": {
  5699. "type": "string",
  5700. "pattern": "^ses"
  5701. },
  5702. "required": true
  5703. },
  5704. {
  5705. "name": "directory",
  5706. "in": "query",
  5707. "schema": {
  5708. "type": "string"
  5709. },
  5710. "required": false
  5711. },
  5712. {
  5713. "name": "workspace",
  5714. "in": "query",
  5715. "schema": {
  5716. "type": "string"
  5717. },
  5718. "required": false
  5719. }
  5720. ],
  5721. "responses": {
  5722. "200": {
  5723. "description": "Get session",
  5724. "content": {
  5725. "application/json": {
  5726. "schema": {
  5727. "$ref": "#/components/schemas/Session"
  5728. }
  5729. }
  5730. }
  5731. },
  5732. "400": {
  5733. "description": "BadRequest | InvalidRequestError",
  5734. "content": {
  5735. "application/json": {
  5736. "schema": {
  5737. "anyOf": [
  5738. {
  5739. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5740. },
  5741. {
  5742. "$ref": "#/components/schemas/InvalidRequestError"
  5743. }
  5744. ]
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "404": {
  5750. "description": "NotFoundError",
  5751. "content": {
  5752. "application/json": {
  5753. "schema": {
  5754. "$ref": "#/components/schemas/NotFoundError"
  5755. }
  5756. }
  5757. }
  5758. }
  5759. },
  5760. "description": "Retrieve detailed information about a specific OpenCode session.",
  5761. "summary": "Get session",
  5762. "x-codeSamples": [
  5763. {
  5764. "lang": "js",
  5765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5766. }
  5767. ]
  5768. },
  5769. "delete": {
  5770. "tags": ["session"],
  5771. "operationId": "session.delete",
  5772. "parameters": [
  5773. {
  5774. "name": "sessionID",
  5775. "in": "path",
  5776. "schema": {
  5777. "type": "string",
  5778. "pattern": "^ses"
  5779. },
  5780. "required": true
  5781. },
  5782. {
  5783. "name": "directory",
  5784. "in": "query",
  5785. "schema": {
  5786. "type": "string"
  5787. },
  5788. "required": false
  5789. },
  5790. {
  5791. "name": "workspace",
  5792. "in": "query",
  5793. "schema": {
  5794. "type": "string"
  5795. },
  5796. "required": false
  5797. }
  5798. ],
  5799. "responses": {
  5800. "200": {
  5801. "description": "Successfully deleted session",
  5802. "content": {
  5803. "application/json": {
  5804. "schema": {
  5805. "type": "boolean",
  5806. "description": "Successfully deleted session"
  5807. }
  5808. }
  5809. }
  5810. },
  5811. "400": {
  5812. "description": "BadRequest | InvalidRequestError",
  5813. "content": {
  5814. "application/json": {
  5815. "schema": {
  5816. "anyOf": [
  5817. {
  5818. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5819. },
  5820. {
  5821. "$ref": "#/components/schemas/InvalidRequestError"
  5822. }
  5823. ]
  5824. }
  5825. }
  5826. }
  5827. },
  5828. "404": {
  5829. "description": "NotFoundError",
  5830. "content": {
  5831. "application/json": {
  5832. "schema": {
  5833. "$ref": "#/components/schemas/NotFoundError"
  5834. }
  5835. }
  5836. }
  5837. }
  5838. },
  5839. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5840. "summary": "Delete session",
  5841. "x-codeSamples": [
  5842. {
  5843. "lang": "js",
  5844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5845. }
  5846. ]
  5847. },
  5848. "patch": {
  5849. "tags": ["session"],
  5850. "operationId": "session.update",
  5851. "parameters": [
  5852. {
  5853. "name": "sessionID",
  5854. "in": "path",
  5855. "schema": {
  5856. "type": "string",
  5857. "pattern": "^ses"
  5858. },
  5859. "required": true
  5860. },
  5861. {
  5862. "name": "directory",
  5863. "in": "query",
  5864. "schema": {
  5865. "type": "string"
  5866. },
  5867. "required": false
  5868. },
  5869. {
  5870. "name": "workspace",
  5871. "in": "query",
  5872. "schema": {
  5873. "type": "string"
  5874. },
  5875. "required": false
  5876. }
  5877. ],
  5878. "responses": {
  5879. "200": {
  5880. "description": "Successfully updated session",
  5881. "content": {
  5882. "application/json": {
  5883. "schema": {
  5884. "$ref": "#/components/schemas/Session"
  5885. }
  5886. }
  5887. }
  5888. },
  5889. "400": {
  5890. "description": "BadRequest | InvalidRequestError",
  5891. "content": {
  5892. "application/json": {
  5893. "schema": {
  5894. "anyOf": [
  5895. {
  5896. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5897. },
  5898. {
  5899. "$ref": "#/components/schemas/InvalidRequestError"
  5900. }
  5901. ]
  5902. }
  5903. }
  5904. }
  5905. },
  5906. "404": {
  5907. "description": "NotFoundError",
  5908. "content": {
  5909. "application/json": {
  5910. "schema": {
  5911. "$ref": "#/components/schemas/NotFoundError"
  5912. }
  5913. }
  5914. }
  5915. }
  5916. },
  5917. "description": "Update properties of an existing session, such as title or other metadata.",
  5918. "summary": "Update session",
  5919. "requestBody": {
  5920. "content": {
  5921. "application/json": {
  5922. "schema": {
  5923. "type": "object",
  5924. "properties": {
  5925. "title": {
  5926. "type": "string"
  5927. },
  5928. "metadata": {
  5929. "type": "object"
  5930. },
  5931. "permission": {
  5932. "$ref": "#/components/schemas/PermissionRuleset"
  5933. },
  5934. "time": {
  5935. "type": "object",
  5936. "properties": {
  5937. "archived": {
  5938. "type": "number"
  5939. }
  5940. },
  5941. "additionalProperties": false
  5942. }
  5943. },
  5944. "additionalProperties": false
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "x-codeSamples": [
  5950. {
  5951. "lang": "js",
  5952. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5953. }
  5954. ]
  5955. }
  5956. },
  5957. "/session/{sessionID}/children": {
  5958. "get": {
  5959. "tags": ["session"],
  5960. "operationId": "session.children",
  5961. "parameters": [
  5962. {
  5963. "name": "sessionID",
  5964. "in": "path",
  5965. "schema": {
  5966. "type": "string",
  5967. "pattern": "^ses"
  5968. },
  5969. "required": true
  5970. },
  5971. {
  5972. "name": "directory",
  5973. "in": "query",
  5974. "schema": {
  5975. "type": "string"
  5976. },
  5977. "required": false
  5978. },
  5979. {
  5980. "name": "workspace",
  5981. "in": "query",
  5982. "schema": {
  5983. "type": "string"
  5984. },
  5985. "required": false
  5986. }
  5987. ],
  5988. "responses": {
  5989. "200": {
  5990. "description": "List of children",
  5991. "content": {
  5992. "application/json": {
  5993. "schema": {
  5994. "type": "array",
  5995. "items": {
  5996. "$ref": "#/components/schemas/Session"
  5997. },
  5998. "description": "List of children"
  5999. }
  6000. }
  6001. }
  6002. },
  6003. "400": {
  6004. "description": "BadRequest | InvalidRequestError",
  6005. "content": {
  6006. "application/json": {
  6007. "schema": {
  6008. "anyOf": [
  6009. {
  6010. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6011. },
  6012. {
  6013. "$ref": "#/components/schemas/InvalidRequestError"
  6014. }
  6015. ]
  6016. }
  6017. }
  6018. }
  6019. },
  6020. "404": {
  6021. "description": "NotFoundError",
  6022. "content": {
  6023. "application/json": {
  6024. "schema": {
  6025. "$ref": "#/components/schemas/NotFoundError"
  6026. }
  6027. }
  6028. }
  6029. }
  6030. },
  6031. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  6032. "summary": "Get session children",
  6033. "x-codeSamples": [
  6034. {
  6035. "lang": "js",
  6036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  6037. }
  6038. ]
  6039. }
  6040. },
  6041. "/session/{sessionID}/todo": {
  6042. "get": {
  6043. "tags": ["session"],
  6044. "operationId": "session.todo",
  6045. "parameters": [
  6046. {
  6047. "name": "sessionID",
  6048. "in": "path",
  6049. "schema": {
  6050. "type": "string",
  6051. "pattern": "^ses"
  6052. },
  6053. "required": true
  6054. },
  6055. {
  6056. "name": "directory",
  6057. "in": "query",
  6058. "schema": {
  6059. "type": "string"
  6060. },
  6061. "required": false
  6062. },
  6063. {
  6064. "name": "workspace",
  6065. "in": "query",
  6066. "schema": {
  6067. "type": "string"
  6068. },
  6069. "required": false
  6070. }
  6071. ],
  6072. "responses": {
  6073. "200": {
  6074. "description": "Todo list",
  6075. "content": {
  6076. "application/json": {
  6077. "schema": {
  6078. "type": "array",
  6079. "items": {
  6080. "$ref": "#/components/schemas/Todo"
  6081. },
  6082. "description": "Todo list"
  6083. }
  6084. }
  6085. }
  6086. },
  6087. "400": {
  6088. "description": "BadRequest | InvalidRequestError",
  6089. "content": {
  6090. "application/json": {
  6091. "schema": {
  6092. "anyOf": [
  6093. {
  6094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6095. },
  6096. {
  6097. "$ref": "#/components/schemas/InvalidRequestError"
  6098. }
  6099. ]
  6100. }
  6101. }
  6102. }
  6103. },
  6104. "404": {
  6105. "description": "NotFoundError",
  6106. "content": {
  6107. "application/json": {
  6108. "schema": {
  6109. "$ref": "#/components/schemas/NotFoundError"
  6110. }
  6111. }
  6112. }
  6113. }
  6114. },
  6115. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6116. "summary": "Get session todos",
  6117. "x-codeSamples": [
  6118. {
  6119. "lang": "js",
  6120. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6121. }
  6122. ]
  6123. }
  6124. },
  6125. "/session/{sessionID}/diff": {
  6126. "get": {
  6127. "tags": ["session"],
  6128. "operationId": "session.diff",
  6129. "parameters": [
  6130. {
  6131. "name": "sessionID",
  6132. "in": "path",
  6133. "schema": {
  6134. "type": "string",
  6135. "pattern": "^ses"
  6136. },
  6137. "required": true
  6138. },
  6139. {
  6140. "name": "directory",
  6141. "in": "query",
  6142. "schema": {
  6143. "type": "string"
  6144. },
  6145. "required": false
  6146. },
  6147. {
  6148. "name": "workspace",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "messageID",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string",
  6160. "pattern": "^msg"
  6161. },
  6162. "required": false
  6163. }
  6164. ],
  6165. "responses": {
  6166. "200": {
  6167. "description": "Successfully retrieved diff",
  6168. "content": {
  6169. "application/json": {
  6170. "schema": {
  6171. "type": "array",
  6172. "items": {
  6173. "$ref": "#/components/schemas/SnapshotFileDiff"
  6174. },
  6175. "description": "Successfully retrieved diff"
  6176. }
  6177. }
  6178. }
  6179. },
  6180. "400": {
  6181. "description": "Bad request",
  6182. "content": {
  6183. "application/json": {
  6184. "schema": {
  6185. "$ref": "#/components/schemas/BadRequestError"
  6186. }
  6187. }
  6188. }
  6189. }
  6190. },
  6191. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6192. "summary": "Get message diff",
  6193. "x-codeSamples": [
  6194. {
  6195. "lang": "js",
  6196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6197. }
  6198. ]
  6199. }
  6200. },
  6201. "/session/{sessionID}/message": {
  6202. "get": {
  6203. "tags": ["session"],
  6204. "operationId": "session.messages",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. },
  6231. {
  6232. "name": "limit",
  6233. "in": "query",
  6234. "schema": {
  6235. "type": "integer",
  6236. "minimum": 0,
  6237. "maximum": 9007199254740991
  6238. },
  6239. "required": false
  6240. },
  6241. {
  6242. "name": "before",
  6243. "in": "query",
  6244. "schema": {
  6245. "type": "string"
  6246. },
  6247. "required": false
  6248. }
  6249. ],
  6250. "responses": {
  6251. "200": {
  6252. "description": "List of messages",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "type": "array",
  6257. "items": {
  6258. "type": "object",
  6259. "properties": {
  6260. "info": {
  6261. "$ref": "#/components/schemas/Message"
  6262. },
  6263. "parts": {
  6264. "type": "array",
  6265. "items": {
  6266. "$ref": "#/components/schemas/Part"
  6267. }
  6268. }
  6269. },
  6270. "required": ["info", "parts"],
  6271. "additionalProperties": false
  6272. },
  6273. "description": "List of messages"
  6274. }
  6275. }
  6276. }
  6277. },
  6278. "400": {
  6279. "description": "BadRequest | InvalidRequestError",
  6280. "content": {
  6281. "application/json": {
  6282. "schema": {
  6283. "anyOf": [
  6284. {
  6285. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6286. },
  6287. {
  6288. "$ref": "#/components/schemas/InvalidRequestError"
  6289. }
  6290. ]
  6291. }
  6292. }
  6293. }
  6294. },
  6295. "404": {
  6296. "description": "NotFoundError",
  6297. "content": {
  6298. "application/json": {
  6299. "schema": {
  6300. "$ref": "#/components/schemas/NotFoundError"
  6301. }
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6307. "summary": "Get session messages",
  6308. "x-codeSamples": [
  6309. {
  6310. "lang": "js",
  6311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6312. }
  6313. ]
  6314. },
  6315. "post": {
  6316. "tags": ["session"],
  6317. "operationId": "session.prompt",
  6318. "parameters": [
  6319. {
  6320. "name": "sessionID",
  6321. "in": "path",
  6322. "schema": {
  6323. "type": "string",
  6324. "pattern": "^ses"
  6325. },
  6326. "required": true
  6327. },
  6328. {
  6329. "name": "directory",
  6330. "in": "query",
  6331. "schema": {
  6332. "type": "string"
  6333. },
  6334. "required": false
  6335. },
  6336. {
  6337. "name": "workspace",
  6338. "in": "query",
  6339. "schema": {
  6340. "type": "string"
  6341. },
  6342. "required": false
  6343. }
  6344. ],
  6345. "responses": {
  6346. "200": {
  6347. "description": "Created message",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "type": "object",
  6352. "required": ["info", "parts"],
  6353. "properties": {
  6354. "info": {
  6355. "$ref": "#/components/schemas/AssistantMessage"
  6356. },
  6357. "parts": {
  6358. "type": "array",
  6359. "items": {
  6360. "$ref": "#/components/schemas/Part"
  6361. }
  6362. }
  6363. }
  6364. }
  6365. }
  6366. }
  6367. },
  6368. "400": {
  6369. "description": "BadRequest | InvalidRequestError",
  6370. "content": {
  6371. "application/json": {
  6372. "schema": {
  6373. "anyOf": [
  6374. {
  6375. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6376. },
  6377. {
  6378. "$ref": "#/components/schemas/InvalidRequestError"
  6379. }
  6380. ]
  6381. }
  6382. }
  6383. }
  6384. },
  6385. "404": {
  6386. "description": "NotFoundError",
  6387. "content": {
  6388. "application/json": {
  6389. "schema": {
  6390. "$ref": "#/components/schemas/NotFoundError"
  6391. }
  6392. }
  6393. }
  6394. }
  6395. },
  6396. "description": "Create and send a new message to a session, streaming the AI response.",
  6397. "summary": "Send message",
  6398. "requestBody": {
  6399. "content": {
  6400. "application/json": {
  6401. "schema": {
  6402. "type": "object",
  6403. "properties": {
  6404. "messageID": {
  6405. "type": "string",
  6406. "pattern": "^msg"
  6407. },
  6408. "model": {
  6409. "type": "object",
  6410. "properties": {
  6411. "providerID": {
  6412. "type": "string"
  6413. },
  6414. "modelID": {
  6415. "type": "string"
  6416. }
  6417. },
  6418. "required": ["providerID", "modelID"],
  6419. "additionalProperties": false
  6420. },
  6421. "agent": {
  6422. "type": "string"
  6423. },
  6424. "noReply": {
  6425. "type": "boolean"
  6426. },
  6427. "tools": {
  6428. "type": "object",
  6429. "additionalProperties": {
  6430. "type": "boolean"
  6431. }
  6432. },
  6433. "format": {
  6434. "$ref": "#/components/schemas/OutputFormat"
  6435. },
  6436. "system": {
  6437. "type": "string"
  6438. },
  6439. "variant": {
  6440. "type": "string"
  6441. },
  6442. "parts": {
  6443. "type": "array",
  6444. "items": {
  6445. "anyOf": [
  6446. {
  6447. "$ref": "#/components/schemas/TextPartInput"
  6448. },
  6449. {
  6450. "$ref": "#/components/schemas/FilePartInput"
  6451. },
  6452. {
  6453. "$ref": "#/components/schemas/AgentPartInput"
  6454. },
  6455. {
  6456. "$ref": "#/components/schemas/SubtaskPartInput"
  6457. }
  6458. ]
  6459. }
  6460. }
  6461. },
  6462. "required": ["parts"],
  6463. "additionalProperties": false
  6464. }
  6465. }
  6466. }
  6467. },
  6468. "x-codeSamples": [
  6469. {
  6470. "lang": "js",
  6471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6472. }
  6473. ]
  6474. }
  6475. },
  6476. "/session/{sessionID}/message/{messageID}": {
  6477. "get": {
  6478. "tags": ["session"],
  6479. "operationId": "session.message",
  6480. "parameters": [
  6481. {
  6482. "name": "sessionID",
  6483. "in": "path",
  6484. "schema": {
  6485. "type": "string",
  6486. "pattern": "^ses"
  6487. },
  6488. "required": true
  6489. },
  6490. {
  6491. "name": "messageID",
  6492. "in": "path",
  6493. "schema": {
  6494. "type": "string",
  6495. "pattern": "^msg"
  6496. },
  6497. "required": true
  6498. },
  6499. {
  6500. "name": "directory",
  6501. "in": "query",
  6502. "schema": {
  6503. "type": "string"
  6504. },
  6505. "required": false
  6506. },
  6507. {
  6508. "name": "workspace",
  6509. "in": "query",
  6510. "schema": {
  6511. "type": "string"
  6512. },
  6513. "required": false
  6514. }
  6515. ],
  6516. "responses": {
  6517. "200": {
  6518. "description": "Message",
  6519. "content": {
  6520. "application/json": {
  6521. "schema": {
  6522. "type": "object",
  6523. "properties": {
  6524. "info": {
  6525. "$ref": "#/components/schemas/Message"
  6526. },
  6527. "parts": {
  6528. "type": "array",
  6529. "items": {
  6530. "$ref": "#/components/schemas/Part"
  6531. }
  6532. }
  6533. },
  6534. "required": ["info", "parts"],
  6535. "additionalProperties": false,
  6536. "description": "Message"
  6537. }
  6538. }
  6539. }
  6540. },
  6541. "400": {
  6542. "description": "BadRequest | InvalidRequestError",
  6543. "content": {
  6544. "application/json": {
  6545. "schema": {
  6546. "anyOf": [
  6547. {
  6548. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6549. },
  6550. {
  6551. "$ref": "#/components/schemas/InvalidRequestError"
  6552. }
  6553. ]
  6554. }
  6555. }
  6556. }
  6557. },
  6558. "404": {
  6559. "description": "NotFoundError",
  6560. "content": {
  6561. "application/json": {
  6562. "schema": {
  6563. "$ref": "#/components/schemas/NotFoundError"
  6564. }
  6565. }
  6566. }
  6567. }
  6568. },
  6569. "description": "Retrieve a specific message from a session by its message ID.",
  6570. "summary": "Get message",
  6571. "x-codeSamples": [
  6572. {
  6573. "lang": "js",
  6574. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6575. }
  6576. ]
  6577. },
  6578. "delete": {
  6579. "tags": ["session"],
  6580. "operationId": "session.deleteMessage",
  6581. "parameters": [
  6582. {
  6583. "name": "sessionID",
  6584. "in": "path",
  6585. "schema": {
  6586. "type": "string",
  6587. "pattern": "^ses"
  6588. },
  6589. "required": true
  6590. },
  6591. {
  6592. "name": "messageID",
  6593. "in": "path",
  6594. "schema": {
  6595. "type": "string",
  6596. "pattern": "^msg"
  6597. },
  6598. "required": true
  6599. },
  6600. {
  6601. "name": "directory",
  6602. "in": "query",
  6603. "schema": {
  6604. "type": "string"
  6605. },
  6606. "required": false
  6607. },
  6608. {
  6609. "name": "workspace",
  6610. "in": "query",
  6611. "schema": {
  6612. "type": "string"
  6613. },
  6614. "required": false
  6615. }
  6616. ],
  6617. "responses": {
  6618. "200": {
  6619. "description": "Successfully deleted message",
  6620. "content": {
  6621. "application/json": {
  6622. "schema": {
  6623. "type": "boolean",
  6624. "description": "Successfully deleted message"
  6625. }
  6626. }
  6627. }
  6628. },
  6629. "400": {
  6630. "description": "BadRequest | InvalidRequestError",
  6631. "content": {
  6632. "application/json": {
  6633. "schema": {
  6634. "anyOf": [
  6635. {
  6636. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6637. },
  6638. {
  6639. "$ref": "#/components/schemas/InvalidRequestError"
  6640. }
  6641. ]
  6642. }
  6643. }
  6644. }
  6645. },
  6646. "404": {
  6647. "description": "NotFoundError",
  6648. "content": {
  6649. "application/json": {
  6650. "schema": {
  6651. "$ref": "#/components/schemas/NotFoundError"
  6652. }
  6653. }
  6654. }
  6655. },
  6656. "409": {
  6657. "description": "SessionBusyError",
  6658. "content": {
  6659. "application/json": {
  6660. "schema": {
  6661. "$ref": "#/components/schemas/SessionBusyError"
  6662. }
  6663. }
  6664. }
  6665. }
  6666. },
  6667. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6668. "summary": "Delete message",
  6669. "x-codeSamples": [
  6670. {
  6671. "lang": "js",
  6672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6673. }
  6674. ]
  6675. }
  6676. },
  6677. "/session/{sessionID}/fork": {
  6678. "post": {
  6679. "tags": ["session"],
  6680. "operationId": "session.fork",
  6681. "parameters": [
  6682. {
  6683. "name": "sessionID",
  6684. "in": "path",
  6685. "schema": {
  6686. "type": "string",
  6687. "pattern": "^ses"
  6688. },
  6689. "required": true
  6690. },
  6691. {
  6692. "name": "directory",
  6693. "in": "query",
  6694. "schema": {
  6695. "type": "string"
  6696. },
  6697. "required": false
  6698. },
  6699. {
  6700. "name": "workspace",
  6701. "in": "query",
  6702. "schema": {
  6703. "type": "string"
  6704. },
  6705. "required": false
  6706. }
  6707. ],
  6708. "responses": {
  6709. "200": {
  6710. "description": "200",
  6711. "content": {
  6712. "application/json": {
  6713. "schema": {
  6714. "$ref": "#/components/schemas/Session"
  6715. }
  6716. }
  6717. }
  6718. },
  6719. "400": {
  6720. "description": "BadRequest | InvalidRequestError",
  6721. "content": {
  6722. "application/json": {
  6723. "schema": {
  6724. "anyOf": [
  6725. {
  6726. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6727. },
  6728. {
  6729. "$ref": "#/components/schemas/InvalidRequestError"
  6730. }
  6731. ]
  6732. }
  6733. }
  6734. }
  6735. },
  6736. "404": {
  6737. "description": "NotFoundError",
  6738. "content": {
  6739. "application/json": {
  6740. "schema": {
  6741. "$ref": "#/components/schemas/NotFoundError"
  6742. }
  6743. }
  6744. }
  6745. }
  6746. },
  6747. "description": "Create a new session by forking an existing session at a specific message point.",
  6748. "summary": "Fork session",
  6749. "requestBody": {
  6750. "content": {
  6751. "application/json": {
  6752. "schema": {
  6753. "type": "object",
  6754. "properties": {
  6755. "messageID": {
  6756. "type": "string",
  6757. "pattern": "^msg"
  6758. }
  6759. },
  6760. "additionalProperties": false
  6761. }
  6762. }
  6763. }
  6764. },
  6765. "x-codeSamples": [
  6766. {
  6767. "lang": "js",
  6768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6769. }
  6770. ]
  6771. }
  6772. },
  6773. "/session/{sessionID}/abort": {
  6774. "post": {
  6775. "tags": ["session"],
  6776. "operationId": "session.abort",
  6777. "parameters": [
  6778. {
  6779. "name": "sessionID",
  6780. "in": "path",
  6781. "schema": {
  6782. "type": "string",
  6783. "pattern": "^ses"
  6784. },
  6785. "required": true
  6786. },
  6787. {
  6788. "name": "directory",
  6789. "in": "query",
  6790. "schema": {
  6791. "type": "string"
  6792. },
  6793. "required": false
  6794. },
  6795. {
  6796. "name": "workspace",
  6797. "in": "query",
  6798. "schema": {
  6799. "type": "string"
  6800. },
  6801. "required": false
  6802. }
  6803. ],
  6804. "responses": {
  6805. "200": {
  6806. "description": "Aborted session",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "type": "boolean",
  6811. "description": "Aborted session"
  6812. }
  6813. }
  6814. }
  6815. },
  6816. "400": {
  6817. "description": "BadRequest | InvalidRequestError",
  6818. "content": {
  6819. "application/json": {
  6820. "schema": {
  6821. "anyOf": [
  6822. {
  6823. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6824. },
  6825. {
  6826. "$ref": "#/components/schemas/InvalidRequestError"
  6827. }
  6828. ]
  6829. }
  6830. }
  6831. }
  6832. }
  6833. },
  6834. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6835. "summary": "Abort session",
  6836. "x-codeSamples": [
  6837. {
  6838. "lang": "js",
  6839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6840. }
  6841. ]
  6842. }
  6843. },
  6844. "/session/{sessionID}/init": {
  6845. "post": {
  6846. "tags": ["session"],
  6847. "operationId": "session.init",
  6848. "parameters": [
  6849. {
  6850. "name": "sessionID",
  6851. "in": "path",
  6852. "schema": {
  6853. "type": "string",
  6854. "pattern": "^ses"
  6855. },
  6856. "required": true
  6857. },
  6858. {
  6859. "name": "directory",
  6860. "in": "query",
  6861. "schema": {
  6862. "type": "string"
  6863. },
  6864. "required": false
  6865. },
  6866. {
  6867. "name": "workspace",
  6868. "in": "query",
  6869. "schema": {
  6870. "type": "string"
  6871. },
  6872. "required": false
  6873. }
  6874. ],
  6875. "responses": {
  6876. "200": {
  6877. "description": "200",
  6878. "content": {
  6879. "application/json": {
  6880. "schema": {
  6881. "type": "boolean",
  6882. "description": "200"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "400": {
  6888. "description": "BadRequest | InvalidRequestError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "anyOf": [
  6893. {
  6894. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6895. },
  6896. {
  6897. "$ref": "#/components/schemas/InvalidRequestError"
  6898. }
  6899. ]
  6900. }
  6901. }
  6902. }
  6903. },
  6904. "404": {
  6905. "description": "NotFoundError",
  6906. "content": {
  6907. "application/json": {
  6908. "schema": {
  6909. "$ref": "#/components/schemas/NotFoundError"
  6910. }
  6911. }
  6912. }
  6913. }
  6914. },
  6915. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6916. "summary": "Initialize session",
  6917. "requestBody": {
  6918. "content": {
  6919. "application/json": {
  6920. "schema": {
  6921. "type": "object",
  6922. "properties": {
  6923. "modelID": {
  6924. "type": "string"
  6925. },
  6926. "providerID": {
  6927. "type": "string"
  6928. },
  6929. "messageID": {
  6930. "type": "string",
  6931. "pattern": "^msg"
  6932. }
  6933. },
  6934. "required": ["modelID", "providerID", "messageID"],
  6935. "additionalProperties": false
  6936. }
  6937. }
  6938. }
  6939. },
  6940. "x-codeSamples": [
  6941. {
  6942. "lang": "js",
  6943. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6944. }
  6945. ]
  6946. }
  6947. },
  6948. "/session/{sessionID}/share": {
  6949. "post": {
  6950. "tags": ["session"],
  6951. "operationId": "session.share",
  6952. "parameters": [
  6953. {
  6954. "name": "sessionID",
  6955. "in": "path",
  6956. "schema": {
  6957. "type": "string",
  6958. "pattern": "^ses"
  6959. },
  6960. "required": true
  6961. },
  6962. {
  6963. "name": "directory",
  6964. "in": "query",
  6965. "schema": {
  6966. "type": "string"
  6967. },
  6968. "required": false
  6969. },
  6970. {
  6971. "name": "workspace",
  6972. "in": "query",
  6973. "schema": {
  6974. "type": "string"
  6975. },
  6976. "required": false
  6977. }
  6978. ],
  6979. "responses": {
  6980. "200": {
  6981. "description": "Successfully shared session",
  6982. "content": {
  6983. "application/json": {
  6984. "schema": {
  6985. "$ref": "#/components/schemas/Session"
  6986. }
  6987. }
  6988. }
  6989. },
  6990. "400": {
  6991. "description": "Bad request",
  6992. "content": {
  6993. "application/json": {
  6994. "schema": {
  6995. "$ref": "#/components/schemas/BadRequestError"
  6996. }
  6997. }
  6998. }
  6999. },
  7000. "404": {
  7001. "description": "NotFoundError",
  7002. "content": {
  7003. "application/json": {
  7004. "schema": {
  7005. "$ref": "#/components/schemas/NotFoundError"
  7006. }
  7007. }
  7008. }
  7009. },
  7010. "500": {
  7011. "description": "InternalServerError",
  7012. "content": {
  7013. "application/json": {
  7014. "schema": {
  7015. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7016. }
  7017. }
  7018. }
  7019. }
  7020. },
  7021. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  7022. "summary": "Share session",
  7023. "x-codeSamples": [
  7024. {
  7025. "lang": "js",
  7026. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  7027. }
  7028. ]
  7029. },
  7030. "delete": {
  7031. "tags": ["session"],
  7032. "operationId": "session.unshare",
  7033. "parameters": [
  7034. {
  7035. "name": "sessionID",
  7036. "in": "path",
  7037. "schema": {
  7038. "type": "string",
  7039. "pattern": "^ses"
  7040. },
  7041. "required": true
  7042. },
  7043. {
  7044. "name": "directory",
  7045. "in": "query",
  7046. "schema": {
  7047. "type": "string"
  7048. },
  7049. "required": false
  7050. },
  7051. {
  7052. "name": "workspace",
  7053. "in": "query",
  7054. "schema": {
  7055. "type": "string"
  7056. },
  7057. "required": false
  7058. }
  7059. ],
  7060. "responses": {
  7061. "200": {
  7062. "description": "Successfully unshared session",
  7063. "content": {
  7064. "application/json": {
  7065. "schema": {
  7066. "$ref": "#/components/schemas/Session"
  7067. }
  7068. }
  7069. }
  7070. },
  7071. "400": {
  7072. "description": "Bad request",
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "$ref": "#/components/schemas/BadRequestError"
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "404": {
  7082. "description": "NotFoundError",
  7083. "content": {
  7084. "application/json": {
  7085. "schema": {
  7086. "$ref": "#/components/schemas/NotFoundError"
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "500": {
  7092. "description": "InternalServerError",
  7093. "content": {
  7094. "application/json": {
  7095. "schema": {
  7096. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7097. }
  7098. }
  7099. }
  7100. }
  7101. },
  7102. "description": "Remove the shareable link for a session, making it private again.",
  7103. "summary": "Unshare session",
  7104. "x-codeSamples": [
  7105. {
  7106. "lang": "js",
  7107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7108. }
  7109. ]
  7110. }
  7111. },
  7112. "/session/{sessionID}/summarize": {
  7113. "post": {
  7114. "tags": ["session"],
  7115. "operationId": "session.summarize",
  7116. "parameters": [
  7117. {
  7118. "name": "sessionID",
  7119. "in": "path",
  7120. "schema": {
  7121. "type": "string",
  7122. "pattern": "^ses"
  7123. },
  7124. "required": true
  7125. },
  7126. {
  7127. "name": "directory",
  7128. "in": "query",
  7129. "schema": {
  7130. "type": "string"
  7131. },
  7132. "required": false
  7133. },
  7134. {
  7135. "name": "workspace",
  7136. "in": "query",
  7137. "schema": {
  7138. "type": "string"
  7139. },
  7140. "required": false
  7141. }
  7142. ],
  7143. "responses": {
  7144. "200": {
  7145. "description": "Summarized session",
  7146. "content": {
  7147. "application/json": {
  7148. "schema": {
  7149. "type": "boolean",
  7150. "description": "Summarized session"
  7151. }
  7152. }
  7153. }
  7154. },
  7155. "400": {
  7156. "description": "BadRequest | InvalidRequestError",
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "anyOf": [
  7161. {
  7162. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7163. },
  7164. {
  7165. "$ref": "#/components/schemas/InvalidRequestError"
  7166. }
  7167. ]
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "404": {
  7173. "description": "NotFoundError",
  7174. "content": {
  7175. "application/json": {
  7176. "schema": {
  7177. "$ref": "#/components/schemas/NotFoundError"
  7178. }
  7179. }
  7180. }
  7181. }
  7182. },
  7183. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7184. "summary": "Summarize session",
  7185. "requestBody": {
  7186. "content": {
  7187. "application/json": {
  7188. "schema": {
  7189. "type": "object",
  7190. "properties": {
  7191. "providerID": {
  7192. "type": "string"
  7193. },
  7194. "modelID": {
  7195. "type": "string"
  7196. },
  7197. "auto": {
  7198. "type": "boolean"
  7199. }
  7200. },
  7201. "required": ["providerID", "modelID"],
  7202. "additionalProperties": false
  7203. }
  7204. }
  7205. }
  7206. },
  7207. "x-codeSamples": [
  7208. {
  7209. "lang": "js",
  7210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7211. }
  7212. ]
  7213. }
  7214. },
  7215. "/session/{sessionID}/prompt_async": {
  7216. "post": {
  7217. "tags": ["session"],
  7218. "operationId": "session.prompt_async",
  7219. "parameters": [
  7220. {
  7221. "name": "sessionID",
  7222. "in": "path",
  7223. "schema": {
  7224. "type": "string",
  7225. "pattern": "^ses"
  7226. },
  7227. "required": true
  7228. },
  7229. {
  7230. "name": "directory",
  7231. "in": "query",
  7232. "schema": {
  7233. "type": "string"
  7234. },
  7235. "required": false
  7236. },
  7237. {
  7238. "name": "workspace",
  7239. "in": "query",
  7240. "schema": {
  7241. "type": "string"
  7242. },
  7243. "required": false
  7244. }
  7245. ],
  7246. "responses": {
  7247. "204": {
  7248. "description": "Prompt accepted"
  7249. },
  7250. "400": {
  7251. "description": "BadRequest | InvalidRequestError",
  7252. "content": {
  7253. "application/json": {
  7254. "schema": {
  7255. "anyOf": [
  7256. {
  7257. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7258. },
  7259. {
  7260. "$ref": "#/components/schemas/InvalidRequestError"
  7261. }
  7262. ]
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "404": {
  7268. "description": "NotFoundError",
  7269. "content": {
  7270. "application/json": {
  7271. "schema": {
  7272. "$ref": "#/components/schemas/NotFoundError"
  7273. }
  7274. }
  7275. }
  7276. }
  7277. },
  7278. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7279. "summary": "Send async message",
  7280. "requestBody": {
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "type": "object",
  7285. "properties": {
  7286. "messageID": {
  7287. "type": "string",
  7288. "pattern": "^msg"
  7289. },
  7290. "model": {
  7291. "type": "object",
  7292. "properties": {
  7293. "providerID": {
  7294. "type": "string"
  7295. },
  7296. "modelID": {
  7297. "type": "string"
  7298. }
  7299. },
  7300. "required": ["providerID", "modelID"],
  7301. "additionalProperties": false
  7302. },
  7303. "agent": {
  7304. "type": "string"
  7305. },
  7306. "noReply": {
  7307. "type": "boolean"
  7308. },
  7309. "tools": {
  7310. "type": "object",
  7311. "additionalProperties": {
  7312. "type": "boolean"
  7313. }
  7314. },
  7315. "format": {
  7316. "$ref": "#/components/schemas/OutputFormat"
  7317. },
  7318. "system": {
  7319. "type": "string"
  7320. },
  7321. "variant": {
  7322. "type": "string"
  7323. },
  7324. "parts": {
  7325. "type": "array",
  7326. "items": {
  7327. "anyOf": [
  7328. {
  7329. "$ref": "#/components/schemas/TextPartInput"
  7330. },
  7331. {
  7332. "$ref": "#/components/schemas/FilePartInput"
  7333. },
  7334. {
  7335. "$ref": "#/components/schemas/AgentPartInput"
  7336. },
  7337. {
  7338. "$ref": "#/components/schemas/SubtaskPartInput"
  7339. }
  7340. ]
  7341. }
  7342. }
  7343. },
  7344. "required": ["parts"],
  7345. "additionalProperties": false
  7346. }
  7347. }
  7348. }
  7349. },
  7350. "x-codeSamples": [
  7351. {
  7352. "lang": "js",
  7353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7354. }
  7355. ]
  7356. }
  7357. },
  7358. "/session/{sessionID}/command": {
  7359. "post": {
  7360. "tags": ["session"],
  7361. "operationId": "session.command",
  7362. "parameters": [
  7363. {
  7364. "name": "sessionID",
  7365. "in": "path",
  7366. "schema": {
  7367. "type": "string",
  7368. "pattern": "^ses"
  7369. },
  7370. "required": true
  7371. },
  7372. {
  7373. "name": "directory",
  7374. "in": "query",
  7375. "schema": {
  7376. "type": "string"
  7377. },
  7378. "required": false
  7379. },
  7380. {
  7381. "name": "workspace",
  7382. "in": "query",
  7383. "schema": {
  7384. "type": "string"
  7385. },
  7386. "required": false
  7387. }
  7388. ],
  7389. "responses": {
  7390. "200": {
  7391. "description": "Created message",
  7392. "content": {
  7393. "application/json": {
  7394. "schema": {
  7395. "type": "object",
  7396. "required": ["info", "parts"],
  7397. "properties": {
  7398. "info": {
  7399. "$ref": "#/components/schemas/AssistantMessage"
  7400. },
  7401. "parts": {
  7402. "type": "array",
  7403. "items": {
  7404. "$ref": "#/components/schemas/Part"
  7405. }
  7406. }
  7407. }
  7408. }
  7409. }
  7410. }
  7411. },
  7412. "400": {
  7413. "description": "BadRequest | InvalidRequestError",
  7414. "content": {
  7415. "application/json": {
  7416. "schema": {
  7417. "anyOf": [
  7418. {
  7419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7420. },
  7421. {
  7422. "$ref": "#/components/schemas/InvalidRequestError"
  7423. }
  7424. ]
  7425. }
  7426. }
  7427. }
  7428. },
  7429. "404": {
  7430. "description": "NotFoundError",
  7431. "content": {
  7432. "application/json": {
  7433. "schema": {
  7434. "$ref": "#/components/schemas/NotFoundError"
  7435. }
  7436. }
  7437. }
  7438. }
  7439. },
  7440. "description": "Send a new command to a session for execution by the AI assistant.",
  7441. "summary": "Send command",
  7442. "requestBody": {
  7443. "content": {
  7444. "application/json": {
  7445. "schema": {
  7446. "type": "object",
  7447. "properties": {
  7448. "messageID": {
  7449. "type": "string",
  7450. "pattern": "^msg"
  7451. },
  7452. "agent": {
  7453. "type": "string"
  7454. },
  7455. "model": {
  7456. "type": "string"
  7457. },
  7458. "arguments": {
  7459. "type": "string"
  7460. },
  7461. "command": {
  7462. "type": "string"
  7463. },
  7464. "variant": {
  7465. "type": "string"
  7466. },
  7467. "parts": {
  7468. "type": "array",
  7469. "items": {
  7470. "type": "object",
  7471. "properties": {
  7472. "id": {
  7473. "type": "string",
  7474. "pattern": "^prt"
  7475. },
  7476. "type": {
  7477. "type": "string",
  7478. "enum": ["file"]
  7479. },
  7480. "mime": {
  7481. "type": "string"
  7482. },
  7483. "filename": {
  7484. "type": "string"
  7485. },
  7486. "url": {
  7487. "type": "string"
  7488. },
  7489. "source": {
  7490. "$ref": "#/components/schemas/FilePartSource"
  7491. }
  7492. },
  7493. "required": ["type", "mime", "url"],
  7494. "additionalProperties": false
  7495. }
  7496. }
  7497. },
  7498. "required": ["arguments", "command"],
  7499. "additionalProperties": false
  7500. }
  7501. }
  7502. }
  7503. },
  7504. "x-codeSamples": [
  7505. {
  7506. "lang": "js",
  7507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7508. }
  7509. ]
  7510. }
  7511. },
  7512. "/session/{sessionID}/shell": {
  7513. "post": {
  7514. "tags": ["session"],
  7515. "operationId": "session.shell",
  7516. "parameters": [
  7517. {
  7518. "name": "sessionID",
  7519. "in": "path",
  7520. "schema": {
  7521. "type": "string",
  7522. "pattern": "^ses"
  7523. },
  7524. "required": true
  7525. },
  7526. {
  7527. "name": "directory",
  7528. "in": "query",
  7529. "schema": {
  7530. "type": "string"
  7531. },
  7532. "required": false
  7533. },
  7534. {
  7535. "name": "workspace",
  7536. "in": "query",
  7537. "schema": {
  7538. "type": "string"
  7539. },
  7540. "required": false
  7541. }
  7542. ],
  7543. "responses": {
  7544. "200": {
  7545. "description": "Created message",
  7546. "content": {
  7547. "application/json": {
  7548. "schema": {
  7549. "type": "object",
  7550. "properties": {
  7551. "info": {
  7552. "$ref": "#/components/schemas/Message"
  7553. },
  7554. "parts": {
  7555. "type": "array",
  7556. "items": {
  7557. "$ref": "#/components/schemas/Part"
  7558. }
  7559. }
  7560. },
  7561. "required": ["info", "parts"],
  7562. "additionalProperties": false,
  7563. "description": "Created message"
  7564. }
  7565. }
  7566. }
  7567. },
  7568. "400": {
  7569. "description": "BadRequest | InvalidRequestError",
  7570. "content": {
  7571. "application/json": {
  7572. "schema": {
  7573. "anyOf": [
  7574. {
  7575. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7576. },
  7577. {
  7578. "$ref": "#/components/schemas/InvalidRequestError"
  7579. }
  7580. ]
  7581. }
  7582. }
  7583. }
  7584. },
  7585. "404": {
  7586. "description": "NotFoundError",
  7587. "content": {
  7588. "application/json": {
  7589. "schema": {
  7590. "$ref": "#/components/schemas/NotFoundError"
  7591. }
  7592. }
  7593. }
  7594. },
  7595. "409": {
  7596. "description": "SessionBusyError",
  7597. "content": {
  7598. "application/json": {
  7599. "schema": {
  7600. "$ref": "#/components/schemas/SessionBusyError"
  7601. }
  7602. }
  7603. }
  7604. }
  7605. },
  7606. "description": "Execute a shell command within the session context and return the AI's response.",
  7607. "summary": "Run shell command",
  7608. "requestBody": {
  7609. "content": {
  7610. "application/json": {
  7611. "schema": {
  7612. "type": "object",
  7613. "properties": {
  7614. "messageID": {
  7615. "type": "string",
  7616. "pattern": "^msg"
  7617. },
  7618. "agent": {
  7619. "type": "string"
  7620. },
  7621. "model": {
  7622. "type": "object",
  7623. "properties": {
  7624. "providerID": {
  7625. "type": "string"
  7626. },
  7627. "modelID": {
  7628. "type": "string"
  7629. }
  7630. },
  7631. "required": ["providerID", "modelID"],
  7632. "additionalProperties": false
  7633. },
  7634. "command": {
  7635. "type": "string"
  7636. }
  7637. },
  7638. "required": ["agent", "command"],
  7639. "additionalProperties": false
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "x-codeSamples": [
  7645. {
  7646. "lang": "js",
  7647. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7648. }
  7649. ]
  7650. }
  7651. },
  7652. "/session/{sessionID}/revert": {
  7653. "post": {
  7654. "tags": ["session"],
  7655. "operationId": "session.revert",
  7656. "parameters": [
  7657. {
  7658. "name": "sessionID",
  7659. "in": "path",
  7660. "schema": {
  7661. "type": "string",
  7662. "pattern": "^ses"
  7663. },
  7664. "required": true
  7665. },
  7666. {
  7667. "name": "directory",
  7668. "in": "query",
  7669. "schema": {
  7670. "type": "string"
  7671. },
  7672. "required": false
  7673. },
  7674. {
  7675. "name": "workspace",
  7676. "in": "query",
  7677. "schema": {
  7678. "type": "string"
  7679. },
  7680. "required": false
  7681. }
  7682. ],
  7683. "responses": {
  7684. "200": {
  7685. "description": "Updated session",
  7686. "content": {
  7687. "application/json": {
  7688. "schema": {
  7689. "$ref": "#/components/schemas/Session"
  7690. }
  7691. }
  7692. }
  7693. },
  7694. "400": {
  7695. "description": "BadRequest | InvalidRequestError",
  7696. "content": {
  7697. "application/json": {
  7698. "schema": {
  7699. "anyOf": [
  7700. {
  7701. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7702. },
  7703. {
  7704. "$ref": "#/components/schemas/InvalidRequestError"
  7705. }
  7706. ]
  7707. }
  7708. }
  7709. }
  7710. },
  7711. "404": {
  7712. "description": "NotFoundError",
  7713. "content": {
  7714. "application/json": {
  7715. "schema": {
  7716. "$ref": "#/components/schemas/NotFoundError"
  7717. }
  7718. }
  7719. }
  7720. },
  7721. "409": {
  7722. "description": "SessionBusyError",
  7723. "content": {
  7724. "application/json": {
  7725. "schema": {
  7726. "$ref": "#/components/schemas/SessionBusyError"
  7727. }
  7728. }
  7729. }
  7730. }
  7731. },
  7732. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7733. "summary": "Revert message",
  7734. "requestBody": {
  7735. "content": {
  7736. "application/json": {
  7737. "schema": {
  7738. "type": "object",
  7739. "properties": {
  7740. "messageID": {
  7741. "type": "string",
  7742. "pattern": "^msg"
  7743. },
  7744. "partID": {
  7745. "type": "string",
  7746. "pattern": "^prt"
  7747. }
  7748. },
  7749. "required": ["messageID"],
  7750. "additionalProperties": false
  7751. }
  7752. }
  7753. }
  7754. },
  7755. "x-codeSamples": [
  7756. {
  7757. "lang": "js",
  7758. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7759. }
  7760. ]
  7761. }
  7762. },
  7763. "/session/{sessionID}/unrevert": {
  7764. "post": {
  7765. "tags": ["session"],
  7766. "operationId": "session.unrevert",
  7767. "parameters": [
  7768. {
  7769. "name": "sessionID",
  7770. "in": "path",
  7771. "schema": {
  7772. "type": "string",
  7773. "pattern": "^ses"
  7774. },
  7775. "required": true
  7776. },
  7777. {
  7778. "name": "directory",
  7779. "in": "query",
  7780. "schema": {
  7781. "type": "string"
  7782. },
  7783. "required": false
  7784. },
  7785. {
  7786. "name": "workspace",
  7787. "in": "query",
  7788. "schema": {
  7789. "type": "string"
  7790. },
  7791. "required": false
  7792. }
  7793. ],
  7794. "responses": {
  7795. "200": {
  7796. "description": "Updated session",
  7797. "content": {
  7798. "application/json": {
  7799. "schema": {
  7800. "$ref": "#/components/schemas/Session"
  7801. }
  7802. }
  7803. }
  7804. },
  7805. "400": {
  7806. "description": "BadRequest | InvalidRequestError",
  7807. "content": {
  7808. "application/json": {
  7809. "schema": {
  7810. "anyOf": [
  7811. {
  7812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7813. },
  7814. {
  7815. "$ref": "#/components/schemas/InvalidRequestError"
  7816. }
  7817. ]
  7818. }
  7819. }
  7820. }
  7821. },
  7822. "404": {
  7823. "description": "NotFoundError",
  7824. "content": {
  7825. "application/json": {
  7826. "schema": {
  7827. "$ref": "#/components/schemas/NotFoundError"
  7828. }
  7829. }
  7830. }
  7831. },
  7832. "409": {
  7833. "description": "SessionBusyError",
  7834. "content": {
  7835. "application/json": {
  7836. "schema": {
  7837. "$ref": "#/components/schemas/SessionBusyError"
  7838. }
  7839. }
  7840. }
  7841. }
  7842. },
  7843. "description": "Restore all previously reverted messages in a session.",
  7844. "summary": "Restore reverted messages",
  7845. "x-codeSamples": [
  7846. {
  7847. "lang": "js",
  7848. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7849. }
  7850. ]
  7851. }
  7852. },
  7853. "/session/{sessionID}/permissions/{permissionID}": {
  7854. "post": {
  7855. "tags": ["session"],
  7856. "operationId": "permission.respond",
  7857. "parameters": [
  7858. {
  7859. "name": "sessionID",
  7860. "in": "path",
  7861. "schema": {
  7862. "type": "string",
  7863. "pattern": "^ses"
  7864. },
  7865. "required": true
  7866. },
  7867. {
  7868. "name": "permissionID",
  7869. "in": "path",
  7870. "schema": {
  7871. "type": "string",
  7872. "pattern": "^per"
  7873. },
  7874. "required": true
  7875. },
  7876. {
  7877. "name": "directory",
  7878. "in": "query",
  7879. "schema": {
  7880. "type": "string"
  7881. },
  7882. "required": false
  7883. },
  7884. {
  7885. "name": "workspace",
  7886. "in": "query",
  7887. "schema": {
  7888. "type": "string"
  7889. },
  7890. "required": false
  7891. }
  7892. ],
  7893. "responses": {
  7894. "200": {
  7895. "description": "Permission processed successfully",
  7896. "content": {
  7897. "application/json": {
  7898. "schema": {
  7899. "type": "boolean",
  7900. "description": "Permission processed successfully"
  7901. }
  7902. }
  7903. }
  7904. },
  7905. "400": {
  7906. "description": "BadRequest | InvalidRequestError",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "anyOf": [
  7911. {
  7912. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7913. },
  7914. {
  7915. "$ref": "#/components/schemas/InvalidRequestError"
  7916. }
  7917. ]
  7918. }
  7919. }
  7920. }
  7921. },
  7922. "404": {
  7923. "description": "NotFoundError | PermissionNotFoundError",
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "anyOf": [
  7928. {
  7929. "$ref": "#/components/schemas/NotFoundError"
  7930. },
  7931. {
  7932. "$ref": "#/components/schemas/PermissionNotFoundError"
  7933. }
  7934. ]
  7935. }
  7936. }
  7937. }
  7938. }
  7939. },
  7940. "description": "Approve or deny a permission request from the AI assistant.",
  7941. "summary": "Respond to permission",
  7942. "deprecated": true,
  7943. "requestBody": {
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "object",
  7948. "properties": {
  7949. "response": {
  7950. "type": "string",
  7951. "enum": ["once", "always", "reject"]
  7952. }
  7953. },
  7954. "required": ["response"],
  7955. "additionalProperties": false
  7956. }
  7957. }
  7958. }
  7959. },
  7960. "x-codeSamples": [
  7961. {
  7962. "lang": "js",
  7963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7964. }
  7965. ]
  7966. }
  7967. },
  7968. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7969. "delete": {
  7970. "tags": ["session"],
  7971. "operationId": "part.delete",
  7972. "parameters": [
  7973. {
  7974. "name": "sessionID",
  7975. "in": "path",
  7976. "schema": {
  7977. "type": "string",
  7978. "pattern": "^ses"
  7979. },
  7980. "required": true
  7981. },
  7982. {
  7983. "name": "messageID",
  7984. "in": "path",
  7985. "schema": {
  7986. "type": "string",
  7987. "pattern": "^msg"
  7988. },
  7989. "required": true
  7990. },
  7991. {
  7992. "name": "partID",
  7993. "in": "path",
  7994. "schema": {
  7995. "type": "string",
  7996. "pattern": "^prt"
  7997. },
  7998. "required": true
  7999. },
  8000. {
  8001. "name": "directory",
  8002. "in": "query",
  8003. "schema": {
  8004. "type": "string"
  8005. },
  8006. "required": false
  8007. },
  8008. {
  8009. "name": "workspace",
  8010. "in": "query",
  8011. "schema": {
  8012. "type": "string"
  8013. },
  8014. "required": false
  8015. }
  8016. ],
  8017. "responses": {
  8018. "200": {
  8019. "description": "Successfully deleted part",
  8020. "content": {
  8021. "application/json": {
  8022. "schema": {
  8023. "type": "boolean",
  8024. "description": "Successfully deleted part"
  8025. }
  8026. }
  8027. }
  8028. },
  8029. "400": {
  8030. "description": "BadRequest | InvalidRequestError",
  8031. "content": {
  8032. "application/json": {
  8033. "schema": {
  8034. "anyOf": [
  8035. {
  8036. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8037. },
  8038. {
  8039. "$ref": "#/components/schemas/InvalidRequestError"
  8040. }
  8041. ]
  8042. }
  8043. }
  8044. }
  8045. },
  8046. "404": {
  8047. "description": "NotFoundError",
  8048. "content": {
  8049. "application/json": {
  8050. "schema": {
  8051. "$ref": "#/components/schemas/NotFoundError"
  8052. }
  8053. }
  8054. }
  8055. }
  8056. },
  8057. "description": "Delete a part from a message.",
  8058. "x-codeSamples": [
  8059. {
  8060. "lang": "js",
  8061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  8062. }
  8063. ]
  8064. },
  8065. "patch": {
  8066. "tags": ["session"],
  8067. "operationId": "part.update",
  8068. "parameters": [
  8069. {
  8070. "name": "sessionID",
  8071. "in": "path",
  8072. "schema": {
  8073. "type": "string",
  8074. "pattern": "^ses"
  8075. },
  8076. "required": true
  8077. },
  8078. {
  8079. "name": "messageID",
  8080. "in": "path",
  8081. "schema": {
  8082. "type": "string",
  8083. "pattern": "^msg"
  8084. },
  8085. "required": true
  8086. },
  8087. {
  8088. "name": "partID",
  8089. "in": "path",
  8090. "schema": {
  8091. "type": "string",
  8092. "pattern": "^prt"
  8093. },
  8094. "required": true
  8095. },
  8096. {
  8097. "name": "directory",
  8098. "in": "query",
  8099. "schema": {
  8100. "type": "string"
  8101. },
  8102. "required": false
  8103. },
  8104. {
  8105. "name": "workspace",
  8106. "in": "query",
  8107. "schema": {
  8108. "type": "string"
  8109. },
  8110. "required": false
  8111. }
  8112. ],
  8113. "responses": {
  8114. "200": {
  8115. "description": "Successfully updated part",
  8116. "content": {
  8117. "application/json": {
  8118. "schema": {
  8119. "$ref": "#/components/schemas/Part"
  8120. }
  8121. }
  8122. }
  8123. },
  8124. "400": {
  8125. "description": "BadRequest | InvalidRequestError",
  8126. "content": {
  8127. "application/json": {
  8128. "schema": {
  8129. "anyOf": [
  8130. {
  8131. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8132. },
  8133. {
  8134. "$ref": "#/components/schemas/InvalidRequestError"
  8135. }
  8136. ]
  8137. }
  8138. }
  8139. }
  8140. },
  8141. "404": {
  8142. "description": "NotFoundError",
  8143. "content": {
  8144. "application/json": {
  8145. "schema": {
  8146. "$ref": "#/components/schemas/NotFoundError"
  8147. }
  8148. }
  8149. }
  8150. }
  8151. },
  8152. "description": "Update a part in a message.",
  8153. "requestBody": {
  8154. "content": {
  8155. "application/json": {
  8156. "schema": {
  8157. "$ref": "#/components/schemas/Part"
  8158. }
  8159. }
  8160. }
  8161. },
  8162. "x-codeSamples": [
  8163. {
  8164. "lang": "js",
  8165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8166. }
  8167. ]
  8168. }
  8169. },
  8170. "/sync/start": {
  8171. "post": {
  8172. "tags": ["sync"],
  8173. "operationId": "sync.start",
  8174. "parameters": [
  8175. {
  8176. "name": "directory",
  8177. "in": "query",
  8178. "schema": {
  8179. "type": "string"
  8180. },
  8181. "required": false
  8182. },
  8183. {
  8184. "name": "workspace",
  8185. "in": "query",
  8186. "schema": {
  8187. "type": "string"
  8188. },
  8189. "required": false
  8190. }
  8191. ],
  8192. "responses": {
  8193. "200": {
  8194. "description": "Workspace sync started",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "type": "boolean",
  8199. "description": "Workspace sync started"
  8200. }
  8201. }
  8202. }
  8203. },
  8204. "400": {
  8205. "description": "Bad request",
  8206. "content": {
  8207. "application/json": {
  8208. "schema": {
  8209. "$ref": "#/components/schemas/BadRequestError"
  8210. }
  8211. }
  8212. }
  8213. }
  8214. },
  8215. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8216. "summary": "Start workspace sync",
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/replay": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.replay",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Replayed sync events",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string"
  8257. }
  8258. },
  8259. "required": ["sessionID"],
  8260. "additionalProperties": false,
  8261. "description": "Replayed sync events"
  8262. }
  8263. }
  8264. }
  8265. },
  8266. "400": {
  8267. "description": "BadRequest | InvalidRequestError",
  8268. "content": {
  8269. "application/json": {
  8270. "schema": {
  8271. "anyOf": [
  8272. {
  8273. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8274. },
  8275. {
  8276. "$ref": "#/components/schemas/InvalidRequestError"
  8277. }
  8278. ]
  8279. }
  8280. }
  8281. }
  8282. }
  8283. },
  8284. "description": "Validate and replay a complete sync event history.",
  8285. "summary": "Replay sync events",
  8286. "requestBody": {
  8287. "content": {
  8288. "application/json": {
  8289. "schema": {
  8290. "type": "object",
  8291. "properties": {
  8292. "directory": {
  8293. "type": "string"
  8294. },
  8295. "events": {
  8296. "type": "array",
  8297. "minItems": 1,
  8298. "items": {
  8299. "type": "object",
  8300. "properties": {
  8301. "id": {
  8302. "type": "string",
  8303. "pattern": "^evt_"
  8304. },
  8305. "aggregateID": {
  8306. "type": "string"
  8307. },
  8308. "seq": {
  8309. "type": "integer",
  8310. "minimum": 0
  8311. },
  8312. "type": {
  8313. "type": "string"
  8314. },
  8315. "data": {
  8316. "type": "object"
  8317. }
  8318. },
  8319. "required": ["id", "aggregateID", "seq", "type", "data"],
  8320. "additionalProperties": false
  8321. }
  8322. }
  8323. },
  8324. "required": ["directory", "events"],
  8325. "additionalProperties": false
  8326. }
  8327. }
  8328. }
  8329. },
  8330. "x-codeSamples": [
  8331. {
  8332. "lang": "js",
  8333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8334. }
  8335. ]
  8336. }
  8337. },
  8338. "/sync/steal": {
  8339. "post": {
  8340. "tags": ["sync"],
  8341. "operationId": "sync.steal",
  8342. "parameters": [
  8343. {
  8344. "name": "directory",
  8345. "in": "query",
  8346. "schema": {
  8347. "type": "string"
  8348. },
  8349. "required": false
  8350. },
  8351. {
  8352. "name": "workspace",
  8353. "in": "query",
  8354. "schema": {
  8355. "type": "string"
  8356. },
  8357. "required": false
  8358. }
  8359. ],
  8360. "responses": {
  8361. "200": {
  8362. "description": "Session stolen into workspace",
  8363. "content": {
  8364. "application/json": {
  8365. "schema": {
  8366. "type": "object",
  8367. "properties": {
  8368. "sessionID": {
  8369. "type": "string",
  8370. "pattern": "^ses"
  8371. }
  8372. },
  8373. "required": ["sessionID"],
  8374. "additionalProperties": false,
  8375. "description": "Session stolen into workspace"
  8376. }
  8377. }
  8378. }
  8379. },
  8380. "400": {
  8381. "description": "BadRequest | InvalidRequestError",
  8382. "content": {
  8383. "application/json": {
  8384. "schema": {
  8385. "anyOf": [
  8386. {
  8387. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8388. },
  8389. {
  8390. "$ref": "#/components/schemas/InvalidRequestError"
  8391. }
  8392. ]
  8393. }
  8394. }
  8395. }
  8396. }
  8397. },
  8398. "description": "Update a session to belong to the current workspace through the sync event system.",
  8399. "summary": "Steal session into workspace",
  8400. "requestBody": {
  8401. "content": {
  8402. "application/json": {
  8403. "schema": {
  8404. "type": "object",
  8405. "properties": {
  8406. "sessionID": {
  8407. "type": "string",
  8408. "pattern": "^ses"
  8409. }
  8410. },
  8411. "required": ["sessionID"],
  8412. "additionalProperties": false
  8413. }
  8414. }
  8415. }
  8416. },
  8417. "x-codeSamples": [
  8418. {
  8419. "lang": "js",
  8420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8421. }
  8422. ]
  8423. }
  8424. },
  8425. "/sync/history": {
  8426. "post": {
  8427. "tags": ["sync"],
  8428. "operationId": "sync.history.list",
  8429. "parameters": [
  8430. {
  8431. "name": "directory",
  8432. "in": "query",
  8433. "schema": {
  8434. "type": "string"
  8435. },
  8436. "required": false
  8437. },
  8438. {
  8439. "name": "workspace",
  8440. "in": "query",
  8441. "schema": {
  8442. "type": "string"
  8443. },
  8444. "required": false
  8445. }
  8446. ],
  8447. "responses": {
  8448. "200": {
  8449. "description": "Sync events",
  8450. "content": {
  8451. "application/json": {
  8452. "schema": {
  8453. "type": "array",
  8454. "items": {
  8455. "type": "object",
  8456. "properties": {
  8457. "id": {
  8458. "type": "string",
  8459. "pattern": "^evt_"
  8460. },
  8461. "aggregate_id": {
  8462. "type": "string"
  8463. },
  8464. "seq": {
  8465. "type": "integer",
  8466. "minimum": 0
  8467. },
  8468. "type": {
  8469. "type": "string"
  8470. },
  8471. "data": {
  8472. "type": "object"
  8473. }
  8474. },
  8475. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8476. "additionalProperties": false
  8477. },
  8478. "description": "Sync events"
  8479. }
  8480. }
  8481. }
  8482. },
  8483. "400": {
  8484. "description": "BadRequest | InvalidRequestError",
  8485. "content": {
  8486. "application/json": {
  8487. "schema": {
  8488. "anyOf": [
  8489. {
  8490. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8491. },
  8492. {
  8493. "$ref": "#/components/schemas/InvalidRequestError"
  8494. }
  8495. ]
  8496. }
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8502. "summary": "List sync events",
  8503. "requestBody": {
  8504. "content": {
  8505. "application/json": {
  8506. "schema": {
  8507. "type": "object",
  8508. "additionalProperties": {
  8509. "type": "integer",
  8510. "minimum": 0
  8511. }
  8512. }
  8513. }
  8514. }
  8515. },
  8516. "x-codeSamples": [
  8517. {
  8518. "lang": "js",
  8519. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8520. }
  8521. ]
  8522. }
  8523. },
  8524. "/tui/append-prompt": {
  8525. "post": {
  8526. "tags": ["tui"],
  8527. "operationId": "tui.appendPrompt",
  8528. "parameters": [
  8529. {
  8530. "name": "directory",
  8531. "in": "query",
  8532. "schema": {
  8533. "type": "string"
  8534. },
  8535. "required": false
  8536. },
  8537. {
  8538. "name": "workspace",
  8539. "in": "query",
  8540. "schema": {
  8541. "type": "string"
  8542. },
  8543. "required": false
  8544. }
  8545. ],
  8546. "responses": {
  8547. "200": {
  8548. "description": "Prompt processed successfully",
  8549. "content": {
  8550. "application/json": {
  8551. "schema": {
  8552. "type": "boolean",
  8553. "description": "Prompt processed successfully"
  8554. }
  8555. }
  8556. }
  8557. },
  8558. "400": {
  8559. "description": "BadRequest | InvalidRequestError",
  8560. "content": {
  8561. "application/json": {
  8562. "schema": {
  8563. "anyOf": [
  8564. {
  8565. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8566. },
  8567. {
  8568. "$ref": "#/components/schemas/InvalidRequestError"
  8569. }
  8570. ]
  8571. }
  8572. }
  8573. }
  8574. }
  8575. },
  8576. "description": "Append prompt to the TUI.",
  8577. "summary": "Append TUI prompt",
  8578. "requestBody": {
  8579. "content": {
  8580. "application/json": {
  8581. "schema": {
  8582. "type": "object",
  8583. "properties": {
  8584. "text": {
  8585. "type": "string"
  8586. }
  8587. },
  8588. "required": ["text"],
  8589. "additionalProperties": false
  8590. }
  8591. }
  8592. }
  8593. },
  8594. "x-codeSamples": [
  8595. {
  8596. "lang": "js",
  8597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8598. }
  8599. ]
  8600. }
  8601. },
  8602. "/tui/open-help": {
  8603. "post": {
  8604. "tags": ["tui"],
  8605. "operationId": "tui.openHelp",
  8606. "parameters": [
  8607. {
  8608. "name": "directory",
  8609. "in": "query",
  8610. "schema": {
  8611. "type": "string"
  8612. },
  8613. "required": false
  8614. },
  8615. {
  8616. "name": "workspace",
  8617. "in": "query",
  8618. "schema": {
  8619. "type": "string"
  8620. },
  8621. "required": false
  8622. }
  8623. ],
  8624. "responses": {
  8625. "200": {
  8626. "description": "Help dialog opened successfully",
  8627. "content": {
  8628. "application/json": {
  8629. "schema": {
  8630. "type": "boolean",
  8631. "description": "Help dialog opened successfully"
  8632. }
  8633. }
  8634. }
  8635. },
  8636. "400": {
  8637. "description": "Bad request",
  8638. "content": {
  8639. "application/json": {
  8640. "schema": {
  8641. "$ref": "#/components/schemas/BadRequestError"
  8642. }
  8643. }
  8644. }
  8645. }
  8646. },
  8647. "description": "Open the help dialog in the TUI to display user assistance information.",
  8648. "summary": "Open help dialog",
  8649. "x-codeSamples": [
  8650. {
  8651. "lang": "js",
  8652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8653. }
  8654. ]
  8655. }
  8656. },
  8657. "/tui/open-sessions": {
  8658. "post": {
  8659. "tags": ["tui"],
  8660. "operationId": "tui.openSessions",
  8661. "parameters": [
  8662. {
  8663. "name": "directory",
  8664. "in": "query",
  8665. "schema": {
  8666. "type": "string"
  8667. },
  8668. "required": false
  8669. },
  8670. {
  8671. "name": "workspace",
  8672. "in": "query",
  8673. "schema": {
  8674. "type": "string"
  8675. },
  8676. "required": false
  8677. }
  8678. ],
  8679. "responses": {
  8680. "200": {
  8681. "description": "Session dialog opened successfully",
  8682. "content": {
  8683. "application/json": {
  8684. "schema": {
  8685. "type": "boolean",
  8686. "description": "Session dialog opened successfully"
  8687. }
  8688. }
  8689. }
  8690. },
  8691. "400": {
  8692. "description": "Bad request",
  8693. "content": {
  8694. "application/json": {
  8695. "schema": {
  8696. "$ref": "#/components/schemas/BadRequestError"
  8697. }
  8698. }
  8699. }
  8700. }
  8701. },
  8702. "description": "Open the session dialog.",
  8703. "summary": "Open sessions dialog",
  8704. "x-codeSamples": [
  8705. {
  8706. "lang": "js",
  8707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8708. }
  8709. ]
  8710. }
  8711. },
  8712. "/tui/open-themes": {
  8713. "post": {
  8714. "tags": ["tui"],
  8715. "operationId": "tui.openThemes",
  8716. "parameters": [
  8717. {
  8718. "name": "directory",
  8719. "in": "query",
  8720. "schema": {
  8721. "type": "string"
  8722. },
  8723. "required": false
  8724. },
  8725. {
  8726. "name": "workspace",
  8727. "in": "query",
  8728. "schema": {
  8729. "type": "string"
  8730. },
  8731. "required": false
  8732. }
  8733. ],
  8734. "responses": {
  8735. "200": {
  8736. "description": "Theme dialog opened successfully",
  8737. "content": {
  8738. "application/json": {
  8739. "schema": {
  8740. "type": "boolean",
  8741. "description": "Theme dialog opened successfully"
  8742. }
  8743. }
  8744. }
  8745. },
  8746. "400": {
  8747. "description": "Bad request",
  8748. "content": {
  8749. "application/json": {
  8750. "schema": {
  8751. "$ref": "#/components/schemas/BadRequestError"
  8752. }
  8753. }
  8754. }
  8755. }
  8756. },
  8757. "description": "Open the theme dialog.",
  8758. "summary": "Open themes dialog",
  8759. "x-codeSamples": [
  8760. {
  8761. "lang": "js",
  8762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8763. }
  8764. ]
  8765. }
  8766. },
  8767. "/tui/open-models": {
  8768. "post": {
  8769. "tags": ["tui"],
  8770. "operationId": "tui.openModels",
  8771. "parameters": [
  8772. {
  8773. "name": "directory",
  8774. "in": "query",
  8775. "schema": {
  8776. "type": "string"
  8777. },
  8778. "required": false
  8779. },
  8780. {
  8781. "name": "workspace",
  8782. "in": "query",
  8783. "schema": {
  8784. "type": "string"
  8785. },
  8786. "required": false
  8787. }
  8788. ],
  8789. "responses": {
  8790. "200": {
  8791. "description": "Model dialog opened successfully",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "type": "boolean",
  8796. "description": "Model dialog opened successfully"
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "400": {
  8802. "description": "Bad request",
  8803. "content": {
  8804. "application/json": {
  8805. "schema": {
  8806. "$ref": "#/components/schemas/BadRequestError"
  8807. }
  8808. }
  8809. }
  8810. }
  8811. },
  8812. "description": "Open the model dialog.",
  8813. "summary": "Open models dialog",
  8814. "x-codeSamples": [
  8815. {
  8816. "lang": "js",
  8817. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8818. }
  8819. ]
  8820. }
  8821. },
  8822. "/tui/submit-prompt": {
  8823. "post": {
  8824. "tags": ["tui"],
  8825. "operationId": "tui.submitPrompt",
  8826. "parameters": [
  8827. {
  8828. "name": "directory",
  8829. "in": "query",
  8830. "schema": {
  8831. "type": "string"
  8832. },
  8833. "required": false
  8834. },
  8835. {
  8836. "name": "workspace",
  8837. "in": "query",
  8838. "schema": {
  8839. "type": "string"
  8840. },
  8841. "required": false
  8842. }
  8843. ],
  8844. "responses": {
  8845. "200": {
  8846. "description": "Prompt submitted successfully",
  8847. "content": {
  8848. "application/json": {
  8849. "schema": {
  8850. "type": "boolean",
  8851. "description": "Prompt submitted successfully"
  8852. }
  8853. }
  8854. }
  8855. },
  8856. "400": {
  8857. "description": "Bad request",
  8858. "content": {
  8859. "application/json": {
  8860. "schema": {
  8861. "$ref": "#/components/schemas/BadRequestError"
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "description": "Submit the prompt.",
  8868. "summary": "Submit TUI prompt",
  8869. "x-codeSamples": [
  8870. {
  8871. "lang": "js",
  8872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8873. }
  8874. ]
  8875. }
  8876. },
  8877. "/tui/clear-prompt": {
  8878. "post": {
  8879. "tags": ["tui"],
  8880. "operationId": "tui.clearPrompt",
  8881. "parameters": [
  8882. {
  8883. "name": "directory",
  8884. "in": "query",
  8885. "schema": {
  8886. "type": "string"
  8887. },
  8888. "required": false
  8889. },
  8890. {
  8891. "name": "workspace",
  8892. "in": "query",
  8893. "schema": {
  8894. "type": "string"
  8895. },
  8896. "required": false
  8897. }
  8898. ],
  8899. "responses": {
  8900. "200": {
  8901. "description": "Prompt cleared successfully",
  8902. "content": {
  8903. "application/json": {
  8904. "schema": {
  8905. "type": "boolean",
  8906. "description": "Prompt cleared successfully"
  8907. }
  8908. }
  8909. }
  8910. },
  8911. "400": {
  8912. "description": "Bad request",
  8913. "content": {
  8914. "application/json": {
  8915. "schema": {
  8916. "$ref": "#/components/schemas/BadRequestError"
  8917. }
  8918. }
  8919. }
  8920. }
  8921. },
  8922. "description": "Clear the prompt.",
  8923. "summary": "Clear TUI prompt",
  8924. "x-codeSamples": [
  8925. {
  8926. "lang": "js",
  8927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8928. }
  8929. ]
  8930. }
  8931. },
  8932. "/tui/execute-command": {
  8933. "post": {
  8934. "tags": ["tui"],
  8935. "operationId": "tui.executeCommand",
  8936. "parameters": [
  8937. {
  8938. "name": "directory",
  8939. "in": "query",
  8940. "schema": {
  8941. "type": "string"
  8942. },
  8943. "required": false
  8944. },
  8945. {
  8946. "name": "workspace",
  8947. "in": "query",
  8948. "schema": {
  8949. "type": "string"
  8950. },
  8951. "required": false
  8952. }
  8953. ],
  8954. "responses": {
  8955. "200": {
  8956. "description": "Command executed successfully",
  8957. "content": {
  8958. "application/json": {
  8959. "schema": {
  8960. "type": "boolean",
  8961. "description": "Command executed successfully"
  8962. }
  8963. }
  8964. }
  8965. },
  8966. "400": {
  8967. "description": "BadRequest | InvalidRequestError",
  8968. "content": {
  8969. "application/json": {
  8970. "schema": {
  8971. "anyOf": [
  8972. {
  8973. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8974. },
  8975. {
  8976. "$ref": "#/components/schemas/InvalidRequestError"
  8977. }
  8978. ]
  8979. }
  8980. }
  8981. }
  8982. }
  8983. },
  8984. "description": "Execute a TUI command.",
  8985. "summary": "Execute TUI command",
  8986. "requestBody": {
  8987. "content": {
  8988. "application/json": {
  8989. "schema": {
  8990. "type": "object",
  8991. "properties": {
  8992. "command": {
  8993. "type": "string"
  8994. }
  8995. },
  8996. "required": ["command"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/show-toast": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.showToast",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Toast notification shown successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Toast notification shown successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "Bad request",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "$ref": "#/components/schemas/BadRequestError"
  9050. }
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "description": "Show a toast notification in the TUI.",
  9056. "summary": "Show TUI toast",
  9057. "requestBody": {
  9058. "content": {
  9059. "application/json": {
  9060. "schema": {
  9061. "type": "object",
  9062. "properties": {
  9063. "title": {
  9064. "type": "string"
  9065. },
  9066. "message": {
  9067. "type": "string"
  9068. },
  9069. "variant": {
  9070. "type": "string",
  9071. "enum": ["info", "success", "warning", "error"]
  9072. },
  9073. "duration": {
  9074. "type": "integer",
  9075. "exclusiveMinimum": 0
  9076. }
  9077. },
  9078. "required": ["message", "variant"],
  9079. "additionalProperties": false
  9080. }
  9081. }
  9082. }
  9083. },
  9084. "x-codeSamples": [
  9085. {
  9086. "lang": "js",
  9087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9088. }
  9089. ]
  9090. }
  9091. },
  9092. "/tui/publish": {
  9093. "post": {
  9094. "tags": ["tui"],
  9095. "operationId": "tui.publish",
  9096. "parameters": [
  9097. {
  9098. "name": "directory",
  9099. "in": "query",
  9100. "schema": {
  9101. "type": "string"
  9102. },
  9103. "required": false
  9104. },
  9105. {
  9106. "name": "workspace",
  9107. "in": "query",
  9108. "schema": {
  9109. "type": "string"
  9110. },
  9111. "required": false
  9112. }
  9113. ],
  9114. "responses": {
  9115. "200": {
  9116. "description": "Event published successfully",
  9117. "content": {
  9118. "application/json": {
  9119. "schema": {
  9120. "type": "boolean",
  9121. "description": "Event published successfully"
  9122. }
  9123. }
  9124. }
  9125. },
  9126. "400": {
  9127. "description": "BadRequest | InvalidRequestError",
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "anyOf": [
  9132. {
  9133. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9134. },
  9135. {
  9136. "$ref": "#/components/schemas/InvalidRequestError"
  9137. }
  9138. ]
  9139. }
  9140. }
  9141. }
  9142. }
  9143. },
  9144. "description": "Publish a TUI event.",
  9145. "summary": "Publish TUI event",
  9146. "requestBody": {
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "anyOf": [
  9151. {
  9152. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9153. },
  9154. {
  9155. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9156. },
  9157. {
  9158. "$ref": "#/components/schemas/EventTuiToastShow"
  9159. },
  9160. {
  9161. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9162. }
  9163. ]
  9164. }
  9165. }
  9166. }
  9167. },
  9168. "x-codeSamples": [
  9169. {
  9170. "lang": "js",
  9171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9172. }
  9173. ]
  9174. }
  9175. },
  9176. "/tui/select-session": {
  9177. "post": {
  9178. "tags": ["tui"],
  9179. "operationId": "tui.selectSession",
  9180. "parameters": [
  9181. {
  9182. "name": "directory",
  9183. "in": "query",
  9184. "schema": {
  9185. "type": "string"
  9186. },
  9187. "required": false
  9188. },
  9189. {
  9190. "name": "workspace",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. }
  9197. ],
  9198. "responses": {
  9199. "200": {
  9200. "description": "Session selected successfully",
  9201. "content": {
  9202. "application/json": {
  9203. "schema": {
  9204. "type": "boolean",
  9205. "description": "Session selected successfully"
  9206. }
  9207. }
  9208. }
  9209. },
  9210. "400": {
  9211. "description": "BadRequest | InvalidRequestError",
  9212. "content": {
  9213. "application/json": {
  9214. "schema": {
  9215. "anyOf": [
  9216. {
  9217. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9218. },
  9219. {
  9220. "$ref": "#/components/schemas/InvalidRequestError"
  9221. }
  9222. ]
  9223. }
  9224. }
  9225. }
  9226. },
  9227. "404": {
  9228. "description": "NotFoundError",
  9229. "content": {
  9230. "application/json": {
  9231. "schema": {
  9232. "$ref": "#/components/schemas/NotFoundError"
  9233. }
  9234. }
  9235. }
  9236. }
  9237. },
  9238. "description": "Navigate the TUI to display the specified session.",
  9239. "summary": "Select session",
  9240. "requestBody": {
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "object",
  9245. "properties": {
  9246. "sessionID": {
  9247. "type": "string",
  9248. "pattern": "^ses",
  9249. "description": "Session ID to navigate to"
  9250. }
  9251. },
  9252. "required": ["sessionID"],
  9253. "additionalProperties": false
  9254. }
  9255. }
  9256. }
  9257. },
  9258. "x-codeSamples": [
  9259. {
  9260. "lang": "js",
  9261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9262. }
  9263. ]
  9264. }
  9265. },
  9266. "/tui/control/next": {
  9267. "get": {
  9268. "tags": ["tui"],
  9269. "operationId": "tui.control.next",
  9270. "parameters": [
  9271. {
  9272. "name": "directory",
  9273. "in": "query",
  9274. "schema": {
  9275. "type": "string"
  9276. },
  9277. "required": false
  9278. },
  9279. {
  9280. "name": "workspace",
  9281. "in": "query",
  9282. "schema": {
  9283. "type": "string"
  9284. },
  9285. "required": false
  9286. }
  9287. ],
  9288. "responses": {
  9289. "200": {
  9290. "description": "Next TUI request",
  9291. "content": {
  9292. "application/json": {
  9293. "schema": {
  9294. "type": "object",
  9295. "properties": {
  9296. "path": {
  9297. "type": "string"
  9298. },
  9299. "body": {}
  9300. },
  9301. "required": ["path", "body"],
  9302. "additionalProperties": false,
  9303. "description": "Next TUI request"
  9304. }
  9305. }
  9306. }
  9307. },
  9308. "400": {
  9309. "description": "Bad request",
  9310. "content": {
  9311. "application/json": {
  9312. "schema": {
  9313. "$ref": "#/components/schemas/BadRequestError"
  9314. }
  9315. }
  9316. }
  9317. }
  9318. },
  9319. "description": "Retrieve the next TUI request from the queue for processing.",
  9320. "summary": "Get next TUI request",
  9321. "x-codeSamples": [
  9322. {
  9323. "lang": "js",
  9324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9325. }
  9326. ]
  9327. }
  9328. },
  9329. "/tui/control/response": {
  9330. "post": {
  9331. "tags": ["tui"],
  9332. "operationId": "tui.control.response",
  9333. "parameters": [
  9334. {
  9335. "name": "directory",
  9336. "in": "query",
  9337. "schema": {
  9338. "type": "string"
  9339. },
  9340. "required": false
  9341. },
  9342. {
  9343. "name": "workspace",
  9344. "in": "query",
  9345. "schema": {
  9346. "type": "string"
  9347. },
  9348. "required": false
  9349. }
  9350. ],
  9351. "responses": {
  9352. "200": {
  9353. "description": "Response submitted successfully",
  9354. "content": {
  9355. "application/json": {
  9356. "schema": {
  9357. "type": "boolean",
  9358. "description": "Response submitted successfully"
  9359. }
  9360. }
  9361. }
  9362. },
  9363. "400": {
  9364. "description": "Bad request",
  9365. "content": {
  9366. "application/json": {
  9367. "schema": {
  9368. "$ref": "#/components/schemas/BadRequestError"
  9369. }
  9370. }
  9371. }
  9372. }
  9373. },
  9374. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9375. "summary": "Submit TUI response",
  9376. "requestBody": {
  9377. "content": {
  9378. "application/json": {
  9379. "schema": {}
  9380. }
  9381. }
  9382. },
  9383. "x-codeSamples": [
  9384. {
  9385. "lang": "js",
  9386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9387. }
  9388. ]
  9389. }
  9390. },
  9391. "/experimental/workspace/adapter": {
  9392. "get": {
  9393. "tags": ["workspace"],
  9394. "operationId": "experimental.workspace.adapter.list",
  9395. "parameters": [
  9396. {
  9397. "name": "directory",
  9398. "in": "query",
  9399. "schema": {
  9400. "type": "string"
  9401. },
  9402. "required": false
  9403. },
  9404. {
  9405. "name": "workspace",
  9406. "in": "query",
  9407. "schema": {
  9408. "type": "string"
  9409. },
  9410. "required": false
  9411. }
  9412. ],
  9413. "responses": {
  9414. "200": {
  9415. "description": "Workspace adapters",
  9416. "content": {
  9417. "application/json": {
  9418. "schema": {
  9419. "type": "array",
  9420. "items": {
  9421. "type": "object",
  9422. "properties": {
  9423. "type": {
  9424. "type": "string"
  9425. },
  9426. "name": {
  9427. "type": "string"
  9428. },
  9429. "description": {
  9430. "type": "string"
  9431. }
  9432. },
  9433. "required": ["type", "name", "description"],
  9434. "additionalProperties": false
  9435. },
  9436. "description": "Workspace adapters"
  9437. }
  9438. }
  9439. }
  9440. },
  9441. "400": {
  9442. "description": "Bad request",
  9443. "content": {
  9444. "application/json": {
  9445. "schema": {
  9446. "$ref": "#/components/schemas/BadRequestError"
  9447. }
  9448. }
  9449. }
  9450. }
  9451. },
  9452. "description": "List all available workspace adapters for the current project.",
  9453. "summary": "List workspace adapters",
  9454. "x-codeSamples": [
  9455. {
  9456. "lang": "js",
  9457. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9458. }
  9459. ]
  9460. }
  9461. },
  9462. "/experimental/workspace": {
  9463. "get": {
  9464. "tags": ["workspace"],
  9465. "operationId": "experimental.workspace.list",
  9466. "parameters": [
  9467. {
  9468. "name": "directory",
  9469. "in": "query",
  9470. "schema": {
  9471. "type": "string"
  9472. },
  9473. "required": false
  9474. },
  9475. {
  9476. "name": "workspace",
  9477. "in": "query",
  9478. "schema": {
  9479. "type": "string"
  9480. },
  9481. "required": false
  9482. }
  9483. ],
  9484. "responses": {
  9485. "200": {
  9486. "description": "Workspaces",
  9487. "content": {
  9488. "application/json": {
  9489. "schema": {
  9490. "type": "array",
  9491. "items": {
  9492. "$ref": "#/components/schemas/Workspace"
  9493. },
  9494. "description": "Workspaces"
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "400": {
  9500. "description": "Bad request",
  9501. "content": {
  9502. "application/json": {
  9503. "schema": {
  9504. "$ref": "#/components/schemas/BadRequestError"
  9505. }
  9506. }
  9507. }
  9508. }
  9509. },
  9510. "description": "List all workspaces.",
  9511. "summary": "List workspaces",
  9512. "x-codeSamples": [
  9513. {
  9514. "lang": "js",
  9515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9516. }
  9517. ]
  9518. },
  9519. "post": {
  9520. "tags": ["workspace"],
  9521. "operationId": "experimental.workspace.create",
  9522. "parameters": [
  9523. {
  9524. "name": "directory",
  9525. "in": "query",
  9526. "schema": {
  9527. "type": "string"
  9528. },
  9529. "required": false
  9530. },
  9531. {
  9532. "name": "workspace",
  9533. "in": "query",
  9534. "schema": {
  9535. "type": "string"
  9536. },
  9537. "required": false
  9538. }
  9539. ],
  9540. "responses": {
  9541. "200": {
  9542. "description": "Workspace created",
  9543. "content": {
  9544. "application/json": {
  9545. "schema": {
  9546. "$ref": "#/components/schemas/Workspace"
  9547. }
  9548. }
  9549. }
  9550. },
  9551. "400": {
  9552. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9553. "content": {
  9554. "application/json": {
  9555. "schema": {
  9556. "anyOf": [
  9557. {
  9558. "$ref": "#/components/schemas/WorkspaceCreateError"
  9559. },
  9560. {
  9561. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9562. },
  9563. {
  9564. "$ref": "#/components/schemas/InvalidRequestError"
  9565. }
  9566. ]
  9567. }
  9568. }
  9569. }
  9570. }
  9571. },
  9572. "description": "Create a workspace for the current project.",
  9573. "summary": "Create workspace",
  9574. "requestBody": {
  9575. "content": {
  9576. "application/json": {
  9577. "schema": {
  9578. "type": "object",
  9579. "properties": {
  9580. "id": {
  9581. "type": "string",
  9582. "pattern": "^wrk"
  9583. },
  9584. "type": {
  9585. "type": "string"
  9586. },
  9587. "branch": {
  9588. "anyOf": [
  9589. {
  9590. "type": "string"
  9591. },
  9592. {
  9593. "type": "null"
  9594. }
  9595. ]
  9596. },
  9597. "extra": {
  9598. "anyOf": [
  9599. {},
  9600. {
  9601. "type": "null"
  9602. }
  9603. ]
  9604. }
  9605. },
  9606. "required": ["type"],
  9607. "additionalProperties": false
  9608. }
  9609. }
  9610. }
  9611. },
  9612. "x-codeSamples": [
  9613. {
  9614. "lang": "js",
  9615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9616. }
  9617. ]
  9618. }
  9619. },
  9620. "/experimental/workspace/sync-list": {
  9621. "post": {
  9622. "tags": ["workspace"],
  9623. "operationId": "experimental.workspace.syncList",
  9624. "parameters": [
  9625. {
  9626. "name": "directory",
  9627. "in": "query",
  9628. "schema": {
  9629. "type": "string"
  9630. },
  9631. "required": false
  9632. },
  9633. {
  9634. "name": "workspace",
  9635. "in": "query",
  9636. "schema": {
  9637. "type": "string"
  9638. },
  9639. "required": false
  9640. }
  9641. ],
  9642. "responses": {
  9643. "204": {
  9644. "description": "Workspace list synced"
  9645. },
  9646. "400": {
  9647. "description": "Bad request",
  9648. "content": {
  9649. "application/json": {
  9650. "schema": {
  9651. "$ref": "#/components/schemas/BadRequestError"
  9652. }
  9653. }
  9654. }
  9655. }
  9656. },
  9657. "description": "Register missing workspaces returned by workspace adapters.",
  9658. "summary": "Sync workspace list",
  9659. "x-codeSamples": [
  9660. {
  9661. "lang": "js",
  9662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9663. }
  9664. ]
  9665. }
  9666. },
  9667. "/experimental/workspace/status": {
  9668. "get": {
  9669. "tags": ["workspace"],
  9670. "operationId": "experimental.workspace.status",
  9671. "parameters": [
  9672. {
  9673. "name": "directory",
  9674. "in": "query",
  9675. "schema": {
  9676. "type": "string"
  9677. },
  9678. "required": false
  9679. },
  9680. {
  9681. "name": "workspace",
  9682. "in": "query",
  9683. "schema": {
  9684. "type": "string"
  9685. },
  9686. "required": false
  9687. }
  9688. ],
  9689. "responses": {
  9690. "200": {
  9691. "description": "Workspace status",
  9692. "content": {
  9693. "application/json": {
  9694. "schema": {
  9695. "type": "array",
  9696. "items": {
  9697. "type": "object",
  9698. "properties": {
  9699. "workspaceID": {
  9700. "type": "string",
  9701. "pattern": "^wrk"
  9702. },
  9703. "status": {
  9704. "type": "string",
  9705. "enum": ["connected", "connecting", "disconnected", "error"]
  9706. }
  9707. },
  9708. "required": ["workspaceID", "status"],
  9709. "additionalProperties": false
  9710. },
  9711. "description": "Workspace status"
  9712. }
  9713. }
  9714. }
  9715. },
  9716. "400": {
  9717. "description": "Bad request",
  9718. "content": {
  9719. "application/json": {
  9720. "schema": {
  9721. "$ref": "#/components/schemas/BadRequestError"
  9722. }
  9723. }
  9724. }
  9725. }
  9726. },
  9727. "description": "Get connection status for workspaces in the current project.",
  9728. "summary": "Workspace status",
  9729. "x-codeSamples": [
  9730. {
  9731. "lang": "js",
  9732. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9733. }
  9734. ]
  9735. }
  9736. },
  9737. "/experimental/workspace/{id}": {
  9738. "delete": {
  9739. "tags": ["workspace"],
  9740. "operationId": "experimental.workspace.remove",
  9741. "parameters": [
  9742. {
  9743. "name": "id",
  9744. "in": "path",
  9745. "schema": {
  9746. "type": "string",
  9747. "pattern": "^wrk"
  9748. },
  9749. "required": true
  9750. },
  9751. {
  9752. "name": "directory",
  9753. "in": "query",
  9754. "schema": {
  9755. "type": "string"
  9756. },
  9757. "required": false
  9758. },
  9759. {
  9760. "name": "workspace",
  9761. "in": "query",
  9762. "schema": {
  9763. "type": "string"
  9764. },
  9765. "required": false
  9766. }
  9767. ],
  9768. "responses": {
  9769. "200": {
  9770. "description": "Workspace removed",
  9771. "content": {
  9772. "application/json": {
  9773. "schema": {
  9774. "$ref": "#/components/schemas/Workspace"
  9775. }
  9776. }
  9777. }
  9778. },
  9779. "400": {
  9780. "description": "BadRequest | InvalidRequestError",
  9781. "content": {
  9782. "application/json": {
  9783. "schema": {
  9784. "anyOf": [
  9785. {
  9786. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9787. },
  9788. {
  9789. "$ref": "#/components/schemas/InvalidRequestError"
  9790. }
  9791. ]
  9792. }
  9793. }
  9794. }
  9795. }
  9796. },
  9797. "description": "Remove an existing workspace.",
  9798. "summary": "Remove workspace",
  9799. "x-codeSamples": [
  9800. {
  9801. "lang": "js",
  9802. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9803. }
  9804. ]
  9805. }
  9806. },
  9807. "/experimental/workspace/warp": {
  9808. "post": {
  9809. "tags": ["workspace"],
  9810. "operationId": "experimental.workspace.warp",
  9811. "parameters": [
  9812. {
  9813. "name": "directory",
  9814. "in": "query",
  9815. "schema": {
  9816. "type": "string"
  9817. },
  9818. "required": false
  9819. },
  9820. {
  9821. "name": "workspace",
  9822. "in": "query",
  9823. "schema": {
  9824. "type": "string"
  9825. },
  9826. "required": false
  9827. }
  9828. ],
  9829. "responses": {
  9830. "204": {
  9831. "description": "Session warped"
  9832. },
  9833. "400": {
  9834. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9835. "content": {
  9836. "application/json": {
  9837. "schema": {
  9838. "anyOf": [
  9839. {
  9840. "$ref": "#/components/schemas/WorkspaceWarpError"
  9841. },
  9842. {
  9843. "$ref": "#/components/schemas/VcsApplyError"
  9844. },
  9845. {
  9846. "$ref": "#/components/schemas/InvalidRequestError"
  9847. }
  9848. ]
  9849. }
  9850. }
  9851. }
  9852. },
  9853. "404": {
  9854. "description": "NotFoundError",
  9855. "content": {
  9856. "application/json": {
  9857. "schema": {
  9858. "$ref": "#/components/schemas/NotFoundError"
  9859. }
  9860. }
  9861. }
  9862. }
  9863. },
  9864. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9865. "summary": "Warp session into workspace",
  9866. "requestBody": {
  9867. "content": {
  9868. "application/json": {
  9869. "schema": {
  9870. "type": "object",
  9871. "properties": {
  9872. "id": {
  9873. "anyOf": [
  9874. {
  9875. "type": "string",
  9876. "pattern": "^wrk"
  9877. },
  9878. {
  9879. "type": "null"
  9880. }
  9881. ]
  9882. },
  9883. "sessionID": {
  9884. "type": "string",
  9885. "pattern": "^ses"
  9886. },
  9887. "copyChanges": {
  9888. "type": "boolean"
  9889. }
  9890. },
  9891. "required": ["id", "sessionID"],
  9892. "additionalProperties": false
  9893. }
  9894. }
  9895. }
  9896. },
  9897. "x-codeSamples": [
  9898. {
  9899. "lang": "js",
  9900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9901. }
  9902. ]
  9903. }
  9904. },
  9905. "/api/health": {
  9906. "get": {
  9907. "tags": ["opencode HttpApi"],
  9908. "operationId": "v2.health.get",
  9909. "parameters": [],
  9910. "security": [],
  9911. "responses": {
  9912. "200": {
  9913. "description": "Success",
  9914. "content": {
  9915. "application/json": {
  9916. "schema": {
  9917. "type": "object",
  9918. "properties": {
  9919. "healthy": {
  9920. "type": "boolean",
  9921. "enum": [true]
  9922. }
  9923. },
  9924. "required": ["healthy"],
  9925. "additionalProperties": false
  9926. }
  9927. }
  9928. }
  9929. },
  9930. "400": {
  9931. "description": "InvalidRequestError",
  9932. "content": {
  9933. "application/json": {
  9934. "schema": {
  9935. "$ref": "#/components/schemas/InvalidRequestError"
  9936. }
  9937. }
  9938. }
  9939. },
  9940. "401": {
  9941. "description": "UnauthorizedError",
  9942. "content": {
  9943. "application/json": {
  9944. "schema": {
  9945. "$ref": "#/components/schemas/UnauthorizedError"
  9946. }
  9947. }
  9948. }
  9949. }
  9950. },
  9951. "description": "Check whether the API server is ready to accept requests.",
  9952. "summary": "Check server health",
  9953. "x-codeSamples": [
  9954. {
  9955. "lang": "js",
  9956. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9957. }
  9958. ]
  9959. }
  9960. },
  9961. "/api/agent": {
  9962. "get": {
  9963. "tags": ["opencode HttpApi"],
  9964. "operationId": "v2.agent.list",
  9965. "parameters": [
  9966. {
  9967. "name": "location",
  9968. "in": "query",
  9969. "schema": {
  9970. "type": "object",
  9971. "properties": {
  9972. "directory": {
  9973. "type": "string"
  9974. },
  9975. "workspace": {
  9976. "type": "string"
  9977. }
  9978. },
  9979. "additionalProperties": false
  9980. },
  9981. "required": false,
  9982. "style": "deepObject",
  9983. "explode": true
  9984. }
  9985. ],
  9986. "security": [],
  9987. "responses": {
  9988. "200": {
  9989. "description": "Success",
  9990. "content": {
  9991. "application/json": {
  9992. "schema": {
  9993. "type": "object",
  9994. "properties": {
  9995. "location": {
  9996. "$ref": "#/components/schemas/LocationInfo"
  9997. },
  9998. "data": {
  9999. "type": "array",
  10000. "items": {
  10001. "$ref": "#/components/schemas/AgentV2Info"
  10002. }
  10003. }
  10004. },
  10005. "required": ["location", "data"],
  10006. "additionalProperties": false
  10007. }
  10008. }
  10009. }
  10010. },
  10011. "400": {
  10012. "description": "InvalidRequestError",
  10013. "content": {
  10014. "application/json": {
  10015. "schema": {
  10016. "$ref": "#/components/schemas/InvalidRequestError"
  10017. }
  10018. }
  10019. }
  10020. },
  10021. "401": {
  10022. "description": "UnauthorizedError",
  10023. "content": {
  10024. "application/json": {
  10025. "schema": {
  10026. "$ref": "#/components/schemas/UnauthorizedError"
  10027. }
  10028. }
  10029. }
  10030. }
  10031. },
  10032. "description": "Retrieve currently registered agents.",
  10033. "summary": "List agents",
  10034. "x-codeSamples": [
  10035. {
  10036. "lang": "js",
  10037. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10038. }
  10039. ]
  10040. }
  10041. },
  10042. "/api/session": {
  10043. "get": {
  10044. "tags": ["sessions"],
  10045. "operationId": "v2.session.list",
  10046. "parameters": [
  10047. {
  10048. "name": "workspace",
  10049. "in": "query",
  10050. "schema": {
  10051. "type": "string",
  10052. "pattern": "^wrk"
  10053. },
  10054. "required": false
  10055. },
  10056. {
  10057. "name": "limit",
  10058. "in": "query",
  10059. "schema": {
  10060. "type": "number"
  10061. },
  10062. "required": false
  10063. },
  10064. {
  10065. "name": "order",
  10066. "in": "query",
  10067. "schema": {
  10068. "type": "string",
  10069. "enum": ["asc", "desc"]
  10070. },
  10071. "required": false
  10072. },
  10073. {
  10074. "name": "search",
  10075. "in": "query",
  10076. "schema": {
  10077. "type": "string"
  10078. },
  10079. "required": false
  10080. },
  10081. {
  10082. "name": "directory",
  10083. "in": "query",
  10084. "schema": {
  10085. "type": "string"
  10086. },
  10087. "required": false
  10088. },
  10089. {
  10090. "name": "project",
  10091. "in": "query",
  10092. "schema": {
  10093. "type": "string"
  10094. },
  10095. "required": false
  10096. },
  10097. {
  10098. "name": "subpath",
  10099. "in": "query",
  10100. "schema": {
  10101. "type": "string"
  10102. },
  10103. "required": false
  10104. },
  10105. {
  10106. "name": "cursor",
  10107. "in": "query",
  10108. "schema": {
  10109. "type": "string",
  10110. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10111. },
  10112. "required": false
  10113. }
  10114. ],
  10115. "security": [],
  10116. "responses": {
  10117. "200": {
  10118. "description": "SessionsResponse",
  10119. "content": {
  10120. "application/json": {
  10121. "schema": {
  10122. "$ref": "#/components/schemas/SessionsResponse"
  10123. }
  10124. }
  10125. }
  10126. },
  10127. "400": {
  10128. "description": "InvalidCursorError | InvalidRequestError",
  10129. "content": {
  10130. "application/json": {
  10131. "schema": {
  10132. "anyOf": [
  10133. {
  10134. "$ref": "#/components/schemas/InvalidCursorError"
  10135. },
  10136. {
  10137. "$ref": "#/components/schemas/InvalidRequestError"
  10138. },
  10139. {
  10140. "$ref": "#/components/schemas/InvalidRequestError"
  10141. }
  10142. ]
  10143. }
  10144. }
  10145. }
  10146. },
  10147. "401": {
  10148. "description": "UnauthorizedError",
  10149. "content": {
  10150. "application/json": {
  10151. "schema": {
  10152. "$ref": "#/components/schemas/UnauthorizedError"
  10153. }
  10154. }
  10155. }
  10156. }
  10157. },
  10158. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10159. "summary": "List sessions",
  10160. "x-codeSamples": [
  10161. {
  10162. "lang": "js",
  10163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10164. }
  10165. ]
  10166. }
  10167. },
  10168. "/api/session/{sessionID}/prompt": {
  10169. "post": {
  10170. "tags": ["sessions"],
  10171. "operationId": "v2.session.prompt",
  10172. "parameters": [
  10173. {
  10174. "name": "sessionID",
  10175. "in": "path",
  10176. "schema": {
  10177. "type": "string",
  10178. "pattern": "^ses"
  10179. },
  10180. "required": true
  10181. }
  10182. ],
  10183. "security": [],
  10184. "responses": {
  10185. "200": {
  10186. "description": "Success",
  10187. "content": {
  10188. "application/json": {
  10189. "schema": {
  10190. "type": "object",
  10191. "properties": {
  10192. "data": {
  10193. "$ref": "#/components/schemas/SessionInputAdmitted"
  10194. }
  10195. },
  10196. "required": ["data"],
  10197. "additionalProperties": false
  10198. }
  10199. }
  10200. }
  10201. },
  10202. "400": {
  10203. "description": "InvalidRequestError",
  10204. "content": {
  10205. "application/json": {
  10206. "schema": {
  10207. "$ref": "#/components/schemas/InvalidRequestError"
  10208. }
  10209. }
  10210. }
  10211. },
  10212. "401": {
  10213. "description": "UnauthorizedError",
  10214. "content": {
  10215. "application/json": {
  10216. "schema": {
  10217. "$ref": "#/components/schemas/UnauthorizedError"
  10218. }
  10219. }
  10220. }
  10221. },
  10222. "404": {
  10223. "description": "SessionNotFoundError",
  10224. "content": {
  10225. "application/json": {
  10226. "schema": {
  10227. "anyOf": [
  10228. {
  10229. "$ref": "#/components/schemas/SessionNotFoundError"
  10230. },
  10231. {
  10232. "$ref": "#/components/schemas/SessionNotFoundError"
  10233. }
  10234. ]
  10235. }
  10236. }
  10237. }
  10238. },
  10239. "409": {
  10240. "description": "ConflictError",
  10241. "content": {
  10242. "application/json": {
  10243. "schema": {
  10244. "$ref": "#/components/schemas/ConflictError"
  10245. }
  10246. }
  10247. }
  10248. }
  10249. },
  10250. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10251. "summary": "Send message",
  10252. "requestBody": {
  10253. "content": {
  10254. "application/json": {
  10255. "schema": {
  10256. "type": "object",
  10257. "properties": {
  10258. "id": {
  10259. "type": "string",
  10260. "pattern": "^msg_"
  10261. },
  10262. "prompt": {
  10263. "$ref": "#/components/schemas/Prompt"
  10264. },
  10265. "delivery": {
  10266. "type": "string",
  10267. "enum": ["steer", "queue"]
  10268. },
  10269. "resume": {
  10270. "type": "boolean"
  10271. }
  10272. },
  10273. "required": ["prompt"],
  10274. "additionalProperties": false
  10275. }
  10276. }
  10277. },
  10278. "required": true
  10279. },
  10280. "x-codeSamples": [
  10281. {
  10282. "lang": "js",
  10283. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10284. }
  10285. ]
  10286. }
  10287. },
  10288. "/api/session/{sessionID}/compact": {
  10289. "post": {
  10290. "tags": ["sessions"],
  10291. "operationId": "v2.session.compact",
  10292. "parameters": [
  10293. {
  10294. "name": "sessionID",
  10295. "in": "path",
  10296. "schema": {
  10297. "type": "string",
  10298. "pattern": "^ses"
  10299. },
  10300. "required": true
  10301. }
  10302. ],
  10303. "security": [],
  10304. "responses": {
  10305. "204": {
  10306. "description": "<No Content>"
  10307. },
  10308. "400": {
  10309. "description": "InvalidRequestError",
  10310. "content": {
  10311. "application/json": {
  10312. "schema": {
  10313. "$ref": "#/components/schemas/InvalidRequestError"
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "401": {
  10319. "description": "UnauthorizedError",
  10320. "content": {
  10321. "application/json": {
  10322. "schema": {
  10323. "$ref": "#/components/schemas/UnauthorizedError"
  10324. }
  10325. }
  10326. }
  10327. },
  10328. "404": {
  10329. "description": "SessionNotFoundError",
  10330. "content": {
  10331. "application/json": {
  10332. "schema": {
  10333. "anyOf": [
  10334. {
  10335. "$ref": "#/components/schemas/SessionNotFoundError"
  10336. },
  10337. {
  10338. "$ref": "#/components/schemas/SessionNotFoundError"
  10339. }
  10340. ]
  10341. }
  10342. }
  10343. }
  10344. },
  10345. "503": {
  10346. "description": "ServiceUnavailableError",
  10347. "content": {
  10348. "application/json": {
  10349. "schema": {
  10350. "$ref": "#/components/schemas/ServiceUnavailableError"
  10351. }
  10352. }
  10353. }
  10354. }
  10355. },
  10356. "description": "Compact a session conversation.",
  10357. "summary": "Compact session",
  10358. "x-codeSamples": [
  10359. {
  10360. "lang": "js",
  10361. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10362. }
  10363. ]
  10364. }
  10365. },
  10366. "/api/session/{sessionID}/wait": {
  10367. "post": {
  10368. "tags": ["sessions"],
  10369. "operationId": "v2.session.wait",
  10370. "parameters": [
  10371. {
  10372. "name": "sessionID",
  10373. "in": "path",
  10374. "schema": {
  10375. "type": "string",
  10376. "pattern": "^ses"
  10377. },
  10378. "required": true
  10379. }
  10380. ],
  10381. "security": [],
  10382. "responses": {
  10383. "204": {
  10384. "description": "<No Content>"
  10385. },
  10386. "400": {
  10387. "description": "InvalidRequestError",
  10388. "content": {
  10389. "application/json": {
  10390. "schema": {
  10391. "$ref": "#/components/schemas/InvalidRequestError"
  10392. }
  10393. }
  10394. }
  10395. },
  10396. "401": {
  10397. "description": "UnauthorizedError",
  10398. "content": {
  10399. "application/json": {
  10400. "schema": {
  10401. "$ref": "#/components/schemas/UnauthorizedError"
  10402. }
  10403. }
  10404. }
  10405. },
  10406. "404": {
  10407. "description": "SessionNotFoundError",
  10408. "content": {
  10409. "application/json": {
  10410. "schema": {
  10411. "anyOf": [
  10412. {
  10413. "$ref": "#/components/schemas/SessionNotFoundError"
  10414. },
  10415. {
  10416. "$ref": "#/components/schemas/SessionNotFoundError"
  10417. }
  10418. ]
  10419. }
  10420. }
  10421. }
  10422. },
  10423. "503": {
  10424. "description": "ServiceUnavailableError",
  10425. "content": {
  10426. "application/json": {
  10427. "schema": {
  10428. "$ref": "#/components/schemas/ServiceUnavailableError"
  10429. }
  10430. }
  10431. }
  10432. }
  10433. },
  10434. "description": "Wait for a session agent loop to become idle.",
  10435. "summary": "Wait for session",
  10436. "x-codeSamples": [
  10437. {
  10438. "lang": "js",
  10439. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10440. }
  10441. ]
  10442. }
  10443. },
  10444. "/api/session/{sessionID}/context": {
  10445. "get": {
  10446. "tags": ["sessions"],
  10447. "operationId": "v2.session.context",
  10448. "parameters": [
  10449. {
  10450. "name": "sessionID",
  10451. "in": "path",
  10452. "schema": {
  10453. "type": "string",
  10454. "pattern": "^ses"
  10455. },
  10456. "required": true
  10457. }
  10458. ],
  10459. "security": [],
  10460. "responses": {
  10461. "200": {
  10462. "description": "Success",
  10463. "content": {
  10464. "application/json": {
  10465. "schema": {
  10466. "type": "object",
  10467. "properties": {
  10468. "data": {
  10469. "type": "array",
  10470. "items": {
  10471. "$ref": "#/components/schemas/SessionMessage"
  10472. }
  10473. }
  10474. },
  10475. "required": ["data"],
  10476. "additionalProperties": false
  10477. }
  10478. }
  10479. }
  10480. },
  10481. "400": {
  10482. "description": "InvalidRequestError",
  10483. "content": {
  10484. "application/json": {
  10485. "schema": {
  10486. "$ref": "#/components/schemas/InvalidRequestError"
  10487. }
  10488. }
  10489. }
  10490. },
  10491. "401": {
  10492. "description": "UnauthorizedError",
  10493. "content": {
  10494. "application/json": {
  10495. "schema": {
  10496. "$ref": "#/components/schemas/UnauthorizedError"
  10497. }
  10498. }
  10499. }
  10500. },
  10501. "404": {
  10502. "description": "SessionNotFoundError",
  10503. "content": {
  10504. "application/json": {
  10505. "schema": {
  10506. "anyOf": [
  10507. {
  10508. "$ref": "#/components/schemas/SessionNotFoundError"
  10509. },
  10510. {
  10511. "$ref": "#/components/schemas/SessionNotFoundError"
  10512. }
  10513. ]
  10514. }
  10515. }
  10516. }
  10517. },
  10518. "500": {
  10519. "description": "UnknownError",
  10520. "content": {
  10521. "application/json": {
  10522. "schema": {
  10523. "$ref": "#/components/schemas/UnknownError1"
  10524. }
  10525. }
  10526. }
  10527. }
  10528. },
  10529. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10530. "summary": "Get session context",
  10531. "x-codeSamples": [
  10532. {
  10533. "lang": "js",
  10534. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10535. }
  10536. ]
  10537. }
  10538. },
  10539. "/api/session/{sessionID}/message": {
  10540. "get": {
  10541. "tags": ["messages"],
  10542. "operationId": "v2.session.messages",
  10543. "parameters": [
  10544. {
  10545. "name": "sessionID",
  10546. "in": "path",
  10547. "schema": {
  10548. "type": "string",
  10549. "pattern": "^ses"
  10550. },
  10551. "required": true
  10552. },
  10553. {
  10554. "name": "limit",
  10555. "in": "query",
  10556. "schema": {
  10557. "type": "number"
  10558. },
  10559. "required": false
  10560. },
  10561. {
  10562. "name": "order",
  10563. "in": "query",
  10564. "schema": {
  10565. "type": "string",
  10566. "enum": ["asc", "desc"]
  10567. },
  10568. "required": false
  10569. },
  10570. {
  10571. "name": "cursor",
  10572. "in": "query",
  10573. "schema": {
  10574. "type": "string",
  10575. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10576. },
  10577. "required": false
  10578. }
  10579. ],
  10580. "security": [],
  10581. "responses": {
  10582. "200": {
  10583. "description": "SessionMessagesResponse",
  10584. "content": {
  10585. "application/json": {
  10586. "schema": {
  10587. "$ref": "#/components/schemas/SessionMessagesResponse"
  10588. }
  10589. }
  10590. }
  10591. },
  10592. "400": {
  10593. "description": "InvalidCursorError | InvalidRequestError",
  10594. "content": {
  10595. "application/json": {
  10596. "schema": {
  10597. "anyOf": [
  10598. {
  10599. "$ref": "#/components/schemas/InvalidCursorError"
  10600. },
  10601. {
  10602. "$ref": "#/components/schemas/InvalidRequestError"
  10603. }
  10604. ]
  10605. }
  10606. }
  10607. }
  10608. },
  10609. "401": {
  10610. "description": "UnauthorizedError",
  10611. "content": {
  10612. "application/json": {
  10613. "schema": {
  10614. "$ref": "#/components/schemas/UnauthorizedError"
  10615. }
  10616. }
  10617. }
  10618. },
  10619. "404": {
  10620. "description": "SessionNotFoundError",
  10621. "content": {
  10622. "application/json": {
  10623. "schema": {
  10624. "anyOf": [
  10625. {
  10626. "$ref": "#/components/schemas/SessionNotFoundError"
  10627. },
  10628. {
  10629. "$ref": "#/components/schemas/SessionNotFoundError"
  10630. }
  10631. ]
  10632. }
  10633. }
  10634. }
  10635. },
  10636. "500": {
  10637. "description": "UnknownError",
  10638. "content": {
  10639. "application/json": {
  10640. "schema": {
  10641. "$ref": "#/components/schemas/UnknownError1"
  10642. }
  10643. }
  10644. }
  10645. }
  10646. },
  10647. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10648. "summary": "Get session messages",
  10649. "x-codeSamples": [
  10650. {
  10651. "lang": "js",
  10652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10653. }
  10654. ]
  10655. }
  10656. },
  10657. "/api/model": {
  10658. "get": {
  10659. "tags": ["models"],
  10660. "operationId": "v2.model.list",
  10661. "parameters": [
  10662. {
  10663. "name": "location",
  10664. "in": "query",
  10665. "schema": {
  10666. "type": "object",
  10667. "properties": {
  10668. "directory": {
  10669. "type": "string"
  10670. },
  10671. "workspace": {
  10672. "type": "string"
  10673. }
  10674. },
  10675. "additionalProperties": false
  10676. },
  10677. "required": false,
  10678. "style": "deepObject",
  10679. "explode": true
  10680. }
  10681. ],
  10682. "security": [],
  10683. "responses": {
  10684. "200": {
  10685. "description": "Success",
  10686. "content": {
  10687. "application/json": {
  10688. "schema": {
  10689. "type": "object",
  10690. "properties": {
  10691. "location": {
  10692. "$ref": "#/components/schemas/LocationInfo"
  10693. },
  10694. "data": {
  10695. "type": "array",
  10696. "items": {
  10697. "$ref": "#/components/schemas/ModelV2Info"
  10698. }
  10699. }
  10700. },
  10701. "required": ["location", "data"],
  10702. "additionalProperties": false
  10703. }
  10704. }
  10705. }
  10706. },
  10707. "400": {
  10708. "description": "InvalidRequestError",
  10709. "content": {
  10710. "application/json": {
  10711. "schema": {
  10712. "$ref": "#/components/schemas/InvalidRequestError"
  10713. }
  10714. }
  10715. }
  10716. },
  10717. "401": {
  10718. "description": "UnauthorizedError",
  10719. "content": {
  10720. "application/json": {
  10721. "schema": {
  10722. "$ref": "#/components/schemas/UnauthorizedError"
  10723. }
  10724. }
  10725. }
  10726. },
  10727. "503": {
  10728. "description": "ServiceUnavailableError",
  10729. "content": {
  10730. "application/json": {
  10731. "schema": {
  10732. "$ref": "#/components/schemas/ServiceUnavailableError"
  10733. }
  10734. }
  10735. }
  10736. }
  10737. },
  10738. "description": "Retrieve available models ordered by release date.",
  10739. "summary": "List models",
  10740. "x-codeSamples": [
  10741. {
  10742. "lang": "js",
  10743. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10744. }
  10745. ]
  10746. }
  10747. },
  10748. "/api/provider": {
  10749. "get": {
  10750. "tags": ["providers"],
  10751. "operationId": "v2.provider.list",
  10752. "parameters": [
  10753. {
  10754. "name": "location",
  10755. "in": "query",
  10756. "schema": {
  10757. "type": "object",
  10758. "properties": {
  10759. "directory": {
  10760. "type": "string"
  10761. },
  10762. "workspace": {
  10763. "type": "string"
  10764. }
  10765. },
  10766. "additionalProperties": false
  10767. },
  10768. "required": false,
  10769. "style": "deepObject",
  10770. "explode": true
  10771. }
  10772. ],
  10773. "security": [],
  10774. "responses": {
  10775. "200": {
  10776. "description": "Success",
  10777. "content": {
  10778. "application/json": {
  10779. "schema": {
  10780. "type": "object",
  10781. "properties": {
  10782. "location": {
  10783. "$ref": "#/components/schemas/LocationInfo"
  10784. },
  10785. "data": {
  10786. "type": "array",
  10787. "items": {
  10788. "$ref": "#/components/schemas/ProviderV2Info"
  10789. }
  10790. }
  10791. },
  10792. "required": ["location", "data"],
  10793. "additionalProperties": false
  10794. }
  10795. }
  10796. }
  10797. },
  10798. "400": {
  10799. "description": "InvalidRequestError",
  10800. "content": {
  10801. "application/json": {
  10802. "schema": {
  10803. "$ref": "#/components/schemas/InvalidRequestError"
  10804. }
  10805. }
  10806. }
  10807. },
  10808. "401": {
  10809. "description": "UnauthorizedError",
  10810. "content": {
  10811. "application/json": {
  10812. "schema": {
  10813. "$ref": "#/components/schemas/UnauthorizedError"
  10814. }
  10815. }
  10816. }
  10817. },
  10818. "503": {
  10819. "description": "ServiceUnavailableError",
  10820. "content": {
  10821. "application/json": {
  10822. "schema": {
  10823. "$ref": "#/components/schemas/ServiceUnavailableError"
  10824. }
  10825. }
  10826. }
  10827. }
  10828. },
  10829. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  10830. "summary": "List providers",
  10831. "x-codeSamples": [
  10832. {
  10833. "lang": "js",
  10834. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10835. }
  10836. ]
  10837. }
  10838. },
  10839. "/api/provider/{providerID}": {
  10840. "get": {
  10841. "tags": ["providers"],
  10842. "operationId": "v2.provider.get",
  10843. "parameters": [
  10844. {
  10845. "name": "providerID",
  10846. "in": "path",
  10847. "schema": {
  10848. "type": "string"
  10849. },
  10850. "required": true
  10851. },
  10852. {
  10853. "name": "location",
  10854. "in": "query",
  10855. "schema": {
  10856. "type": "object",
  10857. "properties": {
  10858. "directory": {
  10859. "type": "string"
  10860. },
  10861. "workspace": {
  10862. "type": "string"
  10863. }
  10864. },
  10865. "additionalProperties": false
  10866. },
  10867. "required": false,
  10868. "style": "deepObject",
  10869. "explode": true
  10870. }
  10871. ],
  10872. "security": [],
  10873. "responses": {
  10874. "200": {
  10875. "description": "Success",
  10876. "content": {
  10877. "application/json": {
  10878. "schema": {
  10879. "type": "object",
  10880. "properties": {
  10881. "location": {
  10882. "$ref": "#/components/schemas/LocationInfo"
  10883. },
  10884. "data": {
  10885. "$ref": "#/components/schemas/ProviderV2Info"
  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. "404": {
  10915. "description": "ProviderNotFoundError",
  10916. "content": {
  10917. "application/json": {
  10918. "schema": {
  10919. "$ref": "#/components/schemas/ProviderNotFoundError"
  10920. }
  10921. }
  10922. }
  10923. },
  10924. "503": {
  10925. "description": "ServiceUnavailableError",
  10926. "content": {
  10927. "application/json": {
  10928. "schema": {
  10929. "$ref": "#/components/schemas/ServiceUnavailableError"
  10930. }
  10931. }
  10932. }
  10933. }
  10934. },
  10935. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  10936. "summary": "Get provider",
  10937. "x-codeSamples": [
  10938. {
  10939. "lang": "js",
  10940. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  10941. }
  10942. ]
  10943. }
  10944. },
  10945. "/api/permission/request": {
  10946. "get": {
  10947. "tags": ["permissions"],
  10948. "operationId": "v2.permission.request.list",
  10949. "parameters": [
  10950. {
  10951. "name": "location",
  10952. "in": "query",
  10953. "schema": {
  10954. "type": "object",
  10955. "properties": {
  10956. "directory": {
  10957. "type": "string"
  10958. },
  10959. "workspace": {
  10960. "type": "string"
  10961. }
  10962. },
  10963. "additionalProperties": false
  10964. },
  10965. "required": false,
  10966. "style": "deepObject",
  10967. "explode": true
  10968. }
  10969. ],
  10970. "security": [],
  10971. "responses": {
  10972. "200": {
  10973. "description": "Success",
  10974. "content": {
  10975. "application/json": {
  10976. "schema": {
  10977. "type": "object",
  10978. "properties": {
  10979. "location": {
  10980. "$ref": "#/components/schemas/LocationInfo"
  10981. },
  10982. "data": {
  10983. "type": "array",
  10984. "items": {
  10985. "$ref": "#/components/schemas/PermissionV2Request"
  10986. }
  10987. }
  10988. },
  10989. "required": ["location", "data"],
  10990. "additionalProperties": false
  10991. }
  10992. }
  10993. }
  10994. },
  10995. "400": {
  10996. "description": "InvalidRequestError",
  10997. "content": {
  10998. "application/json": {
  10999. "schema": {
  11000. "$ref": "#/components/schemas/InvalidRequestError"
  11001. }
  11002. }
  11003. }
  11004. },
  11005. "401": {
  11006. "description": "UnauthorizedError",
  11007. "content": {
  11008. "application/json": {
  11009. "schema": {
  11010. "$ref": "#/components/schemas/UnauthorizedError"
  11011. }
  11012. }
  11013. }
  11014. }
  11015. },
  11016. "description": "Retrieve pending permission requests for a location.",
  11017. "summary": "List pending permission requests",
  11018. "x-codeSamples": [
  11019. {
  11020. "lang": "js",
  11021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  11022. }
  11023. ]
  11024. }
  11025. },
  11026. "/api/permission/saved": {
  11027. "get": {
  11028. "tags": ["permissions"],
  11029. "operationId": "v2.permission.saved.list",
  11030. "parameters": [
  11031. {
  11032. "name": "projectID",
  11033. "in": "query",
  11034. "schema": {
  11035. "type": "string"
  11036. },
  11037. "required": false
  11038. }
  11039. ],
  11040. "security": [],
  11041. "responses": {
  11042. "200": {
  11043. "description": "Success",
  11044. "content": {
  11045. "application/json": {
  11046. "schema": {
  11047. "type": "object",
  11048. "properties": {
  11049. "data": {
  11050. "type": "array",
  11051. "items": {
  11052. "$ref": "#/components/schemas/PermissionSavedInfo"
  11053. }
  11054. }
  11055. },
  11056. "required": ["data"],
  11057. "additionalProperties": false
  11058. }
  11059. }
  11060. }
  11061. },
  11062. "400": {
  11063. "description": "InvalidRequestError",
  11064. "content": {
  11065. "application/json": {
  11066. "schema": {
  11067. "$ref": "#/components/schemas/InvalidRequestError"
  11068. }
  11069. }
  11070. }
  11071. },
  11072. "401": {
  11073. "description": "UnauthorizedError",
  11074. "content": {
  11075. "application/json": {
  11076. "schema": {
  11077. "$ref": "#/components/schemas/UnauthorizedError"
  11078. }
  11079. }
  11080. }
  11081. }
  11082. },
  11083. "description": "Retrieve saved permissions, optionally filtered by project.",
  11084. "summary": "List saved permissions",
  11085. "x-codeSamples": [
  11086. {
  11087. "lang": "js",
  11088. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  11089. }
  11090. ]
  11091. }
  11092. },
  11093. "/api/permission/saved/{id}": {
  11094. "delete": {
  11095. "tags": ["permissions"],
  11096. "operationId": "v2.permission.saved.remove",
  11097. "parameters": [
  11098. {
  11099. "name": "id",
  11100. "in": "path",
  11101. "schema": {
  11102. "type": "string"
  11103. },
  11104. "required": true
  11105. }
  11106. ],
  11107. "security": [],
  11108. "responses": {
  11109. "204": {
  11110. "description": "<No Content>"
  11111. },
  11112. "400": {
  11113. "description": "InvalidRequestError",
  11114. "content": {
  11115. "application/json": {
  11116. "schema": {
  11117. "$ref": "#/components/schemas/InvalidRequestError"
  11118. }
  11119. }
  11120. }
  11121. },
  11122. "401": {
  11123. "description": "UnauthorizedError",
  11124. "content": {
  11125. "application/json": {
  11126. "schema": {
  11127. "$ref": "#/components/schemas/UnauthorizedError"
  11128. }
  11129. }
  11130. }
  11131. }
  11132. },
  11133. "description": "Remove a saved permission by ID.",
  11134. "summary": "Remove saved permission",
  11135. "x-codeSamples": [
  11136. {
  11137. "lang": "js",
  11138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  11139. }
  11140. ]
  11141. }
  11142. },
  11143. "/api/session/{sessionID}/permission": {
  11144. "get": {
  11145. "tags": ["permissions"],
  11146. "operationId": "v2.session.permission.list",
  11147. "parameters": [
  11148. {
  11149. "name": "sessionID",
  11150. "in": "path",
  11151. "schema": {
  11152. "type": "string",
  11153. "pattern": "^ses"
  11154. },
  11155. "required": true
  11156. }
  11157. ],
  11158. "security": [],
  11159. "responses": {
  11160. "200": {
  11161. "description": "Success",
  11162. "content": {
  11163. "application/json": {
  11164. "schema": {
  11165. "type": "object",
  11166. "properties": {
  11167. "data": {
  11168. "type": "array",
  11169. "items": {
  11170. "$ref": "#/components/schemas/PermissionV2Request"
  11171. }
  11172. }
  11173. },
  11174. "required": ["data"],
  11175. "additionalProperties": false
  11176. }
  11177. }
  11178. }
  11179. },
  11180. "400": {
  11181. "description": "InvalidRequestError",
  11182. "content": {
  11183. "application/json": {
  11184. "schema": {
  11185. "$ref": "#/components/schemas/InvalidRequestError"
  11186. }
  11187. }
  11188. }
  11189. },
  11190. "401": {
  11191. "description": "UnauthorizedError",
  11192. "content": {
  11193. "application/json": {
  11194. "schema": {
  11195. "$ref": "#/components/schemas/UnauthorizedError"
  11196. }
  11197. }
  11198. }
  11199. },
  11200. "404": {
  11201. "description": "SessionNotFoundError",
  11202. "content": {
  11203. "application/json": {
  11204. "schema": {
  11205. "anyOf": [
  11206. {
  11207. "$ref": "#/components/schemas/SessionNotFoundError"
  11208. },
  11209. {
  11210. "$ref": "#/components/schemas/SessionNotFoundError"
  11211. }
  11212. ]
  11213. }
  11214. }
  11215. }
  11216. }
  11217. },
  11218. "description": "Retrieve pending permission requests owned by a session.",
  11219. "summary": "List session permission requests",
  11220. "x-codeSamples": [
  11221. {
  11222. "lang": "js",
  11223. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  11224. }
  11225. ]
  11226. }
  11227. },
  11228. "/api/session/{sessionID}/permission/{requestID}/reply": {
  11229. "post": {
  11230. "tags": ["permissions"],
  11231. "operationId": "v2.session.permission.reply",
  11232. "parameters": [
  11233. {
  11234. "name": "sessionID",
  11235. "in": "path",
  11236. "schema": {
  11237. "type": "string",
  11238. "pattern": "^ses"
  11239. },
  11240. "required": true
  11241. },
  11242. {
  11243. "name": "requestID",
  11244. "in": "path",
  11245. "schema": {
  11246. "type": "string",
  11247. "pattern": "^per"
  11248. },
  11249. "required": true
  11250. }
  11251. ],
  11252. "security": [],
  11253. "responses": {
  11254. "204": {
  11255. "description": "<No Content>"
  11256. },
  11257. "400": {
  11258. "description": "InvalidRequestError",
  11259. "content": {
  11260. "application/json": {
  11261. "schema": {
  11262. "$ref": "#/components/schemas/InvalidRequestError"
  11263. }
  11264. }
  11265. }
  11266. },
  11267. "401": {
  11268. "description": "UnauthorizedError",
  11269. "content": {
  11270. "application/json": {
  11271. "schema": {
  11272. "$ref": "#/components/schemas/UnauthorizedError"
  11273. }
  11274. }
  11275. }
  11276. },
  11277. "404": {
  11278. "description": "SessionNotFoundError | PermissionNotFoundError",
  11279. "content": {
  11280. "application/json": {
  11281. "schema": {
  11282. "anyOf": [
  11283. {
  11284. "$ref": "#/components/schemas/PermissionNotFoundError"
  11285. },
  11286. {
  11287. "$ref": "#/components/schemas/SessionNotFoundError"
  11288. },
  11289. {
  11290. "$ref": "#/components/schemas/SessionNotFoundError"
  11291. }
  11292. ]
  11293. }
  11294. }
  11295. }
  11296. }
  11297. },
  11298. "description": "Respond to a pending permission request owned by a session.",
  11299. "summary": "Reply to pending permission request",
  11300. "requestBody": {
  11301. "content": {
  11302. "application/json": {
  11303. "schema": {
  11304. "type": "object",
  11305. "properties": {
  11306. "reply": {
  11307. "$ref": "#/components/schemas/PermissionV2Reply"
  11308. },
  11309. "message": {
  11310. "type": "string"
  11311. }
  11312. },
  11313. "required": ["reply"],
  11314. "additionalProperties": false
  11315. }
  11316. }
  11317. },
  11318. "required": true
  11319. },
  11320. "x-codeSamples": [
  11321. {
  11322. "lang": "js",
  11323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  11324. }
  11325. ]
  11326. }
  11327. },
  11328. "/api/fs/read": {
  11329. "get": {
  11330. "tags": ["filesystem"],
  11331. "operationId": "v2.fs.read",
  11332. "parameters": [
  11333. {
  11334. "name": "location",
  11335. "in": "query",
  11336. "schema": {
  11337. "type": "object",
  11338. "properties": {
  11339. "directory": {
  11340. "type": "string"
  11341. },
  11342. "workspace": {
  11343. "type": "string"
  11344. }
  11345. },
  11346. "additionalProperties": false
  11347. },
  11348. "required": false,
  11349. "style": "deepObject",
  11350. "explode": true
  11351. },
  11352. {
  11353. "name": "path",
  11354. "in": "query",
  11355. "schema": {
  11356. "type": "string"
  11357. },
  11358. "required": true
  11359. }
  11360. ],
  11361. "security": [],
  11362. "responses": {
  11363. "200": {
  11364. "description": "Success",
  11365. "content": {
  11366. "application/json": {
  11367. "schema": {
  11368. "type": "object",
  11369. "properties": {
  11370. "location": {
  11371. "$ref": "#/components/schemas/LocationInfo"
  11372. },
  11373. "data": {
  11374. "$ref": "#/components/schemas/FileSystemContent"
  11375. }
  11376. },
  11377. "required": ["location", "data"],
  11378. "additionalProperties": false
  11379. }
  11380. }
  11381. }
  11382. },
  11383. "400": {
  11384. "description": "InvalidRequestError",
  11385. "content": {
  11386. "application/json": {
  11387. "schema": {
  11388. "$ref": "#/components/schemas/InvalidRequestError"
  11389. }
  11390. }
  11391. }
  11392. },
  11393. "401": {
  11394. "description": "UnauthorizedError",
  11395. "content": {
  11396. "application/json": {
  11397. "schema": {
  11398. "$ref": "#/components/schemas/UnauthorizedError"
  11399. }
  11400. }
  11401. }
  11402. }
  11403. },
  11404. "description": "Read one file relative to the requested location.",
  11405. "summary": "Read file",
  11406. "x-codeSamples": [
  11407. {
  11408. "lang": "js",
  11409. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  11410. }
  11411. ]
  11412. }
  11413. },
  11414. "/api/fs/list": {
  11415. "get": {
  11416. "tags": ["filesystem"],
  11417. "operationId": "v2.fs.list",
  11418. "parameters": [
  11419. {
  11420. "name": "location",
  11421. "in": "query",
  11422. "schema": {
  11423. "type": "object",
  11424. "properties": {
  11425. "directory": {
  11426. "type": "string"
  11427. },
  11428. "workspace": {
  11429. "type": "string"
  11430. }
  11431. },
  11432. "additionalProperties": false
  11433. },
  11434. "required": false,
  11435. "style": "deepObject",
  11436. "explode": true
  11437. },
  11438. {
  11439. "name": "path",
  11440. "in": "query",
  11441. "schema": {
  11442. "type": "string"
  11443. },
  11444. "required": false
  11445. }
  11446. ],
  11447. "security": [],
  11448. "responses": {
  11449. "200": {
  11450. "description": "Success",
  11451. "content": {
  11452. "application/json": {
  11453. "schema": {
  11454. "type": "object",
  11455. "properties": {
  11456. "location": {
  11457. "$ref": "#/components/schemas/LocationInfo"
  11458. },
  11459. "data": {
  11460. "type": "array",
  11461. "items": {
  11462. "$ref": "#/components/schemas/FileSystemEntry"
  11463. }
  11464. }
  11465. },
  11466. "required": ["location", "data"],
  11467. "additionalProperties": false
  11468. }
  11469. }
  11470. }
  11471. },
  11472. "400": {
  11473. "description": "InvalidRequestError",
  11474. "content": {
  11475. "application/json": {
  11476. "schema": {
  11477. "$ref": "#/components/schemas/InvalidRequestError"
  11478. }
  11479. }
  11480. }
  11481. },
  11482. "401": {
  11483. "description": "UnauthorizedError",
  11484. "content": {
  11485. "application/json": {
  11486. "schema": {
  11487. "$ref": "#/components/schemas/UnauthorizedError"
  11488. }
  11489. }
  11490. }
  11491. }
  11492. },
  11493. "description": "List direct children of one directory relative to the requested location.",
  11494. "summary": "List directory",
  11495. "x-codeSamples": [
  11496. {
  11497. "lang": "js",
  11498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  11499. }
  11500. ]
  11501. }
  11502. },
  11503. "/api/fs/find": {
  11504. "get": {
  11505. "tags": ["filesystem"],
  11506. "operationId": "v2.fs.find",
  11507. "parameters": [
  11508. {
  11509. "name": "location",
  11510. "in": "query",
  11511. "schema": {
  11512. "type": "object",
  11513. "properties": {
  11514. "directory": {
  11515. "type": "string"
  11516. },
  11517. "workspace": {
  11518. "type": "string"
  11519. }
  11520. },
  11521. "additionalProperties": false
  11522. },
  11523. "required": false,
  11524. "style": "deepObject",
  11525. "explode": true
  11526. },
  11527. {
  11528. "name": "query",
  11529. "in": "query",
  11530. "schema": {
  11531. "type": "string"
  11532. },
  11533. "required": true
  11534. },
  11535. {
  11536. "name": "type",
  11537. "in": "query",
  11538. "schema": {
  11539. "type": "string",
  11540. "enum": ["file", "directory"]
  11541. },
  11542. "required": false
  11543. },
  11544. {
  11545. "name": "limit",
  11546. "in": "query",
  11547. "schema": {
  11548. "type": "string"
  11549. },
  11550. "required": false
  11551. }
  11552. ],
  11553. "security": [],
  11554. "responses": {
  11555. "200": {
  11556. "description": "Success",
  11557. "content": {
  11558. "application/json": {
  11559. "schema": {
  11560. "type": "object",
  11561. "properties": {
  11562. "location": {
  11563. "$ref": "#/components/schemas/LocationInfo"
  11564. },
  11565. "data": {
  11566. "type": "array",
  11567. "items": {
  11568. "$ref": "#/components/schemas/FileSystemEntry"
  11569. }
  11570. }
  11571. },
  11572. "required": ["location", "data"],
  11573. "additionalProperties": false
  11574. }
  11575. }
  11576. }
  11577. },
  11578. "400": {
  11579. "description": "InvalidRequestError",
  11580. "content": {
  11581. "application/json": {
  11582. "schema": {
  11583. "$ref": "#/components/schemas/InvalidRequestError"
  11584. }
  11585. }
  11586. }
  11587. },
  11588. "401": {
  11589. "description": "UnauthorizedError",
  11590. "content": {
  11591. "application/json": {
  11592. "schema": {
  11593. "$ref": "#/components/schemas/UnauthorizedError"
  11594. }
  11595. }
  11596. }
  11597. }
  11598. },
  11599. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  11600. "summary": "Find files",
  11601. "x-codeSamples": [
  11602. {
  11603. "lang": "js",
  11604. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  11605. }
  11606. ]
  11607. }
  11608. },
  11609. "/api/command": {
  11610. "get": {
  11611. "tags": ["commands"],
  11612. "operationId": "v2.command.list",
  11613. "parameters": [
  11614. {
  11615. "name": "location",
  11616. "in": "query",
  11617. "schema": {
  11618. "type": "object",
  11619. "properties": {
  11620. "directory": {
  11621. "type": "string"
  11622. },
  11623. "workspace": {
  11624. "type": "string"
  11625. }
  11626. },
  11627. "additionalProperties": false
  11628. },
  11629. "required": false,
  11630. "style": "deepObject",
  11631. "explode": true
  11632. }
  11633. ],
  11634. "security": [],
  11635. "responses": {
  11636. "200": {
  11637. "description": "Success",
  11638. "content": {
  11639. "application/json": {
  11640. "schema": {
  11641. "type": "object",
  11642. "properties": {
  11643. "location": {
  11644. "$ref": "#/components/schemas/LocationInfo"
  11645. },
  11646. "data": {
  11647. "type": "array",
  11648. "items": {
  11649. "$ref": "#/components/schemas/CommandV2Info"
  11650. }
  11651. }
  11652. },
  11653. "required": ["location", "data"],
  11654. "additionalProperties": false
  11655. }
  11656. }
  11657. }
  11658. },
  11659. "400": {
  11660. "description": "InvalidRequestError",
  11661. "content": {
  11662. "application/json": {
  11663. "schema": {
  11664. "$ref": "#/components/schemas/InvalidRequestError"
  11665. }
  11666. }
  11667. }
  11668. },
  11669. "401": {
  11670. "description": "UnauthorizedError",
  11671. "content": {
  11672. "application/json": {
  11673. "schema": {
  11674. "$ref": "#/components/schemas/UnauthorizedError"
  11675. }
  11676. }
  11677. }
  11678. }
  11679. },
  11680. "description": "Retrieve currently registered commands.",
  11681. "summary": "List commands",
  11682. "x-codeSamples": [
  11683. {
  11684. "lang": "js",
  11685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  11686. }
  11687. ]
  11688. }
  11689. },
  11690. "/api/skill": {
  11691. "get": {
  11692. "tags": ["skills"],
  11693. "operationId": "v2.skill.list",
  11694. "parameters": [
  11695. {
  11696. "name": "location",
  11697. "in": "query",
  11698. "schema": {
  11699. "type": "object",
  11700. "properties": {
  11701. "directory": {
  11702. "type": "string"
  11703. },
  11704. "workspace": {
  11705. "type": "string"
  11706. }
  11707. },
  11708. "additionalProperties": false
  11709. },
  11710. "required": false,
  11711. "style": "deepObject",
  11712. "explode": true
  11713. }
  11714. ],
  11715. "security": [],
  11716. "responses": {
  11717. "200": {
  11718. "description": "Success",
  11719. "content": {
  11720. "application/json": {
  11721. "schema": {
  11722. "type": "object",
  11723. "properties": {
  11724. "location": {
  11725. "$ref": "#/components/schemas/LocationInfo"
  11726. },
  11727. "data": {
  11728. "type": "array",
  11729. "items": {
  11730. "$ref": "#/components/schemas/SkillV2Info"
  11731. }
  11732. }
  11733. },
  11734. "required": ["location", "data"],
  11735. "additionalProperties": false
  11736. }
  11737. }
  11738. }
  11739. },
  11740. "400": {
  11741. "description": "InvalidRequestError",
  11742. "content": {
  11743. "application/json": {
  11744. "schema": {
  11745. "$ref": "#/components/schemas/InvalidRequestError"
  11746. }
  11747. }
  11748. }
  11749. },
  11750. "401": {
  11751. "description": "UnauthorizedError",
  11752. "content": {
  11753. "application/json": {
  11754. "schema": {
  11755. "$ref": "#/components/schemas/UnauthorizedError"
  11756. }
  11757. }
  11758. }
  11759. }
  11760. },
  11761. "description": "Retrieve currently registered skills.",
  11762. "summary": "List skills",
  11763. "x-codeSamples": [
  11764. {
  11765. "lang": "js",
  11766. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  11767. }
  11768. ]
  11769. }
  11770. },
  11771. "/api/event": {
  11772. "get": {
  11773. "tags": ["events"],
  11774. "operationId": "v2.event.subscribe",
  11775. "parameters": [
  11776. {
  11777. "name": "location",
  11778. "in": "query",
  11779. "schema": {
  11780. "type": "object",
  11781. "properties": {
  11782. "directory": {
  11783. "type": "string"
  11784. },
  11785. "workspace": {
  11786. "type": "string"
  11787. }
  11788. },
  11789. "additionalProperties": false
  11790. },
  11791. "required": false,
  11792. "style": "deepObject",
  11793. "explode": true
  11794. }
  11795. ],
  11796. "security": [],
  11797. "responses": {
  11798. "200": {
  11799. "description": "Success",
  11800. "content": {
  11801. "text/event-stream": {
  11802. "schema": {
  11803. "type": "string"
  11804. }
  11805. }
  11806. }
  11807. },
  11808. "400": {
  11809. "description": "InvalidRequestError",
  11810. "content": {
  11811. "application/json": {
  11812. "schema": {
  11813. "$ref": "#/components/schemas/InvalidRequestError"
  11814. }
  11815. }
  11816. }
  11817. },
  11818. "401": {
  11819. "description": "UnauthorizedError",
  11820. "content": {
  11821. "application/json": {
  11822. "schema": {
  11823. "$ref": "#/components/schemas/UnauthorizedError"
  11824. }
  11825. }
  11826. }
  11827. }
  11828. },
  11829. "description": "Subscribe to native event payloads for a location.",
  11830. "summary": "Subscribe to events",
  11831. "x-codeSamples": [
  11832. {
  11833. "lang": "js",
  11834. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  11835. }
  11836. ]
  11837. }
  11838. },
  11839. "/api/question/request": {
  11840. "get": {
  11841. "tags": ["session questions"],
  11842. "operationId": "v2.question.request.list",
  11843. "parameters": [
  11844. {
  11845. "name": "location",
  11846. "in": "query",
  11847. "schema": {
  11848. "type": "object",
  11849. "properties": {
  11850. "directory": {
  11851. "type": "string"
  11852. },
  11853. "workspace": {
  11854. "type": "string"
  11855. }
  11856. },
  11857. "additionalProperties": false
  11858. },
  11859. "required": false,
  11860. "style": "deepObject",
  11861. "explode": true
  11862. }
  11863. ],
  11864. "security": [],
  11865. "responses": {
  11866. "200": {
  11867. "description": "Success",
  11868. "content": {
  11869. "application/json": {
  11870. "schema": {
  11871. "type": "object",
  11872. "properties": {
  11873. "location": {
  11874. "$ref": "#/components/schemas/LocationInfo"
  11875. },
  11876. "data": {
  11877. "type": "array",
  11878. "items": {
  11879. "$ref": "#/components/schemas/QuestionV2Request"
  11880. }
  11881. }
  11882. },
  11883. "required": ["location", "data"],
  11884. "additionalProperties": false
  11885. }
  11886. }
  11887. }
  11888. },
  11889. "400": {
  11890. "description": "InvalidRequestError",
  11891. "content": {
  11892. "application/json": {
  11893. "schema": {
  11894. "$ref": "#/components/schemas/InvalidRequestError"
  11895. }
  11896. }
  11897. }
  11898. },
  11899. "401": {
  11900. "description": "UnauthorizedError",
  11901. "content": {
  11902. "application/json": {
  11903. "schema": {
  11904. "$ref": "#/components/schemas/UnauthorizedError"
  11905. }
  11906. }
  11907. }
  11908. }
  11909. },
  11910. "description": "Retrieve pending question requests for a location.",
  11911. "summary": "List pending question requests",
  11912. "x-codeSamples": [
  11913. {
  11914. "lang": "js",
  11915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  11916. }
  11917. ]
  11918. }
  11919. },
  11920. "/api/session/{sessionID}/question/{requestID}/reply": {
  11921. "post": {
  11922. "tags": ["session questions"],
  11923. "operationId": "v2.session.question.reply",
  11924. "parameters": [
  11925. {
  11926. "name": "sessionID",
  11927. "in": "path",
  11928. "schema": {
  11929. "type": "string",
  11930. "pattern": "^ses"
  11931. },
  11932. "required": true
  11933. },
  11934. {
  11935. "name": "requestID",
  11936. "in": "path",
  11937. "schema": {
  11938. "type": "string",
  11939. "pattern": "^que"
  11940. },
  11941. "required": true
  11942. }
  11943. ],
  11944. "security": [],
  11945. "responses": {
  11946. "204": {
  11947. "description": "<No Content>"
  11948. },
  11949. "400": {
  11950. "description": "InvalidRequestError",
  11951. "content": {
  11952. "application/json": {
  11953. "schema": {
  11954. "$ref": "#/components/schemas/InvalidRequestError"
  11955. }
  11956. }
  11957. }
  11958. },
  11959. "401": {
  11960. "description": "UnauthorizedError",
  11961. "content": {
  11962. "application/json": {
  11963. "schema": {
  11964. "$ref": "#/components/schemas/UnauthorizedError"
  11965. }
  11966. }
  11967. }
  11968. },
  11969. "404": {
  11970. "description": "SessionNotFoundError | QuestionNotFoundError",
  11971. "content": {
  11972. "application/json": {
  11973. "schema": {
  11974. "anyOf": [
  11975. {
  11976. "$ref": "#/components/schemas/QuestionNotFoundError"
  11977. },
  11978. {
  11979. "$ref": "#/components/schemas/SessionNotFoundError"
  11980. },
  11981. {
  11982. "$ref": "#/components/schemas/SessionNotFoundError"
  11983. }
  11984. ]
  11985. }
  11986. }
  11987. }
  11988. }
  11989. },
  11990. "description": "Answer a pending question request owned by a session.",
  11991. "summary": "Reply to pending question request",
  11992. "requestBody": {
  11993. "content": {
  11994. "application/json": {
  11995. "schema": {
  11996. "$ref": "#/components/schemas/QuestionV2Reply"
  11997. }
  11998. }
  11999. },
  12000. "required": true
  12001. },
  12002. "x-codeSamples": [
  12003. {
  12004. "lang": "js",
  12005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  12006. }
  12007. ]
  12008. }
  12009. },
  12010. "/api/session/{sessionID}/question/{requestID}/reject": {
  12011. "post": {
  12012. "tags": ["session questions"],
  12013. "operationId": "v2.session.question.reject",
  12014. "parameters": [
  12015. {
  12016. "name": "sessionID",
  12017. "in": "path",
  12018. "schema": {
  12019. "type": "string",
  12020. "pattern": "^ses"
  12021. },
  12022. "required": true
  12023. },
  12024. {
  12025. "name": "requestID",
  12026. "in": "path",
  12027. "schema": {
  12028. "type": "string",
  12029. "pattern": "^que"
  12030. },
  12031. "required": true
  12032. }
  12033. ],
  12034. "security": [],
  12035. "responses": {
  12036. "204": {
  12037. "description": "<No Content>"
  12038. },
  12039. "400": {
  12040. "description": "InvalidRequestError",
  12041. "content": {
  12042. "application/json": {
  12043. "schema": {
  12044. "$ref": "#/components/schemas/InvalidRequestError"
  12045. }
  12046. }
  12047. }
  12048. },
  12049. "401": {
  12050. "description": "UnauthorizedError",
  12051. "content": {
  12052. "application/json": {
  12053. "schema": {
  12054. "$ref": "#/components/schemas/UnauthorizedError"
  12055. }
  12056. }
  12057. }
  12058. },
  12059. "404": {
  12060. "description": "SessionNotFoundError | QuestionNotFoundError",
  12061. "content": {
  12062. "application/json": {
  12063. "schema": {
  12064. "anyOf": [
  12065. {
  12066. "$ref": "#/components/schemas/QuestionNotFoundError"
  12067. },
  12068. {
  12069. "$ref": "#/components/schemas/SessionNotFoundError"
  12070. },
  12071. {
  12072. "$ref": "#/components/schemas/SessionNotFoundError"
  12073. }
  12074. ]
  12075. }
  12076. }
  12077. }
  12078. }
  12079. },
  12080. "description": "Reject a pending question request owned by a session.",
  12081. "summary": "Reject pending question request",
  12082. "x-codeSamples": [
  12083. {
  12084. "lang": "js",
  12085. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  12086. }
  12087. ]
  12088. }
  12089. },
  12090. "/api/reference": {
  12091. "get": {
  12092. "tags": ["reference"],
  12093. "operationId": "v2.reference.list",
  12094. "parameters": [
  12095. {
  12096. "name": "location",
  12097. "in": "query",
  12098. "schema": {
  12099. "type": "object",
  12100. "properties": {
  12101. "directory": {
  12102. "type": "string"
  12103. },
  12104. "workspace": {
  12105. "type": "string"
  12106. }
  12107. },
  12108. "additionalProperties": false
  12109. },
  12110. "required": false,
  12111. "style": "deepObject",
  12112. "explode": true
  12113. }
  12114. ],
  12115. "security": [],
  12116. "responses": {
  12117. "200": {
  12118. "description": "Success",
  12119. "content": {
  12120. "application/json": {
  12121. "schema": {
  12122. "type": "object",
  12123. "properties": {
  12124. "location": {
  12125. "$ref": "#/components/schemas/LocationInfo"
  12126. },
  12127. "data": {
  12128. "type": "array",
  12129. "items": {
  12130. "$ref": "#/components/schemas/ReferenceInfo"
  12131. }
  12132. }
  12133. },
  12134. "required": ["location", "data"],
  12135. "additionalProperties": false
  12136. }
  12137. }
  12138. }
  12139. },
  12140. "400": {
  12141. "description": "InvalidRequestError",
  12142. "content": {
  12143. "application/json": {
  12144. "schema": {
  12145. "$ref": "#/components/schemas/InvalidRequestError"
  12146. }
  12147. }
  12148. }
  12149. },
  12150. "401": {
  12151. "description": "UnauthorizedError",
  12152. "content": {
  12153. "application/json": {
  12154. "schema": {
  12155. "$ref": "#/components/schemas/UnauthorizedError"
  12156. }
  12157. }
  12158. }
  12159. }
  12160. },
  12161. "description": "List references available in the requested location.",
  12162. "summary": "List references",
  12163. "x-codeSamples": [
  12164. {
  12165. "lang": "js",
  12166. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  12167. }
  12168. ]
  12169. }
  12170. },
  12171. "/pty/{ptyID}/connect": {
  12172. "get": {
  12173. "tags": ["pty"],
  12174. "operationId": "pty.connect",
  12175. "parameters": [
  12176. {
  12177. "name": "ptyID",
  12178. "in": "path",
  12179. "schema": {
  12180. "type": "string",
  12181. "pattern": "^pty"
  12182. },
  12183. "required": true
  12184. },
  12185. {
  12186. "in": "query",
  12187. "name": "directory",
  12188. "schema": {
  12189. "type": "string"
  12190. }
  12191. },
  12192. {
  12193. "in": "query",
  12194. "name": "workspace",
  12195. "schema": {
  12196. "type": "string"
  12197. }
  12198. },
  12199. {
  12200. "in": "query",
  12201. "name": "cursor",
  12202. "schema": {
  12203. "type": "string"
  12204. }
  12205. },
  12206. {
  12207. "in": "query",
  12208. "name": "ticket",
  12209. "schema": {
  12210. "type": "string"
  12211. }
  12212. }
  12213. ],
  12214. "responses": {
  12215. "200": {
  12216. "description": "Connected session",
  12217. "content": {
  12218. "application/json": {
  12219. "schema": {
  12220. "type": "boolean",
  12221. "description": "Connected session"
  12222. }
  12223. }
  12224. }
  12225. },
  12226. "403": {
  12227. "description": "Forbidden",
  12228. "content": {
  12229. "application/json": {
  12230. "schema": {
  12231. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  12232. }
  12233. }
  12234. }
  12235. },
  12236. "404": {
  12237. "description": "Not found",
  12238. "content": {
  12239. "application/json": {
  12240. "schema": {
  12241. "$ref": "#/components/schemas/NotFoundError"
  12242. }
  12243. }
  12244. }
  12245. }
  12246. },
  12247. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  12248. "summary": "Connect to PTY session",
  12249. "x-codeSamples": [
  12250. {
  12251. "lang": "js",
  12252. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  12253. }
  12254. ]
  12255. }
  12256. }
  12257. },
  12258. "components": {
  12259. "schemas": {
  12260. "Event": {
  12261. "anyOf": [
  12262. {
  12263. "$ref": "#/components/schemas/EventModels-devRefreshed"
  12264. },
  12265. {
  12266. "$ref": "#/components/schemas/EventPluginAdded"
  12267. },
  12268. {
  12269. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  12270. },
  12271. {
  12272. "$ref": "#/components/schemas/EventSessionCreated"
  12273. },
  12274. {
  12275. "$ref": "#/components/schemas/EventSessionUpdated"
  12276. },
  12277. {
  12278. "$ref": "#/components/schemas/EventSessionDeleted"
  12279. },
  12280. {
  12281. "$ref": "#/components/schemas/EventMessageUpdated"
  12282. },
  12283. {
  12284. "$ref": "#/components/schemas/EventMessageRemoved"
  12285. },
  12286. {
  12287. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12288. },
  12289. {
  12290. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12291. },
  12292. {
  12293. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12294. },
  12295. {
  12296. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12297. },
  12298. {
  12299. "$ref": "#/components/schemas/EventSessionNextMoved"
  12300. },
  12301. {
  12302. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12303. },
  12304. {
  12305. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  12306. },
  12307. {
  12308. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  12309. },
  12310. {
  12311. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  12312. },
  12313. {
  12314. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  12315. },
  12316. {
  12317. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12318. },
  12319. {
  12320. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12321. },
  12322. {
  12323. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12324. },
  12325. {
  12326. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12327. },
  12328. {
  12329. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12330. },
  12331. {
  12332. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12333. },
  12334. {
  12335. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12336. },
  12337. {
  12338. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12339. },
  12340. {
  12341. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12342. },
  12343. {
  12344. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12345. },
  12346. {
  12347. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12348. },
  12349. {
  12350. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12351. },
  12352. {
  12353. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12354. },
  12355. {
  12356. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12357. },
  12358. {
  12359. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12360. },
  12361. {
  12362. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12363. },
  12364. {
  12365. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12366. },
  12367. {
  12368. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12369. },
  12370. {
  12371. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12372. },
  12373. {
  12374. "$ref": "#/components/schemas/EventSessionNextRetried"
  12375. },
  12376. {
  12377. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12378. },
  12379. {
  12380. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12381. },
  12382. {
  12383. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12384. },
  12385. {
  12386. "$ref": "#/components/schemas/EventMessagePartDelta"
  12387. },
  12388. {
  12389. "$ref": "#/components/schemas/EventSessionDiff"
  12390. },
  12391. {
  12392. "$ref": "#/components/schemas/EventSessionError"
  12393. },
  12394. {
  12395. "$ref": "#/components/schemas/EventInstallationUpdated"
  12396. },
  12397. {
  12398. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12399. },
  12400. {
  12401. "$ref": "#/components/schemas/EventFileEdited"
  12402. },
  12403. {
  12404. "$ref": "#/components/schemas/EventAccountAdded"
  12405. },
  12406. {
  12407. "$ref": "#/components/schemas/EventAccountRemoved"
  12408. },
  12409. {
  12410. "$ref": "#/components/schemas/EventAccountSwitched"
  12411. },
  12412. {
  12413. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12414. },
  12415. {
  12416. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12417. },
  12418. {
  12419. "$ref": "#/components/schemas/EventReferenceUpdated"
  12420. },
  12421. {
  12422. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12423. },
  12424. {
  12425. "$ref": "#/components/schemas/EventPtyCreated"
  12426. },
  12427. {
  12428. "$ref": "#/components/schemas/EventPtyUpdated"
  12429. },
  12430. {
  12431. "$ref": "#/components/schemas/EventPtyExited"
  12432. },
  12433. {
  12434. "$ref": "#/components/schemas/EventPtyDeleted"
  12435. },
  12436. {
  12437. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12438. },
  12439. {
  12440. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12441. },
  12442. {
  12443. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12444. },
  12445. {
  12446. "$ref": "#/components/schemas/EventTodoUpdated"
  12447. },
  12448. {
  12449. "$ref": "#/components/schemas/EventLspUpdated"
  12450. },
  12451. {
  12452. "$ref": "#/components/schemas/EventPermissionAsked"
  12453. },
  12454. {
  12455. "$ref": "#/components/schemas/EventPermissionReplied"
  12456. },
  12457. {
  12458. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12459. },
  12460. {
  12461. "$ref": "#/components/schemas/Event.tui.command.execute"
  12462. },
  12463. {
  12464. "$ref": "#/components/schemas/Event.tui.toast.show"
  12465. },
  12466. {
  12467. "$ref": "#/components/schemas/Event.tui.session.select"
  12468. },
  12469. {
  12470. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12471. },
  12472. {
  12473. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12474. },
  12475. {
  12476. "$ref": "#/components/schemas/EventCommandExecuted"
  12477. },
  12478. {
  12479. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12480. },
  12481. {
  12482. "$ref": "#/components/schemas/EventProjectUpdated"
  12483. },
  12484. {
  12485. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12486. },
  12487. {
  12488. "$ref": "#/components/schemas/EventQuestionAsked"
  12489. },
  12490. {
  12491. "$ref": "#/components/schemas/EventQuestionReplied"
  12492. },
  12493. {
  12494. "$ref": "#/components/schemas/EventQuestionRejected"
  12495. },
  12496. {
  12497. "$ref": "#/components/schemas/EventSessionStatus"
  12498. },
  12499. {
  12500. "$ref": "#/components/schemas/EventSessionIdle"
  12501. },
  12502. {
  12503. "$ref": "#/components/schemas/EventSessionCompacted"
  12504. },
  12505. {
  12506. "$ref": "#/components/schemas/EventWorktreeReady"
  12507. },
  12508. {
  12509. "$ref": "#/components/schemas/EventWorktreeFailed"
  12510. },
  12511. {
  12512. "$ref": "#/components/schemas/EventWorkspaceReady"
  12513. },
  12514. {
  12515. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12516. },
  12517. {
  12518. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12519. },
  12520. {
  12521. "$ref": "#/components/schemas/EventServerConnected"
  12522. },
  12523. {
  12524. "$ref": "#/components/schemas/EventGlobalDisposed"
  12525. },
  12526. {
  12527. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12528. }
  12529. ]
  12530. },
  12531. "QuestionReplied": {
  12532. "type": "object",
  12533. "properties": {
  12534. "sessionID": {
  12535. "type": "string",
  12536. "pattern": "^ses"
  12537. },
  12538. "requestID": {
  12539. "type": "string",
  12540. "pattern": "^que"
  12541. },
  12542. "answers": {
  12543. "type": "array",
  12544. "items": {
  12545. "$ref": "#/components/schemas/QuestionAnswer"
  12546. }
  12547. }
  12548. },
  12549. "required": ["sessionID", "requestID", "answers"],
  12550. "additionalProperties": false
  12551. },
  12552. "QuestionRejected": {
  12553. "type": "object",
  12554. "properties": {
  12555. "sessionID": {
  12556. "type": "string",
  12557. "pattern": "^ses"
  12558. },
  12559. "requestID": {
  12560. "type": "string",
  12561. "pattern": "^que"
  12562. }
  12563. },
  12564. "required": ["sessionID", "requestID"],
  12565. "additionalProperties": false
  12566. },
  12567. "OAuth": {
  12568. "type": "object",
  12569. "properties": {
  12570. "type": {
  12571. "type": "string",
  12572. "enum": ["oauth"]
  12573. },
  12574. "refresh": {
  12575. "type": "string"
  12576. },
  12577. "access": {
  12578. "type": "string"
  12579. },
  12580. "expires": {
  12581. "type": "integer",
  12582. "minimum": 0
  12583. },
  12584. "accountId": {
  12585. "type": "string"
  12586. },
  12587. "enterpriseUrl": {
  12588. "type": "string"
  12589. }
  12590. },
  12591. "required": ["type", "refresh", "access", "expires"],
  12592. "additionalProperties": false
  12593. },
  12594. "ApiAuth": {
  12595. "type": "object",
  12596. "properties": {
  12597. "type": {
  12598. "type": "string",
  12599. "enum": ["api"]
  12600. },
  12601. "key": {
  12602. "type": "string"
  12603. },
  12604. "metadata": {
  12605. "type": "object",
  12606. "additionalProperties": {
  12607. "type": "string"
  12608. }
  12609. }
  12610. },
  12611. "required": ["type", "key"],
  12612. "additionalProperties": false
  12613. },
  12614. "WellKnownAuth": {
  12615. "type": "object",
  12616. "properties": {
  12617. "type": {
  12618. "type": "string",
  12619. "enum": ["wellknown"]
  12620. },
  12621. "key": {
  12622. "type": "string"
  12623. },
  12624. "token": {
  12625. "type": "string"
  12626. }
  12627. },
  12628. "required": ["type", "key", "token"],
  12629. "additionalProperties": false
  12630. },
  12631. "Auth": {
  12632. "anyOf": [
  12633. {
  12634. "$ref": "#/components/schemas/OAuth"
  12635. },
  12636. {
  12637. "$ref": "#/components/schemas/ApiAuth"
  12638. },
  12639. {
  12640. "$ref": "#/components/schemas/WellKnownAuth"
  12641. }
  12642. ]
  12643. },
  12644. "effect_HttpApiError_BadRequest": {
  12645. "type": "object",
  12646. "properties": {
  12647. "_tag": {
  12648. "type": "string",
  12649. "enum": ["BadRequest"]
  12650. }
  12651. },
  12652. "required": ["_tag"],
  12653. "additionalProperties": false
  12654. },
  12655. "InvalidRequestError": {
  12656. "type": "object",
  12657. "properties": {
  12658. "_tag": {
  12659. "type": "string",
  12660. "enum": ["InvalidRequestError"]
  12661. },
  12662. "message": {
  12663. "type": "string"
  12664. },
  12665. "kind": {
  12666. "type": "string"
  12667. },
  12668. "field": {
  12669. "type": "string"
  12670. }
  12671. },
  12672. "required": ["_tag", "message"],
  12673. "additionalProperties": false
  12674. },
  12675. "MoveSessionError": {
  12676. "type": "object",
  12677. "properties": {
  12678. "name": {
  12679. "type": "string",
  12680. "enum": ["MoveSessionError"]
  12681. },
  12682. "data": {
  12683. "type": "object",
  12684. "properties": {
  12685. "message": {
  12686. "type": "string"
  12687. }
  12688. },
  12689. "required": ["message"],
  12690. "additionalProperties": false
  12691. }
  12692. },
  12693. "required": ["name", "data"],
  12694. "additionalProperties": false
  12695. },
  12696. "SnapshotFileDiff": {
  12697. "type": "object",
  12698. "properties": {
  12699. "file": {
  12700. "type": "string"
  12701. },
  12702. "patch": {
  12703. "type": "string"
  12704. },
  12705. "additions": {
  12706. "type": "number"
  12707. },
  12708. "deletions": {
  12709. "type": "number"
  12710. },
  12711. "status": {
  12712. "type": "string",
  12713. "enum": ["added", "deleted", "modified"]
  12714. }
  12715. },
  12716. "required": ["additions", "deletions"],
  12717. "additionalProperties": false
  12718. },
  12719. "PermissionAction": {
  12720. "type": "string",
  12721. "enum": ["allow", "deny", "ask"]
  12722. },
  12723. "PermissionRule": {
  12724. "type": "object",
  12725. "properties": {
  12726. "permission": {
  12727. "type": "string"
  12728. },
  12729. "pattern": {
  12730. "type": "string"
  12731. },
  12732. "action": {
  12733. "$ref": "#/components/schemas/PermissionAction"
  12734. }
  12735. },
  12736. "required": ["permission", "pattern", "action"],
  12737. "additionalProperties": false
  12738. },
  12739. "PermissionRuleset": {
  12740. "type": "array",
  12741. "items": {
  12742. "$ref": "#/components/schemas/PermissionRule"
  12743. }
  12744. },
  12745. "Session": {
  12746. "type": "object",
  12747. "properties": {
  12748. "id": {
  12749. "type": "string",
  12750. "pattern": "^ses"
  12751. },
  12752. "slug": {
  12753. "type": "string"
  12754. },
  12755. "projectID": {
  12756. "type": "string"
  12757. },
  12758. "workspaceID": {
  12759. "type": "string",
  12760. "pattern": "^wrk"
  12761. },
  12762. "directory": {
  12763. "type": "string"
  12764. },
  12765. "path": {
  12766. "type": "string"
  12767. },
  12768. "parentID": {
  12769. "type": "string",
  12770. "pattern": "^ses"
  12771. },
  12772. "summary": {
  12773. "type": "object",
  12774. "properties": {
  12775. "additions": {
  12776. "type": "number"
  12777. },
  12778. "deletions": {
  12779. "type": "number"
  12780. },
  12781. "files": {
  12782. "type": "number"
  12783. },
  12784. "diffs": {
  12785. "type": "array",
  12786. "items": {
  12787. "$ref": "#/components/schemas/SnapshotFileDiff"
  12788. }
  12789. }
  12790. },
  12791. "required": ["additions", "deletions", "files"],
  12792. "additionalProperties": false
  12793. },
  12794. "cost": {
  12795. "type": "number"
  12796. },
  12797. "tokens": {
  12798. "type": "object",
  12799. "properties": {
  12800. "input": {
  12801. "type": "number"
  12802. },
  12803. "output": {
  12804. "type": "number"
  12805. },
  12806. "reasoning": {
  12807. "type": "number"
  12808. },
  12809. "cache": {
  12810. "type": "object",
  12811. "properties": {
  12812. "read": {
  12813. "type": "number"
  12814. },
  12815. "write": {
  12816. "type": "number"
  12817. }
  12818. },
  12819. "required": ["read", "write"],
  12820. "additionalProperties": false
  12821. }
  12822. },
  12823. "required": ["input", "output", "reasoning", "cache"],
  12824. "additionalProperties": false
  12825. },
  12826. "share": {
  12827. "type": "object",
  12828. "properties": {
  12829. "url": {
  12830. "type": "string"
  12831. }
  12832. },
  12833. "required": ["url"],
  12834. "additionalProperties": false
  12835. },
  12836. "title": {
  12837. "type": "string"
  12838. },
  12839. "agent": {
  12840. "type": "string"
  12841. },
  12842. "model": {
  12843. "type": "object",
  12844. "properties": {
  12845. "id": {
  12846. "type": "string"
  12847. },
  12848. "providerID": {
  12849. "type": "string"
  12850. },
  12851. "variant": {
  12852. "type": "string"
  12853. }
  12854. },
  12855. "required": ["id", "providerID"],
  12856. "additionalProperties": false
  12857. },
  12858. "version": {
  12859. "type": "string"
  12860. },
  12861. "metadata": {
  12862. "type": "object"
  12863. },
  12864. "time": {
  12865. "type": "object",
  12866. "properties": {
  12867. "created": {
  12868. "type": "integer",
  12869. "minimum": 0
  12870. },
  12871. "updated": {
  12872. "type": "integer",
  12873. "minimum": 0
  12874. },
  12875. "compacting": {
  12876. "type": "integer",
  12877. "minimum": 0
  12878. },
  12879. "archived": {
  12880. "type": "number"
  12881. }
  12882. },
  12883. "required": ["created", "updated"],
  12884. "additionalProperties": false
  12885. },
  12886. "permission": {
  12887. "$ref": "#/components/schemas/PermissionRuleset"
  12888. },
  12889. "revert": {
  12890. "type": "object",
  12891. "properties": {
  12892. "messageID": {
  12893. "type": "string",
  12894. "pattern": "^msg"
  12895. },
  12896. "partID": {
  12897. "type": "string",
  12898. "pattern": "^prt"
  12899. },
  12900. "snapshot": {
  12901. "type": "string"
  12902. },
  12903. "diff": {
  12904. "type": "string"
  12905. }
  12906. },
  12907. "required": ["messageID"],
  12908. "additionalProperties": false
  12909. }
  12910. },
  12911. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12912. "additionalProperties": false
  12913. },
  12914. "OutputFormatText": {
  12915. "type": "object",
  12916. "properties": {
  12917. "type": {
  12918. "type": "string",
  12919. "enum": ["text"]
  12920. }
  12921. },
  12922. "required": ["type"],
  12923. "additionalProperties": false
  12924. },
  12925. "JSONSchema": {
  12926. "type": "object"
  12927. },
  12928. "OutputFormatJsonSchema": {
  12929. "type": "object",
  12930. "properties": {
  12931. "type": {
  12932. "type": "string",
  12933. "enum": ["json_schema"]
  12934. },
  12935. "schema": {
  12936. "$ref": "#/components/schemas/JSONSchema"
  12937. },
  12938. "retryCount": {
  12939. "type": "integer",
  12940. "minimum": 0
  12941. }
  12942. },
  12943. "required": ["type", "schema"],
  12944. "additionalProperties": false
  12945. },
  12946. "OutputFormat": {
  12947. "anyOf": [
  12948. {
  12949. "$ref": "#/components/schemas/OutputFormatText"
  12950. },
  12951. {
  12952. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  12953. }
  12954. ]
  12955. },
  12956. "UserMessage": {
  12957. "type": "object",
  12958. "properties": {
  12959. "id": {
  12960. "type": "string",
  12961. "pattern": "^msg"
  12962. },
  12963. "sessionID": {
  12964. "type": "string",
  12965. "pattern": "^ses"
  12966. },
  12967. "role": {
  12968. "type": "string",
  12969. "enum": ["user"]
  12970. },
  12971. "time": {
  12972. "type": "object",
  12973. "properties": {
  12974. "created": {
  12975. "type": "number",
  12976. "minimum": 0
  12977. }
  12978. },
  12979. "required": ["created"],
  12980. "additionalProperties": false
  12981. },
  12982. "format": {
  12983. "$ref": "#/components/schemas/OutputFormat"
  12984. },
  12985. "summary": {
  12986. "type": "object",
  12987. "properties": {
  12988. "title": {
  12989. "type": "string"
  12990. },
  12991. "body": {
  12992. "type": "string"
  12993. },
  12994. "diffs": {
  12995. "type": "array",
  12996. "items": {
  12997. "$ref": "#/components/schemas/SnapshotFileDiff"
  12998. }
  12999. }
  13000. },
  13001. "required": ["diffs"],
  13002. "additionalProperties": false
  13003. },
  13004. "agent": {
  13005. "type": "string"
  13006. },
  13007. "model": {
  13008. "type": "object",
  13009. "properties": {
  13010. "providerID": {
  13011. "type": "string"
  13012. },
  13013. "modelID": {
  13014. "type": "string"
  13015. },
  13016. "variant": {
  13017. "type": "string"
  13018. }
  13019. },
  13020. "required": ["providerID", "modelID"],
  13021. "additionalProperties": false
  13022. },
  13023. "system": {
  13024. "type": "string"
  13025. },
  13026. "tools": {
  13027. "type": "object",
  13028. "additionalProperties": {
  13029. "type": "boolean"
  13030. }
  13031. }
  13032. },
  13033. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  13034. "additionalProperties": false
  13035. },
  13036. "ProviderAuthError": {
  13037. "type": "object",
  13038. "properties": {
  13039. "name": {
  13040. "type": "string",
  13041. "enum": ["ProviderAuthError"]
  13042. },
  13043. "data": {
  13044. "type": "object",
  13045. "properties": {
  13046. "providerID": {
  13047. "type": "string"
  13048. },
  13049. "message": {
  13050. "type": "string"
  13051. }
  13052. },
  13053. "required": ["providerID", "message"],
  13054. "additionalProperties": false
  13055. }
  13056. },
  13057. "required": ["name", "data"],
  13058. "additionalProperties": false
  13059. },
  13060. "UnknownError": {
  13061. "type": "object",
  13062. "properties": {
  13063. "name": {
  13064. "type": "string",
  13065. "enum": ["UnknownError"]
  13066. },
  13067. "data": {
  13068. "type": "object",
  13069. "properties": {
  13070. "message": {
  13071. "type": "string"
  13072. },
  13073. "ref": {
  13074. "type": "string"
  13075. }
  13076. },
  13077. "required": ["message"],
  13078. "additionalProperties": false
  13079. }
  13080. },
  13081. "required": ["name", "data"],
  13082. "additionalProperties": false
  13083. },
  13084. "MessageOutputLengthError": {
  13085. "type": "object",
  13086. "properties": {
  13087. "name": {
  13088. "type": "string",
  13089. "enum": ["MessageOutputLengthError"]
  13090. },
  13091. "data": {
  13092. "type": "object",
  13093. "properties": {}
  13094. }
  13095. },
  13096. "required": ["name", "data"],
  13097. "additionalProperties": false
  13098. },
  13099. "MessageAbortedError": {
  13100. "type": "object",
  13101. "properties": {
  13102. "name": {
  13103. "type": "string",
  13104. "enum": ["MessageAbortedError"]
  13105. },
  13106. "data": {
  13107. "type": "object",
  13108. "properties": {
  13109. "message": {
  13110. "type": "string"
  13111. }
  13112. },
  13113. "required": ["message"],
  13114. "additionalProperties": false
  13115. }
  13116. },
  13117. "required": ["name", "data"],
  13118. "additionalProperties": false
  13119. },
  13120. "StructuredOutputError": {
  13121. "type": "object",
  13122. "properties": {
  13123. "name": {
  13124. "type": "string",
  13125. "enum": ["StructuredOutputError"]
  13126. },
  13127. "data": {
  13128. "type": "object",
  13129. "properties": {
  13130. "message": {
  13131. "type": "string"
  13132. },
  13133. "retries": {
  13134. "type": "integer",
  13135. "minimum": 0
  13136. }
  13137. },
  13138. "required": ["message", "retries"],
  13139. "additionalProperties": false
  13140. }
  13141. },
  13142. "required": ["name", "data"],
  13143. "additionalProperties": false
  13144. },
  13145. "ContextOverflowError": {
  13146. "type": "object",
  13147. "properties": {
  13148. "name": {
  13149. "type": "string",
  13150. "enum": ["ContextOverflowError"]
  13151. },
  13152. "data": {
  13153. "type": "object",
  13154. "properties": {
  13155. "message": {
  13156. "type": "string"
  13157. },
  13158. "responseBody": {
  13159. "type": "string"
  13160. }
  13161. },
  13162. "required": ["message"],
  13163. "additionalProperties": false
  13164. }
  13165. },
  13166. "required": ["name", "data"],
  13167. "additionalProperties": false
  13168. },
  13169. "APIError": {
  13170. "type": "object",
  13171. "properties": {
  13172. "name": {
  13173. "type": "string",
  13174. "enum": ["APIError"]
  13175. },
  13176. "data": {
  13177. "type": "object",
  13178. "properties": {
  13179. "message": {
  13180. "type": "string"
  13181. },
  13182. "statusCode": {
  13183. "type": "integer",
  13184. "minimum": 0
  13185. },
  13186. "isRetryable": {
  13187. "type": "boolean"
  13188. },
  13189. "responseHeaders": {
  13190. "type": "object",
  13191. "additionalProperties": {
  13192. "type": "string"
  13193. }
  13194. },
  13195. "responseBody": {
  13196. "type": "string"
  13197. },
  13198. "metadata": {
  13199. "type": "object",
  13200. "additionalProperties": {
  13201. "type": "string"
  13202. }
  13203. }
  13204. },
  13205. "required": ["message", "isRetryable"],
  13206. "additionalProperties": false
  13207. }
  13208. },
  13209. "required": ["name", "data"],
  13210. "additionalProperties": false
  13211. },
  13212. "AssistantMessage": {
  13213. "type": "object",
  13214. "properties": {
  13215. "id": {
  13216. "type": "string",
  13217. "pattern": "^msg"
  13218. },
  13219. "sessionID": {
  13220. "type": "string",
  13221. "pattern": "^ses"
  13222. },
  13223. "role": {
  13224. "type": "string",
  13225. "enum": ["assistant"]
  13226. },
  13227. "time": {
  13228. "type": "object",
  13229. "properties": {
  13230. "created": {
  13231. "type": "integer",
  13232. "minimum": 0
  13233. },
  13234. "completed": {
  13235. "type": "integer",
  13236. "minimum": 0
  13237. }
  13238. },
  13239. "required": ["created"],
  13240. "additionalProperties": false
  13241. },
  13242. "error": {
  13243. "anyOf": [
  13244. {
  13245. "$ref": "#/components/schemas/ProviderAuthError"
  13246. },
  13247. {
  13248. "$ref": "#/components/schemas/UnknownError"
  13249. },
  13250. {
  13251. "$ref": "#/components/schemas/MessageOutputLengthError"
  13252. },
  13253. {
  13254. "$ref": "#/components/schemas/MessageAbortedError"
  13255. },
  13256. {
  13257. "$ref": "#/components/schemas/StructuredOutputError"
  13258. },
  13259. {
  13260. "$ref": "#/components/schemas/ContextOverflowError"
  13261. },
  13262. {
  13263. "$ref": "#/components/schemas/APIError"
  13264. }
  13265. ]
  13266. },
  13267. "parentID": {
  13268. "type": "string",
  13269. "pattern": "^msg"
  13270. },
  13271. "modelID": {
  13272. "type": "string"
  13273. },
  13274. "providerID": {
  13275. "type": "string"
  13276. },
  13277. "mode": {
  13278. "type": "string"
  13279. },
  13280. "agent": {
  13281. "type": "string"
  13282. },
  13283. "path": {
  13284. "type": "object",
  13285. "properties": {
  13286. "cwd": {
  13287. "type": "string"
  13288. },
  13289. "root": {
  13290. "type": "string"
  13291. }
  13292. },
  13293. "required": ["cwd", "root"],
  13294. "additionalProperties": false
  13295. },
  13296. "summary": {
  13297. "type": "boolean"
  13298. },
  13299. "cost": {
  13300. "type": "number"
  13301. },
  13302. "tokens": {
  13303. "type": "object",
  13304. "properties": {
  13305. "total": {
  13306. "type": "number"
  13307. },
  13308. "input": {
  13309. "type": "number"
  13310. },
  13311. "output": {
  13312. "type": "number"
  13313. },
  13314. "reasoning": {
  13315. "type": "number"
  13316. },
  13317. "cache": {
  13318. "type": "object",
  13319. "properties": {
  13320. "read": {
  13321. "type": "number"
  13322. },
  13323. "write": {
  13324. "type": "number"
  13325. }
  13326. },
  13327. "required": ["read", "write"],
  13328. "additionalProperties": false
  13329. }
  13330. },
  13331. "required": ["input", "output", "reasoning", "cache"],
  13332. "additionalProperties": false
  13333. },
  13334. "structured": {},
  13335. "variant": {
  13336. "type": "string"
  13337. },
  13338. "finish": {
  13339. "type": "string"
  13340. }
  13341. },
  13342. "required": [
  13343. "id",
  13344. "sessionID",
  13345. "role",
  13346. "time",
  13347. "parentID",
  13348. "modelID",
  13349. "providerID",
  13350. "mode",
  13351. "agent",
  13352. "path",
  13353. "cost",
  13354. "tokens"
  13355. ],
  13356. "additionalProperties": false
  13357. },
  13358. "Message": {
  13359. "anyOf": [
  13360. {
  13361. "$ref": "#/components/schemas/UserMessage"
  13362. },
  13363. {
  13364. "$ref": "#/components/schemas/AssistantMessage"
  13365. }
  13366. ]
  13367. },
  13368. "TextPart": {
  13369. "type": "object",
  13370. "properties": {
  13371. "id": {
  13372. "type": "string",
  13373. "pattern": "^prt"
  13374. },
  13375. "sessionID": {
  13376. "type": "string",
  13377. "pattern": "^ses"
  13378. },
  13379. "messageID": {
  13380. "type": "string",
  13381. "pattern": "^msg"
  13382. },
  13383. "type": {
  13384. "type": "string",
  13385. "enum": ["text"]
  13386. },
  13387. "text": {
  13388. "type": "string"
  13389. },
  13390. "synthetic": {
  13391. "type": "boolean"
  13392. },
  13393. "ignored": {
  13394. "type": "boolean"
  13395. },
  13396. "time": {
  13397. "type": "object",
  13398. "properties": {
  13399. "start": {
  13400. "type": "integer",
  13401. "minimum": 0
  13402. },
  13403. "end": {
  13404. "type": "integer",
  13405. "minimum": 0
  13406. }
  13407. },
  13408. "required": ["start"],
  13409. "additionalProperties": false
  13410. },
  13411. "metadata": {
  13412. "type": "object"
  13413. }
  13414. },
  13415. "required": ["id", "sessionID", "messageID", "type", "text"],
  13416. "additionalProperties": false
  13417. },
  13418. "SubtaskPart": {
  13419. "type": "object",
  13420. "properties": {
  13421. "id": {
  13422. "type": "string",
  13423. "pattern": "^prt"
  13424. },
  13425. "sessionID": {
  13426. "type": "string",
  13427. "pattern": "^ses"
  13428. },
  13429. "messageID": {
  13430. "type": "string",
  13431. "pattern": "^msg"
  13432. },
  13433. "type": {
  13434. "type": "string",
  13435. "enum": ["subtask"]
  13436. },
  13437. "prompt": {
  13438. "type": "string"
  13439. },
  13440. "description": {
  13441. "type": "string"
  13442. },
  13443. "agent": {
  13444. "type": "string"
  13445. },
  13446. "model": {
  13447. "type": "object",
  13448. "properties": {
  13449. "providerID": {
  13450. "type": "string"
  13451. },
  13452. "modelID": {
  13453. "type": "string"
  13454. }
  13455. },
  13456. "required": ["providerID", "modelID"],
  13457. "additionalProperties": false
  13458. },
  13459. "command": {
  13460. "type": "string"
  13461. }
  13462. },
  13463. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13464. "additionalProperties": false
  13465. },
  13466. "ReasoningPart": {
  13467. "type": "object",
  13468. "properties": {
  13469. "id": {
  13470. "type": "string",
  13471. "pattern": "^prt"
  13472. },
  13473. "sessionID": {
  13474. "type": "string",
  13475. "pattern": "^ses"
  13476. },
  13477. "messageID": {
  13478. "type": "string",
  13479. "pattern": "^msg"
  13480. },
  13481. "type": {
  13482. "type": "string",
  13483. "enum": ["reasoning"]
  13484. },
  13485. "text": {
  13486. "type": "string"
  13487. },
  13488. "metadata": {
  13489. "type": "object"
  13490. },
  13491. "time": {
  13492. "type": "object",
  13493. "properties": {
  13494. "start": {
  13495. "type": "integer",
  13496. "minimum": 0
  13497. },
  13498. "end": {
  13499. "type": "integer",
  13500. "minimum": 0
  13501. }
  13502. },
  13503. "required": ["start"],
  13504. "additionalProperties": false
  13505. }
  13506. },
  13507. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13508. "additionalProperties": false
  13509. },
  13510. "FilePartSourceText": {
  13511. "type": "object",
  13512. "properties": {
  13513. "value": {
  13514. "type": "string"
  13515. },
  13516. "start": {
  13517. "type": "number"
  13518. },
  13519. "end": {
  13520. "type": "number"
  13521. }
  13522. },
  13523. "required": ["value", "start", "end"],
  13524. "additionalProperties": false
  13525. },
  13526. "FileSource": {
  13527. "type": "object",
  13528. "properties": {
  13529. "text": {
  13530. "$ref": "#/components/schemas/FilePartSourceText"
  13531. },
  13532. "type": {
  13533. "type": "string",
  13534. "enum": ["file"]
  13535. },
  13536. "path": {
  13537. "type": "string"
  13538. }
  13539. },
  13540. "required": ["text", "type", "path"],
  13541. "additionalProperties": false
  13542. },
  13543. "Range": {
  13544. "type": "object",
  13545. "properties": {
  13546. "start": {
  13547. "type": "object",
  13548. "properties": {
  13549. "line": {
  13550. "type": "integer",
  13551. "minimum": 0
  13552. },
  13553. "character": {
  13554. "type": "integer",
  13555. "minimum": 0
  13556. }
  13557. },
  13558. "required": ["line", "character"],
  13559. "additionalProperties": false
  13560. },
  13561. "end": {
  13562. "type": "object",
  13563. "properties": {
  13564. "line": {
  13565. "type": "integer",
  13566. "minimum": 0
  13567. },
  13568. "character": {
  13569. "type": "integer",
  13570. "minimum": 0
  13571. }
  13572. },
  13573. "required": ["line", "character"],
  13574. "additionalProperties": false
  13575. }
  13576. },
  13577. "required": ["start", "end"],
  13578. "additionalProperties": false
  13579. },
  13580. "SymbolSource": {
  13581. "type": "object",
  13582. "properties": {
  13583. "text": {
  13584. "$ref": "#/components/schemas/FilePartSourceText"
  13585. },
  13586. "type": {
  13587. "type": "string",
  13588. "enum": ["symbol"]
  13589. },
  13590. "path": {
  13591. "type": "string"
  13592. },
  13593. "range": {
  13594. "$ref": "#/components/schemas/Range"
  13595. },
  13596. "name": {
  13597. "type": "string"
  13598. },
  13599. "kind": {
  13600. "type": "integer",
  13601. "minimum": 0
  13602. }
  13603. },
  13604. "required": ["text", "type", "path", "range", "name", "kind"],
  13605. "additionalProperties": false
  13606. },
  13607. "ResourceSource": {
  13608. "type": "object",
  13609. "properties": {
  13610. "text": {
  13611. "$ref": "#/components/schemas/FilePartSourceText"
  13612. },
  13613. "type": {
  13614. "type": "string",
  13615. "enum": ["resource"]
  13616. },
  13617. "clientName": {
  13618. "type": "string"
  13619. },
  13620. "uri": {
  13621. "type": "string"
  13622. }
  13623. },
  13624. "required": ["text", "type", "clientName", "uri"],
  13625. "additionalProperties": false
  13626. },
  13627. "FilePartSource": {
  13628. "anyOf": [
  13629. {
  13630. "$ref": "#/components/schemas/FileSource"
  13631. },
  13632. {
  13633. "$ref": "#/components/schemas/SymbolSource"
  13634. },
  13635. {
  13636. "$ref": "#/components/schemas/ResourceSource"
  13637. }
  13638. ]
  13639. },
  13640. "FilePart": {
  13641. "type": "object",
  13642. "properties": {
  13643. "id": {
  13644. "type": "string",
  13645. "pattern": "^prt"
  13646. },
  13647. "sessionID": {
  13648. "type": "string",
  13649. "pattern": "^ses"
  13650. },
  13651. "messageID": {
  13652. "type": "string",
  13653. "pattern": "^msg"
  13654. },
  13655. "type": {
  13656. "type": "string",
  13657. "enum": ["file"]
  13658. },
  13659. "mime": {
  13660. "type": "string"
  13661. },
  13662. "filename": {
  13663. "type": "string"
  13664. },
  13665. "url": {
  13666. "type": "string"
  13667. },
  13668. "source": {
  13669. "$ref": "#/components/schemas/FilePartSource"
  13670. }
  13671. },
  13672. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  13673. "additionalProperties": false
  13674. },
  13675. "ToolStatePending": {
  13676. "type": "object",
  13677. "properties": {
  13678. "status": {
  13679. "type": "string",
  13680. "enum": ["pending"]
  13681. },
  13682. "input": {
  13683. "type": "object"
  13684. },
  13685. "raw": {
  13686. "type": "string"
  13687. }
  13688. },
  13689. "required": ["status", "input", "raw"],
  13690. "additionalProperties": false
  13691. },
  13692. "ToolStateRunning": {
  13693. "type": "object",
  13694. "properties": {
  13695. "status": {
  13696. "type": "string",
  13697. "enum": ["running"]
  13698. },
  13699. "input": {
  13700. "type": "object"
  13701. },
  13702. "title": {
  13703. "type": "string"
  13704. },
  13705. "metadata": {
  13706. "type": "object"
  13707. },
  13708. "time": {
  13709. "type": "object",
  13710. "properties": {
  13711. "start": {
  13712. "type": "integer",
  13713. "minimum": 0
  13714. }
  13715. },
  13716. "required": ["start"],
  13717. "additionalProperties": false
  13718. }
  13719. },
  13720. "required": ["status", "input", "time"],
  13721. "additionalProperties": false
  13722. },
  13723. "ToolStateCompleted": {
  13724. "type": "object",
  13725. "properties": {
  13726. "status": {
  13727. "type": "string",
  13728. "enum": ["completed"]
  13729. },
  13730. "input": {
  13731. "type": "object"
  13732. },
  13733. "output": {
  13734. "type": "string"
  13735. },
  13736. "title": {
  13737. "type": "string"
  13738. },
  13739. "metadata": {
  13740. "type": "object"
  13741. },
  13742. "time": {
  13743. "type": "object",
  13744. "properties": {
  13745. "start": {
  13746. "type": "integer",
  13747. "minimum": 0
  13748. },
  13749. "end": {
  13750. "type": "integer",
  13751. "minimum": 0
  13752. },
  13753. "compacted": {
  13754. "type": "integer",
  13755. "minimum": 0
  13756. }
  13757. },
  13758. "required": ["start", "end"],
  13759. "additionalProperties": false
  13760. },
  13761. "attachments": {
  13762. "type": "array",
  13763. "items": {
  13764. "$ref": "#/components/schemas/FilePart"
  13765. }
  13766. }
  13767. },
  13768. "required": ["status", "input", "output", "title", "metadata", "time"],
  13769. "additionalProperties": false
  13770. },
  13771. "ToolStateError": {
  13772. "type": "object",
  13773. "properties": {
  13774. "status": {
  13775. "type": "string",
  13776. "enum": ["error"]
  13777. },
  13778. "input": {
  13779. "type": "object"
  13780. },
  13781. "error": {
  13782. "type": "string"
  13783. },
  13784. "metadata": {
  13785. "type": "object"
  13786. },
  13787. "time": {
  13788. "type": "object",
  13789. "properties": {
  13790. "start": {
  13791. "type": "integer",
  13792. "minimum": 0
  13793. },
  13794. "end": {
  13795. "type": "integer",
  13796. "minimum": 0
  13797. }
  13798. },
  13799. "required": ["start", "end"],
  13800. "additionalProperties": false
  13801. }
  13802. },
  13803. "required": ["status", "input", "error", "time"],
  13804. "additionalProperties": false
  13805. },
  13806. "ToolState": {
  13807. "anyOf": [
  13808. {
  13809. "$ref": "#/components/schemas/ToolStatePending"
  13810. },
  13811. {
  13812. "$ref": "#/components/schemas/ToolStateRunning"
  13813. },
  13814. {
  13815. "$ref": "#/components/schemas/ToolStateCompleted"
  13816. },
  13817. {
  13818. "$ref": "#/components/schemas/ToolStateError"
  13819. }
  13820. ]
  13821. },
  13822. "ToolPart": {
  13823. "type": "object",
  13824. "properties": {
  13825. "id": {
  13826. "type": "string",
  13827. "pattern": "^prt"
  13828. },
  13829. "sessionID": {
  13830. "type": "string",
  13831. "pattern": "^ses"
  13832. },
  13833. "messageID": {
  13834. "type": "string",
  13835. "pattern": "^msg"
  13836. },
  13837. "type": {
  13838. "type": "string",
  13839. "enum": ["tool"]
  13840. },
  13841. "callID": {
  13842. "type": "string"
  13843. },
  13844. "tool": {
  13845. "type": "string"
  13846. },
  13847. "state": {
  13848. "$ref": "#/components/schemas/ToolState"
  13849. },
  13850. "metadata": {
  13851. "type": "object"
  13852. }
  13853. },
  13854. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  13855. "additionalProperties": false
  13856. },
  13857. "StepStartPart": {
  13858. "type": "object",
  13859. "properties": {
  13860. "id": {
  13861. "type": "string",
  13862. "pattern": "^prt"
  13863. },
  13864. "sessionID": {
  13865. "type": "string",
  13866. "pattern": "^ses"
  13867. },
  13868. "messageID": {
  13869. "type": "string",
  13870. "pattern": "^msg"
  13871. },
  13872. "type": {
  13873. "type": "string",
  13874. "enum": ["step-start"]
  13875. },
  13876. "snapshot": {
  13877. "type": "string"
  13878. }
  13879. },
  13880. "required": ["id", "sessionID", "messageID", "type"],
  13881. "additionalProperties": false
  13882. },
  13883. "StepFinishPart": {
  13884. "type": "object",
  13885. "properties": {
  13886. "id": {
  13887. "type": "string",
  13888. "pattern": "^prt"
  13889. },
  13890. "sessionID": {
  13891. "type": "string",
  13892. "pattern": "^ses"
  13893. },
  13894. "messageID": {
  13895. "type": "string",
  13896. "pattern": "^msg"
  13897. },
  13898. "type": {
  13899. "type": "string",
  13900. "enum": ["step-finish"]
  13901. },
  13902. "reason": {
  13903. "type": "string"
  13904. },
  13905. "snapshot": {
  13906. "type": "string"
  13907. },
  13908. "cost": {
  13909. "type": "number"
  13910. },
  13911. "tokens": {
  13912. "type": "object",
  13913. "properties": {
  13914. "total": {
  13915. "type": "number"
  13916. },
  13917. "input": {
  13918. "type": "number"
  13919. },
  13920. "output": {
  13921. "type": "number"
  13922. },
  13923. "reasoning": {
  13924. "type": "number"
  13925. },
  13926. "cache": {
  13927. "type": "object",
  13928. "properties": {
  13929. "read": {
  13930. "type": "number"
  13931. },
  13932. "write": {
  13933. "type": "number"
  13934. }
  13935. },
  13936. "required": ["read", "write"],
  13937. "additionalProperties": false
  13938. }
  13939. },
  13940. "required": ["input", "output", "reasoning", "cache"],
  13941. "additionalProperties": false
  13942. }
  13943. },
  13944. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  13945. "additionalProperties": false
  13946. },
  13947. "SnapshotPart": {
  13948. "type": "object",
  13949. "properties": {
  13950. "id": {
  13951. "type": "string",
  13952. "pattern": "^prt"
  13953. },
  13954. "sessionID": {
  13955. "type": "string",
  13956. "pattern": "^ses"
  13957. },
  13958. "messageID": {
  13959. "type": "string",
  13960. "pattern": "^msg"
  13961. },
  13962. "type": {
  13963. "type": "string",
  13964. "enum": ["snapshot"]
  13965. },
  13966. "snapshot": {
  13967. "type": "string"
  13968. }
  13969. },
  13970. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  13971. "additionalProperties": false
  13972. },
  13973. "PatchPart": {
  13974. "type": "object",
  13975. "properties": {
  13976. "id": {
  13977. "type": "string",
  13978. "pattern": "^prt"
  13979. },
  13980. "sessionID": {
  13981. "type": "string",
  13982. "pattern": "^ses"
  13983. },
  13984. "messageID": {
  13985. "type": "string",
  13986. "pattern": "^msg"
  13987. },
  13988. "type": {
  13989. "type": "string",
  13990. "enum": ["patch"]
  13991. },
  13992. "hash": {
  13993. "type": "string"
  13994. },
  13995. "files": {
  13996. "type": "array",
  13997. "items": {
  13998. "type": "string"
  13999. }
  14000. }
  14001. },
  14002. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  14003. "additionalProperties": false
  14004. },
  14005. "AgentPart": {
  14006. "type": "object",
  14007. "properties": {
  14008. "id": {
  14009. "type": "string",
  14010. "pattern": "^prt"
  14011. },
  14012. "sessionID": {
  14013. "type": "string",
  14014. "pattern": "^ses"
  14015. },
  14016. "messageID": {
  14017. "type": "string",
  14018. "pattern": "^msg"
  14019. },
  14020. "type": {
  14021. "type": "string",
  14022. "enum": ["agent"]
  14023. },
  14024. "name": {
  14025. "type": "string"
  14026. },
  14027. "source": {
  14028. "type": "object",
  14029. "properties": {
  14030. "value": {
  14031. "type": "string"
  14032. },
  14033. "start": {
  14034. "type": "integer",
  14035. "minimum": 0
  14036. },
  14037. "end": {
  14038. "type": "integer",
  14039. "minimum": 0
  14040. }
  14041. },
  14042. "required": ["value", "start", "end"],
  14043. "additionalProperties": false
  14044. }
  14045. },
  14046. "required": ["id", "sessionID", "messageID", "type", "name"],
  14047. "additionalProperties": false
  14048. },
  14049. "RetryPart": {
  14050. "type": "object",
  14051. "properties": {
  14052. "id": {
  14053. "type": "string",
  14054. "pattern": "^prt"
  14055. },
  14056. "sessionID": {
  14057. "type": "string",
  14058. "pattern": "^ses"
  14059. },
  14060. "messageID": {
  14061. "type": "string",
  14062. "pattern": "^msg"
  14063. },
  14064. "type": {
  14065. "type": "string",
  14066. "enum": ["retry"]
  14067. },
  14068. "attempt": {
  14069. "type": "integer",
  14070. "minimum": 0
  14071. },
  14072. "error": {
  14073. "$ref": "#/components/schemas/APIError"
  14074. },
  14075. "time": {
  14076. "type": "object",
  14077. "properties": {
  14078. "created": {
  14079. "type": "integer",
  14080. "minimum": 0
  14081. }
  14082. },
  14083. "required": ["created"],
  14084. "additionalProperties": false
  14085. }
  14086. },
  14087. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  14088. "additionalProperties": false
  14089. },
  14090. "CompactionPart": {
  14091. "type": "object",
  14092. "properties": {
  14093. "id": {
  14094. "type": "string",
  14095. "pattern": "^prt"
  14096. },
  14097. "sessionID": {
  14098. "type": "string",
  14099. "pattern": "^ses"
  14100. },
  14101. "messageID": {
  14102. "type": "string",
  14103. "pattern": "^msg"
  14104. },
  14105. "type": {
  14106. "type": "string",
  14107. "enum": ["compaction"]
  14108. },
  14109. "auto": {
  14110. "type": "boolean"
  14111. },
  14112. "overflow": {
  14113. "type": "boolean"
  14114. },
  14115. "tail_start_id": {
  14116. "type": "string",
  14117. "pattern": "^msg"
  14118. }
  14119. },
  14120. "required": ["id", "sessionID", "messageID", "type", "auto"],
  14121. "additionalProperties": false
  14122. },
  14123. "Part": {
  14124. "anyOf": [
  14125. {
  14126. "$ref": "#/components/schemas/TextPart"
  14127. },
  14128. {
  14129. "$ref": "#/components/schemas/SubtaskPart"
  14130. },
  14131. {
  14132. "$ref": "#/components/schemas/ReasoningPart"
  14133. },
  14134. {
  14135. "$ref": "#/components/schemas/FilePart"
  14136. },
  14137. {
  14138. "$ref": "#/components/schemas/ToolPart"
  14139. },
  14140. {
  14141. "$ref": "#/components/schemas/StepStartPart"
  14142. },
  14143. {
  14144. "$ref": "#/components/schemas/StepFinishPart"
  14145. },
  14146. {
  14147. "$ref": "#/components/schemas/SnapshotPart"
  14148. },
  14149. {
  14150. "$ref": "#/components/schemas/PatchPart"
  14151. },
  14152. {
  14153. "$ref": "#/components/schemas/AgentPart"
  14154. },
  14155. {
  14156. "$ref": "#/components/schemas/RetryPart"
  14157. },
  14158. {
  14159. "$ref": "#/components/schemas/CompactionPart"
  14160. }
  14161. ]
  14162. },
  14163. "Prompt": {
  14164. "type": "object",
  14165. "properties": {
  14166. "text": {
  14167. "type": "string"
  14168. },
  14169. "files": {
  14170. "type": "array",
  14171. "items": {
  14172. "$ref": "#/components/schemas/PromptFileAttachment"
  14173. }
  14174. },
  14175. "agents": {
  14176. "type": "array",
  14177. "items": {
  14178. "$ref": "#/components/schemas/PromptAgentAttachment"
  14179. }
  14180. }
  14181. },
  14182. "required": ["text"],
  14183. "additionalProperties": false
  14184. },
  14185. "Pty": {
  14186. "type": "object",
  14187. "properties": {
  14188. "id": {
  14189. "type": "string",
  14190. "pattern": "^pty"
  14191. },
  14192. "title": {
  14193. "type": "string"
  14194. },
  14195. "command": {
  14196. "type": "string"
  14197. },
  14198. "args": {
  14199. "type": "array",
  14200. "items": {
  14201. "type": "string"
  14202. }
  14203. },
  14204. "cwd": {
  14205. "type": "string"
  14206. },
  14207. "status": {
  14208. "type": "string",
  14209. "enum": ["running", "exited"]
  14210. },
  14211. "pid": {
  14212. "type": "integer",
  14213. "minimum": 0
  14214. }
  14215. },
  14216. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  14217. "additionalProperties": false
  14218. },
  14219. "Todo": {
  14220. "type": "object",
  14221. "properties": {
  14222. "content": {
  14223. "type": "string",
  14224. "description": "Brief description of the task"
  14225. },
  14226. "status": {
  14227. "type": "string",
  14228. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  14229. },
  14230. "priority": {
  14231. "type": "string",
  14232. "description": "Priority level of the task: high, medium, low"
  14233. }
  14234. },
  14235. "required": ["content", "status", "priority"],
  14236. "additionalProperties": false
  14237. },
  14238. "QuestionOption": {
  14239. "type": "object",
  14240. "properties": {
  14241. "label": {
  14242. "type": "string",
  14243. "description": "Display text (1-5 words, concise)"
  14244. },
  14245. "description": {
  14246. "type": "string",
  14247. "description": "Explanation of choice"
  14248. }
  14249. },
  14250. "required": ["label", "description"],
  14251. "additionalProperties": false
  14252. },
  14253. "QuestionInfo": {
  14254. "type": "object",
  14255. "properties": {
  14256. "question": {
  14257. "type": "string",
  14258. "description": "Complete question"
  14259. },
  14260. "header": {
  14261. "type": "string",
  14262. "description": "Very short label (max 30 chars)"
  14263. },
  14264. "options": {
  14265. "type": "array",
  14266. "items": {
  14267. "$ref": "#/components/schemas/QuestionOption"
  14268. },
  14269. "description": "Available choices"
  14270. },
  14271. "multiple": {
  14272. "type": "boolean"
  14273. },
  14274. "custom": {
  14275. "type": "boolean"
  14276. }
  14277. },
  14278. "required": ["question", "header", "options"],
  14279. "additionalProperties": false
  14280. },
  14281. "QuestionTool": {
  14282. "type": "object",
  14283. "properties": {
  14284. "messageID": {
  14285. "type": "string",
  14286. "pattern": "^msg"
  14287. },
  14288. "callID": {
  14289. "type": "string"
  14290. }
  14291. },
  14292. "required": ["messageID", "callID"],
  14293. "additionalProperties": false
  14294. },
  14295. "QuestionAnswer": {
  14296. "type": "array",
  14297. "items": {
  14298. "type": "string"
  14299. }
  14300. },
  14301. "SessionStatus": {
  14302. "anyOf": [
  14303. {
  14304. "type": "object",
  14305. "properties": {
  14306. "type": {
  14307. "type": "string",
  14308. "enum": ["idle"]
  14309. }
  14310. },
  14311. "required": ["type"],
  14312. "additionalProperties": false
  14313. },
  14314. {
  14315. "type": "object",
  14316. "properties": {
  14317. "type": {
  14318. "type": "string",
  14319. "enum": ["retry"]
  14320. },
  14321. "attempt": {
  14322. "type": "integer",
  14323. "minimum": 0
  14324. },
  14325. "message": {
  14326. "type": "string"
  14327. },
  14328. "action": {
  14329. "type": "object",
  14330. "properties": {
  14331. "reason": {
  14332. "type": "string"
  14333. },
  14334. "provider": {
  14335. "type": "string"
  14336. },
  14337. "title": {
  14338. "type": "string"
  14339. },
  14340. "message": {
  14341. "type": "string"
  14342. },
  14343. "label": {
  14344. "type": "string"
  14345. },
  14346. "link": {
  14347. "type": "string"
  14348. }
  14349. },
  14350. "required": ["reason", "provider", "title", "message", "label"],
  14351. "additionalProperties": false
  14352. },
  14353. "next": {
  14354. "type": "integer",
  14355. "minimum": 0
  14356. }
  14357. },
  14358. "required": ["type", "attempt", "message", "next"],
  14359. "additionalProperties": false
  14360. },
  14361. {
  14362. "type": "object",
  14363. "properties": {
  14364. "type": {
  14365. "type": "string",
  14366. "enum": ["busy"]
  14367. }
  14368. },
  14369. "required": ["type"],
  14370. "additionalProperties": false
  14371. }
  14372. ]
  14373. },
  14374. "GlobalEvent": {
  14375. "type": "object",
  14376. "properties": {
  14377. "directory": {
  14378. "type": "string"
  14379. },
  14380. "project": {
  14381. "type": "string"
  14382. },
  14383. "workspace": {
  14384. "type": "string"
  14385. },
  14386. "payload": {
  14387. "anyOf": [
  14388. {
  14389. "type": "object",
  14390. "properties": {
  14391. "id": {
  14392. "type": "string",
  14393. "pattern": "^evt_"
  14394. },
  14395. "type": {
  14396. "type": "string",
  14397. "enum": ["models-dev.refreshed"]
  14398. },
  14399. "properties": {
  14400. "type": "object",
  14401. "properties": {}
  14402. }
  14403. },
  14404. "required": ["id", "type", "properties"],
  14405. "additionalProperties": false
  14406. },
  14407. {
  14408. "type": "object",
  14409. "properties": {
  14410. "id": {
  14411. "type": "string",
  14412. "pattern": "^evt_"
  14413. },
  14414. "type": {
  14415. "type": "string",
  14416. "enum": ["plugin.added"]
  14417. },
  14418. "properties": {
  14419. "type": "object",
  14420. "properties": {
  14421. "id": {
  14422. "type": "string"
  14423. }
  14424. },
  14425. "required": ["id"],
  14426. "additionalProperties": false
  14427. }
  14428. },
  14429. "required": ["id", "type", "properties"],
  14430. "additionalProperties": false
  14431. },
  14432. {
  14433. "type": "object",
  14434. "properties": {
  14435. "id": {
  14436. "type": "string",
  14437. "pattern": "^evt_"
  14438. },
  14439. "type": {
  14440. "type": "string",
  14441. "enum": ["catalog.model.updated"]
  14442. },
  14443. "properties": {
  14444. "type": "object",
  14445. "properties": {
  14446. "model": {
  14447. "$ref": "#/components/schemas/ModelV2Info"
  14448. }
  14449. },
  14450. "required": ["model"],
  14451. "additionalProperties": false
  14452. }
  14453. },
  14454. "required": ["id", "type", "properties"],
  14455. "additionalProperties": false
  14456. },
  14457. {
  14458. "type": "object",
  14459. "properties": {
  14460. "id": {
  14461. "type": "string",
  14462. "pattern": "^evt_"
  14463. },
  14464. "type": {
  14465. "type": "string",
  14466. "enum": ["session.created"]
  14467. },
  14468. "properties": {
  14469. "type": "object",
  14470. "properties": {
  14471. "sessionID": {
  14472. "type": "string",
  14473. "pattern": "^ses"
  14474. },
  14475. "info": {
  14476. "$ref": "#/components/schemas/Session"
  14477. }
  14478. },
  14479. "required": ["sessionID", "info"],
  14480. "additionalProperties": false
  14481. }
  14482. },
  14483. "required": ["id", "type", "properties"],
  14484. "additionalProperties": false
  14485. },
  14486. {
  14487. "type": "object",
  14488. "properties": {
  14489. "id": {
  14490. "type": "string",
  14491. "pattern": "^evt_"
  14492. },
  14493. "type": {
  14494. "type": "string",
  14495. "enum": ["session.updated"]
  14496. },
  14497. "properties": {
  14498. "type": "object",
  14499. "properties": {
  14500. "sessionID": {
  14501. "type": "string",
  14502. "pattern": "^ses"
  14503. },
  14504. "info": {
  14505. "$ref": "#/components/schemas/Session"
  14506. }
  14507. },
  14508. "required": ["sessionID", "info"],
  14509. "additionalProperties": false
  14510. }
  14511. },
  14512. "required": ["id", "type", "properties"],
  14513. "additionalProperties": false
  14514. },
  14515. {
  14516. "type": "object",
  14517. "properties": {
  14518. "id": {
  14519. "type": "string",
  14520. "pattern": "^evt_"
  14521. },
  14522. "type": {
  14523. "type": "string",
  14524. "enum": ["session.deleted"]
  14525. },
  14526. "properties": {
  14527. "type": "object",
  14528. "properties": {
  14529. "sessionID": {
  14530. "type": "string",
  14531. "pattern": "^ses"
  14532. },
  14533. "info": {
  14534. "$ref": "#/components/schemas/Session"
  14535. }
  14536. },
  14537. "required": ["sessionID", "info"],
  14538. "additionalProperties": false
  14539. }
  14540. },
  14541. "required": ["id", "type", "properties"],
  14542. "additionalProperties": false
  14543. },
  14544. {
  14545. "type": "object",
  14546. "properties": {
  14547. "id": {
  14548. "type": "string",
  14549. "pattern": "^evt_"
  14550. },
  14551. "type": {
  14552. "type": "string",
  14553. "enum": ["message.updated"]
  14554. },
  14555. "properties": {
  14556. "type": "object",
  14557. "properties": {
  14558. "sessionID": {
  14559. "type": "string",
  14560. "pattern": "^ses"
  14561. },
  14562. "info": {
  14563. "$ref": "#/components/schemas/Message"
  14564. }
  14565. },
  14566. "required": ["sessionID", "info"],
  14567. "additionalProperties": false
  14568. }
  14569. },
  14570. "required": ["id", "type", "properties"],
  14571. "additionalProperties": false
  14572. },
  14573. {
  14574. "type": "object",
  14575. "properties": {
  14576. "id": {
  14577. "type": "string",
  14578. "pattern": "^evt_"
  14579. },
  14580. "type": {
  14581. "type": "string",
  14582. "enum": ["message.removed"]
  14583. },
  14584. "properties": {
  14585. "type": "object",
  14586. "properties": {
  14587. "sessionID": {
  14588. "type": "string",
  14589. "pattern": "^ses"
  14590. },
  14591. "messageID": {
  14592. "type": "string",
  14593. "pattern": "^msg"
  14594. }
  14595. },
  14596. "required": ["sessionID", "messageID"],
  14597. "additionalProperties": false
  14598. }
  14599. },
  14600. "required": ["id", "type", "properties"],
  14601. "additionalProperties": false
  14602. },
  14603. {
  14604. "type": "object",
  14605. "properties": {
  14606. "id": {
  14607. "type": "string",
  14608. "pattern": "^evt_"
  14609. },
  14610. "type": {
  14611. "type": "string",
  14612. "enum": ["message.part.updated"]
  14613. },
  14614. "properties": {
  14615. "type": "object",
  14616. "properties": {
  14617. "sessionID": {
  14618. "type": "string",
  14619. "pattern": "^ses"
  14620. },
  14621. "part": {
  14622. "$ref": "#/components/schemas/Part"
  14623. },
  14624. "time": {
  14625. "type": "number"
  14626. }
  14627. },
  14628. "required": ["sessionID", "part", "time"],
  14629. "additionalProperties": false
  14630. }
  14631. },
  14632. "required": ["id", "type", "properties"],
  14633. "additionalProperties": false
  14634. },
  14635. {
  14636. "type": "object",
  14637. "properties": {
  14638. "id": {
  14639. "type": "string",
  14640. "pattern": "^evt_"
  14641. },
  14642. "type": {
  14643. "type": "string",
  14644. "enum": ["message.part.removed"]
  14645. },
  14646. "properties": {
  14647. "type": "object",
  14648. "properties": {
  14649. "sessionID": {
  14650. "type": "string",
  14651. "pattern": "^ses"
  14652. },
  14653. "messageID": {
  14654. "type": "string",
  14655. "pattern": "^msg"
  14656. },
  14657. "partID": {
  14658. "type": "string",
  14659. "pattern": "^prt"
  14660. }
  14661. },
  14662. "required": ["sessionID", "messageID", "partID"],
  14663. "additionalProperties": false
  14664. }
  14665. },
  14666. "required": ["id", "type", "properties"],
  14667. "additionalProperties": false
  14668. },
  14669. {
  14670. "type": "object",
  14671. "properties": {
  14672. "id": {
  14673. "type": "string",
  14674. "pattern": "^evt_"
  14675. },
  14676. "type": {
  14677. "type": "string",
  14678. "enum": ["session.next.agent.switched"]
  14679. },
  14680. "properties": {
  14681. "type": "object",
  14682. "properties": {
  14683. "timestamp": {
  14684. "type": "number"
  14685. },
  14686. "sessionID": {
  14687. "type": "string",
  14688. "pattern": "^ses"
  14689. },
  14690. "messageID": {
  14691. "type": "string",
  14692. "pattern": "^msg_"
  14693. },
  14694. "agent": {
  14695. "type": "string"
  14696. }
  14697. },
  14698. "required": ["timestamp", "sessionID", "messageID", "agent"],
  14699. "additionalProperties": false
  14700. }
  14701. },
  14702. "required": ["id", "type", "properties"],
  14703. "additionalProperties": false
  14704. },
  14705. {
  14706. "type": "object",
  14707. "properties": {
  14708. "id": {
  14709. "type": "string",
  14710. "pattern": "^evt_"
  14711. },
  14712. "type": {
  14713. "type": "string",
  14714. "enum": ["session.next.model.switched"]
  14715. },
  14716. "properties": {
  14717. "type": "object",
  14718. "properties": {
  14719. "timestamp": {
  14720. "type": "number"
  14721. },
  14722. "sessionID": {
  14723. "type": "string",
  14724. "pattern": "^ses"
  14725. },
  14726. "messageID": {
  14727. "type": "string",
  14728. "pattern": "^msg_"
  14729. },
  14730. "model": {
  14731. "type": "object",
  14732. "properties": {
  14733. "id": {
  14734. "type": "string"
  14735. },
  14736. "providerID": {
  14737. "type": "string"
  14738. },
  14739. "variant": {
  14740. "type": "string"
  14741. }
  14742. },
  14743. "required": ["id", "providerID"],
  14744. "additionalProperties": false
  14745. }
  14746. },
  14747. "required": ["timestamp", "sessionID", "messageID", "model"],
  14748. "additionalProperties": false
  14749. }
  14750. },
  14751. "required": ["id", "type", "properties"],
  14752. "additionalProperties": false
  14753. },
  14754. {
  14755. "type": "object",
  14756. "properties": {
  14757. "id": {
  14758. "type": "string",
  14759. "pattern": "^evt_"
  14760. },
  14761. "type": {
  14762. "type": "string",
  14763. "enum": ["session.next.moved"]
  14764. },
  14765. "properties": {
  14766. "type": "object",
  14767. "properties": {
  14768. "timestamp": {
  14769. "type": "number"
  14770. },
  14771. "sessionID": {
  14772. "type": "string",
  14773. "pattern": "^ses"
  14774. },
  14775. "location": {
  14776. "$ref": "#/components/schemas/LocationRef"
  14777. },
  14778. "subdirectory": {
  14779. "type": "string"
  14780. }
  14781. },
  14782. "required": ["timestamp", "sessionID", "location"],
  14783. "additionalProperties": false
  14784. }
  14785. },
  14786. "required": ["id", "type", "properties"],
  14787. "additionalProperties": false
  14788. },
  14789. {
  14790. "type": "object",
  14791. "properties": {
  14792. "id": {
  14793. "type": "string",
  14794. "pattern": "^evt_"
  14795. },
  14796. "type": {
  14797. "type": "string",
  14798. "enum": ["session.next.prompted"]
  14799. },
  14800. "properties": {
  14801. "type": "object",
  14802. "properties": {
  14803. "timestamp": {
  14804. "type": "number"
  14805. },
  14806. "sessionID": {
  14807. "type": "string",
  14808. "pattern": "^ses"
  14809. },
  14810. "messageID": {
  14811. "type": "string",
  14812. "pattern": "^msg_"
  14813. },
  14814. "prompt": {
  14815. "$ref": "#/components/schemas/Prompt"
  14816. },
  14817. "delivery": {
  14818. "type": "string",
  14819. "enum": ["steer", "queue"]
  14820. }
  14821. },
  14822. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14823. "additionalProperties": false
  14824. }
  14825. },
  14826. "required": ["id", "type", "properties"],
  14827. "additionalProperties": false
  14828. },
  14829. {
  14830. "type": "object",
  14831. "properties": {
  14832. "id": {
  14833. "type": "string",
  14834. "pattern": "^evt_"
  14835. },
  14836. "type": {
  14837. "type": "string",
  14838. "enum": ["session.next.prompt.admitted"]
  14839. },
  14840. "properties": {
  14841. "type": "object",
  14842. "properties": {
  14843. "timestamp": {
  14844. "type": "number"
  14845. },
  14846. "sessionID": {
  14847. "type": "string",
  14848. "pattern": "^ses"
  14849. },
  14850. "messageID": {
  14851. "type": "string",
  14852. "pattern": "^msg_"
  14853. },
  14854. "prompt": {
  14855. "$ref": "#/components/schemas/Prompt"
  14856. },
  14857. "delivery": {
  14858. "type": "string",
  14859. "enum": ["steer", "queue"]
  14860. }
  14861. },
  14862. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14863. "additionalProperties": false
  14864. }
  14865. },
  14866. "required": ["id", "type", "properties"],
  14867. "additionalProperties": false
  14868. },
  14869. {
  14870. "type": "object",
  14871. "properties": {
  14872. "id": {
  14873. "type": "string",
  14874. "pattern": "^evt_"
  14875. },
  14876. "type": {
  14877. "type": "string",
  14878. "enum": ["session.next.prompt.promoted"]
  14879. },
  14880. "properties": {
  14881. "type": "object",
  14882. "properties": {
  14883. "timestamp": {
  14884. "type": "number"
  14885. },
  14886. "sessionID": {
  14887. "type": "string",
  14888. "pattern": "^ses"
  14889. },
  14890. "messageID": {
  14891. "type": "string",
  14892. "pattern": "^msg_"
  14893. },
  14894. "prompt": {
  14895. "$ref": "#/components/schemas/Prompt"
  14896. },
  14897. "timeCreated": {
  14898. "type": "number"
  14899. }
  14900. },
  14901. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  14902. "additionalProperties": false
  14903. }
  14904. },
  14905. "required": ["id", "type", "properties"],
  14906. "additionalProperties": false
  14907. },
  14908. {
  14909. "type": "object",
  14910. "properties": {
  14911. "id": {
  14912. "type": "string",
  14913. "pattern": "^evt_"
  14914. },
  14915. "type": {
  14916. "type": "string",
  14917. "enum": ["session.next.interrupt.requested"]
  14918. },
  14919. "properties": {
  14920. "type": "object",
  14921. "properties": {
  14922. "timestamp": {
  14923. "type": "number"
  14924. },
  14925. "sessionID": {
  14926. "type": "string",
  14927. "pattern": "^ses"
  14928. }
  14929. },
  14930. "required": ["timestamp", "sessionID"],
  14931. "additionalProperties": false
  14932. }
  14933. },
  14934. "required": ["id", "type", "properties"],
  14935. "additionalProperties": false
  14936. },
  14937. {
  14938. "type": "object",
  14939. "properties": {
  14940. "id": {
  14941. "type": "string",
  14942. "pattern": "^evt_"
  14943. },
  14944. "type": {
  14945. "type": "string",
  14946. "enum": ["session.next.context.updated"]
  14947. },
  14948. "properties": {
  14949. "type": "object",
  14950. "properties": {
  14951. "timestamp": {
  14952. "type": "number"
  14953. },
  14954. "sessionID": {
  14955. "type": "string",
  14956. "pattern": "^ses"
  14957. },
  14958. "messageID": {
  14959. "type": "string",
  14960. "pattern": "^msg_"
  14961. },
  14962. "text": {
  14963. "type": "string"
  14964. }
  14965. },
  14966. "required": ["timestamp", "sessionID", "messageID", "text"],
  14967. "additionalProperties": false
  14968. }
  14969. },
  14970. "required": ["id", "type", "properties"],
  14971. "additionalProperties": false
  14972. },
  14973. {
  14974. "type": "object",
  14975. "properties": {
  14976. "id": {
  14977. "type": "string",
  14978. "pattern": "^evt_"
  14979. },
  14980. "type": {
  14981. "type": "string",
  14982. "enum": ["session.next.synthetic"]
  14983. },
  14984. "properties": {
  14985. "type": "object",
  14986. "properties": {
  14987. "timestamp": {
  14988. "type": "number"
  14989. },
  14990. "sessionID": {
  14991. "type": "string",
  14992. "pattern": "^ses"
  14993. },
  14994. "messageID": {
  14995. "type": "string",
  14996. "pattern": "^msg_"
  14997. },
  14998. "text": {
  14999. "type": "string"
  15000. }
  15001. },
  15002. "required": ["timestamp", "sessionID", "messageID", "text"],
  15003. "additionalProperties": false
  15004. }
  15005. },
  15006. "required": ["id", "type", "properties"],
  15007. "additionalProperties": false
  15008. },
  15009. {
  15010. "type": "object",
  15011. "properties": {
  15012. "id": {
  15013. "type": "string",
  15014. "pattern": "^evt_"
  15015. },
  15016. "type": {
  15017. "type": "string",
  15018. "enum": ["session.next.shell.started"]
  15019. },
  15020. "properties": {
  15021. "type": "object",
  15022. "properties": {
  15023. "timestamp": {
  15024. "type": "number"
  15025. },
  15026. "sessionID": {
  15027. "type": "string",
  15028. "pattern": "^ses"
  15029. },
  15030. "messageID": {
  15031. "type": "string",
  15032. "pattern": "^msg_"
  15033. },
  15034. "callID": {
  15035. "type": "string"
  15036. },
  15037. "command": {
  15038. "type": "string"
  15039. }
  15040. },
  15041. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  15042. "additionalProperties": false
  15043. }
  15044. },
  15045. "required": ["id", "type", "properties"],
  15046. "additionalProperties": false
  15047. },
  15048. {
  15049. "type": "object",
  15050. "properties": {
  15051. "id": {
  15052. "type": "string",
  15053. "pattern": "^evt_"
  15054. },
  15055. "type": {
  15056. "type": "string",
  15057. "enum": ["session.next.shell.ended"]
  15058. },
  15059. "properties": {
  15060. "type": "object",
  15061. "properties": {
  15062. "timestamp": {
  15063. "type": "number"
  15064. },
  15065. "sessionID": {
  15066. "type": "string",
  15067. "pattern": "^ses"
  15068. },
  15069. "callID": {
  15070. "type": "string"
  15071. },
  15072. "output": {
  15073. "type": "string"
  15074. }
  15075. },
  15076. "required": ["timestamp", "sessionID", "callID", "output"],
  15077. "additionalProperties": false
  15078. }
  15079. },
  15080. "required": ["id", "type", "properties"],
  15081. "additionalProperties": false
  15082. },
  15083. {
  15084. "type": "object",
  15085. "properties": {
  15086. "id": {
  15087. "type": "string",
  15088. "pattern": "^evt_"
  15089. },
  15090. "type": {
  15091. "type": "string",
  15092. "enum": ["session.next.step.started"]
  15093. },
  15094. "properties": {
  15095. "type": "object",
  15096. "properties": {
  15097. "timestamp": {
  15098. "type": "number"
  15099. },
  15100. "sessionID": {
  15101. "type": "string",
  15102. "pattern": "^ses"
  15103. },
  15104. "assistantMessageID": {
  15105. "type": "string",
  15106. "pattern": "^msg_"
  15107. },
  15108. "agent": {
  15109. "type": "string"
  15110. },
  15111. "model": {
  15112. "type": "object",
  15113. "properties": {
  15114. "id": {
  15115. "type": "string"
  15116. },
  15117. "providerID": {
  15118. "type": "string"
  15119. },
  15120. "variant": {
  15121. "type": "string"
  15122. }
  15123. },
  15124. "required": ["id", "providerID"],
  15125. "additionalProperties": false
  15126. },
  15127. "snapshot": {
  15128. "type": "string"
  15129. }
  15130. },
  15131. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  15132. "additionalProperties": false
  15133. }
  15134. },
  15135. "required": ["id", "type", "properties"],
  15136. "additionalProperties": false
  15137. },
  15138. {
  15139. "type": "object",
  15140. "properties": {
  15141. "id": {
  15142. "type": "string",
  15143. "pattern": "^evt_"
  15144. },
  15145. "type": {
  15146. "type": "string",
  15147. "enum": ["session.next.step.ended"]
  15148. },
  15149. "properties": {
  15150. "type": "object",
  15151. "properties": {
  15152. "timestamp": {
  15153. "type": "number"
  15154. },
  15155. "sessionID": {
  15156. "type": "string",
  15157. "pattern": "^ses"
  15158. },
  15159. "assistantMessageID": {
  15160. "type": "string",
  15161. "pattern": "^msg_"
  15162. },
  15163. "finish": {
  15164. "type": "string"
  15165. },
  15166. "cost": {
  15167. "type": "number"
  15168. },
  15169. "tokens": {
  15170. "type": "object",
  15171. "properties": {
  15172. "input": {
  15173. "type": "number"
  15174. },
  15175. "output": {
  15176. "type": "number"
  15177. },
  15178. "reasoning": {
  15179. "type": "number"
  15180. },
  15181. "cache": {
  15182. "type": "object",
  15183. "properties": {
  15184. "read": {
  15185. "type": "number"
  15186. },
  15187. "write": {
  15188. "type": "number"
  15189. }
  15190. },
  15191. "required": ["read", "write"],
  15192. "additionalProperties": false
  15193. }
  15194. },
  15195. "required": ["input", "output", "reasoning", "cache"],
  15196. "additionalProperties": false
  15197. },
  15198. "snapshot": {
  15199. "type": "string"
  15200. }
  15201. },
  15202. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  15203. "additionalProperties": false
  15204. }
  15205. },
  15206. "required": ["id", "type", "properties"],
  15207. "additionalProperties": false
  15208. },
  15209. {
  15210. "type": "object",
  15211. "properties": {
  15212. "id": {
  15213. "type": "string",
  15214. "pattern": "^evt_"
  15215. },
  15216. "type": {
  15217. "type": "string",
  15218. "enum": ["session.next.step.failed"]
  15219. },
  15220. "properties": {
  15221. "type": "object",
  15222. "properties": {
  15223. "timestamp": {
  15224. "type": "number"
  15225. },
  15226. "sessionID": {
  15227. "type": "string",
  15228. "pattern": "^ses"
  15229. },
  15230. "assistantMessageID": {
  15231. "type": "string",
  15232. "pattern": "^msg_"
  15233. },
  15234. "error": {
  15235. "$ref": "#/components/schemas/SessionErrorUnknown"
  15236. }
  15237. },
  15238. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  15239. "additionalProperties": false
  15240. }
  15241. },
  15242. "required": ["id", "type", "properties"],
  15243. "additionalProperties": false
  15244. },
  15245. {
  15246. "type": "object",
  15247. "properties": {
  15248. "id": {
  15249. "type": "string",
  15250. "pattern": "^evt_"
  15251. },
  15252. "type": {
  15253. "type": "string",
  15254. "enum": ["session.next.text.started"]
  15255. },
  15256. "properties": {
  15257. "type": "object",
  15258. "properties": {
  15259. "timestamp": {
  15260. "type": "number"
  15261. },
  15262. "sessionID": {
  15263. "type": "string",
  15264. "pattern": "^ses"
  15265. },
  15266. "assistantMessageID": {
  15267. "type": "string",
  15268. "pattern": "^msg_"
  15269. },
  15270. "textID": {
  15271. "type": "string"
  15272. }
  15273. },
  15274. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  15275. "additionalProperties": false
  15276. }
  15277. },
  15278. "required": ["id", "type", "properties"],
  15279. "additionalProperties": false
  15280. },
  15281. {
  15282. "type": "object",
  15283. "properties": {
  15284. "id": {
  15285. "type": "string",
  15286. "pattern": "^evt_"
  15287. },
  15288. "type": {
  15289. "type": "string",
  15290. "enum": ["session.next.text.delta"]
  15291. },
  15292. "properties": {
  15293. "type": "object",
  15294. "properties": {
  15295. "timestamp": {
  15296. "type": "number"
  15297. },
  15298. "sessionID": {
  15299. "type": "string",
  15300. "pattern": "^ses"
  15301. },
  15302. "assistantMessageID": {
  15303. "type": "string",
  15304. "pattern": "^msg_"
  15305. },
  15306. "textID": {
  15307. "type": "string"
  15308. },
  15309. "delta": {
  15310. "type": "string"
  15311. }
  15312. },
  15313. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  15314. "additionalProperties": false
  15315. }
  15316. },
  15317. "required": ["id", "type", "properties"],
  15318. "additionalProperties": false
  15319. },
  15320. {
  15321. "type": "object",
  15322. "properties": {
  15323. "id": {
  15324. "type": "string",
  15325. "pattern": "^evt_"
  15326. },
  15327. "type": {
  15328. "type": "string",
  15329. "enum": ["session.next.text.ended"]
  15330. },
  15331. "properties": {
  15332. "type": "object",
  15333. "properties": {
  15334. "timestamp": {
  15335. "type": "number"
  15336. },
  15337. "sessionID": {
  15338. "type": "string",
  15339. "pattern": "^ses"
  15340. },
  15341. "assistantMessageID": {
  15342. "type": "string",
  15343. "pattern": "^msg_"
  15344. },
  15345. "textID": {
  15346. "type": "string"
  15347. },
  15348. "text": {
  15349. "type": "string"
  15350. }
  15351. },
  15352. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  15353. "additionalProperties": false
  15354. }
  15355. },
  15356. "required": ["id", "type", "properties"],
  15357. "additionalProperties": false
  15358. },
  15359. {
  15360. "type": "object",
  15361. "properties": {
  15362. "id": {
  15363. "type": "string",
  15364. "pattern": "^evt_"
  15365. },
  15366. "type": {
  15367. "type": "string",
  15368. "enum": ["session.next.reasoning.started"]
  15369. },
  15370. "properties": {
  15371. "type": "object",
  15372. "properties": {
  15373. "timestamp": {
  15374. "type": "number"
  15375. },
  15376. "sessionID": {
  15377. "type": "string",
  15378. "pattern": "^ses"
  15379. },
  15380. "assistantMessageID": {
  15381. "type": "string",
  15382. "pattern": "^msg_"
  15383. },
  15384. "reasoningID": {
  15385. "type": "string"
  15386. },
  15387. "providerMetadata": {
  15388. "type": "object",
  15389. "additionalProperties": {
  15390. "type": "object"
  15391. }
  15392. }
  15393. },
  15394. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  15395. "additionalProperties": false
  15396. }
  15397. },
  15398. "required": ["id", "type", "properties"],
  15399. "additionalProperties": false
  15400. },
  15401. {
  15402. "type": "object",
  15403. "properties": {
  15404. "id": {
  15405. "type": "string",
  15406. "pattern": "^evt_"
  15407. },
  15408. "type": {
  15409. "type": "string",
  15410. "enum": ["session.next.reasoning.delta"]
  15411. },
  15412. "properties": {
  15413. "type": "object",
  15414. "properties": {
  15415. "timestamp": {
  15416. "type": "number"
  15417. },
  15418. "sessionID": {
  15419. "type": "string",
  15420. "pattern": "^ses"
  15421. },
  15422. "assistantMessageID": {
  15423. "type": "string",
  15424. "pattern": "^msg_"
  15425. },
  15426. "reasoningID": {
  15427. "type": "string"
  15428. },
  15429. "delta": {
  15430. "type": "string"
  15431. }
  15432. },
  15433. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  15434. "additionalProperties": false
  15435. }
  15436. },
  15437. "required": ["id", "type", "properties"],
  15438. "additionalProperties": false
  15439. },
  15440. {
  15441. "type": "object",
  15442. "properties": {
  15443. "id": {
  15444. "type": "string",
  15445. "pattern": "^evt_"
  15446. },
  15447. "type": {
  15448. "type": "string",
  15449. "enum": ["session.next.reasoning.ended"]
  15450. },
  15451. "properties": {
  15452. "type": "object",
  15453. "properties": {
  15454. "timestamp": {
  15455. "type": "number"
  15456. },
  15457. "sessionID": {
  15458. "type": "string",
  15459. "pattern": "^ses"
  15460. },
  15461. "assistantMessageID": {
  15462. "type": "string",
  15463. "pattern": "^msg_"
  15464. },
  15465. "reasoningID": {
  15466. "type": "string"
  15467. },
  15468. "text": {
  15469. "type": "string"
  15470. },
  15471. "providerMetadata": {
  15472. "type": "object",
  15473. "additionalProperties": {
  15474. "type": "object"
  15475. }
  15476. }
  15477. },
  15478. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  15479. "additionalProperties": false
  15480. }
  15481. },
  15482. "required": ["id", "type", "properties"],
  15483. "additionalProperties": false
  15484. },
  15485. {
  15486. "type": "object",
  15487. "properties": {
  15488. "id": {
  15489. "type": "string",
  15490. "pattern": "^evt_"
  15491. },
  15492. "type": {
  15493. "type": "string",
  15494. "enum": ["session.next.tool.input.started"]
  15495. },
  15496. "properties": {
  15497. "type": "object",
  15498. "properties": {
  15499. "timestamp": {
  15500. "type": "number"
  15501. },
  15502. "sessionID": {
  15503. "type": "string",
  15504. "pattern": "^ses"
  15505. },
  15506. "assistantMessageID": {
  15507. "type": "string",
  15508. "pattern": "^msg_"
  15509. },
  15510. "callID": {
  15511. "type": "string"
  15512. },
  15513. "name": {
  15514. "type": "string"
  15515. }
  15516. },
  15517. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  15518. "additionalProperties": false
  15519. }
  15520. },
  15521. "required": ["id", "type", "properties"],
  15522. "additionalProperties": false
  15523. },
  15524. {
  15525. "type": "object",
  15526. "properties": {
  15527. "id": {
  15528. "type": "string",
  15529. "pattern": "^evt_"
  15530. },
  15531. "type": {
  15532. "type": "string",
  15533. "enum": ["session.next.tool.input.delta"]
  15534. },
  15535. "properties": {
  15536. "type": "object",
  15537. "properties": {
  15538. "timestamp": {
  15539. "type": "number"
  15540. },
  15541. "sessionID": {
  15542. "type": "string",
  15543. "pattern": "^ses"
  15544. },
  15545. "assistantMessageID": {
  15546. "type": "string",
  15547. "pattern": "^msg_"
  15548. },
  15549. "callID": {
  15550. "type": "string"
  15551. },
  15552. "delta": {
  15553. "type": "string"
  15554. }
  15555. },
  15556. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  15557. "additionalProperties": false
  15558. }
  15559. },
  15560. "required": ["id", "type", "properties"],
  15561. "additionalProperties": false
  15562. },
  15563. {
  15564. "type": "object",
  15565. "properties": {
  15566. "id": {
  15567. "type": "string",
  15568. "pattern": "^evt_"
  15569. },
  15570. "type": {
  15571. "type": "string",
  15572. "enum": ["session.next.tool.input.ended"]
  15573. },
  15574. "properties": {
  15575. "type": "object",
  15576. "properties": {
  15577. "timestamp": {
  15578. "type": "number"
  15579. },
  15580. "sessionID": {
  15581. "type": "string",
  15582. "pattern": "^ses"
  15583. },
  15584. "assistantMessageID": {
  15585. "type": "string",
  15586. "pattern": "^msg_"
  15587. },
  15588. "callID": {
  15589. "type": "string"
  15590. },
  15591. "text": {
  15592. "type": "string"
  15593. }
  15594. },
  15595. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  15596. "additionalProperties": false
  15597. }
  15598. },
  15599. "required": ["id", "type", "properties"],
  15600. "additionalProperties": false
  15601. },
  15602. {
  15603. "type": "object",
  15604. "properties": {
  15605. "id": {
  15606. "type": "string",
  15607. "pattern": "^evt_"
  15608. },
  15609. "type": {
  15610. "type": "string",
  15611. "enum": ["session.next.tool.called"]
  15612. },
  15613. "properties": {
  15614. "type": "object",
  15615. "properties": {
  15616. "timestamp": {
  15617. "type": "number"
  15618. },
  15619. "sessionID": {
  15620. "type": "string",
  15621. "pattern": "^ses"
  15622. },
  15623. "assistantMessageID": {
  15624. "type": "string",
  15625. "pattern": "^msg_"
  15626. },
  15627. "callID": {
  15628. "type": "string"
  15629. },
  15630. "tool": {
  15631. "type": "string"
  15632. },
  15633. "input": {
  15634. "type": "object"
  15635. },
  15636. "provider": {
  15637. "type": "object",
  15638. "properties": {
  15639. "executed": {
  15640. "type": "boolean"
  15641. },
  15642. "metadata": {
  15643. "type": "object",
  15644. "additionalProperties": {
  15645. "type": "object"
  15646. }
  15647. }
  15648. },
  15649. "required": ["executed"],
  15650. "additionalProperties": false
  15651. }
  15652. },
  15653. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15654. "additionalProperties": false
  15655. }
  15656. },
  15657. "required": ["id", "type", "properties"],
  15658. "additionalProperties": false
  15659. },
  15660. {
  15661. "type": "object",
  15662. "properties": {
  15663. "id": {
  15664. "type": "string",
  15665. "pattern": "^evt_"
  15666. },
  15667. "type": {
  15668. "type": "string",
  15669. "enum": ["session.next.tool.progress"]
  15670. },
  15671. "properties": {
  15672. "type": "object",
  15673. "properties": {
  15674. "timestamp": {
  15675. "type": "number"
  15676. },
  15677. "sessionID": {
  15678. "type": "string",
  15679. "pattern": "^ses"
  15680. },
  15681. "assistantMessageID": {
  15682. "type": "string",
  15683. "pattern": "^msg_"
  15684. },
  15685. "callID": {
  15686. "type": "string"
  15687. },
  15688. "structured": {
  15689. "type": "object"
  15690. },
  15691. "content": {
  15692. "type": "array",
  15693. "items": {
  15694. "anyOf": [
  15695. {
  15696. "$ref": "#/components/schemas/ToolTextContent"
  15697. },
  15698. {
  15699. "$ref": "#/components/schemas/ToolFileContent"
  15700. }
  15701. ]
  15702. }
  15703. }
  15704. },
  15705. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  15706. "additionalProperties": false
  15707. }
  15708. },
  15709. "required": ["id", "type", "properties"],
  15710. "additionalProperties": false
  15711. },
  15712. {
  15713. "type": "object",
  15714. "properties": {
  15715. "id": {
  15716. "type": "string",
  15717. "pattern": "^evt_"
  15718. },
  15719. "type": {
  15720. "type": "string",
  15721. "enum": ["session.next.tool.success"]
  15722. },
  15723. "properties": {
  15724. "type": "object",
  15725. "properties": {
  15726. "timestamp": {
  15727. "type": "number"
  15728. },
  15729. "sessionID": {
  15730. "type": "string",
  15731. "pattern": "^ses"
  15732. },
  15733. "assistantMessageID": {
  15734. "type": "string",
  15735. "pattern": "^msg_"
  15736. },
  15737. "callID": {
  15738. "type": "string"
  15739. },
  15740. "structured": {
  15741. "type": "object"
  15742. },
  15743. "content": {
  15744. "type": "array",
  15745. "items": {
  15746. "anyOf": [
  15747. {
  15748. "$ref": "#/components/schemas/ToolTextContent"
  15749. },
  15750. {
  15751. "$ref": "#/components/schemas/ToolFileContent"
  15752. }
  15753. ]
  15754. }
  15755. },
  15756. "outputPaths": {
  15757. "type": "array",
  15758. "items": {
  15759. "type": "string"
  15760. }
  15761. },
  15762. "result": {},
  15763. "provider": {
  15764. "type": "object",
  15765. "properties": {
  15766. "executed": {
  15767. "type": "boolean"
  15768. },
  15769. "metadata": {
  15770. "type": "object",
  15771. "additionalProperties": {
  15772. "type": "object"
  15773. }
  15774. }
  15775. },
  15776. "required": ["executed"],
  15777. "additionalProperties": false
  15778. }
  15779. },
  15780. "required": [
  15781. "timestamp",
  15782. "sessionID",
  15783. "assistantMessageID",
  15784. "callID",
  15785. "structured",
  15786. "content",
  15787. "provider"
  15788. ],
  15789. "additionalProperties": false
  15790. }
  15791. },
  15792. "required": ["id", "type", "properties"],
  15793. "additionalProperties": false
  15794. },
  15795. {
  15796. "type": "object",
  15797. "properties": {
  15798. "id": {
  15799. "type": "string",
  15800. "pattern": "^evt_"
  15801. },
  15802. "type": {
  15803. "type": "string",
  15804. "enum": ["session.next.tool.failed"]
  15805. },
  15806. "properties": {
  15807. "type": "object",
  15808. "properties": {
  15809. "timestamp": {
  15810. "type": "number"
  15811. },
  15812. "sessionID": {
  15813. "type": "string",
  15814. "pattern": "^ses"
  15815. },
  15816. "assistantMessageID": {
  15817. "type": "string",
  15818. "pattern": "^msg_"
  15819. },
  15820. "callID": {
  15821. "type": "string"
  15822. },
  15823. "error": {
  15824. "$ref": "#/components/schemas/SessionErrorUnknown"
  15825. },
  15826. "result": {},
  15827. "provider": {
  15828. "type": "object",
  15829. "properties": {
  15830. "executed": {
  15831. "type": "boolean"
  15832. },
  15833. "metadata": {
  15834. "type": "object",
  15835. "additionalProperties": {
  15836. "type": "object"
  15837. }
  15838. }
  15839. },
  15840. "required": ["executed"],
  15841. "additionalProperties": false
  15842. }
  15843. },
  15844. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  15845. "additionalProperties": false
  15846. }
  15847. },
  15848. "required": ["id", "type", "properties"],
  15849. "additionalProperties": false
  15850. },
  15851. {
  15852. "type": "object",
  15853. "properties": {
  15854. "id": {
  15855. "type": "string",
  15856. "pattern": "^evt_"
  15857. },
  15858. "type": {
  15859. "type": "string",
  15860. "enum": ["session.next.retried"]
  15861. },
  15862. "properties": {
  15863. "type": "object",
  15864. "properties": {
  15865. "timestamp": {
  15866. "type": "number"
  15867. },
  15868. "sessionID": {
  15869. "type": "string",
  15870. "pattern": "^ses"
  15871. },
  15872. "attempt": {
  15873. "type": "number"
  15874. },
  15875. "error": {
  15876. "$ref": "#/components/schemas/SessionNextRetry_error"
  15877. }
  15878. },
  15879. "required": ["timestamp", "sessionID", "attempt", "error"],
  15880. "additionalProperties": false
  15881. }
  15882. },
  15883. "required": ["id", "type", "properties"],
  15884. "additionalProperties": false
  15885. },
  15886. {
  15887. "type": "object",
  15888. "properties": {
  15889. "id": {
  15890. "type": "string",
  15891. "pattern": "^evt_"
  15892. },
  15893. "type": {
  15894. "type": "string",
  15895. "enum": ["session.next.compaction.started"]
  15896. },
  15897. "properties": {
  15898. "type": "object",
  15899. "properties": {
  15900. "timestamp": {
  15901. "type": "number"
  15902. },
  15903. "sessionID": {
  15904. "type": "string",
  15905. "pattern": "^ses"
  15906. },
  15907. "messageID": {
  15908. "type": "string",
  15909. "pattern": "^msg_"
  15910. },
  15911. "reason": {
  15912. "type": "string",
  15913. "enum": ["auto", "manual"]
  15914. }
  15915. },
  15916. "required": ["timestamp", "sessionID", "messageID", "reason"],
  15917. "additionalProperties": false
  15918. }
  15919. },
  15920. "required": ["id", "type", "properties"],
  15921. "additionalProperties": false
  15922. },
  15923. {
  15924. "type": "object",
  15925. "properties": {
  15926. "id": {
  15927. "type": "string",
  15928. "pattern": "^evt_"
  15929. },
  15930. "type": {
  15931. "type": "string",
  15932. "enum": ["session.next.compaction.delta"]
  15933. },
  15934. "properties": {
  15935. "type": "object",
  15936. "properties": {
  15937. "timestamp": {
  15938. "type": "number"
  15939. },
  15940. "sessionID": {
  15941. "type": "string",
  15942. "pattern": "^ses"
  15943. },
  15944. "messageID": {
  15945. "type": "string",
  15946. "pattern": "^msg_"
  15947. },
  15948. "text": {
  15949. "type": "string"
  15950. }
  15951. },
  15952. "required": ["timestamp", "sessionID", "messageID", "text"],
  15953. "additionalProperties": false
  15954. }
  15955. },
  15956. "required": ["id", "type", "properties"],
  15957. "additionalProperties": false
  15958. },
  15959. {
  15960. "type": "object",
  15961. "properties": {
  15962. "id": {
  15963. "type": "string",
  15964. "pattern": "^evt_"
  15965. },
  15966. "type": {
  15967. "type": "string",
  15968. "enum": ["session.next.compaction.ended"]
  15969. },
  15970. "properties": {
  15971. "type": "object",
  15972. "properties": {
  15973. "timestamp": {
  15974. "type": "number"
  15975. },
  15976. "sessionID": {
  15977. "type": "string",
  15978. "pattern": "^ses"
  15979. },
  15980. "messageID": {
  15981. "type": "string",
  15982. "pattern": "^msg_"
  15983. },
  15984. "reason": {
  15985. "type": "string",
  15986. "enum": ["auto", "manual"]
  15987. },
  15988. "text": {
  15989. "type": "string"
  15990. },
  15991. "recent": {
  15992. "type": "string"
  15993. }
  15994. },
  15995. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  15996. "additionalProperties": false
  15997. }
  15998. },
  15999. "required": ["id", "type", "properties"],
  16000. "additionalProperties": false
  16001. },
  16002. {
  16003. "type": "object",
  16004. "properties": {
  16005. "id": {
  16006. "type": "string",
  16007. "pattern": "^evt_"
  16008. },
  16009. "type": {
  16010. "type": "string",
  16011. "enum": ["message.part.delta"]
  16012. },
  16013. "properties": {
  16014. "type": "object",
  16015. "properties": {
  16016. "sessionID": {
  16017. "type": "string",
  16018. "pattern": "^ses"
  16019. },
  16020. "messageID": {
  16021. "type": "string",
  16022. "pattern": "^msg"
  16023. },
  16024. "partID": {
  16025. "type": "string",
  16026. "pattern": "^prt"
  16027. },
  16028. "field": {
  16029. "type": "string"
  16030. },
  16031. "delta": {
  16032. "type": "string"
  16033. }
  16034. },
  16035. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16036. "additionalProperties": false
  16037. }
  16038. },
  16039. "required": ["id", "type", "properties"],
  16040. "additionalProperties": false
  16041. },
  16042. {
  16043. "type": "object",
  16044. "properties": {
  16045. "id": {
  16046. "type": "string",
  16047. "pattern": "^evt_"
  16048. },
  16049. "type": {
  16050. "type": "string",
  16051. "enum": ["session.diff"]
  16052. },
  16053. "properties": {
  16054. "type": "object",
  16055. "properties": {
  16056. "sessionID": {
  16057. "type": "string",
  16058. "pattern": "^ses"
  16059. },
  16060. "diff": {
  16061. "type": "array",
  16062. "items": {
  16063. "$ref": "#/components/schemas/SnapshotFileDiff"
  16064. }
  16065. }
  16066. },
  16067. "required": ["sessionID", "diff"],
  16068. "additionalProperties": false
  16069. }
  16070. },
  16071. "required": ["id", "type", "properties"],
  16072. "additionalProperties": false
  16073. },
  16074. {
  16075. "type": "object",
  16076. "properties": {
  16077. "id": {
  16078. "type": "string",
  16079. "pattern": "^evt_"
  16080. },
  16081. "type": {
  16082. "type": "string",
  16083. "enum": ["session.error"]
  16084. },
  16085. "properties": {
  16086. "type": "object",
  16087. "properties": {
  16088. "sessionID": {
  16089. "type": "string",
  16090. "pattern": "^ses"
  16091. },
  16092. "error": {
  16093. "anyOf": [
  16094. {
  16095. "$ref": "#/components/schemas/ProviderAuthError"
  16096. },
  16097. {
  16098. "$ref": "#/components/schemas/UnknownError"
  16099. },
  16100. {
  16101. "$ref": "#/components/schemas/MessageOutputLengthError"
  16102. },
  16103. {
  16104. "$ref": "#/components/schemas/MessageAbortedError"
  16105. },
  16106. {
  16107. "$ref": "#/components/schemas/StructuredOutputError"
  16108. },
  16109. {
  16110. "$ref": "#/components/schemas/ContextOverflowError"
  16111. },
  16112. {
  16113. "$ref": "#/components/schemas/APIError"
  16114. }
  16115. ]
  16116. }
  16117. },
  16118. "additionalProperties": false
  16119. }
  16120. },
  16121. "required": ["id", "type", "properties"],
  16122. "additionalProperties": false
  16123. },
  16124. {
  16125. "type": "object",
  16126. "properties": {
  16127. "id": {
  16128. "type": "string",
  16129. "pattern": "^evt_"
  16130. },
  16131. "type": {
  16132. "type": "string",
  16133. "enum": ["installation.updated"]
  16134. },
  16135. "properties": {
  16136. "type": "object",
  16137. "properties": {
  16138. "version": {
  16139. "type": "string"
  16140. }
  16141. },
  16142. "required": ["version"],
  16143. "additionalProperties": false
  16144. }
  16145. },
  16146. "required": ["id", "type", "properties"],
  16147. "additionalProperties": false
  16148. },
  16149. {
  16150. "type": "object",
  16151. "properties": {
  16152. "id": {
  16153. "type": "string",
  16154. "pattern": "^evt_"
  16155. },
  16156. "type": {
  16157. "type": "string",
  16158. "enum": ["installation.update-available"]
  16159. },
  16160. "properties": {
  16161. "type": "object",
  16162. "properties": {
  16163. "version": {
  16164. "type": "string"
  16165. }
  16166. },
  16167. "required": ["version"],
  16168. "additionalProperties": false
  16169. }
  16170. },
  16171. "required": ["id", "type", "properties"],
  16172. "additionalProperties": false
  16173. },
  16174. {
  16175. "type": "object",
  16176. "properties": {
  16177. "id": {
  16178. "type": "string",
  16179. "pattern": "^evt_"
  16180. },
  16181. "type": {
  16182. "type": "string",
  16183. "enum": ["file.edited"]
  16184. },
  16185. "properties": {
  16186. "type": "object",
  16187. "properties": {
  16188. "file": {
  16189. "type": "string"
  16190. }
  16191. },
  16192. "required": ["file"],
  16193. "additionalProperties": false
  16194. }
  16195. },
  16196. "required": ["id", "type", "properties"],
  16197. "additionalProperties": false
  16198. },
  16199. {
  16200. "type": "object",
  16201. "properties": {
  16202. "id": {
  16203. "type": "string",
  16204. "pattern": "^evt_"
  16205. },
  16206. "type": {
  16207. "type": "string",
  16208. "enum": ["account.added"]
  16209. },
  16210. "properties": {
  16211. "type": "object",
  16212. "properties": {
  16213. "account": {
  16214. "$ref": "#/components/schemas/AuthInfo"
  16215. }
  16216. },
  16217. "required": ["account"],
  16218. "additionalProperties": false
  16219. }
  16220. },
  16221. "required": ["id", "type", "properties"],
  16222. "additionalProperties": false
  16223. },
  16224. {
  16225. "type": "object",
  16226. "properties": {
  16227. "id": {
  16228. "type": "string",
  16229. "pattern": "^evt_"
  16230. },
  16231. "type": {
  16232. "type": "string",
  16233. "enum": ["account.removed"]
  16234. },
  16235. "properties": {
  16236. "type": "object",
  16237. "properties": {
  16238. "account": {
  16239. "$ref": "#/components/schemas/AuthInfo"
  16240. }
  16241. },
  16242. "required": ["account"],
  16243. "additionalProperties": false
  16244. }
  16245. },
  16246. "required": ["id", "type", "properties"],
  16247. "additionalProperties": false
  16248. },
  16249. {
  16250. "type": "object",
  16251. "properties": {
  16252. "id": {
  16253. "type": "string",
  16254. "pattern": "^evt_"
  16255. },
  16256. "type": {
  16257. "type": "string",
  16258. "enum": ["account.switched"]
  16259. },
  16260. "properties": {
  16261. "type": "object",
  16262. "properties": {
  16263. "serviceID": {
  16264. "type": "string"
  16265. },
  16266. "from": {
  16267. "type": "string"
  16268. },
  16269. "to": {
  16270. "type": "string"
  16271. }
  16272. },
  16273. "required": ["serviceID"],
  16274. "additionalProperties": false
  16275. }
  16276. },
  16277. "required": ["id", "type", "properties"],
  16278. "additionalProperties": false
  16279. },
  16280. {
  16281. "type": "object",
  16282. "properties": {
  16283. "id": {
  16284. "type": "string",
  16285. "pattern": "^evt_"
  16286. },
  16287. "type": {
  16288. "type": "string",
  16289. "enum": ["permission.v2.asked"]
  16290. },
  16291. "properties": {
  16292. "type": "object",
  16293. "properties": {
  16294. "id": {
  16295. "type": "string",
  16296. "pattern": "^per"
  16297. },
  16298. "sessionID": {
  16299. "type": "string",
  16300. "pattern": "^ses"
  16301. },
  16302. "action": {
  16303. "type": "string"
  16304. },
  16305. "resources": {
  16306. "type": "array",
  16307. "items": {
  16308. "type": "string"
  16309. }
  16310. },
  16311. "save": {
  16312. "type": "array",
  16313. "items": {
  16314. "type": "string"
  16315. }
  16316. },
  16317. "metadata": {
  16318. "type": "object"
  16319. },
  16320. "source": {
  16321. "$ref": "#/components/schemas/PermissionV2Source"
  16322. }
  16323. },
  16324. "required": ["id", "sessionID", "action", "resources"],
  16325. "additionalProperties": false
  16326. }
  16327. },
  16328. "required": ["id", "type", "properties"],
  16329. "additionalProperties": false
  16330. },
  16331. {
  16332. "type": "object",
  16333. "properties": {
  16334. "id": {
  16335. "type": "string",
  16336. "pattern": "^evt_"
  16337. },
  16338. "type": {
  16339. "type": "string",
  16340. "enum": ["permission.v2.replied"]
  16341. },
  16342. "properties": {
  16343. "type": "object",
  16344. "properties": {
  16345. "sessionID": {
  16346. "type": "string",
  16347. "pattern": "^ses"
  16348. },
  16349. "requestID": {
  16350. "type": "string",
  16351. "pattern": "^per"
  16352. },
  16353. "reply": {
  16354. "$ref": "#/components/schemas/PermissionV2Reply"
  16355. }
  16356. },
  16357. "required": ["sessionID", "requestID", "reply"],
  16358. "additionalProperties": false
  16359. }
  16360. },
  16361. "required": ["id", "type", "properties"],
  16362. "additionalProperties": false
  16363. },
  16364. {
  16365. "type": "object",
  16366. "properties": {
  16367. "id": {
  16368. "type": "string",
  16369. "pattern": "^evt_"
  16370. },
  16371. "type": {
  16372. "type": "string",
  16373. "enum": ["reference.updated"]
  16374. },
  16375. "properties": {
  16376. "type": "object",
  16377. "properties": {}
  16378. }
  16379. },
  16380. "required": ["id", "type", "properties"],
  16381. "additionalProperties": false
  16382. },
  16383. {
  16384. "type": "object",
  16385. "properties": {
  16386. "id": {
  16387. "type": "string",
  16388. "pattern": "^evt_"
  16389. },
  16390. "type": {
  16391. "type": "string",
  16392. "enum": ["file.watcher.updated"]
  16393. },
  16394. "properties": {
  16395. "type": "object",
  16396. "properties": {
  16397. "file": {
  16398. "type": "string"
  16399. },
  16400. "event": {
  16401. "type": "string",
  16402. "enum": ["add", "change", "unlink"]
  16403. }
  16404. },
  16405. "required": ["file", "event"],
  16406. "additionalProperties": false
  16407. }
  16408. },
  16409. "required": ["id", "type", "properties"],
  16410. "additionalProperties": false
  16411. },
  16412. {
  16413. "type": "object",
  16414. "properties": {
  16415. "id": {
  16416. "type": "string",
  16417. "pattern": "^evt_"
  16418. },
  16419. "type": {
  16420. "type": "string",
  16421. "enum": ["pty.created"]
  16422. },
  16423. "properties": {
  16424. "type": "object",
  16425. "properties": {
  16426. "info": {
  16427. "$ref": "#/components/schemas/Pty"
  16428. }
  16429. },
  16430. "required": ["info"],
  16431. "additionalProperties": false
  16432. }
  16433. },
  16434. "required": ["id", "type", "properties"],
  16435. "additionalProperties": false
  16436. },
  16437. {
  16438. "type": "object",
  16439. "properties": {
  16440. "id": {
  16441. "type": "string",
  16442. "pattern": "^evt_"
  16443. },
  16444. "type": {
  16445. "type": "string",
  16446. "enum": ["pty.updated"]
  16447. },
  16448. "properties": {
  16449. "type": "object",
  16450. "properties": {
  16451. "info": {
  16452. "$ref": "#/components/schemas/Pty"
  16453. }
  16454. },
  16455. "required": ["info"],
  16456. "additionalProperties": false
  16457. }
  16458. },
  16459. "required": ["id", "type", "properties"],
  16460. "additionalProperties": false
  16461. },
  16462. {
  16463. "type": "object",
  16464. "properties": {
  16465. "id": {
  16466. "type": "string",
  16467. "pattern": "^evt_"
  16468. },
  16469. "type": {
  16470. "type": "string",
  16471. "enum": ["pty.exited"]
  16472. },
  16473. "properties": {
  16474. "type": "object",
  16475. "properties": {
  16476. "id": {
  16477. "type": "string",
  16478. "pattern": "^pty"
  16479. },
  16480. "exitCode": {
  16481. "type": "integer",
  16482. "minimum": 0
  16483. }
  16484. },
  16485. "required": ["id", "exitCode"],
  16486. "additionalProperties": false
  16487. }
  16488. },
  16489. "required": ["id", "type", "properties"],
  16490. "additionalProperties": false
  16491. },
  16492. {
  16493. "type": "object",
  16494. "properties": {
  16495. "id": {
  16496. "type": "string",
  16497. "pattern": "^evt_"
  16498. },
  16499. "type": {
  16500. "type": "string",
  16501. "enum": ["pty.deleted"]
  16502. },
  16503. "properties": {
  16504. "type": "object",
  16505. "properties": {
  16506. "id": {
  16507. "type": "string",
  16508. "pattern": "^pty"
  16509. }
  16510. },
  16511. "required": ["id"],
  16512. "additionalProperties": false
  16513. }
  16514. },
  16515. "required": ["id", "type", "properties"],
  16516. "additionalProperties": false
  16517. },
  16518. {
  16519. "type": "object",
  16520. "properties": {
  16521. "id": {
  16522. "type": "string",
  16523. "pattern": "^evt_"
  16524. },
  16525. "type": {
  16526. "type": "string",
  16527. "enum": ["question.v2.asked"]
  16528. },
  16529. "properties": {
  16530. "type": "object",
  16531. "properties": {
  16532. "id": {
  16533. "type": "string",
  16534. "pattern": "^que"
  16535. },
  16536. "sessionID": {
  16537. "type": "string",
  16538. "pattern": "^ses"
  16539. },
  16540. "questions": {
  16541. "type": "array",
  16542. "items": {
  16543. "$ref": "#/components/schemas/QuestionV2Info"
  16544. },
  16545. "description": "Questions to ask"
  16546. },
  16547. "tool": {
  16548. "$ref": "#/components/schemas/QuestionV2Tool"
  16549. }
  16550. },
  16551. "required": ["id", "sessionID", "questions"],
  16552. "additionalProperties": false
  16553. }
  16554. },
  16555. "required": ["id", "type", "properties"],
  16556. "additionalProperties": false
  16557. },
  16558. {
  16559. "type": "object",
  16560. "properties": {
  16561. "id": {
  16562. "type": "string",
  16563. "pattern": "^evt_"
  16564. },
  16565. "type": {
  16566. "type": "string",
  16567. "enum": ["question.v2.replied"]
  16568. },
  16569. "properties": {
  16570. "type": "object",
  16571. "properties": {
  16572. "sessionID": {
  16573. "type": "string",
  16574. "pattern": "^ses"
  16575. },
  16576. "requestID": {
  16577. "type": "string",
  16578. "pattern": "^que"
  16579. },
  16580. "answers": {
  16581. "type": "array",
  16582. "items": {
  16583. "$ref": "#/components/schemas/QuestionV2Answer"
  16584. }
  16585. }
  16586. },
  16587. "required": ["sessionID", "requestID", "answers"],
  16588. "additionalProperties": false
  16589. }
  16590. },
  16591. "required": ["id", "type", "properties"],
  16592. "additionalProperties": false
  16593. },
  16594. {
  16595. "type": "object",
  16596. "properties": {
  16597. "id": {
  16598. "type": "string",
  16599. "pattern": "^evt_"
  16600. },
  16601. "type": {
  16602. "type": "string",
  16603. "enum": ["question.v2.rejected"]
  16604. },
  16605. "properties": {
  16606. "type": "object",
  16607. "properties": {
  16608. "sessionID": {
  16609. "type": "string",
  16610. "pattern": "^ses"
  16611. },
  16612. "requestID": {
  16613. "type": "string",
  16614. "pattern": "^que"
  16615. }
  16616. },
  16617. "required": ["sessionID", "requestID"],
  16618. "additionalProperties": false
  16619. }
  16620. },
  16621. "required": ["id", "type", "properties"],
  16622. "additionalProperties": false
  16623. },
  16624. {
  16625. "type": "object",
  16626. "properties": {
  16627. "id": {
  16628. "type": "string",
  16629. "pattern": "^evt_"
  16630. },
  16631. "type": {
  16632. "type": "string",
  16633. "enum": ["todo.updated"]
  16634. },
  16635. "properties": {
  16636. "type": "object",
  16637. "properties": {
  16638. "sessionID": {
  16639. "type": "string",
  16640. "pattern": "^ses"
  16641. },
  16642. "todos": {
  16643. "type": "array",
  16644. "items": {
  16645. "$ref": "#/components/schemas/Todo"
  16646. }
  16647. }
  16648. },
  16649. "required": ["sessionID", "todos"],
  16650. "additionalProperties": false
  16651. }
  16652. },
  16653. "required": ["id", "type", "properties"],
  16654. "additionalProperties": false
  16655. },
  16656. {
  16657. "type": "object",
  16658. "properties": {
  16659. "id": {
  16660. "type": "string",
  16661. "pattern": "^evt_"
  16662. },
  16663. "type": {
  16664. "type": "string",
  16665. "enum": ["lsp.updated"]
  16666. },
  16667. "properties": {
  16668. "type": "object",
  16669. "properties": {}
  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": ["permission.asked"]
  16685. },
  16686. "properties": {
  16687. "type": "object",
  16688. "properties": {
  16689. "id": {
  16690. "type": "string",
  16691. "pattern": "^per"
  16692. },
  16693. "sessionID": {
  16694. "type": "string",
  16695. "pattern": "^ses"
  16696. },
  16697. "permission": {
  16698. "type": "string"
  16699. },
  16700. "patterns": {
  16701. "type": "array",
  16702. "items": {
  16703. "type": "string"
  16704. }
  16705. },
  16706. "metadata": {
  16707. "type": "object"
  16708. },
  16709. "always": {
  16710. "type": "array",
  16711. "items": {
  16712. "type": "string"
  16713. }
  16714. },
  16715. "tool": {
  16716. "type": "object",
  16717. "properties": {
  16718. "messageID": {
  16719. "type": "string"
  16720. },
  16721. "callID": {
  16722. "type": "string"
  16723. }
  16724. },
  16725. "required": ["messageID", "callID"],
  16726. "additionalProperties": false
  16727. }
  16728. },
  16729. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  16730. "additionalProperties": false
  16731. }
  16732. },
  16733. "required": ["id", "type", "properties"],
  16734. "additionalProperties": false
  16735. },
  16736. {
  16737. "type": "object",
  16738. "properties": {
  16739. "id": {
  16740. "type": "string",
  16741. "pattern": "^evt_"
  16742. },
  16743. "type": {
  16744. "type": "string",
  16745. "enum": ["permission.replied"]
  16746. },
  16747. "properties": {
  16748. "type": "object",
  16749. "properties": {
  16750. "sessionID": {
  16751. "type": "string",
  16752. "pattern": "^ses"
  16753. },
  16754. "requestID": {
  16755. "type": "string",
  16756. "pattern": "^per"
  16757. },
  16758. "reply": {
  16759. "type": "string",
  16760. "enum": ["once", "always", "reject"]
  16761. }
  16762. },
  16763. "required": ["sessionID", "requestID", "reply"],
  16764. "additionalProperties": false
  16765. }
  16766. },
  16767. "required": ["id", "type", "properties"],
  16768. "additionalProperties": false
  16769. },
  16770. {
  16771. "type": "object",
  16772. "properties": {
  16773. "id": {
  16774. "type": "string",
  16775. "pattern": "^evt_"
  16776. },
  16777. "type": {
  16778. "type": "string",
  16779. "enum": ["tui.prompt.append"]
  16780. },
  16781. "properties": {
  16782. "type": "object",
  16783. "properties": {
  16784. "text": {
  16785. "type": "string"
  16786. }
  16787. },
  16788. "required": ["text"],
  16789. "additionalProperties": false
  16790. }
  16791. },
  16792. "required": ["id", "type", "properties"],
  16793. "additionalProperties": false
  16794. },
  16795. {
  16796. "type": "object",
  16797. "properties": {
  16798. "id": {
  16799. "type": "string",
  16800. "pattern": "^evt_"
  16801. },
  16802. "type": {
  16803. "type": "string",
  16804. "enum": ["tui.command.execute"]
  16805. },
  16806. "properties": {
  16807. "type": "object",
  16808. "properties": {
  16809. "command": {
  16810. "anyOf": [
  16811. {
  16812. "type": "string",
  16813. "enum": [
  16814. "session.list",
  16815. "session.new",
  16816. "session.share",
  16817. "session.interrupt",
  16818. "session.compact",
  16819. "session.page.up",
  16820. "session.page.down",
  16821. "session.line.up",
  16822. "session.line.down",
  16823. "session.half.page.up",
  16824. "session.half.page.down",
  16825. "session.first",
  16826. "session.last",
  16827. "prompt.clear",
  16828. "prompt.submit",
  16829. "agent.cycle"
  16830. ]
  16831. },
  16832. {
  16833. "type": "string"
  16834. }
  16835. ]
  16836. }
  16837. },
  16838. "required": ["command"],
  16839. "additionalProperties": false
  16840. }
  16841. },
  16842. "required": ["id", "type", "properties"],
  16843. "additionalProperties": false
  16844. },
  16845. {
  16846. "type": "object",
  16847. "properties": {
  16848. "id": {
  16849. "type": "string",
  16850. "pattern": "^evt_"
  16851. },
  16852. "type": {
  16853. "type": "string",
  16854. "enum": ["tui.toast.show"]
  16855. },
  16856. "properties": {
  16857. "type": "object",
  16858. "properties": {
  16859. "title": {
  16860. "type": "string"
  16861. },
  16862. "message": {
  16863. "type": "string"
  16864. },
  16865. "variant": {
  16866. "type": "string",
  16867. "enum": ["info", "success", "warning", "error"]
  16868. },
  16869. "duration": {
  16870. "type": "integer",
  16871. "exclusiveMinimum": 0
  16872. }
  16873. },
  16874. "required": ["message", "variant"],
  16875. "additionalProperties": false
  16876. }
  16877. },
  16878. "required": ["id", "type", "properties"],
  16879. "additionalProperties": false
  16880. },
  16881. {
  16882. "type": "object",
  16883. "properties": {
  16884. "id": {
  16885. "type": "string",
  16886. "pattern": "^evt_"
  16887. },
  16888. "type": {
  16889. "type": "string",
  16890. "enum": ["tui.session.select"]
  16891. },
  16892. "properties": {
  16893. "type": "object",
  16894. "properties": {
  16895. "sessionID": {
  16896. "type": "string",
  16897. "pattern": "^ses",
  16898. "description": "Session ID to navigate to"
  16899. }
  16900. },
  16901. "required": ["sessionID"],
  16902. "additionalProperties": false
  16903. }
  16904. },
  16905. "required": ["id", "type", "properties"],
  16906. "additionalProperties": false
  16907. },
  16908. {
  16909. "type": "object",
  16910. "properties": {
  16911. "id": {
  16912. "type": "string",
  16913. "pattern": "^evt_"
  16914. },
  16915. "type": {
  16916. "type": "string",
  16917. "enum": ["mcp.tools.changed"]
  16918. },
  16919. "properties": {
  16920. "type": "object",
  16921. "properties": {
  16922. "server": {
  16923. "type": "string"
  16924. }
  16925. },
  16926. "required": ["server"],
  16927. "additionalProperties": false
  16928. }
  16929. },
  16930. "required": ["id", "type", "properties"],
  16931. "additionalProperties": false
  16932. },
  16933. {
  16934. "type": "object",
  16935. "properties": {
  16936. "id": {
  16937. "type": "string",
  16938. "pattern": "^evt_"
  16939. },
  16940. "type": {
  16941. "type": "string",
  16942. "enum": ["mcp.browser.open.failed"]
  16943. },
  16944. "properties": {
  16945. "type": "object",
  16946. "properties": {
  16947. "mcpName": {
  16948. "type": "string"
  16949. },
  16950. "url": {
  16951. "type": "string"
  16952. }
  16953. },
  16954. "required": ["mcpName", "url"],
  16955. "additionalProperties": false
  16956. }
  16957. },
  16958. "required": ["id", "type", "properties"],
  16959. "additionalProperties": false
  16960. },
  16961. {
  16962. "type": "object",
  16963. "properties": {
  16964. "id": {
  16965. "type": "string",
  16966. "pattern": "^evt_"
  16967. },
  16968. "type": {
  16969. "type": "string",
  16970. "enum": ["command.executed"]
  16971. },
  16972. "properties": {
  16973. "type": "object",
  16974. "properties": {
  16975. "name": {
  16976. "type": "string"
  16977. },
  16978. "sessionID": {
  16979. "type": "string",
  16980. "pattern": "^ses"
  16981. },
  16982. "arguments": {
  16983. "type": "string"
  16984. },
  16985. "messageID": {
  16986. "type": "string",
  16987. "pattern": "^msg"
  16988. }
  16989. },
  16990. "required": ["name", "sessionID", "arguments", "messageID"],
  16991. "additionalProperties": false
  16992. }
  16993. },
  16994. "required": ["id", "type", "properties"],
  16995. "additionalProperties": false
  16996. },
  16997. {
  16998. "type": "object",
  16999. "properties": {
  17000. "id": {
  17001. "type": "string",
  17002. "pattern": "^evt_"
  17003. },
  17004. "type": {
  17005. "type": "string",
  17006. "enum": ["project.directories.updated"]
  17007. },
  17008. "properties": {
  17009. "type": "object",
  17010. "properties": {
  17011. "projectID": {
  17012. "type": "string"
  17013. }
  17014. },
  17015. "required": ["projectID"],
  17016. "additionalProperties": false
  17017. }
  17018. },
  17019. "required": ["id", "type", "properties"],
  17020. "additionalProperties": false
  17021. },
  17022. {
  17023. "type": "object",
  17024. "properties": {
  17025. "id": {
  17026. "type": "string",
  17027. "pattern": "^evt_"
  17028. },
  17029. "type": {
  17030. "type": "string",
  17031. "enum": ["project.updated"]
  17032. },
  17033. "properties": {
  17034. "type": "object",
  17035. "properties": {
  17036. "id": {
  17037. "type": "string"
  17038. },
  17039. "worktree": {
  17040. "type": "string"
  17041. },
  17042. "vcs": {
  17043. "type": "string",
  17044. "enum": ["git"]
  17045. },
  17046. "name": {
  17047. "type": "string"
  17048. },
  17049. "icon": {
  17050. "type": "object",
  17051. "properties": {
  17052. "url": {
  17053. "type": "string"
  17054. },
  17055. "override": {
  17056. "type": "string"
  17057. },
  17058. "color": {
  17059. "type": "string"
  17060. }
  17061. },
  17062. "additionalProperties": false
  17063. },
  17064. "commands": {
  17065. "type": "object",
  17066. "properties": {
  17067. "start": {
  17068. "type": "string",
  17069. "description": "Startup script to run when creating a new workspace (worktree)"
  17070. }
  17071. },
  17072. "additionalProperties": false
  17073. },
  17074. "time": {
  17075. "type": "object",
  17076. "properties": {
  17077. "created": {
  17078. "type": "integer",
  17079. "minimum": 0
  17080. },
  17081. "updated": {
  17082. "type": "integer",
  17083. "minimum": 0
  17084. },
  17085. "initialized": {
  17086. "type": "integer",
  17087. "minimum": 0
  17088. }
  17089. },
  17090. "required": ["created", "updated"],
  17091. "additionalProperties": false
  17092. },
  17093. "sandboxes": {
  17094. "type": "array",
  17095. "items": {
  17096. "type": "string"
  17097. }
  17098. }
  17099. },
  17100. "required": ["id", "worktree", "time", "sandboxes"],
  17101. "additionalProperties": false
  17102. }
  17103. },
  17104. "required": ["id", "type", "properties"],
  17105. "additionalProperties": false
  17106. },
  17107. {
  17108. "type": "object",
  17109. "properties": {
  17110. "id": {
  17111. "type": "string",
  17112. "pattern": "^evt_"
  17113. },
  17114. "type": {
  17115. "type": "string",
  17116. "enum": ["vcs.branch.updated"]
  17117. },
  17118. "properties": {
  17119. "type": "object",
  17120. "properties": {
  17121. "branch": {
  17122. "type": "string"
  17123. }
  17124. },
  17125. "additionalProperties": false
  17126. }
  17127. },
  17128. "required": ["id", "type", "properties"],
  17129. "additionalProperties": false
  17130. },
  17131. {
  17132. "type": "object",
  17133. "properties": {
  17134. "id": {
  17135. "type": "string",
  17136. "pattern": "^evt_"
  17137. },
  17138. "type": {
  17139. "type": "string",
  17140. "enum": ["question.asked"]
  17141. },
  17142. "properties": {
  17143. "type": "object",
  17144. "properties": {
  17145. "id": {
  17146. "type": "string",
  17147. "pattern": "^que"
  17148. },
  17149. "sessionID": {
  17150. "type": "string",
  17151. "pattern": "^ses"
  17152. },
  17153. "questions": {
  17154. "type": "array",
  17155. "items": {
  17156. "$ref": "#/components/schemas/QuestionInfo"
  17157. },
  17158. "description": "Questions to ask"
  17159. },
  17160. "tool": {
  17161. "$ref": "#/components/schemas/QuestionTool"
  17162. }
  17163. },
  17164. "required": ["id", "sessionID", "questions"],
  17165. "additionalProperties": false
  17166. }
  17167. },
  17168. "required": ["id", "type", "properties"],
  17169. "additionalProperties": false
  17170. },
  17171. {
  17172. "type": "object",
  17173. "properties": {
  17174. "id": {
  17175. "type": "string",
  17176. "pattern": "^evt_"
  17177. },
  17178. "type": {
  17179. "type": "string",
  17180. "enum": ["question.replied"]
  17181. },
  17182. "properties": {
  17183. "type": "object",
  17184. "properties": {
  17185. "sessionID": {
  17186. "type": "string",
  17187. "pattern": "^ses"
  17188. },
  17189. "requestID": {
  17190. "type": "string",
  17191. "pattern": "^que"
  17192. },
  17193. "answers": {
  17194. "type": "array",
  17195. "items": {
  17196. "$ref": "#/components/schemas/QuestionAnswer"
  17197. }
  17198. }
  17199. },
  17200. "required": ["sessionID", "requestID", "answers"],
  17201. "additionalProperties": false
  17202. }
  17203. },
  17204. "required": ["id", "type", "properties"],
  17205. "additionalProperties": false
  17206. },
  17207. {
  17208. "type": "object",
  17209. "properties": {
  17210. "id": {
  17211. "type": "string",
  17212. "pattern": "^evt_"
  17213. },
  17214. "type": {
  17215. "type": "string",
  17216. "enum": ["question.rejected"]
  17217. },
  17218. "properties": {
  17219. "type": "object",
  17220. "properties": {
  17221. "sessionID": {
  17222. "type": "string",
  17223. "pattern": "^ses"
  17224. },
  17225. "requestID": {
  17226. "type": "string",
  17227. "pattern": "^que"
  17228. }
  17229. },
  17230. "required": ["sessionID", "requestID"],
  17231. "additionalProperties": false
  17232. }
  17233. },
  17234. "required": ["id", "type", "properties"],
  17235. "additionalProperties": false
  17236. },
  17237. {
  17238. "type": "object",
  17239. "properties": {
  17240. "id": {
  17241. "type": "string",
  17242. "pattern": "^evt_"
  17243. },
  17244. "type": {
  17245. "type": "string",
  17246. "enum": ["session.status"]
  17247. },
  17248. "properties": {
  17249. "type": "object",
  17250. "properties": {
  17251. "sessionID": {
  17252. "type": "string",
  17253. "pattern": "^ses"
  17254. },
  17255. "status": {
  17256. "$ref": "#/components/schemas/SessionStatus"
  17257. }
  17258. },
  17259. "required": ["sessionID", "status"],
  17260. "additionalProperties": false
  17261. }
  17262. },
  17263. "required": ["id", "type", "properties"],
  17264. "additionalProperties": false
  17265. },
  17266. {
  17267. "type": "object",
  17268. "properties": {
  17269. "id": {
  17270. "type": "string",
  17271. "pattern": "^evt_"
  17272. },
  17273. "type": {
  17274. "type": "string",
  17275. "enum": ["session.idle"]
  17276. },
  17277. "properties": {
  17278. "type": "object",
  17279. "properties": {
  17280. "sessionID": {
  17281. "type": "string",
  17282. "pattern": "^ses"
  17283. }
  17284. },
  17285. "required": ["sessionID"],
  17286. "additionalProperties": false
  17287. }
  17288. },
  17289. "required": ["id", "type", "properties"],
  17290. "additionalProperties": false
  17291. },
  17292. {
  17293. "type": "object",
  17294. "properties": {
  17295. "id": {
  17296. "type": "string",
  17297. "pattern": "^evt_"
  17298. },
  17299. "type": {
  17300. "type": "string",
  17301. "enum": ["session.compacted"]
  17302. },
  17303. "properties": {
  17304. "type": "object",
  17305. "properties": {
  17306. "sessionID": {
  17307. "type": "string",
  17308. "pattern": "^ses"
  17309. }
  17310. },
  17311. "required": ["sessionID"],
  17312. "additionalProperties": false
  17313. }
  17314. },
  17315. "required": ["id", "type", "properties"],
  17316. "additionalProperties": false
  17317. },
  17318. {
  17319. "type": "object",
  17320. "properties": {
  17321. "id": {
  17322. "type": "string",
  17323. "pattern": "^evt_"
  17324. },
  17325. "type": {
  17326. "type": "string",
  17327. "enum": ["worktree.ready"]
  17328. },
  17329. "properties": {
  17330. "type": "object",
  17331. "properties": {
  17332. "name": {
  17333. "type": "string"
  17334. },
  17335. "branch": {
  17336. "type": "string"
  17337. }
  17338. },
  17339. "required": ["name"],
  17340. "additionalProperties": false
  17341. }
  17342. },
  17343. "required": ["id", "type", "properties"],
  17344. "additionalProperties": false
  17345. },
  17346. {
  17347. "type": "object",
  17348. "properties": {
  17349. "id": {
  17350. "type": "string",
  17351. "pattern": "^evt_"
  17352. },
  17353. "type": {
  17354. "type": "string",
  17355. "enum": ["worktree.failed"]
  17356. },
  17357. "properties": {
  17358. "type": "object",
  17359. "properties": {
  17360. "message": {
  17361. "type": "string"
  17362. }
  17363. },
  17364. "required": ["message"],
  17365. "additionalProperties": false
  17366. }
  17367. },
  17368. "required": ["id", "type", "properties"],
  17369. "additionalProperties": false
  17370. },
  17371. {
  17372. "type": "object",
  17373. "properties": {
  17374. "id": {
  17375. "type": "string",
  17376. "pattern": "^evt_"
  17377. },
  17378. "type": {
  17379. "type": "string",
  17380. "enum": ["workspace.ready"]
  17381. },
  17382. "properties": {
  17383. "type": "object",
  17384. "properties": {
  17385. "name": {
  17386. "type": "string"
  17387. }
  17388. },
  17389. "required": ["name"],
  17390. "additionalProperties": false
  17391. }
  17392. },
  17393. "required": ["id", "type", "properties"],
  17394. "additionalProperties": false
  17395. },
  17396. {
  17397. "type": "object",
  17398. "properties": {
  17399. "id": {
  17400. "type": "string",
  17401. "pattern": "^evt_"
  17402. },
  17403. "type": {
  17404. "type": "string",
  17405. "enum": ["workspace.failed"]
  17406. },
  17407. "properties": {
  17408. "type": "object",
  17409. "properties": {
  17410. "message": {
  17411. "type": "string"
  17412. }
  17413. },
  17414. "required": ["message"],
  17415. "additionalProperties": false
  17416. }
  17417. },
  17418. "required": ["id", "type", "properties"],
  17419. "additionalProperties": false
  17420. },
  17421. {
  17422. "type": "object",
  17423. "properties": {
  17424. "id": {
  17425. "type": "string",
  17426. "pattern": "^evt_"
  17427. },
  17428. "type": {
  17429. "type": "string",
  17430. "enum": ["workspace.status"]
  17431. },
  17432. "properties": {
  17433. "type": "object",
  17434. "properties": {
  17435. "workspaceID": {
  17436. "type": "string",
  17437. "pattern": "^wrk"
  17438. },
  17439. "status": {
  17440. "type": "string",
  17441. "enum": ["connected", "connecting", "disconnected", "error"]
  17442. }
  17443. },
  17444. "required": ["workspaceID", "status"],
  17445. "additionalProperties": false
  17446. }
  17447. },
  17448. "required": ["id", "type", "properties"],
  17449. "additionalProperties": false
  17450. },
  17451. {
  17452. "type": "object",
  17453. "properties": {
  17454. "id": {
  17455. "type": "string",
  17456. "pattern": "^evt_"
  17457. },
  17458. "type": {
  17459. "type": "string",
  17460. "enum": ["server.connected"]
  17461. },
  17462. "properties": {
  17463. "type": "object",
  17464. "properties": {}
  17465. }
  17466. },
  17467. "required": ["id", "type", "properties"],
  17468. "additionalProperties": false
  17469. },
  17470. {
  17471. "type": "object",
  17472. "properties": {
  17473. "id": {
  17474. "type": "string",
  17475. "pattern": "^evt_"
  17476. },
  17477. "type": {
  17478. "type": "string",
  17479. "enum": ["global.disposed"]
  17480. },
  17481. "properties": {
  17482. "type": "object",
  17483. "properties": {}
  17484. }
  17485. },
  17486. "required": ["id", "type", "properties"],
  17487. "additionalProperties": false
  17488. },
  17489. {
  17490. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  17491. },
  17492. {
  17493. "$ref": "#/components/schemas/SyncEventSessionCreated"
  17494. },
  17495. {
  17496. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  17497. },
  17498. {
  17499. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  17500. },
  17501. {
  17502. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  17503. },
  17504. {
  17505. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  17506. },
  17507. {
  17508. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  17509. },
  17510. {
  17511. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  17512. },
  17513. {
  17514. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  17515. },
  17516. {
  17517. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  17518. },
  17519. {
  17520. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  17521. },
  17522. {
  17523. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  17524. },
  17525. {
  17526. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  17527. },
  17528. {
  17529. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  17530. },
  17531. {
  17532. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  17533. },
  17534. {
  17535. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  17536. },
  17537. {
  17538. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  17539. },
  17540. {
  17541. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  17542. },
  17543. {
  17544. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  17545. },
  17546. {
  17547. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  17548. },
  17549. {
  17550. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  17551. },
  17552. {
  17553. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  17554. },
  17555. {
  17556. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  17557. },
  17558. {
  17559. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  17560. },
  17561. {
  17562. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  17563. },
  17564. {
  17565. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  17566. },
  17567. {
  17568. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  17569. },
  17570. {
  17571. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  17572. },
  17573. {
  17574. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  17575. },
  17576. {
  17577. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  17578. },
  17579. {
  17580. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  17581. },
  17582. {
  17583. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  17584. },
  17585. {
  17586. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  17587. },
  17588. {
  17589. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  17590. },
  17591. {
  17592. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  17593. }
  17594. ]
  17595. }
  17596. },
  17597. "required": ["directory", "payload"],
  17598. "additionalProperties": false
  17599. },
  17600. "LogLevel": {
  17601. "type": "string",
  17602. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  17603. "description": "Log level"
  17604. },
  17605. "ServerConfig": {
  17606. "type": "object",
  17607. "properties": {
  17608. "port": {
  17609. "type": "integer",
  17610. "exclusiveMinimum": 0
  17611. },
  17612. "hostname": {
  17613. "type": "string"
  17614. },
  17615. "mdns": {
  17616. "type": "boolean"
  17617. },
  17618. "mdnsDomain": {
  17619. "type": "string"
  17620. },
  17621. "cors": {
  17622. "type": "array",
  17623. "items": {
  17624. "type": "string"
  17625. }
  17626. }
  17627. },
  17628. "additionalProperties": false,
  17629. "description": "Server configuration for opencode serve and web commands"
  17630. },
  17631. "PermissionActionConfig": {
  17632. "type": "string",
  17633. "enum": ["ask", "allow", "deny"]
  17634. },
  17635. "PermissionObjectConfig": {
  17636. "type": "object",
  17637. "additionalProperties": {
  17638. "$ref": "#/components/schemas/PermissionActionConfig"
  17639. }
  17640. },
  17641. "PermissionRuleConfig": {
  17642. "anyOf": [
  17643. {
  17644. "$ref": "#/components/schemas/PermissionActionConfig"
  17645. },
  17646. {
  17647. "$ref": "#/components/schemas/PermissionObjectConfig"
  17648. }
  17649. ]
  17650. },
  17651. "PermissionConfig": {
  17652. "anyOf": [
  17653. {
  17654. "$ref": "#/components/schemas/PermissionActionConfig"
  17655. },
  17656. {
  17657. "type": "object",
  17658. "properties": {
  17659. "read": {
  17660. "$ref": "#/components/schemas/PermissionRuleConfig"
  17661. },
  17662. "edit": {
  17663. "$ref": "#/components/schemas/PermissionRuleConfig"
  17664. },
  17665. "glob": {
  17666. "$ref": "#/components/schemas/PermissionRuleConfig"
  17667. },
  17668. "grep": {
  17669. "$ref": "#/components/schemas/PermissionRuleConfig"
  17670. },
  17671. "list": {
  17672. "$ref": "#/components/schemas/PermissionRuleConfig"
  17673. },
  17674. "bash": {
  17675. "$ref": "#/components/schemas/PermissionRuleConfig"
  17676. },
  17677. "task": {
  17678. "$ref": "#/components/schemas/PermissionRuleConfig"
  17679. },
  17680. "external_directory": {
  17681. "$ref": "#/components/schemas/PermissionRuleConfig"
  17682. },
  17683. "todowrite": {
  17684. "$ref": "#/components/schemas/PermissionActionConfig"
  17685. },
  17686. "question": {
  17687. "$ref": "#/components/schemas/PermissionActionConfig"
  17688. },
  17689. "webfetch": {
  17690. "$ref": "#/components/schemas/PermissionActionConfig"
  17691. },
  17692. "websearch": {
  17693. "$ref": "#/components/schemas/PermissionActionConfig"
  17694. },
  17695. "lsp": {
  17696. "$ref": "#/components/schemas/PermissionRuleConfig"
  17697. },
  17698. "doom_loop": {
  17699. "$ref": "#/components/schemas/PermissionActionConfig"
  17700. },
  17701. "skill": {
  17702. "$ref": "#/components/schemas/PermissionRuleConfig"
  17703. }
  17704. },
  17705. "additionalProperties": {
  17706. "$ref": "#/components/schemas/PermissionRuleConfig"
  17707. }
  17708. }
  17709. ]
  17710. },
  17711. "AgentConfig": {
  17712. "type": "object",
  17713. "properties": {
  17714. "model": {
  17715. "type": "string"
  17716. },
  17717. "variant": {
  17718. "type": "string"
  17719. },
  17720. "temperature": {
  17721. "type": "number"
  17722. },
  17723. "top_p": {
  17724. "type": "number"
  17725. },
  17726. "prompt": {
  17727. "type": "string"
  17728. },
  17729. "tools": {
  17730. "type": "object",
  17731. "additionalProperties": {
  17732. "type": "boolean"
  17733. }
  17734. },
  17735. "disable": {
  17736. "type": "boolean"
  17737. },
  17738. "description": {
  17739. "type": "string"
  17740. },
  17741. "mode": {
  17742. "type": "string",
  17743. "enum": ["subagent", "primary", "all"]
  17744. },
  17745. "hidden": {
  17746. "type": "boolean"
  17747. },
  17748. "options": {
  17749. "type": "object"
  17750. },
  17751. "color": {
  17752. "anyOf": [
  17753. {
  17754. "type": "string",
  17755. "pattern": "^#[0-9a-fA-F]{6}$"
  17756. },
  17757. {
  17758. "type": "string",
  17759. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  17760. }
  17761. ],
  17762. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  17763. },
  17764. "steps": {
  17765. "type": "integer",
  17766. "exclusiveMinimum": 0
  17767. },
  17768. "maxSteps": {
  17769. "type": "integer",
  17770. "exclusiveMinimum": 0
  17771. },
  17772. "permission": {
  17773. "$ref": "#/components/schemas/PermissionConfig"
  17774. }
  17775. },
  17776. "additionalProperties": {}
  17777. },
  17778. "ProviderConfig": {
  17779. "type": "object",
  17780. "properties": {
  17781. "api": {
  17782. "type": "string"
  17783. },
  17784. "name": {
  17785. "type": "string"
  17786. },
  17787. "env": {
  17788. "type": "array",
  17789. "items": {
  17790. "type": "string"
  17791. }
  17792. },
  17793. "id": {
  17794. "type": "string"
  17795. },
  17796. "npm": {
  17797. "type": "string"
  17798. },
  17799. "whitelist": {
  17800. "type": "array",
  17801. "items": {
  17802. "type": "string"
  17803. }
  17804. },
  17805. "blacklist": {
  17806. "type": "array",
  17807. "items": {
  17808. "type": "string"
  17809. }
  17810. },
  17811. "options": {
  17812. "type": "object",
  17813. "properties": {
  17814. "apiKey": {
  17815. "type": "string"
  17816. },
  17817. "baseURL": {
  17818. "type": "string"
  17819. },
  17820. "enterpriseUrl": {
  17821. "type": "string"
  17822. },
  17823. "setCacheKey": {
  17824. "type": "boolean"
  17825. },
  17826. "timeout": {
  17827. "anyOf": [
  17828. {
  17829. "type": "integer",
  17830. "exclusiveMinimum": 0
  17831. },
  17832. {
  17833. "type": "boolean",
  17834. "enum": [false]
  17835. }
  17836. ],
  17837. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  17838. },
  17839. "headerTimeout": {
  17840. "anyOf": [
  17841. {
  17842. "type": "integer",
  17843. "exclusiveMinimum": 0
  17844. },
  17845. {
  17846. "type": "boolean",
  17847. "enum": [false]
  17848. }
  17849. ],
  17850. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  17851. },
  17852. "chunkTimeout": {
  17853. "type": "integer",
  17854. "exclusiveMinimum": 0
  17855. }
  17856. },
  17857. "additionalProperties": {}
  17858. },
  17859. "models": {
  17860. "type": "object",
  17861. "additionalProperties": {
  17862. "type": "object",
  17863. "properties": {
  17864. "id": {
  17865. "type": "string"
  17866. },
  17867. "name": {
  17868. "type": "string"
  17869. },
  17870. "family": {
  17871. "type": "string"
  17872. },
  17873. "release_date": {
  17874. "type": "string"
  17875. },
  17876. "attachment": {
  17877. "type": "boolean"
  17878. },
  17879. "reasoning": {
  17880. "type": "boolean"
  17881. },
  17882. "temperature": {
  17883. "type": "boolean"
  17884. },
  17885. "tool_call": {
  17886. "type": "boolean"
  17887. },
  17888. "interleaved": {
  17889. "anyOf": [
  17890. {
  17891. "type": "boolean",
  17892. "enum": [true]
  17893. },
  17894. {
  17895. "type": "object",
  17896. "properties": {
  17897. "field": {
  17898. "type": "string",
  17899. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  17900. }
  17901. },
  17902. "required": ["field"],
  17903. "additionalProperties": false
  17904. }
  17905. ]
  17906. },
  17907. "cost": {
  17908. "type": "object",
  17909. "properties": {
  17910. "input": {
  17911. "type": "number"
  17912. },
  17913. "output": {
  17914. "type": "number"
  17915. },
  17916. "cache_read": {
  17917. "type": "number"
  17918. },
  17919. "cache_write": {
  17920. "type": "number"
  17921. },
  17922. "context_over_200k": {
  17923. "type": "object",
  17924. "properties": {
  17925. "input": {
  17926. "type": "number"
  17927. },
  17928. "output": {
  17929. "type": "number"
  17930. },
  17931. "cache_read": {
  17932. "type": "number"
  17933. },
  17934. "cache_write": {
  17935. "type": "number"
  17936. }
  17937. },
  17938. "required": ["input", "output"],
  17939. "additionalProperties": false
  17940. }
  17941. },
  17942. "required": ["input", "output"],
  17943. "additionalProperties": false
  17944. },
  17945. "limit": {
  17946. "type": "object",
  17947. "properties": {
  17948. "context": {
  17949. "type": "number"
  17950. },
  17951. "input": {
  17952. "type": "number"
  17953. },
  17954. "output": {
  17955. "type": "number"
  17956. }
  17957. },
  17958. "required": ["context", "output"],
  17959. "additionalProperties": false
  17960. },
  17961. "modalities": {
  17962. "type": "object",
  17963. "properties": {
  17964. "input": {
  17965. "type": "array",
  17966. "items": {
  17967. "type": "string",
  17968. "enum": ["text", "audio", "image", "video", "pdf"]
  17969. }
  17970. },
  17971. "output": {
  17972. "type": "array",
  17973. "items": {
  17974. "type": "string",
  17975. "enum": ["text", "audio", "image", "video", "pdf"]
  17976. }
  17977. }
  17978. },
  17979. "additionalProperties": false
  17980. },
  17981. "experimental": {
  17982. "type": "boolean"
  17983. },
  17984. "status": {
  17985. "type": "string",
  17986. "enum": ["alpha", "beta", "deprecated", "active"]
  17987. },
  17988. "provider": {
  17989. "type": "object",
  17990. "properties": {
  17991. "npm": {
  17992. "type": "string"
  17993. },
  17994. "api": {
  17995. "type": "string"
  17996. }
  17997. },
  17998. "additionalProperties": false
  17999. },
  18000. "options": {
  18001. "type": "object"
  18002. },
  18003. "headers": {
  18004. "type": "object",
  18005. "additionalProperties": {
  18006. "type": "string"
  18007. }
  18008. },
  18009. "variants": {
  18010. "type": "object",
  18011. "additionalProperties": {
  18012. "type": "object",
  18013. "properties": {
  18014. "disabled": {
  18015. "type": "boolean"
  18016. }
  18017. },
  18018. "additionalProperties": {}
  18019. },
  18020. "description": "Variant-specific configuration"
  18021. }
  18022. },
  18023. "additionalProperties": false
  18024. }
  18025. }
  18026. },
  18027. "additionalProperties": false
  18028. },
  18029. "McpLocalConfig": {
  18030. "type": "object",
  18031. "properties": {
  18032. "type": {
  18033. "type": "string",
  18034. "enum": ["local"],
  18035. "description": "Type of MCP server connection"
  18036. },
  18037. "command": {
  18038. "type": "array",
  18039. "items": {
  18040. "type": "string"
  18041. },
  18042. "description": "Command and arguments to run the MCP server"
  18043. },
  18044. "environment": {
  18045. "type": "object",
  18046. "additionalProperties": {
  18047. "type": "string"
  18048. }
  18049. },
  18050. "enabled": {
  18051. "type": "boolean"
  18052. },
  18053. "timeout": {
  18054. "type": "integer",
  18055. "exclusiveMinimum": 0
  18056. }
  18057. },
  18058. "required": ["type", "command"],
  18059. "additionalProperties": false
  18060. },
  18061. "McpOAuthConfig": {
  18062. "type": "object",
  18063. "properties": {
  18064. "clientId": {
  18065. "type": "string"
  18066. },
  18067. "clientSecret": {
  18068. "type": "string"
  18069. },
  18070. "scope": {
  18071. "type": "string"
  18072. },
  18073. "callbackPort": {
  18074. "type": "integer",
  18075. "minimum": 1,
  18076. "maximum": 65535
  18077. },
  18078. "redirectUri": {
  18079. "type": "string"
  18080. }
  18081. },
  18082. "additionalProperties": false
  18083. },
  18084. "McpRemoteConfig": {
  18085. "type": "object",
  18086. "properties": {
  18087. "type": {
  18088. "type": "string",
  18089. "enum": ["remote"],
  18090. "description": "Type of MCP server connection"
  18091. },
  18092. "url": {
  18093. "type": "string",
  18094. "description": "URL of the remote MCP server"
  18095. },
  18096. "enabled": {
  18097. "type": "boolean"
  18098. },
  18099. "headers": {
  18100. "type": "object",
  18101. "additionalProperties": {
  18102. "type": "string"
  18103. }
  18104. },
  18105. "oauth": {
  18106. "anyOf": [
  18107. {
  18108. "$ref": "#/components/schemas/McpOAuthConfig"
  18109. },
  18110. {
  18111. "type": "boolean",
  18112. "enum": [false]
  18113. }
  18114. ],
  18115. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  18116. },
  18117. "timeout": {
  18118. "type": "integer",
  18119. "exclusiveMinimum": 0
  18120. }
  18121. },
  18122. "required": ["type", "url"],
  18123. "additionalProperties": false
  18124. },
  18125. "LayoutConfig": {
  18126. "type": "string",
  18127. "enum": ["auto", "stretch"],
  18128. "description": "@deprecated Always uses stretch layout."
  18129. },
  18130. "ImageAttachmentConfig": {
  18131. "type": "object",
  18132. "properties": {
  18133. "auto_resize": {
  18134. "type": "boolean"
  18135. },
  18136. "max_width": {
  18137. "type": "integer",
  18138. "exclusiveMinimum": 0
  18139. },
  18140. "max_height": {
  18141. "type": "integer",
  18142. "exclusiveMinimum": 0
  18143. },
  18144. "max_base64_bytes": {
  18145. "type": "integer",
  18146. "exclusiveMinimum": 0
  18147. }
  18148. },
  18149. "additionalProperties": false
  18150. },
  18151. "AttachmentConfig": {
  18152. "type": "object",
  18153. "properties": {
  18154. "image": {
  18155. "$ref": "#/components/schemas/ImageAttachmentConfig"
  18156. }
  18157. },
  18158. "additionalProperties": false
  18159. },
  18160. "Config": {
  18161. "type": "object",
  18162. "properties": {
  18163. "$schema": {
  18164. "type": "string"
  18165. },
  18166. "shell": {
  18167. "type": "string"
  18168. },
  18169. "logLevel": {
  18170. "$ref": "#/components/schemas/LogLevel"
  18171. },
  18172. "server": {
  18173. "$ref": "#/components/schemas/ServerConfig"
  18174. },
  18175. "command": {
  18176. "type": "object",
  18177. "additionalProperties": {
  18178. "type": "object",
  18179. "properties": {
  18180. "template": {
  18181. "type": "string"
  18182. },
  18183. "description": {
  18184. "type": "string"
  18185. },
  18186. "agent": {
  18187. "type": "string"
  18188. },
  18189. "model": {
  18190. "type": "string"
  18191. },
  18192. "variant": {
  18193. "type": "string"
  18194. },
  18195. "subtask": {
  18196. "type": "boolean"
  18197. }
  18198. },
  18199. "required": ["template"],
  18200. "additionalProperties": false
  18201. }
  18202. },
  18203. "skills": {
  18204. "type": "object",
  18205. "properties": {
  18206. "paths": {
  18207. "type": "array",
  18208. "items": {
  18209. "type": "string"
  18210. }
  18211. },
  18212. "urls": {
  18213. "type": "array",
  18214. "items": {
  18215. "type": "string"
  18216. }
  18217. }
  18218. },
  18219. "additionalProperties": false
  18220. },
  18221. "references": {
  18222. "type": "object",
  18223. "additionalProperties": {
  18224. "anyOf": [
  18225. {
  18226. "type": "string"
  18227. },
  18228. {
  18229. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  18230. },
  18231. {
  18232. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  18233. }
  18234. ]
  18235. }
  18236. },
  18237. "watcher": {
  18238. "type": "object",
  18239. "properties": {
  18240. "ignore": {
  18241. "type": "array",
  18242. "items": {
  18243. "type": "string"
  18244. }
  18245. }
  18246. },
  18247. "additionalProperties": false
  18248. },
  18249. "snapshot": {
  18250. "type": "boolean"
  18251. },
  18252. "plugin": {
  18253. "type": "array",
  18254. "items": {
  18255. "anyOf": [
  18256. {
  18257. "type": "string"
  18258. },
  18259. {
  18260. "type": "array",
  18261. "prefixItems": [
  18262. {
  18263. "type": "string"
  18264. },
  18265. {
  18266. "type": "object"
  18267. }
  18268. ],
  18269. "maxItems": 2,
  18270. "minItems": 2
  18271. }
  18272. ]
  18273. }
  18274. },
  18275. "share": {
  18276. "type": "string",
  18277. "enum": ["manual", "auto", "disabled"]
  18278. },
  18279. "autoshare": {
  18280. "type": "boolean"
  18281. },
  18282. "autoupdate": {
  18283. "anyOf": [
  18284. {
  18285. "type": "boolean"
  18286. },
  18287. {
  18288. "type": "string",
  18289. "enum": ["notify"]
  18290. }
  18291. ],
  18292. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  18293. },
  18294. "disabled_providers": {
  18295. "type": "array",
  18296. "items": {
  18297. "type": "string"
  18298. }
  18299. },
  18300. "enabled_providers": {
  18301. "type": "array",
  18302. "items": {
  18303. "type": "string"
  18304. }
  18305. },
  18306. "model": {
  18307. "type": "string"
  18308. },
  18309. "small_model": {
  18310. "type": "string"
  18311. },
  18312. "default_agent": {
  18313. "type": "string"
  18314. },
  18315. "username": {
  18316. "type": "string"
  18317. },
  18318. "mode": {
  18319. "type": "object",
  18320. "properties": {
  18321. "build": {
  18322. "$ref": "#/components/schemas/AgentConfig"
  18323. },
  18324. "plan": {
  18325. "$ref": "#/components/schemas/AgentConfig"
  18326. }
  18327. },
  18328. "additionalProperties": {
  18329. "$ref": "#/components/schemas/AgentConfig"
  18330. }
  18331. },
  18332. "agent": {
  18333. "type": "object",
  18334. "properties": {
  18335. "plan": {
  18336. "$ref": "#/components/schemas/AgentConfig"
  18337. },
  18338. "build": {
  18339. "$ref": "#/components/schemas/AgentConfig"
  18340. },
  18341. "general": {
  18342. "$ref": "#/components/schemas/AgentConfig"
  18343. },
  18344. "explore": {
  18345. "$ref": "#/components/schemas/AgentConfig"
  18346. },
  18347. "title": {
  18348. "$ref": "#/components/schemas/AgentConfig"
  18349. },
  18350. "summary": {
  18351. "$ref": "#/components/schemas/AgentConfig"
  18352. },
  18353. "compaction": {
  18354. "$ref": "#/components/schemas/AgentConfig"
  18355. }
  18356. },
  18357. "additionalProperties": {
  18358. "$ref": "#/components/schemas/AgentConfig"
  18359. }
  18360. },
  18361. "provider": {
  18362. "type": "object",
  18363. "additionalProperties": {
  18364. "$ref": "#/components/schemas/ProviderConfig"
  18365. }
  18366. },
  18367. "mcp": {
  18368. "type": "object",
  18369. "additionalProperties": {
  18370. "anyOf": [
  18371. {
  18372. "$ref": "#/components/schemas/McpLocalConfig"
  18373. },
  18374. {
  18375. "$ref": "#/components/schemas/McpRemoteConfig"
  18376. },
  18377. {
  18378. "type": "object",
  18379. "properties": {
  18380. "enabled": {
  18381. "type": "boolean"
  18382. }
  18383. },
  18384. "required": ["enabled"],
  18385. "additionalProperties": false
  18386. }
  18387. ]
  18388. }
  18389. },
  18390. "formatter": {
  18391. "anyOf": [
  18392. {
  18393. "type": "boolean"
  18394. },
  18395. {
  18396. "type": "object",
  18397. "additionalProperties": {
  18398. "type": "object",
  18399. "properties": {
  18400. "disabled": {
  18401. "type": "boolean"
  18402. },
  18403. "command": {
  18404. "type": "array",
  18405. "items": {
  18406. "type": "string"
  18407. }
  18408. },
  18409. "environment": {
  18410. "type": "object",
  18411. "additionalProperties": {
  18412. "type": "string"
  18413. }
  18414. },
  18415. "extensions": {
  18416. "type": "array",
  18417. "items": {
  18418. "type": "string"
  18419. }
  18420. }
  18421. },
  18422. "additionalProperties": false
  18423. }
  18424. }
  18425. ],
  18426. "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."
  18427. },
  18428. "lsp": {
  18429. "anyOf": [
  18430. {
  18431. "type": "boolean"
  18432. },
  18433. {
  18434. "type": "object",
  18435. "additionalProperties": {
  18436. "anyOf": [
  18437. {
  18438. "type": "object",
  18439. "properties": {
  18440. "disabled": {
  18441. "type": "boolean",
  18442. "enum": [true]
  18443. }
  18444. },
  18445. "required": ["disabled"],
  18446. "additionalProperties": false
  18447. },
  18448. {
  18449. "type": "object",
  18450. "properties": {
  18451. "command": {
  18452. "type": "array",
  18453. "items": {
  18454. "type": "string"
  18455. }
  18456. },
  18457. "extensions": {
  18458. "type": "array",
  18459. "items": {
  18460. "type": "string"
  18461. }
  18462. },
  18463. "disabled": {
  18464. "type": "boolean"
  18465. },
  18466. "env": {
  18467. "type": "object",
  18468. "additionalProperties": {
  18469. "type": "string"
  18470. }
  18471. },
  18472. "initialization": {
  18473. "type": "object"
  18474. }
  18475. },
  18476. "required": ["command"],
  18477. "additionalProperties": false
  18478. }
  18479. ]
  18480. }
  18481. }
  18482. ],
  18483. "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."
  18484. },
  18485. "instructions": {
  18486. "type": "array",
  18487. "items": {
  18488. "type": "string"
  18489. }
  18490. },
  18491. "layout": {
  18492. "$ref": "#/components/schemas/LayoutConfig"
  18493. },
  18494. "permission": {
  18495. "$ref": "#/components/schemas/PermissionConfig"
  18496. },
  18497. "tools": {
  18498. "type": "object",
  18499. "additionalProperties": {
  18500. "type": "boolean"
  18501. }
  18502. },
  18503. "attachment": {
  18504. "$ref": "#/components/schemas/AttachmentConfig"
  18505. },
  18506. "enterprise": {
  18507. "type": "object",
  18508. "properties": {
  18509. "url": {
  18510. "type": "string"
  18511. }
  18512. },
  18513. "additionalProperties": false
  18514. },
  18515. "tool_output": {
  18516. "type": "object",
  18517. "properties": {
  18518. "max_lines": {
  18519. "type": "integer",
  18520. "exclusiveMinimum": 0
  18521. },
  18522. "max_bytes": {
  18523. "type": "integer",
  18524. "exclusiveMinimum": 0
  18525. }
  18526. },
  18527. "additionalProperties": false
  18528. },
  18529. "compaction": {
  18530. "type": "object",
  18531. "properties": {
  18532. "auto": {
  18533. "type": "boolean"
  18534. },
  18535. "prune": {
  18536. "type": "boolean"
  18537. },
  18538. "tail_turns": {
  18539. "type": "integer",
  18540. "minimum": 0
  18541. },
  18542. "preserve_recent_tokens": {
  18543. "type": "integer",
  18544. "minimum": 0
  18545. },
  18546. "reserved": {
  18547. "type": "integer",
  18548. "minimum": 0
  18549. }
  18550. },
  18551. "additionalProperties": false
  18552. },
  18553. "experimental": {
  18554. "type": "object",
  18555. "properties": {
  18556. "disable_paste_summary": {
  18557. "type": "boolean"
  18558. },
  18559. "batch_tool": {
  18560. "type": "boolean"
  18561. },
  18562. "openTelemetry": {
  18563. "type": "boolean"
  18564. },
  18565. "primary_tools": {
  18566. "type": "array",
  18567. "items": {
  18568. "type": "string"
  18569. }
  18570. },
  18571. "continue_loop_on_deny": {
  18572. "type": "boolean"
  18573. },
  18574. "mcp_timeout": {
  18575. "type": "integer",
  18576. "exclusiveMinimum": 0
  18577. },
  18578. "policies": {
  18579. "type": "array",
  18580. "items": {
  18581. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  18582. }
  18583. }
  18584. },
  18585. "additionalProperties": false
  18586. }
  18587. },
  18588. "additionalProperties": false
  18589. },
  18590. "Model": {
  18591. "type": "object",
  18592. "properties": {
  18593. "id": {
  18594. "type": "string"
  18595. },
  18596. "providerID": {
  18597. "type": "string"
  18598. },
  18599. "api": {
  18600. "type": "object",
  18601. "properties": {
  18602. "id": {
  18603. "type": "string"
  18604. },
  18605. "url": {
  18606. "type": "string"
  18607. },
  18608. "npm": {
  18609. "type": "string"
  18610. }
  18611. },
  18612. "required": ["id", "url", "npm"],
  18613. "additionalProperties": false
  18614. },
  18615. "name": {
  18616. "type": "string"
  18617. },
  18618. "family": {
  18619. "type": "string"
  18620. },
  18621. "capabilities": {
  18622. "type": "object",
  18623. "properties": {
  18624. "temperature": {
  18625. "type": "boolean"
  18626. },
  18627. "reasoning": {
  18628. "type": "boolean"
  18629. },
  18630. "attachment": {
  18631. "type": "boolean"
  18632. },
  18633. "toolcall": {
  18634. "type": "boolean"
  18635. },
  18636. "input": {
  18637. "type": "object",
  18638. "properties": {
  18639. "text": {
  18640. "type": "boolean"
  18641. },
  18642. "audio": {
  18643. "type": "boolean"
  18644. },
  18645. "image": {
  18646. "type": "boolean"
  18647. },
  18648. "video": {
  18649. "type": "boolean"
  18650. },
  18651. "pdf": {
  18652. "type": "boolean"
  18653. }
  18654. },
  18655. "required": ["text", "audio", "image", "video", "pdf"],
  18656. "additionalProperties": false
  18657. },
  18658. "output": {
  18659. "type": "object",
  18660. "properties": {
  18661. "text": {
  18662. "type": "boolean"
  18663. },
  18664. "audio": {
  18665. "type": "boolean"
  18666. },
  18667. "image": {
  18668. "type": "boolean"
  18669. },
  18670. "video": {
  18671. "type": "boolean"
  18672. },
  18673. "pdf": {
  18674. "type": "boolean"
  18675. }
  18676. },
  18677. "required": ["text", "audio", "image", "video", "pdf"],
  18678. "additionalProperties": false
  18679. },
  18680. "interleaved": {
  18681. "anyOf": [
  18682. {
  18683. "type": "boolean"
  18684. },
  18685. {
  18686. "type": "object",
  18687. "properties": {
  18688. "field": {
  18689. "type": "string",
  18690. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  18691. }
  18692. },
  18693. "required": ["field"],
  18694. "additionalProperties": false
  18695. }
  18696. ]
  18697. }
  18698. },
  18699. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  18700. "additionalProperties": false
  18701. },
  18702. "cost": {
  18703. "type": "object",
  18704. "properties": {
  18705. "input": {
  18706. "type": "number"
  18707. },
  18708. "output": {
  18709. "type": "number"
  18710. },
  18711. "cache": {
  18712. "type": "object",
  18713. "properties": {
  18714. "read": {
  18715. "type": "number"
  18716. },
  18717. "write": {
  18718. "type": "number"
  18719. }
  18720. },
  18721. "required": ["read", "write"],
  18722. "additionalProperties": false
  18723. },
  18724. "tiers": {
  18725. "type": "array",
  18726. "items": {
  18727. "type": "object",
  18728. "properties": {
  18729. "input": {
  18730. "type": "number"
  18731. },
  18732. "output": {
  18733. "type": "number"
  18734. },
  18735. "cache": {
  18736. "type": "object",
  18737. "properties": {
  18738. "read": {
  18739. "type": "number"
  18740. },
  18741. "write": {
  18742. "type": "number"
  18743. }
  18744. },
  18745. "required": ["read", "write"],
  18746. "additionalProperties": false
  18747. },
  18748. "tier": {
  18749. "type": "object",
  18750. "properties": {
  18751. "type": {
  18752. "type": "string",
  18753. "enum": ["context"]
  18754. },
  18755. "size": {
  18756. "type": "number"
  18757. }
  18758. },
  18759. "required": ["type", "size"],
  18760. "additionalProperties": false
  18761. }
  18762. },
  18763. "required": ["input", "output", "cache", "tier"],
  18764. "additionalProperties": false
  18765. }
  18766. },
  18767. "experimentalOver200K": {
  18768. "type": "object",
  18769. "properties": {
  18770. "input": {
  18771. "type": "number"
  18772. },
  18773. "output": {
  18774. "type": "number"
  18775. },
  18776. "cache": {
  18777. "type": "object",
  18778. "properties": {
  18779. "read": {
  18780. "type": "number"
  18781. },
  18782. "write": {
  18783. "type": "number"
  18784. }
  18785. },
  18786. "required": ["read", "write"],
  18787. "additionalProperties": false
  18788. }
  18789. },
  18790. "required": ["input", "output", "cache"],
  18791. "additionalProperties": false
  18792. }
  18793. },
  18794. "required": ["input", "output", "cache"],
  18795. "additionalProperties": false
  18796. },
  18797. "limit": {
  18798. "type": "object",
  18799. "properties": {
  18800. "context": {
  18801. "type": "number"
  18802. },
  18803. "input": {
  18804. "type": "number"
  18805. },
  18806. "output": {
  18807. "type": "number"
  18808. }
  18809. },
  18810. "required": ["context", "output"],
  18811. "additionalProperties": false
  18812. },
  18813. "status": {
  18814. "type": "string",
  18815. "enum": ["alpha", "beta", "deprecated", "active"]
  18816. },
  18817. "options": {
  18818. "type": "object"
  18819. },
  18820. "headers": {
  18821. "type": "object",
  18822. "additionalProperties": {
  18823. "type": "string"
  18824. }
  18825. },
  18826. "release_date": {
  18827. "type": "string"
  18828. },
  18829. "variants": {
  18830. "type": "object",
  18831. "additionalProperties": {
  18832. "type": "object"
  18833. }
  18834. }
  18835. },
  18836. "required": [
  18837. "id",
  18838. "providerID",
  18839. "api",
  18840. "name",
  18841. "capabilities",
  18842. "cost",
  18843. "limit",
  18844. "status",
  18845. "options",
  18846. "headers",
  18847. "release_date"
  18848. ],
  18849. "additionalProperties": false
  18850. },
  18851. "Provider": {
  18852. "type": "object",
  18853. "properties": {
  18854. "id": {
  18855. "type": "string"
  18856. },
  18857. "name": {
  18858. "type": "string"
  18859. },
  18860. "source": {
  18861. "type": "string",
  18862. "enum": ["env", "config", "custom", "api"]
  18863. },
  18864. "env": {
  18865. "type": "array",
  18866. "items": {
  18867. "type": "string"
  18868. }
  18869. },
  18870. "key": {
  18871. "type": "string"
  18872. },
  18873. "options": {
  18874. "type": "object"
  18875. },
  18876. "models": {
  18877. "type": "object",
  18878. "additionalProperties": {
  18879. "$ref": "#/components/schemas/Model"
  18880. }
  18881. }
  18882. },
  18883. "required": ["id", "name", "source", "env", "options", "models"],
  18884. "additionalProperties": false
  18885. },
  18886. "ConsoleState": {
  18887. "type": "object",
  18888. "properties": {
  18889. "consoleManagedProviders": {
  18890. "type": "array",
  18891. "items": {
  18892. "type": "string"
  18893. }
  18894. },
  18895. "activeOrgName": {
  18896. "type": "string"
  18897. },
  18898. "switchableOrgCount": {
  18899. "type": "integer",
  18900. "minimum": 0
  18901. }
  18902. },
  18903. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18904. "additionalProperties": false
  18905. },
  18906. "effect_HttpApiError_InternalServerError": {
  18907. "type": "object",
  18908. "properties": {
  18909. "_tag": {
  18910. "type": "string",
  18911. "enum": ["InternalServerError"]
  18912. }
  18913. },
  18914. "required": ["_tag"],
  18915. "additionalProperties": false
  18916. },
  18917. "ToolListItem": {
  18918. "type": "object",
  18919. "properties": {
  18920. "id": {
  18921. "type": "string"
  18922. },
  18923. "description": {
  18924. "type": "string"
  18925. },
  18926. "parameters": {}
  18927. },
  18928. "required": ["id", "description", "parameters"],
  18929. "additionalProperties": false
  18930. },
  18931. "ToolList": {
  18932. "type": "array",
  18933. "items": {
  18934. "$ref": "#/components/schemas/ToolListItem"
  18935. }
  18936. },
  18937. "ToolIDs": {
  18938. "type": "array",
  18939. "items": {
  18940. "type": "string"
  18941. }
  18942. },
  18943. "WorktreeError": {
  18944. "type": "object",
  18945. "properties": {
  18946. "name": {
  18947. "type": "string",
  18948. "enum": [
  18949. "WorktreeNotGitError",
  18950. "WorktreeNameGenerationFailedError",
  18951. "WorktreeCreateFailedError",
  18952. "WorktreeStartCommandFailedError",
  18953. "WorktreeRemoveFailedError",
  18954. "WorktreeResetFailedError",
  18955. "WorktreeListFailedError"
  18956. ]
  18957. },
  18958. "data": {
  18959. "type": "object",
  18960. "properties": {
  18961. "message": {
  18962. "type": "string"
  18963. }
  18964. },
  18965. "required": ["message"],
  18966. "additionalProperties": false
  18967. }
  18968. },
  18969. "required": ["name", "data"],
  18970. "additionalProperties": false
  18971. },
  18972. "WorktreeCreateInput": {
  18973. "type": "object",
  18974. "properties": {
  18975. "name": {
  18976. "type": "string"
  18977. },
  18978. "startCommand": {
  18979. "type": "string",
  18980. "description": "Additional startup script to run after the project's start command"
  18981. }
  18982. },
  18983. "additionalProperties": false
  18984. },
  18985. "Worktree": {
  18986. "type": "object",
  18987. "properties": {
  18988. "name": {
  18989. "type": "string"
  18990. },
  18991. "branch": {
  18992. "type": "string"
  18993. },
  18994. "directory": {
  18995. "type": "string"
  18996. }
  18997. },
  18998. "required": ["name", "directory"],
  18999. "additionalProperties": false
  19000. },
  19001. "WorktreeRemoveInput": {
  19002. "type": "object",
  19003. "properties": {
  19004. "directory": {
  19005. "type": "string"
  19006. }
  19007. },
  19008. "required": ["directory"],
  19009. "additionalProperties": false
  19010. },
  19011. "WorktreeResetInput": {
  19012. "type": "object",
  19013. "properties": {
  19014. "directory": {
  19015. "type": "string"
  19016. }
  19017. },
  19018. "required": ["directory"],
  19019. "additionalProperties": false
  19020. },
  19021. "ProjectSummary": {
  19022. "type": "object",
  19023. "properties": {
  19024. "id": {
  19025. "type": "string"
  19026. },
  19027. "name": {
  19028. "type": "string"
  19029. },
  19030. "worktree": {
  19031. "type": "string"
  19032. }
  19033. },
  19034. "required": ["id", "worktree"],
  19035. "additionalProperties": false
  19036. },
  19037. "GlobalSession": {
  19038. "type": "object",
  19039. "properties": {
  19040. "id": {
  19041. "type": "string",
  19042. "pattern": "^ses"
  19043. },
  19044. "slug": {
  19045. "type": "string"
  19046. },
  19047. "projectID": {
  19048. "type": "string"
  19049. },
  19050. "workspaceID": {
  19051. "type": "string",
  19052. "pattern": "^wrk"
  19053. },
  19054. "directory": {
  19055. "type": "string"
  19056. },
  19057. "path": {
  19058. "type": "string"
  19059. },
  19060. "parentID": {
  19061. "type": "string",
  19062. "pattern": "^ses"
  19063. },
  19064. "summary": {
  19065. "type": "object",
  19066. "properties": {
  19067. "additions": {
  19068. "type": "number"
  19069. },
  19070. "deletions": {
  19071. "type": "number"
  19072. },
  19073. "files": {
  19074. "type": "number"
  19075. },
  19076. "diffs": {
  19077. "type": "array",
  19078. "items": {
  19079. "$ref": "#/components/schemas/SnapshotFileDiff"
  19080. }
  19081. }
  19082. },
  19083. "required": ["additions", "deletions", "files"],
  19084. "additionalProperties": false
  19085. },
  19086. "cost": {
  19087. "type": "number"
  19088. },
  19089. "tokens": {
  19090. "type": "object",
  19091. "properties": {
  19092. "input": {
  19093. "type": "number"
  19094. },
  19095. "output": {
  19096. "type": "number"
  19097. },
  19098. "reasoning": {
  19099. "type": "number"
  19100. },
  19101. "cache": {
  19102. "type": "object",
  19103. "properties": {
  19104. "read": {
  19105. "type": "number"
  19106. },
  19107. "write": {
  19108. "type": "number"
  19109. }
  19110. },
  19111. "required": ["read", "write"],
  19112. "additionalProperties": false
  19113. }
  19114. },
  19115. "required": ["input", "output", "reasoning", "cache"],
  19116. "additionalProperties": false
  19117. },
  19118. "share": {
  19119. "type": "object",
  19120. "properties": {
  19121. "url": {
  19122. "type": "string"
  19123. }
  19124. },
  19125. "required": ["url"],
  19126. "additionalProperties": false
  19127. },
  19128. "title": {
  19129. "type": "string"
  19130. },
  19131. "agent": {
  19132. "type": "string"
  19133. },
  19134. "model": {
  19135. "type": "object",
  19136. "properties": {
  19137. "id": {
  19138. "type": "string"
  19139. },
  19140. "providerID": {
  19141. "type": "string"
  19142. },
  19143. "variant": {
  19144. "type": "string"
  19145. }
  19146. },
  19147. "required": ["id", "providerID"],
  19148. "additionalProperties": false
  19149. },
  19150. "version": {
  19151. "type": "string"
  19152. },
  19153. "metadata": {
  19154. "type": "object"
  19155. },
  19156. "time": {
  19157. "type": "object",
  19158. "properties": {
  19159. "created": {
  19160. "type": "integer",
  19161. "minimum": 0
  19162. },
  19163. "updated": {
  19164. "type": "integer",
  19165. "minimum": 0
  19166. },
  19167. "compacting": {
  19168. "type": "integer",
  19169. "minimum": 0
  19170. },
  19171. "archived": {
  19172. "type": "number"
  19173. }
  19174. },
  19175. "required": ["created", "updated"],
  19176. "additionalProperties": false
  19177. },
  19178. "permission": {
  19179. "$ref": "#/components/schemas/PermissionRuleset"
  19180. },
  19181. "revert": {
  19182. "type": "object",
  19183. "properties": {
  19184. "messageID": {
  19185. "type": "string",
  19186. "pattern": "^msg"
  19187. },
  19188. "partID": {
  19189. "type": "string",
  19190. "pattern": "^prt"
  19191. },
  19192. "snapshot": {
  19193. "type": "string"
  19194. },
  19195. "diff": {
  19196. "type": "string"
  19197. }
  19198. },
  19199. "required": ["messageID"],
  19200. "additionalProperties": false
  19201. },
  19202. "project": {
  19203. "anyOf": [
  19204. {
  19205. "$ref": "#/components/schemas/ProjectSummary"
  19206. },
  19207. {
  19208. "type": "null"
  19209. }
  19210. ]
  19211. }
  19212. },
  19213. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  19214. "additionalProperties": false
  19215. },
  19216. "McpResource": {
  19217. "type": "object",
  19218. "properties": {
  19219. "name": {
  19220. "type": "string"
  19221. },
  19222. "uri": {
  19223. "type": "string"
  19224. },
  19225. "description": {
  19226. "type": "string"
  19227. },
  19228. "mimeType": {
  19229. "type": "string"
  19230. },
  19231. "client": {
  19232. "type": "string"
  19233. }
  19234. },
  19235. "required": ["name", "uri", "client"],
  19236. "additionalProperties": false
  19237. },
  19238. "Symbol": {
  19239. "type": "object",
  19240. "properties": {
  19241. "name": {
  19242. "type": "string"
  19243. },
  19244. "kind": {
  19245. "type": "integer",
  19246. "minimum": 0
  19247. },
  19248. "location": {
  19249. "type": "object",
  19250. "properties": {
  19251. "uri": {
  19252. "type": "string"
  19253. },
  19254. "range": {
  19255. "$ref": "#/components/schemas/Range"
  19256. }
  19257. },
  19258. "required": ["uri", "range"],
  19259. "additionalProperties": false
  19260. }
  19261. },
  19262. "required": ["name", "kind", "location"],
  19263. "additionalProperties": false
  19264. },
  19265. "FileNode": {
  19266. "type": "object",
  19267. "properties": {
  19268. "name": {
  19269. "type": "string"
  19270. },
  19271. "path": {
  19272. "type": "string"
  19273. },
  19274. "absolute": {
  19275. "type": "string"
  19276. },
  19277. "type": {
  19278. "type": "string",
  19279. "enum": ["file", "directory"]
  19280. },
  19281. "ignored": {
  19282. "type": "boolean"
  19283. }
  19284. },
  19285. "required": ["name", "path", "absolute", "type", "ignored"],
  19286. "additionalProperties": false
  19287. },
  19288. "FileContent": {
  19289. "type": "object",
  19290. "properties": {
  19291. "type": {
  19292. "type": "string",
  19293. "enum": ["text", "binary"]
  19294. },
  19295. "content": {
  19296. "type": "string"
  19297. },
  19298. "diff": {
  19299. "type": "string"
  19300. },
  19301. "patch": {
  19302. "type": "object",
  19303. "properties": {
  19304. "oldFileName": {
  19305. "type": "string"
  19306. },
  19307. "newFileName": {
  19308. "type": "string"
  19309. },
  19310. "oldHeader": {
  19311. "type": "string"
  19312. },
  19313. "newHeader": {
  19314. "type": "string"
  19315. },
  19316. "hunks": {
  19317. "type": "array",
  19318. "items": {
  19319. "type": "object",
  19320. "properties": {
  19321. "oldStart": {
  19322. "type": "integer",
  19323. "minimum": 0
  19324. },
  19325. "oldLines": {
  19326. "type": "integer",
  19327. "minimum": 0
  19328. },
  19329. "newStart": {
  19330. "type": "integer",
  19331. "minimum": 0
  19332. },
  19333. "newLines": {
  19334. "type": "integer",
  19335. "minimum": 0
  19336. },
  19337. "lines": {
  19338. "type": "array",
  19339. "items": {
  19340. "type": "string"
  19341. }
  19342. }
  19343. },
  19344. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  19345. "additionalProperties": false
  19346. }
  19347. },
  19348. "index": {
  19349. "type": "string"
  19350. }
  19351. },
  19352. "required": ["oldFileName", "newFileName", "hunks"],
  19353. "additionalProperties": false
  19354. },
  19355. "encoding": {
  19356. "type": "string",
  19357. "enum": ["base64"]
  19358. },
  19359. "mimeType": {
  19360. "type": "string"
  19361. }
  19362. },
  19363. "required": ["type", "content"],
  19364. "additionalProperties": false
  19365. },
  19366. "File": {
  19367. "type": "object",
  19368. "properties": {
  19369. "path": {
  19370. "type": "string"
  19371. },
  19372. "added": {
  19373. "type": "integer",
  19374. "minimum": 0
  19375. },
  19376. "removed": {
  19377. "type": "integer",
  19378. "minimum": 0
  19379. },
  19380. "status": {
  19381. "type": "string",
  19382. "enum": ["added", "deleted", "modified"]
  19383. }
  19384. },
  19385. "required": ["path", "added", "removed", "status"],
  19386. "additionalProperties": false
  19387. },
  19388. "Path": {
  19389. "type": "object",
  19390. "properties": {
  19391. "home": {
  19392. "type": "string"
  19393. },
  19394. "state": {
  19395. "type": "string"
  19396. },
  19397. "config": {
  19398. "type": "string"
  19399. },
  19400. "worktree": {
  19401. "type": "string"
  19402. },
  19403. "directory": {
  19404. "type": "string"
  19405. }
  19406. },
  19407. "required": ["home", "state", "config", "worktree", "directory"],
  19408. "additionalProperties": false
  19409. },
  19410. "VcsInfo": {
  19411. "type": "object",
  19412. "properties": {
  19413. "branch": {
  19414. "type": "string"
  19415. },
  19416. "default_branch": {
  19417. "type": "string"
  19418. }
  19419. },
  19420. "additionalProperties": false
  19421. },
  19422. "VcsFileStatus": {
  19423. "type": "object",
  19424. "properties": {
  19425. "file": {
  19426. "type": "string"
  19427. },
  19428. "additions": {
  19429. "type": "number"
  19430. },
  19431. "deletions": {
  19432. "type": "number"
  19433. },
  19434. "status": {
  19435. "type": "string",
  19436. "enum": ["added", "deleted", "modified"]
  19437. }
  19438. },
  19439. "required": ["file", "additions", "deletions", "status"],
  19440. "additionalProperties": false
  19441. },
  19442. "VcsFileDiff": {
  19443. "type": "object",
  19444. "properties": {
  19445. "file": {
  19446. "type": "string"
  19447. },
  19448. "patch": {
  19449. "type": "string"
  19450. },
  19451. "additions": {
  19452. "type": "number"
  19453. },
  19454. "deletions": {
  19455. "type": "number"
  19456. },
  19457. "status": {
  19458. "type": "string",
  19459. "enum": ["added", "deleted", "modified"]
  19460. }
  19461. },
  19462. "required": ["file", "additions", "deletions"],
  19463. "additionalProperties": false
  19464. },
  19465. "VcsApplyError": {
  19466. "type": "object",
  19467. "properties": {
  19468. "name": {
  19469. "type": "string",
  19470. "enum": ["VcsApplyError"]
  19471. },
  19472. "data": {
  19473. "type": "object",
  19474. "properties": {
  19475. "message": {
  19476. "type": "string"
  19477. },
  19478. "reason": {
  19479. "type": "string",
  19480. "enum": ["non-git", "not-clean"]
  19481. }
  19482. },
  19483. "required": ["message", "reason"],
  19484. "additionalProperties": false
  19485. }
  19486. },
  19487. "required": ["name", "data"],
  19488. "additionalProperties": false
  19489. },
  19490. "Command": {
  19491. "type": "object",
  19492. "properties": {
  19493. "name": {
  19494. "type": "string"
  19495. },
  19496. "description": {
  19497. "type": "string"
  19498. },
  19499. "agent": {
  19500. "type": "string"
  19501. },
  19502. "model": {
  19503. "type": "string"
  19504. },
  19505. "source": {
  19506. "type": "string",
  19507. "enum": ["command", "mcp", "skill"]
  19508. },
  19509. "template": {
  19510. "type": "string"
  19511. },
  19512. "subtask": {
  19513. "type": "boolean"
  19514. },
  19515. "hints": {
  19516. "type": "array",
  19517. "items": {
  19518. "type": "string"
  19519. }
  19520. }
  19521. },
  19522. "required": ["name", "template", "hints"],
  19523. "additionalProperties": false
  19524. },
  19525. "Agent": {
  19526. "type": "object",
  19527. "properties": {
  19528. "name": {
  19529. "type": "string"
  19530. },
  19531. "description": {
  19532. "type": "string"
  19533. },
  19534. "mode": {
  19535. "type": "string",
  19536. "enum": ["subagent", "primary", "all"]
  19537. },
  19538. "native": {
  19539. "type": "boolean"
  19540. },
  19541. "hidden": {
  19542. "type": "boolean"
  19543. },
  19544. "topP": {
  19545. "type": "number"
  19546. },
  19547. "temperature": {
  19548. "type": "number"
  19549. },
  19550. "color": {
  19551. "type": "string"
  19552. },
  19553. "permission": {
  19554. "$ref": "#/components/schemas/PermissionRuleset"
  19555. },
  19556. "model": {
  19557. "type": "object",
  19558. "properties": {
  19559. "modelID": {
  19560. "type": "string"
  19561. },
  19562. "providerID": {
  19563. "type": "string"
  19564. }
  19565. },
  19566. "required": ["modelID", "providerID"],
  19567. "additionalProperties": false
  19568. },
  19569. "variant": {
  19570. "type": "string"
  19571. },
  19572. "prompt": {
  19573. "type": "string"
  19574. },
  19575. "options": {
  19576. "type": "object"
  19577. },
  19578. "steps": {
  19579. "type": "number"
  19580. }
  19581. },
  19582. "required": ["name", "mode", "permission", "options"],
  19583. "additionalProperties": false
  19584. },
  19585. "LSPStatus": {
  19586. "type": "object",
  19587. "properties": {
  19588. "id": {
  19589. "type": "string"
  19590. },
  19591. "name": {
  19592. "type": "string"
  19593. },
  19594. "root": {
  19595. "type": "string"
  19596. },
  19597. "status": {
  19598. "type": "string",
  19599. "enum": ["connected", "error"]
  19600. }
  19601. },
  19602. "required": ["id", "name", "root", "status"],
  19603. "additionalProperties": false
  19604. },
  19605. "FormatterStatus": {
  19606. "type": "object",
  19607. "properties": {
  19608. "name": {
  19609. "type": "string"
  19610. },
  19611. "extensions": {
  19612. "type": "array",
  19613. "items": {
  19614. "type": "string"
  19615. }
  19616. },
  19617. "enabled": {
  19618. "type": "boolean"
  19619. }
  19620. },
  19621. "required": ["name", "extensions", "enabled"],
  19622. "additionalProperties": false
  19623. },
  19624. "MCPStatusConnected": {
  19625. "type": "object",
  19626. "properties": {
  19627. "status": {
  19628. "type": "string",
  19629. "enum": ["connected"]
  19630. }
  19631. },
  19632. "required": ["status"],
  19633. "additionalProperties": false
  19634. },
  19635. "MCPStatusDisabled": {
  19636. "type": "object",
  19637. "properties": {
  19638. "status": {
  19639. "type": "string",
  19640. "enum": ["disabled"]
  19641. }
  19642. },
  19643. "required": ["status"],
  19644. "additionalProperties": false
  19645. },
  19646. "MCPStatusFailed": {
  19647. "type": "object",
  19648. "properties": {
  19649. "status": {
  19650. "type": "string",
  19651. "enum": ["failed"]
  19652. },
  19653. "error": {
  19654. "type": "string"
  19655. }
  19656. },
  19657. "required": ["status", "error"],
  19658. "additionalProperties": false
  19659. },
  19660. "MCPStatusNeedsAuth": {
  19661. "type": "object",
  19662. "properties": {
  19663. "status": {
  19664. "type": "string",
  19665. "enum": ["needs_auth"]
  19666. }
  19667. },
  19668. "required": ["status"],
  19669. "additionalProperties": false
  19670. },
  19671. "MCPStatusNeedsClientRegistration": {
  19672. "type": "object",
  19673. "properties": {
  19674. "status": {
  19675. "type": "string",
  19676. "enum": ["needs_client_registration"]
  19677. },
  19678. "error": {
  19679. "type": "string"
  19680. }
  19681. },
  19682. "required": ["status", "error"],
  19683. "additionalProperties": false
  19684. },
  19685. "MCPStatus": {
  19686. "anyOf": [
  19687. {
  19688. "$ref": "#/components/schemas/MCPStatusConnected"
  19689. },
  19690. {
  19691. "$ref": "#/components/schemas/MCPStatusDisabled"
  19692. },
  19693. {
  19694. "$ref": "#/components/schemas/MCPStatusFailed"
  19695. },
  19696. {
  19697. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  19698. },
  19699. {
  19700. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  19701. }
  19702. ]
  19703. },
  19704. "McpUnsupportedOAuthError": {
  19705. "type": "object",
  19706. "properties": {
  19707. "error": {
  19708. "type": "string"
  19709. }
  19710. },
  19711. "required": ["error"],
  19712. "additionalProperties": false
  19713. },
  19714. "McpServerNotFoundError": {
  19715. "type": "object",
  19716. "properties": {
  19717. "_tag": {
  19718. "type": "string",
  19719. "enum": ["McpServerNotFoundError"]
  19720. },
  19721. "name": {
  19722. "type": "string"
  19723. },
  19724. "message": {
  19725. "type": "string"
  19726. }
  19727. },
  19728. "required": ["_tag", "name", "message"],
  19729. "additionalProperties": false
  19730. },
  19731. "Project": {
  19732. "type": "object",
  19733. "properties": {
  19734. "id": {
  19735. "type": "string"
  19736. },
  19737. "worktree": {
  19738. "type": "string"
  19739. },
  19740. "vcs": {
  19741. "type": "string",
  19742. "enum": ["git"]
  19743. },
  19744. "name": {
  19745. "type": "string"
  19746. },
  19747. "icon": {
  19748. "type": "object",
  19749. "properties": {
  19750. "url": {
  19751. "type": "string"
  19752. },
  19753. "override": {
  19754. "type": "string"
  19755. },
  19756. "color": {
  19757. "type": "string"
  19758. }
  19759. },
  19760. "additionalProperties": false
  19761. },
  19762. "commands": {
  19763. "type": "object",
  19764. "properties": {
  19765. "start": {
  19766. "type": "string",
  19767. "description": "Startup script to run when creating a new workspace (worktree)"
  19768. }
  19769. },
  19770. "additionalProperties": false
  19771. },
  19772. "time": {
  19773. "type": "object",
  19774. "properties": {
  19775. "created": {
  19776. "type": "integer",
  19777. "minimum": 0
  19778. },
  19779. "updated": {
  19780. "type": "integer",
  19781. "minimum": 0
  19782. },
  19783. "initialized": {
  19784. "type": "integer",
  19785. "minimum": 0
  19786. }
  19787. },
  19788. "required": ["created", "updated"],
  19789. "additionalProperties": false
  19790. },
  19791. "sandboxes": {
  19792. "type": "array",
  19793. "items": {
  19794. "type": "string"
  19795. }
  19796. }
  19797. },
  19798. "required": ["id", "worktree", "time", "sandboxes"],
  19799. "additionalProperties": false
  19800. },
  19801. "ProjectNotFoundError": {
  19802. "type": "object",
  19803. "properties": {
  19804. "_tag": {
  19805. "type": "string",
  19806. "enum": ["ProjectNotFoundError"]
  19807. },
  19808. "projectID": {
  19809. "type": "string"
  19810. },
  19811. "message": {
  19812. "type": "string"
  19813. }
  19814. },
  19815. "required": ["_tag", "projectID", "message"],
  19816. "additionalProperties": false
  19817. },
  19818. "ProjectCopyError": {
  19819. "type": "object",
  19820. "properties": {
  19821. "name": {
  19822. "type": "string",
  19823. "enum": ["ProjectCopyError"]
  19824. },
  19825. "data": {
  19826. "type": "object",
  19827. "properties": {
  19828. "message": {
  19829. "type": "string"
  19830. },
  19831. "forceRequired": {
  19832. "type": "boolean"
  19833. }
  19834. },
  19835. "required": ["message"],
  19836. "additionalProperties": false
  19837. }
  19838. },
  19839. "required": ["name", "data"],
  19840. "additionalProperties": false
  19841. },
  19842. "PtyNotFoundError": {
  19843. "type": "object",
  19844. "properties": {
  19845. "_tag": {
  19846. "type": "string",
  19847. "enum": ["PtyNotFoundError"]
  19848. },
  19849. "ptyID": {
  19850. "type": "string"
  19851. },
  19852. "message": {
  19853. "type": "string"
  19854. }
  19855. },
  19856. "required": ["_tag", "ptyID", "message"],
  19857. "additionalProperties": false
  19858. },
  19859. "PtyForbiddenError": {
  19860. "type": "object",
  19861. "properties": {
  19862. "_tag": {
  19863. "type": "string",
  19864. "enum": ["PtyForbiddenError"]
  19865. },
  19866. "message": {
  19867. "type": "string"
  19868. }
  19869. },
  19870. "required": ["_tag", "message"],
  19871. "additionalProperties": false
  19872. },
  19873. "QuestionRequest": {
  19874. "type": "object",
  19875. "properties": {
  19876. "id": {
  19877. "type": "string",
  19878. "pattern": "^que"
  19879. },
  19880. "sessionID": {
  19881. "type": "string",
  19882. "pattern": "^ses"
  19883. },
  19884. "questions": {
  19885. "type": "array",
  19886. "items": {
  19887. "$ref": "#/components/schemas/QuestionInfo"
  19888. },
  19889. "description": "Questions to ask"
  19890. },
  19891. "tool": {
  19892. "$ref": "#/components/schemas/QuestionTool"
  19893. }
  19894. },
  19895. "required": ["id", "sessionID", "questions"],
  19896. "additionalProperties": false
  19897. },
  19898. "QuestionNotFoundError": {
  19899. "type": "object",
  19900. "properties": {
  19901. "_tag": {
  19902. "type": "string",
  19903. "enum": ["QuestionNotFoundError"]
  19904. },
  19905. "requestID": {
  19906. "type": "string"
  19907. },
  19908. "message": {
  19909. "type": "string"
  19910. }
  19911. },
  19912. "required": ["_tag", "requestID", "message"],
  19913. "additionalProperties": false
  19914. },
  19915. "PermissionRequest": {
  19916. "type": "object",
  19917. "properties": {
  19918. "id": {
  19919. "type": "string",
  19920. "pattern": "^per"
  19921. },
  19922. "sessionID": {
  19923. "type": "string",
  19924. "pattern": "^ses"
  19925. },
  19926. "permission": {
  19927. "type": "string"
  19928. },
  19929. "patterns": {
  19930. "type": "array",
  19931. "items": {
  19932. "type": "string"
  19933. }
  19934. },
  19935. "metadata": {
  19936. "type": "object"
  19937. },
  19938. "always": {
  19939. "type": "array",
  19940. "items": {
  19941. "type": "string"
  19942. }
  19943. },
  19944. "tool": {
  19945. "type": "object",
  19946. "properties": {
  19947. "messageID": {
  19948. "type": "string"
  19949. },
  19950. "callID": {
  19951. "type": "string"
  19952. }
  19953. },
  19954. "required": ["messageID", "callID"],
  19955. "additionalProperties": false
  19956. }
  19957. },
  19958. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19959. "additionalProperties": false
  19960. },
  19961. "PermissionNotFoundError": {
  19962. "type": "object",
  19963. "properties": {
  19964. "_tag": {
  19965. "type": "string",
  19966. "enum": ["PermissionNotFoundError"]
  19967. },
  19968. "requestID": {
  19969. "type": "string"
  19970. },
  19971. "message": {
  19972. "type": "string"
  19973. }
  19974. },
  19975. "required": ["_tag", "requestID", "message"],
  19976. "additionalProperties": false
  19977. },
  19978. "ProviderAuthMethod": {
  19979. "type": "object",
  19980. "properties": {
  19981. "type": {
  19982. "type": "string",
  19983. "enum": ["oauth", "api"]
  19984. },
  19985. "label": {
  19986. "type": "string"
  19987. },
  19988. "prompts": {
  19989. "type": "array",
  19990. "items": {
  19991. "anyOf": [
  19992. {
  19993. "type": "object",
  19994. "properties": {
  19995. "type": {
  19996. "type": "string",
  19997. "enum": ["text"]
  19998. },
  19999. "key": {
  20000. "type": "string"
  20001. },
  20002. "message": {
  20003. "type": "string"
  20004. },
  20005. "placeholder": {
  20006. "type": "string"
  20007. },
  20008. "when": {
  20009. "type": "object",
  20010. "properties": {
  20011. "key": {
  20012. "type": "string"
  20013. },
  20014. "op": {
  20015. "type": "string",
  20016. "enum": ["eq", "neq"]
  20017. },
  20018. "value": {
  20019. "type": "string"
  20020. }
  20021. },
  20022. "required": ["key", "op", "value"],
  20023. "additionalProperties": false
  20024. }
  20025. },
  20026. "required": ["type", "key", "message"],
  20027. "additionalProperties": false
  20028. },
  20029. {
  20030. "type": "object",
  20031. "properties": {
  20032. "type": {
  20033. "type": "string",
  20034. "enum": ["select"]
  20035. },
  20036. "key": {
  20037. "type": "string"
  20038. },
  20039. "message": {
  20040. "type": "string"
  20041. },
  20042. "options": {
  20043. "type": "array",
  20044. "items": {
  20045. "type": "object",
  20046. "properties": {
  20047. "label": {
  20048. "type": "string"
  20049. },
  20050. "value": {
  20051. "type": "string"
  20052. },
  20053. "hint": {
  20054. "type": "string"
  20055. }
  20056. },
  20057. "required": ["label", "value"],
  20058. "additionalProperties": false
  20059. }
  20060. },
  20061. "when": {
  20062. "type": "object",
  20063. "properties": {
  20064. "key": {
  20065. "type": "string"
  20066. },
  20067. "op": {
  20068. "type": "string",
  20069. "enum": ["eq", "neq"]
  20070. },
  20071. "value": {
  20072. "type": "string"
  20073. }
  20074. },
  20075. "required": ["key", "op", "value"],
  20076. "additionalProperties": false
  20077. }
  20078. },
  20079. "required": ["type", "key", "message", "options"],
  20080. "additionalProperties": false
  20081. }
  20082. ]
  20083. }
  20084. }
  20085. },
  20086. "required": ["type", "label"],
  20087. "additionalProperties": false
  20088. },
  20089. "ProviderAuthAuthorization": {
  20090. "type": "object",
  20091. "properties": {
  20092. "url": {
  20093. "type": "string"
  20094. },
  20095. "method": {
  20096. "type": "string",
  20097. "enum": ["auto", "code"]
  20098. },
  20099. "instructions": {
  20100. "type": "string"
  20101. }
  20102. },
  20103. "required": ["url", "method", "instructions"],
  20104. "additionalProperties": false
  20105. },
  20106. "ProviderAuthError1": {
  20107. "type": "object",
  20108. "properties": {
  20109. "name": {
  20110. "type": "string",
  20111. "enum": [
  20112. "BadRequest",
  20113. "ProviderAuthOauthMissing",
  20114. "ProviderAuthOauthCodeMissing",
  20115. "ProviderAuthOauthCallbackFailed",
  20116. "ProviderAuthValidationFailed"
  20117. ]
  20118. },
  20119. "data": {
  20120. "type": "object",
  20121. "properties": {
  20122. "providerID": {
  20123. "type": "string"
  20124. },
  20125. "field": {
  20126. "type": "string"
  20127. },
  20128. "message": {
  20129. "type": "string"
  20130. },
  20131. "kind": {
  20132. "type": "string"
  20133. }
  20134. },
  20135. "additionalProperties": false
  20136. }
  20137. },
  20138. "required": ["name", "data"],
  20139. "additionalProperties": false
  20140. },
  20141. "NotFoundError": {
  20142. "type": "object",
  20143. "required": ["name", "data"],
  20144. "properties": {
  20145. "name": {
  20146. "type": "string",
  20147. "enum": ["NotFoundError"]
  20148. },
  20149. "data": {
  20150. "type": "object",
  20151. "required": ["message"],
  20152. "properties": {
  20153. "message": {
  20154. "type": "string"
  20155. }
  20156. }
  20157. }
  20158. }
  20159. },
  20160. "TextPartInput": {
  20161. "type": "object",
  20162. "properties": {
  20163. "id": {
  20164. "type": "string",
  20165. "pattern": "^prt"
  20166. },
  20167. "type": {
  20168. "type": "string",
  20169. "enum": ["text"]
  20170. },
  20171. "text": {
  20172. "type": "string"
  20173. },
  20174. "synthetic": {
  20175. "type": "boolean"
  20176. },
  20177. "ignored": {
  20178. "type": "boolean"
  20179. },
  20180. "time": {
  20181. "type": "object",
  20182. "properties": {
  20183. "start": {
  20184. "type": "integer",
  20185. "minimum": 0
  20186. },
  20187. "end": {
  20188. "type": "integer",
  20189. "minimum": 0
  20190. }
  20191. },
  20192. "required": ["start"],
  20193. "additionalProperties": false
  20194. },
  20195. "metadata": {
  20196. "type": "object"
  20197. }
  20198. },
  20199. "required": ["type", "text"],
  20200. "additionalProperties": false
  20201. },
  20202. "FilePartInput": {
  20203. "type": "object",
  20204. "properties": {
  20205. "id": {
  20206. "type": "string",
  20207. "pattern": "^prt"
  20208. },
  20209. "type": {
  20210. "type": "string",
  20211. "enum": ["file"]
  20212. },
  20213. "mime": {
  20214. "type": "string"
  20215. },
  20216. "filename": {
  20217. "type": "string"
  20218. },
  20219. "url": {
  20220. "type": "string"
  20221. },
  20222. "source": {
  20223. "$ref": "#/components/schemas/FilePartSource"
  20224. }
  20225. },
  20226. "required": ["type", "mime", "url"],
  20227. "additionalProperties": false
  20228. },
  20229. "AgentPartInput": {
  20230. "type": "object",
  20231. "properties": {
  20232. "id": {
  20233. "type": "string",
  20234. "pattern": "^prt"
  20235. },
  20236. "type": {
  20237. "type": "string",
  20238. "enum": ["agent"]
  20239. },
  20240. "name": {
  20241. "type": "string"
  20242. },
  20243. "source": {
  20244. "type": "object",
  20245. "properties": {
  20246. "value": {
  20247. "type": "string"
  20248. },
  20249. "start": {
  20250. "type": "integer",
  20251. "minimum": 0
  20252. },
  20253. "end": {
  20254. "type": "integer",
  20255. "minimum": 0
  20256. }
  20257. },
  20258. "required": ["value", "start", "end"],
  20259. "additionalProperties": false
  20260. }
  20261. },
  20262. "required": ["type", "name"],
  20263. "additionalProperties": false
  20264. },
  20265. "SubtaskPartInput": {
  20266. "type": "object",
  20267. "properties": {
  20268. "id": {
  20269. "type": "string",
  20270. "pattern": "^prt"
  20271. },
  20272. "type": {
  20273. "type": "string",
  20274. "enum": ["subtask"]
  20275. },
  20276. "prompt": {
  20277. "type": "string"
  20278. },
  20279. "description": {
  20280. "type": "string"
  20281. },
  20282. "agent": {
  20283. "type": "string"
  20284. },
  20285. "model": {
  20286. "type": "object",
  20287. "properties": {
  20288. "providerID": {
  20289. "type": "string"
  20290. },
  20291. "modelID": {
  20292. "type": "string"
  20293. }
  20294. },
  20295. "required": ["providerID", "modelID"],
  20296. "additionalProperties": false
  20297. },
  20298. "command": {
  20299. "type": "string"
  20300. }
  20301. },
  20302. "required": ["type", "prompt", "description", "agent"],
  20303. "additionalProperties": false
  20304. },
  20305. "SessionBusyError": {
  20306. "type": "object",
  20307. "properties": {
  20308. "_tag": {
  20309. "type": "string",
  20310. "enum": ["SessionBusyError"]
  20311. },
  20312. "sessionID": {
  20313. "type": "string"
  20314. },
  20315. "message": {
  20316. "type": "string"
  20317. }
  20318. },
  20319. "required": ["_tag", "sessionID", "message"],
  20320. "additionalProperties": false
  20321. },
  20322. "EventTuiPromptAppend": {
  20323. "type": "object",
  20324. "properties": {
  20325. "type": {
  20326. "type": "string",
  20327. "enum": ["tui.prompt.append"]
  20328. },
  20329. "properties": {
  20330. "type": "object",
  20331. "properties": {
  20332. "text": {
  20333. "type": "string"
  20334. }
  20335. },
  20336. "required": ["text"],
  20337. "additionalProperties": false
  20338. }
  20339. },
  20340. "required": ["type", "properties"],
  20341. "additionalProperties": false
  20342. },
  20343. "EventTuiCommandExecute": {
  20344. "type": "object",
  20345. "properties": {
  20346. "type": {
  20347. "type": "string",
  20348. "enum": ["tui.command.execute"]
  20349. },
  20350. "properties": {
  20351. "type": "object",
  20352. "properties": {
  20353. "command": {
  20354. "anyOf": [
  20355. {
  20356. "type": "string",
  20357. "enum": [
  20358. "session.list",
  20359. "session.new",
  20360. "session.share",
  20361. "session.interrupt",
  20362. "session.compact",
  20363. "session.page.up",
  20364. "session.page.down",
  20365. "session.line.up",
  20366. "session.line.down",
  20367. "session.half.page.up",
  20368. "session.half.page.down",
  20369. "session.first",
  20370. "session.last",
  20371. "prompt.clear",
  20372. "prompt.submit",
  20373. "agent.cycle"
  20374. ]
  20375. },
  20376. {
  20377. "type": "string"
  20378. }
  20379. ]
  20380. }
  20381. },
  20382. "required": ["command"],
  20383. "additionalProperties": false
  20384. }
  20385. },
  20386. "required": ["type", "properties"],
  20387. "additionalProperties": false
  20388. },
  20389. "EventTuiToastShow": {
  20390. "type": "object",
  20391. "properties": {
  20392. "type": {
  20393. "type": "string",
  20394. "enum": ["tui.toast.show"]
  20395. },
  20396. "properties": {
  20397. "type": "object",
  20398. "properties": {
  20399. "title": {
  20400. "type": "string"
  20401. },
  20402. "message": {
  20403. "type": "string"
  20404. },
  20405. "variant": {
  20406. "type": "string",
  20407. "enum": ["info", "success", "warning", "error"]
  20408. },
  20409. "duration": {
  20410. "type": "integer",
  20411. "exclusiveMinimum": 0
  20412. }
  20413. },
  20414. "required": ["message", "variant"],
  20415. "additionalProperties": false
  20416. }
  20417. },
  20418. "required": ["type", "properties"],
  20419. "additionalProperties": false
  20420. },
  20421. "EventTuiSessionSelect": {
  20422. "type": "object",
  20423. "properties": {
  20424. "type": {
  20425. "type": "string",
  20426. "enum": ["tui.session.select"]
  20427. },
  20428. "properties": {
  20429. "type": "object",
  20430. "properties": {
  20431. "sessionID": {
  20432. "type": "string",
  20433. "pattern": "^ses",
  20434. "description": "Session ID to navigate to"
  20435. }
  20436. },
  20437. "required": ["sessionID"],
  20438. "additionalProperties": false
  20439. }
  20440. },
  20441. "required": ["type", "properties"],
  20442. "additionalProperties": false
  20443. },
  20444. "Workspace": {
  20445. "type": "object",
  20446. "properties": {
  20447. "id": {
  20448. "type": "string",
  20449. "pattern": "^wrk"
  20450. },
  20451. "type": {
  20452. "type": "string"
  20453. },
  20454. "name": {
  20455. "type": "string"
  20456. },
  20457. "branch": {
  20458. "anyOf": [
  20459. {
  20460. "type": "string"
  20461. },
  20462. {
  20463. "type": "null"
  20464. }
  20465. ]
  20466. },
  20467. "directory": {
  20468. "anyOf": [
  20469. {
  20470. "type": "string"
  20471. },
  20472. {
  20473. "type": "null"
  20474. }
  20475. ]
  20476. },
  20477. "extra": {
  20478. "anyOf": [
  20479. {},
  20480. {
  20481. "type": "null"
  20482. }
  20483. ]
  20484. },
  20485. "projectID": {
  20486. "type": "string"
  20487. },
  20488. "timeUsed": {
  20489. "anyOf": [
  20490. {
  20491. "type": "number"
  20492. },
  20493. {
  20494. "type": "string",
  20495. "enum": ["NaN"]
  20496. },
  20497. {
  20498. "type": "string",
  20499. "enum": ["Infinity"]
  20500. },
  20501. {
  20502. "type": "string",
  20503. "enum": ["-Infinity"]
  20504. },
  20505. {
  20506. "type": "string",
  20507. "enum": ["Infinity", "-Infinity", "NaN"]
  20508. }
  20509. ]
  20510. }
  20511. },
  20512. "required": ["id", "type", "name", "projectID", "timeUsed"],
  20513. "additionalProperties": false
  20514. },
  20515. "WorkspaceCreateError": {
  20516. "type": "object",
  20517. "properties": {
  20518. "name": {
  20519. "type": "string",
  20520. "enum": ["WorkspaceCreateError"]
  20521. },
  20522. "data": {
  20523. "type": "object",
  20524. "properties": {
  20525. "message": {
  20526. "type": "string"
  20527. }
  20528. },
  20529. "required": ["message"],
  20530. "additionalProperties": false
  20531. }
  20532. },
  20533. "required": ["name", "data"],
  20534. "additionalProperties": false
  20535. },
  20536. "WorkspaceWarpError": {
  20537. "type": "object",
  20538. "properties": {
  20539. "name": {
  20540. "type": "string",
  20541. "enum": ["WorkspaceWarpError"]
  20542. },
  20543. "data": {
  20544. "type": "object",
  20545. "properties": {
  20546. "message": {
  20547. "type": "string"
  20548. }
  20549. },
  20550. "required": ["message"],
  20551. "additionalProperties": false
  20552. }
  20553. },
  20554. "required": ["name", "data"],
  20555. "additionalProperties": false
  20556. },
  20557. "UnauthorizedError": {
  20558. "type": "object",
  20559. "properties": {
  20560. "_tag": {
  20561. "type": "string",
  20562. "enum": ["UnauthorizedError"]
  20563. },
  20564. "message": {
  20565. "type": "string"
  20566. }
  20567. },
  20568. "required": ["_tag", "message"],
  20569. "additionalProperties": false
  20570. },
  20571. "SessionsResponse": {
  20572. "type": "object",
  20573. "properties": {
  20574. "data": {
  20575. "type": "array",
  20576. "items": {
  20577. "$ref": "#/components/schemas/SessionV2Info"
  20578. }
  20579. },
  20580. "cursor": {
  20581. "type": "object",
  20582. "properties": {
  20583. "previous": {
  20584. "type": "string"
  20585. },
  20586. "next": {
  20587. "type": "string"
  20588. }
  20589. },
  20590. "additionalProperties": false
  20591. }
  20592. },
  20593. "required": ["data", "cursor"],
  20594. "additionalProperties": false
  20595. },
  20596. "InvalidCursorError": {
  20597. "type": "object",
  20598. "properties": {
  20599. "_tag": {
  20600. "type": "string",
  20601. "enum": ["InvalidCursorError"]
  20602. },
  20603. "message": {
  20604. "type": "string"
  20605. }
  20606. },
  20607. "required": ["_tag", "message"],
  20608. "additionalProperties": false
  20609. },
  20610. "ConflictError": {
  20611. "type": "object",
  20612. "properties": {
  20613. "_tag": {
  20614. "type": "string",
  20615. "enum": ["ConflictError"]
  20616. },
  20617. "message": {
  20618. "type": "string"
  20619. },
  20620. "resource": {
  20621. "type": "string"
  20622. }
  20623. },
  20624. "required": ["_tag", "message"],
  20625. "additionalProperties": false
  20626. },
  20627. "SessionNotFoundError": {
  20628. "type": "object",
  20629. "properties": {
  20630. "_tag": {
  20631. "type": "string",
  20632. "enum": ["SessionNotFoundError"]
  20633. },
  20634. "sessionID": {
  20635. "type": "string"
  20636. },
  20637. "message": {
  20638. "type": "string"
  20639. }
  20640. },
  20641. "required": ["_tag", "sessionID", "message"],
  20642. "additionalProperties": false
  20643. },
  20644. "ServiceUnavailableError": {
  20645. "type": "object",
  20646. "properties": {
  20647. "_tag": {
  20648. "type": "string",
  20649. "enum": ["ServiceUnavailableError"]
  20650. },
  20651. "message": {
  20652. "type": "string"
  20653. },
  20654. "service": {
  20655. "type": "string"
  20656. }
  20657. },
  20658. "required": ["_tag", "message"],
  20659. "additionalProperties": false
  20660. },
  20661. "UnknownError1": {
  20662. "type": "object",
  20663. "properties": {
  20664. "_tag": {
  20665. "type": "string",
  20666. "enum": ["UnknownError"]
  20667. },
  20668. "message": {
  20669. "type": "string"
  20670. },
  20671. "ref": {
  20672. "type": "string"
  20673. }
  20674. },
  20675. "required": ["_tag", "message"],
  20676. "additionalProperties": false
  20677. },
  20678. "SessionMessagesResponse": {
  20679. "type": "object",
  20680. "properties": {
  20681. "data": {
  20682. "type": "array",
  20683. "items": {
  20684. "$ref": "#/components/schemas/SessionMessage"
  20685. }
  20686. },
  20687. "cursor": {
  20688. "type": "object",
  20689. "properties": {
  20690. "previous": {
  20691. "type": "string"
  20692. },
  20693. "next": {
  20694. "type": "string"
  20695. }
  20696. },
  20697. "additionalProperties": false
  20698. }
  20699. },
  20700. "required": ["data", "cursor"],
  20701. "additionalProperties": false
  20702. },
  20703. "ProviderNotFoundError": {
  20704. "type": "object",
  20705. "properties": {
  20706. "_tag": {
  20707. "type": "string",
  20708. "enum": ["ProviderNotFoundError"]
  20709. },
  20710. "providerID": {
  20711. "type": "string"
  20712. },
  20713. "message": {
  20714. "type": "string"
  20715. }
  20716. },
  20717. "required": ["_tag", "providerID", "message"],
  20718. "additionalProperties": false
  20719. },
  20720. "effect_HttpApiError_Forbidden": {
  20721. "type": "object",
  20722. "properties": {
  20723. "_tag": {
  20724. "type": "string",
  20725. "enum": ["Forbidden"]
  20726. }
  20727. },
  20728. "required": ["_tag"],
  20729. "additionalProperties": false
  20730. },
  20731. "Event.tui.prompt.append": {
  20732. "type": "object",
  20733. "properties": {
  20734. "id": {
  20735. "type": "string",
  20736. "pattern": "^evt_"
  20737. },
  20738. "type": {
  20739. "type": "string",
  20740. "enum": ["tui.prompt.append"]
  20741. },
  20742. "properties": {
  20743. "type": "object",
  20744. "properties": {
  20745. "text": {
  20746. "type": "string"
  20747. }
  20748. },
  20749. "required": ["text"],
  20750. "additionalProperties": false
  20751. }
  20752. },
  20753. "required": ["id", "type", "properties"],
  20754. "additionalProperties": false
  20755. },
  20756. "Event.tui.command.execute": {
  20757. "type": "object",
  20758. "properties": {
  20759. "id": {
  20760. "type": "string",
  20761. "pattern": "^evt_"
  20762. },
  20763. "type": {
  20764. "type": "string",
  20765. "enum": ["tui.command.execute"]
  20766. },
  20767. "properties": {
  20768. "type": "object",
  20769. "properties": {
  20770. "command": {
  20771. "anyOf": [
  20772. {
  20773. "type": "string",
  20774. "enum": [
  20775. "session.list",
  20776. "session.new",
  20777. "session.share",
  20778. "session.interrupt",
  20779. "session.compact",
  20780. "session.page.up",
  20781. "session.page.down",
  20782. "session.line.up",
  20783. "session.line.down",
  20784. "session.half.page.up",
  20785. "session.half.page.down",
  20786. "session.first",
  20787. "session.last",
  20788. "prompt.clear",
  20789. "prompt.submit",
  20790. "agent.cycle"
  20791. ]
  20792. },
  20793. {
  20794. "type": "string"
  20795. }
  20796. ]
  20797. }
  20798. },
  20799. "required": ["command"],
  20800. "additionalProperties": false
  20801. }
  20802. },
  20803. "required": ["id", "type", "properties"],
  20804. "additionalProperties": false
  20805. },
  20806. "Event.tui.toast.show": {
  20807. "type": "object",
  20808. "properties": {
  20809. "id": {
  20810. "type": "string",
  20811. "pattern": "^evt_"
  20812. },
  20813. "type": {
  20814. "type": "string",
  20815. "enum": ["tui.toast.show"]
  20816. },
  20817. "properties": {
  20818. "type": "object",
  20819. "properties": {
  20820. "title": {
  20821. "type": "string"
  20822. },
  20823. "message": {
  20824. "type": "string"
  20825. },
  20826. "variant": {
  20827. "type": "string",
  20828. "enum": ["info", "success", "warning", "error"]
  20829. },
  20830. "duration": {
  20831. "type": "integer",
  20832. "exclusiveMinimum": 0
  20833. }
  20834. },
  20835. "required": ["message", "variant"],
  20836. "additionalProperties": false
  20837. }
  20838. },
  20839. "required": ["id", "type", "properties"],
  20840. "additionalProperties": false
  20841. },
  20842. "Event.tui.session.select": {
  20843. "type": "object",
  20844. "properties": {
  20845. "id": {
  20846. "type": "string",
  20847. "pattern": "^evt_"
  20848. },
  20849. "type": {
  20850. "type": "string",
  20851. "enum": ["tui.session.select"]
  20852. },
  20853. "properties": {
  20854. "type": "object",
  20855. "properties": {
  20856. "sessionID": {
  20857. "type": "string",
  20858. "pattern": "^ses",
  20859. "description": "Session ID to navigate to"
  20860. }
  20861. },
  20862. "required": ["sessionID"],
  20863. "additionalProperties": false
  20864. }
  20865. },
  20866. "required": ["id", "type", "properties"],
  20867. "additionalProperties": false
  20868. },
  20869. "MoveSessionDestination": {
  20870. "type": "object",
  20871. "properties": {
  20872. "directory": {
  20873. "type": "string"
  20874. }
  20875. },
  20876. "required": ["directory"],
  20877. "additionalProperties": false
  20878. },
  20879. "ModelV2Info": {
  20880. "type": "object",
  20881. "properties": {
  20882. "id": {
  20883. "type": "string"
  20884. },
  20885. "providerID": {
  20886. "type": "string"
  20887. },
  20888. "family": {
  20889. "type": "string"
  20890. },
  20891. "name": {
  20892. "type": "string"
  20893. },
  20894. "api": {
  20895. "anyOf": [
  20896. {
  20897. "type": "object",
  20898. "properties": {
  20899. "id": {
  20900. "type": "string"
  20901. },
  20902. "type": {
  20903. "type": "string",
  20904. "enum": ["aisdk"]
  20905. },
  20906. "package": {
  20907. "type": "string"
  20908. },
  20909. "url": {
  20910. "type": "string"
  20911. },
  20912. "settings": {
  20913. "type": "object"
  20914. }
  20915. },
  20916. "required": ["id", "type", "package"],
  20917. "additionalProperties": false
  20918. },
  20919. {
  20920. "type": "object",
  20921. "properties": {
  20922. "id": {
  20923. "type": "string"
  20924. },
  20925. "type": {
  20926. "type": "string",
  20927. "enum": ["native"]
  20928. },
  20929. "url": {
  20930. "type": "string"
  20931. },
  20932. "settings": {
  20933. "type": "object"
  20934. }
  20935. },
  20936. "required": ["id", "type", "settings"],
  20937. "additionalProperties": false
  20938. }
  20939. ]
  20940. },
  20941. "capabilities": {
  20942. "type": "object",
  20943. "properties": {
  20944. "tools": {
  20945. "type": "boolean"
  20946. },
  20947. "input": {
  20948. "type": "array",
  20949. "items": {
  20950. "type": "string"
  20951. }
  20952. },
  20953. "output": {
  20954. "type": "array",
  20955. "items": {
  20956. "type": "string"
  20957. }
  20958. }
  20959. },
  20960. "required": ["tools", "input", "output"],
  20961. "additionalProperties": false
  20962. },
  20963. "request": {
  20964. "type": "object",
  20965. "properties": {
  20966. "headers": {
  20967. "type": "object",
  20968. "additionalProperties": {
  20969. "type": "string"
  20970. }
  20971. },
  20972. "body": {
  20973. "type": "object"
  20974. },
  20975. "generation": {
  20976. "type": "object",
  20977. "properties": {
  20978. "maxTokens": {
  20979. "anyOf": [
  20980. {
  20981. "type": "number"
  20982. },
  20983. {
  20984. "type": "string",
  20985. "enum": ["NaN"]
  20986. },
  20987. {
  20988. "type": "string",
  20989. "enum": ["Infinity"]
  20990. },
  20991. {
  20992. "type": "string",
  20993. "enum": ["-Infinity"]
  20994. },
  20995. {
  20996. "type": "string",
  20997. "enum": ["Infinity", "-Infinity", "NaN"]
  20998. }
  20999. ]
  21000. },
  21001. "temperature": {
  21002. "anyOf": [
  21003. {
  21004. "type": "number"
  21005. },
  21006. {
  21007. "type": "string",
  21008. "enum": ["NaN"]
  21009. },
  21010. {
  21011. "type": "string",
  21012. "enum": ["Infinity"]
  21013. },
  21014. {
  21015. "type": "string",
  21016. "enum": ["-Infinity"]
  21017. },
  21018. {
  21019. "type": "string",
  21020. "enum": ["Infinity", "-Infinity", "NaN"]
  21021. }
  21022. ]
  21023. },
  21024. "topP": {
  21025. "anyOf": [
  21026. {
  21027. "type": "number"
  21028. },
  21029. {
  21030. "type": "string",
  21031. "enum": ["NaN"]
  21032. },
  21033. {
  21034. "type": "string",
  21035. "enum": ["Infinity"]
  21036. },
  21037. {
  21038. "type": "string",
  21039. "enum": ["-Infinity"]
  21040. },
  21041. {
  21042. "type": "string",
  21043. "enum": ["Infinity", "-Infinity", "NaN"]
  21044. }
  21045. ]
  21046. },
  21047. "topK": {
  21048. "anyOf": [
  21049. {
  21050. "type": "number"
  21051. },
  21052. {
  21053. "type": "string",
  21054. "enum": ["NaN"]
  21055. },
  21056. {
  21057. "type": "string",
  21058. "enum": ["Infinity"]
  21059. },
  21060. {
  21061. "type": "string",
  21062. "enum": ["-Infinity"]
  21063. },
  21064. {
  21065. "type": "string",
  21066. "enum": ["Infinity", "-Infinity", "NaN"]
  21067. }
  21068. ]
  21069. },
  21070. "frequencyPenalty": {
  21071. "anyOf": [
  21072. {
  21073. "type": "number"
  21074. },
  21075. {
  21076. "type": "string",
  21077. "enum": ["NaN"]
  21078. },
  21079. {
  21080. "type": "string",
  21081. "enum": ["Infinity"]
  21082. },
  21083. {
  21084. "type": "string",
  21085. "enum": ["-Infinity"]
  21086. },
  21087. {
  21088. "type": "string",
  21089. "enum": ["Infinity", "-Infinity", "NaN"]
  21090. }
  21091. ]
  21092. },
  21093. "presencePenalty": {
  21094. "anyOf": [
  21095. {
  21096. "type": "number"
  21097. },
  21098. {
  21099. "type": "string",
  21100. "enum": ["NaN"]
  21101. },
  21102. {
  21103. "type": "string",
  21104. "enum": ["Infinity"]
  21105. },
  21106. {
  21107. "type": "string",
  21108. "enum": ["-Infinity"]
  21109. },
  21110. {
  21111. "type": "string",
  21112. "enum": ["Infinity", "-Infinity", "NaN"]
  21113. }
  21114. ]
  21115. },
  21116. "seed": {
  21117. "anyOf": [
  21118. {
  21119. "type": "number"
  21120. },
  21121. {
  21122. "type": "string",
  21123. "enum": ["NaN"]
  21124. },
  21125. {
  21126. "type": "string",
  21127. "enum": ["Infinity"]
  21128. },
  21129. {
  21130. "type": "string",
  21131. "enum": ["-Infinity"]
  21132. },
  21133. {
  21134. "type": "string",
  21135. "enum": ["Infinity", "-Infinity", "NaN"]
  21136. }
  21137. ]
  21138. },
  21139. "stop": {
  21140. "type": "array",
  21141. "items": {
  21142. "type": "string"
  21143. }
  21144. }
  21145. },
  21146. "additionalProperties": false
  21147. },
  21148. "options": {
  21149. "type": "object"
  21150. },
  21151. "variant": {
  21152. "type": "string"
  21153. }
  21154. },
  21155. "required": ["headers", "body"],
  21156. "additionalProperties": false
  21157. },
  21158. "variants": {
  21159. "type": "array",
  21160. "items": {
  21161. "type": "object",
  21162. "properties": {
  21163. "id": {
  21164. "type": "string"
  21165. },
  21166. "headers": {
  21167. "type": "object",
  21168. "additionalProperties": {
  21169. "type": "string"
  21170. }
  21171. },
  21172. "body": {
  21173. "type": "object"
  21174. },
  21175. "generation": {
  21176. "type": "object",
  21177. "properties": {
  21178. "maxTokens": {
  21179. "anyOf": [
  21180. {
  21181. "type": "number"
  21182. },
  21183. {
  21184. "type": "string",
  21185. "enum": ["NaN"]
  21186. },
  21187. {
  21188. "type": "string",
  21189. "enum": ["Infinity"]
  21190. },
  21191. {
  21192. "type": "string",
  21193. "enum": ["-Infinity"]
  21194. },
  21195. {
  21196. "type": "string",
  21197. "enum": ["Infinity", "-Infinity", "NaN"]
  21198. }
  21199. ]
  21200. },
  21201. "temperature": {
  21202. "anyOf": [
  21203. {
  21204. "type": "number"
  21205. },
  21206. {
  21207. "type": "string",
  21208. "enum": ["NaN"]
  21209. },
  21210. {
  21211. "type": "string",
  21212. "enum": ["Infinity"]
  21213. },
  21214. {
  21215. "type": "string",
  21216. "enum": ["-Infinity"]
  21217. },
  21218. {
  21219. "type": "string",
  21220. "enum": ["Infinity", "-Infinity", "NaN"]
  21221. }
  21222. ]
  21223. },
  21224. "topP": {
  21225. "anyOf": [
  21226. {
  21227. "type": "number"
  21228. },
  21229. {
  21230. "type": "string",
  21231. "enum": ["NaN"]
  21232. },
  21233. {
  21234. "type": "string",
  21235. "enum": ["Infinity"]
  21236. },
  21237. {
  21238. "type": "string",
  21239. "enum": ["-Infinity"]
  21240. },
  21241. {
  21242. "type": "string",
  21243. "enum": ["Infinity", "-Infinity", "NaN"]
  21244. }
  21245. ]
  21246. },
  21247. "topK": {
  21248. "anyOf": [
  21249. {
  21250. "type": "number"
  21251. },
  21252. {
  21253. "type": "string",
  21254. "enum": ["NaN"]
  21255. },
  21256. {
  21257. "type": "string",
  21258. "enum": ["Infinity"]
  21259. },
  21260. {
  21261. "type": "string",
  21262. "enum": ["-Infinity"]
  21263. },
  21264. {
  21265. "type": "string",
  21266. "enum": ["Infinity", "-Infinity", "NaN"]
  21267. }
  21268. ]
  21269. },
  21270. "frequencyPenalty": {
  21271. "anyOf": [
  21272. {
  21273. "type": "number"
  21274. },
  21275. {
  21276. "type": "string",
  21277. "enum": ["NaN"]
  21278. },
  21279. {
  21280. "type": "string",
  21281. "enum": ["Infinity"]
  21282. },
  21283. {
  21284. "type": "string",
  21285. "enum": ["-Infinity"]
  21286. },
  21287. {
  21288. "type": "string",
  21289. "enum": ["Infinity", "-Infinity", "NaN"]
  21290. }
  21291. ]
  21292. },
  21293. "presencePenalty": {
  21294. "anyOf": [
  21295. {
  21296. "type": "number"
  21297. },
  21298. {
  21299. "type": "string",
  21300. "enum": ["NaN"]
  21301. },
  21302. {
  21303. "type": "string",
  21304. "enum": ["Infinity"]
  21305. },
  21306. {
  21307. "type": "string",
  21308. "enum": ["-Infinity"]
  21309. },
  21310. {
  21311. "type": "string",
  21312. "enum": ["Infinity", "-Infinity", "NaN"]
  21313. }
  21314. ]
  21315. },
  21316. "seed": {
  21317. "anyOf": [
  21318. {
  21319. "type": "number"
  21320. },
  21321. {
  21322. "type": "string",
  21323. "enum": ["NaN"]
  21324. },
  21325. {
  21326. "type": "string",
  21327. "enum": ["Infinity"]
  21328. },
  21329. {
  21330. "type": "string",
  21331. "enum": ["-Infinity"]
  21332. },
  21333. {
  21334. "type": "string",
  21335. "enum": ["Infinity", "-Infinity", "NaN"]
  21336. }
  21337. ]
  21338. },
  21339. "stop": {
  21340. "type": "array",
  21341. "items": {
  21342. "type": "string"
  21343. }
  21344. }
  21345. },
  21346. "additionalProperties": false
  21347. },
  21348. "options": {
  21349. "type": "object"
  21350. }
  21351. },
  21352. "required": ["id", "headers", "body"],
  21353. "additionalProperties": false
  21354. }
  21355. },
  21356. "time": {
  21357. "type": "object",
  21358. "properties": {
  21359. "released": {
  21360. "anyOf": [
  21361. {
  21362. "type": "number"
  21363. },
  21364. {
  21365. "type": "string",
  21366. "enum": ["NaN"]
  21367. },
  21368. {
  21369. "type": "string",
  21370. "enum": ["Infinity"]
  21371. },
  21372. {
  21373. "type": "string",
  21374. "enum": ["-Infinity"]
  21375. },
  21376. {
  21377. "type": "string",
  21378. "enum": ["Infinity", "-Infinity", "NaN"]
  21379. }
  21380. ]
  21381. }
  21382. },
  21383. "required": ["released"],
  21384. "additionalProperties": false
  21385. },
  21386. "cost": {
  21387. "type": "array",
  21388. "items": {
  21389. "type": "object",
  21390. "properties": {
  21391. "tier": {
  21392. "type": "object",
  21393. "properties": {
  21394. "type": {
  21395. "type": "string",
  21396. "enum": ["context"]
  21397. },
  21398. "size": {
  21399. "type": "integer"
  21400. }
  21401. },
  21402. "required": ["type", "size"],
  21403. "additionalProperties": false
  21404. },
  21405. "input": {
  21406. "type": "number"
  21407. },
  21408. "output": {
  21409. "type": "number"
  21410. },
  21411. "cache": {
  21412. "type": "object",
  21413. "properties": {
  21414. "read": {
  21415. "type": "number"
  21416. },
  21417. "write": {
  21418. "type": "number"
  21419. }
  21420. },
  21421. "required": ["read", "write"],
  21422. "additionalProperties": false
  21423. }
  21424. },
  21425. "required": ["input", "output", "cache"],
  21426. "additionalProperties": false
  21427. }
  21428. },
  21429. "status": {
  21430. "type": "string",
  21431. "enum": ["alpha", "beta", "deprecated", "active"]
  21432. },
  21433. "enabled": {
  21434. "type": "boolean"
  21435. },
  21436. "limit": {
  21437. "type": "object",
  21438. "properties": {
  21439. "context": {
  21440. "type": "integer"
  21441. },
  21442. "input": {
  21443. "type": "integer"
  21444. },
  21445. "output": {
  21446. "type": "integer"
  21447. }
  21448. },
  21449. "required": ["context", "output"],
  21450. "additionalProperties": false
  21451. }
  21452. },
  21453. "required": [
  21454. "id",
  21455. "providerID",
  21456. "name",
  21457. "api",
  21458. "capabilities",
  21459. "request",
  21460. "variants",
  21461. "time",
  21462. "cost",
  21463. "status",
  21464. "enabled",
  21465. "limit"
  21466. ],
  21467. "additionalProperties": false
  21468. },
  21469. "LocationRef": {
  21470. "type": "object",
  21471. "properties": {
  21472. "directory": {
  21473. "type": "string"
  21474. },
  21475. "workspaceID": {
  21476. "type": "string",
  21477. "pattern": "^wrk"
  21478. }
  21479. },
  21480. "required": ["directory"],
  21481. "additionalProperties": false
  21482. },
  21483. "PromptSource": {
  21484. "type": "object",
  21485. "properties": {
  21486. "start": {
  21487. "type": "number"
  21488. },
  21489. "end": {
  21490. "type": "number"
  21491. },
  21492. "text": {
  21493. "type": "string"
  21494. }
  21495. },
  21496. "required": ["start", "end", "text"],
  21497. "additionalProperties": false
  21498. },
  21499. "PromptFileAttachment": {
  21500. "type": "object",
  21501. "properties": {
  21502. "uri": {
  21503. "type": "string"
  21504. },
  21505. "mime": {
  21506. "type": "string"
  21507. },
  21508. "name": {
  21509. "type": "string"
  21510. },
  21511. "description": {
  21512. "type": "string"
  21513. },
  21514. "source": {
  21515. "$ref": "#/components/schemas/PromptSource"
  21516. }
  21517. },
  21518. "required": ["uri", "mime"],
  21519. "additionalProperties": false
  21520. },
  21521. "PromptAgentAttachment": {
  21522. "type": "object",
  21523. "properties": {
  21524. "name": {
  21525. "type": "string"
  21526. },
  21527. "source": {
  21528. "$ref": "#/components/schemas/PromptSource"
  21529. }
  21530. },
  21531. "required": ["name"],
  21532. "additionalProperties": false
  21533. },
  21534. "SessionErrorUnknown": {
  21535. "type": "object",
  21536. "properties": {
  21537. "type": {
  21538. "type": "string",
  21539. "enum": ["unknown"]
  21540. },
  21541. "message": {
  21542. "type": "string"
  21543. }
  21544. },
  21545. "required": ["type", "message"],
  21546. "additionalProperties": false
  21547. },
  21548. "ToolTextContent": {
  21549. "type": "object",
  21550. "properties": {
  21551. "type": {
  21552. "type": "string",
  21553. "enum": ["text"]
  21554. },
  21555. "text": {
  21556. "type": "string"
  21557. }
  21558. },
  21559. "required": ["type", "text"],
  21560. "additionalProperties": false
  21561. },
  21562. "ToolFileContent": {
  21563. "type": "object",
  21564. "properties": {
  21565. "type": {
  21566. "type": "string",
  21567. "enum": ["file"]
  21568. },
  21569. "uri": {
  21570. "type": "string"
  21571. },
  21572. "mime": {
  21573. "type": "string"
  21574. },
  21575. "name": {
  21576. "type": "string"
  21577. }
  21578. },
  21579. "required": ["type", "uri", "mime"],
  21580. "additionalProperties": false
  21581. },
  21582. "SessionNextRetry_error": {
  21583. "type": "object",
  21584. "properties": {
  21585. "message": {
  21586. "type": "string"
  21587. },
  21588. "statusCode": {
  21589. "type": "number"
  21590. },
  21591. "isRetryable": {
  21592. "type": "boolean"
  21593. },
  21594. "responseHeaders": {
  21595. "type": "object",
  21596. "additionalProperties": {
  21597. "type": "string"
  21598. }
  21599. },
  21600. "responseBody": {
  21601. "type": "string"
  21602. },
  21603. "metadata": {
  21604. "type": "object",
  21605. "additionalProperties": {
  21606. "type": "string"
  21607. }
  21608. }
  21609. },
  21610. "required": ["message", "isRetryable"],
  21611. "additionalProperties": false
  21612. },
  21613. "AuthOAuthCredential": {
  21614. "type": "object",
  21615. "properties": {
  21616. "type": {
  21617. "type": "string",
  21618. "enum": ["oauth"]
  21619. },
  21620. "refresh": {
  21621. "type": "string"
  21622. },
  21623. "access": {
  21624. "type": "string"
  21625. },
  21626. "expires": {
  21627. "type": "integer",
  21628. "minimum": 0
  21629. }
  21630. },
  21631. "required": ["type", "refresh", "access", "expires"],
  21632. "additionalProperties": false
  21633. },
  21634. "AuthApiKeyCredential": {
  21635. "type": "object",
  21636. "properties": {
  21637. "type": {
  21638. "type": "string",
  21639. "enum": ["api"]
  21640. },
  21641. "key": {
  21642. "type": "string"
  21643. },
  21644. "metadata": {
  21645. "type": "object",
  21646. "additionalProperties": {
  21647. "type": "string"
  21648. }
  21649. }
  21650. },
  21651. "required": ["type", "key"],
  21652. "additionalProperties": false
  21653. },
  21654. "AuthCredential": {
  21655. "anyOf": [
  21656. {
  21657. "$ref": "#/components/schemas/AuthOAuthCredential"
  21658. },
  21659. {
  21660. "$ref": "#/components/schemas/AuthApiKeyCredential"
  21661. }
  21662. ]
  21663. },
  21664. "AuthInfo": {
  21665. "type": "object",
  21666. "properties": {
  21667. "id": {
  21668. "type": "string"
  21669. },
  21670. "serviceID": {
  21671. "type": "string"
  21672. },
  21673. "description": {
  21674. "type": "string"
  21675. },
  21676. "credential": {
  21677. "$ref": "#/components/schemas/AuthCredential"
  21678. }
  21679. },
  21680. "required": ["id", "serviceID", "description", "credential"],
  21681. "additionalProperties": false
  21682. },
  21683. "PermissionV2Source": {
  21684. "type": "object",
  21685. "properties": {
  21686. "type": {
  21687. "type": "string",
  21688. "enum": ["tool"]
  21689. },
  21690. "messageID": {
  21691. "type": "string"
  21692. },
  21693. "callID": {
  21694. "type": "string"
  21695. }
  21696. },
  21697. "required": ["type", "messageID", "callID"],
  21698. "additionalProperties": false
  21699. },
  21700. "PermissionV2Reply": {
  21701. "type": "string",
  21702. "enum": ["once", "always", "reject"]
  21703. },
  21704. "QuestionV2Option": {
  21705. "type": "object",
  21706. "properties": {
  21707. "label": {
  21708. "type": "string",
  21709. "description": "Display text (1-5 words, concise)"
  21710. },
  21711. "description": {
  21712. "type": "string",
  21713. "description": "Explanation of choice"
  21714. }
  21715. },
  21716. "required": ["label", "description"],
  21717. "additionalProperties": false
  21718. },
  21719. "QuestionV2Info": {
  21720. "type": "object",
  21721. "properties": {
  21722. "question": {
  21723. "type": "string",
  21724. "description": "Complete question"
  21725. },
  21726. "header": {
  21727. "type": "string",
  21728. "description": "Very short label (max 30 chars)"
  21729. },
  21730. "options": {
  21731. "type": "array",
  21732. "items": {
  21733. "$ref": "#/components/schemas/QuestionV2Option"
  21734. },
  21735. "description": "Available choices"
  21736. },
  21737. "multiple": {
  21738. "type": "boolean"
  21739. },
  21740. "custom": {
  21741. "type": "boolean"
  21742. }
  21743. },
  21744. "required": ["question", "header", "options"],
  21745. "additionalProperties": false
  21746. },
  21747. "QuestionV2Tool": {
  21748. "type": "object",
  21749. "properties": {
  21750. "messageID": {
  21751. "type": "string"
  21752. },
  21753. "callID": {
  21754. "type": "string"
  21755. }
  21756. },
  21757. "required": ["messageID", "callID"],
  21758. "additionalProperties": false
  21759. },
  21760. "QuestionV2Answer": {
  21761. "type": "array",
  21762. "items": {
  21763. "type": "string"
  21764. }
  21765. },
  21766. "EventServerInstanceDisposed": {
  21767. "type": "object",
  21768. "properties": {
  21769. "id": {
  21770. "type": "string"
  21771. },
  21772. "type": {
  21773. "type": "string",
  21774. "enum": ["server.instance.disposed"]
  21775. },
  21776. "properties": {
  21777. "type": "object",
  21778. "properties": {
  21779. "directory": {
  21780. "type": "string"
  21781. }
  21782. },
  21783. "required": ["directory"],
  21784. "additionalProperties": false
  21785. }
  21786. },
  21787. "required": ["id", "type", "properties"],
  21788. "additionalProperties": false
  21789. },
  21790. "SyncEventSessionCreated": {
  21791. "type": "object",
  21792. "properties": {
  21793. "type": {
  21794. "type": "string",
  21795. "enum": ["sync"]
  21796. },
  21797. "id": {
  21798. "type": "string",
  21799. "pattern": "^evt_"
  21800. },
  21801. "syncEvent": {
  21802. "type": "object",
  21803. "properties": {
  21804. "type": {
  21805. "type": "string",
  21806. "enum": ["session.created.1"]
  21807. },
  21808. "id": {
  21809. "type": "string",
  21810. "pattern": "^evt_"
  21811. },
  21812. "seq": {
  21813. "type": "number"
  21814. },
  21815. "aggregateID": {
  21816. "type": "string"
  21817. },
  21818. "data": {
  21819. "type": "object",
  21820. "properties": {
  21821. "sessionID": {
  21822. "type": "string",
  21823. "pattern": "^ses"
  21824. },
  21825. "info": {
  21826. "$ref": "#/components/schemas/Session"
  21827. }
  21828. },
  21829. "required": ["sessionID", "info"],
  21830. "additionalProperties": false
  21831. }
  21832. },
  21833. "required": ["type", "id", "seq", "aggregateID", "data"],
  21834. "additionalProperties": false
  21835. }
  21836. },
  21837. "required": ["type", "id", "syncEvent"],
  21838. "additionalProperties": false
  21839. },
  21840. "SyncEventSessionUpdated": {
  21841. "type": "object",
  21842. "properties": {
  21843. "type": {
  21844. "type": "string",
  21845. "enum": ["sync"]
  21846. },
  21847. "id": {
  21848. "type": "string",
  21849. "pattern": "^evt_"
  21850. },
  21851. "syncEvent": {
  21852. "type": "object",
  21853. "properties": {
  21854. "type": {
  21855. "type": "string",
  21856. "enum": ["session.updated.1"]
  21857. },
  21858. "id": {
  21859. "type": "string",
  21860. "pattern": "^evt_"
  21861. },
  21862. "seq": {
  21863. "type": "number"
  21864. },
  21865. "aggregateID": {
  21866. "type": "string"
  21867. },
  21868. "data": {
  21869. "type": "object",
  21870. "properties": {
  21871. "sessionID": {
  21872. "type": "string",
  21873. "pattern": "^ses"
  21874. },
  21875. "info": {
  21876. "$ref": "#/components/schemas/Session"
  21877. }
  21878. },
  21879. "required": ["sessionID", "info"],
  21880. "additionalProperties": false
  21881. }
  21882. },
  21883. "required": ["type", "id", "seq", "aggregateID", "data"],
  21884. "additionalProperties": false
  21885. }
  21886. },
  21887. "required": ["type", "id", "syncEvent"],
  21888. "additionalProperties": false
  21889. },
  21890. "SyncEventSessionDeleted": {
  21891. "type": "object",
  21892. "properties": {
  21893. "type": {
  21894. "type": "string",
  21895. "enum": ["sync"]
  21896. },
  21897. "id": {
  21898. "type": "string",
  21899. "pattern": "^evt_"
  21900. },
  21901. "syncEvent": {
  21902. "type": "object",
  21903. "properties": {
  21904. "type": {
  21905. "type": "string",
  21906. "enum": ["session.deleted.1"]
  21907. },
  21908. "id": {
  21909. "type": "string",
  21910. "pattern": "^evt_"
  21911. },
  21912. "seq": {
  21913. "type": "number"
  21914. },
  21915. "aggregateID": {
  21916. "type": "string"
  21917. },
  21918. "data": {
  21919. "type": "object",
  21920. "properties": {
  21921. "sessionID": {
  21922. "type": "string",
  21923. "pattern": "^ses"
  21924. },
  21925. "info": {
  21926. "$ref": "#/components/schemas/Session"
  21927. }
  21928. },
  21929. "required": ["sessionID", "info"],
  21930. "additionalProperties": false
  21931. }
  21932. },
  21933. "required": ["type", "id", "seq", "aggregateID", "data"],
  21934. "additionalProperties": false
  21935. }
  21936. },
  21937. "required": ["type", "id", "syncEvent"],
  21938. "additionalProperties": false
  21939. },
  21940. "SyncEventMessageUpdated": {
  21941. "type": "object",
  21942. "properties": {
  21943. "type": {
  21944. "type": "string",
  21945. "enum": ["sync"]
  21946. },
  21947. "id": {
  21948. "type": "string",
  21949. "pattern": "^evt_"
  21950. },
  21951. "syncEvent": {
  21952. "type": "object",
  21953. "properties": {
  21954. "type": {
  21955. "type": "string",
  21956. "enum": ["message.updated.1"]
  21957. },
  21958. "id": {
  21959. "type": "string",
  21960. "pattern": "^evt_"
  21961. },
  21962. "seq": {
  21963. "type": "number"
  21964. },
  21965. "aggregateID": {
  21966. "type": "string"
  21967. },
  21968. "data": {
  21969. "type": "object",
  21970. "properties": {
  21971. "sessionID": {
  21972. "type": "string",
  21973. "pattern": "^ses"
  21974. },
  21975. "info": {
  21976. "$ref": "#/components/schemas/Message"
  21977. }
  21978. },
  21979. "required": ["sessionID", "info"],
  21980. "additionalProperties": false
  21981. }
  21982. },
  21983. "required": ["type", "id", "seq", "aggregateID", "data"],
  21984. "additionalProperties": false
  21985. }
  21986. },
  21987. "required": ["type", "id", "syncEvent"],
  21988. "additionalProperties": false
  21989. },
  21990. "SyncEventMessageRemoved": {
  21991. "type": "object",
  21992. "properties": {
  21993. "type": {
  21994. "type": "string",
  21995. "enum": ["sync"]
  21996. },
  21997. "id": {
  21998. "type": "string",
  21999. "pattern": "^evt_"
  22000. },
  22001. "syncEvent": {
  22002. "type": "object",
  22003. "properties": {
  22004. "type": {
  22005. "type": "string",
  22006. "enum": ["message.removed.1"]
  22007. },
  22008. "id": {
  22009. "type": "string",
  22010. "pattern": "^evt_"
  22011. },
  22012. "seq": {
  22013. "type": "number"
  22014. },
  22015. "aggregateID": {
  22016. "type": "string"
  22017. },
  22018. "data": {
  22019. "type": "object",
  22020. "properties": {
  22021. "sessionID": {
  22022. "type": "string",
  22023. "pattern": "^ses"
  22024. },
  22025. "messageID": {
  22026. "type": "string",
  22027. "pattern": "^msg"
  22028. }
  22029. },
  22030. "required": ["sessionID", "messageID"],
  22031. "additionalProperties": false
  22032. }
  22033. },
  22034. "required": ["type", "id", "seq", "aggregateID", "data"],
  22035. "additionalProperties": false
  22036. }
  22037. },
  22038. "required": ["type", "id", "syncEvent"],
  22039. "additionalProperties": false
  22040. },
  22041. "SyncEventMessagePartUpdated": {
  22042. "type": "object",
  22043. "properties": {
  22044. "type": {
  22045. "type": "string",
  22046. "enum": ["sync"]
  22047. },
  22048. "id": {
  22049. "type": "string",
  22050. "pattern": "^evt_"
  22051. },
  22052. "syncEvent": {
  22053. "type": "object",
  22054. "properties": {
  22055. "type": {
  22056. "type": "string",
  22057. "enum": ["message.part.updated.1"]
  22058. },
  22059. "id": {
  22060. "type": "string",
  22061. "pattern": "^evt_"
  22062. },
  22063. "seq": {
  22064. "type": "number"
  22065. },
  22066. "aggregateID": {
  22067. "type": "string"
  22068. },
  22069. "data": {
  22070. "type": "object",
  22071. "properties": {
  22072. "sessionID": {
  22073. "type": "string",
  22074. "pattern": "^ses"
  22075. },
  22076. "part": {
  22077. "$ref": "#/components/schemas/Part"
  22078. },
  22079. "time": {
  22080. "type": "number"
  22081. }
  22082. },
  22083. "required": ["sessionID", "part", "time"],
  22084. "additionalProperties": false
  22085. }
  22086. },
  22087. "required": ["type", "id", "seq", "aggregateID", "data"],
  22088. "additionalProperties": false
  22089. }
  22090. },
  22091. "required": ["type", "id", "syncEvent"],
  22092. "additionalProperties": false
  22093. },
  22094. "SyncEventMessagePartRemoved": {
  22095. "type": "object",
  22096. "properties": {
  22097. "type": {
  22098. "type": "string",
  22099. "enum": ["sync"]
  22100. },
  22101. "id": {
  22102. "type": "string",
  22103. "pattern": "^evt_"
  22104. },
  22105. "syncEvent": {
  22106. "type": "object",
  22107. "properties": {
  22108. "type": {
  22109. "type": "string",
  22110. "enum": ["message.part.removed.1"]
  22111. },
  22112. "id": {
  22113. "type": "string",
  22114. "pattern": "^evt_"
  22115. },
  22116. "seq": {
  22117. "type": "number"
  22118. },
  22119. "aggregateID": {
  22120. "type": "string"
  22121. },
  22122. "data": {
  22123. "type": "object",
  22124. "properties": {
  22125. "sessionID": {
  22126. "type": "string",
  22127. "pattern": "^ses"
  22128. },
  22129. "messageID": {
  22130. "type": "string",
  22131. "pattern": "^msg"
  22132. },
  22133. "partID": {
  22134. "type": "string",
  22135. "pattern": "^prt"
  22136. }
  22137. },
  22138. "required": ["sessionID", "messageID", "partID"],
  22139. "additionalProperties": false
  22140. }
  22141. },
  22142. "required": ["type", "id", "seq", "aggregateID", "data"],
  22143. "additionalProperties": false
  22144. }
  22145. },
  22146. "required": ["type", "id", "syncEvent"],
  22147. "additionalProperties": false
  22148. },
  22149. "SyncEventSessionNextAgentSwitched": {
  22150. "type": "object",
  22151. "properties": {
  22152. "type": {
  22153. "type": "string",
  22154. "enum": ["sync"]
  22155. },
  22156. "id": {
  22157. "type": "string",
  22158. "pattern": "^evt_"
  22159. },
  22160. "syncEvent": {
  22161. "type": "object",
  22162. "properties": {
  22163. "type": {
  22164. "type": "string",
  22165. "enum": ["session.next.agent.switched.1"]
  22166. },
  22167. "id": {
  22168. "type": "string",
  22169. "pattern": "^evt_"
  22170. },
  22171. "seq": {
  22172. "type": "number"
  22173. },
  22174. "aggregateID": {
  22175. "type": "string"
  22176. },
  22177. "data": {
  22178. "type": "object",
  22179. "properties": {
  22180. "timestamp": {
  22181. "type": "number"
  22182. },
  22183. "sessionID": {
  22184. "type": "string",
  22185. "pattern": "^ses"
  22186. },
  22187. "messageID": {
  22188. "type": "string",
  22189. "pattern": "^msg_"
  22190. },
  22191. "agent": {
  22192. "type": "string"
  22193. }
  22194. },
  22195. "required": ["timestamp", "sessionID", "messageID", "agent"],
  22196. "additionalProperties": false
  22197. }
  22198. },
  22199. "required": ["type", "id", "seq", "aggregateID", "data"],
  22200. "additionalProperties": false
  22201. }
  22202. },
  22203. "required": ["type", "id", "syncEvent"],
  22204. "additionalProperties": false
  22205. },
  22206. "SyncEventSessionNextModelSwitched": {
  22207. "type": "object",
  22208. "properties": {
  22209. "type": {
  22210. "type": "string",
  22211. "enum": ["sync"]
  22212. },
  22213. "id": {
  22214. "type": "string",
  22215. "pattern": "^evt_"
  22216. },
  22217. "syncEvent": {
  22218. "type": "object",
  22219. "properties": {
  22220. "type": {
  22221. "type": "string",
  22222. "enum": ["session.next.model.switched.1"]
  22223. },
  22224. "id": {
  22225. "type": "string",
  22226. "pattern": "^evt_"
  22227. },
  22228. "seq": {
  22229. "type": "number"
  22230. },
  22231. "aggregateID": {
  22232. "type": "string"
  22233. },
  22234. "data": {
  22235. "type": "object",
  22236. "properties": {
  22237. "timestamp": {
  22238. "type": "number"
  22239. },
  22240. "sessionID": {
  22241. "type": "string",
  22242. "pattern": "^ses"
  22243. },
  22244. "messageID": {
  22245. "type": "string",
  22246. "pattern": "^msg_"
  22247. },
  22248. "model": {
  22249. "type": "object",
  22250. "properties": {
  22251. "id": {
  22252. "type": "string"
  22253. },
  22254. "providerID": {
  22255. "type": "string"
  22256. },
  22257. "variant": {
  22258. "type": "string"
  22259. }
  22260. },
  22261. "required": ["id", "providerID"],
  22262. "additionalProperties": false
  22263. }
  22264. },
  22265. "required": ["timestamp", "sessionID", "messageID", "model"],
  22266. "additionalProperties": false
  22267. }
  22268. },
  22269. "required": ["type", "id", "seq", "aggregateID", "data"],
  22270. "additionalProperties": false
  22271. }
  22272. },
  22273. "required": ["type", "id", "syncEvent"],
  22274. "additionalProperties": false
  22275. },
  22276. "SyncEventSessionNextMoved": {
  22277. "type": "object",
  22278. "properties": {
  22279. "type": {
  22280. "type": "string",
  22281. "enum": ["sync"]
  22282. },
  22283. "id": {
  22284. "type": "string",
  22285. "pattern": "^evt_"
  22286. },
  22287. "syncEvent": {
  22288. "type": "object",
  22289. "properties": {
  22290. "type": {
  22291. "type": "string",
  22292. "enum": ["session.next.moved.1"]
  22293. },
  22294. "id": {
  22295. "type": "string",
  22296. "pattern": "^evt_"
  22297. },
  22298. "seq": {
  22299. "type": "number"
  22300. },
  22301. "aggregateID": {
  22302. "type": "string"
  22303. },
  22304. "data": {
  22305. "type": "object",
  22306. "properties": {
  22307. "timestamp": {
  22308. "type": "number"
  22309. },
  22310. "sessionID": {
  22311. "type": "string",
  22312. "pattern": "^ses"
  22313. },
  22314. "location": {
  22315. "$ref": "#/components/schemas/LocationRef"
  22316. },
  22317. "subdirectory": {
  22318. "type": "string"
  22319. }
  22320. },
  22321. "required": ["timestamp", "sessionID", "location"],
  22322. "additionalProperties": false
  22323. }
  22324. },
  22325. "required": ["type", "id", "seq", "aggregateID", "data"],
  22326. "additionalProperties": false
  22327. }
  22328. },
  22329. "required": ["type", "id", "syncEvent"],
  22330. "additionalProperties": false
  22331. },
  22332. "SyncEventSessionNextPrompted": {
  22333. "type": "object",
  22334. "properties": {
  22335. "type": {
  22336. "type": "string",
  22337. "enum": ["sync"]
  22338. },
  22339. "id": {
  22340. "type": "string",
  22341. "pattern": "^evt_"
  22342. },
  22343. "syncEvent": {
  22344. "type": "object",
  22345. "properties": {
  22346. "type": {
  22347. "type": "string",
  22348. "enum": ["session.next.prompted.1"]
  22349. },
  22350. "id": {
  22351. "type": "string",
  22352. "pattern": "^evt_"
  22353. },
  22354. "seq": {
  22355. "type": "number"
  22356. },
  22357. "aggregateID": {
  22358. "type": "string"
  22359. },
  22360. "data": {
  22361. "type": "object",
  22362. "properties": {
  22363. "timestamp": {
  22364. "type": "number"
  22365. },
  22366. "sessionID": {
  22367. "type": "string",
  22368. "pattern": "^ses"
  22369. },
  22370. "messageID": {
  22371. "type": "string",
  22372. "pattern": "^msg_"
  22373. },
  22374. "prompt": {
  22375. "$ref": "#/components/schemas/Prompt"
  22376. },
  22377. "delivery": {
  22378. "type": "string",
  22379. "enum": ["steer", "queue"]
  22380. }
  22381. },
  22382. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22383. "additionalProperties": false
  22384. }
  22385. },
  22386. "required": ["type", "id", "seq", "aggregateID", "data"],
  22387. "additionalProperties": false
  22388. }
  22389. },
  22390. "required": ["type", "id", "syncEvent"],
  22391. "additionalProperties": false
  22392. },
  22393. "SyncEventSessionNextPromptAdmitted": {
  22394. "type": "object",
  22395. "properties": {
  22396. "type": {
  22397. "type": "string",
  22398. "enum": ["sync"]
  22399. },
  22400. "id": {
  22401. "type": "string",
  22402. "pattern": "^evt_"
  22403. },
  22404. "syncEvent": {
  22405. "type": "object",
  22406. "properties": {
  22407. "type": {
  22408. "type": "string",
  22409. "enum": ["session.next.prompt.admitted.1"]
  22410. },
  22411. "id": {
  22412. "type": "string",
  22413. "pattern": "^evt_"
  22414. },
  22415. "seq": {
  22416. "type": "number"
  22417. },
  22418. "aggregateID": {
  22419. "type": "string"
  22420. },
  22421. "data": {
  22422. "type": "object",
  22423. "properties": {
  22424. "timestamp": {
  22425. "type": "number"
  22426. },
  22427. "sessionID": {
  22428. "type": "string",
  22429. "pattern": "^ses"
  22430. },
  22431. "messageID": {
  22432. "type": "string",
  22433. "pattern": "^msg_"
  22434. },
  22435. "prompt": {
  22436. "$ref": "#/components/schemas/Prompt"
  22437. },
  22438. "delivery": {
  22439. "type": "string",
  22440. "enum": ["steer", "queue"]
  22441. }
  22442. },
  22443. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22444. "additionalProperties": false
  22445. }
  22446. },
  22447. "required": ["type", "id", "seq", "aggregateID", "data"],
  22448. "additionalProperties": false
  22449. }
  22450. },
  22451. "required": ["type", "id", "syncEvent"],
  22452. "additionalProperties": false
  22453. },
  22454. "SyncEventSessionNextPromptPromoted": {
  22455. "type": "object",
  22456. "properties": {
  22457. "type": {
  22458. "type": "string",
  22459. "enum": ["sync"]
  22460. },
  22461. "id": {
  22462. "type": "string",
  22463. "pattern": "^evt_"
  22464. },
  22465. "syncEvent": {
  22466. "type": "object",
  22467. "properties": {
  22468. "type": {
  22469. "type": "string",
  22470. "enum": ["session.next.prompt.promoted.1"]
  22471. },
  22472. "id": {
  22473. "type": "string",
  22474. "pattern": "^evt_"
  22475. },
  22476. "seq": {
  22477. "type": "number"
  22478. },
  22479. "aggregateID": {
  22480. "type": "string"
  22481. },
  22482. "data": {
  22483. "type": "object",
  22484. "properties": {
  22485. "timestamp": {
  22486. "type": "number"
  22487. },
  22488. "sessionID": {
  22489. "type": "string",
  22490. "pattern": "^ses"
  22491. },
  22492. "messageID": {
  22493. "type": "string",
  22494. "pattern": "^msg_"
  22495. },
  22496. "prompt": {
  22497. "$ref": "#/components/schemas/Prompt"
  22498. },
  22499. "timeCreated": {
  22500. "type": "number"
  22501. }
  22502. },
  22503. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  22504. "additionalProperties": false
  22505. }
  22506. },
  22507. "required": ["type", "id", "seq", "aggregateID", "data"],
  22508. "additionalProperties": false
  22509. }
  22510. },
  22511. "required": ["type", "id", "syncEvent"],
  22512. "additionalProperties": false
  22513. },
  22514. "SyncEventSessionNextInterruptRequested": {
  22515. "type": "object",
  22516. "properties": {
  22517. "type": {
  22518. "type": "string",
  22519. "enum": ["sync"]
  22520. },
  22521. "id": {
  22522. "type": "string",
  22523. "pattern": "^evt_"
  22524. },
  22525. "syncEvent": {
  22526. "type": "object",
  22527. "properties": {
  22528. "type": {
  22529. "type": "string",
  22530. "enum": ["session.next.interrupt.requested.1"]
  22531. },
  22532. "id": {
  22533. "type": "string",
  22534. "pattern": "^evt_"
  22535. },
  22536. "seq": {
  22537. "type": "number"
  22538. },
  22539. "aggregateID": {
  22540. "type": "string"
  22541. },
  22542. "data": {
  22543. "type": "object",
  22544. "properties": {
  22545. "timestamp": {
  22546. "type": "number"
  22547. },
  22548. "sessionID": {
  22549. "type": "string",
  22550. "pattern": "^ses"
  22551. }
  22552. },
  22553. "required": ["timestamp", "sessionID"],
  22554. "additionalProperties": false
  22555. }
  22556. },
  22557. "required": ["type", "id", "seq", "aggregateID", "data"],
  22558. "additionalProperties": false
  22559. }
  22560. },
  22561. "required": ["type", "id", "syncEvent"],
  22562. "additionalProperties": false
  22563. },
  22564. "SyncEventSessionNextContextUpdated": {
  22565. "type": "object",
  22566. "properties": {
  22567. "type": {
  22568. "type": "string",
  22569. "enum": ["sync"]
  22570. },
  22571. "id": {
  22572. "type": "string",
  22573. "pattern": "^evt_"
  22574. },
  22575. "syncEvent": {
  22576. "type": "object",
  22577. "properties": {
  22578. "type": {
  22579. "type": "string",
  22580. "enum": ["session.next.context.updated.1"]
  22581. },
  22582. "id": {
  22583. "type": "string",
  22584. "pattern": "^evt_"
  22585. },
  22586. "seq": {
  22587. "type": "number"
  22588. },
  22589. "aggregateID": {
  22590. "type": "string"
  22591. },
  22592. "data": {
  22593. "type": "object",
  22594. "properties": {
  22595. "timestamp": {
  22596. "type": "number"
  22597. },
  22598. "sessionID": {
  22599. "type": "string",
  22600. "pattern": "^ses"
  22601. },
  22602. "messageID": {
  22603. "type": "string",
  22604. "pattern": "^msg_"
  22605. },
  22606. "text": {
  22607. "type": "string"
  22608. }
  22609. },
  22610. "required": ["timestamp", "sessionID", "messageID", "text"],
  22611. "additionalProperties": false
  22612. }
  22613. },
  22614. "required": ["type", "id", "seq", "aggregateID", "data"],
  22615. "additionalProperties": false
  22616. }
  22617. },
  22618. "required": ["type", "id", "syncEvent"],
  22619. "additionalProperties": false
  22620. },
  22621. "SyncEventSessionNextSynthetic": {
  22622. "type": "object",
  22623. "properties": {
  22624. "type": {
  22625. "type": "string",
  22626. "enum": ["sync"]
  22627. },
  22628. "id": {
  22629. "type": "string",
  22630. "pattern": "^evt_"
  22631. },
  22632. "syncEvent": {
  22633. "type": "object",
  22634. "properties": {
  22635. "type": {
  22636. "type": "string",
  22637. "enum": ["session.next.synthetic.1"]
  22638. },
  22639. "id": {
  22640. "type": "string",
  22641. "pattern": "^evt_"
  22642. },
  22643. "seq": {
  22644. "type": "number"
  22645. },
  22646. "aggregateID": {
  22647. "type": "string"
  22648. },
  22649. "data": {
  22650. "type": "object",
  22651. "properties": {
  22652. "timestamp": {
  22653. "type": "number"
  22654. },
  22655. "sessionID": {
  22656. "type": "string",
  22657. "pattern": "^ses"
  22658. },
  22659. "messageID": {
  22660. "type": "string",
  22661. "pattern": "^msg_"
  22662. },
  22663. "text": {
  22664. "type": "string"
  22665. }
  22666. },
  22667. "required": ["timestamp", "sessionID", "messageID", "text"],
  22668. "additionalProperties": false
  22669. }
  22670. },
  22671. "required": ["type", "id", "seq", "aggregateID", "data"],
  22672. "additionalProperties": false
  22673. }
  22674. },
  22675. "required": ["type", "id", "syncEvent"],
  22676. "additionalProperties": false
  22677. },
  22678. "SyncEventSessionNextShellStarted": {
  22679. "type": "object",
  22680. "properties": {
  22681. "type": {
  22682. "type": "string",
  22683. "enum": ["sync"]
  22684. },
  22685. "id": {
  22686. "type": "string",
  22687. "pattern": "^evt_"
  22688. },
  22689. "syncEvent": {
  22690. "type": "object",
  22691. "properties": {
  22692. "type": {
  22693. "type": "string",
  22694. "enum": ["session.next.shell.started.1"]
  22695. },
  22696. "id": {
  22697. "type": "string",
  22698. "pattern": "^evt_"
  22699. },
  22700. "seq": {
  22701. "type": "number"
  22702. },
  22703. "aggregateID": {
  22704. "type": "string"
  22705. },
  22706. "data": {
  22707. "type": "object",
  22708. "properties": {
  22709. "timestamp": {
  22710. "type": "number"
  22711. },
  22712. "sessionID": {
  22713. "type": "string",
  22714. "pattern": "^ses"
  22715. },
  22716. "messageID": {
  22717. "type": "string",
  22718. "pattern": "^msg_"
  22719. },
  22720. "callID": {
  22721. "type": "string"
  22722. },
  22723. "command": {
  22724. "type": "string"
  22725. }
  22726. },
  22727. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  22728. "additionalProperties": false
  22729. }
  22730. },
  22731. "required": ["type", "id", "seq", "aggregateID", "data"],
  22732. "additionalProperties": false
  22733. }
  22734. },
  22735. "required": ["type", "id", "syncEvent"],
  22736. "additionalProperties": false
  22737. },
  22738. "SyncEventSessionNextShellEnded": {
  22739. "type": "object",
  22740. "properties": {
  22741. "type": {
  22742. "type": "string",
  22743. "enum": ["sync"]
  22744. },
  22745. "id": {
  22746. "type": "string",
  22747. "pattern": "^evt_"
  22748. },
  22749. "syncEvent": {
  22750. "type": "object",
  22751. "properties": {
  22752. "type": {
  22753. "type": "string",
  22754. "enum": ["session.next.shell.ended.1"]
  22755. },
  22756. "id": {
  22757. "type": "string",
  22758. "pattern": "^evt_"
  22759. },
  22760. "seq": {
  22761. "type": "number"
  22762. },
  22763. "aggregateID": {
  22764. "type": "string"
  22765. },
  22766. "data": {
  22767. "type": "object",
  22768. "properties": {
  22769. "timestamp": {
  22770. "type": "number"
  22771. },
  22772. "sessionID": {
  22773. "type": "string",
  22774. "pattern": "^ses"
  22775. },
  22776. "callID": {
  22777. "type": "string"
  22778. },
  22779. "output": {
  22780. "type": "string"
  22781. }
  22782. },
  22783. "required": ["timestamp", "sessionID", "callID", "output"],
  22784. "additionalProperties": false
  22785. }
  22786. },
  22787. "required": ["type", "id", "seq", "aggregateID", "data"],
  22788. "additionalProperties": false
  22789. }
  22790. },
  22791. "required": ["type", "id", "syncEvent"],
  22792. "additionalProperties": false
  22793. },
  22794. "SyncEventSessionNextStepStarted": {
  22795. "type": "object",
  22796. "properties": {
  22797. "type": {
  22798. "type": "string",
  22799. "enum": ["sync"]
  22800. },
  22801. "id": {
  22802. "type": "string",
  22803. "pattern": "^evt_"
  22804. },
  22805. "syncEvent": {
  22806. "type": "object",
  22807. "properties": {
  22808. "type": {
  22809. "type": "string",
  22810. "enum": ["session.next.step.started.1"]
  22811. },
  22812. "id": {
  22813. "type": "string",
  22814. "pattern": "^evt_"
  22815. },
  22816. "seq": {
  22817. "type": "number"
  22818. },
  22819. "aggregateID": {
  22820. "type": "string"
  22821. },
  22822. "data": {
  22823. "type": "object",
  22824. "properties": {
  22825. "timestamp": {
  22826. "type": "number"
  22827. },
  22828. "sessionID": {
  22829. "type": "string",
  22830. "pattern": "^ses"
  22831. },
  22832. "assistantMessageID": {
  22833. "type": "string",
  22834. "pattern": "^msg_"
  22835. },
  22836. "agent": {
  22837. "type": "string"
  22838. },
  22839. "model": {
  22840. "type": "object",
  22841. "properties": {
  22842. "id": {
  22843. "type": "string"
  22844. },
  22845. "providerID": {
  22846. "type": "string"
  22847. },
  22848. "variant": {
  22849. "type": "string"
  22850. }
  22851. },
  22852. "required": ["id", "providerID"],
  22853. "additionalProperties": false
  22854. },
  22855. "snapshot": {
  22856. "type": "string"
  22857. }
  22858. },
  22859. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  22860. "additionalProperties": false
  22861. }
  22862. },
  22863. "required": ["type", "id", "seq", "aggregateID", "data"],
  22864. "additionalProperties": false
  22865. }
  22866. },
  22867. "required": ["type", "id", "syncEvent"],
  22868. "additionalProperties": false
  22869. },
  22870. "SyncEventSessionNextStepEnded": {
  22871. "type": "object",
  22872. "properties": {
  22873. "type": {
  22874. "type": "string",
  22875. "enum": ["sync"]
  22876. },
  22877. "id": {
  22878. "type": "string",
  22879. "pattern": "^evt_"
  22880. },
  22881. "syncEvent": {
  22882. "type": "object",
  22883. "properties": {
  22884. "type": {
  22885. "type": "string",
  22886. "enum": ["session.next.step.ended.2"]
  22887. },
  22888. "id": {
  22889. "type": "string",
  22890. "pattern": "^evt_"
  22891. },
  22892. "seq": {
  22893. "type": "number"
  22894. },
  22895. "aggregateID": {
  22896. "type": "string"
  22897. },
  22898. "data": {
  22899. "type": "object",
  22900. "properties": {
  22901. "timestamp": {
  22902. "type": "number"
  22903. },
  22904. "sessionID": {
  22905. "type": "string",
  22906. "pattern": "^ses"
  22907. },
  22908. "assistantMessageID": {
  22909. "type": "string",
  22910. "pattern": "^msg_"
  22911. },
  22912. "finish": {
  22913. "type": "string"
  22914. },
  22915. "cost": {
  22916. "type": "number"
  22917. },
  22918. "tokens": {
  22919. "type": "object",
  22920. "properties": {
  22921. "input": {
  22922. "type": "number"
  22923. },
  22924. "output": {
  22925. "type": "number"
  22926. },
  22927. "reasoning": {
  22928. "type": "number"
  22929. },
  22930. "cache": {
  22931. "type": "object",
  22932. "properties": {
  22933. "read": {
  22934. "type": "number"
  22935. },
  22936. "write": {
  22937. "type": "number"
  22938. }
  22939. },
  22940. "required": ["read", "write"],
  22941. "additionalProperties": false
  22942. }
  22943. },
  22944. "required": ["input", "output", "reasoning", "cache"],
  22945. "additionalProperties": false
  22946. },
  22947. "snapshot": {
  22948. "type": "string"
  22949. }
  22950. },
  22951. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  22952. "additionalProperties": false
  22953. }
  22954. },
  22955. "required": ["type", "id", "seq", "aggregateID", "data"],
  22956. "additionalProperties": false
  22957. }
  22958. },
  22959. "required": ["type", "id", "syncEvent"],
  22960. "additionalProperties": false
  22961. },
  22962. "SyncEventSessionNextStepFailed": {
  22963. "type": "object",
  22964. "properties": {
  22965. "type": {
  22966. "type": "string",
  22967. "enum": ["sync"]
  22968. },
  22969. "id": {
  22970. "type": "string",
  22971. "pattern": "^evt_"
  22972. },
  22973. "syncEvent": {
  22974. "type": "object",
  22975. "properties": {
  22976. "type": {
  22977. "type": "string",
  22978. "enum": ["session.next.step.failed.2"]
  22979. },
  22980. "id": {
  22981. "type": "string",
  22982. "pattern": "^evt_"
  22983. },
  22984. "seq": {
  22985. "type": "number"
  22986. },
  22987. "aggregateID": {
  22988. "type": "string"
  22989. },
  22990. "data": {
  22991. "type": "object",
  22992. "properties": {
  22993. "timestamp": {
  22994. "type": "number"
  22995. },
  22996. "sessionID": {
  22997. "type": "string",
  22998. "pattern": "^ses"
  22999. },
  23000. "assistantMessageID": {
  23001. "type": "string",
  23002. "pattern": "^msg_"
  23003. },
  23004. "error": {
  23005. "$ref": "#/components/schemas/SessionErrorUnknown"
  23006. }
  23007. },
  23008. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  23009. "additionalProperties": false
  23010. }
  23011. },
  23012. "required": ["type", "id", "seq", "aggregateID", "data"],
  23013. "additionalProperties": false
  23014. }
  23015. },
  23016. "required": ["type", "id", "syncEvent"],
  23017. "additionalProperties": false
  23018. },
  23019. "SyncEventSessionNextTextStarted": {
  23020. "type": "object",
  23021. "properties": {
  23022. "type": {
  23023. "type": "string",
  23024. "enum": ["sync"]
  23025. },
  23026. "id": {
  23027. "type": "string",
  23028. "pattern": "^evt_"
  23029. },
  23030. "syncEvent": {
  23031. "type": "object",
  23032. "properties": {
  23033. "type": {
  23034. "type": "string",
  23035. "enum": ["session.next.text.started.1"]
  23036. },
  23037. "id": {
  23038. "type": "string",
  23039. "pattern": "^evt_"
  23040. },
  23041. "seq": {
  23042. "type": "number"
  23043. },
  23044. "aggregateID": {
  23045. "type": "string"
  23046. },
  23047. "data": {
  23048. "type": "object",
  23049. "properties": {
  23050. "timestamp": {
  23051. "type": "number"
  23052. },
  23053. "sessionID": {
  23054. "type": "string",
  23055. "pattern": "^ses"
  23056. },
  23057. "assistantMessageID": {
  23058. "type": "string",
  23059. "pattern": "^msg_"
  23060. },
  23061. "textID": {
  23062. "type": "string"
  23063. }
  23064. },
  23065. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  23066. "additionalProperties": false
  23067. }
  23068. },
  23069. "required": ["type", "id", "seq", "aggregateID", "data"],
  23070. "additionalProperties": false
  23071. }
  23072. },
  23073. "required": ["type", "id", "syncEvent"],
  23074. "additionalProperties": false
  23075. },
  23076. "SyncEventSessionNextTextEnded": {
  23077. "type": "object",
  23078. "properties": {
  23079. "type": {
  23080. "type": "string",
  23081. "enum": ["sync"]
  23082. },
  23083. "id": {
  23084. "type": "string",
  23085. "pattern": "^evt_"
  23086. },
  23087. "syncEvent": {
  23088. "type": "object",
  23089. "properties": {
  23090. "type": {
  23091. "type": "string",
  23092. "enum": ["session.next.text.ended.1"]
  23093. },
  23094. "id": {
  23095. "type": "string",
  23096. "pattern": "^evt_"
  23097. },
  23098. "seq": {
  23099. "type": "number"
  23100. },
  23101. "aggregateID": {
  23102. "type": "string"
  23103. },
  23104. "data": {
  23105. "type": "object",
  23106. "properties": {
  23107. "timestamp": {
  23108. "type": "number"
  23109. },
  23110. "sessionID": {
  23111. "type": "string",
  23112. "pattern": "^ses"
  23113. },
  23114. "assistantMessageID": {
  23115. "type": "string",
  23116. "pattern": "^msg_"
  23117. },
  23118. "textID": {
  23119. "type": "string"
  23120. },
  23121. "text": {
  23122. "type": "string"
  23123. }
  23124. },
  23125. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  23126. "additionalProperties": false
  23127. }
  23128. },
  23129. "required": ["type", "id", "seq", "aggregateID", "data"],
  23130. "additionalProperties": false
  23131. }
  23132. },
  23133. "required": ["type", "id", "syncEvent"],
  23134. "additionalProperties": false
  23135. },
  23136. "SyncEventSessionNextReasoningStarted": {
  23137. "type": "object",
  23138. "properties": {
  23139. "type": {
  23140. "type": "string",
  23141. "enum": ["sync"]
  23142. },
  23143. "id": {
  23144. "type": "string",
  23145. "pattern": "^evt_"
  23146. },
  23147. "syncEvent": {
  23148. "type": "object",
  23149. "properties": {
  23150. "type": {
  23151. "type": "string",
  23152. "enum": ["session.next.reasoning.started.1"]
  23153. },
  23154. "id": {
  23155. "type": "string",
  23156. "pattern": "^evt_"
  23157. },
  23158. "seq": {
  23159. "type": "number"
  23160. },
  23161. "aggregateID": {
  23162. "type": "string"
  23163. },
  23164. "data": {
  23165. "type": "object",
  23166. "properties": {
  23167. "timestamp": {
  23168. "type": "number"
  23169. },
  23170. "sessionID": {
  23171. "type": "string",
  23172. "pattern": "^ses"
  23173. },
  23174. "assistantMessageID": {
  23175. "type": "string",
  23176. "pattern": "^msg_"
  23177. },
  23178. "reasoningID": {
  23179. "type": "string"
  23180. },
  23181. "providerMetadata": {
  23182. "type": "object",
  23183. "additionalProperties": {
  23184. "type": "object"
  23185. }
  23186. }
  23187. },
  23188. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  23189. "additionalProperties": false
  23190. }
  23191. },
  23192. "required": ["type", "id", "seq", "aggregateID", "data"],
  23193. "additionalProperties": false
  23194. }
  23195. },
  23196. "required": ["type", "id", "syncEvent"],
  23197. "additionalProperties": false
  23198. },
  23199. "SyncEventSessionNextReasoningEnded": {
  23200. "type": "object",
  23201. "properties": {
  23202. "type": {
  23203. "type": "string",
  23204. "enum": ["sync"]
  23205. },
  23206. "id": {
  23207. "type": "string",
  23208. "pattern": "^evt_"
  23209. },
  23210. "syncEvent": {
  23211. "type": "object",
  23212. "properties": {
  23213. "type": {
  23214. "type": "string",
  23215. "enum": ["session.next.reasoning.ended.1"]
  23216. },
  23217. "id": {
  23218. "type": "string",
  23219. "pattern": "^evt_"
  23220. },
  23221. "seq": {
  23222. "type": "number"
  23223. },
  23224. "aggregateID": {
  23225. "type": "string"
  23226. },
  23227. "data": {
  23228. "type": "object",
  23229. "properties": {
  23230. "timestamp": {
  23231. "type": "number"
  23232. },
  23233. "sessionID": {
  23234. "type": "string",
  23235. "pattern": "^ses"
  23236. },
  23237. "assistantMessageID": {
  23238. "type": "string",
  23239. "pattern": "^msg_"
  23240. },
  23241. "reasoningID": {
  23242. "type": "string"
  23243. },
  23244. "text": {
  23245. "type": "string"
  23246. },
  23247. "providerMetadata": {
  23248. "type": "object",
  23249. "additionalProperties": {
  23250. "type": "object"
  23251. }
  23252. }
  23253. },
  23254. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  23255. "additionalProperties": false
  23256. }
  23257. },
  23258. "required": ["type", "id", "seq", "aggregateID", "data"],
  23259. "additionalProperties": false
  23260. }
  23261. },
  23262. "required": ["type", "id", "syncEvent"],
  23263. "additionalProperties": false
  23264. },
  23265. "SyncEventSessionNextToolInputStarted": {
  23266. "type": "object",
  23267. "properties": {
  23268. "type": {
  23269. "type": "string",
  23270. "enum": ["sync"]
  23271. },
  23272. "id": {
  23273. "type": "string",
  23274. "pattern": "^evt_"
  23275. },
  23276. "syncEvent": {
  23277. "type": "object",
  23278. "properties": {
  23279. "type": {
  23280. "type": "string",
  23281. "enum": ["session.next.tool.input.started.1"]
  23282. },
  23283. "id": {
  23284. "type": "string",
  23285. "pattern": "^evt_"
  23286. },
  23287. "seq": {
  23288. "type": "number"
  23289. },
  23290. "aggregateID": {
  23291. "type": "string"
  23292. },
  23293. "data": {
  23294. "type": "object",
  23295. "properties": {
  23296. "timestamp": {
  23297. "type": "number"
  23298. },
  23299. "sessionID": {
  23300. "type": "string",
  23301. "pattern": "^ses"
  23302. },
  23303. "assistantMessageID": {
  23304. "type": "string",
  23305. "pattern": "^msg_"
  23306. },
  23307. "callID": {
  23308. "type": "string"
  23309. },
  23310. "name": {
  23311. "type": "string"
  23312. }
  23313. },
  23314. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  23315. "additionalProperties": false
  23316. }
  23317. },
  23318. "required": ["type", "id", "seq", "aggregateID", "data"],
  23319. "additionalProperties": false
  23320. }
  23321. },
  23322. "required": ["type", "id", "syncEvent"],
  23323. "additionalProperties": false
  23324. },
  23325. "SyncEventSessionNextToolInputEnded": {
  23326. "type": "object",
  23327. "properties": {
  23328. "type": {
  23329. "type": "string",
  23330. "enum": ["sync"]
  23331. },
  23332. "id": {
  23333. "type": "string",
  23334. "pattern": "^evt_"
  23335. },
  23336. "syncEvent": {
  23337. "type": "object",
  23338. "properties": {
  23339. "type": {
  23340. "type": "string",
  23341. "enum": ["session.next.tool.input.ended.1"]
  23342. },
  23343. "id": {
  23344. "type": "string",
  23345. "pattern": "^evt_"
  23346. },
  23347. "seq": {
  23348. "type": "number"
  23349. },
  23350. "aggregateID": {
  23351. "type": "string"
  23352. },
  23353. "data": {
  23354. "type": "object",
  23355. "properties": {
  23356. "timestamp": {
  23357. "type": "number"
  23358. },
  23359. "sessionID": {
  23360. "type": "string",
  23361. "pattern": "^ses"
  23362. },
  23363. "assistantMessageID": {
  23364. "type": "string",
  23365. "pattern": "^msg_"
  23366. },
  23367. "callID": {
  23368. "type": "string"
  23369. },
  23370. "text": {
  23371. "type": "string"
  23372. }
  23373. },
  23374. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  23375. "additionalProperties": false
  23376. }
  23377. },
  23378. "required": ["type", "id", "seq", "aggregateID", "data"],
  23379. "additionalProperties": false
  23380. }
  23381. },
  23382. "required": ["type", "id", "syncEvent"],
  23383. "additionalProperties": false
  23384. },
  23385. "SyncEventSessionNextToolCalled": {
  23386. "type": "object",
  23387. "properties": {
  23388. "type": {
  23389. "type": "string",
  23390. "enum": ["sync"]
  23391. },
  23392. "id": {
  23393. "type": "string",
  23394. "pattern": "^evt_"
  23395. },
  23396. "syncEvent": {
  23397. "type": "object",
  23398. "properties": {
  23399. "type": {
  23400. "type": "string",
  23401. "enum": ["session.next.tool.called.1"]
  23402. },
  23403. "id": {
  23404. "type": "string",
  23405. "pattern": "^evt_"
  23406. },
  23407. "seq": {
  23408. "type": "number"
  23409. },
  23410. "aggregateID": {
  23411. "type": "string"
  23412. },
  23413. "data": {
  23414. "type": "object",
  23415. "properties": {
  23416. "timestamp": {
  23417. "type": "number"
  23418. },
  23419. "sessionID": {
  23420. "type": "string",
  23421. "pattern": "^ses"
  23422. },
  23423. "assistantMessageID": {
  23424. "type": "string",
  23425. "pattern": "^msg_"
  23426. },
  23427. "callID": {
  23428. "type": "string"
  23429. },
  23430. "tool": {
  23431. "type": "string"
  23432. },
  23433. "input": {
  23434. "type": "object"
  23435. },
  23436. "provider": {
  23437. "type": "object",
  23438. "properties": {
  23439. "executed": {
  23440. "type": "boolean"
  23441. },
  23442. "metadata": {
  23443. "type": "object",
  23444. "additionalProperties": {
  23445. "type": "object"
  23446. }
  23447. }
  23448. },
  23449. "required": ["executed"],
  23450. "additionalProperties": false
  23451. }
  23452. },
  23453. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  23454. "additionalProperties": false
  23455. }
  23456. },
  23457. "required": ["type", "id", "seq", "aggregateID", "data"],
  23458. "additionalProperties": false
  23459. }
  23460. },
  23461. "required": ["type", "id", "syncEvent"],
  23462. "additionalProperties": false
  23463. },
  23464. "SyncEventSessionNextToolProgress": {
  23465. "type": "object",
  23466. "properties": {
  23467. "type": {
  23468. "type": "string",
  23469. "enum": ["sync"]
  23470. },
  23471. "id": {
  23472. "type": "string",
  23473. "pattern": "^evt_"
  23474. },
  23475. "syncEvent": {
  23476. "type": "object",
  23477. "properties": {
  23478. "type": {
  23479. "type": "string",
  23480. "enum": ["session.next.tool.progress.1"]
  23481. },
  23482. "id": {
  23483. "type": "string",
  23484. "pattern": "^evt_"
  23485. },
  23486. "seq": {
  23487. "type": "number"
  23488. },
  23489. "aggregateID": {
  23490. "type": "string"
  23491. },
  23492. "data": {
  23493. "type": "object",
  23494. "properties": {
  23495. "timestamp": {
  23496. "type": "number"
  23497. },
  23498. "sessionID": {
  23499. "type": "string",
  23500. "pattern": "^ses"
  23501. },
  23502. "assistantMessageID": {
  23503. "type": "string",
  23504. "pattern": "^msg_"
  23505. },
  23506. "callID": {
  23507. "type": "string"
  23508. },
  23509. "structured": {
  23510. "type": "object"
  23511. },
  23512. "content": {
  23513. "type": "array",
  23514. "items": {
  23515. "anyOf": [
  23516. {
  23517. "$ref": "#/components/schemas/ToolTextContent"
  23518. },
  23519. {
  23520. "$ref": "#/components/schemas/ToolFileContent"
  23521. }
  23522. ]
  23523. }
  23524. }
  23525. },
  23526. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  23527. "additionalProperties": false
  23528. }
  23529. },
  23530. "required": ["type", "id", "seq", "aggregateID", "data"],
  23531. "additionalProperties": false
  23532. }
  23533. },
  23534. "required": ["type", "id", "syncEvent"],
  23535. "additionalProperties": false
  23536. },
  23537. "SyncEventSessionNextToolSuccess": {
  23538. "type": "object",
  23539. "properties": {
  23540. "type": {
  23541. "type": "string",
  23542. "enum": ["sync"]
  23543. },
  23544. "id": {
  23545. "type": "string",
  23546. "pattern": "^evt_"
  23547. },
  23548. "syncEvent": {
  23549. "type": "object",
  23550. "properties": {
  23551. "type": {
  23552. "type": "string",
  23553. "enum": ["session.next.tool.success.1"]
  23554. },
  23555. "id": {
  23556. "type": "string",
  23557. "pattern": "^evt_"
  23558. },
  23559. "seq": {
  23560. "type": "number"
  23561. },
  23562. "aggregateID": {
  23563. "type": "string"
  23564. },
  23565. "data": {
  23566. "type": "object",
  23567. "properties": {
  23568. "timestamp": {
  23569. "type": "number"
  23570. },
  23571. "sessionID": {
  23572. "type": "string",
  23573. "pattern": "^ses"
  23574. },
  23575. "assistantMessageID": {
  23576. "type": "string",
  23577. "pattern": "^msg_"
  23578. },
  23579. "callID": {
  23580. "type": "string"
  23581. },
  23582. "structured": {
  23583. "type": "object"
  23584. },
  23585. "content": {
  23586. "type": "array",
  23587. "items": {
  23588. "anyOf": [
  23589. {
  23590. "$ref": "#/components/schemas/ToolTextContent"
  23591. },
  23592. {
  23593. "$ref": "#/components/schemas/ToolFileContent"
  23594. }
  23595. ]
  23596. }
  23597. },
  23598. "outputPaths": {
  23599. "type": "array",
  23600. "items": {
  23601. "type": "string"
  23602. }
  23603. },
  23604. "result": {},
  23605. "provider": {
  23606. "type": "object",
  23607. "properties": {
  23608. "executed": {
  23609. "type": "boolean"
  23610. },
  23611. "metadata": {
  23612. "type": "object",
  23613. "additionalProperties": {
  23614. "type": "object"
  23615. }
  23616. }
  23617. },
  23618. "required": ["executed"],
  23619. "additionalProperties": false
  23620. }
  23621. },
  23622. "required": [
  23623. "timestamp",
  23624. "sessionID",
  23625. "assistantMessageID",
  23626. "callID",
  23627. "structured",
  23628. "content",
  23629. "provider"
  23630. ],
  23631. "additionalProperties": false
  23632. }
  23633. },
  23634. "required": ["type", "id", "seq", "aggregateID", "data"],
  23635. "additionalProperties": false
  23636. }
  23637. },
  23638. "required": ["type", "id", "syncEvent"],
  23639. "additionalProperties": false
  23640. },
  23641. "SyncEventSessionNextToolFailed": {
  23642. "type": "object",
  23643. "properties": {
  23644. "type": {
  23645. "type": "string",
  23646. "enum": ["sync"]
  23647. },
  23648. "id": {
  23649. "type": "string",
  23650. "pattern": "^evt_"
  23651. },
  23652. "syncEvent": {
  23653. "type": "object",
  23654. "properties": {
  23655. "type": {
  23656. "type": "string",
  23657. "enum": ["session.next.tool.failed.1"]
  23658. },
  23659. "id": {
  23660. "type": "string",
  23661. "pattern": "^evt_"
  23662. },
  23663. "seq": {
  23664. "type": "number"
  23665. },
  23666. "aggregateID": {
  23667. "type": "string"
  23668. },
  23669. "data": {
  23670. "type": "object",
  23671. "properties": {
  23672. "timestamp": {
  23673. "type": "number"
  23674. },
  23675. "sessionID": {
  23676. "type": "string",
  23677. "pattern": "^ses"
  23678. },
  23679. "assistantMessageID": {
  23680. "type": "string",
  23681. "pattern": "^msg_"
  23682. },
  23683. "callID": {
  23684. "type": "string"
  23685. },
  23686. "error": {
  23687. "$ref": "#/components/schemas/SessionErrorUnknown"
  23688. },
  23689. "result": {},
  23690. "provider": {
  23691. "type": "object",
  23692. "properties": {
  23693. "executed": {
  23694. "type": "boolean"
  23695. },
  23696. "metadata": {
  23697. "type": "object",
  23698. "additionalProperties": {
  23699. "type": "object"
  23700. }
  23701. }
  23702. },
  23703. "required": ["executed"],
  23704. "additionalProperties": false
  23705. }
  23706. },
  23707. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  23708. "additionalProperties": false
  23709. }
  23710. },
  23711. "required": ["type", "id", "seq", "aggregateID", "data"],
  23712. "additionalProperties": false
  23713. }
  23714. },
  23715. "required": ["type", "id", "syncEvent"],
  23716. "additionalProperties": false
  23717. },
  23718. "SyncEventSessionNextRetried": {
  23719. "type": "object",
  23720. "properties": {
  23721. "type": {
  23722. "type": "string",
  23723. "enum": ["sync"]
  23724. },
  23725. "id": {
  23726. "type": "string",
  23727. "pattern": "^evt_"
  23728. },
  23729. "syncEvent": {
  23730. "type": "object",
  23731. "properties": {
  23732. "type": {
  23733. "type": "string",
  23734. "enum": ["session.next.retried.1"]
  23735. },
  23736. "id": {
  23737. "type": "string",
  23738. "pattern": "^evt_"
  23739. },
  23740. "seq": {
  23741. "type": "number"
  23742. },
  23743. "aggregateID": {
  23744. "type": "string"
  23745. },
  23746. "data": {
  23747. "type": "object",
  23748. "properties": {
  23749. "timestamp": {
  23750. "type": "number"
  23751. },
  23752. "sessionID": {
  23753. "type": "string",
  23754. "pattern": "^ses"
  23755. },
  23756. "attempt": {
  23757. "type": "number"
  23758. },
  23759. "error": {
  23760. "$ref": "#/components/schemas/SessionNextRetry_error"
  23761. }
  23762. },
  23763. "required": ["timestamp", "sessionID", "attempt", "error"],
  23764. "additionalProperties": false
  23765. }
  23766. },
  23767. "required": ["type", "id", "seq", "aggregateID", "data"],
  23768. "additionalProperties": false
  23769. }
  23770. },
  23771. "required": ["type", "id", "syncEvent"],
  23772. "additionalProperties": false
  23773. },
  23774. "SyncEventSessionNextCompactionStarted": {
  23775. "type": "object",
  23776. "properties": {
  23777. "type": {
  23778. "type": "string",
  23779. "enum": ["sync"]
  23780. },
  23781. "id": {
  23782. "type": "string",
  23783. "pattern": "^evt_"
  23784. },
  23785. "syncEvent": {
  23786. "type": "object",
  23787. "properties": {
  23788. "type": {
  23789. "type": "string",
  23790. "enum": ["session.next.compaction.started.1"]
  23791. },
  23792. "id": {
  23793. "type": "string",
  23794. "pattern": "^evt_"
  23795. },
  23796. "seq": {
  23797. "type": "number"
  23798. },
  23799. "aggregateID": {
  23800. "type": "string"
  23801. },
  23802. "data": {
  23803. "type": "object",
  23804. "properties": {
  23805. "timestamp": {
  23806. "type": "number"
  23807. },
  23808. "sessionID": {
  23809. "type": "string",
  23810. "pattern": "^ses"
  23811. },
  23812. "messageID": {
  23813. "type": "string",
  23814. "pattern": "^msg_"
  23815. },
  23816. "reason": {
  23817. "type": "string",
  23818. "enum": ["auto", "manual"]
  23819. }
  23820. },
  23821. "required": ["timestamp", "sessionID", "messageID", "reason"],
  23822. "additionalProperties": false
  23823. }
  23824. },
  23825. "required": ["type", "id", "seq", "aggregateID", "data"],
  23826. "additionalProperties": false
  23827. }
  23828. },
  23829. "required": ["type", "id", "syncEvent"],
  23830. "additionalProperties": false
  23831. },
  23832. "SyncEventSessionNextCompactionEnded": {
  23833. "type": "object",
  23834. "properties": {
  23835. "type": {
  23836. "type": "string",
  23837. "enum": ["sync"]
  23838. },
  23839. "id": {
  23840. "type": "string",
  23841. "pattern": "^evt_"
  23842. },
  23843. "syncEvent": {
  23844. "type": "object",
  23845. "properties": {
  23846. "type": {
  23847. "type": "string",
  23848. "enum": ["session.next.compaction.ended.2"]
  23849. },
  23850. "id": {
  23851. "type": "string",
  23852. "pattern": "^evt_"
  23853. },
  23854. "seq": {
  23855. "type": "number"
  23856. },
  23857. "aggregateID": {
  23858. "type": "string"
  23859. },
  23860. "data": {
  23861. "type": "object",
  23862. "properties": {
  23863. "timestamp": {
  23864. "type": "number"
  23865. },
  23866. "sessionID": {
  23867. "type": "string",
  23868. "pattern": "^ses"
  23869. },
  23870. "messageID": {
  23871. "type": "string",
  23872. "pattern": "^msg_"
  23873. },
  23874. "reason": {
  23875. "type": "string",
  23876. "enum": ["auto", "manual"]
  23877. },
  23878. "text": {
  23879. "type": "string"
  23880. },
  23881. "recent": {
  23882. "type": "string"
  23883. }
  23884. },
  23885. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  23886. "additionalProperties": false
  23887. }
  23888. },
  23889. "required": ["type", "id", "seq", "aggregateID", "data"],
  23890. "additionalProperties": false
  23891. }
  23892. },
  23893. "required": ["type", "id", "syncEvent"],
  23894. "additionalProperties": false
  23895. },
  23896. "ConfigV2ReferenceGit": {
  23897. "type": "object",
  23898. "properties": {
  23899. "repository": {
  23900. "type": "string"
  23901. },
  23902. "branch": {
  23903. "type": "string"
  23904. },
  23905. "description": {
  23906. "type": "string"
  23907. },
  23908. "hidden": {
  23909. "type": "boolean"
  23910. }
  23911. },
  23912. "required": ["repository"],
  23913. "additionalProperties": false
  23914. },
  23915. "ConfigV2ReferenceLocal": {
  23916. "type": "object",
  23917. "properties": {
  23918. "path": {
  23919. "type": "string"
  23920. },
  23921. "description": {
  23922. "type": "string"
  23923. },
  23924. "hidden": {
  23925. "type": "boolean"
  23926. }
  23927. },
  23928. "required": ["path"],
  23929. "additionalProperties": false
  23930. },
  23931. "PolicyEffect": {
  23932. "type": "string",
  23933. "enum": ["allow", "deny"]
  23934. },
  23935. "ConfigV2ExperimentalPolicy": {
  23936. "type": "object",
  23937. "properties": {
  23938. "action": {
  23939. "type": "string",
  23940. "enum": ["provider.use"]
  23941. },
  23942. "effect": {
  23943. "$ref": "#/components/schemas/PolicyEffect"
  23944. },
  23945. "resource": {
  23946. "type": "string"
  23947. }
  23948. },
  23949. "required": ["action", "effect", "resource"],
  23950. "additionalProperties": false
  23951. },
  23952. "ProjectDirectories": {
  23953. "type": "array",
  23954. "items": {
  23955. "type": "object",
  23956. "properties": {
  23957. "directory": {
  23958. "type": "string"
  23959. },
  23960. "type": {
  23961. "type": "string",
  23962. "enum": ["main", "root", "git_worktree"]
  23963. }
  23964. },
  23965. "required": ["directory", "type"],
  23966. "additionalProperties": false
  23967. }
  23968. },
  23969. "ProjectCopyCopy": {
  23970. "type": "object",
  23971. "properties": {
  23972. "directory": {
  23973. "type": "string"
  23974. }
  23975. },
  23976. "required": ["directory"],
  23977. "additionalProperties": false
  23978. },
  23979. "LocationInfo": {
  23980. "type": "object",
  23981. "properties": {
  23982. "directory": {
  23983. "type": "string"
  23984. },
  23985. "workspaceID": {
  23986. "type": "string",
  23987. "pattern": "^wrk"
  23988. },
  23989. "project": {
  23990. "type": "object",
  23991. "properties": {
  23992. "id": {
  23993. "type": "string"
  23994. },
  23995. "directory": {
  23996. "type": "string"
  23997. }
  23998. },
  23999. "required": ["id", "directory"],
  24000. "additionalProperties": false
  24001. }
  24002. },
  24003. "required": ["directory", "project"],
  24004. "additionalProperties": false
  24005. },
  24006. "PermissionV2Effect": {
  24007. "type": "string",
  24008. "enum": ["allow", "deny", "ask"]
  24009. },
  24010. "PermissionV2Rule": {
  24011. "type": "object",
  24012. "properties": {
  24013. "action": {
  24014. "type": "string"
  24015. },
  24016. "resource": {
  24017. "type": "string"
  24018. },
  24019. "effect": {
  24020. "$ref": "#/components/schemas/PermissionV2Effect"
  24021. }
  24022. },
  24023. "required": ["action", "resource", "effect"],
  24024. "additionalProperties": false
  24025. },
  24026. "PermissionV2Ruleset": {
  24027. "type": "array",
  24028. "items": {
  24029. "$ref": "#/components/schemas/PermissionV2Rule"
  24030. }
  24031. },
  24032. "AgentV2Info": {
  24033. "type": "object",
  24034. "properties": {
  24035. "id": {
  24036. "type": "string"
  24037. },
  24038. "model": {
  24039. "type": "object",
  24040. "properties": {
  24041. "id": {
  24042. "type": "string"
  24043. },
  24044. "providerID": {
  24045. "type": "string"
  24046. },
  24047. "variant": {
  24048. "type": "string"
  24049. }
  24050. },
  24051. "required": ["id", "providerID"],
  24052. "additionalProperties": false
  24053. },
  24054. "request": {
  24055. "type": "object",
  24056. "properties": {
  24057. "headers": {
  24058. "type": "object",
  24059. "additionalProperties": {
  24060. "type": "string"
  24061. }
  24062. },
  24063. "body": {
  24064. "type": "object"
  24065. }
  24066. },
  24067. "required": ["headers", "body"],
  24068. "additionalProperties": false
  24069. },
  24070. "system": {
  24071. "type": "string"
  24072. },
  24073. "description": {
  24074. "type": "string"
  24075. },
  24076. "mode": {
  24077. "type": "string",
  24078. "enum": ["subagent", "primary", "all"]
  24079. },
  24080. "hidden": {
  24081. "type": "boolean"
  24082. },
  24083. "color": {
  24084. "anyOf": [
  24085. {
  24086. "type": "string",
  24087. "pattern": "^#[0-9a-fA-F]{6}$"
  24088. },
  24089. {
  24090. "type": "string",
  24091. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  24092. }
  24093. ]
  24094. },
  24095. "steps": {
  24096. "type": "integer",
  24097. "exclusiveMinimum": 0
  24098. },
  24099. "permissions": {
  24100. "$ref": "#/components/schemas/PermissionV2Ruleset"
  24101. }
  24102. },
  24103. "required": ["id", "request", "mode", "hidden", "permissions"],
  24104. "additionalProperties": false
  24105. },
  24106. "SessionV2Info": {
  24107. "type": "object",
  24108. "properties": {
  24109. "id": {
  24110. "type": "string",
  24111. "pattern": "^ses"
  24112. },
  24113. "parentID": {
  24114. "type": "string",
  24115. "pattern": "^ses"
  24116. },
  24117. "projectID": {
  24118. "type": "string"
  24119. },
  24120. "agent": {
  24121. "type": "string"
  24122. },
  24123. "model": {
  24124. "type": "object",
  24125. "properties": {
  24126. "id": {
  24127. "type": "string"
  24128. },
  24129. "providerID": {
  24130. "type": "string"
  24131. },
  24132. "variant": {
  24133. "type": "string"
  24134. }
  24135. },
  24136. "required": ["id", "providerID"],
  24137. "additionalProperties": false
  24138. },
  24139. "cost": {
  24140. "type": "number"
  24141. },
  24142. "tokens": {
  24143. "type": "object",
  24144. "properties": {
  24145. "input": {
  24146. "type": "number"
  24147. },
  24148. "output": {
  24149. "type": "number"
  24150. },
  24151. "reasoning": {
  24152. "type": "number"
  24153. },
  24154. "cache": {
  24155. "type": "object",
  24156. "properties": {
  24157. "read": {
  24158. "type": "number"
  24159. },
  24160. "write": {
  24161. "type": "number"
  24162. }
  24163. },
  24164. "required": ["read", "write"],
  24165. "additionalProperties": false
  24166. }
  24167. },
  24168. "required": ["input", "output", "reasoning", "cache"],
  24169. "additionalProperties": false
  24170. },
  24171. "time": {
  24172. "type": "object",
  24173. "properties": {
  24174. "created": {
  24175. "type": "number"
  24176. },
  24177. "updated": {
  24178. "type": "number"
  24179. },
  24180. "archived": {
  24181. "type": "number"
  24182. }
  24183. },
  24184. "required": ["created", "updated"],
  24185. "additionalProperties": false
  24186. },
  24187. "title": {
  24188. "type": "string"
  24189. },
  24190. "location": {
  24191. "$ref": "#/components/schemas/LocationRef"
  24192. },
  24193. "subpath": {
  24194. "type": "string"
  24195. }
  24196. },
  24197. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  24198. "additionalProperties": false
  24199. },
  24200. "SessionInputAdmitted": {
  24201. "type": "object",
  24202. "properties": {
  24203. "admittedSeq": {
  24204. "type": "integer",
  24205. "minimum": 0
  24206. },
  24207. "id": {
  24208. "type": "string",
  24209. "pattern": "^msg_"
  24210. },
  24211. "sessionID": {
  24212. "type": "string",
  24213. "pattern": "^ses"
  24214. },
  24215. "prompt": {
  24216. "$ref": "#/components/schemas/Prompt"
  24217. },
  24218. "delivery": {
  24219. "type": "string",
  24220. "enum": ["steer", "queue"]
  24221. },
  24222. "timeCreated": {
  24223. "type": "number"
  24224. },
  24225. "promotedSeq": {
  24226. "type": "integer",
  24227. "minimum": 0
  24228. }
  24229. },
  24230. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  24231. "additionalProperties": false
  24232. },
  24233. "SessionMessageAgentSwitched": {
  24234. "type": "object",
  24235. "properties": {
  24236. "id": {
  24237. "type": "string",
  24238. "pattern": "^msg_"
  24239. },
  24240. "metadata": {
  24241. "type": "object"
  24242. },
  24243. "time": {
  24244. "type": "object",
  24245. "properties": {
  24246. "created": {
  24247. "type": "number"
  24248. }
  24249. },
  24250. "required": ["created"],
  24251. "additionalProperties": false
  24252. },
  24253. "type": {
  24254. "type": "string",
  24255. "enum": ["agent-switched"]
  24256. },
  24257. "agent": {
  24258. "type": "string"
  24259. }
  24260. },
  24261. "required": ["id", "time", "type", "agent"],
  24262. "additionalProperties": false
  24263. },
  24264. "SessionMessageModelSwitched": {
  24265. "type": "object",
  24266. "properties": {
  24267. "id": {
  24268. "type": "string",
  24269. "pattern": "^msg_"
  24270. },
  24271. "metadata": {
  24272. "type": "object"
  24273. },
  24274. "time": {
  24275. "type": "object",
  24276. "properties": {
  24277. "created": {
  24278. "type": "number"
  24279. }
  24280. },
  24281. "required": ["created"],
  24282. "additionalProperties": false
  24283. },
  24284. "type": {
  24285. "type": "string",
  24286. "enum": ["model-switched"]
  24287. },
  24288. "model": {
  24289. "type": "object",
  24290. "properties": {
  24291. "id": {
  24292. "type": "string"
  24293. },
  24294. "providerID": {
  24295. "type": "string"
  24296. },
  24297. "variant": {
  24298. "type": "string"
  24299. }
  24300. },
  24301. "required": ["id", "providerID"],
  24302. "additionalProperties": false
  24303. }
  24304. },
  24305. "required": ["id", "time", "type", "model"],
  24306. "additionalProperties": false
  24307. },
  24308. "SessionMessageUser": {
  24309. "type": "object",
  24310. "properties": {
  24311. "id": {
  24312. "type": "string",
  24313. "pattern": "^msg_"
  24314. },
  24315. "metadata": {
  24316. "type": "object"
  24317. },
  24318. "time": {
  24319. "type": "object",
  24320. "properties": {
  24321. "created": {
  24322. "type": "number"
  24323. }
  24324. },
  24325. "required": ["created"],
  24326. "additionalProperties": false
  24327. },
  24328. "text": {
  24329. "type": "string"
  24330. },
  24331. "files": {
  24332. "type": "array",
  24333. "items": {
  24334. "$ref": "#/components/schemas/PromptFileAttachment"
  24335. }
  24336. },
  24337. "agents": {
  24338. "type": "array",
  24339. "items": {
  24340. "$ref": "#/components/schemas/PromptAgentAttachment"
  24341. }
  24342. },
  24343. "type": {
  24344. "type": "string",
  24345. "enum": ["user"]
  24346. }
  24347. },
  24348. "required": ["id", "time", "text", "type"],
  24349. "additionalProperties": false
  24350. },
  24351. "SessionMessageSynthetic": {
  24352. "type": "object",
  24353. "properties": {
  24354. "id": {
  24355. "type": "string",
  24356. "pattern": "^msg_"
  24357. },
  24358. "metadata": {
  24359. "type": "object"
  24360. },
  24361. "time": {
  24362. "type": "object",
  24363. "properties": {
  24364. "created": {
  24365. "type": "number"
  24366. }
  24367. },
  24368. "required": ["created"],
  24369. "additionalProperties": false
  24370. },
  24371. "sessionID": {
  24372. "type": "string",
  24373. "pattern": "^ses"
  24374. },
  24375. "text": {
  24376. "type": "string"
  24377. },
  24378. "type": {
  24379. "type": "string",
  24380. "enum": ["synthetic"]
  24381. }
  24382. },
  24383. "required": ["id", "time", "sessionID", "text", "type"],
  24384. "additionalProperties": false
  24385. },
  24386. "SessionMessageSystem": {
  24387. "type": "object",
  24388. "properties": {
  24389. "id": {
  24390. "type": "string",
  24391. "pattern": "^msg_"
  24392. },
  24393. "metadata": {
  24394. "type": "object"
  24395. },
  24396. "time": {
  24397. "type": "object",
  24398. "properties": {
  24399. "created": {
  24400. "type": "number"
  24401. }
  24402. },
  24403. "required": ["created"],
  24404. "additionalProperties": false
  24405. },
  24406. "type": {
  24407. "type": "string",
  24408. "enum": ["system"]
  24409. },
  24410. "text": {
  24411. "type": "string"
  24412. }
  24413. },
  24414. "required": ["id", "time", "type", "text"],
  24415. "additionalProperties": false
  24416. },
  24417. "SessionMessageShell": {
  24418. "type": "object",
  24419. "properties": {
  24420. "id": {
  24421. "type": "string",
  24422. "pattern": "^msg_"
  24423. },
  24424. "metadata": {
  24425. "type": "object"
  24426. },
  24427. "time": {
  24428. "type": "object",
  24429. "properties": {
  24430. "created": {
  24431. "type": "number"
  24432. },
  24433. "completed": {
  24434. "type": "number"
  24435. }
  24436. },
  24437. "required": ["created"],
  24438. "additionalProperties": false
  24439. },
  24440. "type": {
  24441. "type": "string",
  24442. "enum": ["shell"]
  24443. },
  24444. "callID": {
  24445. "type": "string"
  24446. },
  24447. "command": {
  24448. "type": "string"
  24449. },
  24450. "output": {
  24451. "type": "string"
  24452. }
  24453. },
  24454. "required": ["id", "time", "type", "callID", "command", "output"],
  24455. "additionalProperties": false
  24456. },
  24457. "SessionMessageAssistantText": {
  24458. "type": "object",
  24459. "properties": {
  24460. "type": {
  24461. "type": "string",
  24462. "enum": ["text"]
  24463. },
  24464. "id": {
  24465. "type": "string"
  24466. },
  24467. "text": {
  24468. "type": "string"
  24469. }
  24470. },
  24471. "required": ["type", "id", "text"],
  24472. "additionalProperties": false
  24473. },
  24474. "SessionMessageAssistantReasoning": {
  24475. "type": "object",
  24476. "properties": {
  24477. "type": {
  24478. "type": "string",
  24479. "enum": ["reasoning"]
  24480. },
  24481. "id": {
  24482. "type": "string"
  24483. },
  24484. "text": {
  24485. "type": "string"
  24486. },
  24487. "providerMetadata": {
  24488. "type": "object",
  24489. "additionalProperties": {
  24490. "type": "object"
  24491. }
  24492. }
  24493. },
  24494. "required": ["type", "id", "text"],
  24495. "additionalProperties": false
  24496. },
  24497. "SessionMessageToolStatePending": {
  24498. "type": "object",
  24499. "properties": {
  24500. "status": {
  24501. "type": "string",
  24502. "enum": ["pending"]
  24503. },
  24504. "input": {
  24505. "type": "string"
  24506. }
  24507. },
  24508. "required": ["status", "input"],
  24509. "additionalProperties": false
  24510. },
  24511. "SessionMessageToolStateRunning": {
  24512. "type": "object",
  24513. "properties": {
  24514. "status": {
  24515. "type": "string",
  24516. "enum": ["running"]
  24517. },
  24518. "input": {
  24519. "type": "object"
  24520. },
  24521. "structured": {
  24522. "type": "object"
  24523. },
  24524. "content": {
  24525. "type": "array",
  24526. "items": {
  24527. "anyOf": [
  24528. {
  24529. "$ref": "#/components/schemas/ToolTextContent"
  24530. },
  24531. {
  24532. "$ref": "#/components/schemas/ToolFileContent"
  24533. }
  24534. ]
  24535. }
  24536. }
  24537. },
  24538. "required": ["status", "input", "structured", "content"],
  24539. "additionalProperties": false
  24540. },
  24541. "SessionMessageToolStateCompleted": {
  24542. "type": "object",
  24543. "properties": {
  24544. "status": {
  24545. "type": "string",
  24546. "enum": ["completed"]
  24547. },
  24548. "input": {
  24549. "type": "object"
  24550. },
  24551. "attachments": {
  24552. "type": "array",
  24553. "items": {
  24554. "$ref": "#/components/schemas/PromptFileAttachment"
  24555. }
  24556. },
  24557. "content": {
  24558. "type": "array",
  24559. "items": {
  24560. "anyOf": [
  24561. {
  24562. "$ref": "#/components/schemas/ToolTextContent"
  24563. },
  24564. {
  24565. "$ref": "#/components/schemas/ToolFileContent"
  24566. }
  24567. ]
  24568. }
  24569. },
  24570. "outputPaths": {
  24571. "type": "array",
  24572. "items": {
  24573. "type": "string"
  24574. }
  24575. },
  24576. "structured": {
  24577. "type": "object"
  24578. },
  24579. "result": {}
  24580. },
  24581. "required": ["status", "input", "content", "structured"],
  24582. "additionalProperties": false
  24583. },
  24584. "SessionMessageToolStateError": {
  24585. "type": "object",
  24586. "properties": {
  24587. "status": {
  24588. "type": "string",
  24589. "enum": ["error"]
  24590. },
  24591. "input": {
  24592. "type": "object"
  24593. },
  24594. "content": {
  24595. "type": "array",
  24596. "items": {
  24597. "anyOf": [
  24598. {
  24599. "$ref": "#/components/schemas/ToolTextContent"
  24600. },
  24601. {
  24602. "$ref": "#/components/schemas/ToolFileContent"
  24603. }
  24604. ]
  24605. }
  24606. },
  24607. "structured": {
  24608. "type": "object"
  24609. },
  24610. "error": {
  24611. "$ref": "#/components/schemas/SessionErrorUnknown"
  24612. },
  24613. "result": {}
  24614. },
  24615. "required": ["status", "input", "content", "structured", "error"],
  24616. "additionalProperties": false
  24617. },
  24618. "SessionMessageAssistantTool": {
  24619. "type": "object",
  24620. "properties": {
  24621. "type": {
  24622. "type": "string",
  24623. "enum": ["tool"]
  24624. },
  24625. "id": {
  24626. "type": "string"
  24627. },
  24628. "name": {
  24629. "type": "string"
  24630. },
  24631. "provider": {
  24632. "type": "object",
  24633. "properties": {
  24634. "executed": {
  24635. "type": "boolean"
  24636. },
  24637. "metadata": {
  24638. "type": "object",
  24639. "additionalProperties": {
  24640. "type": "object"
  24641. }
  24642. },
  24643. "resultMetadata": {
  24644. "type": "object",
  24645. "additionalProperties": {
  24646. "type": "object"
  24647. }
  24648. }
  24649. },
  24650. "required": ["executed"],
  24651. "additionalProperties": false
  24652. },
  24653. "state": {
  24654. "anyOf": [
  24655. {
  24656. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  24657. },
  24658. {
  24659. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  24660. },
  24661. {
  24662. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  24663. },
  24664. {
  24665. "$ref": "#/components/schemas/SessionMessageToolStateError"
  24666. }
  24667. ]
  24668. },
  24669. "time": {
  24670. "type": "object",
  24671. "properties": {
  24672. "created": {
  24673. "type": "number"
  24674. },
  24675. "ran": {
  24676. "type": "number"
  24677. },
  24678. "completed": {
  24679. "type": "number"
  24680. },
  24681. "pruned": {
  24682. "type": "number"
  24683. }
  24684. },
  24685. "required": ["created"],
  24686. "additionalProperties": false
  24687. }
  24688. },
  24689. "required": ["type", "id", "name", "state", "time"],
  24690. "additionalProperties": false
  24691. },
  24692. "SessionMessageAssistant": {
  24693. "type": "object",
  24694. "properties": {
  24695. "id": {
  24696. "type": "string",
  24697. "pattern": "^msg_"
  24698. },
  24699. "metadata": {
  24700. "type": "object"
  24701. },
  24702. "time": {
  24703. "type": "object",
  24704. "properties": {
  24705. "created": {
  24706. "type": "number"
  24707. },
  24708. "completed": {
  24709. "type": "number"
  24710. }
  24711. },
  24712. "required": ["created"],
  24713. "additionalProperties": false
  24714. },
  24715. "type": {
  24716. "type": "string",
  24717. "enum": ["assistant"]
  24718. },
  24719. "agent": {
  24720. "type": "string"
  24721. },
  24722. "model": {
  24723. "type": "object",
  24724. "properties": {
  24725. "id": {
  24726. "type": "string"
  24727. },
  24728. "providerID": {
  24729. "type": "string"
  24730. },
  24731. "variant": {
  24732. "type": "string"
  24733. }
  24734. },
  24735. "required": ["id", "providerID"],
  24736. "additionalProperties": false
  24737. },
  24738. "content": {
  24739. "type": "array",
  24740. "items": {
  24741. "anyOf": [
  24742. {
  24743. "$ref": "#/components/schemas/SessionMessageAssistantText"
  24744. },
  24745. {
  24746. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  24747. },
  24748. {
  24749. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  24750. }
  24751. ]
  24752. }
  24753. },
  24754. "snapshot": {
  24755. "type": "object",
  24756. "properties": {
  24757. "start": {
  24758. "type": "string"
  24759. },
  24760. "end": {
  24761. "type": "string"
  24762. }
  24763. },
  24764. "additionalProperties": false
  24765. },
  24766. "finish": {
  24767. "type": "string"
  24768. },
  24769. "cost": {
  24770. "type": "number"
  24771. },
  24772. "tokens": {
  24773. "type": "object",
  24774. "properties": {
  24775. "input": {
  24776. "type": "number"
  24777. },
  24778. "output": {
  24779. "type": "number"
  24780. },
  24781. "reasoning": {
  24782. "type": "number"
  24783. },
  24784. "cache": {
  24785. "type": "object",
  24786. "properties": {
  24787. "read": {
  24788. "type": "number"
  24789. },
  24790. "write": {
  24791. "type": "number"
  24792. }
  24793. },
  24794. "required": ["read", "write"],
  24795. "additionalProperties": false
  24796. }
  24797. },
  24798. "required": ["input", "output", "reasoning", "cache"],
  24799. "additionalProperties": false
  24800. },
  24801. "error": {
  24802. "$ref": "#/components/schemas/SessionErrorUnknown"
  24803. }
  24804. },
  24805. "required": ["id", "time", "type", "agent", "model", "content"],
  24806. "additionalProperties": false
  24807. },
  24808. "SessionMessageCompaction": {
  24809. "type": "object",
  24810. "properties": {
  24811. "type": {
  24812. "type": "string",
  24813. "enum": ["compaction"]
  24814. },
  24815. "reason": {
  24816. "type": "string",
  24817. "enum": ["auto", "manual"]
  24818. },
  24819. "summary": {
  24820. "type": "string"
  24821. },
  24822. "recent": {
  24823. "type": "string"
  24824. },
  24825. "id": {
  24826. "type": "string",
  24827. "pattern": "^msg_"
  24828. },
  24829. "metadata": {
  24830. "type": "object"
  24831. },
  24832. "time": {
  24833. "type": "object",
  24834. "properties": {
  24835. "created": {
  24836. "type": "number"
  24837. }
  24838. },
  24839. "required": ["created"],
  24840. "additionalProperties": false
  24841. }
  24842. },
  24843. "required": ["type", "reason", "summary", "recent", "id", "time"],
  24844. "additionalProperties": false
  24845. },
  24846. "SessionMessage": {
  24847. "anyOf": [
  24848. {
  24849. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  24850. },
  24851. {
  24852. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  24853. },
  24854. {
  24855. "$ref": "#/components/schemas/SessionMessageUser"
  24856. },
  24857. {
  24858. "$ref": "#/components/schemas/SessionMessageSynthetic"
  24859. },
  24860. {
  24861. "$ref": "#/components/schemas/SessionMessageSystem"
  24862. },
  24863. {
  24864. "$ref": "#/components/schemas/SessionMessageShell"
  24865. },
  24866. {
  24867. "$ref": "#/components/schemas/SessionMessageAssistant"
  24868. },
  24869. {
  24870. "$ref": "#/components/schemas/SessionMessageCompaction"
  24871. }
  24872. ]
  24873. },
  24874. "ProviderV2Info": {
  24875. "type": "object",
  24876. "properties": {
  24877. "id": {
  24878. "type": "string"
  24879. },
  24880. "name": {
  24881. "type": "string"
  24882. },
  24883. "enabled": {
  24884. "anyOf": [
  24885. {
  24886. "type": "boolean",
  24887. "enum": [false]
  24888. },
  24889. {
  24890. "type": "object",
  24891. "properties": {
  24892. "via": {
  24893. "type": "string",
  24894. "enum": ["env"]
  24895. },
  24896. "name": {
  24897. "type": "string"
  24898. }
  24899. },
  24900. "required": ["via", "name"],
  24901. "additionalProperties": false
  24902. },
  24903. {
  24904. "type": "object",
  24905. "properties": {
  24906. "via": {
  24907. "type": "string",
  24908. "enum": ["account"]
  24909. },
  24910. "service": {
  24911. "type": "string"
  24912. }
  24913. },
  24914. "required": ["via", "service"],
  24915. "additionalProperties": false
  24916. },
  24917. {
  24918. "type": "object",
  24919. "properties": {
  24920. "via": {
  24921. "type": "string",
  24922. "enum": ["custom"]
  24923. },
  24924. "data": {
  24925. "type": "object"
  24926. }
  24927. },
  24928. "required": ["via", "data"],
  24929. "additionalProperties": false
  24930. }
  24931. ]
  24932. },
  24933. "env": {
  24934. "type": "array",
  24935. "items": {
  24936. "type": "string"
  24937. }
  24938. },
  24939. "api": {
  24940. "anyOf": [
  24941. {
  24942. "type": "object",
  24943. "properties": {
  24944. "type": {
  24945. "type": "string",
  24946. "enum": ["aisdk"]
  24947. },
  24948. "package": {
  24949. "type": "string"
  24950. },
  24951. "url": {
  24952. "type": "string"
  24953. },
  24954. "settings": {
  24955. "type": "object"
  24956. }
  24957. },
  24958. "required": ["type", "package"],
  24959. "additionalProperties": false
  24960. },
  24961. {
  24962. "type": "object",
  24963. "properties": {
  24964. "type": {
  24965. "type": "string",
  24966. "enum": ["native"]
  24967. },
  24968. "url": {
  24969. "type": "string"
  24970. },
  24971. "settings": {
  24972. "type": "object"
  24973. }
  24974. },
  24975. "required": ["type", "settings"],
  24976. "additionalProperties": false
  24977. }
  24978. ]
  24979. },
  24980. "request": {
  24981. "type": "object",
  24982. "properties": {
  24983. "headers": {
  24984. "type": "object",
  24985. "additionalProperties": {
  24986. "type": "string"
  24987. }
  24988. },
  24989. "body": {
  24990. "type": "object"
  24991. }
  24992. },
  24993. "required": ["headers", "body"],
  24994. "additionalProperties": false
  24995. }
  24996. },
  24997. "required": ["id", "name", "enabled", "env", "api", "request"],
  24998. "additionalProperties": false
  24999. },
  25000. "PermissionV2Request": {
  25001. "type": "object",
  25002. "properties": {
  25003. "id": {
  25004. "type": "string",
  25005. "pattern": "^per"
  25006. },
  25007. "sessionID": {
  25008. "type": "string",
  25009. "pattern": "^ses"
  25010. },
  25011. "action": {
  25012. "type": "string"
  25013. },
  25014. "resources": {
  25015. "type": "array",
  25016. "items": {
  25017. "type": "string"
  25018. }
  25019. },
  25020. "save": {
  25021. "type": "array",
  25022. "items": {
  25023. "type": "string"
  25024. }
  25025. },
  25026. "metadata": {
  25027. "type": "object"
  25028. },
  25029. "source": {
  25030. "$ref": "#/components/schemas/PermissionV2Source"
  25031. }
  25032. },
  25033. "required": ["id", "sessionID", "action", "resources"],
  25034. "additionalProperties": false
  25035. },
  25036. "PermissionSavedInfo": {
  25037. "type": "object",
  25038. "properties": {
  25039. "id": {
  25040. "type": "string"
  25041. },
  25042. "projectID": {
  25043. "type": "string"
  25044. },
  25045. "action": {
  25046. "type": "string"
  25047. },
  25048. "resource": {
  25049. "type": "string"
  25050. }
  25051. },
  25052. "required": ["id", "projectID", "action", "resource"],
  25053. "additionalProperties": false
  25054. },
  25055. "FileSystemContent": {
  25056. "type": "object",
  25057. "properties": {
  25058. "uri": {
  25059. "type": "string"
  25060. },
  25061. "name": {
  25062. "type": "string"
  25063. },
  25064. "content": {
  25065. "type": "string"
  25066. },
  25067. "encoding": {
  25068. "type": "string",
  25069. "enum": ["utf8", "base64"]
  25070. },
  25071. "mime": {
  25072. "type": "string"
  25073. }
  25074. },
  25075. "required": ["uri", "content", "encoding", "mime"],
  25076. "additionalProperties": false
  25077. },
  25078. "FileSystemEntry": {
  25079. "type": "object",
  25080. "properties": {
  25081. "path": {
  25082. "type": "string"
  25083. },
  25084. "type": {
  25085. "type": "string",
  25086. "enum": ["file", "directory"]
  25087. },
  25088. "mime": {
  25089. "type": "string"
  25090. }
  25091. },
  25092. "required": ["path", "type", "mime"],
  25093. "additionalProperties": false
  25094. },
  25095. "CommandV2Info": {
  25096. "type": "object",
  25097. "properties": {
  25098. "name": {
  25099. "type": "string"
  25100. },
  25101. "template": {
  25102. "type": "string"
  25103. },
  25104. "description": {
  25105. "type": "string"
  25106. },
  25107. "agent": {
  25108. "type": "string"
  25109. },
  25110. "model": {
  25111. "type": "object",
  25112. "properties": {
  25113. "id": {
  25114. "type": "string"
  25115. },
  25116. "providerID": {
  25117. "type": "string"
  25118. },
  25119. "variant": {
  25120. "type": "string"
  25121. }
  25122. },
  25123. "required": ["id", "providerID"],
  25124. "additionalProperties": false
  25125. },
  25126. "subtask": {
  25127. "type": "boolean"
  25128. }
  25129. },
  25130. "required": ["name", "template"],
  25131. "additionalProperties": false
  25132. },
  25133. "SkillV2Info": {
  25134. "type": "object",
  25135. "properties": {
  25136. "name": {
  25137. "type": "string"
  25138. },
  25139. "description": {
  25140. "type": "string"
  25141. },
  25142. "slash": {
  25143. "type": "boolean"
  25144. },
  25145. "location": {
  25146. "type": "string"
  25147. },
  25148. "content": {
  25149. "type": "string"
  25150. }
  25151. },
  25152. "required": ["name", "location", "content"],
  25153. "additionalProperties": false
  25154. },
  25155. "QuestionV2Request": {
  25156. "type": "object",
  25157. "properties": {
  25158. "id": {
  25159. "type": "string",
  25160. "pattern": "^que"
  25161. },
  25162. "sessionID": {
  25163. "type": "string",
  25164. "pattern": "^ses"
  25165. },
  25166. "questions": {
  25167. "type": "array",
  25168. "items": {
  25169. "$ref": "#/components/schemas/QuestionV2Info"
  25170. },
  25171. "description": "Questions to ask"
  25172. },
  25173. "tool": {
  25174. "$ref": "#/components/schemas/QuestionV2Tool"
  25175. }
  25176. },
  25177. "required": ["id", "sessionID", "questions"],
  25178. "additionalProperties": false
  25179. },
  25180. "QuestionV2Reply": {
  25181. "type": "object",
  25182. "properties": {
  25183. "answers": {
  25184. "type": "array",
  25185. "items": {
  25186. "$ref": "#/components/schemas/QuestionV2Answer"
  25187. },
  25188. "description": "User answers in order of questions (each answer is an array of selected labels)"
  25189. }
  25190. },
  25191. "required": ["answers"],
  25192. "additionalProperties": false
  25193. },
  25194. "ReferenceLocalSource": {
  25195. "type": "object",
  25196. "properties": {
  25197. "type": {
  25198. "type": "string",
  25199. "enum": ["local"]
  25200. },
  25201. "path": {
  25202. "type": "string"
  25203. },
  25204. "description": {
  25205. "type": "string"
  25206. },
  25207. "hidden": {
  25208. "type": "boolean"
  25209. }
  25210. },
  25211. "required": ["type", "path"],
  25212. "additionalProperties": false
  25213. },
  25214. "ReferenceGitSource": {
  25215. "type": "object",
  25216. "properties": {
  25217. "type": {
  25218. "type": "string",
  25219. "enum": ["git"]
  25220. },
  25221. "repository": {
  25222. "type": "string"
  25223. },
  25224. "branch": {
  25225. "type": "string"
  25226. },
  25227. "description": {
  25228. "type": "string"
  25229. },
  25230. "hidden": {
  25231. "type": "boolean"
  25232. }
  25233. },
  25234. "required": ["type", "repository"],
  25235. "additionalProperties": false
  25236. },
  25237. "ReferenceInfo": {
  25238. "type": "object",
  25239. "properties": {
  25240. "name": {
  25241. "type": "string"
  25242. },
  25243. "path": {
  25244. "type": "string"
  25245. },
  25246. "description": {
  25247. "type": "string"
  25248. },
  25249. "hidden": {
  25250. "type": "boolean"
  25251. },
  25252. "source": {
  25253. "anyOf": [
  25254. {
  25255. "$ref": "#/components/schemas/ReferenceLocalSource"
  25256. },
  25257. {
  25258. "$ref": "#/components/schemas/ReferenceGitSource"
  25259. }
  25260. ]
  25261. }
  25262. },
  25263. "required": ["name", "path", "source"],
  25264. "additionalProperties": false
  25265. },
  25266. "EventModels-devRefreshed": {
  25267. "type": "object",
  25268. "properties": {
  25269. "id": {
  25270. "type": "string",
  25271. "pattern": "^evt_"
  25272. },
  25273. "type": {
  25274. "type": "string",
  25275. "enum": ["models-dev.refreshed"]
  25276. },
  25277. "properties": {
  25278. "type": "object",
  25279. "properties": {}
  25280. }
  25281. },
  25282. "required": ["id", "type", "properties"],
  25283. "additionalProperties": false
  25284. },
  25285. "EventPluginAdded": {
  25286. "type": "object",
  25287. "properties": {
  25288. "id": {
  25289. "type": "string",
  25290. "pattern": "^evt_"
  25291. },
  25292. "type": {
  25293. "type": "string",
  25294. "enum": ["plugin.added"]
  25295. },
  25296. "properties": {
  25297. "type": "object",
  25298. "properties": {
  25299. "id": {
  25300. "type": "string"
  25301. }
  25302. },
  25303. "required": ["id"],
  25304. "additionalProperties": false
  25305. }
  25306. },
  25307. "required": ["id", "type", "properties"],
  25308. "additionalProperties": false
  25309. },
  25310. "ModelV2Info1": {
  25311. "type": "object",
  25312. "properties": {
  25313. "id": {
  25314. "type": "string"
  25315. },
  25316. "providerID": {
  25317. "type": "string"
  25318. },
  25319. "family": {
  25320. "type": "string"
  25321. },
  25322. "name": {
  25323. "type": "string"
  25324. },
  25325. "api": {
  25326. "anyOf": [
  25327. {
  25328. "type": "object",
  25329. "properties": {
  25330. "id": {
  25331. "type": "string"
  25332. },
  25333. "type": {
  25334. "type": "string",
  25335. "enum": ["aisdk"]
  25336. },
  25337. "package": {
  25338. "type": "string"
  25339. },
  25340. "url": {
  25341. "type": "string"
  25342. },
  25343. "settings": {
  25344. "type": "object"
  25345. }
  25346. },
  25347. "required": ["id", "type", "package"],
  25348. "additionalProperties": false
  25349. },
  25350. {
  25351. "type": "object",
  25352. "properties": {
  25353. "id": {
  25354. "type": "string"
  25355. },
  25356. "type": {
  25357. "type": "string",
  25358. "enum": ["native"]
  25359. },
  25360. "url": {
  25361. "type": "string"
  25362. },
  25363. "settings": {
  25364. "type": "object"
  25365. }
  25366. },
  25367. "required": ["id", "type", "settings"],
  25368. "additionalProperties": false
  25369. }
  25370. ]
  25371. },
  25372. "capabilities": {
  25373. "type": "object",
  25374. "properties": {
  25375. "tools": {
  25376. "type": "boolean"
  25377. },
  25378. "input": {
  25379. "type": "array",
  25380. "items": {
  25381. "type": "string"
  25382. }
  25383. },
  25384. "output": {
  25385. "type": "array",
  25386. "items": {
  25387. "type": "string"
  25388. }
  25389. }
  25390. },
  25391. "required": ["tools", "input", "output"],
  25392. "additionalProperties": false
  25393. },
  25394. "request": {
  25395. "type": "object",
  25396. "properties": {
  25397. "headers": {
  25398. "type": "object",
  25399. "additionalProperties": {
  25400. "type": "string"
  25401. }
  25402. },
  25403. "body": {
  25404. "type": "object"
  25405. },
  25406. "generation": {
  25407. "type": "object",
  25408. "properties": {
  25409. "maxTokens": {
  25410. "anyOf": [
  25411. {
  25412. "type": "number"
  25413. },
  25414. {
  25415. "type": "string",
  25416. "enum": ["NaN"]
  25417. },
  25418. {
  25419. "type": "string",
  25420. "enum": ["Infinity"]
  25421. },
  25422. {
  25423. "type": "string",
  25424. "enum": ["-Infinity"]
  25425. }
  25426. ]
  25427. },
  25428. "temperature": {
  25429. "anyOf": [
  25430. {
  25431. "type": "number"
  25432. },
  25433. {
  25434. "type": "string",
  25435. "enum": ["NaN"]
  25436. },
  25437. {
  25438. "type": "string",
  25439. "enum": ["Infinity"]
  25440. },
  25441. {
  25442. "type": "string",
  25443. "enum": ["-Infinity"]
  25444. }
  25445. ]
  25446. },
  25447. "topP": {
  25448. "anyOf": [
  25449. {
  25450. "type": "number"
  25451. },
  25452. {
  25453. "type": "string",
  25454. "enum": ["NaN"]
  25455. },
  25456. {
  25457. "type": "string",
  25458. "enum": ["Infinity"]
  25459. },
  25460. {
  25461. "type": "string",
  25462. "enum": ["-Infinity"]
  25463. }
  25464. ]
  25465. },
  25466. "topK": {
  25467. "anyOf": [
  25468. {
  25469. "type": "number"
  25470. },
  25471. {
  25472. "type": "string",
  25473. "enum": ["NaN"]
  25474. },
  25475. {
  25476. "type": "string",
  25477. "enum": ["Infinity"]
  25478. },
  25479. {
  25480. "type": "string",
  25481. "enum": ["-Infinity"]
  25482. }
  25483. ]
  25484. },
  25485. "frequencyPenalty": {
  25486. "anyOf": [
  25487. {
  25488. "type": "number"
  25489. },
  25490. {
  25491. "type": "string",
  25492. "enum": ["NaN"]
  25493. },
  25494. {
  25495. "type": "string",
  25496. "enum": ["Infinity"]
  25497. },
  25498. {
  25499. "type": "string",
  25500. "enum": ["-Infinity"]
  25501. }
  25502. ]
  25503. },
  25504. "presencePenalty": {
  25505. "anyOf": [
  25506. {
  25507. "type": "number"
  25508. },
  25509. {
  25510. "type": "string",
  25511. "enum": ["NaN"]
  25512. },
  25513. {
  25514. "type": "string",
  25515. "enum": ["Infinity"]
  25516. },
  25517. {
  25518. "type": "string",
  25519. "enum": ["-Infinity"]
  25520. }
  25521. ]
  25522. },
  25523. "seed": {
  25524. "anyOf": [
  25525. {
  25526. "type": "number"
  25527. },
  25528. {
  25529. "type": "string",
  25530. "enum": ["NaN"]
  25531. },
  25532. {
  25533. "type": "string",
  25534. "enum": ["Infinity"]
  25535. },
  25536. {
  25537. "type": "string",
  25538. "enum": ["-Infinity"]
  25539. }
  25540. ]
  25541. },
  25542. "stop": {
  25543. "type": "array",
  25544. "items": {
  25545. "type": "string"
  25546. }
  25547. }
  25548. },
  25549. "additionalProperties": false
  25550. },
  25551. "options": {
  25552. "type": "object"
  25553. },
  25554. "variant": {
  25555. "type": "string"
  25556. }
  25557. },
  25558. "required": ["headers", "body"],
  25559. "additionalProperties": false
  25560. },
  25561. "variants": {
  25562. "type": "array",
  25563. "items": {
  25564. "type": "object",
  25565. "properties": {
  25566. "id": {
  25567. "type": "string"
  25568. },
  25569. "headers": {
  25570. "type": "object",
  25571. "additionalProperties": {
  25572. "type": "string"
  25573. }
  25574. },
  25575. "body": {
  25576. "type": "object"
  25577. },
  25578. "generation": {
  25579. "type": "object",
  25580. "properties": {
  25581. "maxTokens": {
  25582. "anyOf": [
  25583. {
  25584. "type": "number"
  25585. },
  25586. {
  25587. "type": "string",
  25588. "enum": ["NaN"]
  25589. },
  25590. {
  25591. "type": "string",
  25592. "enum": ["Infinity"]
  25593. },
  25594. {
  25595. "type": "string",
  25596. "enum": ["-Infinity"]
  25597. }
  25598. ]
  25599. },
  25600. "temperature": {
  25601. "anyOf": [
  25602. {
  25603. "type": "number"
  25604. },
  25605. {
  25606. "type": "string",
  25607. "enum": ["NaN"]
  25608. },
  25609. {
  25610. "type": "string",
  25611. "enum": ["Infinity"]
  25612. },
  25613. {
  25614. "type": "string",
  25615. "enum": ["-Infinity"]
  25616. }
  25617. ]
  25618. },
  25619. "topP": {
  25620. "anyOf": [
  25621. {
  25622. "type": "number"
  25623. },
  25624. {
  25625. "type": "string",
  25626. "enum": ["NaN"]
  25627. },
  25628. {
  25629. "type": "string",
  25630. "enum": ["Infinity"]
  25631. },
  25632. {
  25633. "type": "string",
  25634. "enum": ["-Infinity"]
  25635. }
  25636. ]
  25637. },
  25638. "topK": {
  25639. "anyOf": [
  25640. {
  25641. "type": "number"
  25642. },
  25643. {
  25644. "type": "string",
  25645. "enum": ["NaN"]
  25646. },
  25647. {
  25648. "type": "string",
  25649. "enum": ["Infinity"]
  25650. },
  25651. {
  25652. "type": "string",
  25653. "enum": ["-Infinity"]
  25654. }
  25655. ]
  25656. },
  25657. "frequencyPenalty": {
  25658. "anyOf": [
  25659. {
  25660. "type": "number"
  25661. },
  25662. {
  25663. "type": "string",
  25664. "enum": ["NaN"]
  25665. },
  25666. {
  25667. "type": "string",
  25668. "enum": ["Infinity"]
  25669. },
  25670. {
  25671. "type": "string",
  25672. "enum": ["-Infinity"]
  25673. }
  25674. ]
  25675. },
  25676. "presencePenalty": {
  25677. "anyOf": [
  25678. {
  25679. "type": "number"
  25680. },
  25681. {
  25682. "type": "string",
  25683. "enum": ["NaN"]
  25684. },
  25685. {
  25686. "type": "string",
  25687. "enum": ["Infinity"]
  25688. },
  25689. {
  25690. "type": "string",
  25691. "enum": ["-Infinity"]
  25692. }
  25693. ]
  25694. },
  25695. "seed": {
  25696. "anyOf": [
  25697. {
  25698. "type": "number"
  25699. },
  25700. {
  25701. "type": "string",
  25702. "enum": ["NaN"]
  25703. },
  25704. {
  25705. "type": "string",
  25706. "enum": ["Infinity"]
  25707. },
  25708. {
  25709. "type": "string",
  25710. "enum": ["-Infinity"]
  25711. }
  25712. ]
  25713. },
  25714. "stop": {
  25715. "type": "array",
  25716. "items": {
  25717. "type": "string"
  25718. }
  25719. }
  25720. },
  25721. "additionalProperties": false
  25722. },
  25723. "options": {
  25724. "type": "object"
  25725. }
  25726. },
  25727. "required": ["id", "headers", "body"],
  25728. "additionalProperties": false
  25729. }
  25730. },
  25731. "time": {
  25732. "type": "object",
  25733. "properties": {
  25734. "released": {
  25735. "anyOf": [
  25736. {
  25737. "type": "number"
  25738. },
  25739. {
  25740. "type": "string",
  25741. "enum": ["NaN"]
  25742. },
  25743. {
  25744. "type": "string",
  25745. "enum": ["Infinity"]
  25746. },
  25747. {
  25748. "type": "string",
  25749. "enum": ["-Infinity"]
  25750. }
  25751. ]
  25752. }
  25753. },
  25754. "required": ["released"],
  25755. "additionalProperties": false
  25756. },
  25757. "cost": {
  25758. "type": "array",
  25759. "items": {
  25760. "type": "object",
  25761. "properties": {
  25762. "tier": {
  25763. "type": "object",
  25764. "properties": {
  25765. "type": {
  25766. "type": "string",
  25767. "enum": ["context"]
  25768. },
  25769. "size": {
  25770. "type": "integer"
  25771. }
  25772. },
  25773. "required": ["type", "size"],
  25774. "additionalProperties": false
  25775. },
  25776. "input": {
  25777. "type": "number"
  25778. },
  25779. "output": {
  25780. "type": "number"
  25781. },
  25782. "cache": {
  25783. "type": "object",
  25784. "properties": {
  25785. "read": {
  25786. "type": "number"
  25787. },
  25788. "write": {
  25789. "type": "number"
  25790. }
  25791. },
  25792. "required": ["read", "write"],
  25793. "additionalProperties": false
  25794. }
  25795. },
  25796. "required": ["input", "output", "cache"],
  25797. "additionalProperties": false
  25798. }
  25799. },
  25800. "status": {
  25801. "type": "string",
  25802. "enum": ["alpha", "beta", "deprecated", "active"]
  25803. },
  25804. "enabled": {
  25805. "type": "boolean"
  25806. },
  25807. "limit": {
  25808. "type": "object",
  25809. "properties": {
  25810. "context": {
  25811. "type": "integer"
  25812. },
  25813. "input": {
  25814. "type": "integer"
  25815. },
  25816. "output": {
  25817. "type": "integer"
  25818. }
  25819. },
  25820. "required": ["context", "output"],
  25821. "additionalProperties": false
  25822. }
  25823. },
  25824. "required": [
  25825. "id",
  25826. "providerID",
  25827. "name",
  25828. "api",
  25829. "capabilities",
  25830. "request",
  25831. "variants",
  25832. "time",
  25833. "cost",
  25834. "status",
  25835. "enabled",
  25836. "limit"
  25837. ],
  25838. "additionalProperties": false
  25839. },
  25840. "EventCatalogModelUpdated": {
  25841. "type": "object",
  25842. "properties": {
  25843. "id": {
  25844. "type": "string",
  25845. "pattern": "^evt_"
  25846. },
  25847. "type": {
  25848. "type": "string",
  25849. "enum": ["catalog.model.updated"]
  25850. },
  25851. "properties": {
  25852. "type": "object",
  25853. "properties": {
  25854. "model": {
  25855. "$ref": "#/components/schemas/ModelV2Info1"
  25856. }
  25857. },
  25858. "required": ["model"],
  25859. "additionalProperties": false
  25860. }
  25861. },
  25862. "required": ["id", "type", "properties"],
  25863. "additionalProperties": false
  25864. },
  25865. "EventSessionCreated": {
  25866. "type": "object",
  25867. "properties": {
  25868. "id": {
  25869. "type": "string",
  25870. "pattern": "^evt_"
  25871. },
  25872. "type": {
  25873. "type": "string",
  25874. "enum": ["session.created"]
  25875. },
  25876. "properties": {
  25877. "type": "object",
  25878. "properties": {
  25879. "sessionID": {
  25880. "type": "string",
  25881. "pattern": "^ses"
  25882. },
  25883. "info": {
  25884. "$ref": "#/components/schemas/Session"
  25885. }
  25886. },
  25887. "required": ["sessionID", "info"],
  25888. "additionalProperties": false
  25889. }
  25890. },
  25891. "required": ["id", "type", "properties"],
  25892. "additionalProperties": false
  25893. },
  25894. "EventSessionUpdated": {
  25895. "type": "object",
  25896. "properties": {
  25897. "id": {
  25898. "type": "string",
  25899. "pattern": "^evt_"
  25900. },
  25901. "type": {
  25902. "type": "string",
  25903. "enum": ["session.updated"]
  25904. },
  25905. "properties": {
  25906. "type": "object",
  25907. "properties": {
  25908. "sessionID": {
  25909. "type": "string",
  25910. "pattern": "^ses"
  25911. },
  25912. "info": {
  25913. "$ref": "#/components/schemas/Session"
  25914. }
  25915. },
  25916. "required": ["sessionID", "info"],
  25917. "additionalProperties": false
  25918. }
  25919. },
  25920. "required": ["id", "type", "properties"],
  25921. "additionalProperties": false
  25922. },
  25923. "EventSessionDeleted": {
  25924. "type": "object",
  25925. "properties": {
  25926. "id": {
  25927. "type": "string",
  25928. "pattern": "^evt_"
  25929. },
  25930. "type": {
  25931. "type": "string",
  25932. "enum": ["session.deleted"]
  25933. },
  25934. "properties": {
  25935. "type": "object",
  25936. "properties": {
  25937. "sessionID": {
  25938. "type": "string",
  25939. "pattern": "^ses"
  25940. },
  25941. "info": {
  25942. "$ref": "#/components/schemas/Session"
  25943. }
  25944. },
  25945. "required": ["sessionID", "info"],
  25946. "additionalProperties": false
  25947. }
  25948. },
  25949. "required": ["id", "type", "properties"],
  25950. "additionalProperties": false
  25951. },
  25952. "EventMessageUpdated": {
  25953. "type": "object",
  25954. "properties": {
  25955. "id": {
  25956. "type": "string",
  25957. "pattern": "^evt_"
  25958. },
  25959. "type": {
  25960. "type": "string",
  25961. "enum": ["message.updated"]
  25962. },
  25963. "properties": {
  25964. "type": "object",
  25965. "properties": {
  25966. "sessionID": {
  25967. "type": "string",
  25968. "pattern": "^ses"
  25969. },
  25970. "info": {
  25971. "$ref": "#/components/schemas/Message"
  25972. }
  25973. },
  25974. "required": ["sessionID", "info"],
  25975. "additionalProperties": false
  25976. }
  25977. },
  25978. "required": ["id", "type", "properties"],
  25979. "additionalProperties": false
  25980. },
  25981. "EventMessageRemoved": {
  25982. "type": "object",
  25983. "properties": {
  25984. "id": {
  25985. "type": "string",
  25986. "pattern": "^evt_"
  25987. },
  25988. "type": {
  25989. "type": "string",
  25990. "enum": ["message.removed"]
  25991. },
  25992. "properties": {
  25993. "type": "object",
  25994. "properties": {
  25995. "sessionID": {
  25996. "type": "string",
  25997. "pattern": "^ses"
  25998. },
  25999. "messageID": {
  26000. "type": "string",
  26001. "pattern": "^msg"
  26002. }
  26003. },
  26004. "required": ["sessionID", "messageID"],
  26005. "additionalProperties": false
  26006. }
  26007. },
  26008. "required": ["id", "type", "properties"],
  26009. "additionalProperties": false
  26010. },
  26011. "EventMessagePartUpdated": {
  26012. "type": "object",
  26013. "properties": {
  26014. "id": {
  26015. "type": "string",
  26016. "pattern": "^evt_"
  26017. },
  26018. "type": {
  26019. "type": "string",
  26020. "enum": ["message.part.updated"]
  26021. },
  26022. "properties": {
  26023. "type": "object",
  26024. "properties": {
  26025. "sessionID": {
  26026. "type": "string",
  26027. "pattern": "^ses"
  26028. },
  26029. "part": {
  26030. "$ref": "#/components/schemas/Part"
  26031. },
  26032. "time": {
  26033. "type": "number"
  26034. }
  26035. },
  26036. "required": ["sessionID", "part", "time"],
  26037. "additionalProperties": false
  26038. }
  26039. },
  26040. "required": ["id", "type", "properties"],
  26041. "additionalProperties": false
  26042. },
  26043. "EventMessagePartRemoved": {
  26044. "type": "object",
  26045. "properties": {
  26046. "id": {
  26047. "type": "string",
  26048. "pattern": "^evt_"
  26049. },
  26050. "type": {
  26051. "type": "string",
  26052. "enum": ["message.part.removed"]
  26053. },
  26054. "properties": {
  26055. "type": "object",
  26056. "properties": {
  26057. "sessionID": {
  26058. "type": "string",
  26059. "pattern": "^ses"
  26060. },
  26061. "messageID": {
  26062. "type": "string",
  26063. "pattern": "^msg"
  26064. },
  26065. "partID": {
  26066. "type": "string",
  26067. "pattern": "^prt"
  26068. }
  26069. },
  26070. "required": ["sessionID", "messageID", "partID"],
  26071. "additionalProperties": false
  26072. }
  26073. },
  26074. "required": ["id", "type", "properties"],
  26075. "additionalProperties": false
  26076. },
  26077. "EventSessionNextAgentSwitched": {
  26078. "type": "object",
  26079. "properties": {
  26080. "id": {
  26081. "type": "string",
  26082. "pattern": "^evt_"
  26083. },
  26084. "type": {
  26085. "type": "string",
  26086. "enum": ["session.next.agent.switched"]
  26087. },
  26088. "properties": {
  26089. "type": "object",
  26090. "properties": {
  26091. "timestamp": {
  26092. "type": "number"
  26093. },
  26094. "sessionID": {
  26095. "type": "string",
  26096. "pattern": "^ses"
  26097. },
  26098. "messageID": {
  26099. "type": "string",
  26100. "pattern": "^msg_"
  26101. },
  26102. "agent": {
  26103. "type": "string"
  26104. }
  26105. },
  26106. "required": ["timestamp", "sessionID", "messageID", "agent"],
  26107. "additionalProperties": false
  26108. }
  26109. },
  26110. "required": ["id", "type", "properties"],
  26111. "additionalProperties": false
  26112. },
  26113. "EventSessionNextModelSwitched": {
  26114. "type": "object",
  26115. "properties": {
  26116. "id": {
  26117. "type": "string",
  26118. "pattern": "^evt_"
  26119. },
  26120. "type": {
  26121. "type": "string",
  26122. "enum": ["session.next.model.switched"]
  26123. },
  26124. "properties": {
  26125. "type": "object",
  26126. "properties": {
  26127. "timestamp": {
  26128. "type": "number"
  26129. },
  26130. "sessionID": {
  26131. "type": "string",
  26132. "pattern": "^ses"
  26133. },
  26134. "messageID": {
  26135. "type": "string",
  26136. "pattern": "^msg_"
  26137. },
  26138. "model": {
  26139. "type": "object",
  26140. "properties": {
  26141. "id": {
  26142. "type": "string"
  26143. },
  26144. "providerID": {
  26145. "type": "string"
  26146. },
  26147. "variant": {
  26148. "type": "string"
  26149. }
  26150. },
  26151. "required": ["id", "providerID"],
  26152. "additionalProperties": false
  26153. }
  26154. },
  26155. "required": ["timestamp", "sessionID", "messageID", "model"],
  26156. "additionalProperties": false
  26157. }
  26158. },
  26159. "required": ["id", "type", "properties"],
  26160. "additionalProperties": false
  26161. },
  26162. "EventSessionNextMoved": {
  26163. "type": "object",
  26164. "properties": {
  26165. "id": {
  26166. "type": "string",
  26167. "pattern": "^evt_"
  26168. },
  26169. "type": {
  26170. "type": "string",
  26171. "enum": ["session.next.moved"]
  26172. },
  26173. "properties": {
  26174. "type": "object",
  26175. "properties": {
  26176. "timestamp": {
  26177. "type": "number"
  26178. },
  26179. "sessionID": {
  26180. "type": "string",
  26181. "pattern": "^ses"
  26182. },
  26183. "location": {
  26184. "$ref": "#/components/schemas/LocationRef"
  26185. },
  26186. "subdirectory": {
  26187. "type": "string"
  26188. }
  26189. },
  26190. "required": ["timestamp", "sessionID", "location"],
  26191. "additionalProperties": false
  26192. }
  26193. },
  26194. "required": ["id", "type", "properties"],
  26195. "additionalProperties": false
  26196. },
  26197. "EventSessionNextPrompted": {
  26198. "type": "object",
  26199. "properties": {
  26200. "id": {
  26201. "type": "string",
  26202. "pattern": "^evt_"
  26203. },
  26204. "type": {
  26205. "type": "string",
  26206. "enum": ["session.next.prompted"]
  26207. },
  26208. "properties": {
  26209. "type": "object",
  26210. "properties": {
  26211. "timestamp": {
  26212. "type": "number"
  26213. },
  26214. "sessionID": {
  26215. "type": "string",
  26216. "pattern": "^ses"
  26217. },
  26218. "messageID": {
  26219. "type": "string",
  26220. "pattern": "^msg_"
  26221. },
  26222. "prompt": {
  26223. "$ref": "#/components/schemas/Prompt"
  26224. },
  26225. "delivery": {
  26226. "type": "string",
  26227. "enum": ["steer", "queue"]
  26228. }
  26229. },
  26230. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26231. "additionalProperties": false
  26232. }
  26233. },
  26234. "required": ["id", "type", "properties"],
  26235. "additionalProperties": false
  26236. },
  26237. "EventSessionNextPromptAdmitted": {
  26238. "type": "object",
  26239. "properties": {
  26240. "id": {
  26241. "type": "string",
  26242. "pattern": "^evt_"
  26243. },
  26244. "type": {
  26245. "type": "string",
  26246. "enum": ["session.next.prompt.admitted"]
  26247. },
  26248. "properties": {
  26249. "type": "object",
  26250. "properties": {
  26251. "timestamp": {
  26252. "type": "number"
  26253. },
  26254. "sessionID": {
  26255. "type": "string",
  26256. "pattern": "^ses"
  26257. },
  26258. "messageID": {
  26259. "type": "string",
  26260. "pattern": "^msg_"
  26261. },
  26262. "prompt": {
  26263. "$ref": "#/components/schemas/Prompt"
  26264. },
  26265. "delivery": {
  26266. "type": "string",
  26267. "enum": ["steer", "queue"]
  26268. }
  26269. },
  26270. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26271. "additionalProperties": false
  26272. }
  26273. },
  26274. "required": ["id", "type", "properties"],
  26275. "additionalProperties": false
  26276. },
  26277. "EventSessionNextPromptPromoted": {
  26278. "type": "object",
  26279. "properties": {
  26280. "id": {
  26281. "type": "string",
  26282. "pattern": "^evt_"
  26283. },
  26284. "type": {
  26285. "type": "string",
  26286. "enum": ["session.next.prompt.promoted"]
  26287. },
  26288. "properties": {
  26289. "type": "object",
  26290. "properties": {
  26291. "timestamp": {
  26292. "type": "number"
  26293. },
  26294. "sessionID": {
  26295. "type": "string",
  26296. "pattern": "^ses"
  26297. },
  26298. "messageID": {
  26299. "type": "string",
  26300. "pattern": "^msg_"
  26301. },
  26302. "prompt": {
  26303. "$ref": "#/components/schemas/Prompt"
  26304. },
  26305. "timeCreated": {
  26306. "type": "number"
  26307. }
  26308. },
  26309. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  26310. "additionalProperties": false
  26311. }
  26312. },
  26313. "required": ["id", "type", "properties"],
  26314. "additionalProperties": false
  26315. },
  26316. "EventSessionNextInterruptRequested": {
  26317. "type": "object",
  26318. "properties": {
  26319. "id": {
  26320. "type": "string",
  26321. "pattern": "^evt_"
  26322. },
  26323. "type": {
  26324. "type": "string",
  26325. "enum": ["session.next.interrupt.requested"]
  26326. },
  26327. "properties": {
  26328. "type": "object",
  26329. "properties": {
  26330. "timestamp": {
  26331. "type": "number"
  26332. },
  26333. "sessionID": {
  26334. "type": "string",
  26335. "pattern": "^ses"
  26336. }
  26337. },
  26338. "required": ["timestamp", "sessionID"],
  26339. "additionalProperties": false
  26340. }
  26341. },
  26342. "required": ["id", "type", "properties"],
  26343. "additionalProperties": false
  26344. },
  26345. "EventSessionNextContextUpdated": {
  26346. "type": "object",
  26347. "properties": {
  26348. "id": {
  26349. "type": "string",
  26350. "pattern": "^evt_"
  26351. },
  26352. "type": {
  26353. "type": "string",
  26354. "enum": ["session.next.context.updated"]
  26355. },
  26356. "properties": {
  26357. "type": "object",
  26358. "properties": {
  26359. "timestamp": {
  26360. "type": "number"
  26361. },
  26362. "sessionID": {
  26363. "type": "string",
  26364. "pattern": "^ses"
  26365. },
  26366. "messageID": {
  26367. "type": "string",
  26368. "pattern": "^msg_"
  26369. },
  26370. "text": {
  26371. "type": "string"
  26372. }
  26373. },
  26374. "required": ["timestamp", "sessionID", "messageID", "text"],
  26375. "additionalProperties": false
  26376. }
  26377. },
  26378. "required": ["id", "type", "properties"],
  26379. "additionalProperties": false
  26380. },
  26381. "EventSessionNextSynthetic": {
  26382. "type": "object",
  26383. "properties": {
  26384. "id": {
  26385. "type": "string",
  26386. "pattern": "^evt_"
  26387. },
  26388. "type": {
  26389. "type": "string",
  26390. "enum": ["session.next.synthetic"]
  26391. },
  26392. "properties": {
  26393. "type": "object",
  26394. "properties": {
  26395. "timestamp": {
  26396. "type": "number"
  26397. },
  26398. "sessionID": {
  26399. "type": "string",
  26400. "pattern": "^ses"
  26401. },
  26402. "messageID": {
  26403. "type": "string",
  26404. "pattern": "^msg_"
  26405. },
  26406. "text": {
  26407. "type": "string"
  26408. }
  26409. },
  26410. "required": ["timestamp", "sessionID", "messageID", "text"],
  26411. "additionalProperties": false
  26412. }
  26413. },
  26414. "required": ["id", "type", "properties"],
  26415. "additionalProperties": false
  26416. },
  26417. "EventSessionNextShellStarted": {
  26418. "type": "object",
  26419. "properties": {
  26420. "id": {
  26421. "type": "string",
  26422. "pattern": "^evt_"
  26423. },
  26424. "type": {
  26425. "type": "string",
  26426. "enum": ["session.next.shell.started"]
  26427. },
  26428. "properties": {
  26429. "type": "object",
  26430. "properties": {
  26431. "timestamp": {
  26432. "type": "number"
  26433. },
  26434. "sessionID": {
  26435. "type": "string",
  26436. "pattern": "^ses"
  26437. },
  26438. "messageID": {
  26439. "type": "string",
  26440. "pattern": "^msg_"
  26441. },
  26442. "callID": {
  26443. "type": "string"
  26444. },
  26445. "command": {
  26446. "type": "string"
  26447. }
  26448. },
  26449. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  26450. "additionalProperties": false
  26451. }
  26452. },
  26453. "required": ["id", "type", "properties"],
  26454. "additionalProperties": false
  26455. },
  26456. "EventSessionNextShellEnded": {
  26457. "type": "object",
  26458. "properties": {
  26459. "id": {
  26460. "type": "string",
  26461. "pattern": "^evt_"
  26462. },
  26463. "type": {
  26464. "type": "string",
  26465. "enum": ["session.next.shell.ended"]
  26466. },
  26467. "properties": {
  26468. "type": "object",
  26469. "properties": {
  26470. "timestamp": {
  26471. "type": "number"
  26472. },
  26473. "sessionID": {
  26474. "type": "string",
  26475. "pattern": "^ses"
  26476. },
  26477. "callID": {
  26478. "type": "string"
  26479. },
  26480. "output": {
  26481. "type": "string"
  26482. }
  26483. },
  26484. "required": ["timestamp", "sessionID", "callID", "output"],
  26485. "additionalProperties": false
  26486. }
  26487. },
  26488. "required": ["id", "type", "properties"],
  26489. "additionalProperties": false
  26490. },
  26491. "EventSessionNextStepStarted": {
  26492. "type": "object",
  26493. "properties": {
  26494. "id": {
  26495. "type": "string",
  26496. "pattern": "^evt_"
  26497. },
  26498. "type": {
  26499. "type": "string",
  26500. "enum": ["session.next.step.started"]
  26501. },
  26502. "properties": {
  26503. "type": "object",
  26504. "properties": {
  26505. "timestamp": {
  26506. "type": "number"
  26507. },
  26508. "sessionID": {
  26509. "type": "string",
  26510. "pattern": "^ses"
  26511. },
  26512. "assistantMessageID": {
  26513. "type": "string",
  26514. "pattern": "^msg_"
  26515. },
  26516. "agent": {
  26517. "type": "string"
  26518. },
  26519. "model": {
  26520. "type": "object",
  26521. "properties": {
  26522. "id": {
  26523. "type": "string"
  26524. },
  26525. "providerID": {
  26526. "type": "string"
  26527. },
  26528. "variant": {
  26529. "type": "string"
  26530. }
  26531. },
  26532. "required": ["id", "providerID"],
  26533. "additionalProperties": false
  26534. },
  26535. "snapshot": {
  26536. "type": "string"
  26537. }
  26538. },
  26539. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  26540. "additionalProperties": false
  26541. }
  26542. },
  26543. "required": ["id", "type", "properties"],
  26544. "additionalProperties": false
  26545. },
  26546. "EventSessionNextStepEnded": {
  26547. "type": "object",
  26548. "properties": {
  26549. "id": {
  26550. "type": "string",
  26551. "pattern": "^evt_"
  26552. },
  26553. "type": {
  26554. "type": "string",
  26555. "enum": ["session.next.step.ended"]
  26556. },
  26557. "properties": {
  26558. "type": "object",
  26559. "properties": {
  26560. "timestamp": {
  26561. "type": "number"
  26562. },
  26563. "sessionID": {
  26564. "type": "string",
  26565. "pattern": "^ses"
  26566. },
  26567. "assistantMessageID": {
  26568. "type": "string",
  26569. "pattern": "^msg_"
  26570. },
  26571. "finish": {
  26572. "type": "string"
  26573. },
  26574. "cost": {
  26575. "type": "number"
  26576. },
  26577. "tokens": {
  26578. "type": "object",
  26579. "properties": {
  26580. "input": {
  26581. "type": "number"
  26582. },
  26583. "output": {
  26584. "type": "number"
  26585. },
  26586. "reasoning": {
  26587. "type": "number"
  26588. },
  26589. "cache": {
  26590. "type": "object",
  26591. "properties": {
  26592. "read": {
  26593. "type": "number"
  26594. },
  26595. "write": {
  26596. "type": "number"
  26597. }
  26598. },
  26599. "required": ["read", "write"],
  26600. "additionalProperties": false
  26601. }
  26602. },
  26603. "required": ["input", "output", "reasoning", "cache"],
  26604. "additionalProperties": false
  26605. },
  26606. "snapshot": {
  26607. "type": "string"
  26608. }
  26609. },
  26610. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  26611. "additionalProperties": false
  26612. }
  26613. },
  26614. "required": ["id", "type", "properties"],
  26615. "additionalProperties": false
  26616. },
  26617. "EventSessionNextStepFailed": {
  26618. "type": "object",
  26619. "properties": {
  26620. "id": {
  26621. "type": "string",
  26622. "pattern": "^evt_"
  26623. },
  26624. "type": {
  26625. "type": "string",
  26626. "enum": ["session.next.step.failed"]
  26627. },
  26628. "properties": {
  26629. "type": "object",
  26630. "properties": {
  26631. "timestamp": {
  26632. "type": "number"
  26633. },
  26634. "sessionID": {
  26635. "type": "string",
  26636. "pattern": "^ses"
  26637. },
  26638. "assistantMessageID": {
  26639. "type": "string",
  26640. "pattern": "^msg_"
  26641. },
  26642. "error": {
  26643. "$ref": "#/components/schemas/SessionErrorUnknown"
  26644. }
  26645. },
  26646. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  26647. "additionalProperties": false
  26648. }
  26649. },
  26650. "required": ["id", "type", "properties"],
  26651. "additionalProperties": false
  26652. },
  26653. "EventSessionNextTextStarted": {
  26654. "type": "object",
  26655. "properties": {
  26656. "id": {
  26657. "type": "string",
  26658. "pattern": "^evt_"
  26659. },
  26660. "type": {
  26661. "type": "string",
  26662. "enum": ["session.next.text.started"]
  26663. },
  26664. "properties": {
  26665. "type": "object",
  26666. "properties": {
  26667. "timestamp": {
  26668. "type": "number"
  26669. },
  26670. "sessionID": {
  26671. "type": "string",
  26672. "pattern": "^ses"
  26673. },
  26674. "assistantMessageID": {
  26675. "type": "string",
  26676. "pattern": "^msg_"
  26677. },
  26678. "textID": {
  26679. "type": "string"
  26680. }
  26681. },
  26682. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26683. "additionalProperties": false
  26684. }
  26685. },
  26686. "required": ["id", "type", "properties"],
  26687. "additionalProperties": false
  26688. },
  26689. "EventSessionNextTextDelta": {
  26690. "type": "object",
  26691. "properties": {
  26692. "id": {
  26693. "type": "string",
  26694. "pattern": "^evt_"
  26695. },
  26696. "type": {
  26697. "type": "string",
  26698. "enum": ["session.next.text.delta"]
  26699. },
  26700. "properties": {
  26701. "type": "object",
  26702. "properties": {
  26703. "timestamp": {
  26704. "type": "number"
  26705. },
  26706. "sessionID": {
  26707. "type": "string",
  26708. "pattern": "^ses"
  26709. },
  26710. "assistantMessageID": {
  26711. "type": "string",
  26712. "pattern": "^msg_"
  26713. },
  26714. "textID": {
  26715. "type": "string"
  26716. },
  26717. "delta": {
  26718. "type": "string"
  26719. }
  26720. },
  26721. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  26722. "additionalProperties": false
  26723. }
  26724. },
  26725. "required": ["id", "type", "properties"],
  26726. "additionalProperties": false
  26727. },
  26728. "EventSessionNextTextEnded": {
  26729. "type": "object",
  26730. "properties": {
  26731. "id": {
  26732. "type": "string",
  26733. "pattern": "^evt_"
  26734. },
  26735. "type": {
  26736. "type": "string",
  26737. "enum": ["session.next.text.ended"]
  26738. },
  26739. "properties": {
  26740. "type": "object",
  26741. "properties": {
  26742. "timestamp": {
  26743. "type": "number"
  26744. },
  26745. "sessionID": {
  26746. "type": "string",
  26747. "pattern": "^ses"
  26748. },
  26749. "assistantMessageID": {
  26750. "type": "string",
  26751. "pattern": "^msg_"
  26752. },
  26753. "textID": {
  26754. "type": "string"
  26755. },
  26756. "text": {
  26757. "type": "string"
  26758. }
  26759. },
  26760. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26761. "additionalProperties": false
  26762. }
  26763. },
  26764. "required": ["id", "type", "properties"],
  26765. "additionalProperties": false
  26766. },
  26767. "EventSessionNextReasoningStarted": {
  26768. "type": "object",
  26769. "properties": {
  26770. "id": {
  26771. "type": "string",
  26772. "pattern": "^evt_"
  26773. },
  26774. "type": {
  26775. "type": "string",
  26776. "enum": ["session.next.reasoning.started"]
  26777. },
  26778. "properties": {
  26779. "type": "object",
  26780. "properties": {
  26781. "timestamp": {
  26782. "type": "number"
  26783. },
  26784. "sessionID": {
  26785. "type": "string",
  26786. "pattern": "^ses"
  26787. },
  26788. "assistantMessageID": {
  26789. "type": "string",
  26790. "pattern": "^msg_"
  26791. },
  26792. "reasoningID": {
  26793. "type": "string"
  26794. },
  26795. "providerMetadata": {
  26796. "type": "object",
  26797. "additionalProperties": {
  26798. "type": "object"
  26799. }
  26800. }
  26801. },
  26802. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26803. "additionalProperties": false
  26804. }
  26805. },
  26806. "required": ["id", "type", "properties"],
  26807. "additionalProperties": false
  26808. },
  26809. "EventSessionNextReasoningDelta": {
  26810. "type": "object",
  26811. "properties": {
  26812. "id": {
  26813. "type": "string",
  26814. "pattern": "^evt_"
  26815. },
  26816. "type": {
  26817. "type": "string",
  26818. "enum": ["session.next.reasoning.delta"]
  26819. },
  26820. "properties": {
  26821. "type": "object",
  26822. "properties": {
  26823. "timestamp": {
  26824. "type": "number"
  26825. },
  26826. "sessionID": {
  26827. "type": "string",
  26828. "pattern": "^ses"
  26829. },
  26830. "assistantMessageID": {
  26831. "type": "string",
  26832. "pattern": "^msg_"
  26833. },
  26834. "reasoningID": {
  26835. "type": "string"
  26836. },
  26837. "delta": {
  26838. "type": "string"
  26839. }
  26840. },
  26841. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  26842. "additionalProperties": false
  26843. }
  26844. },
  26845. "required": ["id", "type", "properties"],
  26846. "additionalProperties": false
  26847. },
  26848. "EventSessionNextReasoningEnded": {
  26849. "type": "object",
  26850. "properties": {
  26851. "id": {
  26852. "type": "string",
  26853. "pattern": "^evt_"
  26854. },
  26855. "type": {
  26856. "type": "string",
  26857. "enum": ["session.next.reasoning.ended"]
  26858. },
  26859. "properties": {
  26860. "type": "object",
  26861. "properties": {
  26862. "timestamp": {
  26863. "type": "number"
  26864. },
  26865. "sessionID": {
  26866. "type": "string",
  26867. "pattern": "^ses"
  26868. },
  26869. "assistantMessageID": {
  26870. "type": "string",
  26871. "pattern": "^msg_"
  26872. },
  26873. "reasoningID": {
  26874. "type": "string"
  26875. },
  26876. "text": {
  26877. "type": "string"
  26878. },
  26879. "providerMetadata": {
  26880. "type": "object",
  26881. "additionalProperties": {
  26882. "type": "object"
  26883. }
  26884. }
  26885. },
  26886. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26887. "additionalProperties": false
  26888. }
  26889. },
  26890. "required": ["id", "type", "properties"],
  26891. "additionalProperties": false
  26892. },
  26893. "EventSessionNextToolInputStarted": {
  26894. "type": "object",
  26895. "properties": {
  26896. "id": {
  26897. "type": "string",
  26898. "pattern": "^evt_"
  26899. },
  26900. "type": {
  26901. "type": "string",
  26902. "enum": ["session.next.tool.input.started"]
  26903. },
  26904. "properties": {
  26905. "type": "object",
  26906. "properties": {
  26907. "timestamp": {
  26908. "type": "number"
  26909. },
  26910. "sessionID": {
  26911. "type": "string",
  26912. "pattern": "^ses"
  26913. },
  26914. "assistantMessageID": {
  26915. "type": "string",
  26916. "pattern": "^msg_"
  26917. },
  26918. "callID": {
  26919. "type": "string"
  26920. },
  26921. "name": {
  26922. "type": "string"
  26923. }
  26924. },
  26925. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26926. "additionalProperties": false
  26927. }
  26928. },
  26929. "required": ["id", "type", "properties"],
  26930. "additionalProperties": false
  26931. },
  26932. "EventSessionNextToolInputDelta": {
  26933. "type": "object",
  26934. "properties": {
  26935. "id": {
  26936. "type": "string",
  26937. "pattern": "^evt_"
  26938. },
  26939. "type": {
  26940. "type": "string",
  26941. "enum": ["session.next.tool.input.delta"]
  26942. },
  26943. "properties": {
  26944. "type": "object",
  26945. "properties": {
  26946. "timestamp": {
  26947. "type": "number"
  26948. },
  26949. "sessionID": {
  26950. "type": "string",
  26951. "pattern": "^ses"
  26952. },
  26953. "assistantMessageID": {
  26954. "type": "string",
  26955. "pattern": "^msg_"
  26956. },
  26957. "callID": {
  26958. "type": "string"
  26959. },
  26960. "delta": {
  26961. "type": "string"
  26962. }
  26963. },
  26964. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  26965. "additionalProperties": false
  26966. }
  26967. },
  26968. "required": ["id", "type", "properties"],
  26969. "additionalProperties": false
  26970. },
  26971. "EventSessionNextToolInputEnded": {
  26972. "type": "object",
  26973. "properties": {
  26974. "id": {
  26975. "type": "string",
  26976. "pattern": "^evt_"
  26977. },
  26978. "type": {
  26979. "type": "string",
  26980. "enum": ["session.next.tool.input.ended"]
  26981. },
  26982. "properties": {
  26983. "type": "object",
  26984. "properties": {
  26985. "timestamp": {
  26986. "type": "number"
  26987. },
  26988. "sessionID": {
  26989. "type": "string",
  26990. "pattern": "^ses"
  26991. },
  26992. "assistantMessageID": {
  26993. "type": "string",
  26994. "pattern": "^msg_"
  26995. },
  26996. "callID": {
  26997. "type": "string"
  26998. },
  26999. "text": {
  27000. "type": "string"
  27001. }
  27002. },
  27003. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  27004. "additionalProperties": false
  27005. }
  27006. },
  27007. "required": ["id", "type", "properties"],
  27008. "additionalProperties": false
  27009. },
  27010. "EventSessionNextToolCalled": {
  27011. "type": "object",
  27012. "properties": {
  27013. "id": {
  27014. "type": "string",
  27015. "pattern": "^evt_"
  27016. },
  27017. "type": {
  27018. "type": "string",
  27019. "enum": ["session.next.tool.called"]
  27020. },
  27021. "properties": {
  27022. "type": "object",
  27023. "properties": {
  27024. "timestamp": {
  27025. "type": "number"
  27026. },
  27027. "sessionID": {
  27028. "type": "string",
  27029. "pattern": "^ses"
  27030. },
  27031. "assistantMessageID": {
  27032. "type": "string",
  27033. "pattern": "^msg_"
  27034. },
  27035. "callID": {
  27036. "type": "string"
  27037. },
  27038. "tool": {
  27039. "type": "string"
  27040. },
  27041. "input": {
  27042. "type": "object"
  27043. },
  27044. "provider": {
  27045. "type": "object",
  27046. "properties": {
  27047. "executed": {
  27048. "type": "boolean"
  27049. },
  27050. "metadata": {
  27051. "type": "object",
  27052. "additionalProperties": {
  27053. "type": "object"
  27054. }
  27055. }
  27056. },
  27057. "required": ["executed"],
  27058. "additionalProperties": false
  27059. }
  27060. },
  27061. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  27062. "additionalProperties": false
  27063. }
  27064. },
  27065. "required": ["id", "type", "properties"],
  27066. "additionalProperties": false
  27067. },
  27068. "EventSessionNextToolProgress": {
  27069. "type": "object",
  27070. "properties": {
  27071. "id": {
  27072. "type": "string",
  27073. "pattern": "^evt_"
  27074. },
  27075. "type": {
  27076. "type": "string",
  27077. "enum": ["session.next.tool.progress"]
  27078. },
  27079. "properties": {
  27080. "type": "object",
  27081. "properties": {
  27082. "timestamp": {
  27083. "type": "number"
  27084. },
  27085. "sessionID": {
  27086. "type": "string",
  27087. "pattern": "^ses"
  27088. },
  27089. "assistantMessageID": {
  27090. "type": "string",
  27091. "pattern": "^msg_"
  27092. },
  27093. "callID": {
  27094. "type": "string"
  27095. },
  27096. "structured": {
  27097. "type": "object"
  27098. },
  27099. "content": {
  27100. "type": "array",
  27101. "items": {
  27102. "anyOf": [
  27103. {
  27104. "$ref": "#/components/schemas/ToolTextContent"
  27105. },
  27106. {
  27107. "$ref": "#/components/schemas/ToolFileContent"
  27108. }
  27109. ]
  27110. }
  27111. }
  27112. },
  27113. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  27114. "additionalProperties": false
  27115. }
  27116. },
  27117. "required": ["id", "type", "properties"],
  27118. "additionalProperties": false
  27119. },
  27120. "EventSessionNextToolSuccess": {
  27121. "type": "object",
  27122. "properties": {
  27123. "id": {
  27124. "type": "string",
  27125. "pattern": "^evt_"
  27126. },
  27127. "type": {
  27128. "type": "string",
  27129. "enum": ["session.next.tool.success"]
  27130. },
  27131. "properties": {
  27132. "type": "object",
  27133. "properties": {
  27134. "timestamp": {
  27135. "type": "number"
  27136. },
  27137. "sessionID": {
  27138. "type": "string",
  27139. "pattern": "^ses"
  27140. },
  27141. "assistantMessageID": {
  27142. "type": "string",
  27143. "pattern": "^msg_"
  27144. },
  27145. "callID": {
  27146. "type": "string"
  27147. },
  27148. "structured": {
  27149. "type": "object"
  27150. },
  27151. "content": {
  27152. "type": "array",
  27153. "items": {
  27154. "anyOf": [
  27155. {
  27156. "$ref": "#/components/schemas/ToolTextContent"
  27157. },
  27158. {
  27159. "$ref": "#/components/schemas/ToolFileContent"
  27160. }
  27161. ]
  27162. }
  27163. },
  27164. "outputPaths": {
  27165. "type": "array",
  27166. "items": {
  27167. "type": "string"
  27168. }
  27169. },
  27170. "result": {},
  27171. "provider": {
  27172. "type": "object",
  27173. "properties": {
  27174. "executed": {
  27175. "type": "boolean"
  27176. },
  27177. "metadata": {
  27178. "type": "object",
  27179. "additionalProperties": {
  27180. "type": "object"
  27181. }
  27182. }
  27183. },
  27184. "required": ["executed"],
  27185. "additionalProperties": false
  27186. }
  27187. },
  27188. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  27189. "additionalProperties": false
  27190. }
  27191. },
  27192. "required": ["id", "type", "properties"],
  27193. "additionalProperties": false
  27194. },
  27195. "EventSessionNextToolFailed": {
  27196. "type": "object",
  27197. "properties": {
  27198. "id": {
  27199. "type": "string",
  27200. "pattern": "^evt_"
  27201. },
  27202. "type": {
  27203. "type": "string",
  27204. "enum": ["session.next.tool.failed"]
  27205. },
  27206. "properties": {
  27207. "type": "object",
  27208. "properties": {
  27209. "timestamp": {
  27210. "type": "number"
  27211. },
  27212. "sessionID": {
  27213. "type": "string",
  27214. "pattern": "^ses"
  27215. },
  27216. "assistantMessageID": {
  27217. "type": "string",
  27218. "pattern": "^msg_"
  27219. },
  27220. "callID": {
  27221. "type": "string"
  27222. },
  27223. "error": {
  27224. "$ref": "#/components/schemas/SessionErrorUnknown"
  27225. },
  27226. "result": {},
  27227. "provider": {
  27228. "type": "object",
  27229. "properties": {
  27230. "executed": {
  27231. "type": "boolean"
  27232. },
  27233. "metadata": {
  27234. "type": "object",
  27235. "additionalProperties": {
  27236. "type": "object"
  27237. }
  27238. }
  27239. },
  27240. "required": ["executed"],
  27241. "additionalProperties": false
  27242. }
  27243. },
  27244. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  27245. "additionalProperties": false
  27246. }
  27247. },
  27248. "required": ["id", "type", "properties"],
  27249. "additionalProperties": false
  27250. },
  27251. "EventSessionNextRetried": {
  27252. "type": "object",
  27253. "properties": {
  27254. "id": {
  27255. "type": "string",
  27256. "pattern": "^evt_"
  27257. },
  27258. "type": {
  27259. "type": "string",
  27260. "enum": ["session.next.retried"]
  27261. },
  27262. "properties": {
  27263. "type": "object",
  27264. "properties": {
  27265. "timestamp": {
  27266. "type": "number"
  27267. },
  27268. "sessionID": {
  27269. "type": "string",
  27270. "pattern": "^ses"
  27271. },
  27272. "attempt": {
  27273. "type": "number"
  27274. },
  27275. "error": {
  27276. "$ref": "#/components/schemas/SessionNextRetry_error"
  27277. }
  27278. },
  27279. "required": ["timestamp", "sessionID", "attempt", "error"],
  27280. "additionalProperties": false
  27281. }
  27282. },
  27283. "required": ["id", "type", "properties"],
  27284. "additionalProperties": false
  27285. },
  27286. "EventSessionNextCompactionStarted": {
  27287. "type": "object",
  27288. "properties": {
  27289. "id": {
  27290. "type": "string",
  27291. "pattern": "^evt_"
  27292. },
  27293. "type": {
  27294. "type": "string",
  27295. "enum": ["session.next.compaction.started"]
  27296. },
  27297. "properties": {
  27298. "type": "object",
  27299. "properties": {
  27300. "timestamp": {
  27301. "type": "number"
  27302. },
  27303. "sessionID": {
  27304. "type": "string",
  27305. "pattern": "^ses"
  27306. },
  27307. "messageID": {
  27308. "type": "string",
  27309. "pattern": "^msg_"
  27310. },
  27311. "reason": {
  27312. "type": "string",
  27313. "enum": ["auto", "manual"]
  27314. }
  27315. },
  27316. "required": ["timestamp", "sessionID", "messageID", "reason"],
  27317. "additionalProperties": false
  27318. }
  27319. },
  27320. "required": ["id", "type", "properties"],
  27321. "additionalProperties": false
  27322. },
  27323. "EventSessionNextCompactionDelta": {
  27324. "type": "object",
  27325. "properties": {
  27326. "id": {
  27327. "type": "string",
  27328. "pattern": "^evt_"
  27329. },
  27330. "type": {
  27331. "type": "string",
  27332. "enum": ["session.next.compaction.delta"]
  27333. },
  27334. "properties": {
  27335. "type": "object",
  27336. "properties": {
  27337. "timestamp": {
  27338. "type": "number"
  27339. },
  27340. "sessionID": {
  27341. "type": "string",
  27342. "pattern": "^ses"
  27343. },
  27344. "messageID": {
  27345. "type": "string",
  27346. "pattern": "^msg_"
  27347. },
  27348. "text": {
  27349. "type": "string"
  27350. }
  27351. },
  27352. "required": ["timestamp", "sessionID", "messageID", "text"],
  27353. "additionalProperties": false
  27354. }
  27355. },
  27356. "required": ["id", "type", "properties"],
  27357. "additionalProperties": false
  27358. },
  27359. "EventSessionNextCompactionEnded": {
  27360. "type": "object",
  27361. "properties": {
  27362. "id": {
  27363. "type": "string",
  27364. "pattern": "^evt_"
  27365. },
  27366. "type": {
  27367. "type": "string",
  27368. "enum": ["session.next.compaction.ended"]
  27369. },
  27370. "properties": {
  27371. "type": "object",
  27372. "properties": {
  27373. "timestamp": {
  27374. "type": "number"
  27375. },
  27376. "sessionID": {
  27377. "type": "string",
  27378. "pattern": "^ses"
  27379. },
  27380. "messageID": {
  27381. "type": "string",
  27382. "pattern": "^msg_"
  27383. },
  27384. "reason": {
  27385. "type": "string",
  27386. "enum": ["auto", "manual"]
  27387. },
  27388. "text": {
  27389. "type": "string"
  27390. },
  27391. "recent": {
  27392. "type": "string"
  27393. }
  27394. },
  27395. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  27396. "additionalProperties": false
  27397. }
  27398. },
  27399. "required": ["id", "type", "properties"],
  27400. "additionalProperties": false
  27401. },
  27402. "EventMessagePartDelta": {
  27403. "type": "object",
  27404. "properties": {
  27405. "id": {
  27406. "type": "string",
  27407. "pattern": "^evt_"
  27408. },
  27409. "type": {
  27410. "type": "string",
  27411. "enum": ["message.part.delta"]
  27412. },
  27413. "properties": {
  27414. "type": "object",
  27415. "properties": {
  27416. "sessionID": {
  27417. "type": "string",
  27418. "pattern": "^ses"
  27419. },
  27420. "messageID": {
  27421. "type": "string",
  27422. "pattern": "^msg"
  27423. },
  27424. "partID": {
  27425. "type": "string",
  27426. "pattern": "^prt"
  27427. },
  27428. "field": {
  27429. "type": "string"
  27430. },
  27431. "delta": {
  27432. "type": "string"
  27433. }
  27434. },
  27435. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  27436. "additionalProperties": false
  27437. }
  27438. },
  27439. "required": ["id", "type", "properties"],
  27440. "additionalProperties": false
  27441. },
  27442. "EventSessionDiff": {
  27443. "type": "object",
  27444. "properties": {
  27445. "id": {
  27446. "type": "string",
  27447. "pattern": "^evt_"
  27448. },
  27449. "type": {
  27450. "type": "string",
  27451. "enum": ["session.diff"]
  27452. },
  27453. "properties": {
  27454. "type": "object",
  27455. "properties": {
  27456. "sessionID": {
  27457. "type": "string",
  27458. "pattern": "^ses"
  27459. },
  27460. "diff": {
  27461. "type": "array",
  27462. "items": {
  27463. "$ref": "#/components/schemas/SnapshotFileDiff"
  27464. }
  27465. }
  27466. },
  27467. "required": ["sessionID", "diff"],
  27468. "additionalProperties": false
  27469. }
  27470. },
  27471. "required": ["id", "type", "properties"],
  27472. "additionalProperties": false
  27473. },
  27474. "EventSessionError": {
  27475. "type": "object",
  27476. "properties": {
  27477. "id": {
  27478. "type": "string",
  27479. "pattern": "^evt_"
  27480. },
  27481. "type": {
  27482. "type": "string",
  27483. "enum": ["session.error"]
  27484. },
  27485. "properties": {
  27486. "type": "object",
  27487. "properties": {
  27488. "sessionID": {
  27489. "type": "string",
  27490. "pattern": "^ses"
  27491. },
  27492. "error": {
  27493. "anyOf": [
  27494. {
  27495. "$ref": "#/components/schemas/ProviderAuthError"
  27496. },
  27497. {
  27498. "$ref": "#/components/schemas/UnknownError"
  27499. },
  27500. {
  27501. "$ref": "#/components/schemas/MessageOutputLengthError"
  27502. },
  27503. {
  27504. "$ref": "#/components/schemas/MessageAbortedError"
  27505. },
  27506. {
  27507. "$ref": "#/components/schemas/StructuredOutputError"
  27508. },
  27509. {
  27510. "$ref": "#/components/schemas/ContextOverflowError"
  27511. },
  27512. {
  27513. "$ref": "#/components/schemas/APIError"
  27514. }
  27515. ]
  27516. }
  27517. },
  27518. "additionalProperties": false
  27519. }
  27520. },
  27521. "required": ["id", "type", "properties"],
  27522. "additionalProperties": false
  27523. },
  27524. "EventInstallationUpdated": {
  27525. "type": "object",
  27526. "properties": {
  27527. "id": {
  27528. "type": "string",
  27529. "pattern": "^evt_"
  27530. },
  27531. "type": {
  27532. "type": "string",
  27533. "enum": ["installation.updated"]
  27534. },
  27535. "properties": {
  27536. "type": "object",
  27537. "properties": {
  27538. "version": {
  27539. "type": "string"
  27540. }
  27541. },
  27542. "required": ["version"],
  27543. "additionalProperties": false
  27544. }
  27545. },
  27546. "required": ["id", "type", "properties"],
  27547. "additionalProperties": false
  27548. },
  27549. "EventInstallationUpdate-available": {
  27550. "type": "object",
  27551. "properties": {
  27552. "id": {
  27553. "type": "string",
  27554. "pattern": "^evt_"
  27555. },
  27556. "type": {
  27557. "type": "string",
  27558. "enum": ["installation.update-available"]
  27559. },
  27560. "properties": {
  27561. "type": "object",
  27562. "properties": {
  27563. "version": {
  27564. "type": "string"
  27565. }
  27566. },
  27567. "required": ["version"],
  27568. "additionalProperties": false
  27569. }
  27570. },
  27571. "required": ["id", "type", "properties"],
  27572. "additionalProperties": false
  27573. },
  27574. "EventFileEdited": {
  27575. "type": "object",
  27576. "properties": {
  27577. "id": {
  27578. "type": "string",
  27579. "pattern": "^evt_"
  27580. },
  27581. "type": {
  27582. "type": "string",
  27583. "enum": ["file.edited"]
  27584. },
  27585. "properties": {
  27586. "type": "object",
  27587. "properties": {
  27588. "file": {
  27589. "type": "string"
  27590. }
  27591. },
  27592. "required": ["file"],
  27593. "additionalProperties": false
  27594. }
  27595. },
  27596. "required": ["id", "type", "properties"],
  27597. "additionalProperties": false
  27598. },
  27599. "EventAccountAdded": {
  27600. "type": "object",
  27601. "properties": {
  27602. "id": {
  27603. "type": "string",
  27604. "pattern": "^evt_"
  27605. },
  27606. "type": {
  27607. "type": "string",
  27608. "enum": ["account.added"]
  27609. },
  27610. "properties": {
  27611. "type": "object",
  27612. "properties": {
  27613. "account": {
  27614. "$ref": "#/components/schemas/AuthInfo"
  27615. }
  27616. },
  27617. "required": ["account"],
  27618. "additionalProperties": false
  27619. }
  27620. },
  27621. "required": ["id", "type", "properties"],
  27622. "additionalProperties": false
  27623. },
  27624. "EventAccountRemoved": {
  27625. "type": "object",
  27626. "properties": {
  27627. "id": {
  27628. "type": "string",
  27629. "pattern": "^evt_"
  27630. },
  27631. "type": {
  27632. "type": "string",
  27633. "enum": ["account.removed"]
  27634. },
  27635. "properties": {
  27636. "type": "object",
  27637. "properties": {
  27638. "account": {
  27639. "$ref": "#/components/schemas/AuthInfo"
  27640. }
  27641. },
  27642. "required": ["account"],
  27643. "additionalProperties": false
  27644. }
  27645. },
  27646. "required": ["id", "type", "properties"],
  27647. "additionalProperties": false
  27648. },
  27649. "EventAccountSwitched": {
  27650. "type": "object",
  27651. "properties": {
  27652. "id": {
  27653. "type": "string",
  27654. "pattern": "^evt_"
  27655. },
  27656. "type": {
  27657. "type": "string",
  27658. "enum": ["account.switched"]
  27659. },
  27660. "properties": {
  27661. "type": "object",
  27662. "properties": {
  27663. "serviceID": {
  27664. "type": "string"
  27665. },
  27666. "from": {
  27667. "type": "string"
  27668. },
  27669. "to": {
  27670. "type": "string"
  27671. }
  27672. },
  27673. "required": ["serviceID"],
  27674. "additionalProperties": false
  27675. }
  27676. },
  27677. "required": ["id", "type", "properties"],
  27678. "additionalProperties": false
  27679. },
  27680. "EventPermissionV2Asked": {
  27681. "type": "object",
  27682. "properties": {
  27683. "id": {
  27684. "type": "string",
  27685. "pattern": "^evt_"
  27686. },
  27687. "type": {
  27688. "type": "string",
  27689. "enum": ["permission.v2.asked"]
  27690. },
  27691. "properties": {
  27692. "type": "object",
  27693. "properties": {
  27694. "id": {
  27695. "type": "string",
  27696. "pattern": "^per"
  27697. },
  27698. "sessionID": {
  27699. "type": "string",
  27700. "pattern": "^ses"
  27701. },
  27702. "action": {
  27703. "type": "string"
  27704. },
  27705. "resources": {
  27706. "type": "array",
  27707. "items": {
  27708. "type": "string"
  27709. }
  27710. },
  27711. "save": {
  27712. "type": "array",
  27713. "items": {
  27714. "type": "string"
  27715. }
  27716. },
  27717. "metadata": {
  27718. "type": "object"
  27719. },
  27720. "source": {
  27721. "$ref": "#/components/schemas/PermissionV2Source"
  27722. }
  27723. },
  27724. "required": ["id", "sessionID", "action", "resources"],
  27725. "additionalProperties": false
  27726. }
  27727. },
  27728. "required": ["id", "type", "properties"],
  27729. "additionalProperties": false
  27730. },
  27731. "EventPermissionV2Replied": {
  27732. "type": "object",
  27733. "properties": {
  27734. "id": {
  27735. "type": "string",
  27736. "pattern": "^evt_"
  27737. },
  27738. "type": {
  27739. "type": "string",
  27740. "enum": ["permission.v2.replied"]
  27741. },
  27742. "properties": {
  27743. "type": "object",
  27744. "properties": {
  27745. "sessionID": {
  27746. "type": "string",
  27747. "pattern": "^ses"
  27748. },
  27749. "requestID": {
  27750. "type": "string",
  27751. "pattern": "^per"
  27752. },
  27753. "reply": {
  27754. "$ref": "#/components/schemas/PermissionV2Reply"
  27755. }
  27756. },
  27757. "required": ["sessionID", "requestID", "reply"],
  27758. "additionalProperties": false
  27759. }
  27760. },
  27761. "required": ["id", "type", "properties"],
  27762. "additionalProperties": false
  27763. },
  27764. "EventReferenceUpdated": {
  27765. "type": "object",
  27766. "properties": {
  27767. "id": {
  27768. "type": "string",
  27769. "pattern": "^evt_"
  27770. },
  27771. "type": {
  27772. "type": "string",
  27773. "enum": ["reference.updated"]
  27774. },
  27775. "properties": {
  27776. "type": "object",
  27777. "properties": {}
  27778. }
  27779. },
  27780. "required": ["id", "type", "properties"],
  27781. "additionalProperties": false
  27782. },
  27783. "EventFileWatcherUpdated": {
  27784. "type": "object",
  27785. "properties": {
  27786. "id": {
  27787. "type": "string",
  27788. "pattern": "^evt_"
  27789. },
  27790. "type": {
  27791. "type": "string",
  27792. "enum": ["file.watcher.updated"]
  27793. },
  27794. "properties": {
  27795. "type": "object",
  27796. "properties": {
  27797. "file": {
  27798. "type": "string"
  27799. },
  27800. "event": {
  27801. "type": "string",
  27802. "enum": ["add", "change", "unlink"]
  27803. }
  27804. },
  27805. "required": ["file", "event"],
  27806. "additionalProperties": false
  27807. }
  27808. },
  27809. "required": ["id", "type", "properties"],
  27810. "additionalProperties": false
  27811. },
  27812. "EventPtyCreated": {
  27813. "type": "object",
  27814. "properties": {
  27815. "id": {
  27816. "type": "string",
  27817. "pattern": "^evt_"
  27818. },
  27819. "type": {
  27820. "type": "string",
  27821. "enum": ["pty.created"]
  27822. },
  27823. "properties": {
  27824. "type": "object",
  27825. "properties": {
  27826. "info": {
  27827. "$ref": "#/components/schemas/Pty"
  27828. }
  27829. },
  27830. "required": ["info"],
  27831. "additionalProperties": false
  27832. }
  27833. },
  27834. "required": ["id", "type", "properties"],
  27835. "additionalProperties": false
  27836. },
  27837. "EventPtyUpdated": {
  27838. "type": "object",
  27839. "properties": {
  27840. "id": {
  27841. "type": "string",
  27842. "pattern": "^evt_"
  27843. },
  27844. "type": {
  27845. "type": "string",
  27846. "enum": ["pty.updated"]
  27847. },
  27848. "properties": {
  27849. "type": "object",
  27850. "properties": {
  27851. "info": {
  27852. "$ref": "#/components/schemas/Pty"
  27853. }
  27854. },
  27855. "required": ["info"],
  27856. "additionalProperties": false
  27857. }
  27858. },
  27859. "required": ["id", "type", "properties"],
  27860. "additionalProperties": false
  27861. },
  27862. "EventPtyExited": {
  27863. "type": "object",
  27864. "properties": {
  27865. "id": {
  27866. "type": "string",
  27867. "pattern": "^evt_"
  27868. },
  27869. "type": {
  27870. "type": "string",
  27871. "enum": ["pty.exited"]
  27872. },
  27873. "properties": {
  27874. "type": "object",
  27875. "properties": {
  27876. "id": {
  27877. "type": "string",
  27878. "pattern": "^pty"
  27879. },
  27880. "exitCode": {
  27881. "type": "integer",
  27882. "minimum": 0
  27883. }
  27884. },
  27885. "required": ["id", "exitCode"],
  27886. "additionalProperties": false
  27887. }
  27888. },
  27889. "required": ["id", "type", "properties"],
  27890. "additionalProperties": false
  27891. },
  27892. "EventPtyDeleted": {
  27893. "type": "object",
  27894. "properties": {
  27895. "id": {
  27896. "type": "string",
  27897. "pattern": "^evt_"
  27898. },
  27899. "type": {
  27900. "type": "string",
  27901. "enum": ["pty.deleted"]
  27902. },
  27903. "properties": {
  27904. "type": "object",
  27905. "properties": {
  27906. "id": {
  27907. "type": "string",
  27908. "pattern": "^pty"
  27909. }
  27910. },
  27911. "required": ["id"],
  27912. "additionalProperties": false
  27913. }
  27914. },
  27915. "required": ["id", "type", "properties"],
  27916. "additionalProperties": false
  27917. },
  27918. "EventQuestionV2Asked": {
  27919. "type": "object",
  27920. "properties": {
  27921. "id": {
  27922. "type": "string",
  27923. "pattern": "^evt_"
  27924. },
  27925. "type": {
  27926. "type": "string",
  27927. "enum": ["question.v2.asked"]
  27928. },
  27929. "properties": {
  27930. "type": "object",
  27931. "properties": {
  27932. "id": {
  27933. "type": "string",
  27934. "pattern": "^que"
  27935. },
  27936. "sessionID": {
  27937. "type": "string",
  27938. "pattern": "^ses"
  27939. },
  27940. "questions": {
  27941. "type": "array",
  27942. "items": {
  27943. "$ref": "#/components/schemas/QuestionV2Info"
  27944. },
  27945. "description": "Questions to ask"
  27946. },
  27947. "tool": {
  27948. "$ref": "#/components/schemas/QuestionV2Tool"
  27949. }
  27950. },
  27951. "required": ["id", "sessionID", "questions"],
  27952. "additionalProperties": false
  27953. }
  27954. },
  27955. "required": ["id", "type", "properties"],
  27956. "additionalProperties": false
  27957. },
  27958. "EventQuestionV2Replied": {
  27959. "type": "object",
  27960. "properties": {
  27961. "id": {
  27962. "type": "string",
  27963. "pattern": "^evt_"
  27964. },
  27965. "type": {
  27966. "type": "string",
  27967. "enum": ["question.v2.replied"]
  27968. },
  27969. "properties": {
  27970. "type": "object",
  27971. "properties": {
  27972. "sessionID": {
  27973. "type": "string",
  27974. "pattern": "^ses"
  27975. },
  27976. "requestID": {
  27977. "type": "string",
  27978. "pattern": "^que"
  27979. },
  27980. "answers": {
  27981. "type": "array",
  27982. "items": {
  27983. "$ref": "#/components/schemas/QuestionV2Answer"
  27984. }
  27985. }
  27986. },
  27987. "required": ["sessionID", "requestID", "answers"],
  27988. "additionalProperties": false
  27989. }
  27990. },
  27991. "required": ["id", "type", "properties"],
  27992. "additionalProperties": false
  27993. },
  27994. "EventQuestionV2Rejected": {
  27995. "type": "object",
  27996. "properties": {
  27997. "id": {
  27998. "type": "string",
  27999. "pattern": "^evt_"
  28000. },
  28001. "type": {
  28002. "type": "string",
  28003. "enum": ["question.v2.rejected"]
  28004. },
  28005. "properties": {
  28006. "type": "object",
  28007. "properties": {
  28008. "sessionID": {
  28009. "type": "string",
  28010. "pattern": "^ses"
  28011. },
  28012. "requestID": {
  28013. "type": "string",
  28014. "pattern": "^que"
  28015. }
  28016. },
  28017. "required": ["sessionID", "requestID"],
  28018. "additionalProperties": false
  28019. }
  28020. },
  28021. "required": ["id", "type", "properties"],
  28022. "additionalProperties": false
  28023. },
  28024. "EventTodoUpdated": {
  28025. "type": "object",
  28026. "properties": {
  28027. "id": {
  28028. "type": "string",
  28029. "pattern": "^evt_"
  28030. },
  28031. "type": {
  28032. "type": "string",
  28033. "enum": ["todo.updated"]
  28034. },
  28035. "properties": {
  28036. "type": "object",
  28037. "properties": {
  28038. "sessionID": {
  28039. "type": "string",
  28040. "pattern": "^ses"
  28041. },
  28042. "todos": {
  28043. "type": "array",
  28044. "items": {
  28045. "$ref": "#/components/schemas/Todo"
  28046. }
  28047. }
  28048. },
  28049. "required": ["sessionID", "todos"],
  28050. "additionalProperties": false
  28051. }
  28052. },
  28053. "required": ["id", "type", "properties"],
  28054. "additionalProperties": false
  28055. },
  28056. "EventLspUpdated": {
  28057. "type": "object",
  28058. "properties": {
  28059. "id": {
  28060. "type": "string",
  28061. "pattern": "^evt_"
  28062. },
  28063. "type": {
  28064. "type": "string",
  28065. "enum": ["lsp.updated"]
  28066. },
  28067. "properties": {
  28068. "type": "object",
  28069. "properties": {}
  28070. }
  28071. },
  28072. "required": ["id", "type", "properties"],
  28073. "additionalProperties": false
  28074. },
  28075. "EventPermissionAsked": {
  28076. "type": "object",
  28077. "properties": {
  28078. "id": {
  28079. "type": "string",
  28080. "pattern": "^evt_"
  28081. },
  28082. "type": {
  28083. "type": "string",
  28084. "enum": ["permission.asked"]
  28085. },
  28086. "properties": {
  28087. "type": "object",
  28088. "properties": {
  28089. "id": {
  28090. "type": "string",
  28091. "pattern": "^per"
  28092. },
  28093. "sessionID": {
  28094. "type": "string",
  28095. "pattern": "^ses"
  28096. },
  28097. "permission": {
  28098. "type": "string"
  28099. },
  28100. "patterns": {
  28101. "type": "array",
  28102. "items": {
  28103. "type": "string"
  28104. }
  28105. },
  28106. "metadata": {
  28107. "type": "object"
  28108. },
  28109. "always": {
  28110. "type": "array",
  28111. "items": {
  28112. "type": "string"
  28113. }
  28114. },
  28115. "tool": {
  28116. "type": "object",
  28117. "properties": {
  28118. "messageID": {
  28119. "type": "string"
  28120. },
  28121. "callID": {
  28122. "type": "string"
  28123. }
  28124. },
  28125. "required": ["messageID", "callID"],
  28126. "additionalProperties": false
  28127. }
  28128. },
  28129. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  28130. "additionalProperties": false
  28131. }
  28132. },
  28133. "required": ["id", "type", "properties"],
  28134. "additionalProperties": false
  28135. },
  28136. "EventPermissionReplied": {
  28137. "type": "object",
  28138. "properties": {
  28139. "id": {
  28140. "type": "string",
  28141. "pattern": "^evt_"
  28142. },
  28143. "type": {
  28144. "type": "string",
  28145. "enum": ["permission.replied"]
  28146. },
  28147. "properties": {
  28148. "type": "object",
  28149. "properties": {
  28150. "sessionID": {
  28151. "type": "string",
  28152. "pattern": "^ses"
  28153. },
  28154. "requestID": {
  28155. "type": "string",
  28156. "pattern": "^per"
  28157. },
  28158. "reply": {
  28159. "type": "string",
  28160. "enum": ["once", "always", "reject"]
  28161. }
  28162. },
  28163. "required": ["sessionID", "requestID", "reply"],
  28164. "additionalProperties": false
  28165. }
  28166. },
  28167. "required": ["id", "type", "properties"],
  28168. "additionalProperties": false
  28169. },
  28170. "EventMcpToolsChanged": {
  28171. "type": "object",
  28172. "properties": {
  28173. "id": {
  28174. "type": "string",
  28175. "pattern": "^evt_"
  28176. },
  28177. "type": {
  28178. "type": "string",
  28179. "enum": ["mcp.tools.changed"]
  28180. },
  28181. "properties": {
  28182. "type": "object",
  28183. "properties": {
  28184. "server": {
  28185. "type": "string"
  28186. }
  28187. },
  28188. "required": ["server"],
  28189. "additionalProperties": false
  28190. }
  28191. },
  28192. "required": ["id", "type", "properties"],
  28193. "additionalProperties": false
  28194. },
  28195. "EventMcpBrowserOpenFailed": {
  28196. "type": "object",
  28197. "properties": {
  28198. "id": {
  28199. "type": "string",
  28200. "pattern": "^evt_"
  28201. },
  28202. "type": {
  28203. "type": "string",
  28204. "enum": ["mcp.browser.open.failed"]
  28205. },
  28206. "properties": {
  28207. "type": "object",
  28208. "properties": {
  28209. "mcpName": {
  28210. "type": "string"
  28211. },
  28212. "url": {
  28213. "type": "string"
  28214. }
  28215. },
  28216. "required": ["mcpName", "url"],
  28217. "additionalProperties": false
  28218. }
  28219. },
  28220. "required": ["id", "type", "properties"],
  28221. "additionalProperties": false
  28222. },
  28223. "EventCommandExecuted": {
  28224. "type": "object",
  28225. "properties": {
  28226. "id": {
  28227. "type": "string",
  28228. "pattern": "^evt_"
  28229. },
  28230. "type": {
  28231. "type": "string",
  28232. "enum": ["command.executed"]
  28233. },
  28234. "properties": {
  28235. "type": "object",
  28236. "properties": {
  28237. "name": {
  28238. "type": "string"
  28239. },
  28240. "sessionID": {
  28241. "type": "string",
  28242. "pattern": "^ses"
  28243. },
  28244. "arguments": {
  28245. "type": "string"
  28246. },
  28247. "messageID": {
  28248. "type": "string",
  28249. "pattern": "^msg"
  28250. }
  28251. },
  28252. "required": ["name", "sessionID", "arguments", "messageID"],
  28253. "additionalProperties": false
  28254. }
  28255. },
  28256. "required": ["id", "type", "properties"],
  28257. "additionalProperties": false
  28258. },
  28259. "EventProjectDirectoriesUpdated": {
  28260. "type": "object",
  28261. "properties": {
  28262. "id": {
  28263. "type": "string",
  28264. "pattern": "^evt_"
  28265. },
  28266. "type": {
  28267. "type": "string",
  28268. "enum": ["project.directories.updated"]
  28269. },
  28270. "properties": {
  28271. "type": "object",
  28272. "properties": {
  28273. "projectID": {
  28274. "type": "string"
  28275. }
  28276. },
  28277. "required": ["projectID"],
  28278. "additionalProperties": false
  28279. }
  28280. },
  28281. "required": ["id", "type", "properties"],
  28282. "additionalProperties": false
  28283. },
  28284. "EventProjectUpdated": {
  28285. "type": "object",
  28286. "properties": {
  28287. "id": {
  28288. "type": "string",
  28289. "pattern": "^evt_"
  28290. },
  28291. "type": {
  28292. "type": "string",
  28293. "enum": ["project.updated"]
  28294. },
  28295. "properties": {
  28296. "type": "object",
  28297. "properties": {
  28298. "id": {
  28299. "type": "string"
  28300. },
  28301. "worktree": {
  28302. "type": "string"
  28303. },
  28304. "vcs": {
  28305. "type": "string",
  28306. "enum": ["git"]
  28307. },
  28308. "name": {
  28309. "type": "string"
  28310. },
  28311. "icon": {
  28312. "type": "object",
  28313. "properties": {
  28314. "url": {
  28315. "type": "string"
  28316. },
  28317. "override": {
  28318. "type": "string"
  28319. },
  28320. "color": {
  28321. "type": "string"
  28322. }
  28323. },
  28324. "additionalProperties": false
  28325. },
  28326. "commands": {
  28327. "type": "object",
  28328. "properties": {
  28329. "start": {
  28330. "type": "string",
  28331. "description": "Startup script to run when creating a new workspace (worktree)"
  28332. }
  28333. },
  28334. "additionalProperties": false
  28335. },
  28336. "time": {
  28337. "type": "object",
  28338. "properties": {
  28339. "created": {
  28340. "type": "integer",
  28341. "minimum": 0
  28342. },
  28343. "updated": {
  28344. "type": "integer",
  28345. "minimum": 0
  28346. },
  28347. "initialized": {
  28348. "type": "integer",
  28349. "minimum": 0
  28350. }
  28351. },
  28352. "required": ["created", "updated"],
  28353. "additionalProperties": false
  28354. },
  28355. "sandboxes": {
  28356. "type": "array",
  28357. "items": {
  28358. "type": "string"
  28359. }
  28360. }
  28361. },
  28362. "required": ["id", "worktree", "time", "sandboxes"],
  28363. "additionalProperties": false
  28364. }
  28365. },
  28366. "required": ["id", "type", "properties"],
  28367. "additionalProperties": false
  28368. },
  28369. "EventVcsBranchUpdated": {
  28370. "type": "object",
  28371. "properties": {
  28372. "id": {
  28373. "type": "string",
  28374. "pattern": "^evt_"
  28375. },
  28376. "type": {
  28377. "type": "string",
  28378. "enum": ["vcs.branch.updated"]
  28379. },
  28380. "properties": {
  28381. "type": "object",
  28382. "properties": {
  28383. "branch": {
  28384. "type": "string"
  28385. }
  28386. },
  28387. "additionalProperties": false
  28388. }
  28389. },
  28390. "required": ["id", "type", "properties"],
  28391. "additionalProperties": false
  28392. },
  28393. "EventQuestionAsked": {
  28394. "type": "object",
  28395. "properties": {
  28396. "id": {
  28397. "type": "string",
  28398. "pattern": "^evt_"
  28399. },
  28400. "type": {
  28401. "type": "string",
  28402. "enum": ["question.asked"]
  28403. },
  28404. "properties": {
  28405. "type": "object",
  28406. "properties": {
  28407. "id": {
  28408. "type": "string",
  28409. "pattern": "^que"
  28410. },
  28411. "sessionID": {
  28412. "type": "string",
  28413. "pattern": "^ses"
  28414. },
  28415. "questions": {
  28416. "type": "array",
  28417. "items": {
  28418. "$ref": "#/components/schemas/QuestionInfo"
  28419. },
  28420. "description": "Questions to ask"
  28421. },
  28422. "tool": {
  28423. "$ref": "#/components/schemas/QuestionTool"
  28424. }
  28425. },
  28426. "required": ["id", "sessionID", "questions"],
  28427. "additionalProperties": false
  28428. }
  28429. },
  28430. "required": ["id", "type", "properties"],
  28431. "additionalProperties": false
  28432. },
  28433. "EventQuestionReplied": {
  28434. "type": "object",
  28435. "properties": {
  28436. "id": {
  28437. "type": "string",
  28438. "pattern": "^evt_"
  28439. },
  28440. "type": {
  28441. "type": "string",
  28442. "enum": ["question.replied"]
  28443. },
  28444. "properties": {
  28445. "type": "object",
  28446. "properties": {
  28447. "sessionID": {
  28448. "type": "string",
  28449. "pattern": "^ses"
  28450. },
  28451. "requestID": {
  28452. "type": "string",
  28453. "pattern": "^que"
  28454. },
  28455. "answers": {
  28456. "type": "array",
  28457. "items": {
  28458. "$ref": "#/components/schemas/QuestionAnswer"
  28459. }
  28460. }
  28461. },
  28462. "required": ["sessionID", "requestID", "answers"],
  28463. "additionalProperties": false
  28464. }
  28465. },
  28466. "required": ["id", "type", "properties"],
  28467. "additionalProperties": false
  28468. },
  28469. "EventQuestionRejected": {
  28470. "type": "object",
  28471. "properties": {
  28472. "id": {
  28473. "type": "string",
  28474. "pattern": "^evt_"
  28475. },
  28476. "type": {
  28477. "type": "string",
  28478. "enum": ["question.rejected"]
  28479. },
  28480. "properties": {
  28481. "type": "object",
  28482. "properties": {
  28483. "sessionID": {
  28484. "type": "string",
  28485. "pattern": "^ses"
  28486. },
  28487. "requestID": {
  28488. "type": "string",
  28489. "pattern": "^que"
  28490. }
  28491. },
  28492. "required": ["sessionID", "requestID"],
  28493. "additionalProperties": false
  28494. }
  28495. },
  28496. "required": ["id", "type", "properties"],
  28497. "additionalProperties": false
  28498. },
  28499. "EventSessionStatus": {
  28500. "type": "object",
  28501. "properties": {
  28502. "id": {
  28503. "type": "string",
  28504. "pattern": "^evt_"
  28505. },
  28506. "type": {
  28507. "type": "string",
  28508. "enum": ["session.status"]
  28509. },
  28510. "properties": {
  28511. "type": "object",
  28512. "properties": {
  28513. "sessionID": {
  28514. "type": "string",
  28515. "pattern": "^ses"
  28516. },
  28517. "status": {
  28518. "$ref": "#/components/schemas/SessionStatus"
  28519. }
  28520. },
  28521. "required": ["sessionID", "status"],
  28522. "additionalProperties": false
  28523. }
  28524. },
  28525. "required": ["id", "type", "properties"],
  28526. "additionalProperties": false
  28527. },
  28528. "EventSessionIdle": {
  28529. "type": "object",
  28530. "properties": {
  28531. "id": {
  28532. "type": "string",
  28533. "pattern": "^evt_"
  28534. },
  28535. "type": {
  28536. "type": "string",
  28537. "enum": ["session.idle"]
  28538. },
  28539. "properties": {
  28540. "type": "object",
  28541. "properties": {
  28542. "sessionID": {
  28543. "type": "string",
  28544. "pattern": "^ses"
  28545. }
  28546. },
  28547. "required": ["sessionID"],
  28548. "additionalProperties": false
  28549. }
  28550. },
  28551. "required": ["id", "type", "properties"],
  28552. "additionalProperties": false
  28553. },
  28554. "EventSessionCompacted": {
  28555. "type": "object",
  28556. "properties": {
  28557. "id": {
  28558. "type": "string",
  28559. "pattern": "^evt_"
  28560. },
  28561. "type": {
  28562. "type": "string",
  28563. "enum": ["session.compacted"]
  28564. },
  28565. "properties": {
  28566. "type": "object",
  28567. "properties": {
  28568. "sessionID": {
  28569. "type": "string",
  28570. "pattern": "^ses"
  28571. }
  28572. },
  28573. "required": ["sessionID"],
  28574. "additionalProperties": false
  28575. }
  28576. },
  28577. "required": ["id", "type", "properties"],
  28578. "additionalProperties": false
  28579. },
  28580. "EventWorktreeReady": {
  28581. "type": "object",
  28582. "properties": {
  28583. "id": {
  28584. "type": "string",
  28585. "pattern": "^evt_"
  28586. },
  28587. "type": {
  28588. "type": "string",
  28589. "enum": ["worktree.ready"]
  28590. },
  28591. "properties": {
  28592. "type": "object",
  28593. "properties": {
  28594. "name": {
  28595. "type": "string"
  28596. },
  28597. "branch": {
  28598. "type": "string"
  28599. }
  28600. },
  28601. "required": ["name"],
  28602. "additionalProperties": false
  28603. }
  28604. },
  28605. "required": ["id", "type", "properties"],
  28606. "additionalProperties": false
  28607. },
  28608. "EventWorktreeFailed": {
  28609. "type": "object",
  28610. "properties": {
  28611. "id": {
  28612. "type": "string",
  28613. "pattern": "^evt_"
  28614. },
  28615. "type": {
  28616. "type": "string",
  28617. "enum": ["worktree.failed"]
  28618. },
  28619. "properties": {
  28620. "type": "object",
  28621. "properties": {
  28622. "message": {
  28623. "type": "string"
  28624. }
  28625. },
  28626. "required": ["message"],
  28627. "additionalProperties": false
  28628. }
  28629. },
  28630. "required": ["id", "type", "properties"],
  28631. "additionalProperties": false
  28632. },
  28633. "EventWorkspaceReady": {
  28634. "type": "object",
  28635. "properties": {
  28636. "id": {
  28637. "type": "string",
  28638. "pattern": "^evt_"
  28639. },
  28640. "type": {
  28641. "type": "string",
  28642. "enum": ["workspace.ready"]
  28643. },
  28644. "properties": {
  28645. "type": "object",
  28646. "properties": {
  28647. "name": {
  28648. "type": "string"
  28649. }
  28650. },
  28651. "required": ["name"],
  28652. "additionalProperties": false
  28653. }
  28654. },
  28655. "required": ["id", "type", "properties"],
  28656. "additionalProperties": false
  28657. },
  28658. "EventWorkspaceFailed": {
  28659. "type": "object",
  28660. "properties": {
  28661. "id": {
  28662. "type": "string",
  28663. "pattern": "^evt_"
  28664. },
  28665. "type": {
  28666. "type": "string",
  28667. "enum": ["workspace.failed"]
  28668. },
  28669. "properties": {
  28670. "type": "object",
  28671. "properties": {
  28672. "message": {
  28673. "type": "string"
  28674. }
  28675. },
  28676. "required": ["message"],
  28677. "additionalProperties": false
  28678. }
  28679. },
  28680. "required": ["id", "type", "properties"],
  28681. "additionalProperties": false
  28682. },
  28683. "EventWorkspaceStatus": {
  28684. "type": "object",
  28685. "properties": {
  28686. "id": {
  28687. "type": "string",
  28688. "pattern": "^evt_"
  28689. },
  28690. "type": {
  28691. "type": "string",
  28692. "enum": ["workspace.status"]
  28693. },
  28694. "properties": {
  28695. "type": "object",
  28696. "properties": {
  28697. "workspaceID": {
  28698. "type": "string",
  28699. "pattern": "^wrk"
  28700. },
  28701. "status": {
  28702. "type": "string",
  28703. "enum": ["connected", "connecting", "disconnected", "error"]
  28704. }
  28705. },
  28706. "required": ["workspaceID", "status"],
  28707. "additionalProperties": false
  28708. }
  28709. },
  28710. "required": ["id", "type", "properties"],
  28711. "additionalProperties": false
  28712. },
  28713. "EventServerConnected": {
  28714. "type": "object",
  28715. "properties": {
  28716. "id": {
  28717. "type": "string",
  28718. "pattern": "^evt_"
  28719. },
  28720. "type": {
  28721. "type": "string",
  28722. "enum": ["server.connected"]
  28723. },
  28724. "properties": {
  28725. "type": "object",
  28726. "properties": {}
  28727. }
  28728. },
  28729. "required": ["id", "type", "properties"],
  28730. "additionalProperties": false
  28731. },
  28732. "EventGlobalDisposed": {
  28733. "type": "object",
  28734. "properties": {
  28735. "id": {
  28736. "type": "string",
  28737. "pattern": "^evt_"
  28738. },
  28739. "type": {
  28740. "type": "string",
  28741. "enum": ["global.disposed"]
  28742. },
  28743. "properties": {
  28744. "type": "object",
  28745. "properties": {}
  28746. }
  28747. },
  28748. "required": ["id", "type", "properties"],
  28749. "additionalProperties": false
  28750. },
  28751. "BadRequestError": {
  28752. "type": "object",
  28753. "required": ["name", "data"],
  28754. "properties": {
  28755. "name": {
  28756. "type": "string",
  28757. "enum": ["BadRequest"]
  28758. },
  28759. "data": {
  28760. "type": "object",
  28761. "required": ["message"],
  28762. "properties": {
  28763. "message": {
  28764. "type": "string"
  28765. },
  28766. "kind": {
  28767. "type": "string",
  28768. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  28769. }
  28770. }
  28771. }
  28772. }
  28773. }
  28774. }
  28775. },
  28776. "security": [],
  28777. "tags": [
  28778. {
  28779. "name": "control",
  28780. "description": "Control plane routes."
  28781. },
  28782. {
  28783. "name": "controlPlane",
  28784. "description": "Control-plane orchestration routes."
  28785. },
  28786. {
  28787. "name": "global",
  28788. "description": "Global server routes."
  28789. },
  28790. {
  28791. "name": "event",
  28792. "description": "Instance event stream route."
  28793. },
  28794. {
  28795. "name": "config",
  28796. "description": "Experimental HttpApi config routes."
  28797. },
  28798. {
  28799. "name": "experimental",
  28800. "description": "Experimental HttpApi read-only routes."
  28801. },
  28802. {
  28803. "name": "file",
  28804. "description": "Experimental HttpApi file routes."
  28805. },
  28806. {
  28807. "name": "instance",
  28808. "description": "Experimental HttpApi instance read routes."
  28809. },
  28810. {
  28811. "name": "mcp",
  28812. "description": "Experimental HttpApi MCP routes."
  28813. },
  28814. {
  28815. "name": "project",
  28816. "description": "Experimental HttpApi project routes."
  28817. },
  28818. {
  28819. "name": "projectCopy",
  28820. "description": "Project copy management routes."
  28821. },
  28822. {
  28823. "name": "pty",
  28824. "description": "Experimental HttpApi PTY routes."
  28825. },
  28826. {
  28827. "name": "question",
  28828. "description": "Question routes."
  28829. },
  28830. {
  28831. "name": "permission",
  28832. "description": "Experimental HttpApi permission routes."
  28833. },
  28834. {
  28835. "name": "provider",
  28836. "description": "Experimental HttpApi provider routes."
  28837. },
  28838. {
  28839. "name": "session",
  28840. "description": "Experimental HttpApi session routes."
  28841. },
  28842. {
  28843. "name": "sync",
  28844. "description": "Experimental HttpApi sync routes."
  28845. },
  28846. {
  28847. "name": "tui",
  28848. "description": "Experimental HttpApi TUI routes."
  28849. },
  28850. {
  28851. "name": "workspace",
  28852. "description": "Experimental HttpApi workspace routes."
  28853. },
  28854. {
  28855. "name": "opencode HttpApi",
  28856. "description": "Experimental HttpApi surface for selected instance routes."
  28857. },
  28858. {
  28859. "name": "opencode HttpApi",
  28860. "description": "Experimental HttpApi surface for selected instance routes."
  28861. },
  28862. {
  28863. "name": "sessions",
  28864. "description": "Experimental session routes."
  28865. },
  28866. {
  28867. "name": "messages",
  28868. "description": "Experimental message routes."
  28869. },
  28870. {
  28871. "name": "models",
  28872. "description": "Experimental model routes."
  28873. },
  28874. {
  28875. "name": "providers",
  28876. "description": "Experimental provider routes."
  28877. },
  28878. {
  28879. "name": "permissions",
  28880. "description": "Experimental permission routes."
  28881. },
  28882. {
  28883. "name": "filesystem",
  28884. "description": "Experimental location-scoped filesystem routes."
  28885. },
  28886. {
  28887. "name": "commands",
  28888. "description": "Experimental command routes."
  28889. },
  28890. {
  28891. "name": "skills",
  28892. "description": "Experimental skill routes."
  28893. },
  28894. {
  28895. "name": "events",
  28896. "description": "Experimental event stream route."
  28897. },
  28898. {
  28899. "name": "session questions",
  28900. "description": "Experimental session question routes."
  28901. },
  28902. {
  28903. "name": "reference",
  28904. "description": "Location-scoped project references."
  28905. },
  28906. {
  28907. "name": "pty",
  28908. "description": "PTY websocket route."
  28909. }
  28910. ]
  28911. }