openapi.json 820 KB

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