openapi.json 821 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927
  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. "reference": {
  18238. "type": "object",
  18239. "additionalProperties": {
  18240. "anyOf": [
  18241. {
  18242. "type": "string"
  18243. },
  18244. {
  18245. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  18246. },
  18247. {
  18248. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  18249. }
  18250. ]
  18251. }
  18252. },
  18253. "watcher": {
  18254. "type": "object",
  18255. "properties": {
  18256. "ignore": {
  18257. "type": "array",
  18258. "items": {
  18259. "type": "string"
  18260. }
  18261. }
  18262. },
  18263. "additionalProperties": false
  18264. },
  18265. "snapshot": {
  18266. "type": "boolean"
  18267. },
  18268. "plugin": {
  18269. "type": "array",
  18270. "items": {
  18271. "anyOf": [
  18272. {
  18273. "type": "string"
  18274. },
  18275. {
  18276. "type": "array",
  18277. "prefixItems": [
  18278. {
  18279. "type": "string"
  18280. },
  18281. {
  18282. "type": "object"
  18283. }
  18284. ],
  18285. "maxItems": 2,
  18286. "minItems": 2
  18287. }
  18288. ]
  18289. }
  18290. },
  18291. "share": {
  18292. "type": "string",
  18293. "enum": ["manual", "auto", "disabled"]
  18294. },
  18295. "autoshare": {
  18296. "type": "boolean"
  18297. },
  18298. "autoupdate": {
  18299. "anyOf": [
  18300. {
  18301. "type": "boolean"
  18302. },
  18303. {
  18304. "type": "string",
  18305. "enum": ["notify"]
  18306. }
  18307. ],
  18308. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  18309. },
  18310. "disabled_providers": {
  18311. "type": "array",
  18312. "items": {
  18313. "type": "string"
  18314. }
  18315. },
  18316. "enabled_providers": {
  18317. "type": "array",
  18318. "items": {
  18319. "type": "string"
  18320. }
  18321. },
  18322. "model": {
  18323. "type": "string"
  18324. },
  18325. "small_model": {
  18326. "type": "string"
  18327. },
  18328. "default_agent": {
  18329. "type": "string"
  18330. },
  18331. "username": {
  18332. "type": "string"
  18333. },
  18334. "mode": {
  18335. "type": "object",
  18336. "properties": {
  18337. "build": {
  18338. "$ref": "#/components/schemas/AgentConfig"
  18339. },
  18340. "plan": {
  18341. "$ref": "#/components/schemas/AgentConfig"
  18342. }
  18343. },
  18344. "additionalProperties": {
  18345. "$ref": "#/components/schemas/AgentConfig"
  18346. }
  18347. },
  18348. "agent": {
  18349. "type": "object",
  18350. "properties": {
  18351. "plan": {
  18352. "$ref": "#/components/schemas/AgentConfig"
  18353. },
  18354. "build": {
  18355. "$ref": "#/components/schemas/AgentConfig"
  18356. },
  18357. "general": {
  18358. "$ref": "#/components/schemas/AgentConfig"
  18359. },
  18360. "explore": {
  18361. "$ref": "#/components/schemas/AgentConfig"
  18362. },
  18363. "title": {
  18364. "$ref": "#/components/schemas/AgentConfig"
  18365. },
  18366. "summary": {
  18367. "$ref": "#/components/schemas/AgentConfig"
  18368. },
  18369. "compaction": {
  18370. "$ref": "#/components/schemas/AgentConfig"
  18371. }
  18372. },
  18373. "additionalProperties": {
  18374. "$ref": "#/components/schemas/AgentConfig"
  18375. }
  18376. },
  18377. "provider": {
  18378. "type": "object",
  18379. "additionalProperties": {
  18380. "$ref": "#/components/schemas/ProviderConfig"
  18381. }
  18382. },
  18383. "mcp": {
  18384. "type": "object",
  18385. "additionalProperties": {
  18386. "anyOf": [
  18387. {
  18388. "$ref": "#/components/schemas/McpLocalConfig"
  18389. },
  18390. {
  18391. "$ref": "#/components/schemas/McpRemoteConfig"
  18392. },
  18393. {
  18394. "type": "object",
  18395. "properties": {
  18396. "enabled": {
  18397. "type": "boolean"
  18398. }
  18399. },
  18400. "required": ["enabled"],
  18401. "additionalProperties": false
  18402. }
  18403. ]
  18404. }
  18405. },
  18406. "formatter": {
  18407. "anyOf": [
  18408. {
  18409. "type": "boolean"
  18410. },
  18411. {
  18412. "type": "object",
  18413. "additionalProperties": {
  18414. "type": "object",
  18415. "properties": {
  18416. "disabled": {
  18417. "type": "boolean"
  18418. },
  18419. "command": {
  18420. "type": "array",
  18421. "items": {
  18422. "type": "string"
  18423. }
  18424. },
  18425. "environment": {
  18426. "type": "object",
  18427. "additionalProperties": {
  18428. "type": "string"
  18429. }
  18430. },
  18431. "extensions": {
  18432. "type": "array",
  18433. "items": {
  18434. "type": "string"
  18435. }
  18436. }
  18437. },
  18438. "additionalProperties": false
  18439. }
  18440. }
  18441. ],
  18442. "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."
  18443. },
  18444. "lsp": {
  18445. "anyOf": [
  18446. {
  18447. "type": "boolean"
  18448. },
  18449. {
  18450. "type": "object",
  18451. "additionalProperties": {
  18452. "anyOf": [
  18453. {
  18454. "type": "object",
  18455. "properties": {
  18456. "disabled": {
  18457. "type": "boolean",
  18458. "enum": [true]
  18459. }
  18460. },
  18461. "required": ["disabled"],
  18462. "additionalProperties": false
  18463. },
  18464. {
  18465. "type": "object",
  18466. "properties": {
  18467. "command": {
  18468. "type": "array",
  18469. "items": {
  18470. "type": "string"
  18471. }
  18472. },
  18473. "extensions": {
  18474. "type": "array",
  18475. "items": {
  18476. "type": "string"
  18477. }
  18478. },
  18479. "disabled": {
  18480. "type": "boolean"
  18481. },
  18482. "env": {
  18483. "type": "object",
  18484. "additionalProperties": {
  18485. "type": "string"
  18486. }
  18487. },
  18488. "initialization": {
  18489. "type": "object"
  18490. }
  18491. },
  18492. "required": ["command"],
  18493. "additionalProperties": false
  18494. }
  18495. ]
  18496. }
  18497. }
  18498. ],
  18499. "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."
  18500. },
  18501. "instructions": {
  18502. "type": "array",
  18503. "items": {
  18504. "type": "string"
  18505. }
  18506. },
  18507. "layout": {
  18508. "$ref": "#/components/schemas/LayoutConfig"
  18509. },
  18510. "permission": {
  18511. "$ref": "#/components/schemas/PermissionConfig"
  18512. },
  18513. "tools": {
  18514. "type": "object",
  18515. "additionalProperties": {
  18516. "type": "boolean"
  18517. }
  18518. },
  18519. "attachment": {
  18520. "$ref": "#/components/schemas/AttachmentConfig"
  18521. },
  18522. "enterprise": {
  18523. "type": "object",
  18524. "properties": {
  18525. "url": {
  18526. "type": "string"
  18527. }
  18528. },
  18529. "additionalProperties": false
  18530. },
  18531. "tool_output": {
  18532. "type": "object",
  18533. "properties": {
  18534. "max_lines": {
  18535. "type": "integer",
  18536. "exclusiveMinimum": 0
  18537. },
  18538. "max_bytes": {
  18539. "type": "integer",
  18540. "exclusiveMinimum": 0
  18541. }
  18542. },
  18543. "additionalProperties": false
  18544. },
  18545. "compaction": {
  18546. "type": "object",
  18547. "properties": {
  18548. "auto": {
  18549. "type": "boolean"
  18550. },
  18551. "prune": {
  18552. "type": "boolean"
  18553. },
  18554. "tail_turns": {
  18555. "type": "integer",
  18556. "minimum": 0
  18557. },
  18558. "preserve_recent_tokens": {
  18559. "type": "integer",
  18560. "minimum": 0
  18561. },
  18562. "reserved": {
  18563. "type": "integer",
  18564. "minimum": 0
  18565. }
  18566. },
  18567. "additionalProperties": false
  18568. },
  18569. "experimental": {
  18570. "type": "object",
  18571. "properties": {
  18572. "disable_paste_summary": {
  18573. "type": "boolean"
  18574. },
  18575. "batch_tool": {
  18576. "type": "boolean"
  18577. },
  18578. "openTelemetry": {
  18579. "type": "boolean"
  18580. },
  18581. "primary_tools": {
  18582. "type": "array",
  18583. "items": {
  18584. "type": "string"
  18585. }
  18586. },
  18587. "continue_loop_on_deny": {
  18588. "type": "boolean"
  18589. },
  18590. "mcp_timeout": {
  18591. "type": "integer",
  18592. "exclusiveMinimum": 0
  18593. },
  18594. "policies": {
  18595. "type": "array",
  18596. "items": {
  18597. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  18598. }
  18599. }
  18600. },
  18601. "additionalProperties": false
  18602. }
  18603. },
  18604. "additionalProperties": false
  18605. },
  18606. "Model": {
  18607. "type": "object",
  18608. "properties": {
  18609. "id": {
  18610. "type": "string"
  18611. },
  18612. "providerID": {
  18613. "type": "string"
  18614. },
  18615. "api": {
  18616. "type": "object",
  18617. "properties": {
  18618. "id": {
  18619. "type": "string"
  18620. },
  18621. "url": {
  18622. "type": "string"
  18623. },
  18624. "npm": {
  18625. "type": "string"
  18626. }
  18627. },
  18628. "required": ["id", "url", "npm"],
  18629. "additionalProperties": false
  18630. },
  18631. "name": {
  18632. "type": "string"
  18633. },
  18634. "family": {
  18635. "type": "string"
  18636. },
  18637. "capabilities": {
  18638. "type": "object",
  18639. "properties": {
  18640. "temperature": {
  18641. "type": "boolean"
  18642. },
  18643. "reasoning": {
  18644. "type": "boolean"
  18645. },
  18646. "attachment": {
  18647. "type": "boolean"
  18648. },
  18649. "toolcall": {
  18650. "type": "boolean"
  18651. },
  18652. "input": {
  18653. "type": "object",
  18654. "properties": {
  18655. "text": {
  18656. "type": "boolean"
  18657. },
  18658. "audio": {
  18659. "type": "boolean"
  18660. },
  18661. "image": {
  18662. "type": "boolean"
  18663. },
  18664. "video": {
  18665. "type": "boolean"
  18666. },
  18667. "pdf": {
  18668. "type": "boolean"
  18669. }
  18670. },
  18671. "required": ["text", "audio", "image", "video", "pdf"],
  18672. "additionalProperties": false
  18673. },
  18674. "output": {
  18675. "type": "object",
  18676. "properties": {
  18677. "text": {
  18678. "type": "boolean"
  18679. },
  18680. "audio": {
  18681. "type": "boolean"
  18682. },
  18683. "image": {
  18684. "type": "boolean"
  18685. },
  18686. "video": {
  18687. "type": "boolean"
  18688. },
  18689. "pdf": {
  18690. "type": "boolean"
  18691. }
  18692. },
  18693. "required": ["text", "audio", "image", "video", "pdf"],
  18694. "additionalProperties": false
  18695. },
  18696. "interleaved": {
  18697. "anyOf": [
  18698. {
  18699. "type": "boolean"
  18700. },
  18701. {
  18702. "type": "object",
  18703. "properties": {
  18704. "field": {
  18705. "type": "string",
  18706. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  18707. }
  18708. },
  18709. "required": ["field"],
  18710. "additionalProperties": false
  18711. }
  18712. ]
  18713. }
  18714. },
  18715. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  18716. "additionalProperties": false
  18717. },
  18718. "cost": {
  18719. "type": "object",
  18720. "properties": {
  18721. "input": {
  18722. "type": "number"
  18723. },
  18724. "output": {
  18725. "type": "number"
  18726. },
  18727. "cache": {
  18728. "type": "object",
  18729. "properties": {
  18730. "read": {
  18731. "type": "number"
  18732. },
  18733. "write": {
  18734. "type": "number"
  18735. }
  18736. },
  18737. "required": ["read", "write"],
  18738. "additionalProperties": false
  18739. },
  18740. "tiers": {
  18741. "type": "array",
  18742. "items": {
  18743. "type": "object",
  18744. "properties": {
  18745. "input": {
  18746. "type": "number"
  18747. },
  18748. "output": {
  18749. "type": "number"
  18750. },
  18751. "cache": {
  18752. "type": "object",
  18753. "properties": {
  18754. "read": {
  18755. "type": "number"
  18756. },
  18757. "write": {
  18758. "type": "number"
  18759. }
  18760. },
  18761. "required": ["read", "write"],
  18762. "additionalProperties": false
  18763. },
  18764. "tier": {
  18765. "type": "object",
  18766. "properties": {
  18767. "type": {
  18768. "type": "string",
  18769. "enum": ["context"]
  18770. },
  18771. "size": {
  18772. "type": "number"
  18773. }
  18774. },
  18775. "required": ["type", "size"],
  18776. "additionalProperties": false
  18777. }
  18778. },
  18779. "required": ["input", "output", "cache", "tier"],
  18780. "additionalProperties": false
  18781. }
  18782. },
  18783. "experimentalOver200K": {
  18784. "type": "object",
  18785. "properties": {
  18786. "input": {
  18787. "type": "number"
  18788. },
  18789. "output": {
  18790. "type": "number"
  18791. },
  18792. "cache": {
  18793. "type": "object",
  18794. "properties": {
  18795. "read": {
  18796. "type": "number"
  18797. },
  18798. "write": {
  18799. "type": "number"
  18800. }
  18801. },
  18802. "required": ["read", "write"],
  18803. "additionalProperties": false
  18804. }
  18805. },
  18806. "required": ["input", "output", "cache"],
  18807. "additionalProperties": false
  18808. }
  18809. },
  18810. "required": ["input", "output", "cache"],
  18811. "additionalProperties": false
  18812. },
  18813. "limit": {
  18814. "type": "object",
  18815. "properties": {
  18816. "context": {
  18817. "type": "number"
  18818. },
  18819. "input": {
  18820. "type": "number"
  18821. },
  18822. "output": {
  18823. "type": "number"
  18824. }
  18825. },
  18826. "required": ["context", "output"],
  18827. "additionalProperties": false
  18828. },
  18829. "status": {
  18830. "type": "string",
  18831. "enum": ["alpha", "beta", "deprecated", "active"]
  18832. },
  18833. "options": {
  18834. "type": "object"
  18835. },
  18836. "headers": {
  18837. "type": "object",
  18838. "additionalProperties": {
  18839. "type": "string"
  18840. }
  18841. },
  18842. "release_date": {
  18843. "type": "string"
  18844. },
  18845. "variants": {
  18846. "type": "object",
  18847. "additionalProperties": {
  18848. "type": "object"
  18849. }
  18850. }
  18851. },
  18852. "required": [
  18853. "id",
  18854. "providerID",
  18855. "api",
  18856. "name",
  18857. "capabilities",
  18858. "cost",
  18859. "limit",
  18860. "status",
  18861. "options",
  18862. "headers",
  18863. "release_date"
  18864. ],
  18865. "additionalProperties": false
  18866. },
  18867. "Provider": {
  18868. "type": "object",
  18869. "properties": {
  18870. "id": {
  18871. "type": "string"
  18872. },
  18873. "name": {
  18874. "type": "string"
  18875. },
  18876. "source": {
  18877. "type": "string",
  18878. "enum": ["env", "config", "custom", "api"]
  18879. },
  18880. "env": {
  18881. "type": "array",
  18882. "items": {
  18883. "type": "string"
  18884. }
  18885. },
  18886. "key": {
  18887. "type": "string"
  18888. },
  18889. "options": {
  18890. "type": "object"
  18891. },
  18892. "models": {
  18893. "type": "object",
  18894. "additionalProperties": {
  18895. "$ref": "#/components/schemas/Model"
  18896. }
  18897. }
  18898. },
  18899. "required": ["id", "name", "source", "env", "options", "models"],
  18900. "additionalProperties": false
  18901. },
  18902. "ConsoleState": {
  18903. "type": "object",
  18904. "properties": {
  18905. "consoleManagedProviders": {
  18906. "type": "array",
  18907. "items": {
  18908. "type": "string"
  18909. }
  18910. },
  18911. "activeOrgName": {
  18912. "type": "string"
  18913. },
  18914. "switchableOrgCount": {
  18915. "type": "integer",
  18916. "minimum": 0
  18917. }
  18918. },
  18919. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18920. "additionalProperties": false
  18921. },
  18922. "effect_HttpApiError_InternalServerError": {
  18923. "type": "object",
  18924. "properties": {
  18925. "_tag": {
  18926. "type": "string",
  18927. "enum": ["InternalServerError"]
  18928. }
  18929. },
  18930. "required": ["_tag"],
  18931. "additionalProperties": false
  18932. },
  18933. "ToolListItem": {
  18934. "type": "object",
  18935. "properties": {
  18936. "id": {
  18937. "type": "string"
  18938. },
  18939. "description": {
  18940. "type": "string"
  18941. },
  18942. "parameters": {}
  18943. },
  18944. "required": ["id", "description", "parameters"],
  18945. "additionalProperties": false
  18946. },
  18947. "ToolList": {
  18948. "type": "array",
  18949. "items": {
  18950. "$ref": "#/components/schemas/ToolListItem"
  18951. }
  18952. },
  18953. "ToolIDs": {
  18954. "type": "array",
  18955. "items": {
  18956. "type": "string"
  18957. }
  18958. },
  18959. "WorktreeError": {
  18960. "type": "object",
  18961. "properties": {
  18962. "name": {
  18963. "type": "string",
  18964. "enum": [
  18965. "WorktreeNotGitError",
  18966. "WorktreeNameGenerationFailedError",
  18967. "WorktreeCreateFailedError",
  18968. "WorktreeStartCommandFailedError",
  18969. "WorktreeRemoveFailedError",
  18970. "WorktreeResetFailedError",
  18971. "WorktreeListFailedError"
  18972. ]
  18973. },
  18974. "data": {
  18975. "type": "object",
  18976. "properties": {
  18977. "message": {
  18978. "type": "string"
  18979. }
  18980. },
  18981. "required": ["message"],
  18982. "additionalProperties": false
  18983. }
  18984. },
  18985. "required": ["name", "data"],
  18986. "additionalProperties": false
  18987. },
  18988. "WorktreeCreateInput": {
  18989. "type": "object",
  18990. "properties": {
  18991. "name": {
  18992. "type": "string"
  18993. },
  18994. "startCommand": {
  18995. "type": "string",
  18996. "description": "Additional startup script to run after the project's start command"
  18997. }
  18998. },
  18999. "additionalProperties": false
  19000. },
  19001. "Worktree": {
  19002. "type": "object",
  19003. "properties": {
  19004. "name": {
  19005. "type": "string"
  19006. },
  19007. "branch": {
  19008. "type": "string"
  19009. },
  19010. "directory": {
  19011. "type": "string"
  19012. }
  19013. },
  19014. "required": ["name", "directory"],
  19015. "additionalProperties": false
  19016. },
  19017. "WorktreeRemoveInput": {
  19018. "type": "object",
  19019. "properties": {
  19020. "directory": {
  19021. "type": "string"
  19022. }
  19023. },
  19024. "required": ["directory"],
  19025. "additionalProperties": false
  19026. },
  19027. "WorktreeResetInput": {
  19028. "type": "object",
  19029. "properties": {
  19030. "directory": {
  19031. "type": "string"
  19032. }
  19033. },
  19034. "required": ["directory"],
  19035. "additionalProperties": false
  19036. },
  19037. "ProjectSummary": {
  19038. "type": "object",
  19039. "properties": {
  19040. "id": {
  19041. "type": "string"
  19042. },
  19043. "name": {
  19044. "type": "string"
  19045. },
  19046. "worktree": {
  19047. "type": "string"
  19048. }
  19049. },
  19050. "required": ["id", "worktree"],
  19051. "additionalProperties": false
  19052. },
  19053. "GlobalSession": {
  19054. "type": "object",
  19055. "properties": {
  19056. "id": {
  19057. "type": "string",
  19058. "pattern": "^ses"
  19059. },
  19060. "slug": {
  19061. "type": "string"
  19062. },
  19063. "projectID": {
  19064. "type": "string"
  19065. },
  19066. "workspaceID": {
  19067. "type": "string",
  19068. "pattern": "^wrk"
  19069. },
  19070. "directory": {
  19071. "type": "string"
  19072. },
  19073. "path": {
  19074. "type": "string"
  19075. },
  19076. "parentID": {
  19077. "type": "string",
  19078. "pattern": "^ses"
  19079. },
  19080. "summary": {
  19081. "type": "object",
  19082. "properties": {
  19083. "additions": {
  19084. "type": "number"
  19085. },
  19086. "deletions": {
  19087. "type": "number"
  19088. },
  19089. "files": {
  19090. "type": "number"
  19091. },
  19092. "diffs": {
  19093. "type": "array",
  19094. "items": {
  19095. "$ref": "#/components/schemas/SnapshotFileDiff"
  19096. }
  19097. }
  19098. },
  19099. "required": ["additions", "deletions", "files"],
  19100. "additionalProperties": false
  19101. },
  19102. "cost": {
  19103. "type": "number"
  19104. },
  19105. "tokens": {
  19106. "type": "object",
  19107. "properties": {
  19108. "input": {
  19109. "type": "number"
  19110. },
  19111. "output": {
  19112. "type": "number"
  19113. },
  19114. "reasoning": {
  19115. "type": "number"
  19116. },
  19117. "cache": {
  19118. "type": "object",
  19119. "properties": {
  19120. "read": {
  19121. "type": "number"
  19122. },
  19123. "write": {
  19124. "type": "number"
  19125. }
  19126. },
  19127. "required": ["read", "write"],
  19128. "additionalProperties": false
  19129. }
  19130. },
  19131. "required": ["input", "output", "reasoning", "cache"],
  19132. "additionalProperties": false
  19133. },
  19134. "share": {
  19135. "type": "object",
  19136. "properties": {
  19137. "url": {
  19138. "type": "string"
  19139. }
  19140. },
  19141. "required": ["url"],
  19142. "additionalProperties": false
  19143. },
  19144. "title": {
  19145. "type": "string"
  19146. },
  19147. "agent": {
  19148. "type": "string"
  19149. },
  19150. "model": {
  19151. "type": "object",
  19152. "properties": {
  19153. "id": {
  19154. "type": "string"
  19155. },
  19156. "providerID": {
  19157. "type": "string"
  19158. },
  19159. "variant": {
  19160. "type": "string"
  19161. }
  19162. },
  19163. "required": ["id", "providerID"],
  19164. "additionalProperties": false
  19165. },
  19166. "version": {
  19167. "type": "string"
  19168. },
  19169. "metadata": {
  19170. "type": "object"
  19171. },
  19172. "time": {
  19173. "type": "object",
  19174. "properties": {
  19175. "created": {
  19176. "type": "integer",
  19177. "minimum": 0
  19178. },
  19179. "updated": {
  19180. "type": "integer",
  19181. "minimum": 0
  19182. },
  19183. "compacting": {
  19184. "type": "integer",
  19185. "minimum": 0
  19186. },
  19187. "archived": {
  19188. "type": "number"
  19189. }
  19190. },
  19191. "required": ["created", "updated"],
  19192. "additionalProperties": false
  19193. },
  19194. "permission": {
  19195. "$ref": "#/components/schemas/PermissionRuleset"
  19196. },
  19197. "revert": {
  19198. "type": "object",
  19199. "properties": {
  19200. "messageID": {
  19201. "type": "string",
  19202. "pattern": "^msg"
  19203. },
  19204. "partID": {
  19205. "type": "string",
  19206. "pattern": "^prt"
  19207. },
  19208. "snapshot": {
  19209. "type": "string"
  19210. },
  19211. "diff": {
  19212. "type": "string"
  19213. }
  19214. },
  19215. "required": ["messageID"],
  19216. "additionalProperties": false
  19217. },
  19218. "project": {
  19219. "anyOf": [
  19220. {
  19221. "$ref": "#/components/schemas/ProjectSummary"
  19222. },
  19223. {
  19224. "type": "null"
  19225. }
  19226. ]
  19227. }
  19228. },
  19229. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  19230. "additionalProperties": false
  19231. },
  19232. "McpResource": {
  19233. "type": "object",
  19234. "properties": {
  19235. "name": {
  19236. "type": "string"
  19237. },
  19238. "uri": {
  19239. "type": "string"
  19240. },
  19241. "description": {
  19242. "type": "string"
  19243. },
  19244. "mimeType": {
  19245. "type": "string"
  19246. },
  19247. "client": {
  19248. "type": "string"
  19249. }
  19250. },
  19251. "required": ["name", "uri", "client"],
  19252. "additionalProperties": false
  19253. },
  19254. "Symbol": {
  19255. "type": "object",
  19256. "properties": {
  19257. "name": {
  19258. "type": "string"
  19259. },
  19260. "kind": {
  19261. "type": "integer",
  19262. "minimum": 0
  19263. },
  19264. "location": {
  19265. "type": "object",
  19266. "properties": {
  19267. "uri": {
  19268. "type": "string"
  19269. },
  19270. "range": {
  19271. "$ref": "#/components/schemas/Range"
  19272. }
  19273. },
  19274. "required": ["uri", "range"],
  19275. "additionalProperties": false
  19276. }
  19277. },
  19278. "required": ["name", "kind", "location"],
  19279. "additionalProperties": false
  19280. },
  19281. "FileNode": {
  19282. "type": "object",
  19283. "properties": {
  19284. "name": {
  19285. "type": "string"
  19286. },
  19287. "path": {
  19288. "type": "string"
  19289. },
  19290. "absolute": {
  19291. "type": "string"
  19292. },
  19293. "type": {
  19294. "type": "string",
  19295. "enum": ["file", "directory"]
  19296. },
  19297. "ignored": {
  19298. "type": "boolean"
  19299. }
  19300. },
  19301. "required": ["name", "path", "absolute", "type", "ignored"],
  19302. "additionalProperties": false
  19303. },
  19304. "FileContent": {
  19305. "type": "object",
  19306. "properties": {
  19307. "type": {
  19308. "type": "string",
  19309. "enum": ["text", "binary"]
  19310. },
  19311. "content": {
  19312. "type": "string"
  19313. },
  19314. "diff": {
  19315. "type": "string"
  19316. },
  19317. "patch": {
  19318. "type": "object",
  19319. "properties": {
  19320. "oldFileName": {
  19321. "type": "string"
  19322. },
  19323. "newFileName": {
  19324. "type": "string"
  19325. },
  19326. "oldHeader": {
  19327. "type": "string"
  19328. },
  19329. "newHeader": {
  19330. "type": "string"
  19331. },
  19332. "hunks": {
  19333. "type": "array",
  19334. "items": {
  19335. "type": "object",
  19336. "properties": {
  19337. "oldStart": {
  19338. "type": "integer",
  19339. "minimum": 0
  19340. },
  19341. "oldLines": {
  19342. "type": "integer",
  19343. "minimum": 0
  19344. },
  19345. "newStart": {
  19346. "type": "integer",
  19347. "minimum": 0
  19348. },
  19349. "newLines": {
  19350. "type": "integer",
  19351. "minimum": 0
  19352. },
  19353. "lines": {
  19354. "type": "array",
  19355. "items": {
  19356. "type": "string"
  19357. }
  19358. }
  19359. },
  19360. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  19361. "additionalProperties": false
  19362. }
  19363. },
  19364. "index": {
  19365. "type": "string"
  19366. }
  19367. },
  19368. "required": ["oldFileName", "newFileName", "hunks"],
  19369. "additionalProperties": false
  19370. },
  19371. "encoding": {
  19372. "type": "string",
  19373. "enum": ["base64"]
  19374. },
  19375. "mimeType": {
  19376. "type": "string"
  19377. }
  19378. },
  19379. "required": ["type", "content"],
  19380. "additionalProperties": false
  19381. },
  19382. "File": {
  19383. "type": "object",
  19384. "properties": {
  19385. "path": {
  19386. "type": "string"
  19387. },
  19388. "added": {
  19389. "type": "integer",
  19390. "minimum": 0
  19391. },
  19392. "removed": {
  19393. "type": "integer",
  19394. "minimum": 0
  19395. },
  19396. "status": {
  19397. "type": "string",
  19398. "enum": ["added", "deleted", "modified"]
  19399. }
  19400. },
  19401. "required": ["path", "added", "removed", "status"],
  19402. "additionalProperties": false
  19403. },
  19404. "Path": {
  19405. "type": "object",
  19406. "properties": {
  19407. "home": {
  19408. "type": "string"
  19409. },
  19410. "state": {
  19411. "type": "string"
  19412. },
  19413. "config": {
  19414. "type": "string"
  19415. },
  19416. "worktree": {
  19417. "type": "string"
  19418. },
  19419. "directory": {
  19420. "type": "string"
  19421. }
  19422. },
  19423. "required": ["home", "state", "config", "worktree", "directory"],
  19424. "additionalProperties": false
  19425. },
  19426. "VcsInfo": {
  19427. "type": "object",
  19428. "properties": {
  19429. "branch": {
  19430. "type": "string"
  19431. },
  19432. "default_branch": {
  19433. "type": "string"
  19434. }
  19435. },
  19436. "additionalProperties": false
  19437. },
  19438. "VcsFileStatus": {
  19439. "type": "object",
  19440. "properties": {
  19441. "file": {
  19442. "type": "string"
  19443. },
  19444. "additions": {
  19445. "type": "number"
  19446. },
  19447. "deletions": {
  19448. "type": "number"
  19449. },
  19450. "status": {
  19451. "type": "string",
  19452. "enum": ["added", "deleted", "modified"]
  19453. }
  19454. },
  19455. "required": ["file", "additions", "deletions", "status"],
  19456. "additionalProperties": false
  19457. },
  19458. "VcsFileDiff": {
  19459. "type": "object",
  19460. "properties": {
  19461. "file": {
  19462. "type": "string"
  19463. },
  19464. "patch": {
  19465. "type": "string"
  19466. },
  19467. "additions": {
  19468. "type": "number"
  19469. },
  19470. "deletions": {
  19471. "type": "number"
  19472. },
  19473. "status": {
  19474. "type": "string",
  19475. "enum": ["added", "deleted", "modified"]
  19476. }
  19477. },
  19478. "required": ["file", "additions", "deletions"],
  19479. "additionalProperties": false
  19480. },
  19481. "VcsApplyError": {
  19482. "type": "object",
  19483. "properties": {
  19484. "name": {
  19485. "type": "string",
  19486. "enum": ["VcsApplyError"]
  19487. },
  19488. "data": {
  19489. "type": "object",
  19490. "properties": {
  19491. "message": {
  19492. "type": "string"
  19493. },
  19494. "reason": {
  19495. "type": "string",
  19496. "enum": ["non-git", "not-clean"]
  19497. }
  19498. },
  19499. "required": ["message", "reason"],
  19500. "additionalProperties": false
  19501. }
  19502. },
  19503. "required": ["name", "data"],
  19504. "additionalProperties": false
  19505. },
  19506. "Command": {
  19507. "type": "object",
  19508. "properties": {
  19509. "name": {
  19510. "type": "string"
  19511. },
  19512. "description": {
  19513. "type": "string"
  19514. },
  19515. "agent": {
  19516. "type": "string"
  19517. },
  19518. "model": {
  19519. "type": "string"
  19520. },
  19521. "source": {
  19522. "type": "string",
  19523. "enum": ["command", "mcp", "skill"]
  19524. },
  19525. "template": {
  19526. "type": "string"
  19527. },
  19528. "subtask": {
  19529. "type": "boolean"
  19530. },
  19531. "hints": {
  19532. "type": "array",
  19533. "items": {
  19534. "type": "string"
  19535. }
  19536. }
  19537. },
  19538. "required": ["name", "template", "hints"],
  19539. "additionalProperties": false
  19540. },
  19541. "Agent": {
  19542. "type": "object",
  19543. "properties": {
  19544. "name": {
  19545. "type": "string"
  19546. },
  19547. "description": {
  19548. "type": "string"
  19549. },
  19550. "mode": {
  19551. "type": "string",
  19552. "enum": ["subagent", "primary", "all"]
  19553. },
  19554. "native": {
  19555. "type": "boolean"
  19556. },
  19557. "hidden": {
  19558. "type": "boolean"
  19559. },
  19560. "topP": {
  19561. "type": "number"
  19562. },
  19563. "temperature": {
  19564. "type": "number"
  19565. },
  19566. "color": {
  19567. "type": "string"
  19568. },
  19569. "permission": {
  19570. "$ref": "#/components/schemas/PermissionRuleset"
  19571. },
  19572. "model": {
  19573. "type": "object",
  19574. "properties": {
  19575. "modelID": {
  19576. "type": "string"
  19577. },
  19578. "providerID": {
  19579. "type": "string"
  19580. }
  19581. },
  19582. "required": ["modelID", "providerID"],
  19583. "additionalProperties": false
  19584. },
  19585. "variant": {
  19586. "type": "string"
  19587. },
  19588. "prompt": {
  19589. "type": "string"
  19590. },
  19591. "options": {
  19592. "type": "object"
  19593. },
  19594. "steps": {
  19595. "type": "number"
  19596. }
  19597. },
  19598. "required": ["name", "mode", "permission", "options"],
  19599. "additionalProperties": false
  19600. },
  19601. "LSPStatus": {
  19602. "type": "object",
  19603. "properties": {
  19604. "id": {
  19605. "type": "string"
  19606. },
  19607. "name": {
  19608. "type": "string"
  19609. },
  19610. "root": {
  19611. "type": "string"
  19612. },
  19613. "status": {
  19614. "type": "string",
  19615. "enum": ["connected", "error"]
  19616. }
  19617. },
  19618. "required": ["id", "name", "root", "status"],
  19619. "additionalProperties": false
  19620. },
  19621. "FormatterStatus": {
  19622. "type": "object",
  19623. "properties": {
  19624. "name": {
  19625. "type": "string"
  19626. },
  19627. "extensions": {
  19628. "type": "array",
  19629. "items": {
  19630. "type": "string"
  19631. }
  19632. },
  19633. "enabled": {
  19634. "type": "boolean"
  19635. }
  19636. },
  19637. "required": ["name", "extensions", "enabled"],
  19638. "additionalProperties": false
  19639. },
  19640. "MCPStatusConnected": {
  19641. "type": "object",
  19642. "properties": {
  19643. "status": {
  19644. "type": "string",
  19645. "enum": ["connected"]
  19646. }
  19647. },
  19648. "required": ["status"],
  19649. "additionalProperties": false
  19650. },
  19651. "MCPStatusDisabled": {
  19652. "type": "object",
  19653. "properties": {
  19654. "status": {
  19655. "type": "string",
  19656. "enum": ["disabled"]
  19657. }
  19658. },
  19659. "required": ["status"],
  19660. "additionalProperties": false
  19661. },
  19662. "MCPStatusFailed": {
  19663. "type": "object",
  19664. "properties": {
  19665. "status": {
  19666. "type": "string",
  19667. "enum": ["failed"]
  19668. },
  19669. "error": {
  19670. "type": "string"
  19671. }
  19672. },
  19673. "required": ["status", "error"],
  19674. "additionalProperties": false
  19675. },
  19676. "MCPStatusNeedsAuth": {
  19677. "type": "object",
  19678. "properties": {
  19679. "status": {
  19680. "type": "string",
  19681. "enum": ["needs_auth"]
  19682. }
  19683. },
  19684. "required": ["status"],
  19685. "additionalProperties": false
  19686. },
  19687. "MCPStatusNeedsClientRegistration": {
  19688. "type": "object",
  19689. "properties": {
  19690. "status": {
  19691. "type": "string",
  19692. "enum": ["needs_client_registration"]
  19693. },
  19694. "error": {
  19695. "type": "string"
  19696. }
  19697. },
  19698. "required": ["status", "error"],
  19699. "additionalProperties": false
  19700. },
  19701. "MCPStatus": {
  19702. "anyOf": [
  19703. {
  19704. "$ref": "#/components/schemas/MCPStatusConnected"
  19705. },
  19706. {
  19707. "$ref": "#/components/schemas/MCPStatusDisabled"
  19708. },
  19709. {
  19710. "$ref": "#/components/schemas/MCPStatusFailed"
  19711. },
  19712. {
  19713. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  19714. },
  19715. {
  19716. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  19717. }
  19718. ]
  19719. },
  19720. "McpUnsupportedOAuthError": {
  19721. "type": "object",
  19722. "properties": {
  19723. "error": {
  19724. "type": "string"
  19725. }
  19726. },
  19727. "required": ["error"],
  19728. "additionalProperties": false
  19729. },
  19730. "McpServerNotFoundError": {
  19731. "type": "object",
  19732. "properties": {
  19733. "_tag": {
  19734. "type": "string",
  19735. "enum": ["McpServerNotFoundError"]
  19736. },
  19737. "name": {
  19738. "type": "string"
  19739. },
  19740. "message": {
  19741. "type": "string"
  19742. }
  19743. },
  19744. "required": ["_tag", "name", "message"],
  19745. "additionalProperties": false
  19746. },
  19747. "Project": {
  19748. "type": "object",
  19749. "properties": {
  19750. "id": {
  19751. "type": "string"
  19752. },
  19753. "worktree": {
  19754. "type": "string"
  19755. },
  19756. "vcs": {
  19757. "type": "string",
  19758. "enum": ["git"]
  19759. },
  19760. "name": {
  19761. "type": "string"
  19762. },
  19763. "icon": {
  19764. "type": "object",
  19765. "properties": {
  19766. "url": {
  19767. "type": "string"
  19768. },
  19769. "override": {
  19770. "type": "string"
  19771. },
  19772. "color": {
  19773. "type": "string"
  19774. }
  19775. },
  19776. "additionalProperties": false
  19777. },
  19778. "commands": {
  19779. "type": "object",
  19780. "properties": {
  19781. "start": {
  19782. "type": "string",
  19783. "description": "Startup script to run when creating a new workspace (worktree)"
  19784. }
  19785. },
  19786. "additionalProperties": false
  19787. },
  19788. "time": {
  19789. "type": "object",
  19790. "properties": {
  19791. "created": {
  19792. "type": "integer",
  19793. "minimum": 0
  19794. },
  19795. "updated": {
  19796. "type": "integer",
  19797. "minimum": 0
  19798. },
  19799. "initialized": {
  19800. "type": "integer",
  19801. "minimum": 0
  19802. }
  19803. },
  19804. "required": ["created", "updated"],
  19805. "additionalProperties": false
  19806. },
  19807. "sandboxes": {
  19808. "type": "array",
  19809. "items": {
  19810. "type": "string"
  19811. }
  19812. }
  19813. },
  19814. "required": ["id", "worktree", "time", "sandboxes"],
  19815. "additionalProperties": false
  19816. },
  19817. "ProjectNotFoundError": {
  19818. "type": "object",
  19819. "properties": {
  19820. "_tag": {
  19821. "type": "string",
  19822. "enum": ["ProjectNotFoundError"]
  19823. },
  19824. "projectID": {
  19825. "type": "string"
  19826. },
  19827. "message": {
  19828. "type": "string"
  19829. }
  19830. },
  19831. "required": ["_tag", "projectID", "message"],
  19832. "additionalProperties": false
  19833. },
  19834. "ProjectCopyError": {
  19835. "type": "object",
  19836. "properties": {
  19837. "name": {
  19838. "type": "string",
  19839. "enum": ["ProjectCopyError"]
  19840. },
  19841. "data": {
  19842. "type": "object",
  19843. "properties": {
  19844. "message": {
  19845. "type": "string"
  19846. },
  19847. "forceRequired": {
  19848. "type": "boolean"
  19849. }
  19850. },
  19851. "required": ["message"],
  19852. "additionalProperties": false
  19853. }
  19854. },
  19855. "required": ["name", "data"],
  19856. "additionalProperties": false
  19857. },
  19858. "PtyNotFoundError": {
  19859. "type": "object",
  19860. "properties": {
  19861. "_tag": {
  19862. "type": "string",
  19863. "enum": ["PtyNotFoundError"]
  19864. },
  19865. "ptyID": {
  19866. "type": "string"
  19867. },
  19868. "message": {
  19869. "type": "string"
  19870. }
  19871. },
  19872. "required": ["_tag", "ptyID", "message"],
  19873. "additionalProperties": false
  19874. },
  19875. "PtyForbiddenError": {
  19876. "type": "object",
  19877. "properties": {
  19878. "_tag": {
  19879. "type": "string",
  19880. "enum": ["PtyForbiddenError"]
  19881. },
  19882. "message": {
  19883. "type": "string"
  19884. }
  19885. },
  19886. "required": ["_tag", "message"],
  19887. "additionalProperties": false
  19888. },
  19889. "QuestionRequest": {
  19890. "type": "object",
  19891. "properties": {
  19892. "id": {
  19893. "type": "string",
  19894. "pattern": "^que"
  19895. },
  19896. "sessionID": {
  19897. "type": "string",
  19898. "pattern": "^ses"
  19899. },
  19900. "questions": {
  19901. "type": "array",
  19902. "items": {
  19903. "$ref": "#/components/schemas/QuestionInfo"
  19904. },
  19905. "description": "Questions to ask"
  19906. },
  19907. "tool": {
  19908. "$ref": "#/components/schemas/QuestionTool"
  19909. }
  19910. },
  19911. "required": ["id", "sessionID", "questions"],
  19912. "additionalProperties": false
  19913. },
  19914. "QuestionNotFoundError": {
  19915. "type": "object",
  19916. "properties": {
  19917. "_tag": {
  19918. "type": "string",
  19919. "enum": ["QuestionNotFoundError"]
  19920. },
  19921. "requestID": {
  19922. "type": "string"
  19923. },
  19924. "message": {
  19925. "type": "string"
  19926. }
  19927. },
  19928. "required": ["_tag", "requestID", "message"],
  19929. "additionalProperties": false
  19930. },
  19931. "PermissionRequest": {
  19932. "type": "object",
  19933. "properties": {
  19934. "id": {
  19935. "type": "string",
  19936. "pattern": "^per"
  19937. },
  19938. "sessionID": {
  19939. "type": "string",
  19940. "pattern": "^ses"
  19941. },
  19942. "permission": {
  19943. "type": "string"
  19944. },
  19945. "patterns": {
  19946. "type": "array",
  19947. "items": {
  19948. "type": "string"
  19949. }
  19950. },
  19951. "metadata": {
  19952. "type": "object"
  19953. },
  19954. "always": {
  19955. "type": "array",
  19956. "items": {
  19957. "type": "string"
  19958. }
  19959. },
  19960. "tool": {
  19961. "type": "object",
  19962. "properties": {
  19963. "messageID": {
  19964. "type": "string"
  19965. },
  19966. "callID": {
  19967. "type": "string"
  19968. }
  19969. },
  19970. "required": ["messageID", "callID"],
  19971. "additionalProperties": false
  19972. }
  19973. },
  19974. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19975. "additionalProperties": false
  19976. },
  19977. "PermissionNotFoundError": {
  19978. "type": "object",
  19979. "properties": {
  19980. "_tag": {
  19981. "type": "string",
  19982. "enum": ["PermissionNotFoundError"]
  19983. },
  19984. "requestID": {
  19985. "type": "string"
  19986. },
  19987. "message": {
  19988. "type": "string"
  19989. }
  19990. },
  19991. "required": ["_tag", "requestID", "message"],
  19992. "additionalProperties": false
  19993. },
  19994. "ProviderAuthMethod": {
  19995. "type": "object",
  19996. "properties": {
  19997. "type": {
  19998. "type": "string",
  19999. "enum": ["oauth", "api"]
  20000. },
  20001. "label": {
  20002. "type": "string"
  20003. },
  20004. "prompts": {
  20005. "type": "array",
  20006. "items": {
  20007. "anyOf": [
  20008. {
  20009. "type": "object",
  20010. "properties": {
  20011. "type": {
  20012. "type": "string",
  20013. "enum": ["text"]
  20014. },
  20015. "key": {
  20016. "type": "string"
  20017. },
  20018. "message": {
  20019. "type": "string"
  20020. },
  20021. "placeholder": {
  20022. "type": "string"
  20023. },
  20024. "when": {
  20025. "type": "object",
  20026. "properties": {
  20027. "key": {
  20028. "type": "string"
  20029. },
  20030. "op": {
  20031. "type": "string",
  20032. "enum": ["eq", "neq"]
  20033. },
  20034. "value": {
  20035. "type": "string"
  20036. }
  20037. },
  20038. "required": ["key", "op", "value"],
  20039. "additionalProperties": false
  20040. }
  20041. },
  20042. "required": ["type", "key", "message"],
  20043. "additionalProperties": false
  20044. },
  20045. {
  20046. "type": "object",
  20047. "properties": {
  20048. "type": {
  20049. "type": "string",
  20050. "enum": ["select"]
  20051. },
  20052. "key": {
  20053. "type": "string"
  20054. },
  20055. "message": {
  20056. "type": "string"
  20057. },
  20058. "options": {
  20059. "type": "array",
  20060. "items": {
  20061. "type": "object",
  20062. "properties": {
  20063. "label": {
  20064. "type": "string"
  20065. },
  20066. "value": {
  20067. "type": "string"
  20068. },
  20069. "hint": {
  20070. "type": "string"
  20071. }
  20072. },
  20073. "required": ["label", "value"],
  20074. "additionalProperties": false
  20075. }
  20076. },
  20077. "when": {
  20078. "type": "object",
  20079. "properties": {
  20080. "key": {
  20081. "type": "string"
  20082. },
  20083. "op": {
  20084. "type": "string",
  20085. "enum": ["eq", "neq"]
  20086. },
  20087. "value": {
  20088. "type": "string"
  20089. }
  20090. },
  20091. "required": ["key", "op", "value"],
  20092. "additionalProperties": false
  20093. }
  20094. },
  20095. "required": ["type", "key", "message", "options"],
  20096. "additionalProperties": false
  20097. }
  20098. ]
  20099. }
  20100. }
  20101. },
  20102. "required": ["type", "label"],
  20103. "additionalProperties": false
  20104. },
  20105. "ProviderAuthAuthorization": {
  20106. "type": "object",
  20107. "properties": {
  20108. "url": {
  20109. "type": "string"
  20110. },
  20111. "method": {
  20112. "type": "string",
  20113. "enum": ["auto", "code"]
  20114. },
  20115. "instructions": {
  20116. "type": "string"
  20117. }
  20118. },
  20119. "required": ["url", "method", "instructions"],
  20120. "additionalProperties": false
  20121. },
  20122. "ProviderAuthError1": {
  20123. "type": "object",
  20124. "properties": {
  20125. "name": {
  20126. "type": "string",
  20127. "enum": [
  20128. "BadRequest",
  20129. "ProviderAuthOauthMissing",
  20130. "ProviderAuthOauthCodeMissing",
  20131. "ProviderAuthOauthCallbackFailed",
  20132. "ProviderAuthValidationFailed"
  20133. ]
  20134. },
  20135. "data": {
  20136. "type": "object",
  20137. "properties": {
  20138. "providerID": {
  20139. "type": "string"
  20140. },
  20141. "field": {
  20142. "type": "string"
  20143. },
  20144. "message": {
  20145. "type": "string"
  20146. },
  20147. "kind": {
  20148. "type": "string"
  20149. }
  20150. },
  20151. "additionalProperties": false
  20152. }
  20153. },
  20154. "required": ["name", "data"],
  20155. "additionalProperties": false
  20156. },
  20157. "NotFoundError": {
  20158. "type": "object",
  20159. "required": ["name", "data"],
  20160. "properties": {
  20161. "name": {
  20162. "type": "string",
  20163. "enum": ["NotFoundError"]
  20164. },
  20165. "data": {
  20166. "type": "object",
  20167. "required": ["message"],
  20168. "properties": {
  20169. "message": {
  20170. "type": "string"
  20171. }
  20172. }
  20173. }
  20174. }
  20175. },
  20176. "TextPartInput": {
  20177. "type": "object",
  20178. "properties": {
  20179. "id": {
  20180. "type": "string",
  20181. "pattern": "^prt"
  20182. },
  20183. "type": {
  20184. "type": "string",
  20185. "enum": ["text"]
  20186. },
  20187. "text": {
  20188. "type": "string"
  20189. },
  20190. "synthetic": {
  20191. "type": "boolean"
  20192. },
  20193. "ignored": {
  20194. "type": "boolean"
  20195. },
  20196. "time": {
  20197. "type": "object",
  20198. "properties": {
  20199. "start": {
  20200. "type": "integer",
  20201. "minimum": 0
  20202. },
  20203. "end": {
  20204. "type": "integer",
  20205. "minimum": 0
  20206. }
  20207. },
  20208. "required": ["start"],
  20209. "additionalProperties": false
  20210. },
  20211. "metadata": {
  20212. "type": "object"
  20213. }
  20214. },
  20215. "required": ["type", "text"],
  20216. "additionalProperties": false
  20217. },
  20218. "FilePartInput": {
  20219. "type": "object",
  20220. "properties": {
  20221. "id": {
  20222. "type": "string",
  20223. "pattern": "^prt"
  20224. },
  20225. "type": {
  20226. "type": "string",
  20227. "enum": ["file"]
  20228. },
  20229. "mime": {
  20230. "type": "string"
  20231. },
  20232. "filename": {
  20233. "type": "string"
  20234. },
  20235. "url": {
  20236. "type": "string"
  20237. },
  20238. "source": {
  20239. "$ref": "#/components/schemas/FilePartSource"
  20240. }
  20241. },
  20242. "required": ["type", "mime", "url"],
  20243. "additionalProperties": false
  20244. },
  20245. "AgentPartInput": {
  20246. "type": "object",
  20247. "properties": {
  20248. "id": {
  20249. "type": "string",
  20250. "pattern": "^prt"
  20251. },
  20252. "type": {
  20253. "type": "string",
  20254. "enum": ["agent"]
  20255. },
  20256. "name": {
  20257. "type": "string"
  20258. },
  20259. "source": {
  20260. "type": "object",
  20261. "properties": {
  20262. "value": {
  20263. "type": "string"
  20264. },
  20265. "start": {
  20266. "type": "integer",
  20267. "minimum": 0
  20268. },
  20269. "end": {
  20270. "type": "integer",
  20271. "minimum": 0
  20272. }
  20273. },
  20274. "required": ["value", "start", "end"],
  20275. "additionalProperties": false
  20276. }
  20277. },
  20278. "required": ["type", "name"],
  20279. "additionalProperties": false
  20280. },
  20281. "SubtaskPartInput": {
  20282. "type": "object",
  20283. "properties": {
  20284. "id": {
  20285. "type": "string",
  20286. "pattern": "^prt"
  20287. },
  20288. "type": {
  20289. "type": "string",
  20290. "enum": ["subtask"]
  20291. },
  20292. "prompt": {
  20293. "type": "string"
  20294. },
  20295. "description": {
  20296. "type": "string"
  20297. },
  20298. "agent": {
  20299. "type": "string"
  20300. },
  20301. "model": {
  20302. "type": "object",
  20303. "properties": {
  20304. "providerID": {
  20305. "type": "string"
  20306. },
  20307. "modelID": {
  20308. "type": "string"
  20309. }
  20310. },
  20311. "required": ["providerID", "modelID"],
  20312. "additionalProperties": false
  20313. },
  20314. "command": {
  20315. "type": "string"
  20316. }
  20317. },
  20318. "required": ["type", "prompt", "description", "agent"],
  20319. "additionalProperties": false
  20320. },
  20321. "SessionBusyError": {
  20322. "type": "object",
  20323. "properties": {
  20324. "_tag": {
  20325. "type": "string",
  20326. "enum": ["SessionBusyError"]
  20327. },
  20328. "sessionID": {
  20329. "type": "string"
  20330. },
  20331. "message": {
  20332. "type": "string"
  20333. }
  20334. },
  20335. "required": ["_tag", "sessionID", "message"],
  20336. "additionalProperties": false
  20337. },
  20338. "EventTuiPromptAppend": {
  20339. "type": "object",
  20340. "properties": {
  20341. "type": {
  20342. "type": "string",
  20343. "enum": ["tui.prompt.append"]
  20344. },
  20345. "properties": {
  20346. "type": "object",
  20347. "properties": {
  20348. "text": {
  20349. "type": "string"
  20350. }
  20351. },
  20352. "required": ["text"],
  20353. "additionalProperties": false
  20354. }
  20355. },
  20356. "required": ["type", "properties"],
  20357. "additionalProperties": false
  20358. },
  20359. "EventTuiCommandExecute": {
  20360. "type": "object",
  20361. "properties": {
  20362. "type": {
  20363. "type": "string",
  20364. "enum": ["tui.command.execute"]
  20365. },
  20366. "properties": {
  20367. "type": "object",
  20368. "properties": {
  20369. "command": {
  20370. "anyOf": [
  20371. {
  20372. "type": "string",
  20373. "enum": [
  20374. "session.list",
  20375. "session.new",
  20376. "session.share",
  20377. "session.interrupt",
  20378. "session.compact",
  20379. "session.page.up",
  20380. "session.page.down",
  20381. "session.line.up",
  20382. "session.line.down",
  20383. "session.half.page.up",
  20384. "session.half.page.down",
  20385. "session.first",
  20386. "session.last",
  20387. "prompt.clear",
  20388. "prompt.submit",
  20389. "agent.cycle"
  20390. ]
  20391. },
  20392. {
  20393. "type": "string"
  20394. }
  20395. ]
  20396. }
  20397. },
  20398. "required": ["command"],
  20399. "additionalProperties": false
  20400. }
  20401. },
  20402. "required": ["type", "properties"],
  20403. "additionalProperties": false
  20404. },
  20405. "EventTuiToastShow": {
  20406. "type": "object",
  20407. "properties": {
  20408. "type": {
  20409. "type": "string",
  20410. "enum": ["tui.toast.show"]
  20411. },
  20412. "properties": {
  20413. "type": "object",
  20414. "properties": {
  20415. "title": {
  20416. "type": "string"
  20417. },
  20418. "message": {
  20419. "type": "string"
  20420. },
  20421. "variant": {
  20422. "type": "string",
  20423. "enum": ["info", "success", "warning", "error"]
  20424. },
  20425. "duration": {
  20426. "type": "integer",
  20427. "exclusiveMinimum": 0
  20428. }
  20429. },
  20430. "required": ["message", "variant"],
  20431. "additionalProperties": false
  20432. }
  20433. },
  20434. "required": ["type", "properties"],
  20435. "additionalProperties": false
  20436. },
  20437. "EventTuiSessionSelect": {
  20438. "type": "object",
  20439. "properties": {
  20440. "type": {
  20441. "type": "string",
  20442. "enum": ["tui.session.select"]
  20443. },
  20444. "properties": {
  20445. "type": "object",
  20446. "properties": {
  20447. "sessionID": {
  20448. "type": "string",
  20449. "pattern": "^ses",
  20450. "description": "Session ID to navigate to"
  20451. }
  20452. },
  20453. "required": ["sessionID"],
  20454. "additionalProperties": false
  20455. }
  20456. },
  20457. "required": ["type", "properties"],
  20458. "additionalProperties": false
  20459. },
  20460. "Workspace": {
  20461. "type": "object",
  20462. "properties": {
  20463. "id": {
  20464. "type": "string",
  20465. "pattern": "^wrk"
  20466. },
  20467. "type": {
  20468. "type": "string"
  20469. },
  20470. "name": {
  20471. "type": "string"
  20472. },
  20473. "branch": {
  20474. "anyOf": [
  20475. {
  20476. "type": "string"
  20477. },
  20478. {
  20479. "type": "null"
  20480. }
  20481. ]
  20482. },
  20483. "directory": {
  20484. "anyOf": [
  20485. {
  20486. "type": "string"
  20487. },
  20488. {
  20489. "type": "null"
  20490. }
  20491. ]
  20492. },
  20493. "extra": {
  20494. "anyOf": [
  20495. {},
  20496. {
  20497. "type": "null"
  20498. }
  20499. ]
  20500. },
  20501. "projectID": {
  20502. "type": "string"
  20503. },
  20504. "timeUsed": {
  20505. "anyOf": [
  20506. {
  20507. "type": "number"
  20508. },
  20509. {
  20510. "type": "string",
  20511. "enum": ["NaN"]
  20512. },
  20513. {
  20514. "type": "string",
  20515. "enum": ["Infinity"]
  20516. },
  20517. {
  20518. "type": "string",
  20519. "enum": ["-Infinity"]
  20520. },
  20521. {
  20522. "type": "string",
  20523. "enum": ["Infinity", "-Infinity", "NaN"]
  20524. }
  20525. ]
  20526. }
  20527. },
  20528. "required": ["id", "type", "name", "projectID", "timeUsed"],
  20529. "additionalProperties": false
  20530. },
  20531. "WorkspaceCreateError": {
  20532. "type": "object",
  20533. "properties": {
  20534. "name": {
  20535. "type": "string",
  20536. "enum": ["WorkspaceCreateError"]
  20537. },
  20538. "data": {
  20539. "type": "object",
  20540. "properties": {
  20541. "message": {
  20542. "type": "string"
  20543. }
  20544. },
  20545. "required": ["message"],
  20546. "additionalProperties": false
  20547. }
  20548. },
  20549. "required": ["name", "data"],
  20550. "additionalProperties": false
  20551. },
  20552. "WorkspaceWarpError": {
  20553. "type": "object",
  20554. "properties": {
  20555. "name": {
  20556. "type": "string",
  20557. "enum": ["WorkspaceWarpError"]
  20558. },
  20559. "data": {
  20560. "type": "object",
  20561. "properties": {
  20562. "message": {
  20563. "type": "string"
  20564. }
  20565. },
  20566. "required": ["message"],
  20567. "additionalProperties": false
  20568. }
  20569. },
  20570. "required": ["name", "data"],
  20571. "additionalProperties": false
  20572. },
  20573. "UnauthorizedError": {
  20574. "type": "object",
  20575. "properties": {
  20576. "_tag": {
  20577. "type": "string",
  20578. "enum": ["UnauthorizedError"]
  20579. },
  20580. "message": {
  20581. "type": "string"
  20582. }
  20583. },
  20584. "required": ["_tag", "message"],
  20585. "additionalProperties": false
  20586. },
  20587. "SessionsResponse": {
  20588. "type": "object",
  20589. "properties": {
  20590. "data": {
  20591. "type": "array",
  20592. "items": {
  20593. "$ref": "#/components/schemas/SessionV2Info"
  20594. }
  20595. },
  20596. "cursor": {
  20597. "type": "object",
  20598. "properties": {
  20599. "previous": {
  20600. "type": "string"
  20601. },
  20602. "next": {
  20603. "type": "string"
  20604. }
  20605. },
  20606. "additionalProperties": false
  20607. }
  20608. },
  20609. "required": ["data", "cursor"],
  20610. "additionalProperties": false
  20611. },
  20612. "InvalidCursorError": {
  20613. "type": "object",
  20614. "properties": {
  20615. "_tag": {
  20616. "type": "string",
  20617. "enum": ["InvalidCursorError"]
  20618. },
  20619. "message": {
  20620. "type": "string"
  20621. }
  20622. },
  20623. "required": ["_tag", "message"],
  20624. "additionalProperties": false
  20625. },
  20626. "ConflictError": {
  20627. "type": "object",
  20628. "properties": {
  20629. "_tag": {
  20630. "type": "string",
  20631. "enum": ["ConflictError"]
  20632. },
  20633. "message": {
  20634. "type": "string"
  20635. },
  20636. "resource": {
  20637. "type": "string"
  20638. }
  20639. },
  20640. "required": ["_tag", "message"],
  20641. "additionalProperties": false
  20642. },
  20643. "SessionNotFoundError": {
  20644. "type": "object",
  20645. "properties": {
  20646. "_tag": {
  20647. "type": "string",
  20648. "enum": ["SessionNotFoundError"]
  20649. },
  20650. "sessionID": {
  20651. "type": "string"
  20652. },
  20653. "message": {
  20654. "type": "string"
  20655. }
  20656. },
  20657. "required": ["_tag", "sessionID", "message"],
  20658. "additionalProperties": false
  20659. },
  20660. "ServiceUnavailableError": {
  20661. "type": "object",
  20662. "properties": {
  20663. "_tag": {
  20664. "type": "string",
  20665. "enum": ["ServiceUnavailableError"]
  20666. },
  20667. "message": {
  20668. "type": "string"
  20669. },
  20670. "service": {
  20671. "type": "string"
  20672. }
  20673. },
  20674. "required": ["_tag", "message"],
  20675. "additionalProperties": false
  20676. },
  20677. "UnknownError1": {
  20678. "type": "object",
  20679. "properties": {
  20680. "_tag": {
  20681. "type": "string",
  20682. "enum": ["UnknownError"]
  20683. },
  20684. "message": {
  20685. "type": "string"
  20686. },
  20687. "ref": {
  20688. "type": "string"
  20689. }
  20690. },
  20691. "required": ["_tag", "message"],
  20692. "additionalProperties": false
  20693. },
  20694. "SessionMessagesResponse": {
  20695. "type": "object",
  20696. "properties": {
  20697. "data": {
  20698. "type": "array",
  20699. "items": {
  20700. "$ref": "#/components/schemas/SessionMessage"
  20701. }
  20702. },
  20703. "cursor": {
  20704. "type": "object",
  20705. "properties": {
  20706. "previous": {
  20707. "type": "string"
  20708. },
  20709. "next": {
  20710. "type": "string"
  20711. }
  20712. },
  20713. "additionalProperties": false
  20714. }
  20715. },
  20716. "required": ["data", "cursor"],
  20717. "additionalProperties": false
  20718. },
  20719. "ProviderNotFoundError": {
  20720. "type": "object",
  20721. "properties": {
  20722. "_tag": {
  20723. "type": "string",
  20724. "enum": ["ProviderNotFoundError"]
  20725. },
  20726. "providerID": {
  20727. "type": "string"
  20728. },
  20729. "message": {
  20730. "type": "string"
  20731. }
  20732. },
  20733. "required": ["_tag", "providerID", "message"],
  20734. "additionalProperties": false
  20735. },
  20736. "effect_HttpApiError_Forbidden": {
  20737. "type": "object",
  20738. "properties": {
  20739. "_tag": {
  20740. "type": "string",
  20741. "enum": ["Forbidden"]
  20742. }
  20743. },
  20744. "required": ["_tag"],
  20745. "additionalProperties": false
  20746. },
  20747. "Event.tui.prompt.append": {
  20748. "type": "object",
  20749. "properties": {
  20750. "id": {
  20751. "type": "string",
  20752. "pattern": "^evt_"
  20753. },
  20754. "type": {
  20755. "type": "string",
  20756. "enum": ["tui.prompt.append"]
  20757. },
  20758. "properties": {
  20759. "type": "object",
  20760. "properties": {
  20761. "text": {
  20762. "type": "string"
  20763. }
  20764. },
  20765. "required": ["text"],
  20766. "additionalProperties": false
  20767. }
  20768. },
  20769. "required": ["id", "type", "properties"],
  20770. "additionalProperties": false
  20771. },
  20772. "Event.tui.command.execute": {
  20773. "type": "object",
  20774. "properties": {
  20775. "id": {
  20776. "type": "string",
  20777. "pattern": "^evt_"
  20778. },
  20779. "type": {
  20780. "type": "string",
  20781. "enum": ["tui.command.execute"]
  20782. },
  20783. "properties": {
  20784. "type": "object",
  20785. "properties": {
  20786. "command": {
  20787. "anyOf": [
  20788. {
  20789. "type": "string",
  20790. "enum": [
  20791. "session.list",
  20792. "session.new",
  20793. "session.share",
  20794. "session.interrupt",
  20795. "session.compact",
  20796. "session.page.up",
  20797. "session.page.down",
  20798. "session.line.up",
  20799. "session.line.down",
  20800. "session.half.page.up",
  20801. "session.half.page.down",
  20802. "session.first",
  20803. "session.last",
  20804. "prompt.clear",
  20805. "prompt.submit",
  20806. "agent.cycle"
  20807. ]
  20808. },
  20809. {
  20810. "type": "string"
  20811. }
  20812. ]
  20813. }
  20814. },
  20815. "required": ["command"],
  20816. "additionalProperties": false
  20817. }
  20818. },
  20819. "required": ["id", "type", "properties"],
  20820. "additionalProperties": false
  20821. },
  20822. "Event.tui.toast.show": {
  20823. "type": "object",
  20824. "properties": {
  20825. "id": {
  20826. "type": "string",
  20827. "pattern": "^evt_"
  20828. },
  20829. "type": {
  20830. "type": "string",
  20831. "enum": ["tui.toast.show"]
  20832. },
  20833. "properties": {
  20834. "type": "object",
  20835. "properties": {
  20836. "title": {
  20837. "type": "string"
  20838. },
  20839. "message": {
  20840. "type": "string"
  20841. },
  20842. "variant": {
  20843. "type": "string",
  20844. "enum": ["info", "success", "warning", "error"]
  20845. },
  20846. "duration": {
  20847. "type": "integer",
  20848. "exclusiveMinimum": 0
  20849. }
  20850. },
  20851. "required": ["message", "variant"],
  20852. "additionalProperties": false
  20853. }
  20854. },
  20855. "required": ["id", "type", "properties"],
  20856. "additionalProperties": false
  20857. },
  20858. "Event.tui.session.select": {
  20859. "type": "object",
  20860. "properties": {
  20861. "id": {
  20862. "type": "string",
  20863. "pattern": "^evt_"
  20864. },
  20865. "type": {
  20866. "type": "string",
  20867. "enum": ["tui.session.select"]
  20868. },
  20869. "properties": {
  20870. "type": "object",
  20871. "properties": {
  20872. "sessionID": {
  20873. "type": "string",
  20874. "pattern": "^ses",
  20875. "description": "Session ID to navigate to"
  20876. }
  20877. },
  20878. "required": ["sessionID"],
  20879. "additionalProperties": false
  20880. }
  20881. },
  20882. "required": ["id", "type", "properties"],
  20883. "additionalProperties": false
  20884. },
  20885. "MoveSessionDestination": {
  20886. "type": "object",
  20887. "properties": {
  20888. "directory": {
  20889. "type": "string"
  20890. }
  20891. },
  20892. "required": ["directory"],
  20893. "additionalProperties": false
  20894. },
  20895. "ModelV2Info": {
  20896. "type": "object",
  20897. "properties": {
  20898. "id": {
  20899. "type": "string"
  20900. },
  20901. "providerID": {
  20902. "type": "string"
  20903. },
  20904. "family": {
  20905. "type": "string"
  20906. },
  20907. "name": {
  20908. "type": "string"
  20909. },
  20910. "api": {
  20911. "anyOf": [
  20912. {
  20913. "type": "object",
  20914. "properties": {
  20915. "id": {
  20916. "type": "string"
  20917. },
  20918. "type": {
  20919. "type": "string",
  20920. "enum": ["aisdk"]
  20921. },
  20922. "package": {
  20923. "type": "string"
  20924. },
  20925. "url": {
  20926. "type": "string"
  20927. },
  20928. "settings": {
  20929. "type": "object"
  20930. }
  20931. },
  20932. "required": ["id", "type", "package"],
  20933. "additionalProperties": false
  20934. },
  20935. {
  20936. "type": "object",
  20937. "properties": {
  20938. "id": {
  20939. "type": "string"
  20940. },
  20941. "type": {
  20942. "type": "string",
  20943. "enum": ["native"]
  20944. },
  20945. "url": {
  20946. "type": "string"
  20947. },
  20948. "settings": {
  20949. "type": "object"
  20950. }
  20951. },
  20952. "required": ["id", "type", "settings"],
  20953. "additionalProperties": false
  20954. }
  20955. ]
  20956. },
  20957. "capabilities": {
  20958. "type": "object",
  20959. "properties": {
  20960. "tools": {
  20961. "type": "boolean"
  20962. },
  20963. "input": {
  20964. "type": "array",
  20965. "items": {
  20966. "type": "string"
  20967. }
  20968. },
  20969. "output": {
  20970. "type": "array",
  20971. "items": {
  20972. "type": "string"
  20973. }
  20974. }
  20975. },
  20976. "required": ["tools", "input", "output"],
  20977. "additionalProperties": false
  20978. },
  20979. "request": {
  20980. "type": "object",
  20981. "properties": {
  20982. "headers": {
  20983. "type": "object",
  20984. "additionalProperties": {
  20985. "type": "string"
  20986. }
  20987. },
  20988. "body": {
  20989. "type": "object"
  20990. },
  20991. "generation": {
  20992. "type": "object",
  20993. "properties": {
  20994. "maxTokens": {
  20995. "anyOf": [
  20996. {
  20997. "type": "number"
  20998. },
  20999. {
  21000. "type": "string",
  21001. "enum": ["NaN"]
  21002. },
  21003. {
  21004. "type": "string",
  21005. "enum": ["Infinity"]
  21006. },
  21007. {
  21008. "type": "string",
  21009. "enum": ["-Infinity"]
  21010. },
  21011. {
  21012. "type": "string",
  21013. "enum": ["Infinity", "-Infinity", "NaN"]
  21014. }
  21015. ]
  21016. },
  21017. "temperature": {
  21018. "anyOf": [
  21019. {
  21020. "type": "number"
  21021. },
  21022. {
  21023. "type": "string",
  21024. "enum": ["NaN"]
  21025. },
  21026. {
  21027. "type": "string",
  21028. "enum": ["Infinity"]
  21029. },
  21030. {
  21031. "type": "string",
  21032. "enum": ["-Infinity"]
  21033. },
  21034. {
  21035. "type": "string",
  21036. "enum": ["Infinity", "-Infinity", "NaN"]
  21037. }
  21038. ]
  21039. },
  21040. "topP": {
  21041. "anyOf": [
  21042. {
  21043. "type": "number"
  21044. },
  21045. {
  21046. "type": "string",
  21047. "enum": ["NaN"]
  21048. },
  21049. {
  21050. "type": "string",
  21051. "enum": ["Infinity"]
  21052. },
  21053. {
  21054. "type": "string",
  21055. "enum": ["-Infinity"]
  21056. },
  21057. {
  21058. "type": "string",
  21059. "enum": ["Infinity", "-Infinity", "NaN"]
  21060. }
  21061. ]
  21062. },
  21063. "topK": {
  21064. "anyOf": [
  21065. {
  21066. "type": "number"
  21067. },
  21068. {
  21069. "type": "string",
  21070. "enum": ["NaN"]
  21071. },
  21072. {
  21073. "type": "string",
  21074. "enum": ["Infinity"]
  21075. },
  21076. {
  21077. "type": "string",
  21078. "enum": ["-Infinity"]
  21079. },
  21080. {
  21081. "type": "string",
  21082. "enum": ["Infinity", "-Infinity", "NaN"]
  21083. }
  21084. ]
  21085. },
  21086. "frequencyPenalty": {
  21087. "anyOf": [
  21088. {
  21089. "type": "number"
  21090. },
  21091. {
  21092. "type": "string",
  21093. "enum": ["NaN"]
  21094. },
  21095. {
  21096. "type": "string",
  21097. "enum": ["Infinity"]
  21098. },
  21099. {
  21100. "type": "string",
  21101. "enum": ["-Infinity"]
  21102. },
  21103. {
  21104. "type": "string",
  21105. "enum": ["Infinity", "-Infinity", "NaN"]
  21106. }
  21107. ]
  21108. },
  21109. "presencePenalty": {
  21110. "anyOf": [
  21111. {
  21112. "type": "number"
  21113. },
  21114. {
  21115. "type": "string",
  21116. "enum": ["NaN"]
  21117. },
  21118. {
  21119. "type": "string",
  21120. "enum": ["Infinity"]
  21121. },
  21122. {
  21123. "type": "string",
  21124. "enum": ["-Infinity"]
  21125. },
  21126. {
  21127. "type": "string",
  21128. "enum": ["Infinity", "-Infinity", "NaN"]
  21129. }
  21130. ]
  21131. },
  21132. "seed": {
  21133. "anyOf": [
  21134. {
  21135. "type": "number"
  21136. },
  21137. {
  21138. "type": "string",
  21139. "enum": ["NaN"]
  21140. },
  21141. {
  21142. "type": "string",
  21143. "enum": ["Infinity"]
  21144. },
  21145. {
  21146. "type": "string",
  21147. "enum": ["-Infinity"]
  21148. },
  21149. {
  21150. "type": "string",
  21151. "enum": ["Infinity", "-Infinity", "NaN"]
  21152. }
  21153. ]
  21154. },
  21155. "stop": {
  21156. "type": "array",
  21157. "items": {
  21158. "type": "string"
  21159. }
  21160. }
  21161. },
  21162. "additionalProperties": false
  21163. },
  21164. "options": {
  21165. "type": "object"
  21166. },
  21167. "variant": {
  21168. "type": "string"
  21169. }
  21170. },
  21171. "required": ["headers", "body"],
  21172. "additionalProperties": false
  21173. },
  21174. "variants": {
  21175. "type": "array",
  21176. "items": {
  21177. "type": "object",
  21178. "properties": {
  21179. "id": {
  21180. "type": "string"
  21181. },
  21182. "headers": {
  21183. "type": "object",
  21184. "additionalProperties": {
  21185. "type": "string"
  21186. }
  21187. },
  21188. "body": {
  21189. "type": "object"
  21190. },
  21191. "generation": {
  21192. "type": "object",
  21193. "properties": {
  21194. "maxTokens": {
  21195. "anyOf": [
  21196. {
  21197. "type": "number"
  21198. },
  21199. {
  21200. "type": "string",
  21201. "enum": ["NaN"]
  21202. },
  21203. {
  21204. "type": "string",
  21205. "enum": ["Infinity"]
  21206. },
  21207. {
  21208. "type": "string",
  21209. "enum": ["-Infinity"]
  21210. },
  21211. {
  21212. "type": "string",
  21213. "enum": ["Infinity", "-Infinity", "NaN"]
  21214. }
  21215. ]
  21216. },
  21217. "temperature": {
  21218. "anyOf": [
  21219. {
  21220. "type": "number"
  21221. },
  21222. {
  21223. "type": "string",
  21224. "enum": ["NaN"]
  21225. },
  21226. {
  21227. "type": "string",
  21228. "enum": ["Infinity"]
  21229. },
  21230. {
  21231. "type": "string",
  21232. "enum": ["-Infinity"]
  21233. },
  21234. {
  21235. "type": "string",
  21236. "enum": ["Infinity", "-Infinity", "NaN"]
  21237. }
  21238. ]
  21239. },
  21240. "topP": {
  21241. "anyOf": [
  21242. {
  21243. "type": "number"
  21244. },
  21245. {
  21246. "type": "string",
  21247. "enum": ["NaN"]
  21248. },
  21249. {
  21250. "type": "string",
  21251. "enum": ["Infinity"]
  21252. },
  21253. {
  21254. "type": "string",
  21255. "enum": ["-Infinity"]
  21256. },
  21257. {
  21258. "type": "string",
  21259. "enum": ["Infinity", "-Infinity", "NaN"]
  21260. }
  21261. ]
  21262. },
  21263. "topK": {
  21264. "anyOf": [
  21265. {
  21266. "type": "number"
  21267. },
  21268. {
  21269. "type": "string",
  21270. "enum": ["NaN"]
  21271. },
  21272. {
  21273. "type": "string",
  21274. "enum": ["Infinity"]
  21275. },
  21276. {
  21277. "type": "string",
  21278. "enum": ["-Infinity"]
  21279. },
  21280. {
  21281. "type": "string",
  21282. "enum": ["Infinity", "-Infinity", "NaN"]
  21283. }
  21284. ]
  21285. },
  21286. "frequencyPenalty": {
  21287. "anyOf": [
  21288. {
  21289. "type": "number"
  21290. },
  21291. {
  21292. "type": "string",
  21293. "enum": ["NaN"]
  21294. },
  21295. {
  21296. "type": "string",
  21297. "enum": ["Infinity"]
  21298. },
  21299. {
  21300. "type": "string",
  21301. "enum": ["-Infinity"]
  21302. },
  21303. {
  21304. "type": "string",
  21305. "enum": ["Infinity", "-Infinity", "NaN"]
  21306. }
  21307. ]
  21308. },
  21309. "presencePenalty": {
  21310. "anyOf": [
  21311. {
  21312. "type": "number"
  21313. },
  21314. {
  21315. "type": "string",
  21316. "enum": ["NaN"]
  21317. },
  21318. {
  21319. "type": "string",
  21320. "enum": ["Infinity"]
  21321. },
  21322. {
  21323. "type": "string",
  21324. "enum": ["-Infinity"]
  21325. },
  21326. {
  21327. "type": "string",
  21328. "enum": ["Infinity", "-Infinity", "NaN"]
  21329. }
  21330. ]
  21331. },
  21332. "seed": {
  21333. "anyOf": [
  21334. {
  21335. "type": "number"
  21336. },
  21337. {
  21338. "type": "string",
  21339. "enum": ["NaN"]
  21340. },
  21341. {
  21342. "type": "string",
  21343. "enum": ["Infinity"]
  21344. },
  21345. {
  21346. "type": "string",
  21347. "enum": ["-Infinity"]
  21348. },
  21349. {
  21350. "type": "string",
  21351. "enum": ["Infinity", "-Infinity", "NaN"]
  21352. }
  21353. ]
  21354. },
  21355. "stop": {
  21356. "type": "array",
  21357. "items": {
  21358. "type": "string"
  21359. }
  21360. }
  21361. },
  21362. "additionalProperties": false
  21363. },
  21364. "options": {
  21365. "type": "object"
  21366. }
  21367. },
  21368. "required": ["id", "headers", "body"],
  21369. "additionalProperties": false
  21370. }
  21371. },
  21372. "time": {
  21373. "type": "object",
  21374. "properties": {
  21375. "released": {
  21376. "anyOf": [
  21377. {
  21378. "type": "number"
  21379. },
  21380. {
  21381. "type": "string",
  21382. "enum": ["NaN"]
  21383. },
  21384. {
  21385. "type": "string",
  21386. "enum": ["Infinity"]
  21387. },
  21388. {
  21389. "type": "string",
  21390. "enum": ["-Infinity"]
  21391. },
  21392. {
  21393. "type": "string",
  21394. "enum": ["Infinity", "-Infinity", "NaN"]
  21395. }
  21396. ]
  21397. }
  21398. },
  21399. "required": ["released"],
  21400. "additionalProperties": false
  21401. },
  21402. "cost": {
  21403. "type": "array",
  21404. "items": {
  21405. "type": "object",
  21406. "properties": {
  21407. "tier": {
  21408. "type": "object",
  21409. "properties": {
  21410. "type": {
  21411. "type": "string",
  21412. "enum": ["context"]
  21413. },
  21414. "size": {
  21415. "type": "integer"
  21416. }
  21417. },
  21418. "required": ["type", "size"],
  21419. "additionalProperties": false
  21420. },
  21421. "input": {
  21422. "type": "number"
  21423. },
  21424. "output": {
  21425. "type": "number"
  21426. },
  21427. "cache": {
  21428. "type": "object",
  21429. "properties": {
  21430. "read": {
  21431. "type": "number"
  21432. },
  21433. "write": {
  21434. "type": "number"
  21435. }
  21436. },
  21437. "required": ["read", "write"],
  21438. "additionalProperties": false
  21439. }
  21440. },
  21441. "required": ["input", "output", "cache"],
  21442. "additionalProperties": false
  21443. }
  21444. },
  21445. "status": {
  21446. "type": "string",
  21447. "enum": ["alpha", "beta", "deprecated", "active"]
  21448. },
  21449. "enabled": {
  21450. "type": "boolean"
  21451. },
  21452. "limit": {
  21453. "type": "object",
  21454. "properties": {
  21455. "context": {
  21456. "type": "integer"
  21457. },
  21458. "input": {
  21459. "type": "integer"
  21460. },
  21461. "output": {
  21462. "type": "integer"
  21463. }
  21464. },
  21465. "required": ["context", "output"],
  21466. "additionalProperties": false
  21467. }
  21468. },
  21469. "required": [
  21470. "id",
  21471. "providerID",
  21472. "name",
  21473. "api",
  21474. "capabilities",
  21475. "request",
  21476. "variants",
  21477. "time",
  21478. "cost",
  21479. "status",
  21480. "enabled",
  21481. "limit"
  21482. ],
  21483. "additionalProperties": false
  21484. },
  21485. "LocationRef": {
  21486. "type": "object",
  21487. "properties": {
  21488. "directory": {
  21489. "type": "string"
  21490. },
  21491. "workspaceID": {
  21492. "type": "string",
  21493. "pattern": "^wrk"
  21494. }
  21495. },
  21496. "required": ["directory"],
  21497. "additionalProperties": false
  21498. },
  21499. "PromptSource": {
  21500. "type": "object",
  21501. "properties": {
  21502. "start": {
  21503. "type": "number"
  21504. },
  21505. "end": {
  21506. "type": "number"
  21507. },
  21508. "text": {
  21509. "type": "string"
  21510. }
  21511. },
  21512. "required": ["start", "end", "text"],
  21513. "additionalProperties": false
  21514. },
  21515. "PromptFileAttachment": {
  21516. "type": "object",
  21517. "properties": {
  21518. "uri": {
  21519. "type": "string"
  21520. },
  21521. "mime": {
  21522. "type": "string"
  21523. },
  21524. "name": {
  21525. "type": "string"
  21526. },
  21527. "description": {
  21528. "type": "string"
  21529. },
  21530. "source": {
  21531. "$ref": "#/components/schemas/PromptSource"
  21532. }
  21533. },
  21534. "required": ["uri", "mime"],
  21535. "additionalProperties": false
  21536. },
  21537. "PromptAgentAttachment": {
  21538. "type": "object",
  21539. "properties": {
  21540. "name": {
  21541. "type": "string"
  21542. },
  21543. "source": {
  21544. "$ref": "#/components/schemas/PromptSource"
  21545. }
  21546. },
  21547. "required": ["name"],
  21548. "additionalProperties": false
  21549. },
  21550. "SessionErrorUnknown": {
  21551. "type": "object",
  21552. "properties": {
  21553. "type": {
  21554. "type": "string",
  21555. "enum": ["unknown"]
  21556. },
  21557. "message": {
  21558. "type": "string"
  21559. }
  21560. },
  21561. "required": ["type", "message"],
  21562. "additionalProperties": false
  21563. },
  21564. "ToolTextContent": {
  21565. "type": "object",
  21566. "properties": {
  21567. "type": {
  21568. "type": "string",
  21569. "enum": ["text"]
  21570. },
  21571. "text": {
  21572. "type": "string"
  21573. }
  21574. },
  21575. "required": ["type", "text"],
  21576. "additionalProperties": false
  21577. },
  21578. "ToolFileContent": {
  21579. "type": "object",
  21580. "properties": {
  21581. "type": {
  21582. "type": "string",
  21583. "enum": ["file"]
  21584. },
  21585. "uri": {
  21586. "type": "string"
  21587. },
  21588. "mime": {
  21589. "type": "string"
  21590. },
  21591. "name": {
  21592. "type": "string"
  21593. }
  21594. },
  21595. "required": ["type", "uri", "mime"],
  21596. "additionalProperties": false
  21597. },
  21598. "SessionNextRetry_error": {
  21599. "type": "object",
  21600. "properties": {
  21601. "message": {
  21602. "type": "string"
  21603. },
  21604. "statusCode": {
  21605. "type": "number"
  21606. },
  21607. "isRetryable": {
  21608. "type": "boolean"
  21609. },
  21610. "responseHeaders": {
  21611. "type": "object",
  21612. "additionalProperties": {
  21613. "type": "string"
  21614. }
  21615. },
  21616. "responseBody": {
  21617. "type": "string"
  21618. },
  21619. "metadata": {
  21620. "type": "object",
  21621. "additionalProperties": {
  21622. "type": "string"
  21623. }
  21624. }
  21625. },
  21626. "required": ["message", "isRetryable"],
  21627. "additionalProperties": false
  21628. },
  21629. "AuthOAuthCredential": {
  21630. "type": "object",
  21631. "properties": {
  21632. "type": {
  21633. "type": "string",
  21634. "enum": ["oauth"]
  21635. },
  21636. "refresh": {
  21637. "type": "string"
  21638. },
  21639. "access": {
  21640. "type": "string"
  21641. },
  21642. "expires": {
  21643. "type": "integer",
  21644. "minimum": 0
  21645. }
  21646. },
  21647. "required": ["type", "refresh", "access", "expires"],
  21648. "additionalProperties": false
  21649. },
  21650. "AuthApiKeyCredential": {
  21651. "type": "object",
  21652. "properties": {
  21653. "type": {
  21654. "type": "string",
  21655. "enum": ["api"]
  21656. },
  21657. "key": {
  21658. "type": "string"
  21659. },
  21660. "metadata": {
  21661. "type": "object",
  21662. "additionalProperties": {
  21663. "type": "string"
  21664. }
  21665. }
  21666. },
  21667. "required": ["type", "key"],
  21668. "additionalProperties": false
  21669. },
  21670. "AuthCredential": {
  21671. "anyOf": [
  21672. {
  21673. "$ref": "#/components/schemas/AuthOAuthCredential"
  21674. },
  21675. {
  21676. "$ref": "#/components/schemas/AuthApiKeyCredential"
  21677. }
  21678. ]
  21679. },
  21680. "AuthInfo": {
  21681. "type": "object",
  21682. "properties": {
  21683. "id": {
  21684. "type": "string"
  21685. },
  21686. "serviceID": {
  21687. "type": "string"
  21688. },
  21689. "description": {
  21690. "type": "string"
  21691. },
  21692. "credential": {
  21693. "$ref": "#/components/schemas/AuthCredential"
  21694. }
  21695. },
  21696. "required": ["id", "serviceID", "description", "credential"],
  21697. "additionalProperties": false
  21698. },
  21699. "PermissionV2Source": {
  21700. "type": "object",
  21701. "properties": {
  21702. "type": {
  21703. "type": "string",
  21704. "enum": ["tool"]
  21705. },
  21706. "messageID": {
  21707. "type": "string"
  21708. },
  21709. "callID": {
  21710. "type": "string"
  21711. }
  21712. },
  21713. "required": ["type", "messageID", "callID"],
  21714. "additionalProperties": false
  21715. },
  21716. "PermissionV2Reply": {
  21717. "type": "string",
  21718. "enum": ["once", "always", "reject"]
  21719. },
  21720. "QuestionV2Option": {
  21721. "type": "object",
  21722. "properties": {
  21723. "label": {
  21724. "type": "string",
  21725. "description": "Display text (1-5 words, concise)"
  21726. },
  21727. "description": {
  21728. "type": "string",
  21729. "description": "Explanation of choice"
  21730. }
  21731. },
  21732. "required": ["label", "description"],
  21733. "additionalProperties": false
  21734. },
  21735. "QuestionV2Info": {
  21736. "type": "object",
  21737. "properties": {
  21738. "question": {
  21739. "type": "string",
  21740. "description": "Complete question"
  21741. },
  21742. "header": {
  21743. "type": "string",
  21744. "description": "Very short label (max 30 chars)"
  21745. },
  21746. "options": {
  21747. "type": "array",
  21748. "items": {
  21749. "$ref": "#/components/schemas/QuestionV2Option"
  21750. },
  21751. "description": "Available choices"
  21752. },
  21753. "multiple": {
  21754. "type": "boolean"
  21755. },
  21756. "custom": {
  21757. "type": "boolean"
  21758. }
  21759. },
  21760. "required": ["question", "header", "options"],
  21761. "additionalProperties": false
  21762. },
  21763. "QuestionV2Tool": {
  21764. "type": "object",
  21765. "properties": {
  21766. "messageID": {
  21767. "type": "string"
  21768. },
  21769. "callID": {
  21770. "type": "string"
  21771. }
  21772. },
  21773. "required": ["messageID", "callID"],
  21774. "additionalProperties": false
  21775. },
  21776. "QuestionV2Answer": {
  21777. "type": "array",
  21778. "items": {
  21779. "type": "string"
  21780. }
  21781. },
  21782. "EventServerInstanceDisposed": {
  21783. "type": "object",
  21784. "properties": {
  21785. "id": {
  21786. "type": "string"
  21787. },
  21788. "type": {
  21789. "type": "string",
  21790. "enum": ["server.instance.disposed"]
  21791. },
  21792. "properties": {
  21793. "type": "object",
  21794. "properties": {
  21795. "directory": {
  21796. "type": "string"
  21797. }
  21798. },
  21799. "required": ["directory"],
  21800. "additionalProperties": false
  21801. }
  21802. },
  21803. "required": ["id", "type", "properties"],
  21804. "additionalProperties": false
  21805. },
  21806. "SyncEventSessionCreated": {
  21807. "type": "object",
  21808. "properties": {
  21809. "type": {
  21810. "type": "string",
  21811. "enum": ["sync"]
  21812. },
  21813. "id": {
  21814. "type": "string",
  21815. "pattern": "^evt_"
  21816. },
  21817. "syncEvent": {
  21818. "type": "object",
  21819. "properties": {
  21820. "type": {
  21821. "type": "string",
  21822. "enum": ["session.created.1"]
  21823. },
  21824. "id": {
  21825. "type": "string",
  21826. "pattern": "^evt_"
  21827. },
  21828. "seq": {
  21829. "type": "number"
  21830. },
  21831. "aggregateID": {
  21832. "type": "string"
  21833. },
  21834. "data": {
  21835. "type": "object",
  21836. "properties": {
  21837. "sessionID": {
  21838. "type": "string",
  21839. "pattern": "^ses"
  21840. },
  21841. "info": {
  21842. "$ref": "#/components/schemas/Session"
  21843. }
  21844. },
  21845. "required": ["sessionID", "info"],
  21846. "additionalProperties": false
  21847. }
  21848. },
  21849. "required": ["type", "id", "seq", "aggregateID", "data"],
  21850. "additionalProperties": false
  21851. }
  21852. },
  21853. "required": ["type", "id", "syncEvent"],
  21854. "additionalProperties": false
  21855. },
  21856. "SyncEventSessionUpdated": {
  21857. "type": "object",
  21858. "properties": {
  21859. "type": {
  21860. "type": "string",
  21861. "enum": ["sync"]
  21862. },
  21863. "id": {
  21864. "type": "string",
  21865. "pattern": "^evt_"
  21866. },
  21867. "syncEvent": {
  21868. "type": "object",
  21869. "properties": {
  21870. "type": {
  21871. "type": "string",
  21872. "enum": ["session.updated.1"]
  21873. },
  21874. "id": {
  21875. "type": "string",
  21876. "pattern": "^evt_"
  21877. },
  21878. "seq": {
  21879. "type": "number"
  21880. },
  21881. "aggregateID": {
  21882. "type": "string"
  21883. },
  21884. "data": {
  21885. "type": "object",
  21886. "properties": {
  21887. "sessionID": {
  21888. "type": "string",
  21889. "pattern": "^ses"
  21890. },
  21891. "info": {
  21892. "$ref": "#/components/schemas/Session"
  21893. }
  21894. },
  21895. "required": ["sessionID", "info"],
  21896. "additionalProperties": false
  21897. }
  21898. },
  21899. "required": ["type", "id", "seq", "aggregateID", "data"],
  21900. "additionalProperties": false
  21901. }
  21902. },
  21903. "required": ["type", "id", "syncEvent"],
  21904. "additionalProperties": false
  21905. },
  21906. "SyncEventSessionDeleted": {
  21907. "type": "object",
  21908. "properties": {
  21909. "type": {
  21910. "type": "string",
  21911. "enum": ["sync"]
  21912. },
  21913. "id": {
  21914. "type": "string",
  21915. "pattern": "^evt_"
  21916. },
  21917. "syncEvent": {
  21918. "type": "object",
  21919. "properties": {
  21920. "type": {
  21921. "type": "string",
  21922. "enum": ["session.deleted.1"]
  21923. },
  21924. "id": {
  21925. "type": "string",
  21926. "pattern": "^evt_"
  21927. },
  21928. "seq": {
  21929. "type": "number"
  21930. },
  21931. "aggregateID": {
  21932. "type": "string"
  21933. },
  21934. "data": {
  21935. "type": "object",
  21936. "properties": {
  21937. "sessionID": {
  21938. "type": "string",
  21939. "pattern": "^ses"
  21940. },
  21941. "info": {
  21942. "$ref": "#/components/schemas/Session"
  21943. }
  21944. },
  21945. "required": ["sessionID", "info"],
  21946. "additionalProperties": false
  21947. }
  21948. },
  21949. "required": ["type", "id", "seq", "aggregateID", "data"],
  21950. "additionalProperties": false
  21951. }
  21952. },
  21953. "required": ["type", "id", "syncEvent"],
  21954. "additionalProperties": false
  21955. },
  21956. "SyncEventMessageUpdated": {
  21957. "type": "object",
  21958. "properties": {
  21959. "type": {
  21960. "type": "string",
  21961. "enum": ["sync"]
  21962. },
  21963. "id": {
  21964. "type": "string",
  21965. "pattern": "^evt_"
  21966. },
  21967. "syncEvent": {
  21968. "type": "object",
  21969. "properties": {
  21970. "type": {
  21971. "type": "string",
  21972. "enum": ["message.updated.1"]
  21973. },
  21974. "id": {
  21975. "type": "string",
  21976. "pattern": "^evt_"
  21977. },
  21978. "seq": {
  21979. "type": "number"
  21980. },
  21981. "aggregateID": {
  21982. "type": "string"
  21983. },
  21984. "data": {
  21985. "type": "object",
  21986. "properties": {
  21987. "sessionID": {
  21988. "type": "string",
  21989. "pattern": "^ses"
  21990. },
  21991. "info": {
  21992. "$ref": "#/components/schemas/Message"
  21993. }
  21994. },
  21995. "required": ["sessionID", "info"],
  21996. "additionalProperties": false
  21997. }
  21998. },
  21999. "required": ["type", "id", "seq", "aggregateID", "data"],
  22000. "additionalProperties": false
  22001. }
  22002. },
  22003. "required": ["type", "id", "syncEvent"],
  22004. "additionalProperties": false
  22005. },
  22006. "SyncEventMessageRemoved": {
  22007. "type": "object",
  22008. "properties": {
  22009. "type": {
  22010. "type": "string",
  22011. "enum": ["sync"]
  22012. },
  22013. "id": {
  22014. "type": "string",
  22015. "pattern": "^evt_"
  22016. },
  22017. "syncEvent": {
  22018. "type": "object",
  22019. "properties": {
  22020. "type": {
  22021. "type": "string",
  22022. "enum": ["message.removed.1"]
  22023. },
  22024. "id": {
  22025. "type": "string",
  22026. "pattern": "^evt_"
  22027. },
  22028. "seq": {
  22029. "type": "number"
  22030. },
  22031. "aggregateID": {
  22032. "type": "string"
  22033. },
  22034. "data": {
  22035. "type": "object",
  22036. "properties": {
  22037. "sessionID": {
  22038. "type": "string",
  22039. "pattern": "^ses"
  22040. },
  22041. "messageID": {
  22042. "type": "string",
  22043. "pattern": "^msg"
  22044. }
  22045. },
  22046. "required": ["sessionID", "messageID"],
  22047. "additionalProperties": false
  22048. }
  22049. },
  22050. "required": ["type", "id", "seq", "aggregateID", "data"],
  22051. "additionalProperties": false
  22052. }
  22053. },
  22054. "required": ["type", "id", "syncEvent"],
  22055. "additionalProperties": false
  22056. },
  22057. "SyncEventMessagePartUpdated": {
  22058. "type": "object",
  22059. "properties": {
  22060. "type": {
  22061. "type": "string",
  22062. "enum": ["sync"]
  22063. },
  22064. "id": {
  22065. "type": "string",
  22066. "pattern": "^evt_"
  22067. },
  22068. "syncEvent": {
  22069. "type": "object",
  22070. "properties": {
  22071. "type": {
  22072. "type": "string",
  22073. "enum": ["message.part.updated.1"]
  22074. },
  22075. "id": {
  22076. "type": "string",
  22077. "pattern": "^evt_"
  22078. },
  22079. "seq": {
  22080. "type": "number"
  22081. },
  22082. "aggregateID": {
  22083. "type": "string"
  22084. },
  22085. "data": {
  22086. "type": "object",
  22087. "properties": {
  22088. "sessionID": {
  22089. "type": "string",
  22090. "pattern": "^ses"
  22091. },
  22092. "part": {
  22093. "$ref": "#/components/schemas/Part"
  22094. },
  22095. "time": {
  22096. "type": "number"
  22097. }
  22098. },
  22099. "required": ["sessionID", "part", "time"],
  22100. "additionalProperties": false
  22101. }
  22102. },
  22103. "required": ["type", "id", "seq", "aggregateID", "data"],
  22104. "additionalProperties": false
  22105. }
  22106. },
  22107. "required": ["type", "id", "syncEvent"],
  22108. "additionalProperties": false
  22109. },
  22110. "SyncEventMessagePartRemoved": {
  22111. "type": "object",
  22112. "properties": {
  22113. "type": {
  22114. "type": "string",
  22115. "enum": ["sync"]
  22116. },
  22117. "id": {
  22118. "type": "string",
  22119. "pattern": "^evt_"
  22120. },
  22121. "syncEvent": {
  22122. "type": "object",
  22123. "properties": {
  22124. "type": {
  22125. "type": "string",
  22126. "enum": ["message.part.removed.1"]
  22127. },
  22128. "id": {
  22129. "type": "string",
  22130. "pattern": "^evt_"
  22131. },
  22132. "seq": {
  22133. "type": "number"
  22134. },
  22135. "aggregateID": {
  22136. "type": "string"
  22137. },
  22138. "data": {
  22139. "type": "object",
  22140. "properties": {
  22141. "sessionID": {
  22142. "type": "string",
  22143. "pattern": "^ses"
  22144. },
  22145. "messageID": {
  22146. "type": "string",
  22147. "pattern": "^msg"
  22148. },
  22149. "partID": {
  22150. "type": "string",
  22151. "pattern": "^prt"
  22152. }
  22153. },
  22154. "required": ["sessionID", "messageID", "partID"],
  22155. "additionalProperties": false
  22156. }
  22157. },
  22158. "required": ["type", "id", "seq", "aggregateID", "data"],
  22159. "additionalProperties": false
  22160. }
  22161. },
  22162. "required": ["type", "id", "syncEvent"],
  22163. "additionalProperties": false
  22164. },
  22165. "SyncEventSessionNextAgentSwitched": {
  22166. "type": "object",
  22167. "properties": {
  22168. "type": {
  22169. "type": "string",
  22170. "enum": ["sync"]
  22171. },
  22172. "id": {
  22173. "type": "string",
  22174. "pattern": "^evt_"
  22175. },
  22176. "syncEvent": {
  22177. "type": "object",
  22178. "properties": {
  22179. "type": {
  22180. "type": "string",
  22181. "enum": ["session.next.agent.switched.1"]
  22182. },
  22183. "id": {
  22184. "type": "string",
  22185. "pattern": "^evt_"
  22186. },
  22187. "seq": {
  22188. "type": "number"
  22189. },
  22190. "aggregateID": {
  22191. "type": "string"
  22192. },
  22193. "data": {
  22194. "type": "object",
  22195. "properties": {
  22196. "timestamp": {
  22197. "type": "number"
  22198. },
  22199. "sessionID": {
  22200. "type": "string",
  22201. "pattern": "^ses"
  22202. },
  22203. "messageID": {
  22204. "type": "string",
  22205. "pattern": "^msg_"
  22206. },
  22207. "agent": {
  22208. "type": "string"
  22209. }
  22210. },
  22211. "required": ["timestamp", "sessionID", "messageID", "agent"],
  22212. "additionalProperties": false
  22213. }
  22214. },
  22215. "required": ["type", "id", "seq", "aggregateID", "data"],
  22216. "additionalProperties": false
  22217. }
  22218. },
  22219. "required": ["type", "id", "syncEvent"],
  22220. "additionalProperties": false
  22221. },
  22222. "SyncEventSessionNextModelSwitched": {
  22223. "type": "object",
  22224. "properties": {
  22225. "type": {
  22226. "type": "string",
  22227. "enum": ["sync"]
  22228. },
  22229. "id": {
  22230. "type": "string",
  22231. "pattern": "^evt_"
  22232. },
  22233. "syncEvent": {
  22234. "type": "object",
  22235. "properties": {
  22236. "type": {
  22237. "type": "string",
  22238. "enum": ["session.next.model.switched.1"]
  22239. },
  22240. "id": {
  22241. "type": "string",
  22242. "pattern": "^evt_"
  22243. },
  22244. "seq": {
  22245. "type": "number"
  22246. },
  22247. "aggregateID": {
  22248. "type": "string"
  22249. },
  22250. "data": {
  22251. "type": "object",
  22252. "properties": {
  22253. "timestamp": {
  22254. "type": "number"
  22255. },
  22256. "sessionID": {
  22257. "type": "string",
  22258. "pattern": "^ses"
  22259. },
  22260. "messageID": {
  22261. "type": "string",
  22262. "pattern": "^msg_"
  22263. },
  22264. "model": {
  22265. "type": "object",
  22266. "properties": {
  22267. "id": {
  22268. "type": "string"
  22269. },
  22270. "providerID": {
  22271. "type": "string"
  22272. },
  22273. "variant": {
  22274. "type": "string"
  22275. }
  22276. },
  22277. "required": ["id", "providerID"],
  22278. "additionalProperties": false
  22279. }
  22280. },
  22281. "required": ["timestamp", "sessionID", "messageID", "model"],
  22282. "additionalProperties": false
  22283. }
  22284. },
  22285. "required": ["type", "id", "seq", "aggregateID", "data"],
  22286. "additionalProperties": false
  22287. }
  22288. },
  22289. "required": ["type", "id", "syncEvent"],
  22290. "additionalProperties": false
  22291. },
  22292. "SyncEventSessionNextMoved": {
  22293. "type": "object",
  22294. "properties": {
  22295. "type": {
  22296. "type": "string",
  22297. "enum": ["sync"]
  22298. },
  22299. "id": {
  22300. "type": "string",
  22301. "pattern": "^evt_"
  22302. },
  22303. "syncEvent": {
  22304. "type": "object",
  22305. "properties": {
  22306. "type": {
  22307. "type": "string",
  22308. "enum": ["session.next.moved.1"]
  22309. },
  22310. "id": {
  22311. "type": "string",
  22312. "pattern": "^evt_"
  22313. },
  22314. "seq": {
  22315. "type": "number"
  22316. },
  22317. "aggregateID": {
  22318. "type": "string"
  22319. },
  22320. "data": {
  22321. "type": "object",
  22322. "properties": {
  22323. "timestamp": {
  22324. "type": "number"
  22325. },
  22326. "sessionID": {
  22327. "type": "string",
  22328. "pattern": "^ses"
  22329. },
  22330. "location": {
  22331. "$ref": "#/components/schemas/LocationRef"
  22332. },
  22333. "subdirectory": {
  22334. "type": "string"
  22335. }
  22336. },
  22337. "required": ["timestamp", "sessionID", "location"],
  22338. "additionalProperties": false
  22339. }
  22340. },
  22341. "required": ["type", "id", "seq", "aggregateID", "data"],
  22342. "additionalProperties": false
  22343. }
  22344. },
  22345. "required": ["type", "id", "syncEvent"],
  22346. "additionalProperties": false
  22347. },
  22348. "SyncEventSessionNextPrompted": {
  22349. "type": "object",
  22350. "properties": {
  22351. "type": {
  22352. "type": "string",
  22353. "enum": ["sync"]
  22354. },
  22355. "id": {
  22356. "type": "string",
  22357. "pattern": "^evt_"
  22358. },
  22359. "syncEvent": {
  22360. "type": "object",
  22361. "properties": {
  22362. "type": {
  22363. "type": "string",
  22364. "enum": ["session.next.prompted.1"]
  22365. },
  22366. "id": {
  22367. "type": "string",
  22368. "pattern": "^evt_"
  22369. },
  22370. "seq": {
  22371. "type": "number"
  22372. },
  22373. "aggregateID": {
  22374. "type": "string"
  22375. },
  22376. "data": {
  22377. "type": "object",
  22378. "properties": {
  22379. "timestamp": {
  22380. "type": "number"
  22381. },
  22382. "sessionID": {
  22383. "type": "string",
  22384. "pattern": "^ses"
  22385. },
  22386. "messageID": {
  22387. "type": "string",
  22388. "pattern": "^msg_"
  22389. },
  22390. "prompt": {
  22391. "$ref": "#/components/schemas/Prompt"
  22392. },
  22393. "delivery": {
  22394. "type": "string",
  22395. "enum": ["steer", "queue"]
  22396. }
  22397. },
  22398. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22399. "additionalProperties": false
  22400. }
  22401. },
  22402. "required": ["type", "id", "seq", "aggregateID", "data"],
  22403. "additionalProperties": false
  22404. }
  22405. },
  22406. "required": ["type", "id", "syncEvent"],
  22407. "additionalProperties": false
  22408. },
  22409. "SyncEventSessionNextPromptAdmitted": {
  22410. "type": "object",
  22411. "properties": {
  22412. "type": {
  22413. "type": "string",
  22414. "enum": ["sync"]
  22415. },
  22416. "id": {
  22417. "type": "string",
  22418. "pattern": "^evt_"
  22419. },
  22420. "syncEvent": {
  22421. "type": "object",
  22422. "properties": {
  22423. "type": {
  22424. "type": "string",
  22425. "enum": ["session.next.prompt.admitted.1"]
  22426. },
  22427. "id": {
  22428. "type": "string",
  22429. "pattern": "^evt_"
  22430. },
  22431. "seq": {
  22432. "type": "number"
  22433. },
  22434. "aggregateID": {
  22435. "type": "string"
  22436. },
  22437. "data": {
  22438. "type": "object",
  22439. "properties": {
  22440. "timestamp": {
  22441. "type": "number"
  22442. },
  22443. "sessionID": {
  22444. "type": "string",
  22445. "pattern": "^ses"
  22446. },
  22447. "messageID": {
  22448. "type": "string",
  22449. "pattern": "^msg_"
  22450. },
  22451. "prompt": {
  22452. "$ref": "#/components/schemas/Prompt"
  22453. },
  22454. "delivery": {
  22455. "type": "string",
  22456. "enum": ["steer", "queue"]
  22457. }
  22458. },
  22459. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22460. "additionalProperties": false
  22461. }
  22462. },
  22463. "required": ["type", "id", "seq", "aggregateID", "data"],
  22464. "additionalProperties": false
  22465. }
  22466. },
  22467. "required": ["type", "id", "syncEvent"],
  22468. "additionalProperties": false
  22469. },
  22470. "SyncEventSessionNextPromptPromoted": {
  22471. "type": "object",
  22472. "properties": {
  22473. "type": {
  22474. "type": "string",
  22475. "enum": ["sync"]
  22476. },
  22477. "id": {
  22478. "type": "string",
  22479. "pattern": "^evt_"
  22480. },
  22481. "syncEvent": {
  22482. "type": "object",
  22483. "properties": {
  22484. "type": {
  22485. "type": "string",
  22486. "enum": ["session.next.prompt.promoted.1"]
  22487. },
  22488. "id": {
  22489. "type": "string",
  22490. "pattern": "^evt_"
  22491. },
  22492. "seq": {
  22493. "type": "number"
  22494. },
  22495. "aggregateID": {
  22496. "type": "string"
  22497. },
  22498. "data": {
  22499. "type": "object",
  22500. "properties": {
  22501. "timestamp": {
  22502. "type": "number"
  22503. },
  22504. "sessionID": {
  22505. "type": "string",
  22506. "pattern": "^ses"
  22507. },
  22508. "messageID": {
  22509. "type": "string",
  22510. "pattern": "^msg_"
  22511. },
  22512. "prompt": {
  22513. "$ref": "#/components/schemas/Prompt"
  22514. },
  22515. "timeCreated": {
  22516. "type": "number"
  22517. }
  22518. },
  22519. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  22520. "additionalProperties": false
  22521. }
  22522. },
  22523. "required": ["type", "id", "seq", "aggregateID", "data"],
  22524. "additionalProperties": false
  22525. }
  22526. },
  22527. "required": ["type", "id", "syncEvent"],
  22528. "additionalProperties": false
  22529. },
  22530. "SyncEventSessionNextInterruptRequested": {
  22531. "type": "object",
  22532. "properties": {
  22533. "type": {
  22534. "type": "string",
  22535. "enum": ["sync"]
  22536. },
  22537. "id": {
  22538. "type": "string",
  22539. "pattern": "^evt_"
  22540. },
  22541. "syncEvent": {
  22542. "type": "object",
  22543. "properties": {
  22544. "type": {
  22545. "type": "string",
  22546. "enum": ["session.next.interrupt.requested.1"]
  22547. },
  22548. "id": {
  22549. "type": "string",
  22550. "pattern": "^evt_"
  22551. },
  22552. "seq": {
  22553. "type": "number"
  22554. },
  22555. "aggregateID": {
  22556. "type": "string"
  22557. },
  22558. "data": {
  22559. "type": "object",
  22560. "properties": {
  22561. "timestamp": {
  22562. "type": "number"
  22563. },
  22564. "sessionID": {
  22565. "type": "string",
  22566. "pattern": "^ses"
  22567. }
  22568. },
  22569. "required": ["timestamp", "sessionID"],
  22570. "additionalProperties": false
  22571. }
  22572. },
  22573. "required": ["type", "id", "seq", "aggregateID", "data"],
  22574. "additionalProperties": false
  22575. }
  22576. },
  22577. "required": ["type", "id", "syncEvent"],
  22578. "additionalProperties": false
  22579. },
  22580. "SyncEventSessionNextContextUpdated": {
  22581. "type": "object",
  22582. "properties": {
  22583. "type": {
  22584. "type": "string",
  22585. "enum": ["sync"]
  22586. },
  22587. "id": {
  22588. "type": "string",
  22589. "pattern": "^evt_"
  22590. },
  22591. "syncEvent": {
  22592. "type": "object",
  22593. "properties": {
  22594. "type": {
  22595. "type": "string",
  22596. "enum": ["session.next.context.updated.1"]
  22597. },
  22598. "id": {
  22599. "type": "string",
  22600. "pattern": "^evt_"
  22601. },
  22602. "seq": {
  22603. "type": "number"
  22604. },
  22605. "aggregateID": {
  22606. "type": "string"
  22607. },
  22608. "data": {
  22609. "type": "object",
  22610. "properties": {
  22611. "timestamp": {
  22612. "type": "number"
  22613. },
  22614. "sessionID": {
  22615. "type": "string",
  22616. "pattern": "^ses"
  22617. },
  22618. "messageID": {
  22619. "type": "string",
  22620. "pattern": "^msg_"
  22621. },
  22622. "text": {
  22623. "type": "string"
  22624. }
  22625. },
  22626. "required": ["timestamp", "sessionID", "messageID", "text"],
  22627. "additionalProperties": false
  22628. }
  22629. },
  22630. "required": ["type", "id", "seq", "aggregateID", "data"],
  22631. "additionalProperties": false
  22632. }
  22633. },
  22634. "required": ["type", "id", "syncEvent"],
  22635. "additionalProperties": false
  22636. },
  22637. "SyncEventSessionNextSynthetic": {
  22638. "type": "object",
  22639. "properties": {
  22640. "type": {
  22641. "type": "string",
  22642. "enum": ["sync"]
  22643. },
  22644. "id": {
  22645. "type": "string",
  22646. "pattern": "^evt_"
  22647. },
  22648. "syncEvent": {
  22649. "type": "object",
  22650. "properties": {
  22651. "type": {
  22652. "type": "string",
  22653. "enum": ["session.next.synthetic.1"]
  22654. },
  22655. "id": {
  22656. "type": "string",
  22657. "pattern": "^evt_"
  22658. },
  22659. "seq": {
  22660. "type": "number"
  22661. },
  22662. "aggregateID": {
  22663. "type": "string"
  22664. },
  22665. "data": {
  22666. "type": "object",
  22667. "properties": {
  22668. "timestamp": {
  22669. "type": "number"
  22670. },
  22671. "sessionID": {
  22672. "type": "string",
  22673. "pattern": "^ses"
  22674. },
  22675. "messageID": {
  22676. "type": "string",
  22677. "pattern": "^msg_"
  22678. },
  22679. "text": {
  22680. "type": "string"
  22681. }
  22682. },
  22683. "required": ["timestamp", "sessionID", "messageID", "text"],
  22684. "additionalProperties": false
  22685. }
  22686. },
  22687. "required": ["type", "id", "seq", "aggregateID", "data"],
  22688. "additionalProperties": false
  22689. }
  22690. },
  22691. "required": ["type", "id", "syncEvent"],
  22692. "additionalProperties": false
  22693. },
  22694. "SyncEventSessionNextShellStarted": {
  22695. "type": "object",
  22696. "properties": {
  22697. "type": {
  22698. "type": "string",
  22699. "enum": ["sync"]
  22700. },
  22701. "id": {
  22702. "type": "string",
  22703. "pattern": "^evt_"
  22704. },
  22705. "syncEvent": {
  22706. "type": "object",
  22707. "properties": {
  22708. "type": {
  22709. "type": "string",
  22710. "enum": ["session.next.shell.started.1"]
  22711. },
  22712. "id": {
  22713. "type": "string",
  22714. "pattern": "^evt_"
  22715. },
  22716. "seq": {
  22717. "type": "number"
  22718. },
  22719. "aggregateID": {
  22720. "type": "string"
  22721. },
  22722. "data": {
  22723. "type": "object",
  22724. "properties": {
  22725. "timestamp": {
  22726. "type": "number"
  22727. },
  22728. "sessionID": {
  22729. "type": "string",
  22730. "pattern": "^ses"
  22731. },
  22732. "messageID": {
  22733. "type": "string",
  22734. "pattern": "^msg_"
  22735. },
  22736. "callID": {
  22737. "type": "string"
  22738. },
  22739. "command": {
  22740. "type": "string"
  22741. }
  22742. },
  22743. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  22744. "additionalProperties": false
  22745. }
  22746. },
  22747. "required": ["type", "id", "seq", "aggregateID", "data"],
  22748. "additionalProperties": false
  22749. }
  22750. },
  22751. "required": ["type", "id", "syncEvent"],
  22752. "additionalProperties": false
  22753. },
  22754. "SyncEventSessionNextShellEnded": {
  22755. "type": "object",
  22756. "properties": {
  22757. "type": {
  22758. "type": "string",
  22759. "enum": ["sync"]
  22760. },
  22761. "id": {
  22762. "type": "string",
  22763. "pattern": "^evt_"
  22764. },
  22765. "syncEvent": {
  22766. "type": "object",
  22767. "properties": {
  22768. "type": {
  22769. "type": "string",
  22770. "enum": ["session.next.shell.ended.1"]
  22771. },
  22772. "id": {
  22773. "type": "string",
  22774. "pattern": "^evt_"
  22775. },
  22776. "seq": {
  22777. "type": "number"
  22778. },
  22779. "aggregateID": {
  22780. "type": "string"
  22781. },
  22782. "data": {
  22783. "type": "object",
  22784. "properties": {
  22785. "timestamp": {
  22786. "type": "number"
  22787. },
  22788. "sessionID": {
  22789. "type": "string",
  22790. "pattern": "^ses"
  22791. },
  22792. "callID": {
  22793. "type": "string"
  22794. },
  22795. "output": {
  22796. "type": "string"
  22797. }
  22798. },
  22799. "required": ["timestamp", "sessionID", "callID", "output"],
  22800. "additionalProperties": false
  22801. }
  22802. },
  22803. "required": ["type", "id", "seq", "aggregateID", "data"],
  22804. "additionalProperties": false
  22805. }
  22806. },
  22807. "required": ["type", "id", "syncEvent"],
  22808. "additionalProperties": false
  22809. },
  22810. "SyncEventSessionNextStepStarted": {
  22811. "type": "object",
  22812. "properties": {
  22813. "type": {
  22814. "type": "string",
  22815. "enum": ["sync"]
  22816. },
  22817. "id": {
  22818. "type": "string",
  22819. "pattern": "^evt_"
  22820. },
  22821. "syncEvent": {
  22822. "type": "object",
  22823. "properties": {
  22824. "type": {
  22825. "type": "string",
  22826. "enum": ["session.next.step.started.1"]
  22827. },
  22828. "id": {
  22829. "type": "string",
  22830. "pattern": "^evt_"
  22831. },
  22832. "seq": {
  22833. "type": "number"
  22834. },
  22835. "aggregateID": {
  22836. "type": "string"
  22837. },
  22838. "data": {
  22839. "type": "object",
  22840. "properties": {
  22841. "timestamp": {
  22842. "type": "number"
  22843. },
  22844. "sessionID": {
  22845. "type": "string",
  22846. "pattern": "^ses"
  22847. },
  22848. "assistantMessageID": {
  22849. "type": "string",
  22850. "pattern": "^msg_"
  22851. },
  22852. "agent": {
  22853. "type": "string"
  22854. },
  22855. "model": {
  22856. "type": "object",
  22857. "properties": {
  22858. "id": {
  22859. "type": "string"
  22860. },
  22861. "providerID": {
  22862. "type": "string"
  22863. },
  22864. "variant": {
  22865. "type": "string"
  22866. }
  22867. },
  22868. "required": ["id", "providerID"],
  22869. "additionalProperties": false
  22870. },
  22871. "snapshot": {
  22872. "type": "string"
  22873. }
  22874. },
  22875. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  22876. "additionalProperties": false
  22877. }
  22878. },
  22879. "required": ["type", "id", "seq", "aggregateID", "data"],
  22880. "additionalProperties": false
  22881. }
  22882. },
  22883. "required": ["type", "id", "syncEvent"],
  22884. "additionalProperties": false
  22885. },
  22886. "SyncEventSessionNextStepEnded": {
  22887. "type": "object",
  22888. "properties": {
  22889. "type": {
  22890. "type": "string",
  22891. "enum": ["sync"]
  22892. },
  22893. "id": {
  22894. "type": "string",
  22895. "pattern": "^evt_"
  22896. },
  22897. "syncEvent": {
  22898. "type": "object",
  22899. "properties": {
  22900. "type": {
  22901. "type": "string",
  22902. "enum": ["session.next.step.ended.2"]
  22903. },
  22904. "id": {
  22905. "type": "string",
  22906. "pattern": "^evt_"
  22907. },
  22908. "seq": {
  22909. "type": "number"
  22910. },
  22911. "aggregateID": {
  22912. "type": "string"
  22913. },
  22914. "data": {
  22915. "type": "object",
  22916. "properties": {
  22917. "timestamp": {
  22918. "type": "number"
  22919. },
  22920. "sessionID": {
  22921. "type": "string",
  22922. "pattern": "^ses"
  22923. },
  22924. "assistantMessageID": {
  22925. "type": "string",
  22926. "pattern": "^msg_"
  22927. },
  22928. "finish": {
  22929. "type": "string"
  22930. },
  22931. "cost": {
  22932. "type": "number"
  22933. },
  22934. "tokens": {
  22935. "type": "object",
  22936. "properties": {
  22937. "input": {
  22938. "type": "number"
  22939. },
  22940. "output": {
  22941. "type": "number"
  22942. },
  22943. "reasoning": {
  22944. "type": "number"
  22945. },
  22946. "cache": {
  22947. "type": "object",
  22948. "properties": {
  22949. "read": {
  22950. "type": "number"
  22951. },
  22952. "write": {
  22953. "type": "number"
  22954. }
  22955. },
  22956. "required": ["read", "write"],
  22957. "additionalProperties": false
  22958. }
  22959. },
  22960. "required": ["input", "output", "reasoning", "cache"],
  22961. "additionalProperties": false
  22962. },
  22963. "snapshot": {
  22964. "type": "string"
  22965. }
  22966. },
  22967. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  22968. "additionalProperties": false
  22969. }
  22970. },
  22971. "required": ["type", "id", "seq", "aggregateID", "data"],
  22972. "additionalProperties": false
  22973. }
  22974. },
  22975. "required": ["type", "id", "syncEvent"],
  22976. "additionalProperties": false
  22977. },
  22978. "SyncEventSessionNextStepFailed": {
  22979. "type": "object",
  22980. "properties": {
  22981. "type": {
  22982. "type": "string",
  22983. "enum": ["sync"]
  22984. },
  22985. "id": {
  22986. "type": "string",
  22987. "pattern": "^evt_"
  22988. },
  22989. "syncEvent": {
  22990. "type": "object",
  22991. "properties": {
  22992. "type": {
  22993. "type": "string",
  22994. "enum": ["session.next.step.failed.2"]
  22995. },
  22996. "id": {
  22997. "type": "string",
  22998. "pattern": "^evt_"
  22999. },
  23000. "seq": {
  23001. "type": "number"
  23002. },
  23003. "aggregateID": {
  23004. "type": "string"
  23005. },
  23006. "data": {
  23007. "type": "object",
  23008. "properties": {
  23009. "timestamp": {
  23010. "type": "number"
  23011. },
  23012. "sessionID": {
  23013. "type": "string",
  23014. "pattern": "^ses"
  23015. },
  23016. "assistantMessageID": {
  23017. "type": "string",
  23018. "pattern": "^msg_"
  23019. },
  23020. "error": {
  23021. "$ref": "#/components/schemas/SessionErrorUnknown"
  23022. }
  23023. },
  23024. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  23025. "additionalProperties": false
  23026. }
  23027. },
  23028. "required": ["type", "id", "seq", "aggregateID", "data"],
  23029. "additionalProperties": false
  23030. }
  23031. },
  23032. "required": ["type", "id", "syncEvent"],
  23033. "additionalProperties": false
  23034. },
  23035. "SyncEventSessionNextTextStarted": {
  23036. "type": "object",
  23037. "properties": {
  23038. "type": {
  23039. "type": "string",
  23040. "enum": ["sync"]
  23041. },
  23042. "id": {
  23043. "type": "string",
  23044. "pattern": "^evt_"
  23045. },
  23046. "syncEvent": {
  23047. "type": "object",
  23048. "properties": {
  23049. "type": {
  23050. "type": "string",
  23051. "enum": ["session.next.text.started.1"]
  23052. },
  23053. "id": {
  23054. "type": "string",
  23055. "pattern": "^evt_"
  23056. },
  23057. "seq": {
  23058. "type": "number"
  23059. },
  23060. "aggregateID": {
  23061. "type": "string"
  23062. },
  23063. "data": {
  23064. "type": "object",
  23065. "properties": {
  23066. "timestamp": {
  23067. "type": "number"
  23068. },
  23069. "sessionID": {
  23070. "type": "string",
  23071. "pattern": "^ses"
  23072. },
  23073. "assistantMessageID": {
  23074. "type": "string",
  23075. "pattern": "^msg_"
  23076. },
  23077. "textID": {
  23078. "type": "string"
  23079. }
  23080. },
  23081. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  23082. "additionalProperties": false
  23083. }
  23084. },
  23085. "required": ["type", "id", "seq", "aggregateID", "data"],
  23086. "additionalProperties": false
  23087. }
  23088. },
  23089. "required": ["type", "id", "syncEvent"],
  23090. "additionalProperties": false
  23091. },
  23092. "SyncEventSessionNextTextEnded": {
  23093. "type": "object",
  23094. "properties": {
  23095. "type": {
  23096. "type": "string",
  23097. "enum": ["sync"]
  23098. },
  23099. "id": {
  23100. "type": "string",
  23101. "pattern": "^evt_"
  23102. },
  23103. "syncEvent": {
  23104. "type": "object",
  23105. "properties": {
  23106. "type": {
  23107. "type": "string",
  23108. "enum": ["session.next.text.ended.1"]
  23109. },
  23110. "id": {
  23111. "type": "string",
  23112. "pattern": "^evt_"
  23113. },
  23114. "seq": {
  23115. "type": "number"
  23116. },
  23117. "aggregateID": {
  23118. "type": "string"
  23119. },
  23120. "data": {
  23121. "type": "object",
  23122. "properties": {
  23123. "timestamp": {
  23124. "type": "number"
  23125. },
  23126. "sessionID": {
  23127. "type": "string",
  23128. "pattern": "^ses"
  23129. },
  23130. "assistantMessageID": {
  23131. "type": "string",
  23132. "pattern": "^msg_"
  23133. },
  23134. "textID": {
  23135. "type": "string"
  23136. },
  23137. "text": {
  23138. "type": "string"
  23139. }
  23140. },
  23141. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  23142. "additionalProperties": false
  23143. }
  23144. },
  23145. "required": ["type", "id", "seq", "aggregateID", "data"],
  23146. "additionalProperties": false
  23147. }
  23148. },
  23149. "required": ["type", "id", "syncEvent"],
  23150. "additionalProperties": false
  23151. },
  23152. "SyncEventSessionNextReasoningStarted": {
  23153. "type": "object",
  23154. "properties": {
  23155. "type": {
  23156. "type": "string",
  23157. "enum": ["sync"]
  23158. },
  23159. "id": {
  23160. "type": "string",
  23161. "pattern": "^evt_"
  23162. },
  23163. "syncEvent": {
  23164. "type": "object",
  23165. "properties": {
  23166. "type": {
  23167. "type": "string",
  23168. "enum": ["session.next.reasoning.started.1"]
  23169. },
  23170. "id": {
  23171. "type": "string",
  23172. "pattern": "^evt_"
  23173. },
  23174. "seq": {
  23175. "type": "number"
  23176. },
  23177. "aggregateID": {
  23178. "type": "string"
  23179. },
  23180. "data": {
  23181. "type": "object",
  23182. "properties": {
  23183. "timestamp": {
  23184. "type": "number"
  23185. },
  23186. "sessionID": {
  23187. "type": "string",
  23188. "pattern": "^ses"
  23189. },
  23190. "assistantMessageID": {
  23191. "type": "string",
  23192. "pattern": "^msg_"
  23193. },
  23194. "reasoningID": {
  23195. "type": "string"
  23196. },
  23197. "providerMetadata": {
  23198. "type": "object",
  23199. "additionalProperties": {
  23200. "type": "object"
  23201. }
  23202. }
  23203. },
  23204. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  23205. "additionalProperties": false
  23206. }
  23207. },
  23208. "required": ["type", "id", "seq", "aggregateID", "data"],
  23209. "additionalProperties": false
  23210. }
  23211. },
  23212. "required": ["type", "id", "syncEvent"],
  23213. "additionalProperties": false
  23214. },
  23215. "SyncEventSessionNextReasoningEnded": {
  23216. "type": "object",
  23217. "properties": {
  23218. "type": {
  23219. "type": "string",
  23220. "enum": ["sync"]
  23221. },
  23222. "id": {
  23223. "type": "string",
  23224. "pattern": "^evt_"
  23225. },
  23226. "syncEvent": {
  23227. "type": "object",
  23228. "properties": {
  23229. "type": {
  23230. "type": "string",
  23231. "enum": ["session.next.reasoning.ended.1"]
  23232. },
  23233. "id": {
  23234. "type": "string",
  23235. "pattern": "^evt_"
  23236. },
  23237. "seq": {
  23238. "type": "number"
  23239. },
  23240. "aggregateID": {
  23241. "type": "string"
  23242. },
  23243. "data": {
  23244. "type": "object",
  23245. "properties": {
  23246. "timestamp": {
  23247. "type": "number"
  23248. },
  23249. "sessionID": {
  23250. "type": "string",
  23251. "pattern": "^ses"
  23252. },
  23253. "assistantMessageID": {
  23254. "type": "string",
  23255. "pattern": "^msg_"
  23256. },
  23257. "reasoningID": {
  23258. "type": "string"
  23259. },
  23260. "text": {
  23261. "type": "string"
  23262. },
  23263. "providerMetadata": {
  23264. "type": "object",
  23265. "additionalProperties": {
  23266. "type": "object"
  23267. }
  23268. }
  23269. },
  23270. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  23271. "additionalProperties": false
  23272. }
  23273. },
  23274. "required": ["type", "id", "seq", "aggregateID", "data"],
  23275. "additionalProperties": false
  23276. }
  23277. },
  23278. "required": ["type", "id", "syncEvent"],
  23279. "additionalProperties": false
  23280. },
  23281. "SyncEventSessionNextToolInputStarted": {
  23282. "type": "object",
  23283. "properties": {
  23284. "type": {
  23285. "type": "string",
  23286. "enum": ["sync"]
  23287. },
  23288. "id": {
  23289. "type": "string",
  23290. "pattern": "^evt_"
  23291. },
  23292. "syncEvent": {
  23293. "type": "object",
  23294. "properties": {
  23295. "type": {
  23296. "type": "string",
  23297. "enum": ["session.next.tool.input.started.1"]
  23298. },
  23299. "id": {
  23300. "type": "string",
  23301. "pattern": "^evt_"
  23302. },
  23303. "seq": {
  23304. "type": "number"
  23305. },
  23306. "aggregateID": {
  23307. "type": "string"
  23308. },
  23309. "data": {
  23310. "type": "object",
  23311. "properties": {
  23312. "timestamp": {
  23313. "type": "number"
  23314. },
  23315. "sessionID": {
  23316. "type": "string",
  23317. "pattern": "^ses"
  23318. },
  23319. "assistantMessageID": {
  23320. "type": "string",
  23321. "pattern": "^msg_"
  23322. },
  23323. "callID": {
  23324. "type": "string"
  23325. },
  23326. "name": {
  23327. "type": "string"
  23328. }
  23329. },
  23330. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  23331. "additionalProperties": false
  23332. }
  23333. },
  23334. "required": ["type", "id", "seq", "aggregateID", "data"],
  23335. "additionalProperties": false
  23336. }
  23337. },
  23338. "required": ["type", "id", "syncEvent"],
  23339. "additionalProperties": false
  23340. },
  23341. "SyncEventSessionNextToolInputEnded": {
  23342. "type": "object",
  23343. "properties": {
  23344. "type": {
  23345. "type": "string",
  23346. "enum": ["sync"]
  23347. },
  23348. "id": {
  23349. "type": "string",
  23350. "pattern": "^evt_"
  23351. },
  23352. "syncEvent": {
  23353. "type": "object",
  23354. "properties": {
  23355. "type": {
  23356. "type": "string",
  23357. "enum": ["session.next.tool.input.ended.1"]
  23358. },
  23359. "id": {
  23360. "type": "string",
  23361. "pattern": "^evt_"
  23362. },
  23363. "seq": {
  23364. "type": "number"
  23365. },
  23366. "aggregateID": {
  23367. "type": "string"
  23368. },
  23369. "data": {
  23370. "type": "object",
  23371. "properties": {
  23372. "timestamp": {
  23373. "type": "number"
  23374. },
  23375. "sessionID": {
  23376. "type": "string",
  23377. "pattern": "^ses"
  23378. },
  23379. "assistantMessageID": {
  23380. "type": "string",
  23381. "pattern": "^msg_"
  23382. },
  23383. "callID": {
  23384. "type": "string"
  23385. },
  23386. "text": {
  23387. "type": "string"
  23388. }
  23389. },
  23390. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  23391. "additionalProperties": false
  23392. }
  23393. },
  23394. "required": ["type", "id", "seq", "aggregateID", "data"],
  23395. "additionalProperties": false
  23396. }
  23397. },
  23398. "required": ["type", "id", "syncEvent"],
  23399. "additionalProperties": false
  23400. },
  23401. "SyncEventSessionNextToolCalled": {
  23402. "type": "object",
  23403. "properties": {
  23404. "type": {
  23405. "type": "string",
  23406. "enum": ["sync"]
  23407. },
  23408. "id": {
  23409. "type": "string",
  23410. "pattern": "^evt_"
  23411. },
  23412. "syncEvent": {
  23413. "type": "object",
  23414. "properties": {
  23415. "type": {
  23416. "type": "string",
  23417. "enum": ["session.next.tool.called.1"]
  23418. },
  23419. "id": {
  23420. "type": "string",
  23421. "pattern": "^evt_"
  23422. },
  23423. "seq": {
  23424. "type": "number"
  23425. },
  23426. "aggregateID": {
  23427. "type": "string"
  23428. },
  23429. "data": {
  23430. "type": "object",
  23431. "properties": {
  23432. "timestamp": {
  23433. "type": "number"
  23434. },
  23435. "sessionID": {
  23436. "type": "string",
  23437. "pattern": "^ses"
  23438. },
  23439. "assistantMessageID": {
  23440. "type": "string",
  23441. "pattern": "^msg_"
  23442. },
  23443. "callID": {
  23444. "type": "string"
  23445. },
  23446. "tool": {
  23447. "type": "string"
  23448. },
  23449. "input": {
  23450. "type": "object"
  23451. },
  23452. "provider": {
  23453. "type": "object",
  23454. "properties": {
  23455. "executed": {
  23456. "type": "boolean"
  23457. },
  23458. "metadata": {
  23459. "type": "object",
  23460. "additionalProperties": {
  23461. "type": "object"
  23462. }
  23463. }
  23464. },
  23465. "required": ["executed"],
  23466. "additionalProperties": false
  23467. }
  23468. },
  23469. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  23470. "additionalProperties": false
  23471. }
  23472. },
  23473. "required": ["type", "id", "seq", "aggregateID", "data"],
  23474. "additionalProperties": false
  23475. }
  23476. },
  23477. "required": ["type", "id", "syncEvent"],
  23478. "additionalProperties": false
  23479. },
  23480. "SyncEventSessionNextToolProgress": {
  23481. "type": "object",
  23482. "properties": {
  23483. "type": {
  23484. "type": "string",
  23485. "enum": ["sync"]
  23486. },
  23487. "id": {
  23488. "type": "string",
  23489. "pattern": "^evt_"
  23490. },
  23491. "syncEvent": {
  23492. "type": "object",
  23493. "properties": {
  23494. "type": {
  23495. "type": "string",
  23496. "enum": ["session.next.tool.progress.1"]
  23497. },
  23498. "id": {
  23499. "type": "string",
  23500. "pattern": "^evt_"
  23501. },
  23502. "seq": {
  23503. "type": "number"
  23504. },
  23505. "aggregateID": {
  23506. "type": "string"
  23507. },
  23508. "data": {
  23509. "type": "object",
  23510. "properties": {
  23511. "timestamp": {
  23512. "type": "number"
  23513. },
  23514. "sessionID": {
  23515. "type": "string",
  23516. "pattern": "^ses"
  23517. },
  23518. "assistantMessageID": {
  23519. "type": "string",
  23520. "pattern": "^msg_"
  23521. },
  23522. "callID": {
  23523. "type": "string"
  23524. },
  23525. "structured": {
  23526. "type": "object"
  23527. },
  23528. "content": {
  23529. "type": "array",
  23530. "items": {
  23531. "anyOf": [
  23532. {
  23533. "$ref": "#/components/schemas/ToolTextContent"
  23534. },
  23535. {
  23536. "$ref": "#/components/schemas/ToolFileContent"
  23537. }
  23538. ]
  23539. }
  23540. }
  23541. },
  23542. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  23543. "additionalProperties": false
  23544. }
  23545. },
  23546. "required": ["type", "id", "seq", "aggregateID", "data"],
  23547. "additionalProperties": false
  23548. }
  23549. },
  23550. "required": ["type", "id", "syncEvent"],
  23551. "additionalProperties": false
  23552. },
  23553. "SyncEventSessionNextToolSuccess": {
  23554. "type": "object",
  23555. "properties": {
  23556. "type": {
  23557. "type": "string",
  23558. "enum": ["sync"]
  23559. },
  23560. "id": {
  23561. "type": "string",
  23562. "pattern": "^evt_"
  23563. },
  23564. "syncEvent": {
  23565. "type": "object",
  23566. "properties": {
  23567. "type": {
  23568. "type": "string",
  23569. "enum": ["session.next.tool.success.1"]
  23570. },
  23571. "id": {
  23572. "type": "string",
  23573. "pattern": "^evt_"
  23574. },
  23575. "seq": {
  23576. "type": "number"
  23577. },
  23578. "aggregateID": {
  23579. "type": "string"
  23580. },
  23581. "data": {
  23582. "type": "object",
  23583. "properties": {
  23584. "timestamp": {
  23585. "type": "number"
  23586. },
  23587. "sessionID": {
  23588. "type": "string",
  23589. "pattern": "^ses"
  23590. },
  23591. "assistantMessageID": {
  23592. "type": "string",
  23593. "pattern": "^msg_"
  23594. },
  23595. "callID": {
  23596. "type": "string"
  23597. },
  23598. "structured": {
  23599. "type": "object"
  23600. },
  23601. "content": {
  23602. "type": "array",
  23603. "items": {
  23604. "anyOf": [
  23605. {
  23606. "$ref": "#/components/schemas/ToolTextContent"
  23607. },
  23608. {
  23609. "$ref": "#/components/schemas/ToolFileContent"
  23610. }
  23611. ]
  23612. }
  23613. },
  23614. "outputPaths": {
  23615. "type": "array",
  23616. "items": {
  23617. "type": "string"
  23618. }
  23619. },
  23620. "result": {},
  23621. "provider": {
  23622. "type": "object",
  23623. "properties": {
  23624. "executed": {
  23625. "type": "boolean"
  23626. },
  23627. "metadata": {
  23628. "type": "object",
  23629. "additionalProperties": {
  23630. "type": "object"
  23631. }
  23632. }
  23633. },
  23634. "required": ["executed"],
  23635. "additionalProperties": false
  23636. }
  23637. },
  23638. "required": [
  23639. "timestamp",
  23640. "sessionID",
  23641. "assistantMessageID",
  23642. "callID",
  23643. "structured",
  23644. "content",
  23645. "provider"
  23646. ],
  23647. "additionalProperties": false
  23648. }
  23649. },
  23650. "required": ["type", "id", "seq", "aggregateID", "data"],
  23651. "additionalProperties": false
  23652. }
  23653. },
  23654. "required": ["type", "id", "syncEvent"],
  23655. "additionalProperties": false
  23656. },
  23657. "SyncEventSessionNextToolFailed": {
  23658. "type": "object",
  23659. "properties": {
  23660. "type": {
  23661. "type": "string",
  23662. "enum": ["sync"]
  23663. },
  23664. "id": {
  23665. "type": "string",
  23666. "pattern": "^evt_"
  23667. },
  23668. "syncEvent": {
  23669. "type": "object",
  23670. "properties": {
  23671. "type": {
  23672. "type": "string",
  23673. "enum": ["session.next.tool.failed.1"]
  23674. },
  23675. "id": {
  23676. "type": "string",
  23677. "pattern": "^evt_"
  23678. },
  23679. "seq": {
  23680. "type": "number"
  23681. },
  23682. "aggregateID": {
  23683. "type": "string"
  23684. },
  23685. "data": {
  23686. "type": "object",
  23687. "properties": {
  23688. "timestamp": {
  23689. "type": "number"
  23690. },
  23691. "sessionID": {
  23692. "type": "string",
  23693. "pattern": "^ses"
  23694. },
  23695. "assistantMessageID": {
  23696. "type": "string",
  23697. "pattern": "^msg_"
  23698. },
  23699. "callID": {
  23700. "type": "string"
  23701. },
  23702. "error": {
  23703. "$ref": "#/components/schemas/SessionErrorUnknown"
  23704. },
  23705. "result": {},
  23706. "provider": {
  23707. "type": "object",
  23708. "properties": {
  23709. "executed": {
  23710. "type": "boolean"
  23711. },
  23712. "metadata": {
  23713. "type": "object",
  23714. "additionalProperties": {
  23715. "type": "object"
  23716. }
  23717. }
  23718. },
  23719. "required": ["executed"],
  23720. "additionalProperties": false
  23721. }
  23722. },
  23723. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  23724. "additionalProperties": false
  23725. }
  23726. },
  23727. "required": ["type", "id", "seq", "aggregateID", "data"],
  23728. "additionalProperties": false
  23729. }
  23730. },
  23731. "required": ["type", "id", "syncEvent"],
  23732. "additionalProperties": false
  23733. },
  23734. "SyncEventSessionNextRetried": {
  23735. "type": "object",
  23736. "properties": {
  23737. "type": {
  23738. "type": "string",
  23739. "enum": ["sync"]
  23740. },
  23741. "id": {
  23742. "type": "string",
  23743. "pattern": "^evt_"
  23744. },
  23745. "syncEvent": {
  23746. "type": "object",
  23747. "properties": {
  23748. "type": {
  23749. "type": "string",
  23750. "enum": ["session.next.retried.1"]
  23751. },
  23752. "id": {
  23753. "type": "string",
  23754. "pattern": "^evt_"
  23755. },
  23756. "seq": {
  23757. "type": "number"
  23758. },
  23759. "aggregateID": {
  23760. "type": "string"
  23761. },
  23762. "data": {
  23763. "type": "object",
  23764. "properties": {
  23765. "timestamp": {
  23766. "type": "number"
  23767. },
  23768. "sessionID": {
  23769. "type": "string",
  23770. "pattern": "^ses"
  23771. },
  23772. "attempt": {
  23773. "type": "number"
  23774. },
  23775. "error": {
  23776. "$ref": "#/components/schemas/SessionNextRetry_error"
  23777. }
  23778. },
  23779. "required": ["timestamp", "sessionID", "attempt", "error"],
  23780. "additionalProperties": false
  23781. }
  23782. },
  23783. "required": ["type", "id", "seq", "aggregateID", "data"],
  23784. "additionalProperties": false
  23785. }
  23786. },
  23787. "required": ["type", "id", "syncEvent"],
  23788. "additionalProperties": false
  23789. },
  23790. "SyncEventSessionNextCompactionStarted": {
  23791. "type": "object",
  23792. "properties": {
  23793. "type": {
  23794. "type": "string",
  23795. "enum": ["sync"]
  23796. },
  23797. "id": {
  23798. "type": "string",
  23799. "pattern": "^evt_"
  23800. },
  23801. "syncEvent": {
  23802. "type": "object",
  23803. "properties": {
  23804. "type": {
  23805. "type": "string",
  23806. "enum": ["session.next.compaction.started.1"]
  23807. },
  23808. "id": {
  23809. "type": "string",
  23810. "pattern": "^evt_"
  23811. },
  23812. "seq": {
  23813. "type": "number"
  23814. },
  23815. "aggregateID": {
  23816. "type": "string"
  23817. },
  23818. "data": {
  23819. "type": "object",
  23820. "properties": {
  23821. "timestamp": {
  23822. "type": "number"
  23823. },
  23824. "sessionID": {
  23825. "type": "string",
  23826. "pattern": "^ses"
  23827. },
  23828. "messageID": {
  23829. "type": "string",
  23830. "pattern": "^msg_"
  23831. },
  23832. "reason": {
  23833. "type": "string",
  23834. "enum": ["auto", "manual"]
  23835. }
  23836. },
  23837. "required": ["timestamp", "sessionID", "messageID", "reason"],
  23838. "additionalProperties": false
  23839. }
  23840. },
  23841. "required": ["type", "id", "seq", "aggregateID", "data"],
  23842. "additionalProperties": false
  23843. }
  23844. },
  23845. "required": ["type", "id", "syncEvent"],
  23846. "additionalProperties": false
  23847. },
  23848. "SyncEventSessionNextCompactionEnded": {
  23849. "type": "object",
  23850. "properties": {
  23851. "type": {
  23852. "type": "string",
  23853. "enum": ["sync"]
  23854. },
  23855. "id": {
  23856. "type": "string",
  23857. "pattern": "^evt_"
  23858. },
  23859. "syncEvent": {
  23860. "type": "object",
  23861. "properties": {
  23862. "type": {
  23863. "type": "string",
  23864. "enum": ["session.next.compaction.ended.2"]
  23865. },
  23866. "id": {
  23867. "type": "string",
  23868. "pattern": "^evt_"
  23869. },
  23870. "seq": {
  23871. "type": "number"
  23872. },
  23873. "aggregateID": {
  23874. "type": "string"
  23875. },
  23876. "data": {
  23877. "type": "object",
  23878. "properties": {
  23879. "timestamp": {
  23880. "type": "number"
  23881. },
  23882. "sessionID": {
  23883. "type": "string",
  23884. "pattern": "^ses"
  23885. },
  23886. "messageID": {
  23887. "type": "string",
  23888. "pattern": "^msg_"
  23889. },
  23890. "reason": {
  23891. "type": "string",
  23892. "enum": ["auto", "manual"]
  23893. },
  23894. "text": {
  23895. "type": "string"
  23896. },
  23897. "recent": {
  23898. "type": "string"
  23899. }
  23900. },
  23901. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  23902. "additionalProperties": false
  23903. }
  23904. },
  23905. "required": ["type", "id", "seq", "aggregateID", "data"],
  23906. "additionalProperties": false
  23907. }
  23908. },
  23909. "required": ["type", "id", "syncEvent"],
  23910. "additionalProperties": false
  23911. },
  23912. "ConfigV2ReferenceGit": {
  23913. "type": "object",
  23914. "properties": {
  23915. "repository": {
  23916. "type": "string"
  23917. },
  23918. "branch": {
  23919. "type": "string"
  23920. },
  23921. "description": {
  23922. "type": "string"
  23923. },
  23924. "hidden": {
  23925. "type": "boolean"
  23926. }
  23927. },
  23928. "required": ["repository"],
  23929. "additionalProperties": false
  23930. },
  23931. "ConfigV2ReferenceLocal": {
  23932. "type": "object",
  23933. "properties": {
  23934. "path": {
  23935. "type": "string"
  23936. },
  23937. "description": {
  23938. "type": "string"
  23939. },
  23940. "hidden": {
  23941. "type": "boolean"
  23942. }
  23943. },
  23944. "required": ["path"],
  23945. "additionalProperties": false
  23946. },
  23947. "PolicyEffect": {
  23948. "type": "string",
  23949. "enum": ["allow", "deny"]
  23950. },
  23951. "ConfigV2ExperimentalPolicy": {
  23952. "type": "object",
  23953. "properties": {
  23954. "action": {
  23955. "type": "string",
  23956. "enum": ["provider.use"]
  23957. },
  23958. "effect": {
  23959. "$ref": "#/components/schemas/PolicyEffect"
  23960. },
  23961. "resource": {
  23962. "type": "string"
  23963. }
  23964. },
  23965. "required": ["action", "effect", "resource"],
  23966. "additionalProperties": false
  23967. },
  23968. "ProjectDirectories": {
  23969. "type": "array",
  23970. "items": {
  23971. "type": "object",
  23972. "properties": {
  23973. "directory": {
  23974. "type": "string"
  23975. },
  23976. "type": {
  23977. "type": "string",
  23978. "enum": ["main", "root", "git_worktree"]
  23979. }
  23980. },
  23981. "required": ["directory", "type"],
  23982. "additionalProperties": false
  23983. }
  23984. },
  23985. "ProjectCopyCopy": {
  23986. "type": "object",
  23987. "properties": {
  23988. "directory": {
  23989. "type": "string"
  23990. }
  23991. },
  23992. "required": ["directory"],
  23993. "additionalProperties": false
  23994. },
  23995. "LocationInfo": {
  23996. "type": "object",
  23997. "properties": {
  23998. "directory": {
  23999. "type": "string"
  24000. },
  24001. "workspaceID": {
  24002. "type": "string",
  24003. "pattern": "^wrk"
  24004. },
  24005. "project": {
  24006. "type": "object",
  24007. "properties": {
  24008. "id": {
  24009. "type": "string"
  24010. },
  24011. "directory": {
  24012. "type": "string"
  24013. }
  24014. },
  24015. "required": ["id", "directory"],
  24016. "additionalProperties": false
  24017. }
  24018. },
  24019. "required": ["directory", "project"],
  24020. "additionalProperties": false
  24021. },
  24022. "PermissionV2Effect": {
  24023. "type": "string",
  24024. "enum": ["allow", "deny", "ask"]
  24025. },
  24026. "PermissionV2Rule": {
  24027. "type": "object",
  24028. "properties": {
  24029. "action": {
  24030. "type": "string"
  24031. },
  24032. "resource": {
  24033. "type": "string"
  24034. },
  24035. "effect": {
  24036. "$ref": "#/components/schemas/PermissionV2Effect"
  24037. }
  24038. },
  24039. "required": ["action", "resource", "effect"],
  24040. "additionalProperties": false
  24041. },
  24042. "PermissionV2Ruleset": {
  24043. "type": "array",
  24044. "items": {
  24045. "$ref": "#/components/schemas/PermissionV2Rule"
  24046. }
  24047. },
  24048. "AgentV2Info": {
  24049. "type": "object",
  24050. "properties": {
  24051. "id": {
  24052. "type": "string"
  24053. },
  24054. "model": {
  24055. "type": "object",
  24056. "properties": {
  24057. "id": {
  24058. "type": "string"
  24059. },
  24060. "providerID": {
  24061. "type": "string"
  24062. },
  24063. "variant": {
  24064. "type": "string"
  24065. }
  24066. },
  24067. "required": ["id", "providerID"],
  24068. "additionalProperties": false
  24069. },
  24070. "request": {
  24071. "type": "object",
  24072. "properties": {
  24073. "headers": {
  24074. "type": "object",
  24075. "additionalProperties": {
  24076. "type": "string"
  24077. }
  24078. },
  24079. "body": {
  24080. "type": "object"
  24081. }
  24082. },
  24083. "required": ["headers", "body"],
  24084. "additionalProperties": false
  24085. },
  24086. "system": {
  24087. "type": "string"
  24088. },
  24089. "description": {
  24090. "type": "string"
  24091. },
  24092. "mode": {
  24093. "type": "string",
  24094. "enum": ["subagent", "primary", "all"]
  24095. },
  24096. "hidden": {
  24097. "type": "boolean"
  24098. },
  24099. "color": {
  24100. "anyOf": [
  24101. {
  24102. "type": "string",
  24103. "pattern": "^#[0-9a-fA-F]{6}$"
  24104. },
  24105. {
  24106. "type": "string",
  24107. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  24108. }
  24109. ]
  24110. },
  24111. "steps": {
  24112. "type": "integer",
  24113. "exclusiveMinimum": 0
  24114. },
  24115. "permissions": {
  24116. "$ref": "#/components/schemas/PermissionV2Ruleset"
  24117. }
  24118. },
  24119. "required": ["id", "request", "mode", "hidden", "permissions"],
  24120. "additionalProperties": false
  24121. },
  24122. "SessionV2Info": {
  24123. "type": "object",
  24124. "properties": {
  24125. "id": {
  24126. "type": "string",
  24127. "pattern": "^ses"
  24128. },
  24129. "parentID": {
  24130. "type": "string",
  24131. "pattern": "^ses"
  24132. },
  24133. "projectID": {
  24134. "type": "string"
  24135. },
  24136. "agent": {
  24137. "type": "string"
  24138. },
  24139. "model": {
  24140. "type": "object",
  24141. "properties": {
  24142. "id": {
  24143. "type": "string"
  24144. },
  24145. "providerID": {
  24146. "type": "string"
  24147. },
  24148. "variant": {
  24149. "type": "string"
  24150. }
  24151. },
  24152. "required": ["id", "providerID"],
  24153. "additionalProperties": false
  24154. },
  24155. "cost": {
  24156. "type": "number"
  24157. },
  24158. "tokens": {
  24159. "type": "object",
  24160. "properties": {
  24161. "input": {
  24162. "type": "number"
  24163. },
  24164. "output": {
  24165. "type": "number"
  24166. },
  24167. "reasoning": {
  24168. "type": "number"
  24169. },
  24170. "cache": {
  24171. "type": "object",
  24172. "properties": {
  24173. "read": {
  24174. "type": "number"
  24175. },
  24176. "write": {
  24177. "type": "number"
  24178. }
  24179. },
  24180. "required": ["read", "write"],
  24181. "additionalProperties": false
  24182. }
  24183. },
  24184. "required": ["input", "output", "reasoning", "cache"],
  24185. "additionalProperties": false
  24186. },
  24187. "time": {
  24188. "type": "object",
  24189. "properties": {
  24190. "created": {
  24191. "type": "number"
  24192. },
  24193. "updated": {
  24194. "type": "number"
  24195. },
  24196. "archived": {
  24197. "type": "number"
  24198. }
  24199. },
  24200. "required": ["created", "updated"],
  24201. "additionalProperties": false
  24202. },
  24203. "title": {
  24204. "type": "string"
  24205. },
  24206. "location": {
  24207. "$ref": "#/components/schemas/LocationRef"
  24208. },
  24209. "subpath": {
  24210. "type": "string"
  24211. }
  24212. },
  24213. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  24214. "additionalProperties": false
  24215. },
  24216. "SessionInputAdmitted": {
  24217. "type": "object",
  24218. "properties": {
  24219. "admittedSeq": {
  24220. "type": "integer",
  24221. "minimum": 0
  24222. },
  24223. "id": {
  24224. "type": "string",
  24225. "pattern": "^msg_"
  24226. },
  24227. "sessionID": {
  24228. "type": "string",
  24229. "pattern": "^ses"
  24230. },
  24231. "prompt": {
  24232. "$ref": "#/components/schemas/Prompt"
  24233. },
  24234. "delivery": {
  24235. "type": "string",
  24236. "enum": ["steer", "queue"]
  24237. },
  24238. "timeCreated": {
  24239. "type": "number"
  24240. },
  24241. "promotedSeq": {
  24242. "type": "integer",
  24243. "minimum": 0
  24244. }
  24245. },
  24246. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  24247. "additionalProperties": false
  24248. },
  24249. "SessionMessageAgentSwitched": {
  24250. "type": "object",
  24251. "properties": {
  24252. "id": {
  24253. "type": "string",
  24254. "pattern": "^msg_"
  24255. },
  24256. "metadata": {
  24257. "type": "object"
  24258. },
  24259. "time": {
  24260. "type": "object",
  24261. "properties": {
  24262. "created": {
  24263. "type": "number"
  24264. }
  24265. },
  24266. "required": ["created"],
  24267. "additionalProperties": false
  24268. },
  24269. "type": {
  24270. "type": "string",
  24271. "enum": ["agent-switched"]
  24272. },
  24273. "agent": {
  24274. "type": "string"
  24275. }
  24276. },
  24277. "required": ["id", "time", "type", "agent"],
  24278. "additionalProperties": false
  24279. },
  24280. "SessionMessageModelSwitched": {
  24281. "type": "object",
  24282. "properties": {
  24283. "id": {
  24284. "type": "string",
  24285. "pattern": "^msg_"
  24286. },
  24287. "metadata": {
  24288. "type": "object"
  24289. },
  24290. "time": {
  24291. "type": "object",
  24292. "properties": {
  24293. "created": {
  24294. "type": "number"
  24295. }
  24296. },
  24297. "required": ["created"],
  24298. "additionalProperties": false
  24299. },
  24300. "type": {
  24301. "type": "string",
  24302. "enum": ["model-switched"]
  24303. },
  24304. "model": {
  24305. "type": "object",
  24306. "properties": {
  24307. "id": {
  24308. "type": "string"
  24309. },
  24310. "providerID": {
  24311. "type": "string"
  24312. },
  24313. "variant": {
  24314. "type": "string"
  24315. }
  24316. },
  24317. "required": ["id", "providerID"],
  24318. "additionalProperties": false
  24319. }
  24320. },
  24321. "required": ["id", "time", "type", "model"],
  24322. "additionalProperties": false
  24323. },
  24324. "SessionMessageUser": {
  24325. "type": "object",
  24326. "properties": {
  24327. "id": {
  24328. "type": "string",
  24329. "pattern": "^msg_"
  24330. },
  24331. "metadata": {
  24332. "type": "object"
  24333. },
  24334. "time": {
  24335. "type": "object",
  24336. "properties": {
  24337. "created": {
  24338. "type": "number"
  24339. }
  24340. },
  24341. "required": ["created"],
  24342. "additionalProperties": false
  24343. },
  24344. "text": {
  24345. "type": "string"
  24346. },
  24347. "files": {
  24348. "type": "array",
  24349. "items": {
  24350. "$ref": "#/components/schemas/PromptFileAttachment"
  24351. }
  24352. },
  24353. "agents": {
  24354. "type": "array",
  24355. "items": {
  24356. "$ref": "#/components/schemas/PromptAgentAttachment"
  24357. }
  24358. },
  24359. "type": {
  24360. "type": "string",
  24361. "enum": ["user"]
  24362. }
  24363. },
  24364. "required": ["id", "time", "text", "type"],
  24365. "additionalProperties": false
  24366. },
  24367. "SessionMessageSynthetic": {
  24368. "type": "object",
  24369. "properties": {
  24370. "id": {
  24371. "type": "string",
  24372. "pattern": "^msg_"
  24373. },
  24374. "metadata": {
  24375. "type": "object"
  24376. },
  24377. "time": {
  24378. "type": "object",
  24379. "properties": {
  24380. "created": {
  24381. "type": "number"
  24382. }
  24383. },
  24384. "required": ["created"],
  24385. "additionalProperties": false
  24386. },
  24387. "sessionID": {
  24388. "type": "string",
  24389. "pattern": "^ses"
  24390. },
  24391. "text": {
  24392. "type": "string"
  24393. },
  24394. "type": {
  24395. "type": "string",
  24396. "enum": ["synthetic"]
  24397. }
  24398. },
  24399. "required": ["id", "time", "sessionID", "text", "type"],
  24400. "additionalProperties": false
  24401. },
  24402. "SessionMessageSystem": {
  24403. "type": "object",
  24404. "properties": {
  24405. "id": {
  24406. "type": "string",
  24407. "pattern": "^msg_"
  24408. },
  24409. "metadata": {
  24410. "type": "object"
  24411. },
  24412. "time": {
  24413. "type": "object",
  24414. "properties": {
  24415. "created": {
  24416. "type": "number"
  24417. }
  24418. },
  24419. "required": ["created"],
  24420. "additionalProperties": false
  24421. },
  24422. "type": {
  24423. "type": "string",
  24424. "enum": ["system"]
  24425. },
  24426. "text": {
  24427. "type": "string"
  24428. }
  24429. },
  24430. "required": ["id", "time", "type", "text"],
  24431. "additionalProperties": false
  24432. },
  24433. "SessionMessageShell": {
  24434. "type": "object",
  24435. "properties": {
  24436. "id": {
  24437. "type": "string",
  24438. "pattern": "^msg_"
  24439. },
  24440. "metadata": {
  24441. "type": "object"
  24442. },
  24443. "time": {
  24444. "type": "object",
  24445. "properties": {
  24446. "created": {
  24447. "type": "number"
  24448. },
  24449. "completed": {
  24450. "type": "number"
  24451. }
  24452. },
  24453. "required": ["created"],
  24454. "additionalProperties": false
  24455. },
  24456. "type": {
  24457. "type": "string",
  24458. "enum": ["shell"]
  24459. },
  24460. "callID": {
  24461. "type": "string"
  24462. },
  24463. "command": {
  24464. "type": "string"
  24465. },
  24466. "output": {
  24467. "type": "string"
  24468. }
  24469. },
  24470. "required": ["id", "time", "type", "callID", "command", "output"],
  24471. "additionalProperties": false
  24472. },
  24473. "SessionMessageAssistantText": {
  24474. "type": "object",
  24475. "properties": {
  24476. "type": {
  24477. "type": "string",
  24478. "enum": ["text"]
  24479. },
  24480. "id": {
  24481. "type": "string"
  24482. },
  24483. "text": {
  24484. "type": "string"
  24485. }
  24486. },
  24487. "required": ["type", "id", "text"],
  24488. "additionalProperties": false
  24489. },
  24490. "SessionMessageAssistantReasoning": {
  24491. "type": "object",
  24492. "properties": {
  24493. "type": {
  24494. "type": "string",
  24495. "enum": ["reasoning"]
  24496. },
  24497. "id": {
  24498. "type": "string"
  24499. },
  24500. "text": {
  24501. "type": "string"
  24502. },
  24503. "providerMetadata": {
  24504. "type": "object",
  24505. "additionalProperties": {
  24506. "type": "object"
  24507. }
  24508. }
  24509. },
  24510. "required": ["type", "id", "text"],
  24511. "additionalProperties": false
  24512. },
  24513. "SessionMessageToolStatePending": {
  24514. "type": "object",
  24515. "properties": {
  24516. "status": {
  24517. "type": "string",
  24518. "enum": ["pending"]
  24519. },
  24520. "input": {
  24521. "type": "string"
  24522. }
  24523. },
  24524. "required": ["status", "input"],
  24525. "additionalProperties": false
  24526. },
  24527. "SessionMessageToolStateRunning": {
  24528. "type": "object",
  24529. "properties": {
  24530. "status": {
  24531. "type": "string",
  24532. "enum": ["running"]
  24533. },
  24534. "input": {
  24535. "type": "object"
  24536. },
  24537. "structured": {
  24538. "type": "object"
  24539. },
  24540. "content": {
  24541. "type": "array",
  24542. "items": {
  24543. "anyOf": [
  24544. {
  24545. "$ref": "#/components/schemas/ToolTextContent"
  24546. },
  24547. {
  24548. "$ref": "#/components/schemas/ToolFileContent"
  24549. }
  24550. ]
  24551. }
  24552. }
  24553. },
  24554. "required": ["status", "input", "structured", "content"],
  24555. "additionalProperties": false
  24556. },
  24557. "SessionMessageToolStateCompleted": {
  24558. "type": "object",
  24559. "properties": {
  24560. "status": {
  24561. "type": "string",
  24562. "enum": ["completed"]
  24563. },
  24564. "input": {
  24565. "type": "object"
  24566. },
  24567. "attachments": {
  24568. "type": "array",
  24569. "items": {
  24570. "$ref": "#/components/schemas/PromptFileAttachment"
  24571. }
  24572. },
  24573. "content": {
  24574. "type": "array",
  24575. "items": {
  24576. "anyOf": [
  24577. {
  24578. "$ref": "#/components/schemas/ToolTextContent"
  24579. },
  24580. {
  24581. "$ref": "#/components/schemas/ToolFileContent"
  24582. }
  24583. ]
  24584. }
  24585. },
  24586. "outputPaths": {
  24587. "type": "array",
  24588. "items": {
  24589. "type": "string"
  24590. }
  24591. },
  24592. "structured": {
  24593. "type": "object"
  24594. },
  24595. "result": {}
  24596. },
  24597. "required": ["status", "input", "content", "structured"],
  24598. "additionalProperties": false
  24599. },
  24600. "SessionMessageToolStateError": {
  24601. "type": "object",
  24602. "properties": {
  24603. "status": {
  24604. "type": "string",
  24605. "enum": ["error"]
  24606. },
  24607. "input": {
  24608. "type": "object"
  24609. },
  24610. "content": {
  24611. "type": "array",
  24612. "items": {
  24613. "anyOf": [
  24614. {
  24615. "$ref": "#/components/schemas/ToolTextContent"
  24616. },
  24617. {
  24618. "$ref": "#/components/schemas/ToolFileContent"
  24619. }
  24620. ]
  24621. }
  24622. },
  24623. "structured": {
  24624. "type": "object"
  24625. },
  24626. "error": {
  24627. "$ref": "#/components/schemas/SessionErrorUnknown"
  24628. },
  24629. "result": {}
  24630. },
  24631. "required": ["status", "input", "content", "structured", "error"],
  24632. "additionalProperties": false
  24633. },
  24634. "SessionMessageAssistantTool": {
  24635. "type": "object",
  24636. "properties": {
  24637. "type": {
  24638. "type": "string",
  24639. "enum": ["tool"]
  24640. },
  24641. "id": {
  24642. "type": "string"
  24643. },
  24644. "name": {
  24645. "type": "string"
  24646. },
  24647. "provider": {
  24648. "type": "object",
  24649. "properties": {
  24650. "executed": {
  24651. "type": "boolean"
  24652. },
  24653. "metadata": {
  24654. "type": "object",
  24655. "additionalProperties": {
  24656. "type": "object"
  24657. }
  24658. },
  24659. "resultMetadata": {
  24660. "type": "object",
  24661. "additionalProperties": {
  24662. "type": "object"
  24663. }
  24664. }
  24665. },
  24666. "required": ["executed"],
  24667. "additionalProperties": false
  24668. },
  24669. "state": {
  24670. "anyOf": [
  24671. {
  24672. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  24673. },
  24674. {
  24675. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  24676. },
  24677. {
  24678. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  24679. },
  24680. {
  24681. "$ref": "#/components/schemas/SessionMessageToolStateError"
  24682. }
  24683. ]
  24684. },
  24685. "time": {
  24686. "type": "object",
  24687. "properties": {
  24688. "created": {
  24689. "type": "number"
  24690. },
  24691. "ran": {
  24692. "type": "number"
  24693. },
  24694. "completed": {
  24695. "type": "number"
  24696. },
  24697. "pruned": {
  24698. "type": "number"
  24699. }
  24700. },
  24701. "required": ["created"],
  24702. "additionalProperties": false
  24703. }
  24704. },
  24705. "required": ["type", "id", "name", "state", "time"],
  24706. "additionalProperties": false
  24707. },
  24708. "SessionMessageAssistant": {
  24709. "type": "object",
  24710. "properties": {
  24711. "id": {
  24712. "type": "string",
  24713. "pattern": "^msg_"
  24714. },
  24715. "metadata": {
  24716. "type": "object"
  24717. },
  24718. "time": {
  24719. "type": "object",
  24720. "properties": {
  24721. "created": {
  24722. "type": "number"
  24723. },
  24724. "completed": {
  24725. "type": "number"
  24726. }
  24727. },
  24728. "required": ["created"],
  24729. "additionalProperties": false
  24730. },
  24731. "type": {
  24732. "type": "string",
  24733. "enum": ["assistant"]
  24734. },
  24735. "agent": {
  24736. "type": "string"
  24737. },
  24738. "model": {
  24739. "type": "object",
  24740. "properties": {
  24741. "id": {
  24742. "type": "string"
  24743. },
  24744. "providerID": {
  24745. "type": "string"
  24746. },
  24747. "variant": {
  24748. "type": "string"
  24749. }
  24750. },
  24751. "required": ["id", "providerID"],
  24752. "additionalProperties": false
  24753. },
  24754. "content": {
  24755. "type": "array",
  24756. "items": {
  24757. "anyOf": [
  24758. {
  24759. "$ref": "#/components/schemas/SessionMessageAssistantText"
  24760. },
  24761. {
  24762. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  24763. },
  24764. {
  24765. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  24766. }
  24767. ]
  24768. }
  24769. },
  24770. "snapshot": {
  24771. "type": "object",
  24772. "properties": {
  24773. "start": {
  24774. "type": "string"
  24775. },
  24776. "end": {
  24777. "type": "string"
  24778. }
  24779. },
  24780. "additionalProperties": false
  24781. },
  24782. "finish": {
  24783. "type": "string"
  24784. },
  24785. "cost": {
  24786. "type": "number"
  24787. },
  24788. "tokens": {
  24789. "type": "object",
  24790. "properties": {
  24791. "input": {
  24792. "type": "number"
  24793. },
  24794. "output": {
  24795. "type": "number"
  24796. },
  24797. "reasoning": {
  24798. "type": "number"
  24799. },
  24800. "cache": {
  24801. "type": "object",
  24802. "properties": {
  24803. "read": {
  24804. "type": "number"
  24805. },
  24806. "write": {
  24807. "type": "number"
  24808. }
  24809. },
  24810. "required": ["read", "write"],
  24811. "additionalProperties": false
  24812. }
  24813. },
  24814. "required": ["input", "output", "reasoning", "cache"],
  24815. "additionalProperties": false
  24816. },
  24817. "error": {
  24818. "$ref": "#/components/schemas/SessionErrorUnknown"
  24819. }
  24820. },
  24821. "required": ["id", "time", "type", "agent", "model", "content"],
  24822. "additionalProperties": false
  24823. },
  24824. "SessionMessageCompaction": {
  24825. "type": "object",
  24826. "properties": {
  24827. "type": {
  24828. "type": "string",
  24829. "enum": ["compaction"]
  24830. },
  24831. "reason": {
  24832. "type": "string",
  24833. "enum": ["auto", "manual"]
  24834. },
  24835. "summary": {
  24836. "type": "string"
  24837. },
  24838. "recent": {
  24839. "type": "string"
  24840. },
  24841. "id": {
  24842. "type": "string",
  24843. "pattern": "^msg_"
  24844. },
  24845. "metadata": {
  24846. "type": "object"
  24847. },
  24848. "time": {
  24849. "type": "object",
  24850. "properties": {
  24851. "created": {
  24852. "type": "number"
  24853. }
  24854. },
  24855. "required": ["created"],
  24856. "additionalProperties": false
  24857. }
  24858. },
  24859. "required": ["type", "reason", "summary", "recent", "id", "time"],
  24860. "additionalProperties": false
  24861. },
  24862. "SessionMessage": {
  24863. "anyOf": [
  24864. {
  24865. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  24866. },
  24867. {
  24868. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  24869. },
  24870. {
  24871. "$ref": "#/components/schemas/SessionMessageUser"
  24872. },
  24873. {
  24874. "$ref": "#/components/schemas/SessionMessageSynthetic"
  24875. },
  24876. {
  24877. "$ref": "#/components/schemas/SessionMessageSystem"
  24878. },
  24879. {
  24880. "$ref": "#/components/schemas/SessionMessageShell"
  24881. },
  24882. {
  24883. "$ref": "#/components/schemas/SessionMessageAssistant"
  24884. },
  24885. {
  24886. "$ref": "#/components/schemas/SessionMessageCompaction"
  24887. }
  24888. ]
  24889. },
  24890. "ProviderV2Info": {
  24891. "type": "object",
  24892. "properties": {
  24893. "id": {
  24894. "type": "string"
  24895. },
  24896. "name": {
  24897. "type": "string"
  24898. },
  24899. "enabled": {
  24900. "anyOf": [
  24901. {
  24902. "type": "boolean",
  24903. "enum": [false]
  24904. },
  24905. {
  24906. "type": "object",
  24907. "properties": {
  24908. "via": {
  24909. "type": "string",
  24910. "enum": ["env"]
  24911. },
  24912. "name": {
  24913. "type": "string"
  24914. }
  24915. },
  24916. "required": ["via", "name"],
  24917. "additionalProperties": false
  24918. },
  24919. {
  24920. "type": "object",
  24921. "properties": {
  24922. "via": {
  24923. "type": "string",
  24924. "enum": ["account"]
  24925. },
  24926. "service": {
  24927. "type": "string"
  24928. }
  24929. },
  24930. "required": ["via", "service"],
  24931. "additionalProperties": false
  24932. },
  24933. {
  24934. "type": "object",
  24935. "properties": {
  24936. "via": {
  24937. "type": "string",
  24938. "enum": ["custom"]
  24939. },
  24940. "data": {
  24941. "type": "object"
  24942. }
  24943. },
  24944. "required": ["via", "data"],
  24945. "additionalProperties": false
  24946. }
  24947. ]
  24948. },
  24949. "env": {
  24950. "type": "array",
  24951. "items": {
  24952. "type": "string"
  24953. }
  24954. },
  24955. "api": {
  24956. "anyOf": [
  24957. {
  24958. "type": "object",
  24959. "properties": {
  24960. "type": {
  24961. "type": "string",
  24962. "enum": ["aisdk"]
  24963. },
  24964. "package": {
  24965. "type": "string"
  24966. },
  24967. "url": {
  24968. "type": "string"
  24969. },
  24970. "settings": {
  24971. "type": "object"
  24972. }
  24973. },
  24974. "required": ["type", "package"],
  24975. "additionalProperties": false
  24976. },
  24977. {
  24978. "type": "object",
  24979. "properties": {
  24980. "type": {
  24981. "type": "string",
  24982. "enum": ["native"]
  24983. },
  24984. "url": {
  24985. "type": "string"
  24986. },
  24987. "settings": {
  24988. "type": "object"
  24989. }
  24990. },
  24991. "required": ["type", "settings"],
  24992. "additionalProperties": false
  24993. }
  24994. ]
  24995. },
  24996. "request": {
  24997. "type": "object",
  24998. "properties": {
  24999. "headers": {
  25000. "type": "object",
  25001. "additionalProperties": {
  25002. "type": "string"
  25003. }
  25004. },
  25005. "body": {
  25006. "type": "object"
  25007. }
  25008. },
  25009. "required": ["headers", "body"],
  25010. "additionalProperties": false
  25011. }
  25012. },
  25013. "required": ["id", "name", "enabled", "env", "api", "request"],
  25014. "additionalProperties": false
  25015. },
  25016. "PermissionV2Request": {
  25017. "type": "object",
  25018. "properties": {
  25019. "id": {
  25020. "type": "string",
  25021. "pattern": "^per"
  25022. },
  25023. "sessionID": {
  25024. "type": "string",
  25025. "pattern": "^ses"
  25026. },
  25027. "action": {
  25028. "type": "string"
  25029. },
  25030. "resources": {
  25031. "type": "array",
  25032. "items": {
  25033. "type": "string"
  25034. }
  25035. },
  25036. "save": {
  25037. "type": "array",
  25038. "items": {
  25039. "type": "string"
  25040. }
  25041. },
  25042. "metadata": {
  25043. "type": "object"
  25044. },
  25045. "source": {
  25046. "$ref": "#/components/schemas/PermissionV2Source"
  25047. }
  25048. },
  25049. "required": ["id", "sessionID", "action", "resources"],
  25050. "additionalProperties": false
  25051. },
  25052. "PermissionSavedInfo": {
  25053. "type": "object",
  25054. "properties": {
  25055. "id": {
  25056. "type": "string"
  25057. },
  25058. "projectID": {
  25059. "type": "string"
  25060. },
  25061. "action": {
  25062. "type": "string"
  25063. },
  25064. "resource": {
  25065. "type": "string"
  25066. }
  25067. },
  25068. "required": ["id", "projectID", "action", "resource"],
  25069. "additionalProperties": false
  25070. },
  25071. "FileSystemContent": {
  25072. "type": "object",
  25073. "properties": {
  25074. "uri": {
  25075. "type": "string"
  25076. },
  25077. "name": {
  25078. "type": "string"
  25079. },
  25080. "content": {
  25081. "type": "string"
  25082. },
  25083. "encoding": {
  25084. "type": "string",
  25085. "enum": ["utf8", "base64"]
  25086. },
  25087. "mime": {
  25088. "type": "string"
  25089. }
  25090. },
  25091. "required": ["uri", "content", "encoding", "mime"],
  25092. "additionalProperties": false
  25093. },
  25094. "FileSystemEntry": {
  25095. "type": "object",
  25096. "properties": {
  25097. "path": {
  25098. "type": "string"
  25099. },
  25100. "type": {
  25101. "type": "string",
  25102. "enum": ["file", "directory"]
  25103. },
  25104. "mime": {
  25105. "type": "string"
  25106. }
  25107. },
  25108. "required": ["path", "type", "mime"],
  25109. "additionalProperties": false
  25110. },
  25111. "CommandV2Info": {
  25112. "type": "object",
  25113. "properties": {
  25114. "name": {
  25115. "type": "string"
  25116. },
  25117. "template": {
  25118. "type": "string"
  25119. },
  25120. "description": {
  25121. "type": "string"
  25122. },
  25123. "agent": {
  25124. "type": "string"
  25125. },
  25126. "model": {
  25127. "type": "object",
  25128. "properties": {
  25129. "id": {
  25130. "type": "string"
  25131. },
  25132. "providerID": {
  25133. "type": "string"
  25134. },
  25135. "variant": {
  25136. "type": "string"
  25137. }
  25138. },
  25139. "required": ["id", "providerID"],
  25140. "additionalProperties": false
  25141. },
  25142. "subtask": {
  25143. "type": "boolean"
  25144. }
  25145. },
  25146. "required": ["name", "template"],
  25147. "additionalProperties": false
  25148. },
  25149. "SkillV2Info": {
  25150. "type": "object",
  25151. "properties": {
  25152. "name": {
  25153. "type": "string"
  25154. },
  25155. "description": {
  25156. "type": "string"
  25157. },
  25158. "slash": {
  25159. "type": "boolean"
  25160. },
  25161. "location": {
  25162. "type": "string"
  25163. },
  25164. "content": {
  25165. "type": "string"
  25166. }
  25167. },
  25168. "required": ["name", "location", "content"],
  25169. "additionalProperties": false
  25170. },
  25171. "QuestionV2Request": {
  25172. "type": "object",
  25173. "properties": {
  25174. "id": {
  25175. "type": "string",
  25176. "pattern": "^que"
  25177. },
  25178. "sessionID": {
  25179. "type": "string",
  25180. "pattern": "^ses"
  25181. },
  25182. "questions": {
  25183. "type": "array",
  25184. "items": {
  25185. "$ref": "#/components/schemas/QuestionV2Info"
  25186. },
  25187. "description": "Questions to ask"
  25188. },
  25189. "tool": {
  25190. "$ref": "#/components/schemas/QuestionV2Tool"
  25191. }
  25192. },
  25193. "required": ["id", "sessionID", "questions"],
  25194. "additionalProperties": false
  25195. },
  25196. "QuestionV2Reply": {
  25197. "type": "object",
  25198. "properties": {
  25199. "answers": {
  25200. "type": "array",
  25201. "items": {
  25202. "$ref": "#/components/schemas/QuestionV2Answer"
  25203. },
  25204. "description": "User answers in order of questions (each answer is an array of selected labels)"
  25205. }
  25206. },
  25207. "required": ["answers"],
  25208. "additionalProperties": false
  25209. },
  25210. "ReferenceLocalSource": {
  25211. "type": "object",
  25212. "properties": {
  25213. "type": {
  25214. "type": "string",
  25215. "enum": ["local"]
  25216. },
  25217. "path": {
  25218. "type": "string"
  25219. },
  25220. "description": {
  25221. "type": "string"
  25222. },
  25223. "hidden": {
  25224. "type": "boolean"
  25225. }
  25226. },
  25227. "required": ["type", "path"],
  25228. "additionalProperties": false
  25229. },
  25230. "ReferenceGitSource": {
  25231. "type": "object",
  25232. "properties": {
  25233. "type": {
  25234. "type": "string",
  25235. "enum": ["git"]
  25236. },
  25237. "repository": {
  25238. "type": "string"
  25239. },
  25240. "branch": {
  25241. "type": "string"
  25242. },
  25243. "description": {
  25244. "type": "string"
  25245. },
  25246. "hidden": {
  25247. "type": "boolean"
  25248. }
  25249. },
  25250. "required": ["type", "repository"],
  25251. "additionalProperties": false
  25252. },
  25253. "ReferenceInfo": {
  25254. "type": "object",
  25255. "properties": {
  25256. "name": {
  25257. "type": "string"
  25258. },
  25259. "path": {
  25260. "type": "string"
  25261. },
  25262. "description": {
  25263. "type": "string"
  25264. },
  25265. "hidden": {
  25266. "type": "boolean"
  25267. },
  25268. "source": {
  25269. "anyOf": [
  25270. {
  25271. "$ref": "#/components/schemas/ReferenceLocalSource"
  25272. },
  25273. {
  25274. "$ref": "#/components/schemas/ReferenceGitSource"
  25275. }
  25276. ]
  25277. }
  25278. },
  25279. "required": ["name", "path", "source"],
  25280. "additionalProperties": false
  25281. },
  25282. "EventModels-devRefreshed": {
  25283. "type": "object",
  25284. "properties": {
  25285. "id": {
  25286. "type": "string",
  25287. "pattern": "^evt_"
  25288. },
  25289. "type": {
  25290. "type": "string",
  25291. "enum": ["models-dev.refreshed"]
  25292. },
  25293. "properties": {
  25294. "type": "object",
  25295. "properties": {}
  25296. }
  25297. },
  25298. "required": ["id", "type", "properties"],
  25299. "additionalProperties": false
  25300. },
  25301. "EventPluginAdded": {
  25302. "type": "object",
  25303. "properties": {
  25304. "id": {
  25305. "type": "string",
  25306. "pattern": "^evt_"
  25307. },
  25308. "type": {
  25309. "type": "string",
  25310. "enum": ["plugin.added"]
  25311. },
  25312. "properties": {
  25313. "type": "object",
  25314. "properties": {
  25315. "id": {
  25316. "type": "string"
  25317. }
  25318. },
  25319. "required": ["id"],
  25320. "additionalProperties": false
  25321. }
  25322. },
  25323. "required": ["id", "type", "properties"],
  25324. "additionalProperties": false
  25325. },
  25326. "ModelV2Info1": {
  25327. "type": "object",
  25328. "properties": {
  25329. "id": {
  25330. "type": "string"
  25331. },
  25332. "providerID": {
  25333. "type": "string"
  25334. },
  25335. "family": {
  25336. "type": "string"
  25337. },
  25338. "name": {
  25339. "type": "string"
  25340. },
  25341. "api": {
  25342. "anyOf": [
  25343. {
  25344. "type": "object",
  25345. "properties": {
  25346. "id": {
  25347. "type": "string"
  25348. },
  25349. "type": {
  25350. "type": "string",
  25351. "enum": ["aisdk"]
  25352. },
  25353. "package": {
  25354. "type": "string"
  25355. },
  25356. "url": {
  25357. "type": "string"
  25358. },
  25359. "settings": {
  25360. "type": "object"
  25361. }
  25362. },
  25363. "required": ["id", "type", "package"],
  25364. "additionalProperties": false
  25365. },
  25366. {
  25367. "type": "object",
  25368. "properties": {
  25369. "id": {
  25370. "type": "string"
  25371. },
  25372. "type": {
  25373. "type": "string",
  25374. "enum": ["native"]
  25375. },
  25376. "url": {
  25377. "type": "string"
  25378. },
  25379. "settings": {
  25380. "type": "object"
  25381. }
  25382. },
  25383. "required": ["id", "type", "settings"],
  25384. "additionalProperties": false
  25385. }
  25386. ]
  25387. },
  25388. "capabilities": {
  25389. "type": "object",
  25390. "properties": {
  25391. "tools": {
  25392. "type": "boolean"
  25393. },
  25394. "input": {
  25395. "type": "array",
  25396. "items": {
  25397. "type": "string"
  25398. }
  25399. },
  25400. "output": {
  25401. "type": "array",
  25402. "items": {
  25403. "type": "string"
  25404. }
  25405. }
  25406. },
  25407. "required": ["tools", "input", "output"],
  25408. "additionalProperties": false
  25409. },
  25410. "request": {
  25411. "type": "object",
  25412. "properties": {
  25413. "headers": {
  25414. "type": "object",
  25415. "additionalProperties": {
  25416. "type": "string"
  25417. }
  25418. },
  25419. "body": {
  25420. "type": "object"
  25421. },
  25422. "generation": {
  25423. "type": "object",
  25424. "properties": {
  25425. "maxTokens": {
  25426. "anyOf": [
  25427. {
  25428. "type": "number"
  25429. },
  25430. {
  25431. "type": "string",
  25432. "enum": ["NaN"]
  25433. },
  25434. {
  25435. "type": "string",
  25436. "enum": ["Infinity"]
  25437. },
  25438. {
  25439. "type": "string",
  25440. "enum": ["-Infinity"]
  25441. }
  25442. ]
  25443. },
  25444. "temperature": {
  25445. "anyOf": [
  25446. {
  25447. "type": "number"
  25448. },
  25449. {
  25450. "type": "string",
  25451. "enum": ["NaN"]
  25452. },
  25453. {
  25454. "type": "string",
  25455. "enum": ["Infinity"]
  25456. },
  25457. {
  25458. "type": "string",
  25459. "enum": ["-Infinity"]
  25460. }
  25461. ]
  25462. },
  25463. "topP": {
  25464. "anyOf": [
  25465. {
  25466. "type": "number"
  25467. },
  25468. {
  25469. "type": "string",
  25470. "enum": ["NaN"]
  25471. },
  25472. {
  25473. "type": "string",
  25474. "enum": ["Infinity"]
  25475. },
  25476. {
  25477. "type": "string",
  25478. "enum": ["-Infinity"]
  25479. }
  25480. ]
  25481. },
  25482. "topK": {
  25483. "anyOf": [
  25484. {
  25485. "type": "number"
  25486. },
  25487. {
  25488. "type": "string",
  25489. "enum": ["NaN"]
  25490. },
  25491. {
  25492. "type": "string",
  25493. "enum": ["Infinity"]
  25494. },
  25495. {
  25496. "type": "string",
  25497. "enum": ["-Infinity"]
  25498. }
  25499. ]
  25500. },
  25501. "frequencyPenalty": {
  25502. "anyOf": [
  25503. {
  25504. "type": "number"
  25505. },
  25506. {
  25507. "type": "string",
  25508. "enum": ["NaN"]
  25509. },
  25510. {
  25511. "type": "string",
  25512. "enum": ["Infinity"]
  25513. },
  25514. {
  25515. "type": "string",
  25516. "enum": ["-Infinity"]
  25517. }
  25518. ]
  25519. },
  25520. "presencePenalty": {
  25521. "anyOf": [
  25522. {
  25523. "type": "number"
  25524. },
  25525. {
  25526. "type": "string",
  25527. "enum": ["NaN"]
  25528. },
  25529. {
  25530. "type": "string",
  25531. "enum": ["Infinity"]
  25532. },
  25533. {
  25534. "type": "string",
  25535. "enum": ["-Infinity"]
  25536. }
  25537. ]
  25538. },
  25539. "seed": {
  25540. "anyOf": [
  25541. {
  25542. "type": "number"
  25543. },
  25544. {
  25545. "type": "string",
  25546. "enum": ["NaN"]
  25547. },
  25548. {
  25549. "type": "string",
  25550. "enum": ["Infinity"]
  25551. },
  25552. {
  25553. "type": "string",
  25554. "enum": ["-Infinity"]
  25555. }
  25556. ]
  25557. },
  25558. "stop": {
  25559. "type": "array",
  25560. "items": {
  25561. "type": "string"
  25562. }
  25563. }
  25564. },
  25565. "additionalProperties": false
  25566. },
  25567. "options": {
  25568. "type": "object"
  25569. },
  25570. "variant": {
  25571. "type": "string"
  25572. }
  25573. },
  25574. "required": ["headers", "body"],
  25575. "additionalProperties": false
  25576. },
  25577. "variants": {
  25578. "type": "array",
  25579. "items": {
  25580. "type": "object",
  25581. "properties": {
  25582. "id": {
  25583. "type": "string"
  25584. },
  25585. "headers": {
  25586. "type": "object",
  25587. "additionalProperties": {
  25588. "type": "string"
  25589. }
  25590. },
  25591. "body": {
  25592. "type": "object"
  25593. },
  25594. "generation": {
  25595. "type": "object",
  25596. "properties": {
  25597. "maxTokens": {
  25598. "anyOf": [
  25599. {
  25600. "type": "number"
  25601. },
  25602. {
  25603. "type": "string",
  25604. "enum": ["NaN"]
  25605. },
  25606. {
  25607. "type": "string",
  25608. "enum": ["Infinity"]
  25609. },
  25610. {
  25611. "type": "string",
  25612. "enum": ["-Infinity"]
  25613. }
  25614. ]
  25615. },
  25616. "temperature": {
  25617. "anyOf": [
  25618. {
  25619. "type": "number"
  25620. },
  25621. {
  25622. "type": "string",
  25623. "enum": ["NaN"]
  25624. },
  25625. {
  25626. "type": "string",
  25627. "enum": ["Infinity"]
  25628. },
  25629. {
  25630. "type": "string",
  25631. "enum": ["-Infinity"]
  25632. }
  25633. ]
  25634. },
  25635. "topP": {
  25636. "anyOf": [
  25637. {
  25638. "type": "number"
  25639. },
  25640. {
  25641. "type": "string",
  25642. "enum": ["NaN"]
  25643. },
  25644. {
  25645. "type": "string",
  25646. "enum": ["Infinity"]
  25647. },
  25648. {
  25649. "type": "string",
  25650. "enum": ["-Infinity"]
  25651. }
  25652. ]
  25653. },
  25654. "topK": {
  25655. "anyOf": [
  25656. {
  25657. "type": "number"
  25658. },
  25659. {
  25660. "type": "string",
  25661. "enum": ["NaN"]
  25662. },
  25663. {
  25664. "type": "string",
  25665. "enum": ["Infinity"]
  25666. },
  25667. {
  25668. "type": "string",
  25669. "enum": ["-Infinity"]
  25670. }
  25671. ]
  25672. },
  25673. "frequencyPenalty": {
  25674. "anyOf": [
  25675. {
  25676. "type": "number"
  25677. },
  25678. {
  25679. "type": "string",
  25680. "enum": ["NaN"]
  25681. },
  25682. {
  25683. "type": "string",
  25684. "enum": ["Infinity"]
  25685. },
  25686. {
  25687. "type": "string",
  25688. "enum": ["-Infinity"]
  25689. }
  25690. ]
  25691. },
  25692. "presencePenalty": {
  25693. "anyOf": [
  25694. {
  25695. "type": "number"
  25696. },
  25697. {
  25698. "type": "string",
  25699. "enum": ["NaN"]
  25700. },
  25701. {
  25702. "type": "string",
  25703. "enum": ["Infinity"]
  25704. },
  25705. {
  25706. "type": "string",
  25707. "enum": ["-Infinity"]
  25708. }
  25709. ]
  25710. },
  25711. "seed": {
  25712. "anyOf": [
  25713. {
  25714. "type": "number"
  25715. },
  25716. {
  25717. "type": "string",
  25718. "enum": ["NaN"]
  25719. },
  25720. {
  25721. "type": "string",
  25722. "enum": ["Infinity"]
  25723. },
  25724. {
  25725. "type": "string",
  25726. "enum": ["-Infinity"]
  25727. }
  25728. ]
  25729. },
  25730. "stop": {
  25731. "type": "array",
  25732. "items": {
  25733. "type": "string"
  25734. }
  25735. }
  25736. },
  25737. "additionalProperties": false
  25738. },
  25739. "options": {
  25740. "type": "object"
  25741. }
  25742. },
  25743. "required": ["id", "headers", "body"],
  25744. "additionalProperties": false
  25745. }
  25746. },
  25747. "time": {
  25748. "type": "object",
  25749. "properties": {
  25750. "released": {
  25751. "anyOf": [
  25752. {
  25753. "type": "number"
  25754. },
  25755. {
  25756. "type": "string",
  25757. "enum": ["NaN"]
  25758. },
  25759. {
  25760. "type": "string",
  25761. "enum": ["Infinity"]
  25762. },
  25763. {
  25764. "type": "string",
  25765. "enum": ["-Infinity"]
  25766. }
  25767. ]
  25768. }
  25769. },
  25770. "required": ["released"],
  25771. "additionalProperties": false
  25772. },
  25773. "cost": {
  25774. "type": "array",
  25775. "items": {
  25776. "type": "object",
  25777. "properties": {
  25778. "tier": {
  25779. "type": "object",
  25780. "properties": {
  25781. "type": {
  25782. "type": "string",
  25783. "enum": ["context"]
  25784. },
  25785. "size": {
  25786. "type": "integer"
  25787. }
  25788. },
  25789. "required": ["type", "size"],
  25790. "additionalProperties": false
  25791. },
  25792. "input": {
  25793. "type": "number"
  25794. },
  25795. "output": {
  25796. "type": "number"
  25797. },
  25798. "cache": {
  25799. "type": "object",
  25800. "properties": {
  25801. "read": {
  25802. "type": "number"
  25803. },
  25804. "write": {
  25805. "type": "number"
  25806. }
  25807. },
  25808. "required": ["read", "write"],
  25809. "additionalProperties": false
  25810. }
  25811. },
  25812. "required": ["input", "output", "cache"],
  25813. "additionalProperties": false
  25814. }
  25815. },
  25816. "status": {
  25817. "type": "string",
  25818. "enum": ["alpha", "beta", "deprecated", "active"]
  25819. },
  25820. "enabled": {
  25821. "type": "boolean"
  25822. },
  25823. "limit": {
  25824. "type": "object",
  25825. "properties": {
  25826. "context": {
  25827. "type": "integer"
  25828. },
  25829. "input": {
  25830. "type": "integer"
  25831. },
  25832. "output": {
  25833. "type": "integer"
  25834. }
  25835. },
  25836. "required": ["context", "output"],
  25837. "additionalProperties": false
  25838. }
  25839. },
  25840. "required": [
  25841. "id",
  25842. "providerID",
  25843. "name",
  25844. "api",
  25845. "capabilities",
  25846. "request",
  25847. "variants",
  25848. "time",
  25849. "cost",
  25850. "status",
  25851. "enabled",
  25852. "limit"
  25853. ],
  25854. "additionalProperties": false
  25855. },
  25856. "EventCatalogModelUpdated": {
  25857. "type": "object",
  25858. "properties": {
  25859. "id": {
  25860. "type": "string",
  25861. "pattern": "^evt_"
  25862. },
  25863. "type": {
  25864. "type": "string",
  25865. "enum": ["catalog.model.updated"]
  25866. },
  25867. "properties": {
  25868. "type": "object",
  25869. "properties": {
  25870. "model": {
  25871. "$ref": "#/components/schemas/ModelV2Info1"
  25872. }
  25873. },
  25874. "required": ["model"],
  25875. "additionalProperties": false
  25876. }
  25877. },
  25878. "required": ["id", "type", "properties"],
  25879. "additionalProperties": false
  25880. },
  25881. "EventSessionCreated": {
  25882. "type": "object",
  25883. "properties": {
  25884. "id": {
  25885. "type": "string",
  25886. "pattern": "^evt_"
  25887. },
  25888. "type": {
  25889. "type": "string",
  25890. "enum": ["session.created"]
  25891. },
  25892. "properties": {
  25893. "type": "object",
  25894. "properties": {
  25895. "sessionID": {
  25896. "type": "string",
  25897. "pattern": "^ses"
  25898. },
  25899. "info": {
  25900. "$ref": "#/components/schemas/Session"
  25901. }
  25902. },
  25903. "required": ["sessionID", "info"],
  25904. "additionalProperties": false
  25905. }
  25906. },
  25907. "required": ["id", "type", "properties"],
  25908. "additionalProperties": false
  25909. },
  25910. "EventSessionUpdated": {
  25911. "type": "object",
  25912. "properties": {
  25913. "id": {
  25914. "type": "string",
  25915. "pattern": "^evt_"
  25916. },
  25917. "type": {
  25918. "type": "string",
  25919. "enum": ["session.updated"]
  25920. },
  25921. "properties": {
  25922. "type": "object",
  25923. "properties": {
  25924. "sessionID": {
  25925. "type": "string",
  25926. "pattern": "^ses"
  25927. },
  25928. "info": {
  25929. "$ref": "#/components/schemas/Session"
  25930. }
  25931. },
  25932. "required": ["sessionID", "info"],
  25933. "additionalProperties": false
  25934. }
  25935. },
  25936. "required": ["id", "type", "properties"],
  25937. "additionalProperties": false
  25938. },
  25939. "EventSessionDeleted": {
  25940. "type": "object",
  25941. "properties": {
  25942. "id": {
  25943. "type": "string",
  25944. "pattern": "^evt_"
  25945. },
  25946. "type": {
  25947. "type": "string",
  25948. "enum": ["session.deleted"]
  25949. },
  25950. "properties": {
  25951. "type": "object",
  25952. "properties": {
  25953. "sessionID": {
  25954. "type": "string",
  25955. "pattern": "^ses"
  25956. },
  25957. "info": {
  25958. "$ref": "#/components/schemas/Session"
  25959. }
  25960. },
  25961. "required": ["sessionID", "info"],
  25962. "additionalProperties": false
  25963. }
  25964. },
  25965. "required": ["id", "type", "properties"],
  25966. "additionalProperties": false
  25967. },
  25968. "EventMessageUpdated": {
  25969. "type": "object",
  25970. "properties": {
  25971. "id": {
  25972. "type": "string",
  25973. "pattern": "^evt_"
  25974. },
  25975. "type": {
  25976. "type": "string",
  25977. "enum": ["message.updated"]
  25978. },
  25979. "properties": {
  25980. "type": "object",
  25981. "properties": {
  25982. "sessionID": {
  25983. "type": "string",
  25984. "pattern": "^ses"
  25985. },
  25986. "info": {
  25987. "$ref": "#/components/schemas/Message"
  25988. }
  25989. },
  25990. "required": ["sessionID", "info"],
  25991. "additionalProperties": false
  25992. }
  25993. },
  25994. "required": ["id", "type", "properties"],
  25995. "additionalProperties": false
  25996. },
  25997. "EventMessageRemoved": {
  25998. "type": "object",
  25999. "properties": {
  26000. "id": {
  26001. "type": "string",
  26002. "pattern": "^evt_"
  26003. },
  26004. "type": {
  26005. "type": "string",
  26006. "enum": ["message.removed"]
  26007. },
  26008. "properties": {
  26009. "type": "object",
  26010. "properties": {
  26011. "sessionID": {
  26012. "type": "string",
  26013. "pattern": "^ses"
  26014. },
  26015. "messageID": {
  26016. "type": "string",
  26017. "pattern": "^msg"
  26018. }
  26019. },
  26020. "required": ["sessionID", "messageID"],
  26021. "additionalProperties": false
  26022. }
  26023. },
  26024. "required": ["id", "type", "properties"],
  26025. "additionalProperties": false
  26026. },
  26027. "EventMessagePartUpdated": {
  26028. "type": "object",
  26029. "properties": {
  26030. "id": {
  26031. "type": "string",
  26032. "pattern": "^evt_"
  26033. },
  26034. "type": {
  26035. "type": "string",
  26036. "enum": ["message.part.updated"]
  26037. },
  26038. "properties": {
  26039. "type": "object",
  26040. "properties": {
  26041. "sessionID": {
  26042. "type": "string",
  26043. "pattern": "^ses"
  26044. },
  26045. "part": {
  26046. "$ref": "#/components/schemas/Part"
  26047. },
  26048. "time": {
  26049. "type": "number"
  26050. }
  26051. },
  26052. "required": ["sessionID", "part", "time"],
  26053. "additionalProperties": false
  26054. }
  26055. },
  26056. "required": ["id", "type", "properties"],
  26057. "additionalProperties": false
  26058. },
  26059. "EventMessagePartRemoved": {
  26060. "type": "object",
  26061. "properties": {
  26062. "id": {
  26063. "type": "string",
  26064. "pattern": "^evt_"
  26065. },
  26066. "type": {
  26067. "type": "string",
  26068. "enum": ["message.part.removed"]
  26069. },
  26070. "properties": {
  26071. "type": "object",
  26072. "properties": {
  26073. "sessionID": {
  26074. "type": "string",
  26075. "pattern": "^ses"
  26076. },
  26077. "messageID": {
  26078. "type": "string",
  26079. "pattern": "^msg"
  26080. },
  26081. "partID": {
  26082. "type": "string",
  26083. "pattern": "^prt"
  26084. }
  26085. },
  26086. "required": ["sessionID", "messageID", "partID"],
  26087. "additionalProperties": false
  26088. }
  26089. },
  26090. "required": ["id", "type", "properties"],
  26091. "additionalProperties": false
  26092. },
  26093. "EventSessionNextAgentSwitched": {
  26094. "type": "object",
  26095. "properties": {
  26096. "id": {
  26097. "type": "string",
  26098. "pattern": "^evt_"
  26099. },
  26100. "type": {
  26101. "type": "string",
  26102. "enum": ["session.next.agent.switched"]
  26103. },
  26104. "properties": {
  26105. "type": "object",
  26106. "properties": {
  26107. "timestamp": {
  26108. "type": "number"
  26109. },
  26110. "sessionID": {
  26111. "type": "string",
  26112. "pattern": "^ses"
  26113. },
  26114. "messageID": {
  26115. "type": "string",
  26116. "pattern": "^msg_"
  26117. },
  26118. "agent": {
  26119. "type": "string"
  26120. }
  26121. },
  26122. "required": ["timestamp", "sessionID", "messageID", "agent"],
  26123. "additionalProperties": false
  26124. }
  26125. },
  26126. "required": ["id", "type", "properties"],
  26127. "additionalProperties": false
  26128. },
  26129. "EventSessionNextModelSwitched": {
  26130. "type": "object",
  26131. "properties": {
  26132. "id": {
  26133. "type": "string",
  26134. "pattern": "^evt_"
  26135. },
  26136. "type": {
  26137. "type": "string",
  26138. "enum": ["session.next.model.switched"]
  26139. },
  26140. "properties": {
  26141. "type": "object",
  26142. "properties": {
  26143. "timestamp": {
  26144. "type": "number"
  26145. },
  26146. "sessionID": {
  26147. "type": "string",
  26148. "pattern": "^ses"
  26149. },
  26150. "messageID": {
  26151. "type": "string",
  26152. "pattern": "^msg_"
  26153. },
  26154. "model": {
  26155. "type": "object",
  26156. "properties": {
  26157. "id": {
  26158. "type": "string"
  26159. },
  26160. "providerID": {
  26161. "type": "string"
  26162. },
  26163. "variant": {
  26164. "type": "string"
  26165. }
  26166. },
  26167. "required": ["id", "providerID"],
  26168. "additionalProperties": false
  26169. }
  26170. },
  26171. "required": ["timestamp", "sessionID", "messageID", "model"],
  26172. "additionalProperties": false
  26173. }
  26174. },
  26175. "required": ["id", "type", "properties"],
  26176. "additionalProperties": false
  26177. },
  26178. "EventSessionNextMoved": {
  26179. "type": "object",
  26180. "properties": {
  26181. "id": {
  26182. "type": "string",
  26183. "pattern": "^evt_"
  26184. },
  26185. "type": {
  26186. "type": "string",
  26187. "enum": ["session.next.moved"]
  26188. },
  26189. "properties": {
  26190. "type": "object",
  26191. "properties": {
  26192. "timestamp": {
  26193. "type": "number"
  26194. },
  26195. "sessionID": {
  26196. "type": "string",
  26197. "pattern": "^ses"
  26198. },
  26199. "location": {
  26200. "$ref": "#/components/schemas/LocationRef"
  26201. },
  26202. "subdirectory": {
  26203. "type": "string"
  26204. }
  26205. },
  26206. "required": ["timestamp", "sessionID", "location"],
  26207. "additionalProperties": false
  26208. }
  26209. },
  26210. "required": ["id", "type", "properties"],
  26211. "additionalProperties": false
  26212. },
  26213. "EventSessionNextPrompted": {
  26214. "type": "object",
  26215. "properties": {
  26216. "id": {
  26217. "type": "string",
  26218. "pattern": "^evt_"
  26219. },
  26220. "type": {
  26221. "type": "string",
  26222. "enum": ["session.next.prompted"]
  26223. },
  26224. "properties": {
  26225. "type": "object",
  26226. "properties": {
  26227. "timestamp": {
  26228. "type": "number"
  26229. },
  26230. "sessionID": {
  26231. "type": "string",
  26232. "pattern": "^ses"
  26233. },
  26234. "messageID": {
  26235. "type": "string",
  26236. "pattern": "^msg_"
  26237. },
  26238. "prompt": {
  26239. "$ref": "#/components/schemas/Prompt"
  26240. },
  26241. "delivery": {
  26242. "type": "string",
  26243. "enum": ["steer", "queue"]
  26244. }
  26245. },
  26246. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26247. "additionalProperties": false
  26248. }
  26249. },
  26250. "required": ["id", "type", "properties"],
  26251. "additionalProperties": false
  26252. },
  26253. "EventSessionNextPromptAdmitted": {
  26254. "type": "object",
  26255. "properties": {
  26256. "id": {
  26257. "type": "string",
  26258. "pattern": "^evt_"
  26259. },
  26260. "type": {
  26261. "type": "string",
  26262. "enum": ["session.next.prompt.admitted"]
  26263. },
  26264. "properties": {
  26265. "type": "object",
  26266. "properties": {
  26267. "timestamp": {
  26268. "type": "number"
  26269. },
  26270. "sessionID": {
  26271. "type": "string",
  26272. "pattern": "^ses"
  26273. },
  26274. "messageID": {
  26275. "type": "string",
  26276. "pattern": "^msg_"
  26277. },
  26278. "prompt": {
  26279. "$ref": "#/components/schemas/Prompt"
  26280. },
  26281. "delivery": {
  26282. "type": "string",
  26283. "enum": ["steer", "queue"]
  26284. }
  26285. },
  26286. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26287. "additionalProperties": false
  26288. }
  26289. },
  26290. "required": ["id", "type", "properties"],
  26291. "additionalProperties": false
  26292. },
  26293. "EventSessionNextPromptPromoted": {
  26294. "type": "object",
  26295. "properties": {
  26296. "id": {
  26297. "type": "string",
  26298. "pattern": "^evt_"
  26299. },
  26300. "type": {
  26301. "type": "string",
  26302. "enum": ["session.next.prompt.promoted"]
  26303. },
  26304. "properties": {
  26305. "type": "object",
  26306. "properties": {
  26307. "timestamp": {
  26308. "type": "number"
  26309. },
  26310. "sessionID": {
  26311. "type": "string",
  26312. "pattern": "^ses"
  26313. },
  26314. "messageID": {
  26315. "type": "string",
  26316. "pattern": "^msg_"
  26317. },
  26318. "prompt": {
  26319. "$ref": "#/components/schemas/Prompt"
  26320. },
  26321. "timeCreated": {
  26322. "type": "number"
  26323. }
  26324. },
  26325. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  26326. "additionalProperties": false
  26327. }
  26328. },
  26329. "required": ["id", "type", "properties"],
  26330. "additionalProperties": false
  26331. },
  26332. "EventSessionNextInterruptRequested": {
  26333. "type": "object",
  26334. "properties": {
  26335. "id": {
  26336. "type": "string",
  26337. "pattern": "^evt_"
  26338. },
  26339. "type": {
  26340. "type": "string",
  26341. "enum": ["session.next.interrupt.requested"]
  26342. },
  26343. "properties": {
  26344. "type": "object",
  26345. "properties": {
  26346. "timestamp": {
  26347. "type": "number"
  26348. },
  26349. "sessionID": {
  26350. "type": "string",
  26351. "pattern": "^ses"
  26352. }
  26353. },
  26354. "required": ["timestamp", "sessionID"],
  26355. "additionalProperties": false
  26356. }
  26357. },
  26358. "required": ["id", "type", "properties"],
  26359. "additionalProperties": false
  26360. },
  26361. "EventSessionNextContextUpdated": {
  26362. "type": "object",
  26363. "properties": {
  26364. "id": {
  26365. "type": "string",
  26366. "pattern": "^evt_"
  26367. },
  26368. "type": {
  26369. "type": "string",
  26370. "enum": ["session.next.context.updated"]
  26371. },
  26372. "properties": {
  26373. "type": "object",
  26374. "properties": {
  26375. "timestamp": {
  26376. "type": "number"
  26377. },
  26378. "sessionID": {
  26379. "type": "string",
  26380. "pattern": "^ses"
  26381. },
  26382. "messageID": {
  26383. "type": "string",
  26384. "pattern": "^msg_"
  26385. },
  26386. "text": {
  26387. "type": "string"
  26388. }
  26389. },
  26390. "required": ["timestamp", "sessionID", "messageID", "text"],
  26391. "additionalProperties": false
  26392. }
  26393. },
  26394. "required": ["id", "type", "properties"],
  26395. "additionalProperties": false
  26396. },
  26397. "EventSessionNextSynthetic": {
  26398. "type": "object",
  26399. "properties": {
  26400. "id": {
  26401. "type": "string",
  26402. "pattern": "^evt_"
  26403. },
  26404. "type": {
  26405. "type": "string",
  26406. "enum": ["session.next.synthetic"]
  26407. },
  26408. "properties": {
  26409. "type": "object",
  26410. "properties": {
  26411. "timestamp": {
  26412. "type": "number"
  26413. },
  26414. "sessionID": {
  26415. "type": "string",
  26416. "pattern": "^ses"
  26417. },
  26418. "messageID": {
  26419. "type": "string",
  26420. "pattern": "^msg_"
  26421. },
  26422. "text": {
  26423. "type": "string"
  26424. }
  26425. },
  26426. "required": ["timestamp", "sessionID", "messageID", "text"],
  26427. "additionalProperties": false
  26428. }
  26429. },
  26430. "required": ["id", "type", "properties"],
  26431. "additionalProperties": false
  26432. },
  26433. "EventSessionNextShellStarted": {
  26434. "type": "object",
  26435. "properties": {
  26436. "id": {
  26437. "type": "string",
  26438. "pattern": "^evt_"
  26439. },
  26440. "type": {
  26441. "type": "string",
  26442. "enum": ["session.next.shell.started"]
  26443. },
  26444. "properties": {
  26445. "type": "object",
  26446. "properties": {
  26447. "timestamp": {
  26448. "type": "number"
  26449. },
  26450. "sessionID": {
  26451. "type": "string",
  26452. "pattern": "^ses"
  26453. },
  26454. "messageID": {
  26455. "type": "string",
  26456. "pattern": "^msg_"
  26457. },
  26458. "callID": {
  26459. "type": "string"
  26460. },
  26461. "command": {
  26462. "type": "string"
  26463. }
  26464. },
  26465. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  26466. "additionalProperties": false
  26467. }
  26468. },
  26469. "required": ["id", "type", "properties"],
  26470. "additionalProperties": false
  26471. },
  26472. "EventSessionNextShellEnded": {
  26473. "type": "object",
  26474. "properties": {
  26475. "id": {
  26476. "type": "string",
  26477. "pattern": "^evt_"
  26478. },
  26479. "type": {
  26480. "type": "string",
  26481. "enum": ["session.next.shell.ended"]
  26482. },
  26483. "properties": {
  26484. "type": "object",
  26485. "properties": {
  26486. "timestamp": {
  26487. "type": "number"
  26488. },
  26489. "sessionID": {
  26490. "type": "string",
  26491. "pattern": "^ses"
  26492. },
  26493. "callID": {
  26494. "type": "string"
  26495. },
  26496. "output": {
  26497. "type": "string"
  26498. }
  26499. },
  26500. "required": ["timestamp", "sessionID", "callID", "output"],
  26501. "additionalProperties": false
  26502. }
  26503. },
  26504. "required": ["id", "type", "properties"],
  26505. "additionalProperties": false
  26506. },
  26507. "EventSessionNextStepStarted": {
  26508. "type": "object",
  26509. "properties": {
  26510. "id": {
  26511. "type": "string",
  26512. "pattern": "^evt_"
  26513. },
  26514. "type": {
  26515. "type": "string",
  26516. "enum": ["session.next.step.started"]
  26517. },
  26518. "properties": {
  26519. "type": "object",
  26520. "properties": {
  26521. "timestamp": {
  26522. "type": "number"
  26523. },
  26524. "sessionID": {
  26525. "type": "string",
  26526. "pattern": "^ses"
  26527. },
  26528. "assistantMessageID": {
  26529. "type": "string",
  26530. "pattern": "^msg_"
  26531. },
  26532. "agent": {
  26533. "type": "string"
  26534. },
  26535. "model": {
  26536. "type": "object",
  26537. "properties": {
  26538. "id": {
  26539. "type": "string"
  26540. },
  26541. "providerID": {
  26542. "type": "string"
  26543. },
  26544. "variant": {
  26545. "type": "string"
  26546. }
  26547. },
  26548. "required": ["id", "providerID"],
  26549. "additionalProperties": false
  26550. },
  26551. "snapshot": {
  26552. "type": "string"
  26553. }
  26554. },
  26555. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  26556. "additionalProperties": false
  26557. }
  26558. },
  26559. "required": ["id", "type", "properties"],
  26560. "additionalProperties": false
  26561. },
  26562. "EventSessionNextStepEnded": {
  26563. "type": "object",
  26564. "properties": {
  26565. "id": {
  26566. "type": "string",
  26567. "pattern": "^evt_"
  26568. },
  26569. "type": {
  26570. "type": "string",
  26571. "enum": ["session.next.step.ended"]
  26572. },
  26573. "properties": {
  26574. "type": "object",
  26575. "properties": {
  26576. "timestamp": {
  26577. "type": "number"
  26578. },
  26579. "sessionID": {
  26580. "type": "string",
  26581. "pattern": "^ses"
  26582. },
  26583. "assistantMessageID": {
  26584. "type": "string",
  26585. "pattern": "^msg_"
  26586. },
  26587. "finish": {
  26588. "type": "string"
  26589. },
  26590. "cost": {
  26591. "type": "number"
  26592. },
  26593. "tokens": {
  26594. "type": "object",
  26595. "properties": {
  26596. "input": {
  26597. "type": "number"
  26598. },
  26599. "output": {
  26600. "type": "number"
  26601. },
  26602. "reasoning": {
  26603. "type": "number"
  26604. },
  26605. "cache": {
  26606. "type": "object",
  26607. "properties": {
  26608. "read": {
  26609. "type": "number"
  26610. },
  26611. "write": {
  26612. "type": "number"
  26613. }
  26614. },
  26615. "required": ["read", "write"],
  26616. "additionalProperties": false
  26617. }
  26618. },
  26619. "required": ["input", "output", "reasoning", "cache"],
  26620. "additionalProperties": false
  26621. },
  26622. "snapshot": {
  26623. "type": "string"
  26624. }
  26625. },
  26626. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  26627. "additionalProperties": false
  26628. }
  26629. },
  26630. "required": ["id", "type", "properties"],
  26631. "additionalProperties": false
  26632. },
  26633. "EventSessionNextStepFailed": {
  26634. "type": "object",
  26635. "properties": {
  26636. "id": {
  26637. "type": "string",
  26638. "pattern": "^evt_"
  26639. },
  26640. "type": {
  26641. "type": "string",
  26642. "enum": ["session.next.step.failed"]
  26643. },
  26644. "properties": {
  26645. "type": "object",
  26646. "properties": {
  26647. "timestamp": {
  26648. "type": "number"
  26649. },
  26650. "sessionID": {
  26651. "type": "string",
  26652. "pattern": "^ses"
  26653. },
  26654. "assistantMessageID": {
  26655. "type": "string",
  26656. "pattern": "^msg_"
  26657. },
  26658. "error": {
  26659. "$ref": "#/components/schemas/SessionErrorUnknown"
  26660. }
  26661. },
  26662. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  26663. "additionalProperties": false
  26664. }
  26665. },
  26666. "required": ["id", "type", "properties"],
  26667. "additionalProperties": false
  26668. },
  26669. "EventSessionNextTextStarted": {
  26670. "type": "object",
  26671. "properties": {
  26672. "id": {
  26673. "type": "string",
  26674. "pattern": "^evt_"
  26675. },
  26676. "type": {
  26677. "type": "string",
  26678. "enum": ["session.next.text.started"]
  26679. },
  26680. "properties": {
  26681. "type": "object",
  26682. "properties": {
  26683. "timestamp": {
  26684. "type": "number"
  26685. },
  26686. "sessionID": {
  26687. "type": "string",
  26688. "pattern": "^ses"
  26689. },
  26690. "assistantMessageID": {
  26691. "type": "string",
  26692. "pattern": "^msg_"
  26693. },
  26694. "textID": {
  26695. "type": "string"
  26696. }
  26697. },
  26698. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26699. "additionalProperties": false
  26700. }
  26701. },
  26702. "required": ["id", "type", "properties"],
  26703. "additionalProperties": false
  26704. },
  26705. "EventSessionNextTextDelta": {
  26706. "type": "object",
  26707. "properties": {
  26708. "id": {
  26709. "type": "string",
  26710. "pattern": "^evt_"
  26711. },
  26712. "type": {
  26713. "type": "string",
  26714. "enum": ["session.next.text.delta"]
  26715. },
  26716. "properties": {
  26717. "type": "object",
  26718. "properties": {
  26719. "timestamp": {
  26720. "type": "number"
  26721. },
  26722. "sessionID": {
  26723. "type": "string",
  26724. "pattern": "^ses"
  26725. },
  26726. "assistantMessageID": {
  26727. "type": "string",
  26728. "pattern": "^msg_"
  26729. },
  26730. "textID": {
  26731. "type": "string"
  26732. },
  26733. "delta": {
  26734. "type": "string"
  26735. }
  26736. },
  26737. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  26738. "additionalProperties": false
  26739. }
  26740. },
  26741. "required": ["id", "type", "properties"],
  26742. "additionalProperties": false
  26743. },
  26744. "EventSessionNextTextEnded": {
  26745. "type": "object",
  26746. "properties": {
  26747. "id": {
  26748. "type": "string",
  26749. "pattern": "^evt_"
  26750. },
  26751. "type": {
  26752. "type": "string",
  26753. "enum": ["session.next.text.ended"]
  26754. },
  26755. "properties": {
  26756. "type": "object",
  26757. "properties": {
  26758. "timestamp": {
  26759. "type": "number"
  26760. },
  26761. "sessionID": {
  26762. "type": "string",
  26763. "pattern": "^ses"
  26764. },
  26765. "assistantMessageID": {
  26766. "type": "string",
  26767. "pattern": "^msg_"
  26768. },
  26769. "textID": {
  26770. "type": "string"
  26771. },
  26772. "text": {
  26773. "type": "string"
  26774. }
  26775. },
  26776. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26777. "additionalProperties": false
  26778. }
  26779. },
  26780. "required": ["id", "type", "properties"],
  26781. "additionalProperties": false
  26782. },
  26783. "EventSessionNextReasoningStarted": {
  26784. "type": "object",
  26785. "properties": {
  26786. "id": {
  26787. "type": "string",
  26788. "pattern": "^evt_"
  26789. },
  26790. "type": {
  26791. "type": "string",
  26792. "enum": ["session.next.reasoning.started"]
  26793. },
  26794. "properties": {
  26795. "type": "object",
  26796. "properties": {
  26797. "timestamp": {
  26798. "type": "number"
  26799. },
  26800. "sessionID": {
  26801. "type": "string",
  26802. "pattern": "^ses"
  26803. },
  26804. "assistantMessageID": {
  26805. "type": "string",
  26806. "pattern": "^msg_"
  26807. },
  26808. "reasoningID": {
  26809. "type": "string"
  26810. },
  26811. "providerMetadata": {
  26812. "type": "object",
  26813. "additionalProperties": {
  26814. "type": "object"
  26815. }
  26816. }
  26817. },
  26818. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26819. "additionalProperties": false
  26820. }
  26821. },
  26822. "required": ["id", "type", "properties"],
  26823. "additionalProperties": false
  26824. },
  26825. "EventSessionNextReasoningDelta": {
  26826. "type": "object",
  26827. "properties": {
  26828. "id": {
  26829. "type": "string",
  26830. "pattern": "^evt_"
  26831. },
  26832. "type": {
  26833. "type": "string",
  26834. "enum": ["session.next.reasoning.delta"]
  26835. },
  26836. "properties": {
  26837. "type": "object",
  26838. "properties": {
  26839. "timestamp": {
  26840. "type": "number"
  26841. },
  26842. "sessionID": {
  26843. "type": "string",
  26844. "pattern": "^ses"
  26845. },
  26846. "assistantMessageID": {
  26847. "type": "string",
  26848. "pattern": "^msg_"
  26849. },
  26850. "reasoningID": {
  26851. "type": "string"
  26852. },
  26853. "delta": {
  26854. "type": "string"
  26855. }
  26856. },
  26857. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  26858. "additionalProperties": false
  26859. }
  26860. },
  26861. "required": ["id", "type", "properties"],
  26862. "additionalProperties": false
  26863. },
  26864. "EventSessionNextReasoningEnded": {
  26865. "type": "object",
  26866. "properties": {
  26867. "id": {
  26868. "type": "string",
  26869. "pattern": "^evt_"
  26870. },
  26871. "type": {
  26872. "type": "string",
  26873. "enum": ["session.next.reasoning.ended"]
  26874. },
  26875. "properties": {
  26876. "type": "object",
  26877. "properties": {
  26878. "timestamp": {
  26879. "type": "number"
  26880. },
  26881. "sessionID": {
  26882. "type": "string",
  26883. "pattern": "^ses"
  26884. },
  26885. "assistantMessageID": {
  26886. "type": "string",
  26887. "pattern": "^msg_"
  26888. },
  26889. "reasoningID": {
  26890. "type": "string"
  26891. },
  26892. "text": {
  26893. "type": "string"
  26894. },
  26895. "providerMetadata": {
  26896. "type": "object",
  26897. "additionalProperties": {
  26898. "type": "object"
  26899. }
  26900. }
  26901. },
  26902. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26903. "additionalProperties": false
  26904. }
  26905. },
  26906. "required": ["id", "type", "properties"],
  26907. "additionalProperties": false
  26908. },
  26909. "EventSessionNextToolInputStarted": {
  26910. "type": "object",
  26911. "properties": {
  26912. "id": {
  26913. "type": "string",
  26914. "pattern": "^evt_"
  26915. },
  26916. "type": {
  26917. "type": "string",
  26918. "enum": ["session.next.tool.input.started"]
  26919. },
  26920. "properties": {
  26921. "type": "object",
  26922. "properties": {
  26923. "timestamp": {
  26924. "type": "number"
  26925. },
  26926. "sessionID": {
  26927. "type": "string",
  26928. "pattern": "^ses"
  26929. },
  26930. "assistantMessageID": {
  26931. "type": "string",
  26932. "pattern": "^msg_"
  26933. },
  26934. "callID": {
  26935. "type": "string"
  26936. },
  26937. "name": {
  26938. "type": "string"
  26939. }
  26940. },
  26941. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26942. "additionalProperties": false
  26943. }
  26944. },
  26945. "required": ["id", "type", "properties"],
  26946. "additionalProperties": false
  26947. },
  26948. "EventSessionNextToolInputDelta": {
  26949. "type": "object",
  26950. "properties": {
  26951. "id": {
  26952. "type": "string",
  26953. "pattern": "^evt_"
  26954. },
  26955. "type": {
  26956. "type": "string",
  26957. "enum": ["session.next.tool.input.delta"]
  26958. },
  26959. "properties": {
  26960. "type": "object",
  26961. "properties": {
  26962. "timestamp": {
  26963. "type": "number"
  26964. },
  26965. "sessionID": {
  26966. "type": "string",
  26967. "pattern": "^ses"
  26968. },
  26969. "assistantMessageID": {
  26970. "type": "string",
  26971. "pattern": "^msg_"
  26972. },
  26973. "callID": {
  26974. "type": "string"
  26975. },
  26976. "delta": {
  26977. "type": "string"
  26978. }
  26979. },
  26980. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  26981. "additionalProperties": false
  26982. }
  26983. },
  26984. "required": ["id", "type", "properties"],
  26985. "additionalProperties": false
  26986. },
  26987. "EventSessionNextToolInputEnded": {
  26988. "type": "object",
  26989. "properties": {
  26990. "id": {
  26991. "type": "string",
  26992. "pattern": "^evt_"
  26993. },
  26994. "type": {
  26995. "type": "string",
  26996. "enum": ["session.next.tool.input.ended"]
  26997. },
  26998. "properties": {
  26999. "type": "object",
  27000. "properties": {
  27001. "timestamp": {
  27002. "type": "number"
  27003. },
  27004. "sessionID": {
  27005. "type": "string",
  27006. "pattern": "^ses"
  27007. },
  27008. "assistantMessageID": {
  27009. "type": "string",
  27010. "pattern": "^msg_"
  27011. },
  27012. "callID": {
  27013. "type": "string"
  27014. },
  27015. "text": {
  27016. "type": "string"
  27017. }
  27018. },
  27019. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  27020. "additionalProperties": false
  27021. }
  27022. },
  27023. "required": ["id", "type", "properties"],
  27024. "additionalProperties": false
  27025. },
  27026. "EventSessionNextToolCalled": {
  27027. "type": "object",
  27028. "properties": {
  27029. "id": {
  27030. "type": "string",
  27031. "pattern": "^evt_"
  27032. },
  27033. "type": {
  27034. "type": "string",
  27035. "enum": ["session.next.tool.called"]
  27036. },
  27037. "properties": {
  27038. "type": "object",
  27039. "properties": {
  27040. "timestamp": {
  27041. "type": "number"
  27042. },
  27043. "sessionID": {
  27044. "type": "string",
  27045. "pattern": "^ses"
  27046. },
  27047. "assistantMessageID": {
  27048. "type": "string",
  27049. "pattern": "^msg_"
  27050. },
  27051. "callID": {
  27052. "type": "string"
  27053. },
  27054. "tool": {
  27055. "type": "string"
  27056. },
  27057. "input": {
  27058. "type": "object"
  27059. },
  27060. "provider": {
  27061. "type": "object",
  27062. "properties": {
  27063. "executed": {
  27064. "type": "boolean"
  27065. },
  27066. "metadata": {
  27067. "type": "object",
  27068. "additionalProperties": {
  27069. "type": "object"
  27070. }
  27071. }
  27072. },
  27073. "required": ["executed"],
  27074. "additionalProperties": false
  27075. }
  27076. },
  27077. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  27078. "additionalProperties": false
  27079. }
  27080. },
  27081. "required": ["id", "type", "properties"],
  27082. "additionalProperties": false
  27083. },
  27084. "EventSessionNextToolProgress": {
  27085. "type": "object",
  27086. "properties": {
  27087. "id": {
  27088. "type": "string",
  27089. "pattern": "^evt_"
  27090. },
  27091. "type": {
  27092. "type": "string",
  27093. "enum": ["session.next.tool.progress"]
  27094. },
  27095. "properties": {
  27096. "type": "object",
  27097. "properties": {
  27098. "timestamp": {
  27099. "type": "number"
  27100. },
  27101. "sessionID": {
  27102. "type": "string",
  27103. "pattern": "^ses"
  27104. },
  27105. "assistantMessageID": {
  27106. "type": "string",
  27107. "pattern": "^msg_"
  27108. },
  27109. "callID": {
  27110. "type": "string"
  27111. },
  27112. "structured": {
  27113. "type": "object"
  27114. },
  27115. "content": {
  27116. "type": "array",
  27117. "items": {
  27118. "anyOf": [
  27119. {
  27120. "$ref": "#/components/schemas/ToolTextContent"
  27121. },
  27122. {
  27123. "$ref": "#/components/schemas/ToolFileContent"
  27124. }
  27125. ]
  27126. }
  27127. }
  27128. },
  27129. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  27130. "additionalProperties": false
  27131. }
  27132. },
  27133. "required": ["id", "type", "properties"],
  27134. "additionalProperties": false
  27135. },
  27136. "EventSessionNextToolSuccess": {
  27137. "type": "object",
  27138. "properties": {
  27139. "id": {
  27140. "type": "string",
  27141. "pattern": "^evt_"
  27142. },
  27143. "type": {
  27144. "type": "string",
  27145. "enum": ["session.next.tool.success"]
  27146. },
  27147. "properties": {
  27148. "type": "object",
  27149. "properties": {
  27150. "timestamp": {
  27151. "type": "number"
  27152. },
  27153. "sessionID": {
  27154. "type": "string",
  27155. "pattern": "^ses"
  27156. },
  27157. "assistantMessageID": {
  27158. "type": "string",
  27159. "pattern": "^msg_"
  27160. },
  27161. "callID": {
  27162. "type": "string"
  27163. },
  27164. "structured": {
  27165. "type": "object"
  27166. },
  27167. "content": {
  27168. "type": "array",
  27169. "items": {
  27170. "anyOf": [
  27171. {
  27172. "$ref": "#/components/schemas/ToolTextContent"
  27173. },
  27174. {
  27175. "$ref": "#/components/schemas/ToolFileContent"
  27176. }
  27177. ]
  27178. }
  27179. },
  27180. "outputPaths": {
  27181. "type": "array",
  27182. "items": {
  27183. "type": "string"
  27184. }
  27185. },
  27186. "result": {},
  27187. "provider": {
  27188. "type": "object",
  27189. "properties": {
  27190. "executed": {
  27191. "type": "boolean"
  27192. },
  27193. "metadata": {
  27194. "type": "object",
  27195. "additionalProperties": {
  27196. "type": "object"
  27197. }
  27198. }
  27199. },
  27200. "required": ["executed"],
  27201. "additionalProperties": false
  27202. }
  27203. },
  27204. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  27205. "additionalProperties": false
  27206. }
  27207. },
  27208. "required": ["id", "type", "properties"],
  27209. "additionalProperties": false
  27210. },
  27211. "EventSessionNextToolFailed": {
  27212. "type": "object",
  27213. "properties": {
  27214. "id": {
  27215. "type": "string",
  27216. "pattern": "^evt_"
  27217. },
  27218. "type": {
  27219. "type": "string",
  27220. "enum": ["session.next.tool.failed"]
  27221. },
  27222. "properties": {
  27223. "type": "object",
  27224. "properties": {
  27225. "timestamp": {
  27226. "type": "number"
  27227. },
  27228. "sessionID": {
  27229. "type": "string",
  27230. "pattern": "^ses"
  27231. },
  27232. "assistantMessageID": {
  27233. "type": "string",
  27234. "pattern": "^msg_"
  27235. },
  27236. "callID": {
  27237. "type": "string"
  27238. },
  27239. "error": {
  27240. "$ref": "#/components/schemas/SessionErrorUnknown"
  27241. },
  27242. "result": {},
  27243. "provider": {
  27244. "type": "object",
  27245. "properties": {
  27246. "executed": {
  27247. "type": "boolean"
  27248. },
  27249. "metadata": {
  27250. "type": "object",
  27251. "additionalProperties": {
  27252. "type": "object"
  27253. }
  27254. }
  27255. },
  27256. "required": ["executed"],
  27257. "additionalProperties": false
  27258. }
  27259. },
  27260. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  27261. "additionalProperties": false
  27262. }
  27263. },
  27264. "required": ["id", "type", "properties"],
  27265. "additionalProperties": false
  27266. },
  27267. "EventSessionNextRetried": {
  27268. "type": "object",
  27269. "properties": {
  27270. "id": {
  27271. "type": "string",
  27272. "pattern": "^evt_"
  27273. },
  27274. "type": {
  27275. "type": "string",
  27276. "enum": ["session.next.retried"]
  27277. },
  27278. "properties": {
  27279. "type": "object",
  27280. "properties": {
  27281. "timestamp": {
  27282. "type": "number"
  27283. },
  27284. "sessionID": {
  27285. "type": "string",
  27286. "pattern": "^ses"
  27287. },
  27288. "attempt": {
  27289. "type": "number"
  27290. },
  27291. "error": {
  27292. "$ref": "#/components/schemas/SessionNextRetry_error"
  27293. }
  27294. },
  27295. "required": ["timestamp", "sessionID", "attempt", "error"],
  27296. "additionalProperties": false
  27297. }
  27298. },
  27299. "required": ["id", "type", "properties"],
  27300. "additionalProperties": false
  27301. },
  27302. "EventSessionNextCompactionStarted": {
  27303. "type": "object",
  27304. "properties": {
  27305. "id": {
  27306. "type": "string",
  27307. "pattern": "^evt_"
  27308. },
  27309. "type": {
  27310. "type": "string",
  27311. "enum": ["session.next.compaction.started"]
  27312. },
  27313. "properties": {
  27314. "type": "object",
  27315. "properties": {
  27316. "timestamp": {
  27317. "type": "number"
  27318. },
  27319. "sessionID": {
  27320. "type": "string",
  27321. "pattern": "^ses"
  27322. },
  27323. "messageID": {
  27324. "type": "string",
  27325. "pattern": "^msg_"
  27326. },
  27327. "reason": {
  27328. "type": "string",
  27329. "enum": ["auto", "manual"]
  27330. }
  27331. },
  27332. "required": ["timestamp", "sessionID", "messageID", "reason"],
  27333. "additionalProperties": false
  27334. }
  27335. },
  27336. "required": ["id", "type", "properties"],
  27337. "additionalProperties": false
  27338. },
  27339. "EventSessionNextCompactionDelta": {
  27340. "type": "object",
  27341. "properties": {
  27342. "id": {
  27343. "type": "string",
  27344. "pattern": "^evt_"
  27345. },
  27346. "type": {
  27347. "type": "string",
  27348. "enum": ["session.next.compaction.delta"]
  27349. },
  27350. "properties": {
  27351. "type": "object",
  27352. "properties": {
  27353. "timestamp": {
  27354. "type": "number"
  27355. },
  27356. "sessionID": {
  27357. "type": "string",
  27358. "pattern": "^ses"
  27359. },
  27360. "messageID": {
  27361. "type": "string",
  27362. "pattern": "^msg_"
  27363. },
  27364. "text": {
  27365. "type": "string"
  27366. }
  27367. },
  27368. "required": ["timestamp", "sessionID", "messageID", "text"],
  27369. "additionalProperties": false
  27370. }
  27371. },
  27372. "required": ["id", "type", "properties"],
  27373. "additionalProperties": false
  27374. },
  27375. "EventSessionNextCompactionEnded": {
  27376. "type": "object",
  27377. "properties": {
  27378. "id": {
  27379. "type": "string",
  27380. "pattern": "^evt_"
  27381. },
  27382. "type": {
  27383. "type": "string",
  27384. "enum": ["session.next.compaction.ended"]
  27385. },
  27386. "properties": {
  27387. "type": "object",
  27388. "properties": {
  27389. "timestamp": {
  27390. "type": "number"
  27391. },
  27392. "sessionID": {
  27393. "type": "string",
  27394. "pattern": "^ses"
  27395. },
  27396. "messageID": {
  27397. "type": "string",
  27398. "pattern": "^msg_"
  27399. },
  27400. "reason": {
  27401. "type": "string",
  27402. "enum": ["auto", "manual"]
  27403. },
  27404. "text": {
  27405. "type": "string"
  27406. },
  27407. "recent": {
  27408. "type": "string"
  27409. }
  27410. },
  27411. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  27412. "additionalProperties": false
  27413. }
  27414. },
  27415. "required": ["id", "type", "properties"],
  27416. "additionalProperties": false
  27417. },
  27418. "EventMessagePartDelta": {
  27419. "type": "object",
  27420. "properties": {
  27421. "id": {
  27422. "type": "string",
  27423. "pattern": "^evt_"
  27424. },
  27425. "type": {
  27426. "type": "string",
  27427. "enum": ["message.part.delta"]
  27428. },
  27429. "properties": {
  27430. "type": "object",
  27431. "properties": {
  27432. "sessionID": {
  27433. "type": "string",
  27434. "pattern": "^ses"
  27435. },
  27436. "messageID": {
  27437. "type": "string",
  27438. "pattern": "^msg"
  27439. },
  27440. "partID": {
  27441. "type": "string",
  27442. "pattern": "^prt"
  27443. },
  27444. "field": {
  27445. "type": "string"
  27446. },
  27447. "delta": {
  27448. "type": "string"
  27449. }
  27450. },
  27451. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  27452. "additionalProperties": false
  27453. }
  27454. },
  27455. "required": ["id", "type", "properties"],
  27456. "additionalProperties": false
  27457. },
  27458. "EventSessionDiff": {
  27459. "type": "object",
  27460. "properties": {
  27461. "id": {
  27462. "type": "string",
  27463. "pattern": "^evt_"
  27464. },
  27465. "type": {
  27466. "type": "string",
  27467. "enum": ["session.diff"]
  27468. },
  27469. "properties": {
  27470. "type": "object",
  27471. "properties": {
  27472. "sessionID": {
  27473. "type": "string",
  27474. "pattern": "^ses"
  27475. },
  27476. "diff": {
  27477. "type": "array",
  27478. "items": {
  27479. "$ref": "#/components/schemas/SnapshotFileDiff"
  27480. }
  27481. }
  27482. },
  27483. "required": ["sessionID", "diff"],
  27484. "additionalProperties": false
  27485. }
  27486. },
  27487. "required": ["id", "type", "properties"],
  27488. "additionalProperties": false
  27489. },
  27490. "EventSessionError": {
  27491. "type": "object",
  27492. "properties": {
  27493. "id": {
  27494. "type": "string",
  27495. "pattern": "^evt_"
  27496. },
  27497. "type": {
  27498. "type": "string",
  27499. "enum": ["session.error"]
  27500. },
  27501. "properties": {
  27502. "type": "object",
  27503. "properties": {
  27504. "sessionID": {
  27505. "type": "string",
  27506. "pattern": "^ses"
  27507. },
  27508. "error": {
  27509. "anyOf": [
  27510. {
  27511. "$ref": "#/components/schemas/ProviderAuthError"
  27512. },
  27513. {
  27514. "$ref": "#/components/schemas/UnknownError"
  27515. },
  27516. {
  27517. "$ref": "#/components/schemas/MessageOutputLengthError"
  27518. },
  27519. {
  27520. "$ref": "#/components/schemas/MessageAbortedError"
  27521. },
  27522. {
  27523. "$ref": "#/components/schemas/StructuredOutputError"
  27524. },
  27525. {
  27526. "$ref": "#/components/schemas/ContextOverflowError"
  27527. },
  27528. {
  27529. "$ref": "#/components/schemas/APIError"
  27530. }
  27531. ]
  27532. }
  27533. },
  27534. "additionalProperties": false
  27535. }
  27536. },
  27537. "required": ["id", "type", "properties"],
  27538. "additionalProperties": false
  27539. },
  27540. "EventInstallationUpdated": {
  27541. "type": "object",
  27542. "properties": {
  27543. "id": {
  27544. "type": "string",
  27545. "pattern": "^evt_"
  27546. },
  27547. "type": {
  27548. "type": "string",
  27549. "enum": ["installation.updated"]
  27550. },
  27551. "properties": {
  27552. "type": "object",
  27553. "properties": {
  27554. "version": {
  27555. "type": "string"
  27556. }
  27557. },
  27558. "required": ["version"],
  27559. "additionalProperties": false
  27560. }
  27561. },
  27562. "required": ["id", "type", "properties"],
  27563. "additionalProperties": false
  27564. },
  27565. "EventInstallationUpdate-available": {
  27566. "type": "object",
  27567. "properties": {
  27568. "id": {
  27569. "type": "string",
  27570. "pattern": "^evt_"
  27571. },
  27572. "type": {
  27573. "type": "string",
  27574. "enum": ["installation.update-available"]
  27575. },
  27576. "properties": {
  27577. "type": "object",
  27578. "properties": {
  27579. "version": {
  27580. "type": "string"
  27581. }
  27582. },
  27583. "required": ["version"],
  27584. "additionalProperties": false
  27585. }
  27586. },
  27587. "required": ["id", "type", "properties"],
  27588. "additionalProperties": false
  27589. },
  27590. "EventFileEdited": {
  27591. "type": "object",
  27592. "properties": {
  27593. "id": {
  27594. "type": "string",
  27595. "pattern": "^evt_"
  27596. },
  27597. "type": {
  27598. "type": "string",
  27599. "enum": ["file.edited"]
  27600. },
  27601. "properties": {
  27602. "type": "object",
  27603. "properties": {
  27604. "file": {
  27605. "type": "string"
  27606. }
  27607. },
  27608. "required": ["file"],
  27609. "additionalProperties": false
  27610. }
  27611. },
  27612. "required": ["id", "type", "properties"],
  27613. "additionalProperties": false
  27614. },
  27615. "EventAccountAdded": {
  27616. "type": "object",
  27617. "properties": {
  27618. "id": {
  27619. "type": "string",
  27620. "pattern": "^evt_"
  27621. },
  27622. "type": {
  27623. "type": "string",
  27624. "enum": ["account.added"]
  27625. },
  27626. "properties": {
  27627. "type": "object",
  27628. "properties": {
  27629. "account": {
  27630. "$ref": "#/components/schemas/AuthInfo"
  27631. }
  27632. },
  27633. "required": ["account"],
  27634. "additionalProperties": false
  27635. }
  27636. },
  27637. "required": ["id", "type", "properties"],
  27638. "additionalProperties": false
  27639. },
  27640. "EventAccountRemoved": {
  27641. "type": "object",
  27642. "properties": {
  27643. "id": {
  27644. "type": "string",
  27645. "pattern": "^evt_"
  27646. },
  27647. "type": {
  27648. "type": "string",
  27649. "enum": ["account.removed"]
  27650. },
  27651. "properties": {
  27652. "type": "object",
  27653. "properties": {
  27654. "account": {
  27655. "$ref": "#/components/schemas/AuthInfo"
  27656. }
  27657. },
  27658. "required": ["account"],
  27659. "additionalProperties": false
  27660. }
  27661. },
  27662. "required": ["id", "type", "properties"],
  27663. "additionalProperties": false
  27664. },
  27665. "EventAccountSwitched": {
  27666. "type": "object",
  27667. "properties": {
  27668. "id": {
  27669. "type": "string",
  27670. "pattern": "^evt_"
  27671. },
  27672. "type": {
  27673. "type": "string",
  27674. "enum": ["account.switched"]
  27675. },
  27676. "properties": {
  27677. "type": "object",
  27678. "properties": {
  27679. "serviceID": {
  27680. "type": "string"
  27681. },
  27682. "from": {
  27683. "type": "string"
  27684. },
  27685. "to": {
  27686. "type": "string"
  27687. }
  27688. },
  27689. "required": ["serviceID"],
  27690. "additionalProperties": false
  27691. }
  27692. },
  27693. "required": ["id", "type", "properties"],
  27694. "additionalProperties": false
  27695. },
  27696. "EventPermissionV2Asked": {
  27697. "type": "object",
  27698. "properties": {
  27699. "id": {
  27700. "type": "string",
  27701. "pattern": "^evt_"
  27702. },
  27703. "type": {
  27704. "type": "string",
  27705. "enum": ["permission.v2.asked"]
  27706. },
  27707. "properties": {
  27708. "type": "object",
  27709. "properties": {
  27710. "id": {
  27711. "type": "string",
  27712. "pattern": "^per"
  27713. },
  27714. "sessionID": {
  27715. "type": "string",
  27716. "pattern": "^ses"
  27717. },
  27718. "action": {
  27719. "type": "string"
  27720. },
  27721. "resources": {
  27722. "type": "array",
  27723. "items": {
  27724. "type": "string"
  27725. }
  27726. },
  27727. "save": {
  27728. "type": "array",
  27729. "items": {
  27730. "type": "string"
  27731. }
  27732. },
  27733. "metadata": {
  27734. "type": "object"
  27735. },
  27736. "source": {
  27737. "$ref": "#/components/schemas/PermissionV2Source"
  27738. }
  27739. },
  27740. "required": ["id", "sessionID", "action", "resources"],
  27741. "additionalProperties": false
  27742. }
  27743. },
  27744. "required": ["id", "type", "properties"],
  27745. "additionalProperties": false
  27746. },
  27747. "EventPermissionV2Replied": {
  27748. "type": "object",
  27749. "properties": {
  27750. "id": {
  27751. "type": "string",
  27752. "pattern": "^evt_"
  27753. },
  27754. "type": {
  27755. "type": "string",
  27756. "enum": ["permission.v2.replied"]
  27757. },
  27758. "properties": {
  27759. "type": "object",
  27760. "properties": {
  27761. "sessionID": {
  27762. "type": "string",
  27763. "pattern": "^ses"
  27764. },
  27765. "requestID": {
  27766. "type": "string",
  27767. "pattern": "^per"
  27768. },
  27769. "reply": {
  27770. "$ref": "#/components/schemas/PermissionV2Reply"
  27771. }
  27772. },
  27773. "required": ["sessionID", "requestID", "reply"],
  27774. "additionalProperties": false
  27775. }
  27776. },
  27777. "required": ["id", "type", "properties"],
  27778. "additionalProperties": false
  27779. },
  27780. "EventReferenceUpdated": {
  27781. "type": "object",
  27782. "properties": {
  27783. "id": {
  27784. "type": "string",
  27785. "pattern": "^evt_"
  27786. },
  27787. "type": {
  27788. "type": "string",
  27789. "enum": ["reference.updated"]
  27790. },
  27791. "properties": {
  27792. "type": "object",
  27793. "properties": {}
  27794. }
  27795. },
  27796. "required": ["id", "type", "properties"],
  27797. "additionalProperties": false
  27798. },
  27799. "EventFileWatcherUpdated": {
  27800. "type": "object",
  27801. "properties": {
  27802. "id": {
  27803. "type": "string",
  27804. "pattern": "^evt_"
  27805. },
  27806. "type": {
  27807. "type": "string",
  27808. "enum": ["file.watcher.updated"]
  27809. },
  27810. "properties": {
  27811. "type": "object",
  27812. "properties": {
  27813. "file": {
  27814. "type": "string"
  27815. },
  27816. "event": {
  27817. "type": "string",
  27818. "enum": ["add", "change", "unlink"]
  27819. }
  27820. },
  27821. "required": ["file", "event"],
  27822. "additionalProperties": false
  27823. }
  27824. },
  27825. "required": ["id", "type", "properties"],
  27826. "additionalProperties": false
  27827. },
  27828. "EventPtyCreated": {
  27829. "type": "object",
  27830. "properties": {
  27831. "id": {
  27832. "type": "string",
  27833. "pattern": "^evt_"
  27834. },
  27835. "type": {
  27836. "type": "string",
  27837. "enum": ["pty.created"]
  27838. },
  27839. "properties": {
  27840. "type": "object",
  27841. "properties": {
  27842. "info": {
  27843. "$ref": "#/components/schemas/Pty"
  27844. }
  27845. },
  27846. "required": ["info"],
  27847. "additionalProperties": false
  27848. }
  27849. },
  27850. "required": ["id", "type", "properties"],
  27851. "additionalProperties": false
  27852. },
  27853. "EventPtyUpdated": {
  27854. "type": "object",
  27855. "properties": {
  27856. "id": {
  27857. "type": "string",
  27858. "pattern": "^evt_"
  27859. },
  27860. "type": {
  27861. "type": "string",
  27862. "enum": ["pty.updated"]
  27863. },
  27864. "properties": {
  27865. "type": "object",
  27866. "properties": {
  27867. "info": {
  27868. "$ref": "#/components/schemas/Pty"
  27869. }
  27870. },
  27871. "required": ["info"],
  27872. "additionalProperties": false
  27873. }
  27874. },
  27875. "required": ["id", "type", "properties"],
  27876. "additionalProperties": false
  27877. },
  27878. "EventPtyExited": {
  27879. "type": "object",
  27880. "properties": {
  27881. "id": {
  27882. "type": "string",
  27883. "pattern": "^evt_"
  27884. },
  27885. "type": {
  27886. "type": "string",
  27887. "enum": ["pty.exited"]
  27888. },
  27889. "properties": {
  27890. "type": "object",
  27891. "properties": {
  27892. "id": {
  27893. "type": "string",
  27894. "pattern": "^pty"
  27895. },
  27896. "exitCode": {
  27897. "type": "integer",
  27898. "minimum": 0
  27899. }
  27900. },
  27901. "required": ["id", "exitCode"],
  27902. "additionalProperties": false
  27903. }
  27904. },
  27905. "required": ["id", "type", "properties"],
  27906. "additionalProperties": false
  27907. },
  27908. "EventPtyDeleted": {
  27909. "type": "object",
  27910. "properties": {
  27911. "id": {
  27912. "type": "string",
  27913. "pattern": "^evt_"
  27914. },
  27915. "type": {
  27916. "type": "string",
  27917. "enum": ["pty.deleted"]
  27918. },
  27919. "properties": {
  27920. "type": "object",
  27921. "properties": {
  27922. "id": {
  27923. "type": "string",
  27924. "pattern": "^pty"
  27925. }
  27926. },
  27927. "required": ["id"],
  27928. "additionalProperties": false
  27929. }
  27930. },
  27931. "required": ["id", "type", "properties"],
  27932. "additionalProperties": false
  27933. },
  27934. "EventQuestionV2Asked": {
  27935. "type": "object",
  27936. "properties": {
  27937. "id": {
  27938. "type": "string",
  27939. "pattern": "^evt_"
  27940. },
  27941. "type": {
  27942. "type": "string",
  27943. "enum": ["question.v2.asked"]
  27944. },
  27945. "properties": {
  27946. "type": "object",
  27947. "properties": {
  27948. "id": {
  27949. "type": "string",
  27950. "pattern": "^que"
  27951. },
  27952. "sessionID": {
  27953. "type": "string",
  27954. "pattern": "^ses"
  27955. },
  27956. "questions": {
  27957. "type": "array",
  27958. "items": {
  27959. "$ref": "#/components/schemas/QuestionV2Info"
  27960. },
  27961. "description": "Questions to ask"
  27962. },
  27963. "tool": {
  27964. "$ref": "#/components/schemas/QuestionV2Tool"
  27965. }
  27966. },
  27967. "required": ["id", "sessionID", "questions"],
  27968. "additionalProperties": false
  27969. }
  27970. },
  27971. "required": ["id", "type", "properties"],
  27972. "additionalProperties": false
  27973. },
  27974. "EventQuestionV2Replied": {
  27975. "type": "object",
  27976. "properties": {
  27977. "id": {
  27978. "type": "string",
  27979. "pattern": "^evt_"
  27980. },
  27981. "type": {
  27982. "type": "string",
  27983. "enum": ["question.v2.replied"]
  27984. },
  27985. "properties": {
  27986. "type": "object",
  27987. "properties": {
  27988. "sessionID": {
  27989. "type": "string",
  27990. "pattern": "^ses"
  27991. },
  27992. "requestID": {
  27993. "type": "string",
  27994. "pattern": "^que"
  27995. },
  27996. "answers": {
  27997. "type": "array",
  27998. "items": {
  27999. "$ref": "#/components/schemas/QuestionV2Answer"
  28000. }
  28001. }
  28002. },
  28003. "required": ["sessionID", "requestID", "answers"],
  28004. "additionalProperties": false
  28005. }
  28006. },
  28007. "required": ["id", "type", "properties"],
  28008. "additionalProperties": false
  28009. },
  28010. "EventQuestionV2Rejected": {
  28011. "type": "object",
  28012. "properties": {
  28013. "id": {
  28014. "type": "string",
  28015. "pattern": "^evt_"
  28016. },
  28017. "type": {
  28018. "type": "string",
  28019. "enum": ["question.v2.rejected"]
  28020. },
  28021. "properties": {
  28022. "type": "object",
  28023. "properties": {
  28024. "sessionID": {
  28025. "type": "string",
  28026. "pattern": "^ses"
  28027. },
  28028. "requestID": {
  28029. "type": "string",
  28030. "pattern": "^que"
  28031. }
  28032. },
  28033. "required": ["sessionID", "requestID"],
  28034. "additionalProperties": false
  28035. }
  28036. },
  28037. "required": ["id", "type", "properties"],
  28038. "additionalProperties": false
  28039. },
  28040. "EventTodoUpdated": {
  28041. "type": "object",
  28042. "properties": {
  28043. "id": {
  28044. "type": "string",
  28045. "pattern": "^evt_"
  28046. },
  28047. "type": {
  28048. "type": "string",
  28049. "enum": ["todo.updated"]
  28050. },
  28051. "properties": {
  28052. "type": "object",
  28053. "properties": {
  28054. "sessionID": {
  28055. "type": "string",
  28056. "pattern": "^ses"
  28057. },
  28058. "todos": {
  28059. "type": "array",
  28060. "items": {
  28061. "$ref": "#/components/schemas/Todo"
  28062. }
  28063. }
  28064. },
  28065. "required": ["sessionID", "todos"],
  28066. "additionalProperties": false
  28067. }
  28068. },
  28069. "required": ["id", "type", "properties"],
  28070. "additionalProperties": false
  28071. },
  28072. "EventLspUpdated": {
  28073. "type": "object",
  28074. "properties": {
  28075. "id": {
  28076. "type": "string",
  28077. "pattern": "^evt_"
  28078. },
  28079. "type": {
  28080. "type": "string",
  28081. "enum": ["lsp.updated"]
  28082. },
  28083. "properties": {
  28084. "type": "object",
  28085. "properties": {}
  28086. }
  28087. },
  28088. "required": ["id", "type", "properties"],
  28089. "additionalProperties": false
  28090. },
  28091. "EventPermissionAsked": {
  28092. "type": "object",
  28093. "properties": {
  28094. "id": {
  28095. "type": "string",
  28096. "pattern": "^evt_"
  28097. },
  28098. "type": {
  28099. "type": "string",
  28100. "enum": ["permission.asked"]
  28101. },
  28102. "properties": {
  28103. "type": "object",
  28104. "properties": {
  28105. "id": {
  28106. "type": "string",
  28107. "pattern": "^per"
  28108. },
  28109. "sessionID": {
  28110. "type": "string",
  28111. "pattern": "^ses"
  28112. },
  28113. "permission": {
  28114. "type": "string"
  28115. },
  28116. "patterns": {
  28117. "type": "array",
  28118. "items": {
  28119. "type": "string"
  28120. }
  28121. },
  28122. "metadata": {
  28123. "type": "object"
  28124. },
  28125. "always": {
  28126. "type": "array",
  28127. "items": {
  28128. "type": "string"
  28129. }
  28130. },
  28131. "tool": {
  28132. "type": "object",
  28133. "properties": {
  28134. "messageID": {
  28135. "type": "string"
  28136. },
  28137. "callID": {
  28138. "type": "string"
  28139. }
  28140. },
  28141. "required": ["messageID", "callID"],
  28142. "additionalProperties": false
  28143. }
  28144. },
  28145. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  28146. "additionalProperties": false
  28147. }
  28148. },
  28149. "required": ["id", "type", "properties"],
  28150. "additionalProperties": false
  28151. },
  28152. "EventPermissionReplied": {
  28153. "type": "object",
  28154. "properties": {
  28155. "id": {
  28156. "type": "string",
  28157. "pattern": "^evt_"
  28158. },
  28159. "type": {
  28160. "type": "string",
  28161. "enum": ["permission.replied"]
  28162. },
  28163. "properties": {
  28164. "type": "object",
  28165. "properties": {
  28166. "sessionID": {
  28167. "type": "string",
  28168. "pattern": "^ses"
  28169. },
  28170. "requestID": {
  28171. "type": "string",
  28172. "pattern": "^per"
  28173. },
  28174. "reply": {
  28175. "type": "string",
  28176. "enum": ["once", "always", "reject"]
  28177. }
  28178. },
  28179. "required": ["sessionID", "requestID", "reply"],
  28180. "additionalProperties": false
  28181. }
  28182. },
  28183. "required": ["id", "type", "properties"],
  28184. "additionalProperties": false
  28185. },
  28186. "EventMcpToolsChanged": {
  28187. "type": "object",
  28188. "properties": {
  28189. "id": {
  28190. "type": "string",
  28191. "pattern": "^evt_"
  28192. },
  28193. "type": {
  28194. "type": "string",
  28195. "enum": ["mcp.tools.changed"]
  28196. },
  28197. "properties": {
  28198. "type": "object",
  28199. "properties": {
  28200. "server": {
  28201. "type": "string"
  28202. }
  28203. },
  28204. "required": ["server"],
  28205. "additionalProperties": false
  28206. }
  28207. },
  28208. "required": ["id", "type", "properties"],
  28209. "additionalProperties": false
  28210. },
  28211. "EventMcpBrowserOpenFailed": {
  28212. "type": "object",
  28213. "properties": {
  28214. "id": {
  28215. "type": "string",
  28216. "pattern": "^evt_"
  28217. },
  28218. "type": {
  28219. "type": "string",
  28220. "enum": ["mcp.browser.open.failed"]
  28221. },
  28222. "properties": {
  28223. "type": "object",
  28224. "properties": {
  28225. "mcpName": {
  28226. "type": "string"
  28227. },
  28228. "url": {
  28229. "type": "string"
  28230. }
  28231. },
  28232. "required": ["mcpName", "url"],
  28233. "additionalProperties": false
  28234. }
  28235. },
  28236. "required": ["id", "type", "properties"],
  28237. "additionalProperties": false
  28238. },
  28239. "EventCommandExecuted": {
  28240. "type": "object",
  28241. "properties": {
  28242. "id": {
  28243. "type": "string",
  28244. "pattern": "^evt_"
  28245. },
  28246. "type": {
  28247. "type": "string",
  28248. "enum": ["command.executed"]
  28249. },
  28250. "properties": {
  28251. "type": "object",
  28252. "properties": {
  28253. "name": {
  28254. "type": "string"
  28255. },
  28256. "sessionID": {
  28257. "type": "string",
  28258. "pattern": "^ses"
  28259. },
  28260. "arguments": {
  28261. "type": "string"
  28262. },
  28263. "messageID": {
  28264. "type": "string",
  28265. "pattern": "^msg"
  28266. }
  28267. },
  28268. "required": ["name", "sessionID", "arguments", "messageID"],
  28269. "additionalProperties": false
  28270. }
  28271. },
  28272. "required": ["id", "type", "properties"],
  28273. "additionalProperties": false
  28274. },
  28275. "EventProjectDirectoriesUpdated": {
  28276. "type": "object",
  28277. "properties": {
  28278. "id": {
  28279. "type": "string",
  28280. "pattern": "^evt_"
  28281. },
  28282. "type": {
  28283. "type": "string",
  28284. "enum": ["project.directories.updated"]
  28285. },
  28286. "properties": {
  28287. "type": "object",
  28288. "properties": {
  28289. "projectID": {
  28290. "type": "string"
  28291. }
  28292. },
  28293. "required": ["projectID"],
  28294. "additionalProperties": false
  28295. }
  28296. },
  28297. "required": ["id", "type", "properties"],
  28298. "additionalProperties": false
  28299. },
  28300. "EventProjectUpdated": {
  28301. "type": "object",
  28302. "properties": {
  28303. "id": {
  28304. "type": "string",
  28305. "pattern": "^evt_"
  28306. },
  28307. "type": {
  28308. "type": "string",
  28309. "enum": ["project.updated"]
  28310. },
  28311. "properties": {
  28312. "type": "object",
  28313. "properties": {
  28314. "id": {
  28315. "type": "string"
  28316. },
  28317. "worktree": {
  28318. "type": "string"
  28319. },
  28320. "vcs": {
  28321. "type": "string",
  28322. "enum": ["git"]
  28323. },
  28324. "name": {
  28325. "type": "string"
  28326. },
  28327. "icon": {
  28328. "type": "object",
  28329. "properties": {
  28330. "url": {
  28331. "type": "string"
  28332. },
  28333. "override": {
  28334. "type": "string"
  28335. },
  28336. "color": {
  28337. "type": "string"
  28338. }
  28339. },
  28340. "additionalProperties": false
  28341. },
  28342. "commands": {
  28343. "type": "object",
  28344. "properties": {
  28345. "start": {
  28346. "type": "string",
  28347. "description": "Startup script to run when creating a new workspace (worktree)"
  28348. }
  28349. },
  28350. "additionalProperties": false
  28351. },
  28352. "time": {
  28353. "type": "object",
  28354. "properties": {
  28355. "created": {
  28356. "type": "integer",
  28357. "minimum": 0
  28358. },
  28359. "updated": {
  28360. "type": "integer",
  28361. "minimum": 0
  28362. },
  28363. "initialized": {
  28364. "type": "integer",
  28365. "minimum": 0
  28366. }
  28367. },
  28368. "required": ["created", "updated"],
  28369. "additionalProperties": false
  28370. },
  28371. "sandboxes": {
  28372. "type": "array",
  28373. "items": {
  28374. "type": "string"
  28375. }
  28376. }
  28377. },
  28378. "required": ["id", "worktree", "time", "sandboxes"],
  28379. "additionalProperties": false
  28380. }
  28381. },
  28382. "required": ["id", "type", "properties"],
  28383. "additionalProperties": false
  28384. },
  28385. "EventVcsBranchUpdated": {
  28386. "type": "object",
  28387. "properties": {
  28388. "id": {
  28389. "type": "string",
  28390. "pattern": "^evt_"
  28391. },
  28392. "type": {
  28393. "type": "string",
  28394. "enum": ["vcs.branch.updated"]
  28395. },
  28396. "properties": {
  28397. "type": "object",
  28398. "properties": {
  28399. "branch": {
  28400. "type": "string"
  28401. }
  28402. },
  28403. "additionalProperties": false
  28404. }
  28405. },
  28406. "required": ["id", "type", "properties"],
  28407. "additionalProperties": false
  28408. },
  28409. "EventQuestionAsked": {
  28410. "type": "object",
  28411. "properties": {
  28412. "id": {
  28413. "type": "string",
  28414. "pattern": "^evt_"
  28415. },
  28416. "type": {
  28417. "type": "string",
  28418. "enum": ["question.asked"]
  28419. },
  28420. "properties": {
  28421. "type": "object",
  28422. "properties": {
  28423. "id": {
  28424. "type": "string",
  28425. "pattern": "^que"
  28426. },
  28427. "sessionID": {
  28428. "type": "string",
  28429. "pattern": "^ses"
  28430. },
  28431. "questions": {
  28432. "type": "array",
  28433. "items": {
  28434. "$ref": "#/components/schemas/QuestionInfo"
  28435. },
  28436. "description": "Questions to ask"
  28437. },
  28438. "tool": {
  28439. "$ref": "#/components/schemas/QuestionTool"
  28440. }
  28441. },
  28442. "required": ["id", "sessionID", "questions"],
  28443. "additionalProperties": false
  28444. }
  28445. },
  28446. "required": ["id", "type", "properties"],
  28447. "additionalProperties": false
  28448. },
  28449. "EventQuestionReplied": {
  28450. "type": "object",
  28451. "properties": {
  28452. "id": {
  28453. "type": "string",
  28454. "pattern": "^evt_"
  28455. },
  28456. "type": {
  28457. "type": "string",
  28458. "enum": ["question.replied"]
  28459. },
  28460. "properties": {
  28461. "type": "object",
  28462. "properties": {
  28463. "sessionID": {
  28464. "type": "string",
  28465. "pattern": "^ses"
  28466. },
  28467. "requestID": {
  28468. "type": "string",
  28469. "pattern": "^que"
  28470. },
  28471. "answers": {
  28472. "type": "array",
  28473. "items": {
  28474. "$ref": "#/components/schemas/QuestionAnswer"
  28475. }
  28476. }
  28477. },
  28478. "required": ["sessionID", "requestID", "answers"],
  28479. "additionalProperties": false
  28480. }
  28481. },
  28482. "required": ["id", "type", "properties"],
  28483. "additionalProperties": false
  28484. },
  28485. "EventQuestionRejected": {
  28486. "type": "object",
  28487. "properties": {
  28488. "id": {
  28489. "type": "string",
  28490. "pattern": "^evt_"
  28491. },
  28492. "type": {
  28493. "type": "string",
  28494. "enum": ["question.rejected"]
  28495. },
  28496. "properties": {
  28497. "type": "object",
  28498. "properties": {
  28499. "sessionID": {
  28500. "type": "string",
  28501. "pattern": "^ses"
  28502. },
  28503. "requestID": {
  28504. "type": "string",
  28505. "pattern": "^que"
  28506. }
  28507. },
  28508. "required": ["sessionID", "requestID"],
  28509. "additionalProperties": false
  28510. }
  28511. },
  28512. "required": ["id", "type", "properties"],
  28513. "additionalProperties": false
  28514. },
  28515. "EventSessionStatus": {
  28516. "type": "object",
  28517. "properties": {
  28518. "id": {
  28519. "type": "string",
  28520. "pattern": "^evt_"
  28521. },
  28522. "type": {
  28523. "type": "string",
  28524. "enum": ["session.status"]
  28525. },
  28526. "properties": {
  28527. "type": "object",
  28528. "properties": {
  28529. "sessionID": {
  28530. "type": "string",
  28531. "pattern": "^ses"
  28532. },
  28533. "status": {
  28534. "$ref": "#/components/schemas/SessionStatus"
  28535. }
  28536. },
  28537. "required": ["sessionID", "status"],
  28538. "additionalProperties": false
  28539. }
  28540. },
  28541. "required": ["id", "type", "properties"],
  28542. "additionalProperties": false
  28543. },
  28544. "EventSessionIdle": {
  28545. "type": "object",
  28546. "properties": {
  28547. "id": {
  28548. "type": "string",
  28549. "pattern": "^evt_"
  28550. },
  28551. "type": {
  28552. "type": "string",
  28553. "enum": ["session.idle"]
  28554. },
  28555. "properties": {
  28556. "type": "object",
  28557. "properties": {
  28558. "sessionID": {
  28559. "type": "string",
  28560. "pattern": "^ses"
  28561. }
  28562. },
  28563. "required": ["sessionID"],
  28564. "additionalProperties": false
  28565. }
  28566. },
  28567. "required": ["id", "type", "properties"],
  28568. "additionalProperties": false
  28569. },
  28570. "EventSessionCompacted": {
  28571. "type": "object",
  28572. "properties": {
  28573. "id": {
  28574. "type": "string",
  28575. "pattern": "^evt_"
  28576. },
  28577. "type": {
  28578. "type": "string",
  28579. "enum": ["session.compacted"]
  28580. },
  28581. "properties": {
  28582. "type": "object",
  28583. "properties": {
  28584. "sessionID": {
  28585. "type": "string",
  28586. "pattern": "^ses"
  28587. }
  28588. },
  28589. "required": ["sessionID"],
  28590. "additionalProperties": false
  28591. }
  28592. },
  28593. "required": ["id", "type", "properties"],
  28594. "additionalProperties": false
  28595. },
  28596. "EventWorktreeReady": {
  28597. "type": "object",
  28598. "properties": {
  28599. "id": {
  28600. "type": "string",
  28601. "pattern": "^evt_"
  28602. },
  28603. "type": {
  28604. "type": "string",
  28605. "enum": ["worktree.ready"]
  28606. },
  28607. "properties": {
  28608. "type": "object",
  28609. "properties": {
  28610. "name": {
  28611. "type": "string"
  28612. },
  28613. "branch": {
  28614. "type": "string"
  28615. }
  28616. },
  28617. "required": ["name"],
  28618. "additionalProperties": false
  28619. }
  28620. },
  28621. "required": ["id", "type", "properties"],
  28622. "additionalProperties": false
  28623. },
  28624. "EventWorktreeFailed": {
  28625. "type": "object",
  28626. "properties": {
  28627. "id": {
  28628. "type": "string",
  28629. "pattern": "^evt_"
  28630. },
  28631. "type": {
  28632. "type": "string",
  28633. "enum": ["worktree.failed"]
  28634. },
  28635. "properties": {
  28636. "type": "object",
  28637. "properties": {
  28638. "message": {
  28639. "type": "string"
  28640. }
  28641. },
  28642. "required": ["message"],
  28643. "additionalProperties": false
  28644. }
  28645. },
  28646. "required": ["id", "type", "properties"],
  28647. "additionalProperties": false
  28648. },
  28649. "EventWorkspaceReady": {
  28650. "type": "object",
  28651. "properties": {
  28652. "id": {
  28653. "type": "string",
  28654. "pattern": "^evt_"
  28655. },
  28656. "type": {
  28657. "type": "string",
  28658. "enum": ["workspace.ready"]
  28659. },
  28660. "properties": {
  28661. "type": "object",
  28662. "properties": {
  28663. "name": {
  28664. "type": "string"
  28665. }
  28666. },
  28667. "required": ["name"],
  28668. "additionalProperties": false
  28669. }
  28670. },
  28671. "required": ["id", "type", "properties"],
  28672. "additionalProperties": false
  28673. },
  28674. "EventWorkspaceFailed": {
  28675. "type": "object",
  28676. "properties": {
  28677. "id": {
  28678. "type": "string",
  28679. "pattern": "^evt_"
  28680. },
  28681. "type": {
  28682. "type": "string",
  28683. "enum": ["workspace.failed"]
  28684. },
  28685. "properties": {
  28686. "type": "object",
  28687. "properties": {
  28688. "message": {
  28689. "type": "string"
  28690. }
  28691. },
  28692. "required": ["message"],
  28693. "additionalProperties": false
  28694. }
  28695. },
  28696. "required": ["id", "type", "properties"],
  28697. "additionalProperties": false
  28698. },
  28699. "EventWorkspaceStatus": {
  28700. "type": "object",
  28701. "properties": {
  28702. "id": {
  28703. "type": "string",
  28704. "pattern": "^evt_"
  28705. },
  28706. "type": {
  28707. "type": "string",
  28708. "enum": ["workspace.status"]
  28709. },
  28710. "properties": {
  28711. "type": "object",
  28712. "properties": {
  28713. "workspaceID": {
  28714. "type": "string",
  28715. "pattern": "^wrk"
  28716. },
  28717. "status": {
  28718. "type": "string",
  28719. "enum": ["connected", "connecting", "disconnected", "error"]
  28720. }
  28721. },
  28722. "required": ["workspaceID", "status"],
  28723. "additionalProperties": false
  28724. }
  28725. },
  28726. "required": ["id", "type", "properties"],
  28727. "additionalProperties": false
  28728. },
  28729. "EventServerConnected": {
  28730. "type": "object",
  28731. "properties": {
  28732. "id": {
  28733. "type": "string",
  28734. "pattern": "^evt_"
  28735. },
  28736. "type": {
  28737. "type": "string",
  28738. "enum": ["server.connected"]
  28739. },
  28740. "properties": {
  28741. "type": "object",
  28742. "properties": {}
  28743. }
  28744. },
  28745. "required": ["id", "type", "properties"],
  28746. "additionalProperties": false
  28747. },
  28748. "EventGlobalDisposed": {
  28749. "type": "object",
  28750. "properties": {
  28751. "id": {
  28752. "type": "string",
  28753. "pattern": "^evt_"
  28754. },
  28755. "type": {
  28756. "type": "string",
  28757. "enum": ["global.disposed"]
  28758. },
  28759. "properties": {
  28760. "type": "object",
  28761. "properties": {}
  28762. }
  28763. },
  28764. "required": ["id", "type", "properties"],
  28765. "additionalProperties": false
  28766. },
  28767. "BadRequestError": {
  28768. "type": "object",
  28769. "required": ["name", "data"],
  28770. "properties": {
  28771. "name": {
  28772. "type": "string",
  28773. "enum": ["BadRequest"]
  28774. },
  28775. "data": {
  28776. "type": "object",
  28777. "required": ["message"],
  28778. "properties": {
  28779. "message": {
  28780. "type": "string"
  28781. },
  28782. "kind": {
  28783. "type": "string",
  28784. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  28785. }
  28786. }
  28787. }
  28788. }
  28789. }
  28790. }
  28791. },
  28792. "security": [],
  28793. "tags": [
  28794. {
  28795. "name": "control",
  28796. "description": "Control plane routes."
  28797. },
  28798. {
  28799. "name": "controlPlane",
  28800. "description": "Control-plane orchestration routes."
  28801. },
  28802. {
  28803. "name": "global",
  28804. "description": "Global server routes."
  28805. },
  28806. {
  28807. "name": "event",
  28808. "description": "Instance event stream route."
  28809. },
  28810. {
  28811. "name": "config",
  28812. "description": "Experimental HttpApi config routes."
  28813. },
  28814. {
  28815. "name": "experimental",
  28816. "description": "Experimental HttpApi read-only routes."
  28817. },
  28818. {
  28819. "name": "file",
  28820. "description": "Experimental HttpApi file routes."
  28821. },
  28822. {
  28823. "name": "instance",
  28824. "description": "Experimental HttpApi instance read routes."
  28825. },
  28826. {
  28827. "name": "mcp",
  28828. "description": "Experimental HttpApi MCP routes."
  28829. },
  28830. {
  28831. "name": "project",
  28832. "description": "Experimental HttpApi project routes."
  28833. },
  28834. {
  28835. "name": "projectCopy",
  28836. "description": "Project copy management routes."
  28837. },
  28838. {
  28839. "name": "pty",
  28840. "description": "Experimental HttpApi PTY routes."
  28841. },
  28842. {
  28843. "name": "question",
  28844. "description": "Question routes."
  28845. },
  28846. {
  28847. "name": "permission",
  28848. "description": "Experimental HttpApi permission routes."
  28849. },
  28850. {
  28851. "name": "provider",
  28852. "description": "Experimental HttpApi provider routes."
  28853. },
  28854. {
  28855. "name": "session",
  28856. "description": "Experimental HttpApi session routes."
  28857. },
  28858. {
  28859. "name": "sync",
  28860. "description": "Experimental HttpApi sync routes."
  28861. },
  28862. {
  28863. "name": "tui",
  28864. "description": "Experimental HttpApi TUI routes."
  28865. },
  28866. {
  28867. "name": "workspace",
  28868. "description": "Experimental HttpApi workspace routes."
  28869. },
  28870. {
  28871. "name": "opencode HttpApi",
  28872. "description": "Experimental HttpApi surface for selected instance routes."
  28873. },
  28874. {
  28875. "name": "opencode HttpApi",
  28876. "description": "Experimental HttpApi surface for selected instance routes."
  28877. },
  28878. {
  28879. "name": "sessions",
  28880. "description": "Experimental session routes."
  28881. },
  28882. {
  28883. "name": "messages",
  28884. "description": "Experimental message routes."
  28885. },
  28886. {
  28887. "name": "models",
  28888. "description": "Experimental model routes."
  28889. },
  28890. {
  28891. "name": "providers",
  28892. "description": "Experimental provider routes."
  28893. },
  28894. {
  28895. "name": "permissions",
  28896. "description": "Experimental permission routes."
  28897. },
  28898. {
  28899. "name": "filesystem",
  28900. "description": "Experimental location-scoped filesystem routes."
  28901. },
  28902. {
  28903. "name": "commands",
  28904. "description": "Experimental command routes."
  28905. },
  28906. {
  28907. "name": "skills",
  28908. "description": "Experimental skill routes."
  28909. },
  28910. {
  28911. "name": "events",
  28912. "description": "Experimental event stream route."
  28913. },
  28914. {
  28915. "name": "session questions",
  28916. "description": "Experimental session question routes."
  28917. },
  28918. {
  28919. "name": "reference",
  28920. "description": "Location-scoped project references."
  28921. },
  28922. {
  28923. "name": "pty",
  28924. "description": "PTY websocket route."
  28925. }
  28926. ]
  28927. }