openapi.json 793 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008
  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": "directory",
  3995. "in": "query",
  3996. "schema": {
  3997. "type": "string"
  3998. },
  3999. "required": false
  4000. },
  4001. {
  4002. "name": "workspace",
  4003. "in": "query",
  4004. "schema": {
  4005. "type": "string"
  4006. },
  4007. "required": false
  4008. }
  4009. ],
  4010. "responses": {
  4011. "204": {
  4012. "description": "Project copy removed"
  4013. },
  4014. "400": {
  4015. "description": "ProjectCopyError | InvalidRequestError",
  4016. "content": {
  4017. "application/json": {
  4018. "schema": {
  4019. "anyOf": [
  4020. {
  4021. "$ref": "#/components/schemas/ProjectCopyError"
  4022. },
  4023. {
  4024. "$ref": "#/components/schemas/InvalidRequestError"
  4025. }
  4026. ]
  4027. }
  4028. }
  4029. }
  4030. }
  4031. },
  4032. "description": "Remove a local physical copy of a project using the selected strategy.",
  4033. "summary": "Remove project copy",
  4034. "requestBody": {
  4035. "content": {
  4036. "application/json": {
  4037. "schema": {
  4038. "type": "object",
  4039. "properties": {
  4040. "directory": {
  4041. "type": "string"
  4042. }
  4043. },
  4044. "required": ["directory"],
  4045. "additionalProperties": false
  4046. }
  4047. }
  4048. }
  4049. },
  4050. "x-codeSamples": [
  4051. {
  4052. "lang": "js",
  4053. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  4054. }
  4055. ]
  4056. }
  4057. },
  4058. "/experimental/project/{projectID}/copy/refresh": {
  4059. "post": {
  4060. "tags": ["projectCopy"],
  4061. "operationId": "experimental.projectCopy.refresh",
  4062. "parameters": [
  4063. {
  4064. "name": "projectID",
  4065. "in": "path",
  4066. "schema": {
  4067. "type": "string"
  4068. },
  4069. "required": true
  4070. },
  4071. {
  4072. "name": "directory",
  4073. "in": "query",
  4074. "schema": {
  4075. "type": "string"
  4076. },
  4077. "required": false
  4078. },
  4079. {
  4080. "name": "workspace",
  4081. "in": "query",
  4082. "schema": {
  4083. "type": "string"
  4084. },
  4085. "required": false
  4086. }
  4087. ],
  4088. "responses": {
  4089. "204": {
  4090. "description": "Project copies refreshed"
  4091. },
  4092. "400": {
  4093. "description": "ProjectCopyError | InvalidRequestError",
  4094. "content": {
  4095. "application/json": {
  4096. "schema": {
  4097. "anyOf": [
  4098. {
  4099. "$ref": "#/components/schemas/ProjectCopyError"
  4100. },
  4101. {
  4102. "$ref": "#/components/schemas/InvalidRequestError"
  4103. }
  4104. ]
  4105. }
  4106. }
  4107. }
  4108. }
  4109. },
  4110. "description": "Discover local project copies using one or all configured strategies.",
  4111. "summary": "Refresh project copies",
  4112. "x-codeSamples": [
  4113. {
  4114. "lang": "js",
  4115. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  4116. }
  4117. ]
  4118. }
  4119. },
  4120. "/pty/shells": {
  4121. "get": {
  4122. "tags": ["pty"],
  4123. "operationId": "pty.shells",
  4124. "parameters": [
  4125. {
  4126. "name": "directory",
  4127. "in": "query",
  4128. "schema": {
  4129. "type": "string"
  4130. },
  4131. "required": false
  4132. },
  4133. {
  4134. "name": "workspace",
  4135. "in": "query",
  4136. "schema": {
  4137. "type": "string"
  4138. },
  4139. "required": false
  4140. }
  4141. ],
  4142. "responses": {
  4143. "200": {
  4144. "description": "List of shells",
  4145. "content": {
  4146. "application/json": {
  4147. "schema": {
  4148. "type": "array",
  4149. "items": {
  4150. "type": "object",
  4151. "properties": {
  4152. "path": {
  4153. "type": "string"
  4154. },
  4155. "name": {
  4156. "type": "string"
  4157. },
  4158. "acceptable": {
  4159. "type": "boolean"
  4160. }
  4161. },
  4162. "required": ["path", "name", "acceptable"],
  4163. "additionalProperties": false
  4164. },
  4165. "description": "List of shells"
  4166. }
  4167. }
  4168. }
  4169. },
  4170. "400": {
  4171. "description": "Bad request",
  4172. "content": {
  4173. "application/json": {
  4174. "schema": {
  4175. "$ref": "#/components/schemas/BadRequestError"
  4176. }
  4177. }
  4178. }
  4179. }
  4180. },
  4181. "description": "Get a list of available shells on the system.",
  4182. "summary": "List available shells",
  4183. "x-codeSamples": [
  4184. {
  4185. "lang": "js",
  4186. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4187. }
  4188. ]
  4189. }
  4190. },
  4191. "/pty": {
  4192. "get": {
  4193. "tags": ["pty"],
  4194. "operationId": "pty.list",
  4195. "parameters": [
  4196. {
  4197. "name": "directory",
  4198. "in": "query",
  4199. "schema": {
  4200. "type": "string"
  4201. },
  4202. "required": false
  4203. },
  4204. {
  4205. "name": "workspace",
  4206. "in": "query",
  4207. "schema": {
  4208. "type": "string"
  4209. },
  4210. "required": false
  4211. }
  4212. ],
  4213. "responses": {
  4214. "200": {
  4215. "description": "List of sessions",
  4216. "content": {
  4217. "application/json": {
  4218. "schema": {
  4219. "type": "array",
  4220. "items": {
  4221. "$ref": "#/components/schemas/Pty"
  4222. },
  4223. "description": "List of sessions"
  4224. }
  4225. }
  4226. }
  4227. },
  4228. "400": {
  4229. "description": "Bad request",
  4230. "content": {
  4231. "application/json": {
  4232. "schema": {
  4233. "$ref": "#/components/schemas/BadRequestError"
  4234. }
  4235. }
  4236. }
  4237. }
  4238. },
  4239. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4240. "summary": "List PTY sessions",
  4241. "x-codeSamples": [
  4242. {
  4243. "lang": "js",
  4244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4245. }
  4246. ]
  4247. },
  4248. "post": {
  4249. "tags": ["pty"],
  4250. "operationId": "pty.create",
  4251. "parameters": [
  4252. {
  4253. "name": "directory",
  4254. "in": "query",
  4255. "schema": {
  4256. "type": "string"
  4257. },
  4258. "required": false
  4259. },
  4260. {
  4261. "name": "workspace",
  4262. "in": "query",
  4263. "schema": {
  4264. "type": "string"
  4265. },
  4266. "required": false
  4267. }
  4268. ],
  4269. "responses": {
  4270. "200": {
  4271. "description": "Created session",
  4272. "content": {
  4273. "application/json": {
  4274. "schema": {
  4275. "$ref": "#/components/schemas/Pty"
  4276. }
  4277. }
  4278. }
  4279. },
  4280. "400": {
  4281. "description": "BadRequest | InvalidRequestError",
  4282. "content": {
  4283. "application/json": {
  4284. "schema": {
  4285. "anyOf": [
  4286. {
  4287. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4288. },
  4289. {
  4290. "$ref": "#/components/schemas/InvalidRequestError"
  4291. }
  4292. ]
  4293. }
  4294. }
  4295. }
  4296. }
  4297. },
  4298. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4299. "summary": "Create PTY session",
  4300. "requestBody": {
  4301. "content": {
  4302. "application/json": {
  4303. "schema": {
  4304. "type": "object",
  4305. "properties": {
  4306. "command": {
  4307. "type": "string"
  4308. },
  4309. "args": {
  4310. "type": "array",
  4311. "items": {
  4312. "type": "string"
  4313. }
  4314. },
  4315. "cwd": {
  4316. "type": "string"
  4317. },
  4318. "title": {
  4319. "type": "string"
  4320. },
  4321. "env": {
  4322. "type": "object",
  4323. "additionalProperties": {
  4324. "type": "string"
  4325. }
  4326. }
  4327. },
  4328. "additionalProperties": false
  4329. }
  4330. }
  4331. }
  4332. },
  4333. "x-codeSamples": [
  4334. {
  4335. "lang": "js",
  4336. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4337. }
  4338. ]
  4339. }
  4340. },
  4341. "/pty/{ptyID}": {
  4342. "get": {
  4343. "tags": ["pty"],
  4344. "operationId": "pty.get",
  4345. "parameters": [
  4346. {
  4347. "name": "ptyID",
  4348. "in": "path",
  4349. "schema": {
  4350. "type": "string",
  4351. "pattern": "^pty"
  4352. },
  4353. "required": true
  4354. },
  4355. {
  4356. "name": "directory",
  4357. "in": "query",
  4358. "schema": {
  4359. "type": "string"
  4360. },
  4361. "required": false
  4362. },
  4363. {
  4364. "name": "workspace",
  4365. "in": "query",
  4366. "schema": {
  4367. "type": "string"
  4368. },
  4369. "required": false
  4370. }
  4371. ],
  4372. "responses": {
  4373. "200": {
  4374. "description": "Session info",
  4375. "content": {
  4376. "application/json": {
  4377. "schema": {
  4378. "$ref": "#/components/schemas/Pty"
  4379. }
  4380. }
  4381. }
  4382. },
  4383. "400": {
  4384. "description": "Bad request",
  4385. "content": {
  4386. "application/json": {
  4387. "schema": {
  4388. "$ref": "#/components/schemas/BadRequestError"
  4389. }
  4390. }
  4391. }
  4392. },
  4393. "404": {
  4394. "description": "PtyNotFoundError",
  4395. "content": {
  4396. "application/json": {
  4397. "schema": {
  4398. "$ref": "#/components/schemas/PtyNotFoundError"
  4399. }
  4400. }
  4401. }
  4402. }
  4403. },
  4404. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4405. "summary": "Get PTY session",
  4406. "x-codeSamples": [
  4407. {
  4408. "lang": "js",
  4409. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4410. }
  4411. ]
  4412. },
  4413. "put": {
  4414. "tags": ["pty"],
  4415. "operationId": "pty.update",
  4416. "parameters": [
  4417. {
  4418. "name": "ptyID",
  4419. "in": "path",
  4420. "schema": {
  4421. "type": "string",
  4422. "pattern": "^pty"
  4423. },
  4424. "required": true
  4425. },
  4426. {
  4427. "name": "directory",
  4428. "in": "query",
  4429. "schema": {
  4430. "type": "string"
  4431. },
  4432. "required": false
  4433. },
  4434. {
  4435. "name": "workspace",
  4436. "in": "query",
  4437. "schema": {
  4438. "type": "string"
  4439. },
  4440. "required": false
  4441. }
  4442. ],
  4443. "responses": {
  4444. "200": {
  4445. "description": "Updated session",
  4446. "content": {
  4447. "application/json": {
  4448. "schema": {
  4449. "$ref": "#/components/schemas/Pty"
  4450. }
  4451. }
  4452. }
  4453. },
  4454. "400": {
  4455. "description": "BadRequest | InvalidRequestError",
  4456. "content": {
  4457. "application/json": {
  4458. "schema": {
  4459. "anyOf": [
  4460. {
  4461. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4462. },
  4463. {
  4464. "$ref": "#/components/schemas/InvalidRequestError"
  4465. }
  4466. ]
  4467. }
  4468. }
  4469. }
  4470. },
  4471. "404": {
  4472. "description": "PtyNotFoundError",
  4473. "content": {
  4474. "application/json": {
  4475. "schema": {
  4476. "$ref": "#/components/schemas/PtyNotFoundError"
  4477. }
  4478. }
  4479. }
  4480. }
  4481. },
  4482. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4483. "summary": "Update PTY session",
  4484. "requestBody": {
  4485. "content": {
  4486. "application/json": {
  4487. "schema": {
  4488. "type": "object",
  4489. "properties": {
  4490. "title": {
  4491. "type": "string"
  4492. },
  4493. "size": {
  4494. "type": "object",
  4495. "properties": {
  4496. "rows": {
  4497. "type": "integer",
  4498. "exclusiveMinimum": 0
  4499. },
  4500. "cols": {
  4501. "type": "integer",
  4502. "exclusiveMinimum": 0
  4503. }
  4504. },
  4505. "required": ["rows", "cols"],
  4506. "additionalProperties": false
  4507. }
  4508. },
  4509. "additionalProperties": false
  4510. }
  4511. }
  4512. }
  4513. },
  4514. "x-codeSamples": [
  4515. {
  4516. "lang": "js",
  4517. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4518. }
  4519. ]
  4520. },
  4521. "delete": {
  4522. "tags": ["pty"],
  4523. "operationId": "pty.remove",
  4524. "parameters": [
  4525. {
  4526. "name": "ptyID",
  4527. "in": "path",
  4528. "schema": {
  4529. "type": "string",
  4530. "pattern": "^pty"
  4531. },
  4532. "required": true
  4533. },
  4534. {
  4535. "name": "directory",
  4536. "in": "query",
  4537. "schema": {
  4538. "type": "string"
  4539. },
  4540. "required": false
  4541. },
  4542. {
  4543. "name": "workspace",
  4544. "in": "query",
  4545. "schema": {
  4546. "type": "string"
  4547. },
  4548. "required": false
  4549. }
  4550. ],
  4551. "responses": {
  4552. "200": {
  4553. "description": "Session removed",
  4554. "content": {
  4555. "application/json": {
  4556. "schema": {
  4557. "type": "boolean",
  4558. "description": "Session removed"
  4559. }
  4560. }
  4561. }
  4562. },
  4563. "400": {
  4564. "description": "Bad request",
  4565. "content": {
  4566. "application/json": {
  4567. "schema": {
  4568. "$ref": "#/components/schemas/BadRequestError"
  4569. }
  4570. }
  4571. }
  4572. },
  4573. "404": {
  4574. "description": "PtyNotFoundError",
  4575. "content": {
  4576. "application/json": {
  4577. "schema": {
  4578. "$ref": "#/components/schemas/PtyNotFoundError"
  4579. }
  4580. }
  4581. }
  4582. }
  4583. },
  4584. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4585. "summary": "Remove PTY session",
  4586. "x-codeSamples": [
  4587. {
  4588. "lang": "js",
  4589. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4590. }
  4591. ]
  4592. }
  4593. },
  4594. "/pty/{ptyID}/connect-token": {
  4595. "post": {
  4596. "tags": ["pty"],
  4597. "operationId": "pty.connectToken",
  4598. "parameters": [
  4599. {
  4600. "name": "ptyID",
  4601. "in": "path",
  4602. "schema": {
  4603. "type": "string",
  4604. "pattern": "^pty"
  4605. },
  4606. "required": true
  4607. },
  4608. {
  4609. "name": "directory",
  4610. "in": "query",
  4611. "schema": {
  4612. "type": "string"
  4613. },
  4614. "required": false
  4615. },
  4616. {
  4617. "name": "workspace",
  4618. "in": "query",
  4619. "schema": {
  4620. "type": "string"
  4621. },
  4622. "required": false
  4623. }
  4624. ],
  4625. "responses": {
  4626. "200": {
  4627. "description": "WebSocket connect token",
  4628. "content": {
  4629. "application/json": {
  4630. "schema": {
  4631. "type": "object",
  4632. "properties": {
  4633. "ticket": {
  4634. "type": "string"
  4635. },
  4636. "expires_in": {
  4637. "type": "integer",
  4638. "exclusiveMinimum": 0
  4639. }
  4640. },
  4641. "required": ["ticket", "expires_in"],
  4642. "additionalProperties": false,
  4643. "description": "WebSocket connect token"
  4644. }
  4645. }
  4646. }
  4647. },
  4648. "400": {
  4649. "description": "Bad request",
  4650. "content": {
  4651. "application/json": {
  4652. "schema": {
  4653. "$ref": "#/components/schemas/BadRequestError"
  4654. }
  4655. }
  4656. }
  4657. },
  4658. "403": {
  4659. "description": "PtyForbiddenError",
  4660. "content": {
  4661. "application/json": {
  4662. "schema": {
  4663. "$ref": "#/components/schemas/PtyForbiddenError"
  4664. }
  4665. }
  4666. }
  4667. },
  4668. "404": {
  4669. "description": "PtyNotFoundError",
  4670. "content": {
  4671. "application/json": {
  4672. "schema": {
  4673. "$ref": "#/components/schemas/PtyNotFoundError"
  4674. }
  4675. }
  4676. }
  4677. }
  4678. },
  4679. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4680. "summary": "Create PTY WebSocket token",
  4681. "x-codeSamples": [
  4682. {
  4683. "lang": "js",
  4684. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4685. }
  4686. ]
  4687. }
  4688. },
  4689. "/question": {
  4690. "get": {
  4691. "tags": ["question"],
  4692. "operationId": "question.list",
  4693. "parameters": [
  4694. {
  4695. "name": "directory",
  4696. "in": "query",
  4697. "schema": {
  4698. "type": "string"
  4699. },
  4700. "required": false
  4701. },
  4702. {
  4703. "name": "workspace",
  4704. "in": "query",
  4705. "schema": {
  4706. "type": "string"
  4707. },
  4708. "required": false
  4709. }
  4710. ],
  4711. "responses": {
  4712. "200": {
  4713. "description": "List of pending questions",
  4714. "content": {
  4715. "application/json": {
  4716. "schema": {
  4717. "type": "array",
  4718. "items": {
  4719. "$ref": "#/components/schemas/QuestionRequest"
  4720. },
  4721. "description": "List of pending questions"
  4722. }
  4723. }
  4724. }
  4725. },
  4726. "400": {
  4727. "description": "Bad request",
  4728. "content": {
  4729. "application/json": {
  4730. "schema": {
  4731. "$ref": "#/components/schemas/BadRequestError"
  4732. }
  4733. }
  4734. }
  4735. }
  4736. },
  4737. "description": "Get all pending question requests across all sessions.",
  4738. "summary": "List pending questions",
  4739. "x-codeSamples": [
  4740. {
  4741. "lang": "js",
  4742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4743. }
  4744. ]
  4745. }
  4746. },
  4747. "/question/{requestID}/reply": {
  4748. "post": {
  4749. "tags": ["question"],
  4750. "operationId": "question.reply",
  4751. "parameters": [
  4752. {
  4753. "name": "requestID",
  4754. "in": "path",
  4755. "schema": {
  4756. "type": "string",
  4757. "pattern": "^que"
  4758. },
  4759. "required": true
  4760. },
  4761. {
  4762. "name": "directory",
  4763. "in": "query",
  4764. "schema": {
  4765. "type": "string"
  4766. },
  4767. "required": false
  4768. },
  4769. {
  4770. "name": "workspace",
  4771. "in": "query",
  4772. "schema": {
  4773. "type": "string"
  4774. },
  4775. "required": false
  4776. }
  4777. ],
  4778. "responses": {
  4779. "200": {
  4780. "description": "Question answered successfully",
  4781. "content": {
  4782. "application/json": {
  4783. "schema": {
  4784. "type": "boolean",
  4785. "description": "Question answered successfully"
  4786. }
  4787. }
  4788. }
  4789. },
  4790. "400": {
  4791. "description": "BadRequest | InvalidRequestError",
  4792. "content": {
  4793. "application/json": {
  4794. "schema": {
  4795. "anyOf": [
  4796. {
  4797. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4798. },
  4799. {
  4800. "$ref": "#/components/schemas/InvalidRequestError"
  4801. }
  4802. ]
  4803. }
  4804. }
  4805. }
  4806. },
  4807. "404": {
  4808. "description": "QuestionNotFoundError",
  4809. "content": {
  4810. "application/json": {
  4811. "schema": {
  4812. "$ref": "#/components/schemas/QuestionNotFoundError"
  4813. }
  4814. }
  4815. }
  4816. }
  4817. },
  4818. "description": "Provide answers to a question request from the AI assistant.",
  4819. "summary": "Reply to question request",
  4820. "requestBody": {
  4821. "content": {
  4822. "application/json": {
  4823. "schema": {
  4824. "type": "object",
  4825. "properties": {
  4826. "answers": {
  4827. "type": "array",
  4828. "items": {
  4829. "$ref": "#/components/schemas/QuestionAnswer"
  4830. },
  4831. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4832. }
  4833. },
  4834. "required": ["answers"],
  4835. "additionalProperties": false
  4836. }
  4837. }
  4838. }
  4839. },
  4840. "x-codeSamples": [
  4841. {
  4842. "lang": "js",
  4843. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4844. }
  4845. ]
  4846. }
  4847. },
  4848. "/question/{requestID}/reject": {
  4849. "post": {
  4850. "tags": ["question"],
  4851. "operationId": "question.reject",
  4852. "parameters": [
  4853. {
  4854. "name": "requestID",
  4855. "in": "path",
  4856. "schema": {
  4857. "type": "string",
  4858. "pattern": "^que"
  4859. },
  4860. "required": true
  4861. },
  4862. {
  4863. "name": "directory",
  4864. "in": "query",
  4865. "schema": {
  4866. "type": "string"
  4867. },
  4868. "required": false
  4869. },
  4870. {
  4871. "name": "workspace",
  4872. "in": "query",
  4873. "schema": {
  4874. "type": "string"
  4875. },
  4876. "required": false
  4877. }
  4878. ],
  4879. "responses": {
  4880. "200": {
  4881. "description": "Question rejected successfully",
  4882. "content": {
  4883. "application/json": {
  4884. "schema": {
  4885. "type": "boolean",
  4886. "description": "Question rejected successfully"
  4887. }
  4888. }
  4889. }
  4890. },
  4891. "400": {
  4892. "description": "BadRequest | InvalidRequestError",
  4893. "content": {
  4894. "application/json": {
  4895. "schema": {
  4896. "anyOf": [
  4897. {
  4898. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4899. },
  4900. {
  4901. "$ref": "#/components/schemas/InvalidRequestError"
  4902. }
  4903. ]
  4904. }
  4905. }
  4906. }
  4907. },
  4908. "404": {
  4909. "description": "QuestionNotFoundError",
  4910. "content": {
  4911. "application/json": {
  4912. "schema": {
  4913. "$ref": "#/components/schemas/QuestionNotFoundError"
  4914. }
  4915. }
  4916. }
  4917. }
  4918. },
  4919. "description": "Reject a question request from the AI assistant.",
  4920. "summary": "Reject question request",
  4921. "x-codeSamples": [
  4922. {
  4923. "lang": "js",
  4924. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4925. }
  4926. ]
  4927. }
  4928. },
  4929. "/permission": {
  4930. "get": {
  4931. "tags": ["permission"],
  4932. "operationId": "permission.list",
  4933. "parameters": [
  4934. {
  4935. "name": "directory",
  4936. "in": "query",
  4937. "schema": {
  4938. "type": "string"
  4939. },
  4940. "required": false
  4941. },
  4942. {
  4943. "name": "workspace",
  4944. "in": "query",
  4945. "schema": {
  4946. "type": "string"
  4947. },
  4948. "required": false
  4949. }
  4950. ],
  4951. "responses": {
  4952. "200": {
  4953. "description": "List of pending permissions",
  4954. "content": {
  4955. "application/json": {
  4956. "schema": {
  4957. "type": "array",
  4958. "items": {
  4959. "$ref": "#/components/schemas/PermissionRequest"
  4960. },
  4961. "description": "List of pending permissions"
  4962. }
  4963. }
  4964. }
  4965. },
  4966. "400": {
  4967. "description": "Bad request",
  4968. "content": {
  4969. "application/json": {
  4970. "schema": {
  4971. "$ref": "#/components/schemas/BadRequestError"
  4972. }
  4973. }
  4974. }
  4975. }
  4976. },
  4977. "description": "Get all pending permission requests across all sessions.",
  4978. "summary": "List pending permissions",
  4979. "x-codeSamples": [
  4980. {
  4981. "lang": "js",
  4982. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4983. }
  4984. ]
  4985. }
  4986. },
  4987. "/permission/{requestID}/reply": {
  4988. "post": {
  4989. "tags": ["permission"],
  4990. "operationId": "permission.reply",
  4991. "parameters": [
  4992. {
  4993. "name": "requestID",
  4994. "in": "path",
  4995. "schema": {
  4996. "type": "string",
  4997. "pattern": "^per"
  4998. },
  4999. "required": true
  5000. },
  5001. {
  5002. "name": "directory",
  5003. "in": "query",
  5004. "schema": {
  5005. "type": "string"
  5006. },
  5007. "required": false
  5008. },
  5009. {
  5010. "name": "workspace",
  5011. "in": "query",
  5012. "schema": {
  5013. "type": "string"
  5014. },
  5015. "required": false
  5016. }
  5017. ],
  5018. "responses": {
  5019. "200": {
  5020. "description": "Permission processed successfully",
  5021. "content": {
  5022. "application/json": {
  5023. "schema": {
  5024. "type": "boolean",
  5025. "description": "Permission processed successfully"
  5026. }
  5027. }
  5028. }
  5029. },
  5030. "400": {
  5031. "description": "BadRequest | InvalidRequestError",
  5032. "content": {
  5033. "application/json": {
  5034. "schema": {
  5035. "anyOf": [
  5036. {
  5037. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5038. },
  5039. {
  5040. "$ref": "#/components/schemas/InvalidRequestError"
  5041. }
  5042. ]
  5043. }
  5044. }
  5045. }
  5046. },
  5047. "404": {
  5048. "description": "PermissionNotFoundError",
  5049. "content": {
  5050. "application/json": {
  5051. "schema": {
  5052. "$ref": "#/components/schemas/PermissionNotFoundError"
  5053. }
  5054. }
  5055. }
  5056. }
  5057. },
  5058. "description": "Approve or deny a permission request from the AI assistant.",
  5059. "summary": "Respond to permission request",
  5060. "requestBody": {
  5061. "content": {
  5062. "application/json": {
  5063. "schema": {
  5064. "type": "object",
  5065. "properties": {
  5066. "reply": {
  5067. "type": "string",
  5068. "enum": ["once", "always", "reject"]
  5069. },
  5070. "message": {
  5071. "type": "string"
  5072. }
  5073. },
  5074. "required": ["reply"],
  5075. "additionalProperties": false
  5076. }
  5077. }
  5078. }
  5079. },
  5080. "x-codeSamples": [
  5081. {
  5082. "lang": "js",
  5083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  5084. }
  5085. ]
  5086. }
  5087. },
  5088. "/provider": {
  5089. "get": {
  5090. "tags": ["provider"],
  5091. "operationId": "provider.list",
  5092. "parameters": [
  5093. {
  5094. "name": "directory",
  5095. "in": "query",
  5096. "schema": {
  5097. "type": "string"
  5098. },
  5099. "required": false
  5100. },
  5101. {
  5102. "name": "workspace",
  5103. "in": "query",
  5104. "schema": {
  5105. "type": "string"
  5106. },
  5107. "required": false
  5108. }
  5109. ],
  5110. "responses": {
  5111. "200": {
  5112. "description": "List of providers",
  5113. "content": {
  5114. "application/json": {
  5115. "schema": {
  5116. "type": "object",
  5117. "properties": {
  5118. "all": {
  5119. "type": "array",
  5120. "items": {
  5121. "$ref": "#/components/schemas/Provider"
  5122. }
  5123. },
  5124. "default": {
  5125. "type": "object",
  5126. "additionalProperties": {
  5127. "type": "string"
  5128. }
  5129. },
  5130. "connected": {
  5131. "type": "array",
  5132. "items": {
  5133. "type": "string"
  5134. }
  5135. }
  5136. },
  5137. "required": ["all", "default", "connected"],
  5138. "additionalProperties": false,
  5139. "description": "List of providers"
  5140. }
  5141. }
  5142. }
  5143. },
  5144. "400": {
  5145. "description": "Bad request",
  5146. "content": {
  5147. "application/json": {
  5148. "schema": {
  5149. "$ref": "#/components/schemas/BadRequestError"
  5150. }
  5151. }
  5152. }
  5153. }
  5154. },
  5155. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5156. "summary": "List providers",
  5157. "x-codeSamples": [
  5158. {
  5159. "lang": "js",
  5160. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5161. }
  5162. ]
  5163. }
  5164. },
  5165. "/provider/auth": {
  5166. "get": {
  5167. "tags": ["provider"],
  5168. "operationId": "provider.auth",
  5169. "parameters": [
  5170. {
  5171. "name": "directory",
  5172. "in": "query",
  5173. "schema": {
  5174. "type": "string"
  5175. },
  5176. "required": false
  5177. },
  5178. {
  5179. "name": "workspace",
  5180. "in": "query",
  5181. "schema": {
  5182. "type": "string"
  5183. },
  5184. "required": false
  5185. }
  5186. ],
  5187. "responses": {
  5188. "200": {
  5189. "description": "Provider auth methods",
  5190. "content": {
  5191. "application/json": {
  5192. "schema": {
  5193. "type": "object",
  5194. "additionalProperties": {
  5195. "type": "array",
  5196. "items": {
  5197. "$ref": "#/components/schemas/ProviderAuthMethod"
  5198. }
  5199. },
  5200. "description": "Provider auth methods"
  5201. }
  5202. }
  5203. }
  5204. },
  5205. "400": {
  5206. "description": "Bad request",
  5207. "content": {
  5208. "application/json": {
  5209. "schema": {
  5210. "$ref": "#/components/schemas/BadRequestError"
  5211. }
  5212. }
  5213. }
  5214. }
  5215. },
  5216. "description": "Retrieve available authentication methods for all AI providers.",
  5217. "summary": "Get provider auth methods",
  5218. "x-codeSamples": [
  5219. {
  5220. "lang": "js",
  5221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5222. }
  5223. ]
  5224. }
  5225. },
  5226. "/provider/{providerID}/oauth/authorize": {
  5227. "post": {
  5228. "tags": ["provider"],
  5229. "operationId": "provider.oauth.authorize",
  5230. "parameters": [
  5231. {
  5232. "name": "providerID",
  5233. "in": "path",
  5234. "schema": {
  5235. "type": "string"
  5236. },
  5237. "required": true
  5238. },
  5239. {
  5240. "name": "directory",
  5241. "in": "query",
  5242. "schema": {
  5243. "type": "string"
  5244. },
  5245. "required": false
  5246. },
  5247. {
  5248. "name": "workspace",
  5249. "in": "query",
  5250. "schema": {
  5251. "type": "string"
  5252. },
  5253. "required": false
  5254. }
  5255. ],
  5256. "responses": {
  5257. "200": {
  5258. "description": "Authorization URL and method",
  5259. "content": {
  5260. "application/json": {
  5261. "schema": {
  5262. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5263. }
  5264. }
  5265. }
  5266. },
  5267. "400": {
  5268. "description": "ProviderAuthError | InvalidRequestError",
  5269. "content": {
  5270. "application/json": {
  5271. "schema": {
  5272. "anyOf": [
  5273. {
  5274. "$ref": "#/components/schemas/ProviderAuthError1"
  5275. },
  5276. {
  5277. "$ref": "#/components/schemas/InvalidRequestError"
  5278. }
  5279. ]
  5280. }
  5281. }
  5282. }
  5283. }
  5284. },
  5285. "description": "Start the OAuth authorization flow for a provider.",
  5286. "summary": "Start OAuth authorization",
  5287. "requestBody": {
  5288. "content": {
  5289. "application/json": {
  5290. "schema": {
  5291. "type": "object",
  5292. "properties": {
  5293. "method": {
  5294. "type": "number",
  5295. "description": "Auth method index"
  5296. },
  5297. "inputs": {
  5298. "type": "object",
  5299. "additionalProperties": {
  5300. "type": "string"
  5301. }
  5302. }
  5303. },
  5304. "required": ["method"],
  5305. "additionalProperties": false
  5306. }
  5307. }
  5308. }
  5309. },
  5310. "x-codeSamples": [
  5311. {
  5312. "lang": "js",
  5313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5314. }
  5315. ]
  5316. }
  5317. },
  5318. "/provider/{providerID}/oauth/callback": {
  5319. "post": {
  5320. "tags": ["provider"],
  5321. "operationId": "provider.oauth.callback",
  5322. "parameters": [
  5323. {
  5324. "name": "providerID",
  5325. "in": "path",
  5326. "schema": {
  5327. "type": "string"
  5328. },
  5329. "required": true
  5330. },
  5331. {
  5332. "name": "directory",
  5333. "in": "query",
  5334. "schema": {
  5335. "type": "string"
  5336. },
  5337. "required": false
  5338. },
  5339. {
  5340. "name": "workspace",
  5341. "in": "query",
  5342. "schema": {
  5343. "type": "string"
  5344. },
  5345. "required": false
  5346. }
  5347. ],
  5348. "responses": {
  5349. "200": {
  5350. "description": "OAuth callback processed successfully",
  5351. "content": {
  5352. "application/json": {
  5353. "schema": {
  5354. "type": "boolean",
  5355. "description": "OAuth callback processed successfully"
  5356. }
  5357. }
  5358. }
  5359. },
  5360. "400": {
  5361. "description": "ProviderAuthError | InvalidRequestError",
  5362. "content": {
  5363. "application/json": {
  5364. "schema": {
  5365. "anyOf": [
  5366. {
  5367. "$ref": "#/components/schemas/ProviderAuthError1"
  5368. },
  5369. {
  5370. "$ref": "#/components/schemas/InvalidRequestError"
  5371. }
  5372. ]
  5373. }
  5374. }
  5375. }
  5376. }
  5377. },
  5378. "description": "Handle the OAuth callback from a provider after user authorization.",
  5379. "summary": "Handle OAuth callback",
  5380. "requestBody": {
  5381. "content": {
  5382. "application/json": {
  5383. "schema": {
  5384. "type": "object",
  5385. "properties": {
  5386. "method": {
  5387. "type": "number",
  5388. "description": "Auth method index"
  5389. },
  5390. "code": {
  5391. "type": "string"
  5392. }
  5393. },
  5394. "required": ["method"],
  5395. "additionalProperties": false
  5396. }
  5397. }
  5398. }
  5399. },
  5400. "x-codeSamples": [
  5401. {
  5402. "lang": "js",
  5403. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5404. }
  5405. ]
  5406. }
  5407. },
  5408. "/session": {
  5409. "get": {
  5410. "tags": ["session"],
  5411. "operationId": "session.list",
  5412. "parameters": [
  5413. {
  5414. "name": "directory",
  5415. "in": "query",
  5416. "schema": {
  5417. "type": "string"
  5418. },
  5419. "required": false
  5420. },
  5421. {
  5422. "name": "workspace",
  5423. "in": "query",
  5424. "schema": {
  5425. "type": "string"
  5426. },
  5427. "required": false
  5428. },
  5429. {
  5430. "name": "scope",
  5431. "in": "query",
  5432. "schema": {
  5433. "type": "string",
  5434. "enum": ["project"]
  5435. },
  5436. "required": false
  5437. },
  5438. {
  5439. "name": "path",
  5440. "in": "query",
  5441. "schema": {
  5442. "type": "string"
  5443. },
  5444. "required": false
  5445. },
  5446. {
  5447. "name": "roots",
  5448. "in": "query",
  5449. "schema": {
  5450. "anyOf": [
  5451. {
  5452. "type": "boolean"
  5453. },
  5454. {
  5455. "type": "string",
  5456. "enum": ["true", "false"]
  5457. }
  5458. ]
  5459. },
  5460. "required": false
  5461. },
  5462. {
  5463. "name": "start",
  5464. "in": "query",
  5465. "schema": {
  5466. "type": "number"
  5467. },
  5468. "required": false
  5469. },
  5470. {
  5471. "name": "search",
  5472. "in": "query",
  5473. "schema": {
  5474. "type": "string"
  5475. },
  5476. "required": false
  5477. },
  5478. {
  5479. "name": "limit",
  5480. "in": "query",
  5481. "schema": {
  5482. "type": "number"
  5483. },
  5484. "required": false
  5485. }
  5486. ],
  5487. "responses": {
  5488. "200": {
  5489. "description": "List of sessions",
  5490. "content": {
  5491. "application/json": {
  5492. "schema": {
  5493. "type": "array",
  5494. "items": {
  5495. "$ref": "#/components/schemas/Session"
  5496. },
  5497. "description": "List of sessions"
  5498. }
  5499. }
  5500. }
  5501. },
  5502. "400": {
  5503. "description": "Bad request",
  5504. "content": {
  5505. "application/json": {
  5506. "schema": {
  5507. "$ref": "#/components/schemas/BadRequestError"
  5508. }
  5509. }
  5510. }
  5511. }
  5512. },
  5513. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5514. "summary": "List sessions",
  5515. "x-codeSamples": [
  5516. {
  5517. "lang": "js",
  5518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5519. }
  5520. ]
  5521. },
  5522. "post": {
  5523. "tags": ["session"],
  5524. "operationId": "session.create",
  5525. "parameters": [
  5526. {
  5527. "name": "directory",
  5528. "in": "query",
  5529. "schema": {
  5530. "type": "string"
  5531. },
  5532. "required": false
  5533. },
  5534. {
  5535. "name": "workspace",
  5536. "in": "query",
  5537. "schema": {
  5538. "type": "string"
  5539. },
  5540. "required": false
  5541. }
  5542. ],
  5543. "responses": {
  5544. "200": {
  5545. "description": "Successfully created session",
  5546. "content": {
  5547. "application/json": {
  5548. "schema": {
  5549. "$ref": "#/components/schemas/Session"
  5550. }
  5551. }
  5552. }
  5553. },
  5554. "400": {
  5555. "description": "BadRequest | InvalidRequestError",
  5556. "content": {
  5557. "application/json": {
  5558. "schema": {
  5559. "anyOf": [
  5560. {
  5561. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5562. },
  5563. {
  5564. "$ref": "#/components/schemas/InvalidRequestError"
  5565. }
  5566. ]
  5567. }
  5568. }
  5569. }
  5570. }
  5571. },
  5572. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5573. "summary": "Create session",
  5574. "requestBody": {
  5575. "content": {
  5576. "application/json": {
  5577. "schema": {
  5578. "type": "object",
  5579. "properties": {
  5580. "parentID": {
  5581. "type": "string",
  5582. "pattern": "^ses"
  5583. },
  5584. "title": {
  5585. "type": "string"
  5586. },
  5587. "agent": {
  5588. "type": "string"
  5589. },
  5590. "model": {
  5591. "type": "object",
  5592. "properties": {
  5593. "id": {
  5594. "type": "string"
  5595. },
  5596. "providerID": {
  5597. "type": "string"
  5598. },
  5599. "variant": {
  5600. "type": "string"
  5601. }
  5602. },
  5603. "required": ["id", "providerID"],
  5604. "additionalProperties": false
  5605. },
  5606. "metadata": {
  5607. "type": "object"
  5608. },
  5609. "permission": {
  5610. "$ref": "#/components/schemas/PermissionRuleset"
  5611. },
  5612. "workspaceID": {
  5613. "type": "string",
  5614. "pattern": "^wrk"
  5615. }
  5616. },
  5617. "additionalProperties": false
  5618. }
  5619. }
  5620. }
  5621. },
  5622. "x-codeSamples": [
  5623. {
  5624. "lang": "js",
  5625. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5626. }
  5627. ]
  5628. }
  5629. },
  5630. "/session/status": {
  5631. "get": {
  5632. "tags": ["session"],
  5633. "operationId": "session.status",
  5634. "parameters": [
  5635. {
  5636. "name": "directory",
  5637. "in": "query",
  5638. "schema": {
  5639. "type": "string"
  5640. },
  5641. "required": false
  5642. },
  5643. {
  5644. "name": "workspace",
  5645. "in": "query",
  5646. "schema": {
  5647. "type": "string"
  5648. },
  5649. "required": false
  5650. }
  5651. ],
  5652. "responses": {
  5653. "200": {
  5654. "description": "Get session status",
  5655. "content": {
  5656. "application/json": {
  5657. "schema": {
  5658. "type": "object",
  5659. "additionalProperties": {
  5660. "$ref": "#/components/schemas/SessionStatus"
  5661. },
  5662. "description": "Get session status"
  5663. }
  5664. }
  5665. }
  5666. },
  5667. "400": {
  5668. "description": "BadRequest | InvalidRequestError",
  5669. "content": {
  5670. "application/json": {
  5671. "schema": {
  5672. "anyOf": [
  5673. {
  5674. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5675. },
  5676. {
  5677. "$ref": "#/components/schemas/InvalidRequestError"
  5678. }
  5679. ]
  5680. }
  5681. }
  5682. }
  5683. }
  5684. },
  5685. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5686. "summary": "Get session status",
  5687. "x-codeSamples": [
  5688. {
  5689. "lang": "js",
  5690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5691. }
  5692. ]
  5693. }
  5694. },
  5695. "/session/{sessionID}": {
  5696. "get": {
  5697. "tags": ["session"],
  5698. "operationId": "session.get",
  5699. "parameters": [
  5700. {
  5701. "name": "sessionID",
  5702. "in": "path",
  5703. "schema": {
  5704. "type": "string",
  5705. "pattern": "^ses"
  5706. },
  5707. "required": true
  5708. },
  5709. {
  5710. "name": "directory",
  5711. "in": "query",
  5712. "schema": {
  5713. "type": "string"
  5714. },
  5715. "required": false
  5716. },
  5717. {
  5718. "name": "workspace",
  5719. "in": "query",
  5720. "schema": {
  5721. "type": "string"
  5722. },
  5723. "required": false
  5724. }
  5725. ],
  5726. "responses": {
  5727. "200": {
  5728. "description": "Get session",
  5729. "content": {
  5730. "application/json": {
  5731. "schema": {
  5732. "$ref": "#/components/schemas/Session"
  5733. }
  5734. }
  5735. }
  5736. },
  5737. "400": {
  5738. "description": "BadRequest | InvalidRequestError",
  5739. "content": {
  5740. "application/json": {
  5741. "schema": {
  5742. "anyOf": [
  5743. {
  5744. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5745. },
  5746. {
  5747. "$ref": "#/components/schemas/InvalidRequestError"
  5748. }
  5749. ]
  5750. }
  5751. }
  5752. }
  5753. },
  5754. "404": {
  5755. "description": "NotFoundError",
  5756. "content": {
  5757. "application/json": {
  5758. "schema": {
  5759. "$ref": "#/components/schemas/NotFoundError"
  5760. }
  5761. }
  5762. }
  5763. }
  5764. },
  5765. "description": "Retrieve detailed information about a specific OpenCode session.",
  5766. "summary": "Get session",
  5767. "x-codeSamples": [
  5768. {
  5769. "lang": "js",
  5770. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5771. }
  5772. ]
  5773. },
  5774. "delete": {
  5775. "tags": ["session"],
  5776. "operationId": "session.delete",
  5777. "parameters": [
  5778. {
  5779. "name": "sessionID",
  5780. "in": "path",
  5781. "schema": {
  5782. "type": "string",
  5783. "pattern": "^ses"
  5784. },
  5785. "required": true
  5786. },
  5787. {
  5788. "name": "directory",
  5789. "in": "query",
  5790. "schema": {
  5791. "type": "string"
  5792. },
  5793. "required": false
  5794. },
  5795. {
  5796. "name": "workspace",
  5797. "in": "query",
  5798. "schema": {
  5799. "type": "string"
  5800. },
  5801. "required": false
  5802. }
  5803. ],
  5804. "responses": {
  5805. "200": {
  5806. "description": "Successfully deleted session",
  5807. "content": {
  5808. "application/json": {
  5809. "schema": {
  5810. "type": "boolean",
  5811. "description": "Successfully deleted session"
  5812. }
  5813. }
  5814. }
  5815. },
  5816. "400": {
  5817. "description": "BadRequest | InvalidRequestError",
  5818. "content": {
  5819. "application/json": {
  5820. "schema": {
  5821. "anyOf": [
  5822. {
  5823. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5824. },
  5825. {
  5826. "$ref": "#/components/schemas/InvalidRequestError"
  5827. }
  5828. ]
  5829. }
  5830. }
  5831. }
  5832. },
  5833. "404": {
  5834. "description": "NotFoundError",
  5835. "content": {
  5836. "application/json": {
  5837. "schema": {
  5838. "$ref": "#/components/schemas/NotFoundError"
  5839. }
  5840. }
  5841. }
  5842. }
  5843. },
  5844. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5845. "summary": "Delete session",
  5846. "x-codeSamples": [
  5847. {
  5848. "lang": "js",
  5849. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5850. }
  5851. ]
  5852. },
  5853. "patch": {
  5854. "tags": ["session"],
  5855. "operationId": "session.update",
  5856. "parameters": [
  5857. {
  5858. "name": "sessionID",
  5859. "in": "path",
  5860. "schema": {
  5861. "type": "string",
  5862. "pattern": "^ses"
  5863. },
  5864. "required": true
  5865. },
  5866. {
  5867. "name": "directory",
  5868. "in": "query",
  5869. "schema": {
  5870. "type": "string"
  5871. },
  5872. "required": false
  5873. },
  5874. {
  5875. "name": "workspace",
  5876. "in": "query",
  5877. "schema": {
  5878. "type": "string"
  5879. },
  5880. "required": false
  5881. }
  5882. ],
  5883. "responses": {
  5884. "200": {
  5885. "description": "Successfully updated session",
  5886. "content": {
  5887. "application/json": {
  5888. "schema": {
  5889. "$ref": "#/components/schemas/Session"
  5890. }
  5891. }
  5892. }
  5893. },
  5894. "400": {
  5895. "description": "BadRequest | InvalidRequestError",
  5896. "content": {
  5897. "application/json": {
  5898. "schema": {
  5899. "anyOf": [
  5900. {
  5901. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5902. },
  5903. {
  5904. "$ref": "#/components/schemas/InvalidRequestError"
  5905. }
  5906. ]
  5907. }
  5908. }
  5909. }
  5910. },
  5911. "404": {
  5912. "description": "NotFoundError",
  5913. "content": {
  5914. "application/json": {
  5915. "schema": {
  5916. "$ref": "#/components/schemas/NotFoundError"
  5917. }
  5918. }
  5919. }
  5920. }
  5921. },
  5922. "description": "Update properties of an existing session, such as title or other metadata.",
  5923. "summary": "Update session",
  5924. "requestBody": {
  5925. "content": {
  5926. "application/json": {
  5927. "schema": {
  5928. "type": "object",
  5929. "properties": {
  5930. "title": {
  5931. "type": "string"
  5932. },
  5933. "metadata": {
  5934. "type": "object"
  5935. },
  5936. "permission": {
  5937. "$ref": "#/components/schemas/PermissionRuleset"
  5938. },
  5939. "time": {
  5940. "type": "object",
  5941. "properties": {
  5942. "archived": {
  5943. "type": "number"
  5944. }
  5945. },
  5946. "additionalProperties": false
  5947. }
  5948. },
  5949. "additionalProperties": false
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "x-codeSamples": [
  5955. {
  5956. "lang": "js",
  5957. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5958. }
  5959. ]
  5960. }
  5961. },
  5962. "/session/{sessionID}/children": {
  5963. "get": {
  5964. "tags": ["session"],
  5965. "operationId": "session.children",
  5966. "parameters": [
  5967. {
  5968. "name": "sessionID",
  5969. "in": "path",
  5970. "schema": {
  5971. "type": "string",
  5972. "pattern": "^ses"
  5973. },
  5974. "required": true
  5975. },
  5976. {
  5977. "name": "directory",
  5978. "in": "query",
  5979. "schema": {
  5980. "type": "string"
  5981. },
  5982. "required": false
  5983. },
  5984. {
  5985. "name": "workspace",
  5986. "in": "query",
  5987. "schema": {
  5988. "type": "string"
  5989. },
  5990. "required": false
  5991. }
  5992. ],
  5993. "responses": {
  5994. "200": {
  5995. "description": "List of children",
  5996. "content": {
  5997. "application/json": {
  5998. "schema": {
  5999. "type": "array",
  6000. "items": {
  6001. "$ref": "#/components/schemas/Session"
  6002. },
  6003. "description": "List of children"
  6004. }
  6005. }
  6006. }
  6007. },
  6008. "400": {
  6009. "description": "BadRequest | InvalidRequestError",
  6010. "content": {
  6011. "application/json": {
  6012. "schema": {
  6013. "anyOf": [
  6014. {
  6015. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6016. },
  6017. {
  6018. "$ref": "#/components/schemas/InvalidRequestError"
  6019. }
  6020. ]
  6021. }
  6022. }
  6023. }
  6024. },
  6025. "404": {
  6026. "description": "NotFoundError",
  6027. "content": {
  6028. "application/json": {
  6029. "schema": {
  6030. "$ref": "#/components/schemas/NotFoundError"
  6031. }
  6032. }
  6033. }
  6034. }
  6035. },
  6036. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  6037. "summary": "Get session children",
  6038. "x-codeSamples": [
  6039. {
  6040. "lang": "js",
  6041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  6042. }
  6043. ]
  6044. }
  6045. },
  6046. "/session/{sessionID}/todo": {
  6047. "get": {
  6048. "tags": ["session"],
  6049. "operationId": "session.todo",
  6050. "parameters": [
  6051. {
  6052. "name": "sessionID",
  6053. "in": "path",
  6054. "schema": {
  6055. "type": "string",
  6056. "pattern": "^ses"
  6057. },
  6058. "required": true
  6059. },
  6060. {
  6061. "name": "directory",
  6062. "in": "query",
  6063. "schema": {
  6064. "type": "string"
  6065. },
  6066. "required": false
  6067. },
  6068. {
  6069. "name": "workspace",
  6070. "in": "query",
  6071. "schema": {
  6072. "type": "string"
  6073. },
  6074. "required": false
  6075. }
  6076. ],
  6077. "responses": {
  6078. "200": {
  6079. "description": "Todo list",
  6080. "content": {
  6081. "application/json": {
  6082. "schema": {
  6083. "type": "array",
  6084. "items": {
  6085. "$ref": "#/components/schemas/Todo"
  6086. },
  6087. "description": "Todo list"
  6088. }
  6089. }
  6090. }
  6091. },
  6092. "400": {
  6093. "description": "BadRequest | InvalidRequestError",
  6094. "content": {
  6095. "application/json": {
  6096. "schema": {
  6097. "anyOf": [
  6098. {
  6099. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6100. },
  6101. {
  6102. "$ref": "#/components/schemas/InvalidRequestError"
  6103. }
  6104. ]
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "404": {
  6110. "description": "NotFoundError",
  6111. "content": {
  6112. "application/json": {
  6113. "schema": {
  6114. "$ref": "#/components/schemas/NotFoundError"
  6115. }
  6116. }
  6117. }
  6118. }
  6119. },
  6120. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6121. "summary": "Get session todos",
  6122. "x-codeSamples": [
  6123. {
  6124. "lang": "js",
  6125. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6126. }
  6127. ]
  6128. }
  6129. },
  6130. "/session/{sessionID}/diff": {
  6131. "get": {
  6132. "tags": ["session"],
  6133. "operationId": "session.diff",
  6134. "parameters": [
  6135. {
  6136. "name": "sessionID",
  6137. "in": "path",
  6138. "schema": {
  6139. "type": "string",
  6140. "pattern": "^ses"
  6141. },
  6142. "required": true
  6143. },
  6144. {
  6145. "name": "directory",
  6146. "in": "query",
  6147. "schema": {
  6148. "type": "string"
  6149. },
  6150. "required": false
  6151. },
  6152. {
  6153. "name": "workspace",
  6154. "in": "query",
  6155. "schema": {
  6156. "type": "string"
  6157. },
  6158. "required": false
  6159. },
  6160. {
  6161. "name": "messageID",
  6162. "in": "query",
  6163. "schema": {
  6164. "type": "string",
  6165. "pattern": "^msg"
  6166. },
  6167. "required": false
  6168. }
  6169. ],
  6170. "responses": {
  6171. "200": {
  6172. "description": "Successfully retrieved diff",
  6173. "content": {
  6174. "application/json": {
  6175. "schema": {
  6176. "type": "array",
  6177. "items": {
  6178. "$ref": "#/components/schemas/SnapshotFileDiff"
  6179. },
  6180. "description": "Successfully retrieved diff"
  6181. }
  6182. }
  6183. }
  6184. },
  6185. "400": {
  6186. "description": "Bad request",
  6187. "content": {
  6188. "application/json": {
  6189. "schema": {
  6190. "$ref": "#/components/schemas/BadRequestError"
  6191. }
  6192. }
  6193. }
  6194. }
  6195. },
  6196. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6197. "summary": "Get message diff",
  6198. "x-codeSamples": [
  6199. {
  6200. "lang": "js",
  6201. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6202. }
  6203. ]
  6204. }
  6205. },
  6206. "/session/{sessionID}/message": {
  6207. "get": {
  6208. "tags": ["session"],
  6209. "operationId": "session.messages",
  6210. "parameters": [
  6211. {
  6212. "name": "sessionID",
  6213. "in": "path",
  6214. "schema": {
  6215. "type": "string",
  6216. "pattern": "^ses"
  6217. },
  6218. "required": true
  6219. },
  6220. {
  6221. "name": "directory",
  6222. "in": "query",
  6223. "schema": {
  6224. "type": "string"
  6225. },
  6226. "required": false
  6227. },
  6228. {
  6229. "name": "workspace",
  6230. "in": "query",
  6231. "schema": {
  6232. "type": "string"
  6233. },
  6234. "required": false
  6235. },
  6236. {
  6237. "name": "limit",
  6238. "in": "query",
  6239. "schema": {
  6240. "type": "integer",
  6241. "minimum": 0,
  6242. "maximum": 9007199254740991
  6243. },
  6244. "required": false
  6245. },
  6246. {
  6247. "name": "before",
  6248. "in": "query",
  6249. "schema": {
  6250. "type": "string"
  6251. },
  6252. "required": false
  6253. }
  6254. ],
  6255. "responses": {
  6256. "200": {
  6257. "description": "List of messages",
  6258. "content": {
  6259. "application/json": {
  6260. "schema": {
  6261. "type": "array",
  6262. "items": {
  6263. "type": "object",
  6264. "properties": {
  6265. "info": {
  6266. "$ref": "#/components/schemas/Message"
  6267. },
  6268. "parts": {
  6269. "type": "array",
  6270. "items": {
  6271. "$ref": "#/components/schemas/Part"
  6272. }
  6273. }
  6274. },
  6275. "required": ["info", "parts"],
  6276. "additionalProperties": false
  6277. },
  6278. "description": "List of messages"
  6279. }
  6280. }
  6281. }
  6282. },
  6283. "400": {
  6284. "description": "BadRequest | InvalidRequestError",
  6285. "content": {
  6286. "application/json": {
  6287. "schema": {
  6288. "anyOf": [
  6289. {
  6290. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6291. },
  6292. {
  6293. "$ref": "#/components/schemas/InvalidRequestError"
  6294. }
  6295. ]
  6296. }
  6297. }
  6298. }
  6299. },
  6300. "404": {
  6301. "description": "NotFoundError",
  6302. "content": {
  6303. "application/json": {
  6304. "schema": {
  6305. "$ref": "#/components/schemas/NotFoundError"
  6306. }
  6307. }
  6308. }
  6309. }
  6310. },
  6311. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6312. "summary": "Get session messages",
  6313. "x-codeSamples": [
  6314. {
  6315. "lang": "js",
  6316. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6317. }
  6318. ]
  6319. },
  6320. "post": {
  6321. "tags": ["session"],
  6322. "operationId": "session.prompt",
  6323. "parameters": [
  6324. {
  6325. "name": "sessionID",
  6326. "in": "path",
  6327. "schema": {
  6328. "type": "string",
  6329. "pattern": "^ses"
  6330. },
  6331. "required": true
  6332. },
  6333. {
  6334. "name": "directory",
  6335. "in": "query",
  6336. "schema": {
  6337. "type": "string"
  6338. },
  6339. "required": false
  6340. },
  6341. {
  6342. "name": "workspace",
  6343. "in": "query",
  6344. "schema": {
  6345. "type": "string"
  6346. },
  6347. "required": false
  6348. }
  6349. ],
  6350. "responses": {
  6351. "200": {
  6352. "description": "Created message",
  6353. "content": {
  6354. "application/json": {
  6355. "schema": {
  6356. "type": "object",
  6357. "required": ["info", "parts"],
  6358. "properties": {
  6359. "info": {
  6360. "$ref": "#/components/schemas/AssistantMessage"
  6361. },
  6362. "parts": {
  6363. "type": "array",
  6364. "items": {
  6365. "$ref": "#/components/schemas/Part"
  6366. }
  6367. }
  6368. }
  6369. }
  6370. }
  6371. }
  6372. },
  6373. "400": {
  6374. "description": "BadRequest | InvalidRequestError",
  6375. "content": {
  6376. "application/json": {
  6377. "schema": {
  6378. "anyOf": [
  6379. {
  6380. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6381. },
  6382. {
  6383. "$ref": "#/components/schemas/InvalidRequestError"
  6384. }
  6385. ]
  6386. }
  6387. }
  6388. }
  6389. },
  6390. "404": {
  6391. "description": "NotFoundError",
  6392. "content": {
  6393. "application/json": {
  6394. "schema": {
  6395. "$ref": "#/components/schemas/NotFoundError"
  6396. }
  6397. }
  6398. }
  6399. }
  6400. },
  6401. "description": "Create and send a new message to a session, streaming the AI response.",
  6402. "summary": "Send message",
  6403. "requestBody": {
  6404. "content": {
  6405. "application/json": {
  6406. "schema": {
  6407. "type": "object",
  6408. "properties": {
  6409. "messageID": {
  6410. "type": "string",
  6411. "pattern": "^msg"
  6412. },
  6413. "model": {
  6414. "type": "object",
  6415. "properties": {
  6416. "providerID": {
  6417. "type": "string"
  6418. },
  6419. "modelID": {
  6420. "type": "string"
  6421. }
  6422. },
  6423. "required": ["providerID", "modelID"],
  6424. "additionalProperties": false
  6425. },
  6426. "agent": {
  6427. "type": "string"
  6428. },
  6429. "noReply": {
  6430. "type": "boolean"
  6431. },
  6432. "tools": {
  6433. "type": "object",
  6434. "additionalProperties": {
  6435. "type": "boolean"
  6436. }
  6437. },
  6438. "format": {
  6439. "$ref": "#/components/schemas/OutputFormat"
  6440. },
  6441. "system": {
  6442. "type": "string"
  6443. },
  6444. "variant": {
  6445. "type": "string"
  6446. },
  6447. "parts": {
  6448. "type": "array",
  6449. "items": {
  6450. "anyOf": [
  6451. {
  6452. "$ref": "#/components/schemas/TextPartInput"
  6453. },
  6454. {
  6455. "$ref": "#/components/schemas/FilePartInput"
  6456. },
  6457. {
  6458. "$ref": "#/components/schemas/AgentPartInput"
  6459. },
  6460. {
  6461. "$ref": "#/components/schemas/SubtaskPartInput"
  6462. }
  6463. ]
  6464. }
  6465. }
  6466. },
  6467. "required": ["parts"],
  6468. "additionalProperties": false
  6469. }
  6470. }
  6471. }
  6472. },
  6473. "x-codeSamples": [
  6474. {
  6475. "lang": "js",
  6476. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6477. }
  6478. ]
  6479. }
  6480. },
  6481. "/session/{sessionID}/message/{messageID}": {
  6482. "get": {
  6483. "tags": ["session"],
  6484. "operationId": "session.message",
  6485. "parameters": [
  6486. {
  6487. "name": "sessionID",
  6488. "in": "path",
  6489. "schema": {
  6490. "type": "string",
  6491. "pattern": "^ses"
  6492. },
  6493. "required": true
  6494. },
  6495. {
  6496. "name": "messageID",
  6497. "in": "path",
  6498. "schema": {
  6499. "type": "string",
  6500. "pattern": "^msg"
  6501. },
  6502. "required": true
  6503. },
  6504. {
  6505. "name": "directory",
  6506. "in": "query",
  6507. "schema": {
  6508. "type": "string"
  6509. },
  6510. "required": false
  6511. },
  6512. {
  6513. "name": "workspace",
  6514. "in": "query",
  6515. "schema": {
  6516. "type": "string"
  6517. },
  6518. "required": false
  6519. }
  6520. ],
  6521. "responses": {
  6522. "200": {
  6523. "description": "Message",
  6524. "content": {
  6525. "application/json": {
  6526. "schema": {
  6527. "type": "object",
  6528. "properties": {
  6529. "info": {
  6530. "$ref": "#/components/schemas/Message"
  6531. },
  6532. "parts": {
  6533. "type": "array",
  6534. "items": {
  6535. "$ref": "#/components/schemas/Part"
  6536. }
  6537. }
  6538. },
  6539. "required": ["info", "parts"],
  6540. "additionalProperties": false,
  6541. "description": "Message"
  6542. }
  6543. }
  6544. }
  6545. },
  6546. "400": {
  6547. "description": "BadRequest | InvalidRequestError",
  6548. "content": {
  6549. "application/json": {
  6550. "schema": {
  6551. "anyOf": [
  6552. {
  6553. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6554. },
  6555. {
  6556. "$ref": "#/components/schemas/InvalidRequestError"
  6557. }
  6558. ]
  6559. }
  6560. }
  6561. }
  6562. },
  6563. "404": {
  6564. "description": "NotFoundError",
  6565. "content": {
  6566. "application/json": {
  6567. "schema": {
  6568. "$ref": "#/components/schemas/NotFoundError"
  6569. }
  6570. }
  6571. }
  6572. }
  6573. },
  6574. "description": "Retrieve a specific message from a session by its message ID.",
  6575. "summary": "Get message",
  6576. "x-codeSamples": [
  6577. {
  6578. "lang": "js",
  6579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6580. }
  6581. ]
  6582. },
  6583. "delete": {
  6584. "tags": ["session"],
  6585. "operationId": "session.deleteMessage",
  6586. "parameters": [
  6587. {
  6588. "name": "sessionID",
  6589. "in": "path",
  6590. "schema": {
  6591. "type": "string",
  6592. "pattern": "^ses"
  6593. },
  6594. "required": true
  6595. },
  6596. {
  6597. "name": "messageID",
  6598. "in": "path",
  6599. "schema": {
  6600. "type": "string",
  6601. "pattern": "^msg"
  6602. },
  6603. "required": true
  6604. },
  6605. {
  6606. "name": "directory",
  6607. "in": "query",
  6608. "schema": {
  6609. "type": "string"
  6610. },
  6611. "required": false
  6612. },
  6613. {
  6614. "name": "workspace",
  6615. "in": "query",
  6616. "schema": {
  6617. "type": "string"
  6618. },
  6619. "required": false
  6620. }
  6621. ],
  6622. "responses": {
  6623. "200": {
  6624. "description": "Successfully deleted message",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "type": "boolean",
  6629. "description": "Successfully deleted message"
  6630. }
  6631. }
  6632. }
  6633. },
  6634. "400": {
  6635. "description": "BadRequest | InvalidRequestError",
  6636. "content": {
  6637. "application/json": {
  6638. "schema": {
  6639. "anyOf": [
  6640. {
  6641. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6642. },
  6643. {
  6644. "$ref": "#/components/schemas/InvalidRequestError"
  6645. }
  6646. ]
  6647. }
  6648. }
  6649. }
  6650. },
  6651. "404": {
  6652. "description": "NotFoundError",
  6653. "content": {
  6654. "application/json": {
  6655. "schema": {
  6656. "$ref": "#/components/schemas/NotFoundError"
  6657. }
  6658. }
  6659. }
  6660. },
  6661. "409": {
  6662. "description": "SessionBusyError",
  6663. "content": {
  6664. "application/json": {
  6665. "schema": {
  6666. "$ref": "#/components/schemas/SessionBusyError"
  6667. }
  6668. }
  6669. }
  6670. }
  6671. },
  6672. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6673. "summary": "Delete message",
  6674. "x-codeSamples": [
  6675. {
  6676. "lang": "js",
  6677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6678. }
  6679. ]
  6680. }
  6681. },
  6682. "/session/{sessionID}/fork": {
  6683. "post": {
  6684. "tags": ["session"],
  6685. "operationId": "session.fork",
  6686. "parameters": [
  6687. {
  6688. "name": "sessionID",
  6689. "in": "path",
  6690. "schema": {
  6691. "type": "string",
  6692. "pattern": "^ses"
  6693. },
  6694. "required": true
  6695. },
  6696. {
  6697. "name": "directory",
  6698. "in": "query",
  6699. "schema": {
  6700. "type": "string"
  6701. },
  6702. "required": false
  6703. },
  6704. {
  6705. "name": "workspace",
  6706. "in": "query",
  6707. "schema": {
  6708. "type": "string"
  6709. },
  6710. "required": false
  6711. }
  6712. ],
  6713. "responses": {
  6714. "200": {
  6715. "description": "200",
  6716. "content": {
  6717. "application/json": {
  6718. "schema": {
  6719. "$ref": "#/components/schemas/Session"
  6720. }
  6721. }
  6722. }
  6723. },
  6724. "400": {
  6725. "description": "BadRequest | InvalidRequestError",
  6726. "content": {
  6727. "application/json": {
  6728. "schema": {
  6729. "anyOf": [
  6730. {
  6731. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6732. },
  6733. {
  6734. "$ref": "#/components/schemas/InvalidRequestError"
  6735. }
  6736. ]
  6737. }
  6738. }
  6739. }
  6740. },
  6741. "404": {
  6742. "description": "NotFoundError",
  6743. "content": {
  6744. "application/json": {
  6745. "schema": {
  6746. "$ref": "#/components/schemas/NotFoundError"
  6747. }
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "description": "Create a new session by forking an existing session at a specific message point.",
  6753. "summary": "Fork session",
  6754. "requestBody": {
  6755. "content": {
  6756. "application/json": {
  6757. "schema": {
  6758. "type": "object",
  6759. "properties": {
  6760. "messageID": {
  6761. "type": "string",
  6762. "pattern": "^msg"
  6763. }
  6764. },
  6765. "additionalProperties": false
  6766. }
  6767. }
  6768. }
  6769. },
  6770. "x-codeSamples": [
  6771. {
  6772. "lang": "js",
  6773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6774. }
  6775. ]
  6776. }
  6777. },
  6778. "/session/{sessionID}/abort": {
  6779. "post": {
  6780. "tags": ["session"],
  6781. "operationId": "session.abort",
  6782. "parameters": [
  6783. {
  6784. "name": "sessionID",
  6785. "in": "path",
  6786. "schema": {
  6787. "type": "string",
  6788. "pattern": "^ses"
  6789. },
  6790. "required": true
  6791. },
  6792. {
  6793. "name": "directory",
  6794. "in": "query",
  6795. "schema": {
  6796. "type": "string"
  6797. },
  6798. "required": false
  6799. },
  6800. {
  6801. "name": "workspace",
  6802. "in": "query",
  6803. "schema": {
  6804. "type": "string"
  6805. },
  6806. "required": false
  6807. }
  6808. ],
  6809. "responses": {
  6810. "200": {
  6811. "description": "Aborted session",
  6812. "content": {
  6813. "application/json": {
  6814. "schema": {
  6815. "type": "boolean",
  6816. "description": "Aborted session"
  6817. }
  6818. }
  6819. }
  6820. },
  6821. "400": {
  6822. "description": "BadRequest | InvalidRequestError",
  6823. "content": {
  6824. "application/json": {
  6825. "schema": {
  6826. "anyOf": [
  6827. {
  6828. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6829. },
  6830. {
  6831. "$ref": "#/components/schemas/InvalidRequestError"
  6832. }
  6833. ]
  6834. }
  6835. }
  6836. }
  6837. }
  6838. },
  6839. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6840. "summary": "Abort session",
  6841. "x-codeSamples": [
  6842. {
  6843. "lang": "js",
  6844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6845. }
  6846. ]
  6847. }
  6848. },
  6849. "/session/{sessionID}/init": {
  6850. "post": {
  6851. "tags": ["session"],
  6852. "operationId": "session.init",
  6853. "parameters": [
  6854. {
  6855. "name": "sessionID",
  6856. "in": "path",
  6857. "schema": {
  6858. "type": "string",
  6859. "pattern": "^ses"
  6860. },
  6861. "required": true
  6862. },
  6863. {
  6864. "name": "directory",
  6865. "in": "query",
  6866. "schema": {
  6867. "type": "string"
  6868. },
  6869. "required": false
  6870. },
  6871. {
  6872. "name": "workspace",
  6873. "in": "query",
  6874. "schema": {
  6875. "type": "string"
  6876. },
  6877. "required": false
  6878. }
  6879. ],
  6880. "responses": {
  6881. "200": {
  6882. "description": "200",
  6883. "content": {
  6884. "application/json": {
  6885. "schema": {
  6886. "type": "boolean",
  6887. "description": "200"
  6888. }
  6889. }
  6890. }
  6891. },
  6892. "400": {
  6893. "description": "BadRequest | InvalidRequestError",
  6894. "content": {
  6895. "application/json": {
  6896. "schema": {
  6897. "anyOf": [
  6898. {
  6899. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6900. },
  6901. {
  6902. "$ref": "#/components/schemas/InvalidRequestError"
  6903. }
  6904. ]
  6905. }
  6906. }
  6907. }
  6908. },
  6909. "404": {
  6910. "description": "NotFoundError",
  6911. "content": {
  6912. "application/json": {
  6913. "schema": {
  6914. "$ref": "#/components/schemas/NotFoundError"
  6915. }
  6916. }
  6917. }
  6918. }
  6919. },
  6920. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6921. "summary": "Initialize session",
  6922. "requestBody": {
  6923. "content": {
  6924. "application/json": {
  6925. "schema": {
  6926. "type": "object",
  6927. "properties": {
  6928. "modelID": {
  6929. "type": "string"
  6930. },
  6931. "providerID": {
  6932. "type": "string"
  6933. },
  6934. "messageID": {
  6935. "type": "string",
  6936. "pattern": "^msg"
  6937. }
  6938. },
  6939. "required": ["modelID", "providerID", "messageID"],
  6940. "additionalProperties": false
  6941. }
  6942. }
  6943. }
  6944. },
  6945. "x-codeSamples": [
  6946. {
  6947. "lang": "js",
  6948. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6949. }
  6950. ]
  6951. }
  6952. },
  6953. "/session/{sessionID}/share": {
  6954. "post": {
  6955. "tags": ["session"],
  6956. "operationId": "session.share",
  6957. "parameters": [
  6958. {
  6959. "name": "sessionID",
  6960. "in": "path",
  6961. "schema": {
  6962. "type": "string",
  6963. "pattern": "^ses"
  6964. },
  6965. "required": true
  6966. },
  6967. {
  6968. "name": "directory",
  6969. "in": "query",
  6970. "schema": {
  6971. "type": "string"
  6972. },
  6973. "required": false
  6974. },
  6975. {
  6976. "name": "workspace",
  6977. "in": "query",
  6978. "schema": {
  6979. "type": "string"
  6980. },
  6981. "required": false
  6982. }
  6983. ],
  6984. "responses": {
  6985. "200": {
  6986. "description": "Successfully shared session",
  6987. "content": {
  6988. "application/json": {
  6989. "schema": {
  6990. "$ref": "#/components/schemas/Session"
  6991. }
  6992. }
  6993. }
  6994. },
  6995. "400": {
  6996. "description": "Bad request",
  6997. "content": {
  6998. "application/json": {
  6999. "schema": {
  7000. "$ref": "#/components/schemas/BadRequestError"
  7001. }
  7002. }
  7003. }
  7004. },
  7005. "404": {
  7006. "description": "NotFoundError",
  7007. "content": {
  7008. "application/json": {
  7009. "schema": {
  7010. "$ref": "#/components/schemas/NotFoundError"
  7011. }
  7012. }
  7013. }
  7014. },
  7015. "500": {
  7016. "description": "InternalServerError",
  7017. "content": {
  7018. "application/json": {
  7019. "schema": {
  7020. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7021. }
  7022. }
  7023. }
  7024. }
  7025. },
  7026. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  7027. "summary": "Share session",
  7028. "x-codeSamples": [
  7029. {
  7030. "lang": "js",
  7031. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  7032. }
  7033. ]
  7034. },
  7035. "delete": {
  7036. "tags": ["session"],
  7037. "operationId": "session.unshare",
  7038. "parameters": [
  7039. {
  7040. "name": "sessionID",
  7041. "in": "path",
  7042. "schema": {
  7043. "type": "string",
  7044. "pattern": "^ses"
  7045. },
  7046. "required": true
  7047. },
  7048. {
  7049. "name": "directory",
  7050. "in": "query",
  7051. "schema": {
  7052. "type": "string"
  7053. },
  7054. "required": false
  7055. },
  7056. {
  7057. "name": "workspace",
  7058. "in": "query",
  7059. "schema": {
  7060. "type": "string"
  7061. },
  7062. "required": false
  7063. }
  7064. ],
  7065. "responses": {
  7066. "200": {
  7067. "description": "Successfully unshared session",
  7068. "content": {
  7069. "application/json": {
  7070. "schema": {
  7071. "$ref": "#/components/schemas/Session"
  7072. }
  7073. }
  7074. }
  7075. },
  7076. "400": {
  7077. "description": "Bad request",
  7078. "content": {
  7079. "application/json": {
  7080. "schema": {
  7081. "$ref": "#/components/schemas/BadRequestError"
  7082. }
  7083. }
  7084. }
  7085. },
  7086. "404": {
  7087. "description": "NotFoundError",
  7088. "content": {
  7089. "application/json": {
  7090. "schema": {
  7091. "$ref": "#/components/schemas/NotFoundError"
  7092. }
  7093. }
  7094. }
  7095. },
  7096. "500": {
  7097. "description": "InternalServerError",
  7098. "content": {
  7099. "application/json": {
  7100. "schema": {
  7101. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7102. }
  7103. }
  7104. }
  7105. }
  7106. },
  7107. "description": "Remove the shareable link for a session, making it private again.",
  7108. "summary": "Unshare session",
  7109. "x-codeSamples": [
  7110. {
  7111. "lang": "js",
  7112. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7113. }
  7114. ]
  7115. }
  7116. },
  7117. "/session/{sessionID}/summarize": {
  7118. "post": {
  7119. "tags": ["session"],
  7120. "operationId": "session.summarize",
  7121. "parameters": [
  7122. {
  7123. "name": "sessionID",
  7124. "in": "path",
  7125. "schema": {
  7126. "type": "string",
  7127. "pattern": "^ses"
  7128. },
  7129. "required": true
  7130. },
  7131. {
  7132. "name": "directory",
  7133. "in": "query",
  7134. "schema": {
  7135. "type": "string"
  7136. },
  7137. "required": false
  7138. },
  7139. {
  7140. "name": "workspace",
  7141. "in": "query",
  7142. "schema": {
  7143. "type": "string"
  7144. },
  7145. "required": false
  7146. }
  7147. ],
  7148. "responses": {
  7149. "200": {
  7150. "description": "Summarized session",
  7151. "content": {
  7152. "application/json": {
  7153. "schema": {
  7154. "type": "boolean",
  7155. "description": "Summarized session"
  7156. }
  7157. }
  7158. }
  7159. },
  7160. "400": {
  7161. "description": "BadRequest | InvalidRequestError",
  7162. "content": {
  7163. "application/json": {
  7164. "schema": {
  7165. "anyOf": [
  7166. {
  7167. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7168. },
  7169. {
  7170. "$ref": "#/components/schemas/InvalidRequestError"
  7171. }
  7172. ]
  7173. }
  7174. }
  7175. }
  7176. },
  7177. "404": {
  7178. "description": "NotFoundError",
  7179. "content": {
  7180. "application/json": {
  7181. "schema": {
  7182. "$ref": "#/components/schemas/NotFoundError"
  7183. }
  7184. }
  7185. }
  7186. }
  7187. },
  7188. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7189. "summary": "Summarize session",
  7190. "requestBody": {
  7191. "content": {
  7192. "application/json": {
  7193. "schema": {
  7194. "type": "object",
  7195. "properties": {
  7196. "providerID": {
  7197. "type": "string"
  7198. },
  7199. "modelID": {
  7200. "type": "string"
  7201. },
  7202. "auto": {
  7203. "type": "boolean"
  7204. }
  7205. },
  7206. "required": ["providerID", "modelID"],
  7207. "additionalProperties": false
  7208. }
  7209. }
  7210. }
  7211. },
  7212. "x-codeSamples": [
  7213. {
  7214. "lang": "js",
  7215. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7216. }
  7217. ]
  7218. }
  7219. },
  7220. "/session/{sessionID}/prompt_async": {
  7221. "post": {
  7222. "tags": ["session"],
  7223. "operationId": "session.prompt_async",
  7224. "parameters": [
  7225. {
  7226. "name": "sessionID",
  7227. "in": "path",
  7228. "schema": {
  7229. "type": "string",
  7230. "pattern": "^ses"
  7231. },
  7232. "required": true
  7233. },
  7234. {
  7235. "name": "directory",
  7236. "in": "query",
  7237. "schema": {
  7238. "type": "string"
  7239. },
  7240. "required": false
  7241. },
  7242. {
  7243. "name": "workspace",
  7244. "in": "query",
  7245. "schema": {
  7246. "type": "string"
  7247. },
  7248. "required": false
  7249. }
  7250. ],
  7251. "responses": {
  7252. "204": {
  7253. "description": "Prompt accepted"
  7254. },
  7255. "400": {
  7256. "description": "BadRequest | InvalidRequestError",
  7257. "content": {
  7258. "application/json": {
  7259. "schema": {
  7260. "anyOf": [
  7261. {
  7262. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7263. },
  7264. {
  7265. "$ref": "#/components/schemas/InvalidRequestError"
  7266. }
  7267. ]
  7268. }
  7269. }
  7270. }
  7271. },
  7272. "404": {
  7273. "description": "NotFoundError",
  7274. "content": {
  7275. "application/json": {
  7276. "schema": {
  7277. "$ref": "#/components/schemas/NotFoundError"
  7278. }
  7279. }
  7280. }
  7281. }
  7282. },
  7283. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7284. "summary": "Send async message",
  7285. "requestBody": {
  7286. "content": {
  7287. "application/json": {
  7288. "schema": {
  7289. "type": "object",
  7290. "properties": {
  7291. "messageID": {
  7292. "type": "string",
  7293. "pattern": "^msg"
  7294. },
  7295. "model": {
  7296. "type": "object",
  7297. "properties": {
  7298. "providerID": {
  7299. "type": "string"
  7300. },
  7301. "modelID": {
  7302. "type": "string"
  7303. }
  7304. },
  7305. "required": ["providerID", "modelID"],
  7306. "additionalProperties": false
  7307. },
  7308. "agent": {
  7309. "type": "string"
  7310. },
  7311. "noReply": {
  7312. "type": "boolean"
  7313. },
  7314. "tools": {
  7315. "type": "object",
  7316. "additionalProperties": {
  7317. "type": "boolean"
  7318. }
  7319. },
  7320. "format": {
  7321. "$ref": "#/components/schemas/OutputFormat"
  7322. },
  7323. "system": {
  7324. "type": "string"
  7325. },
  7326. "variant": {
  7327. "type": "string"
  7328. },
  7329. "parts": {
  7330. "type": "array",
  7331. "items": {
  7332. "anyOf": [
  7333. {
  7334. "$ref": "#/components/schemas/TextPartInput"
  7335. },
  7336. {
  7337. "$ref": "#/components/schemas/FilePartInput"
  7338. },
  7339. {
  7340. "$ref": "#/components/schemas/AgentPartInput"
  7341. },
  7342. {
  7343. "$ref": "#/components/schemas/SubtaskPartInput"
  7344. }
  7345. ]
  7346. }
  7347. }
  7348. },
  7349. "required": ["parts"],
  7350. "additionalProperties": false
  7351. }
  7352. }
  7353. }
  7354. },
  7355. "x-codeSamples": [
  7356. {
  7357. "lang": "js",
  7358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7359. }
  7360. ]
  7361. }
  7362. },
  7363. "/session/{sessionID}/command": {
  7364. "post": {
  7365. "tags": ["session"],
  7366. "operationId": "session.command",
  7367. "parameters": [
  7368. {
  7369. "name": "sessionID",
  7370. "in": "path",
  7371. "schema": {
  7372. "type": "string",
  7373. "pattern": "^ses"
  7374. },
  7375. "required": true
  7376. },
  7377. {
  7378. "name": "directory",
  7379. "in": "query",
  7380. "schema": {
  7381. "type": "string"
  7382. },
  7383. "required": false
  7384. },
  7385. {
  7386. "name": "workspace",
  7387. "in": "query",
  7388. "schema": {
  7389. "type": "string"
  7390. },
  7391. "required": false
  7392. }
  7393. ],
  7394. "responses": {
  7395. "200": {
  7396. "description": "Created message",
  7397. "content": {
  7398. "application/json": {
  7399. "schema": {
  7400. "type": "object",
  7401. "required": ["info", "parts"],
  7402. "properties": {
  7403. "info": {
  7404. "$ref": "#/components/schemas/AssistantMessage"
  7405. },
  7406. "parts": {
  7407. "type": "array",
  7408. "items": {
  7409. "$ref": "#/components/schemas/Part"
  7410. }
  7411. }
  7412. }
  7413. }
  7414. }
  7415. }
  7416. },
  7417. "400": {
  7418. "description": "BadRequest | InvalidRequestError",
  7419. "content": {
  7420. "application/json": {
  7421. "schema": {
  7422. "anyOf": [
  7423. {
  7424. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7425. },
  7426. {
  7427. "$ref": "#/components/schemas/InvalidRequestError"
  7428. }
  7429. ]
  7430. }
  7431. }
  7432. }
  7433. },
  7434. "404": {
  7435. "description": "NotFoundError",
  7436. "content": {
  7437. "application/json": {
  7438. "schema": {
  7439. "$ref": "#/components/schemas/NotFoundError"
  7440. }
  7441. }
  7442. }
  7443. }
  7444. },
  7445. "description": "Send a new command to a session for execution by the AI assistant.",
  7446. "summary": "Send command",
  7447. "requestBody": {
  7448. "content": {
  7449. "application/json": {
  7450. "schema": {
  7451. "type": "object",
  7452. "properties": {
  7453. "messageID": {
  7454. "type": "string",
  7455. "pattern": "^msg"
  7456. },
  7457. "agent": {
  7458. "type": "string"
  7459. },
  7460. "model": {
  7461. "type": "string"
  7462. },
  7463. "arguments": {
  7464. "type": "string"
  7465. },
  7466. "command": {
  7467. "type": "string"
  7468. },
  7469. "variant": {
  7470. "type": "string"
  7471. },
  7472. "parts": {
  7473. "type": "array",
  7474. "items": {
  7475. "type": "object",
  7476. "properties": {
  7477. "id": {
  7478. "type": "string",
  7479. "pattern": "^prt"
  7480. },
  7481. "type": {
  7482. "type": "string",
  7483. "enum": ["file"]
  7484. },
  7485. "mime": {
  7486. "type": "string"
  7487. },
  7488. "filename": {
  7489. "type": "string"
  7490. },
  7491. "url": {
  7492. "type": "string"
  7493. },
  7494. "source": {
  7495. "$ref": "#/components/schemas/FilePartSource"
  7496. }
  7497. },
  7498. "required": ["type", "mime", "url"],
  7499. "additionalProperties": false
  7500. }
  7501. }
  7502. },
  7503. "required": ["arguments", "command"],
  7504. "additionalProperties": false
  7505. }
  7506. }
  7507. }
  7508. },
  7509. "x-codeSamples": [
  7510. {
  7511. "lang": "js",
  7512. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7513. }
  7514. ]
  7515. }
  7516. },
  7517. "/session/{sessionID}/shell": {
  7518. "post": {
  7519. "tags": ["session"],
  7520. "operationId": "session.shell",
  7521. "parameters": [
  7522. {
  7523. "name": "sessionID",
  7524. "in": "path",
  7525. "schema": {
  7526. "type": "string",
  7527. "pattern": "^ses"
  7528. },
  7529. "required": true
  7530. },
  7531. {
  7532. "name": "directory",
  7533. "in": "query",
  7534. "schema": {
  7535. "type": "string"
  7536. },
  7537. "required": false
  7538. },
  7539. {
  7540. "name": "workspace",
  7541. "in": "query",
  7542. "schema": {
  7543. "type": "string"
  7544. },
  7545. "required": false
  7546. }
  7547. ],
  7548. "responses": {
  7549. "200": {
  7550. "description": "Created message",
  7551. "content": {
  7552. "application/json": {
  7553. "schema": {
  7554. "type": "object",
  7555. "properties": {
  7556. "info": {
  7557. "$ref": "#/components/schemas/Message"
  7558. },
  7559. "parts": {
  7560. "type": "array",
  7561. "items": {
  7562. "$ref": "#/components/schemas/Part"
  7563. }
  7564. }
  7565. },
  7566. "required": ["info", "parts"],
  7567. "additionalProperties": false,
  7568. "description": "Created message"
  7569. }
  7570. }
  7571. }
  7572. },
  7573. "400": {
  7574. "description": "BadRequest | InvalidRequestError",
  7575. "content": {
  7576. "application/json": {
  7577. "schema": {
  7578. "anyOf": [
  7579. {
  7580. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7581. },
  7582. {
  7583. "$ref": "#/components/schemas/InvalidRequestError"
  7584. }
  7585. ]
  7586. }
  7587. }
  7588. }
  7589. },
  7590. "404": {
  7591. "description": "NotFoundError",
  7592. "content": {
  7593. "application/json": {
  7594. "schema": {
  7595. "$ref": "#/components/schemas/NotFoundError"
  7596. }
  7597. }
  7598. }
  7599. },
  7600. "409": {
  7601. "description": "SessionBusyError",
  7602. "content": {
  7603. "application/json": {
  7604. "schema": {
  7605. "$ref": "#/components/schemas/SessionBusyError"
  7606. }
  7607. }
  7608. }
  7609. }
  7610. },
  7611. "description": "Execute a shell command within the session context and return the AI's response.",
  7612. "summary": "Run shell command",
  7613. "requestBody": {
  7614. "content": {
  7615. "application/json": {
  7616. "schema": {
  7617. "type": "object",
  7618. "properties": {
  7619. "messageID": {
  7620. "type": "string",
  7621. "pattern": "^msg"
  7622. },
  7623. "agent": {
  7624. "type": "string"
  7625. },
  7626. "model": {
  7627. "type": "object",
  7628. "properties": {
  7629. "providerID": {
  7630. "type": "string"
  7631. },
  7632. "modelID": {
  7633. "type": "string"
  7634. }
  7635. },
  7636. "required": ["providerID", "modelID"],
  7637. "additionalProperties": false
  7638. },
  7639. "command": {
  7640. "type": "string"
  7641. }
  7642. },
  7643. "required": ["agent", "command"],
  7644. "additionalProperties": false
  7645. }
  7646. }
  7647. }
  7648. },
  7649. "x-codeSamples": [
  7650. {
  7651. "lang": "js",
  7652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7653. }
  7654. ]
  7655. }
  7656. },
  7657. "/session/{sessionID}/revert": {
  7658. "post": {
  7659. "tags": ["session"],
  7660. "operationId": "session.revert",
  7661. "parameters": [
  7662. {
  7663. "name": "sessionID",
  7664. "in": "path",
  7665. "schema": {
  7666. "type": "string",
  7667. "pattern": "^ses"
  7668. },
  7669. "required": true
  7670. },
  7671. {
  7672. "name": "directory",
  7673. "in": "query",
  7674. "schema": {
  7675. "type": "string"
  7676. },
  7677. "required": false
  7678. },
  7679. {
  7680. "name": "workspace",
  7681. "in": "query",
  7682. "schema": {
  7683. "type": "string"
  7684. },
  7685. "required": false
  7686. }
  7687. ],
  7688. "responses": {
  7689. "200": {
  7690. "description": "Updated session",
  7691. "content": {
  7692. "application/json": {
  7693. "schema": {
  7694. "$ref": "#/components/schemas/Session"
  7695. }
  7696. }
  7697. }
  7698. },
  7699. "400": {
  7700. "description": "BadRequest | InvalidRequestError",
  7701. "content": {
  7702. "application/json": {
  7703. "schema": {
  7704. "anyOf": [
  7705. {
  7706. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7707. },
  7708. {
  7709. "$ref": "#/components/schemas/InvalidRequestError"
  7710. }
  7711. ]
  7712. }
  7713. }
  7714. }
  7715. },
  7716. "404": {
  7717. "description": "NotFoundError",
  7718. "content": {
  7719. "application/json": {
  7720. "schema": {
  7721. "$ref": "#/components/schemas/NotFoundError"
  7722. }
  7723. }
  7724. }
  7725. },
  7726. "409": {
  7727. "description": "SessionBusyError",
  7728. "content": {
  7729. "application/json": {
  7730. "schema": {
  7731. "$ref": "#/components/schemas/SessionBusyError"
  7732. }
  7733. }
  7734. }
  7735. }
  7736. },
  7737. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7738. "summary": "Revert message",
  7739. "requestBody": {
  7740. "content": {
  7741. "application/json": {
  7742. "schema": {
  7743. "type": "object",
  7744. "properties": {
  7745. "messageID": {
  7746. "type": "string",
  7747. "pattern": "^msg"
  7748. },
  7749. "partID": {
  7750. "type": "string",
  7751. "pattern": "^prt"
  7752. }
  7753. },
  7754. "required": ["messageID"],
  7755. "additionalProperties": false
  7756. }
  7757. }
  7758. }
  7759. },
  7760. "x-codeSamples": [
  7761. {
  7762. "lang": "js",
  7763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7764. }
  7765. ]
  7766. }
  7767. },
  7768. "/session/{sessionID}/unrevert": {
  7769. "post": {
  7770. "tags": ["session"],
  7771. "operationId": "session.unrevert",
  7772. "parameters": [
  7773. {
  7774. "name": "sessionID",
  7775. "in": "path",
  7776. "schema": {
  7777. "type": "string",
  7778. "pattern": "^ses"
  7779. },
  7780. "required": true
  7781. },
  7782. {
  7783. "name": "directory",
  7784. "in": "query",
  7785. "schema": {
  7786. "type": "string"
  7787. },
  7788. "required": false
  7789. },
  7790. {
  7791. "name": "workspace",
  7792. "in": "query",
  7793. "schema": {
  7794. "type": "string"
  7795. },
  7796. "required": false
  7797. }
  7798. ],
  7799. "responses": {
  7800. "200": {
  7801. "description": "Updated session",
  7802. "content": {
  7803. "application/json": {
  7804. "schema": {
  7805. "$ref": "#/components/schemas/Session"
  7806. }
  7807. }
  7808. }
  7809. },
  7810. "400": {
  7811. "description": "BadRequest | InvalidRequestError",
  7812. "content": {
  7813. "application/json": {
  7814. "schema": {
  7815. "anyOf": [
  7816. {
  7817. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7818. },
  7819. {
  7820. "$ref": "#/components/schemas/InvalidRequestError"
  7821. }
  7822. ]
  7823. }
  7824. }
  7825. }
  7826. },
  7827. "404": {
  7828. "description": "NotFoundError",
  7829. "content": {
  7830. "application/json": {
  7831. "schema": {
  7832. "$ref": "#/components/schemas/NotFoundError"
  7833. }
  7834. }
  7835. }
  7836. },
  7837. "409": {
  7838. "description": "SessionBusyError",
  7839. "content": {
  7840. "application/json": {
  7841. "schema": {
  7842. "$ref": "#/components/schemas/SessionBusyError"
  7843. }
  7844. }
  7845. }
  7846. }
  7847. },
  7848. "description": "Restore all previously reverted messages in a session.",
  7849. "summary": "Restore reverted messages",
  7850. "x-codeSamples": [
  7851. {
  7852. "lang": "js",
  7853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7854. }
  7855. ]
  7856. }
  7857. },
  7858. "/session/{sessionID}/permissions/{permissionID}": {
  7859. "post": {
  7860. "tags": ["session"],
  7861. "operationId": "permission.respond",
  7862. "parameters": [
  7863. {
  7864. "name": "sessionID",
  7865. "in": "path",
  7866. "schema": {
  7867. "type": "string",
  7868. "pattern": "^ses"
  7869. },
  7870. "required": true
  7871. },
  7872. {
  7873. "name": "permissionID",
  7874. "in": "path",
  7875. "schema": {
  7876. "type": "string",
  7877. "pattern": "^per"
  7878. },
  7879. "required": true
  7880. },
  7881. {
  7882. "name": "directory",
  7883. "in": "query",
  7884. "schema": {
  7885. "type": "string"
  7886. },
  7887. "required": false
  7888. },
  7889. {
  7890. "name": "workspace",
  7891. "in": "query",
  7892. "schema": {
  7893. "type": "string"
  7894. },
  7895. "required": false
  7896. }
  7897. ],
  7898. "responses": {
  7899. "200": {
  7900. "description": "Permission processed successfully",
  7901. "content": {
  7902. "application/json": {
  7903. "schema": {
  7904. "type": "boolean",
  7905. "description": "Permission processed successfully"
  7906. }
  7907. }
  7908. }
  7909. },
  7910. "400": {
  7911. "description": "BadRequest | InvalidRequestError",
  7912. "content": {
  7913. "application/json": {
  7914. "schema": {
  7915. "anyOf": [
  7916. {
  7917. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7918. },
  7919. {
  7920. "$ref": "#/components/schemas/InvalidRequestError"
  7921. }
  7922. ]
  7923. }
  7924. }
  7925. }
  7926. },
  7927. "404": {
  7928. "description": "NotFoundError | PermissionNotFoundError",
  7929. "content": {
  7930. "application/json": {
  7931. "schema": {
  7932. "anyOf": [
  7933. {
  7934. "$ref": "#/components/schemas/NotFoundError"
  7935. },
  7936. {
  7937. "$ref": "#/components/schemas/PermissionNotFoundError"
  7938. }
  7939. ]
  7940. }
  7941. }
  7942. }
  7943. }
  7944. },
  7945. "description": "Approve or deny a permission request from the AI assistant.",
  7946. "summary": "Respond to permission",
  7947. "deprecated": true,
  7948. "requestBody": {
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "type": "object",
  7953. "properties": {
  7954. "response": {
  7955. "type": "string",
  7956. "enum": ["once", "always", "reject"]
  7957. }
  7958. },
  7959. "required": ["response"],
  7960. "additionalProperties": false
  7961. }
  7962. }
  7963. }
  7964. },
  7965. "x-codeSamples": [
  7966. {
  7967. "lang": "js",
  7968. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7969. }
  7970. ]
  7971. }
  7972. },
  7973. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7974. "delete": {
  7975. "tags": ["session"],
  7976. "operationId": "part.delete",
  7977. "parameters": [
  7978. {
  7979. "name": "sessionID",
  7980. "in": "path",
  7981. "schema": {
  7982. "type": "string",
  7983. "pattern": "^ses"
  7984. },
  7985. "required": true
  7986. },
  7987. {
  7988. "name": "messageID",
  7989. "in": "path",
  7990. "schema": {
  7991. "type": "string",
  7992. "pattern": "^msg"
  7993. },
  7994. "required": true
  7995. },
  7996. {
  7997. "name": "partID",
  7998. "in": "path",
  7999. "schema": {
  8000. "type": "string",
  8001. "pattern": "^prt"
  8002. },
  8003. "required": true
  8004. },
  8005. {
  8006. "name": "directory",
  8007. "in": "query",
  8008. "schema": {
  8009. "type": "string"
  8010. },
  8011. "required": false
  8012. },
  8013. {
  8014. "name": "workspace",
  8015. "in": "query",
  8016. "schema": {
  8017. "type": "string"
  8018. },
  8019. "required": false
  8020. }
  8021. ],
  8022. "responses": {
  8023. "200": {
  8024. "description": "Successfully deleted part",
  8025. "content": {
  8026. "application/json": {
  8027. "schema": {
  8028. "type": "boolean",
  8029. "description": "Successfully deleted part"
  8030. }
  8031. }
  8032. }
  8033. },
  8034. "400": {
  8035. "description": "BadRequest | InvalidRequestError",
  8036. "content": {
  8037. "application/json": {
  8038. "schema": {
  8039. "anyOf": [
  8040. {
  8041. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8042. },
  8043. {
  8044. "$ref": "#/components/schemas/InvalidRequestError"
  8045. }
  8046. ]
  8047. }
  8048. }
  8049. }
  8050. },
  8051. "404": {
  8052. "description": "NotFoundError",
  8053. "content": {
  8054. "application/json": {
  8055. "schema": {
  8056. "$ref": "#/components/schemas/NotFoundError"
  8057. }
  8058. }
  8059. }
  8060. }
  8061. },
  8062. "description": "Delete a part from a message.",
  8063. "x-codeSamples": [
  8064. {
  8065. "lang": "js",
  8066. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  8067. }
  8068. ]
  8069. },
  8070. "patch": {
  8071. "tags": ["session"],
  8072. "operationId": "part.update",
  8073. "parameters": [
  8074. {
  8075. "name": "sessionID",
  8076. "in": "path",
  8077. "schema": {
  8078. "type": "string",
  8079. "pattern": "^ses"
  8080. },
  8081. "required": true
  8082. },
  8083. {
  8084. "name": "messageID",
  8085. "in": "path",
  8086. "schema": {
  8087. "type": "string",
  8088. "pattern": "^msg"
  8089. },
  8090. "required": true
  8091. },
  8092. {
  8093. "name": "partID",
  8094. "in": "path",
  8095. "schema": {
  8096. "type": "string",
  8097. "pattern": "^prt"
  8098. },
  8099. "required": true
  8100. },
  8101. {
  8102. "name": "directory",
  8103. "in": "query",
  8104. "schema": {
  8105. "type": "string"
  8106. },
  8107. "required": false
  8108. },
  8109. {
  8110. "name": "workspace",
  8111. "in": "query",
  8112. "schema": {
  8113. "type": "string"
  8114. },
  8115. "required": false
  8116. }
  8117. ],
  8118. "responses": {
  8119. "200": {
  8120. "description": "Successfully updated part",
  8121. "content": {
  8122. "application/json": {
  8123. "schema": {
  8124. "$ref": "#/components/schemas/Part"
  8125. }
  8126. }
  8127. }
  8128. },
  8129. "400": {
  8130. "description": "BadRequest | InvalidRequestError",
  8131. "content": {
  8132. "application/json": {
  8133. "schema": {
  8134. "anyOf": [
  8135. {
  8136. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8137. },
  8138. {
  8139. "$ref": "#/components/schemas/InvalidRequestError"
  8140. }
  8141. ]
  8142. }
  8143. }
  8144. }
  8145. },
  8146. "404": {
  8147. "description": "NotFoundError",
  8148. "content": {
  8149. "application/json": {
  8150. "schema": {
  8151. "$ref": "#/components/schemas/NotFoundError"
  8152. }
  8153. }
  8154. }
  8155. }
  8156. },
  8157. "description": "Update a part in a message.",
  8158. "requestBody": {
  8159. "content": {
  8160. "application/json": {
  8161. "schema": {
  8162. "$ref": "#/components/schemas/Part"
  8163. }
  8164. }
  8165. }
  8166. },
  8167. "x-codeSamples": [
  8168. {
  8169. "lang": "js",
  8170. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8171. }
  8172. ]
  8173. }
  8174. },
  8175. "/sync/start": {
  8176. "post": {
  8177. "tags": ["sync"],
  8178. "operationId": "sync.start",
  8179. "parameters": [
  8180. {
  8181. "name": "directory",
  8182. "in": "query",
  8183. "schema": {
  8184. "type": "string"
  8185. },
  8186. "required": false
  8187. },
  8188. {
  8189. "name": "workspace",
  8190. "in": "query",
  8191. "schema": {
  8192. "type": "string"
  8193. },
  8194. "required": false
  8195. }
  8196. ],
  8197. "responses": {
  8198. "200": {
  8199. "description": "Workspace sync started",
  8200. "content": {
  8201. "application/json": {
  8202. "schema": {
  8203. "type": "boolean",
  8204. "description": "Workspace sync started"
  8205. }
  8206. }
  8207. }
  8208. },
  8209. "400": {
  8210. "description": "Bad request",
  8211. "content": {
  8212. "application/json": {
  8213. "schema": {
  8214. "$ref": "#/components/schemas/BadRequestError"
  8215. }
  8216. }
  8217. }
  8218. }
  8219. },
  8220. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8221. "summary": "Start workspace sync",
  8222. "x-codeSamples": [
  8223. {
  8224. "lang": "js",
  8225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8226. }
  8227. ]
  8228. }
  8229. },
  8230. "/sync/replay": {
  8231. "post": {
  8232. "tags": ["sync"],
  8233. "operationId": "sync.replay",
  8234. "parameters": [
  8235. {
  8236. "name": "directory",
  8237. "in": "query",
  8238. "schema": {
  8239. "type": "string"
  8240. },
  8241. "required": false
  8242. },
  8243. {
  8244. "name": "workspace",
  8245. "in": "query",
  8246. "schema": {
  8247. "type": "string"
  8248. },
  8249. "required": false
  8250. }
  8251. ],
  8252. "responses": {
  8253. "200": {
  8254. "description": "Replayed sync events",
  8255. "content": {
  8256. "application/json": {
  8257. "schema": {
  8258. "type": "object",
  8259. "properties": {
  8260. "sessionID": {
  8261. "type": "string"
  8262. }
  8263. },
  8264. "required": ["sessionID"],
  8265. "additionalProperties": false,
  8266. "description": "Replayed sync events"
  8267. }
  8268. }
  8269. }
  8270. },
  8271. "400": {
  8272. "description": "BadRequest | InvalidRequestError",
  8273. "content": {
  8274. "application/json": {
  8275. "schema": {
  8276. "anyOf": [
  8277. {
  8278. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8279. },
  8280. {
  8281. "$ref": "#/components/schemas/InvalidRequestError"
  8282. }
  8283. ]
  8284. }
  8285. }
  8286. }
  8287. }
  8288. },
  8289. "description": "Validate and replay a complete sync event history.",
  8290. "summary": "Replay sync events",
  8291. "requestBody": {
  8292. "content": {
  8293. "application/json": {
  8294. "schema": {
  8295. "type": "object",
  8296. "properties": {
  8297. "directory": {
  8298. "type": "string"
  8299. },
  8300. "events": {
  8301. "type": "array",
  8302. "minItems": 1,
  8303. "items": {
  8304. "type": "object",
  8305. "properties": {
  8306. "id": {
  8307. "type": "string",
  8308. "pattern": "^evt_"
  8309. },
  8310. "aggregateID": {
  8311. "type": "string"
  8312. },
  8313. "seq": {
  8314. "type": "integer",
  8315. "minimum": 0
  8316. },
  8317. "type": {
  8318. "type": "string"
  8319. },
  8320. "data": {
  8321. "type": "object"
  8322. }
  8323. },
  8324. "required": ["id", "aggregateID", "seq", "type", "data"],
  8325. "additionalProperties": false
  8326. }
  8327. }
  8328. },
  8329. "required": ["directory", "events"],
  8330. "additionalProperties": false
  8331. }
  8332. }
  8333. }
  8334. },
  8335. "x-codeSamples": [
  8336. {
  8337. "lang": "js",
  8338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8339. }
  8340. ]
  8341. }
  8342. },
  8343. "/sync/steal": {
  8344. "post": {
  8345. "tags": ["sync"],
  8346. "operationId": "sync.steal",
  8347. "parameters": [
  8348. {
  8349. "name": "directory",
  8350. "in": "query",
  8351. "schema": {
  8352. "type": "string"
  8353. },
  8354. "required": false
  8355. },
  8356. {
  8357. "name": "workspace",
  8358. "in": "query",
  8359. "schema": {
  8360. "type": "string"
  8361. },
  8362. "required": false
  8363. }
  8364. ],
  8365. "responses": {
  8366. "200": {
  8367. "description": "Session stolen into workspace",
  8368. "content": {
  8369. "application/json": {
  8370. "schema": {
  8371. "type": "object",
  8372. "properties": {
  8373. "sessionID": {
  8374. "type": "string",
  8375. "pattern": "^ses"
  8376. }
  8377. },
  8378. "required": ["sessionID"],
  8379. "additionalProperties": false,
  8380. "description": "Session stolen into workspace"
  8381. }
  8382. }
  8383. }
  8384. },
  8385. "400": {
  8386. "description": "BadRequest | InvalidRequestError",
  8387. "content": {
  8388. "application/json": {
  8389. "schema": {
  8390. "anyOf": [
  8391. {
  8392. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8393. },
  8394. {
  8395. "$ref": "#/components/schemas/InvalidRequestError"
  8396. }
  8397. ]
  8398. }
  8399. }
  8400. }
  8401. }
  8402. },
  8403. "description": "Update a session to belong to the current workspace through the sync event system.",
  8404. "summary": "Steal session into workspace",
  8405. "requestBody": {
  8406. "content": {
  8407. "application/json": {
  8408. "schema": {
  8409. "type": "object",
  8410. "properties": {
  8411. "sessionID": {
  8412. "type": "string",
  8413. "pattern": "^ses"
  8414. }
  8415. },
  8416. "required": ["sessionID"],
  8417. "additionalProperties": false
  8418. }
  8419. }
  8420. }
  8421. },
  8422. "x-codeSamples": [
  8423. {
  8424. "lang": "js",
  8425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8426. }
  8427. ]
  8428. }
  8429. },
  8430. "/sync/history": {
  8431. "post": {
  8432. "tags": ["sync"],
  8433. "operationId": "sync.history.list",
  8434. "parameters": [
  8435. {
  8436. "name": "directory",
  8437. "in": "query",
  8438. "schema": {
  8439. "type": "string"
  8440. },
  8441. "required": false
  8442. },
  8443. {
  8444. "name": "workspace",
  8445. "in": "query",
  8446. "schema": {
  8447. "type": "string"
  8448. },
  8449. "required": false
  8450. }
  8451. ],
  8452. "responses": {
  8453. "200": {
  8454. "description": "Sync events",
  8455. "content": {
  8456. "application/json": {
  8457. "schema": {
  8458. "type": "array",
  8459. "items": {
  8460. "type": "object",
  8461. "properties": {
  8462. "id": {
  8463. "type": "string",
  8464. "pattern": "^evt_"
  8465. },
  8466. "aggregate_id": {
  8467. "type": "string"
  8468. },
  8469. "seq": {
  8470. "type": "integer",
  8471. "minimum": 0
  8472. },
  8473. "type": {
  8474. "type": "string"
  8475. },
  8476. "data": {
  8477. "type": "object"
  8478. }
  8479. },
  8480. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8481. "additionalProperties": false
  8482. },
  8483. "description": "Sync events"
  8484. }
  8485. }
  8486. }
  8487. },
  8488. "400": {
  8489. "description": "BadRequest | InvalidRequestError",
  8490. "content": {
  8491. "application/json": {
  8492. "schema": {
  8493. "anyOf": [
  8494. {
  8495. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8496. },
  8497. {
  8498. "$ref": "#/components/schemas/InvalidRequestError"
  8499. }
  8500. ]
  8501. }
  8502. }
  8503. }
  8504. }
  8505. },
  8506. "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.",
  8507. "summary": "List sync events",
  8508. "requestBody": {
  8509. "content": {
  8510. "application/json": {
  8511. "schema": {
  8512. "type": "object",
  8513. "additionalProperties": {
  8514. "type": "integer",
  8515. "minimum": 0
  8516. }
  8517. }
  8518. }
  8519. }
  8520. },
  8521. "x-codeSamples": [
  8522. {
  8523. "lang": "js",
  8524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8525. }
  8526. ]
  8527. }
  8528. },
  8529. "/tui/append-prompt": {
  8530. "post": {
  8531. "tags": ["tui"],
  8532. "operationId": "tui.appendPrompt",
  8533. "parameters": [
  8534. {
  8535. "name": "directory",
  8536. "in": "query",
  8537. "schema": {
  8538. "type": "string"
  8539. },
  8540. "required": false
  8541. },
  8542. {
  8543. "name": "workspace",
  8544. "in": "query",
  8545. "schema": {
  8546. "type": "string"
  8547. },
  8548. "required": false
  8549. }
  8550. ],
  8551. "responses": {
  8552. "200": {
  8553. "description": "Prompt processed successfully",
  8554. "content": {
  8555. "application/json": {
  8556. "schema": {
  8557. "type": "boolean",
  8558. "description": "Prompt processed successfully"
  8559. }
  8560. }
  8561. }
  8562. },
  8563. "400": {
  8564. "description": "BadRequest | InvalidRequestError",
  8565. "content": {
  8566. "application/json": {
  8567. "schema": {
  8568. "anyOf": [
  8569. {
  8570. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8571. },
  8572. {
  8573. "$ref": "#/components/schemas/InvalidRequestError"
  8574. }
  8575. ]
  8576. }
  8577. }
  8578. }
  8579. }
  8580. },
  8581. "description": "Append prompt to the TUI.",
  8582. "summary": "Append TUI prompt",
  8583. "requestBody": {
  8584. "content": {
  8585. "application/json": {
  8586. "schema": {
  8587. "type": "object",
  8588. "properties": {
  8589. "text": {
  8590. "type": "string"
  8591. }
  8592. },
  8593. "required": ["text"],
  8594. "additionalProperties": false
  8595. }
  8596. }
  8597. }
  8598. },
  8599. "x-codeSamples": [
  8600. {
  8601. "lang": "js",
  8602. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8603. }
  8604. ]
  8605. }
  8606. },
  8607. "/tui/open-help": {
  8608. "post": {
  8609. "tags": ["tui"],
  8610. "operationId": "tui.openHelp",
  8611. "parameters": [
  8612. {
  8613. "name": "directory",
  8614. "in": "query",
  8615. "schema": {
  8616. "type": "string"
  8617. },
  8618. "required": false
  8619. },
  8620. {
  8621. "name": "workspace",
  8622. "in": "query",
  8623. "schema": {
  8624. "type": "string"
  8625. },
  8626. "required": false
  8627. }
  8628. ],
  8629. "responses": {
  8630. "200": {
  8631. "description": "Help dialog opened successfully",
  8632. "content": {
  8633. "application/json": {
  8634. "schema": {
  8635. "type": "boolean",
  8636. "description": "Help dialog opened successfully"
  8637. }
  8638. }
  8639. }
  8640. },
  8641. "400": {
  8642. "description": "Bad request",
  8643. "content": {
  8644. "application/json": {
  8645. "schema": {
  8646. "$ref": "#/components/schemas/BadRequestError"
  8647. }
  8648. }
  8649. }
  8650. }
  8651. },
  8652. "description": "Open the help dialog in the TUI to display user assistance information.",
  8653. "summary": "Open help dialog",
  8654. "x-codeSamples": [
  8655. {
  8656. "lang": "js",
  8657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8658. }
  8659. ]
  8660. }
  8661. },
  8662. "/tui/open-sessions": {
  8663. "post": {
  8664. "tags": ["tui"],
  8665. "operationId": "tui.openSessions",
  8666. "parameters": [
  8667. {
  8668. "name": "directory",
  8669. "in": "query",
  8670. "schema": {
  8671. "type": "string"
  8672. },
  8673. "required": false
  8674. },
  8675. {
  8676. "name": "workspace",
  8677. "in": "query",
  8678. "schema": {
  8679. "type": "string"
  8680. },
  8681. "required": false
  8682. }
  8683. ],
  8684. "responses": {
  8685. "200": {
  8686. "description": "Session dialog opened successfully",
  8687. "content": {
  8688. "application/json": {
  8689. "schema": {
  8690. "type": "boolean",
  8691. "description": "Session dialog opened successfully"
  8692. }
  8693. }
  8694. }
  8695. },
  8696. "400": {
  8697. "description": "Bad request",
  8698. "content": {
  8699. "application/json": {
  8700. "schema": {
  8701. "$ref": "#/components/schemas/BadRequestError"
  8702. }
  8703. }
  8704. }
  8705. }
  8706. },
  8707. "description": "Open the session dialog.",
  8708. "summary": "Open sessions dialog",
  8709. "x-codeSamples": [
  8710. {
  8711. "lang": "js",
  8712. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8713. }
  8714. ]
  8715. }
  8716. },
  8717. "/tui/open-themes": {
  8718. "post": {
  8719. "tags": ["tui"],
  8720. "operationId": "tui.openThemes",
  8721. "parameters": [
  8722. {
  8723. "name": "directory",
  8724. "in": "query",
  8725. "schema": {
  8726. "type": "string"
  8727. },
  8728. "required": false
  8729. },
  8730. {
  8731. "name": "workspace",
  8732. "in": "query",
  8733. "schema": {
  8734. "type": "string"
  8735. },
  8736. "required": false
  8737. }
  8738. ],
  8739. "responses": {
  8740. "200": {
  8741. "description": "Theme dialog opened successfully",
  8742. "content": {
  8743. "application/json": {
  8744. "schema": {
  8745. "type": "boolean",
  8746. "description": "Theme dialog opened successfully"
  8747. }
  8748. }
  8749. }
  8750. },
  8751. "400": {
  8752. "description": "Bad request",
  8753. "content": {
  8754. "application/json": {
  8755. "schema": {
  8756. "$ref": "#/components/schemas/BadRequestError"
  8757. }
  8758. }
  8759. }
  8760. }
  8761. },
  8762. "description": "Open the theme dialog.",
  8763. "summary": "Open themes dialog",
  8764. "x-codeSamples": [
  8765. {
  8766. "lang": "js",
  8767. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8768. }
  8769. ]
  8770. }
  8771. },
  8772. "/tui/open-models": {
  8773. "post": {
  8774. "tags": ["tui"],
  8775. "operationId": "tui.openModels",
  8776. "parameters": [
  8777. {
  8778. "name": "directory",
  8779. "in": "query",
  8780. "schema": {
  8781. "type": "string"
  8782. },
  8783. "required": false
  8784. },
  8785. {
  8786. "name": "workspace",
  8787. "in": "query",
  8788. "schema": {
  8789. "type": "string"
  8790. },
  8791. "required": false
  8792. }
  8793. ],
  8794. "responses": {
  8795. "200": {
  8796. "description": "Model dialog opened successfully",
  8797. "content": {
  8798. "application/json": {
  8799. "schema": {
  8800. "type": "boolean",
  8801. "description": "Model dialog opened successfully"
  8802. }
  8803. }
  8804. }
  8805. },
  8806. "400": {
  8807. "description": "Bad request",
  8808. "content": {
  8809. "application/json": {
  8810. "schema": {
  8811. "$ref": "#/components/schemas/BadRequestError"
  8812. }
  8813. }
  8814. }
  8815. }
  8816. },
  8817. "description": "Open the model dialog.",
  8818. "summary": "Open models dialog",
  8819. "x-codeSamples": [
  8820. {
  8821. "lang": "js",
  8822. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8823. }
  8824. ]
  8825. }
  8826. },
  8827. "/tui/submit-prompt": {
  8828. "post": {
  8829. "tags": ["tui"],
  8830. "operationId": "tui.submitPrompt",
  8831. "parameters": [
  8832. {
  8833. "name": "directory",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "string"
  8837. },
  8838. "required": false
  8839. },
  8840. {
  8841. "name": "workspace",
  8842. "in": "query",
  8843. "schema": {
  8844. "type": "string"
  8845. },
  8846. "required": false
  8847. }
  8848. ],
  8849. "responses": {
  8850. "200": {
  8851. "description": "Prompt submitted successfully",
  8852. "content": {
  8853. "application/json": {
  8854. "schema": {
  8855. "type": "boolean",
  8856. "description": "Prompt submitted successfully"
  8857. }
  8858. }
  8859. }
  8860. },
  8861. "400": {
  8862. "description": "Bad request",
  8863. "content": {
  8864. "application/json": {
  8865. "schema": {
  8866. "$ref": "#/components/schemas/BadRequestError"
  8867. }
  8868. }
  8869. }
  8870. }
  8871. },
  8872. "description": "Submit the prompt.",
  8873. "summary": "Submit TUI prompt",
  8874. "x-codeSamples": [
  8875. {
  8876. "lang": "js",
  8877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8878. }
  8879. ]
  8880. }
  8881. },
  8882. "/tui/clear-prompt": {
  8883. "post": {
  8884. "tags": ["tui"],
  8885. "operationId": "tui.clearPrompt",
  8886. "parameters": [
  8887. {
  8888. "name": "directory",
  8889. "in": "query",
  8890. "schema": {
  8891. "type": "string"
  8892. },
  8893. "required": false
  8894. },
  8895. {
  8896. "name": "workspace",
  8897. "in": "query",
  8898. "schema": {
  8899. "type": "string"
  8900. },
  8901. "required": false
  8902. }
  8903. ],
  8904. "responses": {
  8905. "200": {
  8906. "description": "Prompt cleared successfully",
  8907. "content": {
  8908. "application/json": {
  8909. "schema": {
  8910. "type": "boolean",
  8911. "description": "Prompt cleared successfully"
  8912. }
  8913. }
  8914. }
  8915. },
  8916. "400": {
  8917. "description": "Bad request",
  8918. "content": {
  8919. "application/json": {
  8920. "schema": {
  8921. "$ref": "#/components/schemas/BadRequestError"
  8922. }
  8923. }
  8924. }
  8925. }
  8926. },
  8927. "description": "Clear the prompt.",
  8928. "summary": "Clear TUI prompt",
  8929. "x-codeSamples": [
  8930. {
  8931. "lang": "js",
  8932. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8933. }
  8934. ]
  8935. }
  8936. },
  8937. "/tui/execute-command": {
  8938. "post": {
  8939. "tags": ["tui"],
  8940. "operationId": "tui.executeCommand",
  8941. "parameters": [
  8942. {
  8943. "name": "directory",
  8944. "in": "query",
  8945. "schema": {
  8946. "type": "string"
  8947. },
  8948. "required": false
  8949. },
  8950. {
  8951. "name": "workspace",
  8952. "in": "query",
  8953. "schema": {
  8954. "type": "string"
  8955. },
  8956. "required": false
  8957. }
  8958. ],
  8959. "responses": {
  8960. "200": {
  8961. "description": "Command executed successfully",
  8962. "content": {
  8963. "application/json": {
  8964. "schema": {
  8965. "type": "boolean",
  8966. "description": "Command executed successfully"
  8967. }
  8968. }
  8969. }
  8970. },
  8971. "400": {
  8972. "description": "BadRequest | InvalidRequestError",
  8973. "content": {
  8974. "application/json": {
  8975. "schema": {
  8976. "anyOf": [
  8977. {
  8978. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8979. },
  8980. {
  8981. "$ref": "#/components/schemas/InvalidRequestError"
  8982. }
  8983. ]
  8984. }
  8985. }
  8986. }
  8987. }
  8988. },
  8989. "description": "Execute a TUI command.",
  8990. "summary": "Execute TUI command",
  8991. "requestBody": {
  8992. "content": {
  8993. "application/json": {
  8994. "schema": {
  8995. "type": "object",
  8996. "properties": {
  8997. "command": {
  8998. "type": "string"
  8999. }
  9000. },
  9001. "required": ["command"],
  9002. "additionalProperties": false
  9003. }
  9004. }
  9005. }
  9006. },
  9007. "x-codeSamples": [
  9008. {
  9009. "lang": "js",
  9010. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9011. }
  9012. ]
  9013. }
  9014. },
  9015. "/tui/show-toast": {
  9016. "post": {
  9017. "tags": ["tui"],
  9018. "operationId": "tui.showToast",
  9019. "parameters": [
  9020. {
  9021. "name": "directory",
  9022. "in": "query",
  9023. "schema": {
  9024. "type": "string"
  9025. },
  9026. "required": false
  9027. },
  9028. {
  9029. "name": "workspace",
  9030. "in": "query",
  9031. "schema": {
  9032. "type": "string"
  9033. },
  9034. "required": false
  9035. }
  9036. ],
  9037. "responses": {
  9038. "200": {
  9039. "description": "Toast notification shown successfully",
  9040. "content": {
  9041. "application/json": {
  9042. "schema": {
  9043. "type": "boolean",
  9044. "description": "Toast notification shown successfully"
  9045. }
  9046. }
  9047. }
  9048. },
  9049. "400": {
  9050. "description": "Bad request",
  9051. "content": {
  9052. "application/json": {
  9053. "schema": {
  9054. "$ref": "#/components/schemas/BadRequestError"
  9055. }
  9056. }
  9057. }
  9058. }
  9059. },
  9060. "description": "Show a toast notification in the TUI.",
  9061. "summary": "Show TUI toast",
  9062. "requestBody": {
  9063. "content": {
  9064. "application/json": {
  9065. "schema": {
  9066. "type": "object",
  9067. "properties": {
  9068. "title": {
  9069. "type": "string"
  9070. },
  9071. "message": {
  9072. "type": "string"
  9073. },
  9074. "variant": {
  9075. "type": "string",
  9076. "enum": ["info", "success", "warning", "error"]
  9077. },
  9078. "duration": {
  9079. "type": "integer",
  9080. "exclusiveMinimum": 0
  9081. }
  9082. },
  9083. "required": ["message", "variant"],
  9084. "additionalProperties": false
  9085. }
  9086. }
  9087. }
  9088. },
  9089. "x-codeSamples": [
  9090. {
  9091. "lang": "js",
  9092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9093. }
  9094. ]
  9095. }
  9096. },
  9097. "/tui/publish": {
  9098. "post": {
  9099. "tags": ["tui"],
  9100. "operationId": "tui.publish",
  9101. "parameters": [
  9102. {
  9103. "name": "directory",
  9104. "in": "query",
  9105. "schema": {
  9106. "type": "string"
  9107. },
  9108. "required": false
  9109. },
  9110. {
  9111. "name": "workspace",
  9112. "in": "query",
  9113. "schema": {
  9114. "type": "string"
  9115. },
  9116. "required": false
  9117. }
  9118. ],
  9119. "responses": {
  9120. "200": {
  9121. "description": "Event published successfully",
  9122. "content": {
  9123. "application/json": {
  9124. "schema": {
  9125. "type": "boolean",
  9126. "description": "Event published successfully"
  9127. }
  9128. }
  9129. }
  9130. },
  9131. "400": {
  9132. "description": "BadRequest | InvalidRequestError",
  9133. "content": {
  9134. "application/json": {
  9135. "schema": {
  9136. "anyOf": [
  9137. {
  9138. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9139. },
  9140. {
  9141. "$ref": "#/components/schemas/InvalidRequestError"
  9142. }
  9143. ]
  9144. }
  9145. }
  9146. }
  9147. }
  9148. },
  9149. "description": "Publish a TUI event.",
  9150. "summary": "Publish TUI event",
  9151. "requestBody": {
  9152. "content": {
  9153. "application/json": {
  9154. "schema": {
  9155. "anyOf": [
  9156. {
  9157. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9158. },
  9159. {
  9160. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9161. },
  9162. {
  9163. "$ref": "#/components/schemas/EventTuiToastShow"
  9164. },
  9165. {
  9166. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9167. }
  9168. ]
  9169. }
  9170. }
  9171. }
  9172. },
  9173. "x-codeSamples": [
  9174. {
  9175. "lang": "js",
  9176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9177. }
  9178. ]
  9179. }
  9180. },
  9181. "/tui/select-session": {
  9182. "post": {
  9183. "tags": ["tui"],
  9184. "operationId": "tui.selectSession",
  9185. "parameters": [
  9186. {
  9187. "name": "directory",
  9188. "in": "query",
  9189. "schema": {
  9190. "type": "string"
  9191. },
  9192. "required": false
  9193. },
  9194. {
  9195. "name": "workspace",
  9196. "in": "query",
  9197. "schema": {
  9198. "type": "string"
  9199. },
  9200. "required": false
  9201. }
  9202. ],
  9203. "responses": {
  9204. "200": {
  9205. "description": "Session selected successfully",
  9206. "content": {
  9207. "application/json": {
  9208. "schema": {
  9209. "type": "boolean",
  9210. "description": "Session selected successfully"
  9211. }
  9212. }
  9213. }
  9214. },
  9215. "400": {
  9216. "description": "BadRequest | InvalidRequestError",
  9217. "content": {
  9218. "application/json": {
  9219. "schema": {
  9220. "anyOf": [
  9221. {
  9222. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9223. },
  9224. {
  9225. "$ref": "#/components/schemas/InvalidRequestError"
  9226. }
  9227. ]
  9228. }
  9229. }
  9230. }
  9231. },
  9232. "404": {
  9233. "description": "NotFoundError",
  9234. "content": {
  9235. "application/json": {
  9236. "schema": {
  9237. "$ref": "#/components/schemas/NotFoundError"
  9238. }
  9239. }
  9240. }
  9241. }
  9242. },
  9243. "description": "Navigate the TUI to display the specified session.",
  9244. "summary": "Select session",
  9245. "requestBody": {
  9246. "content": {
  9247. "application/json": {
  9248. "schema": {
  9249. "type": "object",
  9250. "properties": {
  9251. "sessionID": {
  9252. "type": "string",
  9253. "pattern": "^ses",
  9254. "description": "Session ID to navigate to"
  9255. }
  9256. },
  9257. "required": ["sessionID"],
  9258. "additionalProperties": false
  9259. }
  9260. }
  9261. }
  9262. },
  9263. "x-codeSamples": [
  9264. {
  9265. "lang": "js",
  9266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9267. }
  9268. ]
  9269. }
  9270. },
  9271. "/tui/control/next": {
  9272. "get": {
  9273. "tags": ["tui"],
  9274. "operationId": "tui.control.next",
  9275. "parameters": [
  9276. {
  9277. "name": "directory",
  9278. "in": "query",
  9279. "schema": {
  9280. "type": "string"
  9281. },
  9282. "required": false
  9283. },
  9284. {
  9285. "name": "workspace",
  9286. "in": "query",
  9287. "schema": {
  9288. "type": "string"
  9289. },
  9290. "required": false
  9291. }
  9292. ],
  9293. "responses": {
  9294. "200": {
  9295. "description": "Next TUI request",
  9296. "content": {
  9297. "application/json": {
  9298. "schema": {
  9299. "type": "object",
  9300. "properties": {
  9301. "path": {
  9302. "type": "string"
  9303. },
  9304. "body": {}
  9305. },
  9306. "required": ["path", "body"],
  9307. "additionalProperties": false,
  9308. "description": "Next TUI request"
  9309. }
  9310. }
  9311. }
  9312. },
  9313. "400": {
  9314. "description": "Bad request",
  9315. "content": {
  9316. "application/json": {
  9317. "schema": {
  9318. "$ref": "#/components/schemas/BadRequestError"
  9319. }
  9320. }
  9321. }
  9322. }
  9323. },
  9324. "description": "Retrieve the next TUI request from the queue for processing.",
  9325. "summary": "Get next TUI request",
  9326. "x-codeSamples": [
  9327. {
  9328. "lang": "js",
  9329. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9330. }
  9331. ]
  9332. }
  9333. },
  9334. "/tui/control/response": {
  9335. "post": {
  9336. "tags": ["tui"],
  9337. "operationId": "tui.control.response",
  9338. "parameters": [
  9339. {
  9340. "name": "directory",
  9341. "in": "query",
  9342. "schema": {
  9343. "type": "string"
  9344. },
  9345. "required": false
  9346. },
  9347. {
  9348. "name": "workspace",
  9349. "in": "query",
  9350. "schema": {
  9351. "type": "string"
  9352. },
  9353. "required": false
  9354. }
  9355. ],
  9356. "responses": {
  9357. "200": {
  9358. "description": "Response submitted successfully",
  9359. "content": {
  9360. "application/json": {
  9361. "schema": {
  9362. "type": "boolean",
  9363. "description": "Response submitted successfully"
  9364. }
  9365. }
  9366. }
  9367. },
  9368. "400": {
  9369. "description": "Bad request",
  9370. "content": {
  9371. "application/json": {
  9372. "schema": {
  9373. "$ref": "#/components/schemas/BadRequestError"
  9374. }
  9375. }
  9376. }
  9377. }
  9378. },
  9379. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9380. "summary": "Submit TUI response",
  9381. "requestBody": {
  9382. "content": {
  9383. "application/json": {
  9384. "schema": {}
  9385. }
  9386. }
  9387. },
  9388. "x-codeSamples": [
  9389. {
  9390. "lang": "js",
  9391. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9392. }
  9393. ]
  9394. }
  9395. },
  9396. "/experimental/workspace/adapter": {
  9397. "get": {
  9398. "tags": ["workspace"],
  9399. "operationId": "experimental.workspace.adapter.list",
  9400. "parameters": [
  9401. {
  9402. "name": "directory",
  9403. "in": "query",
  9404. "schema": {
  9405. "type": "string"
  9406. },
  9407. "required": false
  9408. },
  9409. {
  9410. "name": "workspace",
  9411. "in": "query",
  9412. "schema": {
  9413. "type": "string"
  9414. },
  9415. "required": false
  9416. }
  9417. ],
  9418. "responses": {
  9419. "200": {
  9420. "description": "Workspace adapters",
  9421. "content": {
  9422. "application/json": {
  9423. "schema": {
  9424. "type": "array",
  9425. "items": {
  9426. "type": "object",
  9427. "properties": {
  9428. "type": {
  9429. "type": "string"
  9430. },
  9431. "name": {
  9432. "type": "string"
  9433. },
  9434. "description": {
  9435. "type": "string"
  9436. }
  9437. },
  9438. "required": ["type", "name", "description"],
  9439. "additionalProperties": false
  9440. },
  9441. "description": "Workspace adapters"
  9442. }
  9443. }
  9444. }
  9445. },
  9446. "400": {
  9447. "description": "Bad request",
  9448. "content": {
  9449. "application/json": {
  9450. "schema": {
  9451. "$ref": "#/components/schemas/BadRequestError"
  9452. }
  9453. }
  9454. }
  9455. }
  9456. },
  9457. "description": "List all available workspace adapters for the current project.",
  9458. "summary": "List workspace adapters",
  9459. "x-codeSamples": [
  9460. {
  9461. "lang": "js",
  9462. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9463. }
  9464. ]
  9465. }
  9466. },
  9467. "/experimental/workspace": {
  9468. "get": {
  9469. "tags": ["workspace"],
  9470. "operationId": "experimental.workspace.list",
  9471. "parameters": [
  9472. {
  9473. "name": "directory",
  9474. "in": "query",
  9475. "schema": {
  9476. "type": "string"
  9477. },
  9478. "required": false
  9479. },
  9480. {
  9481. "name": "workspace",
  9482. "in": "query",
  9483. "schema": {
  9484. "type": "string"
  9485. },
  9486. "required": false
  9487. }
  9488. ],
  9489. "responses": {
  9490. "200": {
  9491. "description": "Workspaces",
  9492. "content": {
  9493. "application/json": {
  9494. "schema": {
  9495. "type": "array",
  9496. "items": {
  9497. "$ref": "#/components/schemas/Workspace"
  9498. },
  9499. "description": "Workspaces"
  9500. }
  9501. }
  9502. }
  9503. },
  9504. "400": {
  9505. "description": "Bad request",
  9506. "content": {
  9507. "application/json": {
  9508. "schema": {
  9509. "$ref": "#/components/schemas/BadRequestError"
  9510. }
  9511. }
  9512. }
  9513. }
  9514. },
  9515. "description": "List all workspaces.",
  9516. "summary": "List workspaces",
  9517. "x-codeSamples": [
  9518. {
  9519. "lang": "js",
  9520. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9521. }
  9522. ]
  9523. },
  9524. "post": {
  9525. "tags": ["workspace"],
  9526. "operationId": "experimental.workspace.create",
  9527. "parameters": [
  9528. {
  9529. "name": "directory",
  9530. "in": "query",
  9531. "schema": {
  9532. "type": "string"
  9533. },
  9534. "required": false
  9535. },
  9536. {
  9537. "name": "workspace",
  9538. "in": "query",
  9539. "schema": {
  9540. "type": "string"
  9541. },
  9542. "required": false
  9543. }
  9544. ],
  9545. "responses": {
  9546. "200": {
  9547. "description": "Workspace created",
  9548. "content": {
  9549. "application/json": {
  9550. "schema": {
  9551. "$ref": "#/components/schemas/Workspace"
  9552. }
  9553. }
  9554. }
  9555. },
  9556. "400": {
  9557. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9558. "content": {
  9559. "application/json": {
  9560. "schema": {
  9561. "anyOf": [
  9562. {
  9563. "$ref": "#/components/schemas/WorkspaceCreateError"
  9564. },
  9565. {
  9566. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9567. },
  9568. {
  9569. "$ref": "#/components/schemas/InvalidRequestError"
  9570. }
  9571. ]
  9572. }
  9573. }
  9574. }
  9575. }
  9576. },
  9577. "description": "Create a workspace for the current project.",
  9578. "summary": "Create workspace",
  9579. "requestBody": {
  9580. "content": {
  9581. "application/json": {
  9582. "schema": {
  9583. "type": "object",
  9584. "properties": {
  9585. "id": {
  9586. "type": "string",
  9587. "pattern": "^wrk"
  9588. },
  9589. "type": {
  9590. "type": "string"
  9591. },
  9592. "branch": {
  9593. "anyOf": [
  9594. {
  9595. "type": "string"
  9596. },
  9597. {
  9598. "type": "null"
  9599. }
  9600. ]
  9601. },
  9602. "extra": {
  9603. "anyOf": [
  9604. {},
  9605. {
  9606. "type": "null"
  9607. }
  9608. ]
  9609. }
  9610. },
  9611. "required": ["type"],
  9612. "additionalProperties": false
  9613. }
  9614. }
  9615. }
  9616. },
  9617. "x-codeSamples": [
  9618. {
  9619. "lang": "js",
  9620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9621. }
  9622. ]
  9623. }
  9624. },
  9625. "/experimental/workspace/sync-list": {
  9626. "post": {
  9627. "tags": ["workspace"],
  9628. "operationId": "experimental.workspace.syncList",
  9629. "parameters": [
  9630. {
  9631. "name": "directory",
  9632. "in": "query",
  9633. "schema": {
  9634. "type": "string"
  9635. },
  9636. "required": false
  9637. },
  9638. {
  9639. "name": "workspace",
  9640. "in": "query",
  9641. "schema": {
  9642. "type": "string"
  9643. },
  9644. "required": false
  9645. }
  9646. ],
  9647. "responses": {
  9648. "204": {
  9649. "description": "Workspace list synced"
  9650. },
  9651. "400": {
  9652. "description": "Bad request",
  9653. "content": {
  9654. "application/json": {
  9655. "schema": {
  9656. "$ref": "#/components/schemas/BadRequestError"
  9657. }
  9658. }
  9659. }
  9660. }
  9661. },
  9662. "description": "Register missing workspaces returned by workspace adapters.",
  9663. "summary": "Sync workspace list",
  9664. "x-codeSamples": [
  9665. {
  9666. "lang": "js",
  9667. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9668. }
  9669. ]
  9670. }
  9671. },
  9672. "/experimental/workspace/status": {
  9673. "get": {
  9674. "tags": ["workspace"],
  9675. "operationId": "experimental.workspace.status",
  9676. "parameters": [
  9677. {
  9678. "name": "directory",
  9679. "in": "query",
  9680. "schema": {
  9681. "type": "string"
  9682. },
  9683. "required": false
  9684. },
  9685. {
  9686. "name": "workspace",
  9687. "in": "query",
  9688. "schema": {
  9689. "type": "string"
  9690. },
  9691. "required": false
  9692. }
  9693. ],
  9694. "responses": {
  9695. "200": {
  9696. "description": "Workspace status",
  9697. "content": {
  9698. "application/json": {
  9699. "schema": {
  9700. "type": "array",
  9701. "items": {
  9702. "type": "object",
  9703. "properties": {
  9704. "workspaceID": {
  9705. "type": "string",
  9706. "pattern": "^wrk"
  9707. },
  9708. "status": {
  9709. "type": "string",
  9710. "enum": ["connected", "connecting", "disconnected", "error"]
  9711. }
  9712. },
  9713. "required": ["workspaceID", "status"],
  9714. "additionalProperties": false
  9715. },
  9716. "description": "Workspace status"
  9717. }
  9718. }
  9719. }
  9720. },
  9721. "400": {
  9722. "description": "Bad request",
  9723. "content": {
  9724. "application/json": {
  9725. "schema": {
  9726. "$ref": "#/components/schemas/BadRequestError"
  9727. }
  9728. }
  9729. }
  9730. }
  9731. },
  9732. "description": "Get connection status for workspaces in the current project.",
  9733. "summary": "Workspace status",
  9734. "x-codeSamples": [
  9735. {
  9736. "lang": "js",
  9737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9738. }
  9739. ]
  9740. }
  9741. },
  9742. "/experimental/workspace/{id}": {
  9743. "delete": {
  9744. "tags": ["workspace"],
  9745. "operationId": "experimental.workspace.remove",
  9746. "parameters": [
  9747. {
  9748. "name": "id",
  9749. "in": "path",
  9750. "schema": {
  9751. "type": "string",
  9752. "pattern": "^wrk"
  9753. },
  9754. "required": true
  9755. },
  9756. {
  9757. "name": "directory",
  9758. "in": "query",
  9759. "schema": {
  9760. "type": "string"
  9761. },
  9762. "required": false
  9763. },
  9764. {
  9765. "name": "workspace",
  9766. "in": "query",
  9767. "schema": {
  9768. "type": "string"
  9769. },
  9770. "required": false
  9771. }
  9772. ],
  9773. "responses": {
  9774. "200": {
  9775. "description": "Workspace removed",
  9776. "content": {
  9777. "application/json": {
  9778. "schema": {
  9779. "$ref": "#/components/schemas/Workspace"
  9780. }
  9781. }
  9782. }
  9783. },
  9784. "400": {
  9785. "description": "BadRequest | InvalidRequestError",
  9786. "content": {
  9787. "application/json": {
  9788. "schema": {
  9789. "anyOf": [
  9790. {
  9791. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9792. },
  9793. {
  9794. "$ref": "#/components/schemas/InvalidRequestError"
  9795. }
  9796. ]
  9797. }
  9798. }
  9799. }
  9800. }
  9801. },
  9802. "description": "Remove an existing workspace.",
  9803. "summary": "Remove workspace",
  9804. "x-codeSamples": [
  9805. {
  9806. "lang": "js",
  9807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9808. }
  9809. ]
  9810. }
  9811. },
  9812. "/experimental/workspace/warp": {
  9813. "post": {
  9814. "tags": ["workspace"],
  9815. "operationId": "experimental.workspace.warp",
  9816. "parameters": [
  9817. {
  9818. "name": "directory",
  9819. "in": "query",
  9820. "schema": {
  9821. "type": "string"
  9822. },
  9823. "required": false
  9824. },
  9825. {
  9826. "name": "workspace",
  9827. "in": "query",
  9828. "schema": {
  9829. "type": "string"
  9830. },
  9831. "required": false
  9832. }
  9833. ],
  9834. "responses": {
  9835. "204": {
  9836. "description": "Session warped"
  9837. },
  9838. "400": {
  9839. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9840. "content": {
  9841. "application/json": {
  9842. "schema": {
  9843. "anyOf": [
  9844. {
  9845. "$ref": "#/components/schemas/WorkspaceWarpError"
  9846. },
  9847. {
  9848. "$ref": "#/components/schemas/VcsApplyError"
  9849. },
  9850. {
  9851. "$ref": "#/components/schemas/InvalidRequestError"
  9852. }
  9853. ]
  9854. }
  9855. }
  9856. }
  9857. },
  9858. "404": {
  9859. "description": "NotFoundError",
  9860. "content": {
  9861. "application/json": {
  9862. "schema": {
  9863. "$ref": "#/components/schemas/NotFoundError"
  9864. }
  9865. }
  9866. }
  9867. }
  9868. },
  9869. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9870. "summary": "Warp session into workspace",
  9871. "requestBody": {
  9872. "content": {
  9873. "application/json": {
  9874. "schema": {
  9875. "type": "object",
  9876. "properties": {
  9877. "id": {
  9878. "anyOf": [
  9879. {
  9880. "type": "string",
  9881. "pattern": "^wrk"
  9882. },
  9883. {
  9884. "type": "null"
  9885. }
  9886. ]
  9887. },
  9888. "sessionID": {
  9889. "type": "string",
  9890. "pattern": "^ses"
  9891. },
  9892. "copyChanges": {
  9893. "type": "boolean"
  9894. }
  9895. },
  9896. "required": ["id", "sessionID"],
  9897. "additionalProperties": false
  9898. }
  9899. }
  9900. }
  9901. },
  9902. "x-codeSamples": [
  9903. {
  9904. "lang": "js",
  9905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9906. }
  9907. ]
  9908. }
  9909. },
  9910. "/api/health": {
  9911. "get": {
  9912. "tags": ["opencode experimental HttpApi"],
  9913. "operationId": "v2.health.get",
  9914. "parameters": [],
  9915. "security": [],
  9916. "responses": {
  9917. "200": {
  9918. "description": "Success",
  9919. "content": {
  9920. "application/json": {
  9921. "schema": {
  9922. "type": "object",
  9923. "properties": {
  9924. "healthy": {
  9925. "type": "boolean",
  9926. "enum": [true]
  9927. }
  9928. },
  9929. "required": ["healthy"],
  9930. "additionalProperties": false
  9931. }
  9932. }
  9933. }
  9934. },
  9935. "400": {
  9936. "description": "InvalidRequestError",
  9937. "content": {
  9938. "application/json": {
  9939. "schema": {
  9940. "$ref": "#/components/schemas/InvalidRequestError"
  9941. }
  9942. }
  9943. }
  9944. },
  9945. "401": {
  9946. "description": "UnauthorizedError",
  9947. "content": {
  9948. "application/json": {
  9949. "schema": {
  9950. "$ref": "#/components/schemas/UnauthorizedError"
  9951. }
  9952. }
  9953. }
  9954. }
  9955. },
  9956. "description": "Check whether the v2 API server is ready to accept requests.",
  9957. "summary": "Check v2 server health",
  9958. "x-codeSamples": [
  9959. {
  9960. "lang": "js",
  9961. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9962. }
  9963. ]
  9964. }
  9965. },
  9966. "/api/agent": {
  9967. "get": {
  9968. "tags": ["opencode experimental HttpApi"],
  9969. "operationId": "v2.agent.list",
  9970. "parameters": [
  9971. {
  9972. "name": "location",
  9973. "in": "query",
  9974. "schema": {
  9975. "type": "object",
  9976. "properties": {
  9977. "directory": {
  9978. "type": "string"
  9979. },
  9980. "workspace": {
  9981. "type": "string"
  9982. }
  9983. },
  9984. "additionalProperties": false
  9985. },
  9986. "required": false,
  9987. "style": "deepObject",
  9988. "explode": true
  9989. }
  9990. ],
  9991. "security": [],
  9992. "responses": {
  9993. "200": {
  9994. "description": "Success",
  9995. "content": {
  9996. "application/json": {
  9997. "schema": {
  9998. "type": "object",
  9999. "properties": {
  10000. "location": {
  10001. "$ref": "#/components/schemas/LocationInfo"
  10002. },
  10003. "data": {
  10004. "type": "array",
  10005. "items": {
  10006. "$ref": "#/components/schemas/AgentV2Info"
  10007. }
  10008. }
  10009. },
  10010. "required": ["location", "data"],
  10011. "additionalProperties": false
  10012. }
  10013. }
  10014. }
  10015. },
  10016. "400": {
  10017. "description": "InvalidRequestError",
  10018. "content": {
  10019. "application/json": {
  10020. "schema": {
  10021. "$ref": "#/components/schemas/InvalidRequestError"
  10022. }
  10023. }
  10024. }
  10025. },
  10026. "401": {
  10027. "description": "UnauthorizedError",
  10028. "content": {
  10029. "application/json": {
  10030. "schema": {
  10031. "$ref": "#/components/schemas/UnauthorizedError"
  10032. }
  10033. }
  10034. }
  10035. }
  10036. },
  10037. "description": "Retrieve currently registered v2 agents.",
  10038. "summary": "List v2 agents",
  10039. "x-codeSamples": [
  10040. {
  10041. "lang": "js",
  10042. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10043. }
  10044. ]
  10045. }
  10046. },
  10047. "/api/session": {
  10048. "get": {
  10049. "tags": ["v2"],
  10050. "operationId": "v2.session.list",
  10051. "parameters": [
  10052. {
  10053. "name": "workspace",
  10054. "in": "query",
  10055. "schema": {
  10056. "type": "string",
  10057. "pattern": "^wrk"
  10058. },
  10059. "required": false
  10060. },
  10061. {
  10062. "name": "limit",
  10063. "in": "query",
  10064. "schema": {
  10065. "type": "number"
  10066. },
  10067. "required": false
  10068. },
  10069. {
  10070. "name": "order",
  10071. "in": "query",
  10072. "schema": {
  10073. "type": "string",
  10074. "enum": ["asc", "desc"]
  10075. },
  10076. "required": false
  10077. },
  10078. {
  10079. "name": "search",
  10080. "in": "query",
  10081. "schema": {
  10082. "type": "string"
  10083. },
  10084. "required": false
  10085. },
  10086. {
  10087. "name": "directory",
  10088. "in": "query",
  10089. "schema": {
  10090. "type": "string"
  10091. },
  10092. "required": false
  10093. },
  10094. {
  10095. "name": "project",
  10096. "in": "query",
  10097. "schema": {
  10098. "type": "string"
  10099. },
  10100. "required": false
  10101. },
  10102. {
  10103. "name": "subpath",
  10104. "in": "query",
  10105. "schema": {
  10106. "type": "string"
  10107. },
  10108. "required": false
  10109. },
  10110. {
  10111. "name": "cursor",
  10112. "in": "query",
  10113. "schema": {
  10114. "type": "string",
  10115. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10116. },
  10117. "required": false
  10118. }
  10119. ],
  10120. "security": [],
  10121. "responses": {
  10122. "200": {
  10123. "description": "V2SessionsResponse",
  10124. "content": {
  10125. "application/json": {
  10126. "schema": {
  10127. "$ref": "#/components/schemas/V2SessionsResponse"
  10128. }
  10129. }
  10130. }
  10131. },
  10132. "400": {
  10133. "description": "InvalidCursorError | InvalidRequestError",
  10134. "content": {
  10135. "application/json": {
  10136. "schema": {
  10137. "anyOf": [
  10138. {
  10139. "$ref": "#/components/schemas/InvalidCursorError"
  10140. },
  10141. {
  10142. "$ref": "#/components/schemas/InvalidRequestError"
  10143. },
  10144. {
  10145. "$ref": "#/components/schemas/InvalidRequestError"
  10146. }
  10147. ]
  10148. }
  10149. }
  10150. }
  10151. },
  10152. "401": {
  10153. "description": "UnauthorizedError",
  10154. "content": {
  10155. "application/json": {
  10156. "schema": {
  10157. "$ref": "#/components/schemas/UnauthorizedError"
  10158. }
  10159. }
  10160. }
  10161. }
  10162. },
  10163. "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.",
  10164. "summary": "List v2 sessions",
  10165. "x-codeSamples": [
  10166. {
  10167. "lang": "js",
  10168. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10169. }
  10170. ]
  10171. }
  10172. },
  10173. "/api/session/{sessionID}/prompt": {
  10174. "post": {
  10175. "tags": ["v2"],
  10176. "operationId": "v2.session.prompt",
  10177. "parameters": [
  10178. {
  10179. "name": "sessionID",
  10180. "in": "path",
  10181. "schema": {
  10182. "type": "string",
  10183. "pattern": "^ses"
  10184. },
  10185. "required": true
  10186. }
  10187. ],
  10188. "security": [],
  10189. "responses": {
  10190. "200": {
  10191. "description": "Success",
  10192. "content": {
  10193. "application/json": {
  10194. "schema": {
  10195. "type": "object",
  10196. "properties": {
  10197. "data": {
  10198. "$ref": "#/components/schemas/SessionInputAdmitted"
  10199. }
  10200. },
  10201. "required": ["data"],
  10202. "additionalProperties": false
  10203. }
  10204. }
  10205. }
  10206. },
  10207. "400": {
  10208. "description": "InvalidRequestError",
  10209. "content": {
  10210. "application/json": {
  10211. "schema": {
  10212. "$ref": "#/components/schemas/InvalidRequestError"
  10213. }
  10214. }
  10215. }
  10216. },
  10217. "401": {
  10218. "description": "UnauthorizedError",
  10219. "content": {
  10220. "application/json": {
  10221. "schema": {
  10222. "$ref": "#/components/schemas/UnauthorizedError"
  10223. }
  10224. }
  10225. }
  10226. },
  10227. "404": {
  10228. "description": "SessionNotFoundError",
  10229. "content": {
  10230. "application/json": {
  10231. "schema": {
  10232. "$ref": "#/components/schemas/SessionNotFoundError"
  10233. }
  10234. }
  10235. }
  10236. },
  10237. "409": {
  10238. "description": "ConflictError",
  10239. "content": {
  10240. "application/json": {
  10241. "schema": {
  10242. "$ref": "#/components/schemas/ConflictError"
  10243. }
  10244. }
  10245. }
  10246. }
  10247. },
  10248. "description": "Durably admit one v2 session input and schedule agent-loop execution unless resume is false.",
  10249. "summary": "Send v2 message",
  10250. "requestBody": {
  10251. "content": {
  10252. "application/json": {
  10253. "schema": {
  10254. "type": "object",
  10255. "properties": {
  10256. "id": {
  10257. "type": "string",
  10258. "pattern": "^msg_"
  10259. },
  10260. "prompt": {
  10261. "$ref": "#/components/schemas/Prompt"
  10262. },
  10263. "delivery": {
  10264. "type": "string",
  10265. "enum": ["steer", "queue"]
  10266. },
  10267. "resume": {
  10268. "type": "boolean"
  10269. }
  10270. },
  10271. "required": ["prompt"],
  10272. "additionalProperties": false
  10273. }
  10274. }
  10275. },
  10276. "required": true
  10277. },
  10278. "x-codeSamples": [
  10279. {
  10280. "lang": "js",
  10281. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10282. }
  10283. ]
  10284. }
  10285. },
  10286. "/api/session/{sessionID}/compact": {
  10287. "post": {
  10288. "tags": ["v2"],
  10289. "operationId": "v2.session.compact",
  10290. "parameters": [
  10291. {
  10292. "name": "sessionID",
  10293. "in": "path",
  10294. "schema": {
  10295. "type": "string",
  10296. "pattern": "^ses"
  10297. },
  10298. "required": true
  10299. }
  10300. ],
  10301. "security": [],
  10302. "responses": {
  10303. "204": {
  10304. "description": "<No Content>"
  10305. },
  10306. "400": {
  10307. "description": "InvalidRequestError",
  10308. "content": {
  10309. "application/json": {
  10310. "schema": {
  10311. "$ref": "#/components/schemas/InvalidRequestError"
  10312. }
  10313. }
  10314. }
  10315. },
  10316. "401": {
  10317. "description": "UnauthorizedError",
  10318. "content": {
  10319. "application/json": {
  10320. "schema": {
  10321. "$ref": "#/components/schemas/UnauthorizedError"
  10322. }
  10323. }
  10324. }
  10325. },
  10326. "404": {
  10327. "description": "SessionNotFoundError",
  10328. "content": {
  10329. "application/json": {
  10330. "schema": {
  10331. "$ref": "#/components/schemas/SessionNotFoundError"
  10332. }
  10333. }
  10334. }
  10335. },
  10336. "503": {
  10337. "description": "ServiceUnavailableError",
  10338. "content": {
  10339. "application/json": {
  10340. "schema": {
  10341. "$ref": "#/components/schemas/ServiceUnavailableError"
  10342. }
  10343. }
  10344. }
  10345. }
  10346. },
  10347. "description": "Compact a v2 session conversation.",
  10348. "summary": "Compact v2 session",
  10349. "x-codeSamples": [
  10350. {
  10351. "lang": "js",
  10352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10353. }
  10354. ]
  10355. }
  10356. },
  10357. "/api/session/{sessionID}/wait": {
  10358. "post": {
  10359. "tags": ["v2"],
  10360. "operationId": "v2.session.wait",
  10361. "parameters": [
  10362. {
  10363. "name": "sessionID",
  10364. "in": "path",
  10365. "schema": {
  10366. "type": "string",
  10367. "pattern": "^ses"
  10368. },
  10369. "required": true
  10370. }
  10371. ],
  10372. "security": [],
  10373. "responses": {
  10374. "204": {
  10375. "description": "<No Content>"
  10376. },
  10377. "400": {
  10378. "description": "InvalidRequestError",
  10379. "content": {
  10380. "application/json": {
  10381. "schema": {
  10382. "$ref": "#/components/schemas/InvalidRequestError"
  10383. }
  10384. }
  10385. }
  10386. },
  10387. "401": {
  10388. "description": "UnauthorizedError",
  10389. "content": {
  10390. "application/json": {
  10391. "schema": {
  10392. "$ref": "#/components/schemas/UnauthorizedError"
  10393. }
  10394. }
  10395. }
  10396. },
  10397. "404": {
  10398. "description": "SessionNotFoundError",
  10399. "content": {
  10400. "application/json": {
  10401. "schema": {
  10402. "$ref": "#/components/schemas/SessionNotFoundError"
  10403. }
  10404. }
  10405. }
  10406. },
  10407. "503": {
  10408. "description": "ServiceUnavailableError",
  10409. "content": {
  10410. "application/json": {
  10411. "schema": {
  10412. "$ref": "#/components/schemas/ServiceUnavailableError"
  10413. }
  10414. }
  10415. }
  10416. }
  10417. },
  10418. "description": "Wait for a v2 session agent loop to become idle.",
  10419. "summary": "Wait for v2 session",
  10420. "x-codeSamples": [
  10421. {
  10422. "lang": "js",
  10423. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10424. }
  10425. ]
  10426. }
  10427. },
  10428. "/api/session/{sessionID}/context": {
  10429. "get": {
  10430. "tags": ["v2"],
  10431. "operationId": "v2.session.context",
  10432. "parameters": [
  10433. {
  10434. "name": "sessionID",
  10435. "in": "path",
  10436. "schema": {
  10437. "type": "string",
  10438. "pattern": "^ses"
  10439. },
  10440. "required": true
  10441. }
  10442. ],
  10443. "security": [],
  10444. "responses": {
  10445. "200": {
  10446. "description": "Success",
  10447. "content": {
  10448. "application/json": {
  10449. "schema": {
  10450. "type": "object",
  10451. "properties": {
  10452. "data": {
  10453. "type": "array",
  10454. "items": {
  10455. "$ref": "#/components/schemas/SessionMessage"
  10456. }
  10457. }
  10458. },
  10459. "required": ["data"],
  10460. "additionalProperties": false
  10461. }
  10462. }
  10463. }
  10464. },
  10465. "400": {
  10466. "description": "InvalidRequestError",
  10467. "content": {
  10468. "application/json": {
  10469. "schema": {
  10470. "$ref": "#/components/schemas/InvalidRequestError"
  10471. }
  10472. }
  10473. }
  10474. },
  10475. "401": {
  10476. "description": "UnauthorizedError",
  10477. "content": {
  10478. "application/json": {
  10479. "schema": {
  10480. "$ref": "#/components/schemas/UnauthorizedError"
  10481. }
  10482. }
  10483. }
  10484. },
  10485. "404": {
  10486. "description": "SessionNotFoundError",
  10487. "content": {
  10488. "application/json": {
  10489. "schema": {
  10490. "$ref": "#/components/schemas/SessionNotFoundError"
  10491. }
  10492. }
  10493. }
  10494. },
  10495. "500": {
  10496. "description": "UnknownError",
  10497. "content": {
  10498. "application/json": {
  10499. "schema": {
  10500. "$ref": "#/components/schemas/UnknownError1"
  10501. }
  10502. }
  10503. }
  10504. }
  10505. },
  10506. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  10507. "summary": "Get v2 session context",
  10508. "x-codeSamples": [
  10509. {
  10510. "lang": "js",
  10511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10512. }
  10513. ]
  10514. }
  10515. },
  10516. "/api/session/{sessionID}/message": {
  10517. "get": {
  10518. "tags": ["v2 messages"],
  10519. "operationId": "v2.session.messages",
  10520. "parameters": [
  10521. {
  10522. "name": "sessionID",
  10523. "in": "path",
  10524. "schema": {
  10525. "type": "string",
  10526. "pattern": "^ses"
  10527. },
  10528. "required": true
  10529. },
  10530. {
  10531. "name": "limit",
  10532. "in": "query",
  10533. "schema": {
  10534. "type": "number"
  10535. },
  10536. "required": false
  10537. },
  10538. {
  10539. "name": "order",
  10540. "in": "query",
  10541. "schema": {
  10542. "type": "string",
  10543. "enum": ["asc", "desc"]
  10544. },
  10545. "required": false
  10546. },
  10547. {
  10548. "name": "cursor",
  10549. "in": "query",
  10550. "schema": {
  10551. "type": "string",
  10552. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10553. },
  10554. "required": false
  10555. }
  10556. ],
  10557. "security": [],
  10558. "responses": {
  10559. "200": {
  10560. "description": "V2SessionMessagesResponse",
  10561. "content": {
  10562. "application/json": {
  10563. "schema": {
  10564. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  10565. }
  10566. }
  10567. }
  10568. },
  10569. "400": {
  10570. "description": "InvalidCursorError | InvalidRequestError",
  10571. "content": {
  10572. "application/json": {
  10573. "schema": {
  10574. "anyOf": [
  10575. {
  10576. "$ref": "#/components/schemas/InvalidCursorError"
  10577. },
  10578. {
  10579. "$ref": "#/components/schemas/InvalidRequestError"
  10580. }
  10581. ]
  10582. }
  10583. }
  10584. }
  10585. },
  10586. "401": {
  10587. "description": "UnauthorizedError",
  10588. "content": {
  10589. "application/json": {
  10590. "schema": {
  10591. "$ref": "#/components/schemas/UnauthorizedError"
  10592. }
  10593. }
  10594. }
  10595. },
  10596. "404": {
  10597. "description": "SessionNotFoundError",
  10598. "content": {
  10599. "application/json": {
  10600. "schema": {
  10601. "$ref": "#/components/schemas/SessionNotFoundError"
  10602. }
  10603. }
  10604. }
  10605. },
  10606. "500": {
  10607. "description": "UnknownError",
  10608. "content": {
  10609. "application/json": {
  10610. "schema": {
  10611. "$ref": "#/components/schemas/UnknownError1"
  10612. }
  10613. }
  10614. }
  10615. }
  10616. },
  10617. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10618. "summary": "Get v2 session messages",
  10619. "x-codeSamples": [
  10620. {
  10621. "lang": "js",
  10622. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10623. }
  10624. ]
  10625. }
  10626. },
  10627. "/api/model": {
  10628. "get": {
  10629. "tags": ["v2 models"],
  10630. "operationId": "v2.model.list",
  10631. "parameters": [
  10632. {
  10633. "name": "location",
  10634. "in": "query",
  10635. "schema": {
  10636. "type": "object",
  10637. "properties": {
  10638. "directory": {
  10639. "type": "string"
  10640. },
  10641. "workspace": {
  10642. "type": "string"
  10643. }
  10644. },
  10645. "additionalProperties": false
  10646. },
  10647. "required": false,
  10648. "style": "deepObject",
  10649. "explode": true
  10650. }
  10651. ],
  10652. "security": [],
  10653. "responses": {
  10654. "200": {
  10655. "description": "Success",
  10656. "content": {
  10657. "application/json": {
  10658. "schema": {
  10659. "type": "object",
  10660. "properties": {
  10661. "location": {
  10662. "$ref": "#/components/schemas/LocationInfo"
  10663. },
  10664. "data": {
  10665. "type": "array",
  10666. "items": {
  10667. "$ref": "#/components/schemas/ModelV2Info"
  10668. }
  10669. }
  10670. },
  10671. "required": ["location", "data"],
  10672. "additionalProperties": false
  10673. }
  10674. }
  10675. }
  10676. },
  10677. "400": {
  10678. "description": "InvalidRequestError",
  10679. "content": {
  10680. "application/json": {
  10681. "schema": {
  10682. "$ref": "#/components/schemas/InvalidRequestError"
  10683. }
  10684. }
  10685. }
  10686. },
  10687. "401": {
  10688. "description": "UnauthorizedError",
  10689. "content": {
  10690. "application/json": {
  10691. "schema": {
  10692. "$ref": "#/components/schemas/UnauthorizedError"
  10693. }
  10694. }
  10695. }
  10696. },
  10697. "503": {
  10698. "description": "ServiceUnavailableError",
  10699. "content": {
  10700. "application/json": {
  10701. "schema": {
  10702. "$ref": "#/components/schemas/ServiceUnavailableError"
  10703. }
  10704. }
  10705. }
  10706. }
  10707. },
  10708. "description": "Retrieve available v2 models ordered by release date.",
  10709. "summary": "List v2 models",
  10710. "x-codeSamples": [
  10711. {
  10712. "lang": "js",
  10713. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10714. }
  10715. ]
  10716. }
  10717. },
  10718. "/api/provider": {
  10719. "get": {
  10720. "tags": ["v2 providers"],
  10721. "operationId": "v2.provider.list",
  10722. "parameters": [
  10723. {
  10724. "name": "location",
  10725. "in": "query",
  10726. "schema": {
  10727. "type": "object",
  10728. "properties": {
  10729. "directory": {
  10730. "type": "string"
  10731. },
  10732. "workspace": {
  10733. "type": "string"
  10734. }
  10735. },
  10736. "additionalProperties": false
  10737. },
  10738. "required": false,
  10739. "style": "deepObject",
  10740. "explode": true
  10741. }
  10742. ],
  10743. "security": [],
  10744. "responses": {
  10745. "200": {
  10746. "description": "Success",
  10747. "content": {
  10748. "application/json": {
  10749. "schema": {
  10750. "type": "object",
  10751. "properties": {
  10752. "location": {
  10753. "$ref": "#/components/schemas/LocationInfo"
  10754. },
  10755. "data": {
  10756. "type": "array",
  10757. "items": {
  10758. "$ref": "#/components/schemas/ProviderV2Info"
  10759. }
  10760. }
  10761. },
  10762. "required": ["location", "data"],
  10763. "additionalProperties": false
  10764. }
  10765. }
  10766. }
  10767. },
  10768. "400": {
  10769. "description": "InvalidRequestError",
  10770. "content": {
  10771. "application/json": {
  10772. "schema": {
  10773. "$ref": "#/components/schemas/InvalidRequestError"
  10774. }
  10775. }
  10776. }
  10777. },
  10778. "401": {
  10779. "description": "UnauthorizedError",
  10780. "content": {
  10781. "application/json": {
  10782. "schema": {
  10783. "$ref": "#/components/schemas/UnauthorizedError"
  10784. }
  10785. }
  10786. }
  10787. },
  10788. "503": {
  10789. "description": "ServiceUnavailableError",
  10790. "content": {
  10791. "application/json": {
  10792. "schema": {
  10793. "$ref": "#/components/schemas/ServiceUnavailableError"
  10794. }
  10795. }
  10796. }
  10797. }
  10798. },
  10799. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  10800. "summary": "List v2 providers",
  10801. "x-codeSamples": [
  10802. {
  10803. "lang": "js",
  10804. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10805. }
  10806. ]
  10807. }
  10808. },
  10809. "/api/provider/{providerID}": {
  10810. "get": {
  10811. "tags": ["v2 providers"],
  10812. "operationId": "v2.provider.get",
  10813. "parameters": [
  10814. {
  10815. "name": "providerID",
  10816. "in": "path",
  10817. "schema": {
  10818. "type": "string"
  10819. },
  10820. "required": true
  10821. },
  10822. {
  10823. "name": "location",
  10824. "in": "query",
  10825. "schema": {
  10826. "type": "object",
  10827. "properties": {
  10828. "directory": {
  10829. "type": "string"
  10830. },
  10831. "workspace": {
  10832. "type": "string"
  10833. }
  10834. },
  10835. "additionalProperties": false
  10836. },
  10837. "required": false,
  10838. "style": "deepObject",
  10839. "explode": true
  10840. }
  10841. ],
  10842. "security": [],
  10843. "responses": {
  10844. "200": {
  10845. "description": "Success",
  10846. "content": {
  10847. "application/json": {
  10848. "schema": {
  10849. "type": "object",
  10850. "properties": {
  10851. "location": {
  10852. "$ref": "#/components/schemas/LocationInfo"
  10853. },
  10854. "data": {
  10855. "$ref": "#/components/schemas/ProviderV2Info"
  10856. }
  10857. },
  10858. "required": ["location", "data"],
  10859. "additionalProperties": false
  10860. }
  10861. }
  10862. }
  10863. },
  10864. "400": {
  10865. "description": "InvalidRequestError",
  10866. "content": {
  10867. "application/json": {
  10868. "schema": {
  10869. "$ref": "#/components/schemas/InvalidRequestError"
  10870. }
  10871. }
  10872. }
  10873. },
  10874. "401": {
  10875. "description": "UnauthorizedError",
  10876. "content": {
  10877. "application/json": {
  10878. "schema": {
  10879. "$ref": "#/components/schemas/UnauthorizedError"
  10880. }
  10881. }
  10882. }
  10883. },
  10884. "404": {
  10885. "description": "ProviderNotFoundError",
  10886. "content": {
  10887. "application/json": {
  10888. "schema": {
  10889. "$ref": "#/components/schemas/ProviderNotFoundError"
  10890. }
  10891. }
  10892. }
  10893. },
  10894. "503": {
  10895. "description": "ServiceUnavailableError",
  10896. "content": {
  10897. "application/json": {
  10898. "schema": {
  10899. "$ref": "#/components/schemas/ServiceUnavailableError"
  10900. }
  10901. }
  10902. }
  10903. }
  10904. },
  10905. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  10906. "summary": "Get v2 provider",
  10907. "x-codeSamples": [
  10908. {
  10909. "lang": "js",
  10910. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  10911. }
  10912. ]
  10913. }
  10914. },
  10915. "/api/permission/request": {
  10916. "get": {
  10917. "tags": ["v2 permissions"],
  10918. "operationId": "v2.permission.request.list",
  10919. "parameters": [
  10920. {
  10921. "name": "location",
  10922. "in": "query",
  10923. "schema": {
  10924. "type": "object",
  10925. "properties": {
  10926. "directory": {
  10927. "type": "string"
  10928. },
  10929. "workspace": {
  10930. "type": "string"
  10931. }
  10932. },
  10933. "additionalProperties": false
  10934. },
  10935. "required": false,
  10936. "style": "deepObject",
  10937. "explode": true
  10938. }
  10939. ],
  10940. "security": [],
  10941. "responses": {
  10942. "200": {
  10943. "description": "Success",
  10944. "content": {
  10945. "application/json": {
  10946. "schema": {
  10947. "type": "object",
  10948. "properties": {
  10949. "location": {
  10950. "$ref": "#/components/schemas/LocationInfo"
  10951. },
  10952. "data": {
  10953. "type": "array",
  10954. "items": {
  10955. "$ref": "#/components/schemas/PermissionV2Request"
  10956. }
  10957. }
  10958. },
  10959. "required": ["location", "data"],
  10960. "additionalProperties": false
  10961. }
  10962. }
  10963. }
  10964. },
  10965. "400": {
  10966. "description": "InvalidRequestError",
  10967. "content": {
  10968. "application/json": {
  10969. "schema": {
  10970. "$ref": "#/components/schemas/InvalidRequestError"
  10971. }
  10972. }
  10973. }
  10974. },
  10975. "401": {
  10976. "description": "UnauthorizedError",
  10977. "content": {
  10978. "application/json": {
  10979. "schema": {
  10980. "$ref": "#/components/schemas/UnauthorizedError"
  10981. }
  10982. }
  10983. }
  10984. }
  10985. },
  10986. "description": "Retrieve pending permission requests for a location.",
  10987. "summary": "List pending permission requests",
  10988. "x-codeSamples": [
  10989. {
  10990. "lang": "js",
  10991. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  10992. }
  10993. ]
  10994. }
  10995. },
  10996. "/api/session/{sessionID}/permission/request": {
  10997. "get": {
  10998. "tags": ["v2 session permissions"],
  10999. "operationId": "v2.session.permission.list",
  11000. "parameters": [
  11001. {
  11002. "name": "sessionID",
  11003. "in": "path",
  11004. "schema": {
  11005. "type": "string",
  11006. "pattern": "^ses"
  11007. },
  11008. "required": true
  11009. }
  11010. ],
  11011. "security": [],
  11012. "responses": {
  11013. "200": {
  11014. "description": "Success",
  11015. "content": {
  11016. "application/json": {
  11017. "schema": {
  11018. "type": "object",
  11019. "properties": {
  11020. "data": {
  11021. "type": "array",
  11022. "items": {
  11023. "$ref": "#/components/schemas/PermissionV2Request"
  11024. }
  11025. }
  11026. },
  11027. "required": ["data"],
  11028. "additionalProperties": false
  11029. }
  11030. }
  11031. }
  11032. },
  11033. "400": {
  11034. "description": "InvalidRequestError",
  11035. "content": {
  11036. "application/json": {
  11037. "schema": {
  11038. "$ref": "#/components/schemas/InvalidRequestError"
  11039. }
  11040. }
  11041. }
  11042. },
  11043. "401": {
  11044. "description": "UnauthorizedError",
  11045. "content": {
  11046. "application/json": {
  11047. "schema": {
  11048. "$ref": "#/components/schemas/UnauthorizedError"
  11049. }
  11050. }
  11051. }
  11052. },
  11053. "404": {
  11054. "description": "SessionNotFoundError",
  11055. "content": {
  11056. "application/json": {
  11057. "schema": {
  11058. "$ref": "#/components/schemas/SessionNotFoundError"
  11059. }
  11060. }
  11061. }
  11062. }
  11063. },
  11064. "description": "Retrieve pending permission requests owned by a session.",
  11065. "summary": "List session permission requests",
  11066. "x-codeSamples": [
  11067. {
  11068. "lang": "js",
  11069. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  11070. }
  11071. ]
  11072. }
  11073. },
  11074. "/api/session/{sessionID}/permission/request/{requestID}/reply": {
  11075. "post": {
  11076. "tags": ["v2 session permissions"],
  11077. "operationId": "v2.session.permission.reply",
  11078. "parameters": [
  11079. {
  11080. "name": "sessionID",
  11081. "in": "path",
  11082. "schema": {
  11083. "type": "string",
  11084. "pattern": "^ses"
  11085. },
  11086. "required": true
  11087. },
  11088. {
  11089. "name": "requestID",
  11090. "in": "path",
  11091. "schema": {
  11092. "type": "string",
  11093. "pattern": "^per"
  11094. },
  11095. "required": true
  11096. }
  11097. ],
  11098. "security": [],
  11099. "responses": {
  11100. "204": {
  11101. "description": "<No Content>"
  11102. },
  11103. "400": {
  11104. "description": "InvalidRequestError",
  11105. "content": {
  11106. "application/json": {
  11107. "schema": {
  11108. "$ref": "#/components/schemas/InvalidRequestError"
  11109. }
  11110. }
  11111. }
  11112. },
  11113. "401": {
  11114. "description": "UnauthorizedError",
  11115. "content": {
  11116. "application/json": {
  11117. "schema": {
  11118. "$ref": "#/components/schemas/UnauthorizedError"
  11119. }
  11120. }
  11121. }
  11122. },
  11123. "404": {
  11124. "description": "SessionNotFoundError | PermissionNotFoundError",
  11125. "content": {
  11126. "application/json": {
  11127. "schema": {
  11128. "anyOf": [
  11129. {
  11130. "$ref": "#/components/schemas/SessionNotFoundError"
  11131. },
  11132. {
  11133. "$ref": "#/components/schemas/PermissionNotFoundError"
  11134. }
  11135. ]
  11136. }
  11137. }
  11138. }
  11139. }
  11140. },
  11141. "description": "Respond to a pending permission request owned by a session.",
  11142. "summary": "Reply to pending permission request",
  11143. "requestBody": {
  11144. "content": {
  11145. "application/json": {
  11146. "schema": {
  11147. "type": "object",
  11148. "properties": {
  11149. "reply": {
  11150. "$ref": "#/components/schemas/PermissionV2Reply"
  11151. },
  11152. "message": {
  11153. "type": "string"
  11154. }
  11155. },
  11156. "required": ["reply"],
  11157. "additionalProperties": false
  11158. }
  11159. }
  11160. },
  11161. "required": true
  11162. },
  11163. "x-codeSamples": [
  11164. {
  11165. "lang": "js",
  11166. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  11167. }
  11168. ]
  11169. }
  11170. },
  11171. "/api/permission/saved": {
  11172. "get": {
  11173. "tags": ["v2 saved permissions"],
  11174. "operationId": "v2.permission.saved.list",
  11175. "parameters": [
  11176. {
  11177. "name": "projectID",
  11178. "in": "query",
  11179. "schema": {
  11180. "type": "string"
  11181. },
  11182. "required": false
  11183. }
  11184. ],
  11185. "security": [],
  11186. "responses": {
  11187. "200": {
  11188. "description": "Success",
  11189. "content": {
  11190. "application/json": {
  11191. "schema": {
  11192. "type": "object",
  11193. "properties": {
  11194. "data": {
  11195. "type": "array",
  11196. "items": {
  11197. "$ref": "#/components/schemas/PermissionSavedInfo"
  11198. }
  11199. }
  11200. },
  11201. "required": ["data"],
  11202. "additionalProperties": false
  11203. }
  11204. }
  11205. }
  11206. },
  11207. "400": {
  11208. "description": "InvalidRequestError",
  11209. "content": {
  11210. "application/json": {
  11211. "schema": {
  11212. "$ref": "#/components/schemas/InvalidRequestError"
  11213. }
  11214. }
  11215. }
  11216. },
  11217. "401": {
  11218. "description": "UnauthorizedError",
  11219. "content": {
  11220. "application/json": {
  11221. "schema": {
  11222. "$ref": "#/components/schemas/UnauthorizedError"
  11223. }
  11224. }
  11225. }
  11226. }
  11227. },
  11228. "description": "Retrieve saved permissions, optionally filtered by project.",
  11229. "summary": "List saved permissions",
  11230. "x-codeSamples": [
  11231. {
  11232. "lang": "js",
  11233. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  11234. }
  11235. ]
  11236. }
  11237. },
  11238. "/api/permission/saved/{id}": {
  11239. "delete": {
  11240. "tags": ["v2 saved permissions"],
  11241. "operationId": "v2.permission.saved.remove",
  11242. "parameters": [
  11243. {
  11244. "name": "id",
  11245. "in": "path",
  11246. "schema": {
  11247. "type": "string"
  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. },
  11278. "description": "Remove a saved permission by ID.",
  11279. "summary": "Remove saved permission",
  11280. "x-codeSamples": [
  11281. {
  11282. "lang": "js",
  11283. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  11284. }
  11285. ]
  11286. }
  11287. },
  11288. "/api/fs/read": {
  11289. "get": {
  11290. "tags": ["v2 filesystem"],
  11291. "operationId": "v2.fs.read",
  11292. "parameters": [
  11293. {
  11294. "name": "location",
  11295. "in": "query",
  11296. "schema": {
  11297. "type": "object",
  11298. "properties": {
  11299. "directory": {
  11300. "type": "string"
  11301. },
  11302. "workspace": {
  11303. "type": "string"
  11304. }
  11305. },
  11306. "additionalProperties": false
  11307. },
  11308. "required": false,
  11309. "style": "deepObject",
  11310. "explode": true
  11311. },
  11312. {
  11313. "name": "path",
  11314. "in": "query",
  11315. "schema": {
  11316. "type": "string"
  11317. },
  11318. "required": true
  11319. },
  11320. {
  11321. "name": "reference",
  11322. "in": "query",
  11323. "schema": {
  11324. "type": "string"
  11325. },
  11326. "required": false
  11327. }
  11328. ],
  11329. "security": [],
  11330. "responses": {
  11331. "200": {
  11332. "description": "Success",
  11333. "content": {
  11334. "application/json": {
  11335. "schema": {
  11336. "type": "object",
  11337. "properties": {
  11338. "location": {
  11339. "$ref": "#/components/schemas/LocationInfo"
  11340. },
  11341. "data": {
  11342. "anyOf": [
  11343. {
  11344. "$ref": "#/components/schemas/FileSystemTextContent"
  11345. },
  11346. {
  11347. "$ref": "#/components/schemas/FileSystemBinaryContent"
  11348. }
  11349. ]
  11350. }
  11351. },
  11352. "required": ["location", "data"],
  11353. "additionalProperties": false
  11354. }
  11355. }
  11356. }
  11357. },
  11358. "400": {
  11359. "description": "InvalidRequestError",
  11360. "content": {
  11361. "application/json": {
  11362. "schema": {
  11363. "$ref": "#/components/schemas/InvalidRequestError"
  11364. }
  11365. }
  11366. }
  11367. },
  11368. "401": {
  11369. "description": "UnauthorizedError",
  11370. "content": {
  11371. "application/json": {
  11372. "schema": {
  11373. "$ref": "#/components/schemas/UnauthorizedError"
  11374. }
  11375. }
  11376. }
  11377. }
  11378. },
  11379. "description": "Read one file relative to the requested location.",
  11380. "summary": "Read file",
  11381. "x-codeSamples": [
  11382. {
  11383. "lang": "js",
  11384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  11385. }
  11386. ]
  11387. }
  11388. },
  11389. "/api/fs/list": {
  11390. "get": {
  11391. "tags": ["v2 filesystem"],
  11392. "operationId": "v2.fs.list",
  11393. "parameters": [
  11394. {
  11395. "name": "location",
  11396. "in": "query",
  11397. "schema": {
  11398. "type": "object",
  11399. "properties": {
  11400. "directory": {
  11401. "type": "string"
  11402. },
  11403. "workspace": {
  11404. "type": "string"
  11405. }
  11406. },
  11407. "additionalProperties": false
  11408. },
  11409. "required": false,
  11410. "style": "deepObject",
  11411. "explode": true
  11412. },
  11413. {
  11414. "name": "path",
  11415. "in": "query",
  11416. "schema": {
  11417. "type": "string"
  11418. },
  11419. "required": false
  11420. },
  11421. {
  11422. "name": "reference",
  11423. "in": "query",
  11424. "schema": {
  11425. "type": "string"
  11426. },
  11427. "required": false
  11428. }
  11429. ],
  11430. "security": [],
  11431. "responses": {
  11432. "200": {
  11433. "description": "Success",
  11434. "content": {
  11435. "application/json": {
  11436. "schema": {
  11437. "type": "object",
  11438. "properties": {
  11439. "location": {
  11440. "$ref": "#/components/schemas/LocationInfo"
  11441. },
  11442. "data": {
  11443. "type": "array",
  11444. "items": {
  11445. "$ref": "#/components/schemas/FileSystemEntry"
  11446. }
  11447. }
  11448. },
  11449. "required": ["location", "data"],
  11450. "additionalProperties": false
  11451. }
  11452. }
  11453. }
  11454. },
  11455. "400": {
  11456. "description": "InvalidRequestError",
  11457. "content": {
  11458. "application/json": {
  11459. "schema": {
  11460. "$ref": "#/components/schemas/InvalidRequestError"
  11461. }
  11462. }
  11463. }
  11464. },
  11465. "401": {
  11466. "description": "UnauthorizedError",
  11467. "content": {
  11468. "application/json": {
  11469. "schema": {
  11470. "$ref": "#/components/schemas/UnauthorizedError"
  11471. }
  11472. }
  11473. }
  11474. }
  11475. },
  11476. "description": "List direct children of one directory relative to the requested location.",
  11477. "summary": "List directory",
  11478. "x-codeSamples": [
  11479. {
  11480. "lang": "js",
  11481. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  11482. }
  11483. ]
  11484. }
  11485. },
  11486. "/api/command": {
  11487. "get": {
  11488. "tags": ["v2 commands"],
  11489. "operationId": "v2.command.list",
  11490. "parameters": [
  11491. {
  11492. "name": "location",
  11493. "in": "query",
  11494. "schema": {
  11495. "type": "object",
  11496. "properties": {
  11497. "directory": {
  11498. "type": "string"
  11499. },
  11500. "workspace": {
  11501. "type": "string"
  11502. }
  11503. },
  11504. "additionalProperties": false
  11505. },
  11506. "required": false,
  11507. "style": "deepObject",
  11508. "explode": true
  11509. }
  11510. ],
  11511. "security": [],
  11512. "responses": {
  11513. "200": {
  11514. "description": "Success",
  11515. "content": {
  11516. "application/json": {
  11517. "schema": {
  11518. "type": "object",
  11519. "properties": {
  11520. "location": {
  11521. "$ref": "#/components/schemas/LocationInfo"
  11522. },
  11523. "data": {
  11524. "type": "array",
  11525. "items": {
  11526. "$ref": "#/components/schemas/CommandV2Info"
  11527. }
  11528. }
  11529. },
  11530. "required": ["location", "data"],
  11531. "additionalProperties": false
  11532. }
  11533. }
  11534. }
  11535. },
  11536. "400": {
  11537. "description": "InvalidRequestError",
  11538. "content": {
  11539. "application/json": {
  11540. "schema": {
  11541. "$ref": "#/components/schemas/InvalidRequestError"
  11542. }
  11543. }
  11544. }
  11545. },
  11546. "401": {
  11547. "description": "UnauthorizedError",
  11548. "content": {
  11549. "application/json": {
  11550. "schema": {
  11551. "$ref": "#/components/schemas/UnauthorizedError"
  11552. }
  11553. }
  11554. }
  11555. }
  11556. },
  11557. "description": "Retrieve currently registered v2 commands.",
  11558. "summary": "List v2 commands",
  11559. "x-codeSamples": [
  11560. {
  11561. "lang": "js",
  11562. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  11563. }
  11564. ]
  11565. }
  11566. },
  11567. "/api/skill": {
  11568. "get": {
  11569. "tags": ["v2 skills"],
  11570. "operationId": "v2.skill.list",
  11571. "parameters": [
  11572. {
  11573. "name": "location",
  11574. "in": "query",
  11575. "schema": {
  11576. "type": "object",
  11577. "properties": {
  11578. "directory": {
  11579. "type": "string"
  11580. },
  11581. "workspace": {
  11582. "type": "string"
  11583. }
  11584. },
  11585. "additionalProperties": false
  11586. },
  11587. "required": false,
  11588. "style": "deepObject",
  11589. "explode": true
  11590. }
  11591. ],
  11592. "security": [],
  11593. "responses": {
  11594. "200": {
  11595. "description": "Success",
  11596. "content": {
  11597. "application/json": {
  11598. "schema": {
  11599. "type": "object",
  11600. "properties": {
  11601. "location": {
  11602. "$ref": "#/components/schemas/LocationInfo"
  11603. },
  11604. "data": {
  11605. "type": "array",
  11606. "items": {
  11607. "$ref": "#/components/schemas/SkillV2Info"
  11608. }
  11609. }
  11610. },
  11611. "required": ["location", "data"],
  11612. "additionalProperties": false
  11613. }
  11614. }
  11615. }
  11616. },
  11617. "400": {
  11618. "description": "InvalidRequestError",
  11619. "content": {
  11620. "application/json": {
  11621. "schema": {
  11622. "$ref": "#/components/schemas/InvalidRequestError"
  11623. }
  11624. }
  11625. }
  11626. },
  11627. "401": {
  11628. "description": "UnauthorizedError",
  11629. "content": {
  11630. "application/json": {
  11631. "schema": {
  11632. "$ref": "#/components/schemas/UnauthorizedError"
  11633. }
  11634. }
  11635. }
  11636. }
  11637. },
  11638. "description": "Retrieve currently registered v2 skills.",
  11639. "summary": "List v2 skills",
  11640. "x-codeSamples": [
  11641. {
  11642. "lang": "js",
  11643. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  11644. }
  11645. ]
  11646. }
  11647. },
  11648. "/api/event": {
  11649. "get": {
  11650. "tags": ["v2 events"],
  11651. "operationId": "v2.event.subscribe",
  11652. "parameters": [
  11653. {
  11654. "name": "location",
  11655. "in": "query",
  11656. "schema": {
  11657. "type": "object",
  11658. "properties": {
  11659. "directory": {
  11660. "type": "string"
  11661. },
  11662. "workspace": {
  11663. "type": "string"
  11664. }
  11665. },
  11666. "additionalProperties": false
  11667. },
  11668. "required": false,
  11669. "style": "deepObject",
  11670. "explode": true
  11671. }
  11672. ],
  11673. "security": [],
  11674. "responses": {
  11675. "200": {
  11676. "description": "Success",
  11677. "content": {
  11678. "text/event-stream": {
  11679. "schema": {
  11680. "type": "string"
  11681. }
  11682. }
  11683. }
  11684. },
  11685. "400": {
  11686. "description": "InvalidRequestError",
  11687. "content": {
  11688. "application/json": {
  11689. "schema": {
  11690. "$ref": "#/components/schemas/InvalidRequestError"
  11691. }
  11692. }
  11693. }
  11694. },
  11695. "401": {
  11696. "description": "UnauthorizedError",
  11697. "content": {
  11698. "application/json": {
  11699. "schema": {
  11700. "$ref": "#/components/schemas/UnauthorizedError"
  11701. }
  11702. }
  11703. }
  11704. }
  11705. },
  11706. "description": "Subscribe to native EventV2 payloads for a location.",
  11707. "summary": "Subscribe to v2 events",
  11708. "x-codeSamples": [
  11709. {
  11710. "lang": "js",
  11711. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  11712. }
  11713. ]
  11714. }
  11715. },
  11716. "/api/question/request": {
  11717. "get": {
  11718. "tags": ["v2 questions"],
  11719. "operationId": "v2.question.request.list",
  11720. "parameters": [
  11721. {
  11722. "name": "location",
  11723. "in": "query",
  11724. "schema": {
  11725. "type": "object",
  11726. "properties": {
  11727. "directory": {
  11728. "type": "string"
  11729. },
  11730. "workspace": {
  11731. "type": "string"
  11732. }
  11733. },
  11734. "additionalProperties": false
  11735. },
  11736. "required": false,
  11737. "style": "deepObject",
  11738. "explode": true
  11739. }
  11740. ],
  11741. "security": [],
  11742. "responses": {
  11743. "200": {
  11744. "description": "Success",
  11745. "content": {
  11746. "application/json": {
  11747. "schema": {
  11748. "type": "object",
  11749. "properties": {
  11750. "location": {
  11751. "$ref": "#/components/schemas/LocationInfo"
  11752. },
  11753. "data": {
  11754. "type": "array",
  11755. "items": {
  11756. "$ref": "#/components/schemas/QuestionV2Request"
  11757. }
  11758. }
  11759. },
  11760. "required": ["location", "data"],
  11761. "additionalProperties": false
  11762. }
  11763. }
  11764. }
  11765. },
  11766. "400": {
  11767. "description": "InvalidRequestError",
  11768. "content": {
  11769. "application/json": {
  11770. "schema": {
  11771. "$ref": "#/components/schemas/InvalidRequestError"
  11772. }
  11773. }
  11774. }
  11775. },
  11776. "401": {
  11777. "description": "UnauthorizedError",
  11778. "content": {
  11779. "application/json": {
  11780. "schema": {
  11781. "$ref": "#/components/schemas/UnauthorizedError"
  11782. }
  11783. }
  11784. }
  11785. }
  11786. },
  11787. "description": "Retrieve pending question requests for a location.",
  11788. "summary": "List pending question requests",
  11789. "x-codeSamples": [
  11790. {
  11791. "lang": "js",
  11792. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  11793. }
  11794. ]
  11795. }
  11796. },
  11797. "/api/session/{sessionID}/question/request/{requestID}/reply": {
  11798. "post": {
  11799. "tags": ["v2 session questions"],
  11800. "operationId": "v2.session.question.reply",
  11801. "parameters": [
  11802. {
  11803. "name": "sessionID",
  11804. "in": "path",
  11805. "schema": {
  11806. "type": "string",
  11807. "pattern": "^ses"
  11808. },
  11809. "required": true
  11810. },
  11811. {
  11812. "name": "requestID",
  11813. "in": "path",
  11814. "schema": {
  11815. "type": "string",
  11816. "pattern": "^que"
  11817. },
  11818. "required": true
  11819. }
  11820. ],
  11821. "security": [],
  11822. "responses": {
  11823. "204": {
  11824. "description": "<No Content>"
  11825. },
  11826. "400": {
  11827. "description": "InvalidRequestError",
  11828. "content": {
  11829. "application/json": {
  11830. "schema": {
  11831. "$ref": "#/components/schemas/InvalidRequestError"
  11832. }
  11833. }
  11834. }
  11835. },
  11836. "401": {
  11837. "description": "UnauthorizedError",
  11838. "content": {
  11839. "application/json": {
  11840. "schema": {
  11841. "$ref": "#/components/schemas/UnauthorizedError"
  11842. }
  11843. }
  11844. }
  11845. },
  11846. "404": {
  11847. "description": "SessionNotFoundError | QuestionNotFoundError",
  11848. "content": {
  11849. "application/json": {
  11850. "schema": {
  11851. "anyOf": [
  11852. {
  11853. "$ref": "#/components/schemas/SessionNotFoundError"
  11854. },
  11855. {
  11856. "$ref": "#/components/schemas/QuestionNotFoundError"
  11857. }
  11858. ]
  11859. }
  11860. }
  11861. }
  11862. }
  11863. },
  11864. "description": "Answer a pending question request owned by a session.",
  11865. "summary": "Reply to pending question request",
  11866. "requestBody": {
  11867. "content": {
  11868. "application/json": {
  11869. "schema": {
  11870. "$ref": "#/components/schemas/QuestionV2Reply"
  11871. }
  11872. }
  11873. },
  11874. "required": true
  11875. },
  11876. "x-codeSamples": [
  11877. {
  11878. "lang": "js",
  11879. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  11880. }
  11881. ]
  11882. }
  11883. },
  11884. "/api/session/{sessionID}/question/request/{requestID}/reject": {
  11885. "post": {
  11886. "tags": ["v2 session questions"],
  11887. "operationId": "v2.session.question.reject",
  11888. "parameters": [
  11889. {
  11890. "name": "sessionID",
  11891. "in": "path",
  11892. "schema": {
  11893. "type": "string",
  11894. "pattern": "^ses"
  11895. },
  11896. "required": true
  11897. },
  11898. {
  11899. "name": "requestID",
  11900. "in": "path",
  11901. "schema": {
  11902. "type": "string",
  11903. "pattern": "^que"
  11904. },
  11905. "required": true
  11906. }
  11907. ],
  11908. "security": [],
  11909. "responses": {
  11910. "204": {
  11911. "description": "<No Content>"
  11912. },
  11913. "400": {
  11914. "description": "InvalidRequestError",
  11915. "content": {
  11916. "application/json": {
  11917. "schema": {
  11918. "$ref": "#/components/schemas/InvalidRequestError"
  11919. }
  11920. }
  11921. }
  11922. },
  11923. "401": {
  11924. "description": "UnauthorizedError",
  11925. "content": {
  11926. "application/json": {
  11927. "schema": {
  11928. "$ref": "#/components/schemas/UnauthorizedError"
  11929. }
  11930. }
  11931. }
  11932. },
  11933. "404": {
  11934. "description": "SessionNotFoundError | QuestionNotFoundError",
  11935. "content": {
  11936. "application/json": {
  11937. "schema": {
  11938. "anyOf": [
  11939. {
  11940. "$ref": "#/components/schemas/SessionNotFoundError"
  11941. },
  11942. {
  11943. "$ref": "#/components/schemas/QuestionNotFoundError"
  11944. }
  11945. ]
  11946. }
  11947. }
  11948. }
  11949. }
  11950. },
  11951. "description": "Reject a pending question request owned by a session.",
  11952. "summary": "Reject pending question request",
  11953. "x-codeSamples": [
  11954. {
  11955. "lang": "js",
  11956. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  11957. }
  11958. ]
  11959. }
  11960. },
  11961. "/pty/{ptyID}/connect": {
  11962. "get": {
  11963. "tags": ["pty"],
  11964. "operationId": "pty.connect",
  11965. "parameters": [
  11966. {
  11967. "name": "ptyID",
  11968. "in": "path",
  11969. "schema": {
  11970. "type": "string",
  11971. "pattern": "^pty"
  11972. },
  11973. "required": true
  11974. },
  11975. {
  11976. "in": "query",
  11977. "name": "directory",
  11978. "schema": {
  11979. "type": "string"
  11980. }
  11981. },
  11982. {
  11983. "in": "query",
  11984. "name": "workspace",
  11985. "schema": {
  11986. "type": "string"
  11987. }
  11988. },
  11989. {
  11990. "in": "query",
  11991. "name": "cursor",
  11992. "schema": {
  11993. "type": "string"
  11994. }
  11995. },
  11996. {
  11997. "in": "query",
  11998. "name": "ticket",
  11999. "schema": {
  12000. "type": "string"
  12001. }
  12002. }
  12003. ],
  12004. "responses": {
  12005. "200": {
  12006. "description": "Connected session",
  12007. "content": {
  12008. "application/json": {
  12009. "schema": {
  12010. "type": "boolean",
  12011. "description": "Connected session"
  12012. }
  12013. }
  12014. }
  12015. },
  12016. "403": {
  12017. "description": "Forbidden",
  12018. "content": {
  12019. "application/json": {
  12020. "schema": {
  12021. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  12022. }
  12023. }
  12024. }
  12025. },
  12026. "404": {
  12027. "description": "Not found",
  12028. "content": {
  12029. "application/json": {
  12030. "schema": {
  12031. "$ref": "#/components/schemas/NotFoundError"
  12032. }
  12033. }
  12034. }
  12035. }
  12036. },
  12037. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  12038. "summary": "Connect to PTY session",
  12039. "x-codeSamples": [
  12040. {
  12041. "lang": "js",
  12042. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  12043. }
  12044. ]
  12045. }
  12046. }
  12047. },
  12048. "components": {
  12049. "schemas": {
  12050. "Event": {
  12051. "anyOf": [
  12052. {
  12053. "$ref": "#/components/schemas/EventModels-devRefreshed"
  12054. },
  12055. {
  12056. "$ref": "#/components/schemas/EventPluginAdded"
  12057. },
  12058. {
  12059. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  12060. },
  12061. {
  12062. "$ref": "#/components/schemas/EventSessionCreated"
  12063. },
  12064. {
  12065. "$ref": "#/components/schemas/EventSessionUpdated"
  12066. },
  12067. {
  12068. "$ref": "#/components/schemas/EventSessionDeleted"
  12069. },
  12070. {
  12071. "$ref": "#/components/schemas/EventMessageUpdated"
  12072. },
  12073. {
  12074. "$ref": "#/components/schemas/EventMessageRemoved"
  12075. },
  12076. {
  12077. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12078. },
  12079. {
  12080. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12081. },
  12082. {
  12083. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12084. },
  12085. {
  12086. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12087. },
  12088. {
  12089. "$ref": "#/components/schemas/EventSessionNextMoved"
  12090. },
  12091. {
  12092. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12093. },
  12094. {
  12095. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  12096. },
  12097. {
  12098. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  12099. },
  12100. {
  12101. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  12102. },
  12103. {
  12104. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  12105. },
  12106. {
  12107. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12108. },
  12109. {
  12110. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12111. },
  12112. {
  12113. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12114. },
  12115. {
  12116. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12117. },
  12118. {
  12119. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12120. },
  12121. {
  12122. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12123. },
  12124. {
  12125. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12126. },
  12127. {
  12128. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12129. },
  12130. {
  12131. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12132. },
  12133. {
  12134. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12135. },
  12136. {
  12137. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12138. },
  12139. {
  12140. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12141. },
  12142. {
  12143. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12144. },
  12145. {
  12146. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12147. },
  12148. {
  12149. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12150. },
  12151. {
  12152. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12153. },
  12154. {
  12155. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12156. },
  12157. {
  12158. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12159. },
  12160. {
  12161. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12162. },
  12163. {
  12164. "$ref": "#/components/schemas/EventSessionNextRetried"
  12165. },
  12166. {
  12167. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12168. },
  12169. {
  12170. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12171. },
  12172. {
  12173. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12174. },
  12175. {
  12176. "$ref": "#/components/schemas/EventMessagePartDelta"
  12177. },
  12178. {
  12179. "$ref": "#/components/schemas/EventSessionDiff"
  12180. },
  12181. {
  12182. "$ref": "#/components/schemas/EventSessionError"
  12183. },
  12184. {
  12185. "$ref": "#/components/schemas/EventInstallationUpdated"
  12186. },
  12187. {
  12188. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12189. },
  12190. {
  12191. "$ref": "#/components/schemas/EventFileEdited"
  12192. },
  12193. {
  12194. "$ref": "#/components/schemas/EventAccountAdded"
  12195. },
  12196. {
  12197. "$ref": "#/components/schemas/EventAccountRemoved"
  12198. },
  12199. {
  12200. "$ref": "#/components/schemas/EventAccountSwitched"
  12201. },
  12202. {
  12203. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12204. },
  12205. {
  12206. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12207. },
  12208. {
  12209. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12210. },
  12211. {
  12212. "$ref": "#/components/schemas/EventPtyCreated"
  12213. },
  12214. {
  12215. "$ref": "#/components/schemas/EventPtyUpdated"
  12216. },
  12217. {
  12218. "$ref": "#/components/schemas/EventPtyExited"
  12219. },
  12220. {
  12221. "$ref": "#/components/schemas/EventPtyDeleted"
  12222. },
  12223. {
  12224. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12225. },
  12226. {
  12227. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12228. },
  12229. {
  12230. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12231. },
  12232. {
  12233. "$ref": "#/components/schemas/EventTodoUpdated"
  12234. },
  12235. {
  12236. "$ref": "#/components/schemas/EventLspUpdated"
  12237. },
  12238. {
  12239. "$ref": "#/components/schemas/EventPermissionAsked"
  12240. },
  12241. {
  12242. "$ref": "#/components/schemas/EventPermissionReplied"
  12243. },
  12244. {
  12245. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12246. },
  12247. {
  12248. "$ref": "#/components/schemas/Event.tui.command.execute"
  12249. },
  12250. {
  12251. "$ref": "#/components/schemas/Event.tui.toast.show"
  12252. },
  12253. {
  12254. "$ref": "#/components/schemas/Event.tui.session.select"
  12255. },
  12256. {
  12257. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12258. },
  12259. {
  12260. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12261. },
  12262. {
  12263. "$ref": "#/components/schemas/EventCommandExecuted"
  12264. },
  12265. {
  12266. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12267. },
  12268. {
  12269. "$ref": "#/components/schemas/EventProjectUpdated"
  12270. },
  12271. {
  12272. "$ref": "#/components/schemas/EventQuestionAsked"
  12273. },
  12274. {
  12275. "$ref": "#/components/schemas/EventQuestionReplied"
  12276. },
  12277. {
  12278. "$ref": "#/components/schemas/EventQuestionRejected"
  12279. },
  12280. {
  12281. "$ref": "#/components/schemas/EventSessionStatus"
  12282. },
  12283. {
  12284. "$ref": "#/components/schemas/EventSessionIdle"
  12285. },
  12286. {
  12287. "$ref": "#/components/schemas/EventSessionCompacted"
  12288. },
  12289. {
  12290. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12291. },
  12292. {
  12293. "$ref": "#/components/schemas/EventWorktreeReady"
  12294. },
  12295. {
  12296. "$ref": "#/components/schemas/EventWorktreeFailed"
  12297. },
  12298. {
  12299. "$ref": "#/components/schemas/EventWorkspaceReady"
  12300. },
  12301. {
  12302. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12303. },
  12304. {
  12305. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12306. },
  12307. {
  12308. "$ref": "#/components/schemas/EventServerConnected"
  12309. },
  12310. {
  12311. "$ref": "#/components/schemas/EventGlobalDisposed"
  12312. },
  12313. {
  12314. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12315. }
  12316. ]
  12317. },
  12318. "QuestionReplied": {
  12319. "type": "object",
  12320. "properties": {
  12321. "sessionID": {
  12322. "type": "string",
  12323. "pattern": "^ses"
  12324. },
  12325. "requestID": {
  12326. "type": "string",
  12327. "pattern": "^que"
  12328. },
  12329. "answers": {
  12330. "type": "array",
  12331. "items": {
  12332. "$ref": "#/components/schemas/QuestionAnswer"
  12333. }
  12334. }
  12335. },
  12336. "required": ["sessionID", "requestID", "answers"],
  12337. "additionalProperties": false
  12338. },
  12339. "QuestionRejected": {
  12340. "type": "object",
  12341. "properties": {
  12342. "sessionID": {
  12343. "type": "string",
  12344. "pattern": "^ses"
  12345. },
  12346. "requestID": {
  12347. "type": "string",
  12348. "pattern": "^que"
  12349. }
  12350. },
  12351. "required": ["sessionID", "requestID"],
  12352. "additionalProperties": false
  12353. },
  12354. "OAuth": {
  12355. "type": "object",
  12356. "properties": {
  12357. "type": {
  12358. "type": "string",
  12359. "enum": ["oauth"]
  12360. },
  12361. "refresh": {
  12362. "type": "string"
  12363. },
  12364. "access": {
  12365. "type": "string"
  12366. },
  12367. "expires": {
  12368. "type": "integer",
  12369. "minimum": 0
  12370. },
  12371. "accountId": {
  12372. "type": "string"
  12373. },
  12374. "enterpriseUrl": {
  12375. "type": "string"
  12376. }
  12377. },
  12378. "required": ["type", "refresh", "access", "expires"],
  12379. "additionalProperties": false
  12380. },
  12381. "ApiAuth": {
  12382. "type": "object",
  12383. "properties": {
  12384. "type": {
  12385. "type": "string",
  12386. "enum": ["api"]
  12387. },
  12388. "key": {
  12389. "type": "string"
  12390. },
  12391. "metadata": {
  12392. "type": "object",
  12393. "additionalProperties": {
  12394. "type": "string"
  12395. }
  12396. }
  12397. },
  12398. "required": ["type", "key"],
  12399. "additionalProperties": false
  12400. },
  12401. "WellKnownAuth": {
  12402. "type": "object",
  12403. "properties": {
  12404. "type": {
  12405. "type": "string",
  12406. "enum": ["wellknown"]
  12407. },
  12408. "key": {
  12409. "type": "string"
  12410. },
  12411. "token": {
  12412. "type": "string"
  12413. }
  12414. },
  12415. "required": ["type", "key", "token"],
  12416. "additionalProperties": false
  12417. },
  12418. "Auth": {
  12419. "anyOf": [
  12420. {
  12421. "$ref": "#/components/schemas/OAuth"
  12422. },
  12423. {
  12424. "$ref": "#/components/schemas/ApiAuth"
  12425. },
  12426. {
  12427. "$ref": "#/components/schemas/WellKnownAuth"
  12428. }
  12429. ]
  12430. },
  12431. "effect_HttpApiError_BadRequest": {
  12432. "type": "object",
  12433. "properties": {
  12434. "_tag": {
  12435. "type": "string",
  12436. "enum": ["BadRequest"]
  12437. }
  12438. },
  12439. "required": ["_tag"],
  12440. "additionalProperties": false
  12441. },
  12442. "InvalidRequestError": {
  12443. "type": "object",
  12444. "properties": {
  12445. "_tag": {
  12446. "type": "string",
  12447. "enum": ["InvalidRequestError"]
  12448. },
  12449. "message": {
  12450. "type": "string"
  12451. },
  12452. "kind": {
  12453. "type": "string"
  12454. },
  12455. "field": {
  12456. "type": "string"
  12457. }
  12458. },
  12459. "required": ["_tag", "message"],
  12460. "additionalProperties": false
  12461. },
  12462. "MoveSessionError": {
  12463. "type": "object",
  12464. "properties": {
  12465. "name": {
  12466. "type": "string",
  12467. "enum": ["MoveSessionError"]
  12468. },
  12469. "data": {
  12470. "type": "object",
  12471. "properties": {
  12472. "message": {
  12473. "type": "string"
  12474. }
  12475. },
  12476. "required": ["message"],
  12477. "additionalProperties": false
  12478. }
  12479. },
  12480. "required": ["name", "data"],
  12481. "additionalProperties": false
  12482. },
  12483. "SnapshotFileDiff": {
  12484. "type": "object",
  12485. "properties": {
  12486. "file": {
  12487. "type": "string"
  12488. },
  12489. "patch": {
  12490. "type": "string"
  12491. },
  12492. "additions": {
  12493. "type": "number"
  12494. },
  12495. "deletions": {
  12496. "type": "number"
  12497. },
  12498. "status": {
  12499. "type": "string",
  12500. "enum": ["added", "deleted", "modified"]
  12501. }
  12502. },
  12503. "required": ["additions", "deletions"],
  12504. "additionalProperties": false
  12505. },
  12506. "PermissionAction": {
  12507. "type": "string",
  12508. "enum": ["allow", "deny", "ask"]
  12509. },
  12510. "PermissionRule": {
  12511. "type": "object",
  12512. "properties": {
  12513. "permission": {
  12514. "type": "string"
  12515. },
  12516. "pattern": {
  12517. "type": "string"
  12518. },
  12519. "action": {
  12520. "$ref": "#/components/schemas/PermissionAction"
  12521. }
  12522. },
  12523. "required": ["permission", "pattern", "action"],
  12524. "additionalProperties": false
  12525. },
  12526. "PermissionRuleset": {
  12527. "type": "array",
  12528. "items": {
  12529. "$ref": "#/components/schemas/PermissionRule"
  12530. }
  12531. },
  12532. "Session": {
  12533. "type": "object",
  12534. "properties": {
  12535. "id": {
  12536. "type": "string",
  12537. "pattern": "^ses"
  12538. },
  12539. "slug": {
  12540. "type": "string"
  12541. },
  12542. "projectID": {
  12543. "type": "string"
  12544. },
  12545. "workspaceID": {
  12546. "type": "string",
  12547. "pattern": "^wrk"
  12548. },
  12549. "directory": {
  12550. "type": "string"
  12551. },
  12552. "path": {
  12553. "type": "string"
  12554. },
  12555. "parentID": {
  12556. "type": "string",
  12557. "pattern": "^ses"
  12558. },
  12559. "summary": {
  12560. "type": "object",
  12561. "properties": {
  12562. "additions": {
  12563. "type": "number"
  12564. },
  12565. "deletions": {
  12566. "type": "number"
  12567. },
  12568. "files": {
  12569. "type": "number"
  12570. },
  12571. "diffs": {
  12572. "type": "array",
  12573. "items": {
  12574. "$ref": "#/components/schemas/SnapshotFileDiff"
  12575. }
  12576. }
  12577. },
  12578. "required": ["additions", "deletions", "files"],
  12579. "additionalProperties": false
  12580. },
  12581. "cost": {
  12582. "type": "number"
  12583. },
  12584. "tokens": {
  12585. "type": "object",
  12586. "properties": {
  12587. "input": {
  12588. "type": "number"
  12589. },
  12590. "output": {
  12591. "type": "number"
  12592. },
  12593. "reasoning": {
  12594. "type": "number"
  12595. },
  12596. "cache": {
  12597. "type": "object",
  12598. "properties": {
  12599. "read": {
  12600. "type": "number"
  12601. },
  12602. "write": {
  12603. "type": "number"
  12604. }
  12605. },
  12606. "required": ["read", "write"],
  12607. "additionalProperties": false
  12608. }
  12609. },
  12610. "required": ["input", "output", "reasoning", "cache"],
  12611. "additionalProperties": false
  12612. },
  12613. "share": {
  12614. "type": "object",
  12615. "properties": {
  12616. "url": {
  12617. "type": "string"
  12618. }
  12619. },
  12620. "required": ["url"],
  12621. "additionalProperties": false
  12622. },
  12623. "title": {
  12624. "type": "string"
  12625. },
  12626. "agent": {
  12627. "type": "string"
  12628. },
  12629. "model": {
  12630. "type": "object",
  12631. "properties": {
  12632. "id": {
  12633. "type": "string"
  12634. },
  12635. "providerID": {
  12636. "type": "string"
  12637. },
  12638. "variant": {
  12639. "type": "string"
  12640. }
  12641. },
  12642. "required": ["id", "providerID"],
  12643. "additionalProperties": false
  12644. },
  12645. "version": {
  12646. "type": "string"
  12647. },
  12648. "metadata": {
  12649. "type": "object"
  12650. },
  12651. "time": {
  12652. "type": "object",
  12653. "properties": {
  12654. "created": {
  12655. "type": "integer",
  12656. "minimum": 0
  12657. },
  12658. "updated": {
  12659. "type": "integer",
  12660. "minimum": 0
  12661. },
  12662. "compacting": {
  12663. "type": "integer",
  12664. "minimum": 0
  12665. },
  12666. "archived": {
  12667. "type": "number"
  12668. }
  12669. },
  12670. "required": ["created", "updated"],
  12671. "additionalProperties": false
  12672. },
  12673. "permission": {
  12674. "$ref": "#/components/schemas/PermissionRuleset"
  12675. },
  12676. "revert": {
  12677. "type": "object",
  12678. "properties": {
  12679. "messageID": {
  12680. "type": "string",
  12681. "pattern": "^msg"
  12682. },
  12683. "partID": {
  12684. "type": "string",
  12685. "pattern": "^prt"
  12686. },
  12687. "snapshot": {
  12688. "type": "string"
  12689. },
  12690. "diff": {
  12691. "type": "string"
  12692. }
  12693. },
  12694. "required": ["messageID"],
  12695. "additionalProperties": false
  12696. }
  12697. },
  12698. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12699. "additionalProperties": false
  12700. },
  12701. "OutputFormatText": {
  12702. "type": "object",
  12703. "properties": {
  12704. "type": {
  12705. "type": "string",
  12706. "enum": ["text"]
  12707. }
  12708. },
  12709. "required": ["type"],
  12710. "additionalProperties": false
  12711. },
  12712. "JSONSchema": {
  12713. "type": "object"
  12714. },
  12715. "OutputFormatJsonSchema": {
  12716. "type": "object",
  12717. "properties": {
  12718. "type": {
  12719. "type": "string",
  12720. "enum": ["json_schema"]
  12721. },
  12722. "schema": {
  12723. "$ref": "#/components/schemas/JSONSchema"
  12724. },
  12725. "retryCount": {
  12726. "type": "integer",
  12727. "minimum": 0
  12728. }
  12729. },
  12730. "required": ["type", "schema"],
  12731. "additionalProperties": false
  12732. },
  12733. "OutputFormat": {
  12734. "anyOf": [
  12735. {
  12736. "$ref": "#/components/schemas/OutputFormatText"
  12737. },
  12738. {
  12739. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  12740. }
  12741. ]
  12742. },
  12743. "UserMessage": {
  12744. "type": "object",
  12745. "properties": {
  12746. "id": {
  12747. "type": "string",
  12748. "pattern": "^msg"
  12749. },
  12750. "sessionID": {
  12751. "type": "string",
  12752. "pattern": "^ses"
  12753. },
  12754. "role": {
  12755. "type": "string",
  12756. "enum": ["user"]
  12757. },
  12758. "time": {
  12759. "type": "object",
  12760. "properties": {
  12761. "created": {
  12762. "type": "number",
  12763. "minimum": 0
  12764. }
  12765. },
  12766. "required": ["created"],
  12767. "additionalProperties": false
  12768. },
  12769. "format": {
  12770. "$ref": "#/components/schemas/OutputFormat"
  12771. },
  12772. "summary": {
  12773. "type": "object",
  12774. "properties": {
  12775. "title": {
  12776. "type": "string"
  12777. },
  12778. "body": {
  12779. "type": "string"
  12780. },
  12781. "diffs": {
  12782. "type": "array",
  12783. "items": {
  12784. "$ref": "#/components/schemas/SnapshotFileDiff"
  12785. }
  12786. }
  12787. },
  12788. "required": ["diffs"],
  12789. "additionalProperties": false
  12790. },
  12791. "agent": {
  12792. "type": "string"
  12793. },
  12794. "model": {
  12795. "type": "object",
  12796. "properties": {
  12797. "providerID": {
  12798. "type": "string"
  12799. },
  12800. "modelID": {
  12801. "type": "string"
  12802. },
  12803. "variant": {
  12804. "type": "string"
  12805. }
  12806. },
  12807. "required": ["providerID", "modelID"],
  12808. "additionalProperties": false
  12809. },
  12810. "system": {
  12811. "type": "string"
  12812. },
  12813. "tools": {
  12814. "type": "object",
  12815. "additionalProperties": {
  12816. "type": "boolean"
  12817. }
  12818. }
  12819. },
  12820. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  12821. "additionalProperties": false
  12822. },
  12823. "ProviderAuthError": {
  12824. "type": "object",
  12825. "properties": {
  12826. "name": {
  12827. "type": "string",
  12828. "enum": ["ProviderAuthError"]
  12829. },
  12830. "data": {
  12831. "type": "object",
  12832. "properties": {
  12833. "providerID": {
  12834. "type": "string"
  12835. },
  12836. "message": {
  12837. "type": "string"
  12838. }
  12839. },
  12840. "required": ["providerID", "message"],
  12841. "additionalProperties": false
  12842. }
  12843. },
  12844. "required": ["name", "data"],
  12845. "additionalProperties": false
  12846. },
  12847. "UnknownError": {
  12848. "type": "object",
  12849. "properties": {
  12850. "name": {
  12851. "type": "string",
  12852. "enum": ["UnknownError"]
  12853. },
  12854. "data": {
  12855. "type": "object",
  12856. "properties": {
  12857. "message": {
  12858. "type": "string"
  12859. },
  12860. "ref": {
  12861. "type": "string"
  12862. }
  12863. },
  12864. "required": ["message"],
  12865. "additionalProperties": false
  12866. }
  12867. },
  12868. "required": ["name", "data"],
  12869. "additionalProperties": false
  12870. },
  12871. "MessageOutputLengthError": {
  12872. "type": "object",
  12873. "properties": {
  12874. "name": {
  12875. "type": "string",
  12876. "enum": ["MessageOutputLengthError"]
  12877. },
  12878. "data": {
  12879. "type": "object",
  12880. "properties": {}
  12881. }
  12882. },
  12883. "required": ["name", "data"],
  12884. "additionalProperties": false
  12885. },
  12886. "MessageAbortedError": {
  12887. "type": "object",
  12888. "properties": {
  12889. "name": {
  12890. "type": "string",
  12891. "enum": ["MessageAbortedError"]
  12892. },
  12893. "data": {
  12894. "type": "object",
  12895. "properties": {
  12896. "message": {
  12897. "type": "string"
  12898. }
  12899. },
  12900. "required": ["message"],
  12901. "additionalProperties": false
  12902. }
  12903. },
  12904. "required": ["name", "data"],
  12905. "additionalProperties": false
  12906. },
  12907. "StructuredOutputError": {
  12908. "type": "object",
  12909. "properties": {
  12910. "name": {
  12911. "type": "string",
  12912. "enum": ["StructuredOutputError"]
  12913. },
  12914. "data": {
  12915. "type": "object",
  12916. "properties": {
  12917. "message": {
  12918. "type": "string"
  12919. },
  12920. "retries": {
  12921. "type": "integer",
  12922. "minimum": 0
  12923. }
  12924. },
  12925. "required": ["message", "retries"],
  12926. "additionalProperties": false
  12927. }
  12928. },
  12929. "required": ["name", "data"],
  12930. "additionalProperties": false
  12931. },
  12932. "ContextOverflowError": {
  12933. "type": "object",
  12934. "properties": {
  12935. "name": {
  12936. "type": "string",
  12937. "enum": ["ContextOverflowError"]
  12938. },
  12939. "data": {
  12940. "type": "object",
  12941. "properties": {
  12942. "message": {
  12943. "type": "string"
  12944. },
  12945. "responseBody": {
  12946. "type": "string"
  12947. }
  12948. },
  12949. "required": ["message"],
  12950. "additionalProperties": false
  12951. }
  12952. },
  12953. "required": ["name", "data"],
  12954. "additionalProperties": false
  12955. },
  12956. "APIError": {
  12957. "type": "object",
  12958. "properties": {
  12959. "name": {
  12960. "type": "string",
  12961. "enum": ["APIError"]
  12962. },
  12963. "data": {
  12964. "type": "object",
  12965. "properties": {
  12966. "message": {
  12967. "type": "string"
  12968. },
  12969. "statusCode": {
  12970. "type": "integer",
  12971. "minimum": 0
  12972. },
  12973. "isRetryable": {
  12974. "type": "boolean"
  12975. },
  12976. "responseHeaders": {
  12977. "type": "object",
  12978. "additionalProperties": {
  12979. "type": "string"
  12980. }
  12981. },
  12982. "responseBody": {
  12983. "type": "string"
  12984. },
  12985. "metadata": {
  12986. "type": "object",
  12987. "additionalProperties": {
  12988. "type": "string"
  12989. }
  12990. }
  12991. },
  12992. "required": ["message", "isRetryable"],
  12993. "additionalProperties": false
  12994. }
  12995. },
  12996. "required": ["name", "data"],
  12997. "additionalProperties": false
  12998. },
  12999. "AssistantMessage": {
  13000. "type": "object",
  13001. "properties": {
  13002. "id": {
  13003. "type": "string",
  13004. "pattern": "^msg"
  13005. },
  13006. "sessionID": {
  13007. "type": "string",
  13008. "pattern": "^ses"
  13009. },
  13010. "role": {
  13011. "type": "string",
  13012. "enum": ["assistant"]
  13013. },
  13014. "time": {
  13015. "type": "object",
  13016. "properties": {
  13017. "created": {
  13018. "type": "integer",
  13019. "minimum": 0
  13020. },
  13021. "completed": {
  13022. "type": "integer",
  13023. "minimum": 0
  13024. }
  13025. },
  13026. "required": ["created"],
  13027. "additionalProperties": false
  13028. },
  13029. "error": {
  13030. "anyOf": [
  13031. {
  13032. "$ref": "#/components/schemas/ProviderAuthError"
  13033. },
  13034. {
  13035. "$ref": "#/components/schemas/UnknownError"
  13036. },
  13037. {
  13038. "$ref": "#/components/schemas/MessageOutputLengthError"
  13039. },
  13040. {
  13041. "$ref": "#/components/schemas/MessageAbortedError"
  13042. },
  13043. {
  13044. "$ref": "#/components/schemas/StructuredOutputError"
  13045. },
  13046. {
  13047. "$ref": "#/components/schemas/ContextOverflowError"
  13048. },
  13049. {
  13050. "$ref": "#/components/schemas/APIError"
  13051. }
  13052. ]
  13053. },
  13054. "parentID": {
  13055. "type": "string",
  13056. "pattern": "^msg"
  13057. },
  13058. "modelID": {
  13059. "type": "string"
  13060. },
  13061. "providerID": {
  13062. "type": "string"
  13063. },
  13064. "mode": {
  13065. "type": "string"
  13066. },
  13067. "agent": {
  13068. "type": "string"
  13069. },
  13070. "path": {
  13071. "type": "object",
  13072. "properties": {
  13073. "cwd": {
  13074. "type": "string"
  13075. },
  13076. "root": {
  13077. "type": "string"
  13078. }
  13079. },
  13080. "required": ["cwd", "root"],
  13081. "additionalProperties": false
  13082. },
  13083. "summary": {
  13084. "type": "boolean"
  13085. },
  13086. "cost": {
  13087. "type": "number"
  13088. },
  13089. "tokens": {
  13090. "type": "object",
  13091. "properties": {
  13092. "total": {
  13093. "type": "number"
  13094. },
  13095. "input": {
  13096. "type": "number"
  13097. },
  13098. "output": {
  13099. "type": "number"
  13100. },
  13101. "reasoning": {
  13102. "type": "number"
  13103. },
  13104. "cache": {
  13105. "type": "object",
  13106. "properties": {
  13107. "read": {
  13108. "type": "number"
  13109. },
  13110. "write": {
  13111. "type": "number"
  13112. }
  13113. },
  13114. "required": ["read", "write"],
  13115. "additionalProperties": false
  13116. }
  13117. },
  13118. "required": ["input", "output", "reasoning", "cache"],
  13119. "additionalProperties": false
  13120. },
  13121. "structured": {},
  13122. "variant": {
  13123. "type": "string"
  13124. },
  13125. "finish": {
  13126. "type": "string"
  13127. }
  13128. },
  13129. "required": [
  13130. "id",
  13131. "sessionID",
  13132. "role",
  13133. "time",
  13134. "parentID",
  13135. "modelID",
  13136. "providerID",
  13137. "mode",
  13138. "agent",
  13139. "path",
  13140. "cost",
  13141. "tokens"
  13142. ],
  13143. "additionalProperties": false
  13144. },
  13145. "Message": {
  13146. "anyOf": [
  13147. {
  13148. "$ref": "#/components/schemas/UserMessage"
  13149. },
  13150. {
  13151. "$ref": "#/components/schemas/AssistantMessage"
  13152. }
  13153. ]
  13154. },
  13155. "TextPart": {
  13156. "type": "object",
  13157. "properties": {
  13158. "id": {
  13159. "type": "string",
  13160. "pattern": "^prt"
  13161. },
  13162. "sessionID": {
  13163. "type": "string",
  13164. "pattern": "^ses"
  13165. },
  13166. "messageID": {
  13167. "type": "string",
  13168. "pattern": "^msg"
  13169. },
  13170. "type": {
  13171. "type": "string",
  13172. "enum": ["text"]
  13173. },
  13174. "text": {
  13175. "type": "string"
  13176. },
  13177. "synthetic": {
  13178. "type": "boolean"
  13179. },
  13180. "ignored": {
  13181. "type": "boolean"
  13182. },
  13183. "time": {
  13184. "type": "object",
  13185. "properties": {
  13186. "start": {
  13187. "type": "integer",
  13188. "minimum": 0
  13189. },
  13190. "end": {
  13191. "type": "integer",
  13192. "minimum": 0
  13193. }
  13194. },
  13195. "required": ["start"],
  13196. "additionalProperties": false
  13197. },
  13198. "metadata": {
  13199. "type": "object"
  13200. }
  13201. },
  13202. "required": ["id", "sessionID", "messageID", "type", "text"],
  13203. "additionalProperties": false
  13204. },
  13205. "SubtaskPart": {
  13206. "type": "object",
  13207. "properties": {
  13208. "id": {
  13209. "type": "string",
  13210. "pattern": "^prt"
  13211. },
  13212. "sessionID": {
  13213. "type": "string",
  13214. "pattern": "^ses"
  13215. },
  13216. "messageID": {
  13217. "type": "string",
  13218. "pattern": "^msg"
  13219. },
  13220. "type": {
  13221. "type": "string",
  13222. "enum": ["subtask"]
  13223. },
  13224. "prompt": {
  13225. "type": "string"
  13226. },
  13227. "description": {
  13228. "type": "string"
  13229. },
  13230. "agent": {
  13231. "type": "string"
  13232. },
  13233. "model": {
  13234. "type": "object",
  13235. "properties": {
  13236. "providerID": {
  13237. "type": "string"
  13238. },
  13239. "modelID": {
  13240. "type": "string"
  13241. }
  13242. },
  13243. "required": ["providerID", "modelID"],
  13244. "additionalProperties": false
  13245. },
  13246. "command": {
  13247. "type": "string"
  13248. }
  13249. },
  13250. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13251. "additionalProperties": false
  13252. },
  13253. "ReasoningPart": {
  13254. "type": "object",
  13255. "properties": {
  13256. "id": {
  13257. "type": "string",
  13258. "pattern": "^prt"
  13259. },
  13260. "sessionID": {
  13261. "type": "string",
  13262. "pattern": "^ses"
  13263. },
  13264. "messageID": {
  13265. "type": "string",
  13266. "pattern": "^msg"
  13267. },
  13268. "type": {
  13269. "type": "string",
  13270. "enum": ["reasoning"]
  13271. },
  13272. "text": {
  13273. "type": "string"
  13274. },
  13275. "metadata": {
  13276. "type": "object"
  13277. },
  13278. "time": {
  13279. "type": "object",
  13280. "properties": {
  13281. "start": {
  13282. "type": "integer",
  13283. "minimum": 0
  13284. },
  13285. "end": {
  13286. "type": "integer",
  13287. "minimum": 0
  13288. }
  13289. },
  13290. "required": ["start"],
  13291. "additionalProperties": false
  13292. }
  13293. },
  13294. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13295. "additionalProperties": false
  13296. },
  13297. "FilePartSourceText": {
  13298. "type": "object",
  13299. "properties": {
  13300. "value": {
  13301. "type": "string"
  13302. },
  13303. "start": {
  13304. "type": "number"
  13305. },
  13306. "end": {
  13307. "type": "number"
  13308. }
  13309. },
  13310. "required": ["value", "start", "end"],
  13311. "additionalProperties": false
  13312. },
  13313. "FileSource": {
  13314. "type": "object",
  13315. "properties": {
  13316. "text": {
  13317. "$ref": "#/components/schemas/FilePartSourceText"
  13318. },
  13319. "type": {
  13320. "type": "string",
  13321. "enum": ["file"]
  13322. },
  13323. "path": {
  13324. "type": "string"
  13325. }
  13326. },
  13327. "required": ["text", "type", "path"],
  13328. "additionalProperties": false
  13329. },
  13330. "Range": {
  13331. "type": "object",
  13332. "properties": {
  13333. "start": {
  13334. "type": "object",
  13335. "properties": {
  13336. "line": {
  13337. "type": "integer",
  13338. "minimum": 0
  13339. },
  13340. "character": {
  13341. "type": "integer",
  13342. "minimum": 0
  13343. }
  13344. },
  13345. "required": ["line", "character"],
  13346. "additionalProperties": false
  13347. },
  13348. "end": {
  13349. "type": "object",
  13350. "properties": {
  13351. "line": {
  13352. "type": "integer",
  13353. "minimum": 0
  13354. },
  13355. "character": {
  13356. "type": "integer",
  13357. "minimum": 0
  13358. }
  13359. },
  13360. "required": ["line", "character"],
  13361. "additionalProperties": false
  13362. }
  13363. },
  13364. "required": ["start", "end"],
  13365. "additionalProperties": false
  13366. },
  13367. "SymbolSource": {
  13368. "type": "object",
  13369. "properties": {
  13370. "text": {
  13371. "$ref": "#/components/schemas/FilePartSourceText"
  13372. },
  13373. "type": {
  13374. "type": "string",
  13375. "enum": ["symbol"]
  13376. },
  13377. "path": {
  13378. "type": "string"
  13379. },
  13380. "range": {
  13381. "$ref": "#/components/schemas/Range"
  13382. },
  13383. "name": {
  13384. "type": "string"
  13385. },
  13386. "kind": {
  13387. "type": "integer",
  13388. "minimum": 0
  13389. }
  13390. },
  13391. "required": ["text", "type", "path", "range", "name", "kind"],
  13392. "additionalProperties": false
  13393. },
  13394. "ResourceSource": {
  13395. "type": "object",
  13396. "properties": {
  13397. "text": {
  13398. "$ref": "#/components/schemas/FilePartSourceText"
  13399. },
  13400. "type": {
  13401. "type": "string",
  13402. "enum": ["resource"]
  13403. },
  13404. "clientName": {
  13405. "type": "string"
  13406. },
  13407. "uri": {
  13408. "type": "string"
  13409. }
  13410. },
  13411. "required": ["text", "type", "clientName", "uri"],
  13412. "additionalProperties": false
  13413. },
  13414. "FilePartSource": {
  13415. "anyOf": [
  13416. {
  13417. "$ref": "#/components/schemas/FileSource"
  13418. },
  13419. {
  13420. "$ref": "#/components/schemas/SymbolSource"
  13421. },
  13422. {
  13423. "$ref": "#/components/schemas/ResourceSource"
  13424. }
  13425. ]
  13426. },
  13427. "FilePart": {
  13428. "type": "object",
  13429. "properties": {
  13430. "id": {
  13431. "type": "string",
  13432. "pattern": "^prt"
  13433. },
  13434. "sessionID": {
  13435. "type": "string",
  13436. "pattern": "^ses"
  13437. },
  13438. "messageID": {
  13439. "type": "string",
  13440. "pattern": "^msg"
  13441. },
  13442. "type": {
  13443. "type": "string",
  13444. "enum": ["file"]
  13445. },
  13446. "mime": {
  13447. "type": "string"
  13448. },
  13449. "filename": {
  13450. "type": "string"
  13451. },
  13452. "url": {
  13453. "type": "string"
  13454. },
  13455. "source": {
  13456. "$ref": "#/components/schemas/FilePartSource"
  13457. }
  13458. },
  13459. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  13460. "additionalProperties": false
  13461. },
  13462. "ToolStatePending": {
  13463. "type": "object",
  13464. "properties": {
  13465. "status": {
  13466. "type": "string",
  13467. "enum": ["pending"]
  13468. },
  13469. "input": {
  13470. "type": "object"
  13471. },
  13472. "raw": {
  13473. "type": "string"
  13474. }
  13475. },
  13476. "required": ["status", "input", "raw"],
  13477. "additionalProperties": false
  13478. },
  13479. "ToolStateRunning": {
  13480. "type": "object",
  13481. "properties": {
  13482. "status": {
  13483. "type": "string",
  13484. "enum": ["running"]
  13485. },
  13486. "input": {
  13487. "type": "object"
  13488. },
  13489. "title": {
  13490. "type": "string"
  13491. },
  13492. "metadata": {
  13493. "type": "object"
  13494. },
  13495. "time": {
  13496. "type": "object",
  13497. "properties": {
  13498. "start": {
  13499. "type": "integer",
  13500. "minimum": 0
  13501. }
  13502. },
  13503. "required": ["start"],
  13504. "additionalProperties": false
  13505. }
  13506. },
  13507. "required": ["status", "input", "time"],
  13508. "additionalProperties": false
  13509. },
  13510. "ToolStateCompleted": {
  13511. "type": "object",
  13512. "properties": {
  13513. "status": {
  13514. "type": "string",
  13515. "enum": ["completed"]
  13516. },
  13517. "input": {
  13518. "type": "object"
  13519. },
  13520. "output": {
  13521. "type": "string"
  13522. },
  13523. "title": {
  13524. "type": "string"
  13525. },
  13526. "metadata": {
  13527. "type": "object"
  13528. },
  13529. "time": {
  13530. "type": "object",
  13531. "properties": {
  13532. "start": {
  13533. "type": "integer",
  13534. "minimum": 0
  13535. },
  13536. "end": {
  13537. "type": "integer",
  13538. "minimum": 0
  13539. },
  13540. "compacted": {
  13541. "type": "integer",
  13542. "minimum": 0
  13543. }
  13544. },
  13545. "required": ["start", "end"],
  13546. "additionalProperties": false
  13547. },
  13548. "attachments": {
  13549. "type": "array",
  13550. "items": {
  13551. "$ref": "#/components/schemas/FilePart"
  13552. }
  13553. }
  13554. },
  13555. "required": ["status", "input", "output", "title", "metadata", "time"],
  13556. "additionalProperties": false
  13557. },
  13558. "ToolStateError": {
  13559. "type": "object",
  13560. "properties": {
  13561. "status": {
  13562. "type": "string",
  13563. "enum": ["error"]
  13564. },
  13565. "input": {
  13566. "type": "object"
  13567. },
  13568. "error": {
  13569. "type": "string"
  13570. },
  13571. "metadata": {
  13572. "type": "object"
  13573. },
  13574. "time": {
  13575. "type": "object",
  13576. "properties": {
  13577. "start": {
  13578. "type": "integer",
  13579. "minimum": 0
  13580. },
  13581. "end": {
  13582. "type": "integer",
  13583. "minimum": 0
  13584. }
  13585. },
  13586. "required": ["start", "end"],
  13587. "additionalProperties": false
  13588. }
  13589. },
  13590. "required": ["status", "input", "error", "time"],
  13591. "additionalProperties": false
  13592. },
  13593. "ToolState": {
  13594. "anyOf": [
  13595. {
  13596. "$ref": "#/components/schemas/ToolStatePending"
  13597. },
  13598. {
  13599. "$ref": "#/components/schemas/ToolStateRunning"
  13600. },
  13601. {
  13602. "$ref": "#/components/schemas/ToolStateCompleted"
  13603. },
  13604. {
  13605. "$ref": "#/components/schemas/ToolStateError"
  13606. }
  13607. ]
  13608. },
  13609. "ToolPart": {
  13610. "type": "object",
  13611. "properties": {
  13612. "id": {
  13613. "type": "string",
  13614. "pattern": "^prt"
  13615. },
  13616. "sessionID": {
  13617. "type": "string",
  13618. "pattern": "^ses"
  13619. },
  13620. "messageID": {
  13621. "type": "string",
  13622. "pattern": "^msg"
  13623. },
  13624. "type": {
  13625. "type": "string",
  13626. "enum": ["tool"]
  13627. },
  13628. "callID": {
  13629. "type": "string"
  13630. },
  13631. "tool": {
  13632. "type": "string"
  13633. },
  13634. "state": {
  13635. "$ref": "#/components/schemas/ToolState"
  13636. },
  13637. "metadata": {
  13638. "type": "object"
  13639. }
  13640. },
  13641. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  13642. "additionalProperties": false
  13643. },
  13644. "StepStartPart": {
  13645. "type": "object",
  13646. "properties": {
  13647. "id": {
  13648. "type": "string",
  13649. "pattern": "^prt"
  13650. },
  13651. "sessionID": {
  13652. "type": "string",
  13653. "pattern": "^ses"
  13654. },
  13655. "messageID": {
  13656. "type": "string",
  13657. "pattern": "^msg"
  13658. },
  13659. "type": {
  13660. "type": "string",
  13661. "enum": ["step-start"]
  13662. },
  13663. "snapshot": {
  13664. "type": "string"
  13665. }
  13666. },
  13667. "required": ["id", "sessionID", "messageID", "type"],
  13668. "additionalProperties": false
  13669. },
  13670. "StepFinishPart": {
  13671. "type": "object",
  13672. "properties": {
  13673. "id": {
  13674. "type": "string",
  13675. "pattern": "^prt"
  13676. },
  13677. "sessionID": {
  13678. "type": "string",
  13679. "pattern": "^ses"
  13680. },
  13681. "messageID": {
  13682. "type": "string",
  13683. "pattern": "^msg"
  13684. },
  13685. "type": {
  13686. "type": "string",
  13687. "enum": ["step-finish"]
  13688. },
  13689. "reason": {
  13690. "type": "string"
  13691. },
  13692. "snapshot": {
  13693. "type": "string"
  13694. },
  13695. "cost": {
  13696. "type": "number"
  13697. },
  13698. "tokens": {
  13699. "type": "object",
  13700. "properties": {
  13701. "total": {
  13702. "type": "number"
  13703. },
  13704. "input": {
  13705. "type": "number"
  13706. },
  13707. "output": {
  13708. "type": "number"
  13709. },
  13710. "reasoning": {
  13711. "type": "number"
  13712. },
  13713. "cache": {
  13714. "type": "object",
  13715. "properties": {
  13716. "read": {
  13717. "type": "number"
  13718. },
  13719. "write": {
  13720. "type": "number"
  13721. }
  13722. },
  13723. "required": ["read", "write"],
  13724. "additionalProperties": false
  13725. }
  13726. },
  13727. "required": ["input", "output", "reasoning", "cache"],
  13728. "additionalProperties": false
  13729. }
  13730. },
  13731. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  13732. "additionalProperties": false
  13733. },
  13734. "SnapshotPart": {
  13735. "type": "object",
  13736. "properties": {
  13737. "id": {
  13738. "type": "string",
  13739. "pattern": "^prt"
  13740. },
  13741. "sessionID": {
  13742. "type": "string",
  13743. "pattern": "^ses"
  13744. },
  13745. "messageID": {
  13746. "type": "string",
  13747. "pattern": "^msg"
  13748. },
  13749. "type": {
  13750. "type": "string",
  13751. "enum": ["snapshot"]
  13752. },
  13753. "snapshot": {
  13754. "type": "string"
  13755. }
  13756. },
  13757. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  13758. "additionalProperties": false
  13759. },
  13760. "PatchPart": {
  13761. "type": "object",
  13762. "properties": {
  13763. "id": {
  13764. "type": "string",
  13765. "pattern": "^prt"
  13766. },
  13767. "sessionID": {
  13768. "type": "string",
  13769. "pattern": "^ses"
  13770. },
  13771. "messageID": {
  13772. "type": "string",
  13773. "pattern": "^msg"
  13774. },
  13775. "type": {
  13776. "type": "string",
  13777. "enum": ["patch"]
  13778. },
  13779. "hash": {
  13780. "type": "string"
  13781. },
  13782. "files": {
  13783. "type": "array",
  13784. "items": {
  13785. "type": "string"
  13786. }
  13787. }
  13788. },
  13789. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  13790. "additionalProperties": false
  13791. },
  13792. "AgentPart": {
  13793. "type": "object",
  13794. "properties": {
  13795. "id": {
  13796. "type": "string",
  13797. "pattern": "^prt"
  13798. },
  13799. "sessionID": {
  13800. "type": "string",
  13801. "pattern": "^ses"
  13802. },
  13803. "messageID": {
  13804. "type": "string",
  13805. "pattern": "^msg"
  13806. },
  13807. "type": {
  13808. "type": "string",
  13809. "enum": ["agent"]
  13810. },
  13811. "name": {
  13812. "type": "string"
  13813. },
  13814. "source": {
  13815. "type": "object",
  13816. "properties": {
  13817. "value": {
  13818. "type": "string"
  13819. },
  13820. "start": {
  13821. "type": "integer",
  13822. "minimum": 0
  13823. },
  13824. "end": {
  13825. "type": "integer",
  13826. "minimum": 0
  13827. }
  13828. },
  13829. "required": ["value", "start", "end"],
  13830. "additionalProperties": false
  13831. }
  13832. },
  13833. "required": ["id", "sessionID", "messageID", "type", "name"],
  13834. "additionalProperties": false
  13835. },
  13836. "RetryPart": {
  13837. "type": "object",
  13838. "properties": {
  13839. "id": {
  13840. "type": "string",
  13841. "pattern": "^prt"
  13842. },
  13843. "sessionID": {
  13844. "type": "string",
  13845. "pattern": "^ses"
  13846. },
  13847. "messageID": {
  13848. "type": "string",
  13849. "pattern": "^msg"
  13850. },
  13851. "type": {
  13852. "type": "string",
  13853. "enum": ["retry"]
  13854. },
  13855. "attempt": {
  13856. "type": "integer",
  13857. "minimum": 0
  13858. },
  13859. "error": {
  13860. "$ref": "#/components/schemas/APIError"
  13861. },
  13862. "time": {
  13863. "type": "object",
  13864. "properties": {
  13865. "created": {
  13866. "type": "integer",
  13867. "minimum": 0
  13868. }
  13869. },
  13870. "required": ["created"],
  13871. "additionalProperties": false
  13872. }
  13873. },
  13874. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  13875. "additionalProperties": false
  13876. },
  13877. "CompactionPart": {
  13878. "type": "object",
  13879. "properties": {
  13880. "id": {
  13881. "type": "string",
  13882. "pattern": "^prt"
  13883. },
  13884. "sessionID": {
  13885. "type": "string",
  13886. "pattern": "^ses"
  13887. },
  13888. "messageID": {
  13889. "type": "string",
  13890. "pattern": "^msg"
  13891. },
  13892. "type": {
  13893. "type": "string",
  13894. "enum": ["compaction"]
  13895. },
  13896. "auto": {
  13897. "type": "boolean"
  13898. },
  13899. "overflow": {
  13900. "type": "boolean"
  13901. },
  13902. "tail_start_id": {
  13903. "type": "string",
  13904. "pattern": "^msg"
  13905. }
  13906. },
  13907. "required": ["id", "sessionID", "messageID", "type", "auto"],
  13908. "additionalProperties": false
  13909. },
  13910. "Part": {
  13911. "anyOf": [
  13912. {
  13913. "$ref": "#/components/schemas/TextPart"
  13914. },
  13915. {
  13916. "$ref": "#/components/schemas/SubtaskPart"
  13917. },
  13918. {
  13919. "$ref": "#/components/schemas/ReasoningPart"
  13920. },
  13921. {
  13922. "$ref": "#/components/schemas/FilePart"
  13923. },
  13924. {
  13925. "$ref": "#/components/schemas/ToolPart"
  13926. },
  13927. {
  13928. "$ref": "#/components/schemas/StepStartPart"
  13929. },
  13930. {
  13931. "$ref": "#/components/schemas/StepFinishPart"
  13932. },
  13933. {
  13934. "$ref": "#/components/schemas/SnapshotPart"
  13935. },
  13936. {
  13937. "$ref": "#/components/schemas/PatchPart"
  13938. },
  13939. {
  13940. "$ref": "#/components/schemas/AgentPart"
  13941. },
  13942. {
  13943. "$ref": "#/components/schemas/RetryPart"
  13944. },
  13945. {
  13946. "$ref": "#/components/schemas/CompactionPart"
  13947. }
  13948. ]
  13949. },
  13950. "Prompt": {
  13951. "type": "object",
  13952. "properties": {
  13953. "text": {
  13954. "type": "string"
  13955. },
  13956. "files": {
  13957. "type": "array",
  13958. "items": {
  13959. "$ref": "#/components/schemas/PromptFileAttachment"
  13960. }
  13961. },
  13962. "agents": {
  13963. "type": "array",
  13964. "items": {
  13965. "$ref": "#/components/schemas/PromptAgentAttachment"
  13966. }
  13967. },
  13968. "references": {
  13969. "type": "array",
  13970. "items": {
  13971. "$ref": "#/components/schemas/PromptReferenceAttachment"
  13972. }
  13973. }
  13974. },
  13975. "required": ["text"],
  13976. "additionalProperties": false
  13977. },
  13978. "Pty": {
  13979. "type": "object",
  13980. "properties": {
  13981. "id": {
  13982. "type": "string",
  13983. "pattern": "^pty"
  13984. },
  13985. "title": {
  13986. "type": "string"
  13987. },
  13988. "command": {
  13989. "type": "string"
  13990. },
  13991. "args": {
  13992. "type": "array",
  13993. "items": {
  13994. "type": "string"
  13995. }
  13996. },
  13997. "cwd": {
  13998. "type": "string"
  13999. },
  14000. "status": {
  14001. "type": "string",
  14002. "enum": ["running", "exited"]
  14003. },
  14004. "pid": {
  14005. "type": "integer",
  14006. "minimum": 0
  14007. }
  14008. },
  14009. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  14010. "additionalProperties": false
  14011. },
  14012. "Todo": {
  14013. "type": "object",
  14014. "properties": {
  14015. "content": {
  14016. "type": "string",
  14017. "description": "Brief description of the task"
  14018. },
  14019. "status": {
  14020. "type": "string",
  14021. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  14022. },
  14023. "priority": {
  14024. "type": "string",
  14025. "description": "Priority level of the task: high, medium, low"
  14026. }
  14027. },
  14028. "required": ["content", "status", "priority"],
  14029. "additionalProperties": false
  14030. },
  14031. "QuestionOption": {
  14032. "type": "object",
  14033. "properties": {
  14034. "label": {
  14035. "type": "string",
  14036. "description": "Display text (1-5 words, concise)"
  14037. },
  14038. "description": {
  14039. "type": "string",
  14040. "description": "Explanation of choice"
  14041. }
  14042. },
  14043. "required": ["label", "description"],
  14044. "additionalProperties": false
  14045. },
  14046. "QuestionInfo": {
  14047. "type": "object",
  14048. "properties": {
  14049. "question": {
  14050. "type": "string",
  14051. "description": "Complete question"
  14052. },
  14053. "header": {
  14054. "type": "string",
  14055. "description": "Very short label (max 30 chars)"
  14056. },
  14057. "options": {
  14058. "type": "array",
  14059. "items": {
  14060. "$ref": "#/components/schemas/QuestionOption"
  14061. },
  14062. "description": "Available choices"
  14063. },
  14064. "multiple": {
  14065. "type": "boolean"
  14066. },
  14067. "custom": {
  14068. "type": "boolean"
  14069. }
  14070. },
  14071. "required": ["question", "header", "options"],
  14072. "additionalProperties": false
  14073. },
  14074. "QuestionTool": {
  14075. "type": "object",
  14076. "properties": {
  14077. "messageID": {
  14078. "type": "string",
  14079. "pattern": "^msg"
  14080. },
  14081. "callID": {
  14082. "type": "string"
  14083. }
  14084. },
  14085. "required": ["messageID", "callID"],
  14086. "additionalProperties": false
  14087. },
  14088. "QuestionAnswer": {
  14089. "type": "array",
  14090. "items": {
  14091. "type": "string"
  14092. }
  14093. },
  14094. "SessionStatus": {
  14095. "anyOf": [
  14096. {
  14097. "type": "object",
  14098. "properties": {
  14099. "type": {
  14100. "type": "string",
  14101. "enum": ["idle"]
  14102. }
  14103. },
  14104. "required": ["type"],
  14105. "additionalProperties": false
  14106. },
  14107. {
  14108. "type": "object",
  14109. "properties": {
  14110. "type": {
  14111. "type": "string",
  14112. "enum": ["retry"]
  14113. },
  14114. "attempt": {
  14115. "type": "integer",
  14116. "minimum": 0
  14117. },
  14118. "message": {
  14119. "type": "string"
  14120. },
  14121. "action": {
  14122. "type": "object",
  14123. "properties": {
  14124. "reason": {
  14125. "type": "string"
  14126. },
  14127. "provider": {
  14128. "type": "string"
  14129. },
  14130. "title": {
  14131. "type": "string"
  14132. },
  14133. "message": {
  14134. "type": "string"
  14135. },
  14136. "label": {
  14137. "type": "string"
  14138. },
  14139. "link": {
  14140. "type": "string"
  14141. }
  14142. },
  14143. "required": ["reason", "provider", "title", "message", "label"],
  14144. "additionalProperties": false
  14145. },
  14146. "next": {
  14147. "type": "integer",
  14148. "minimum": 0
  14149. }
  14150. },
  14151. "required": ["type", "attempt", "message", "next"],
  14152. "additionalProperties": false
  14153. },
  14154. {
  14155. "type": "object",
  14156. "properties": {
  14157. "type": {
  14158. "type": "string",
  14159. "enum": ["busy"]
  14160. }
  14161. },
  14162. "required": ["type"],
  14163. "additionalProperties": false
  14164. }
  14165. ]
  14166. },
  14167. "GlobalEvent": {
  14168. "type": "object",
  14169. "properties": {
  14170. "directory": {
  14171. "type": "string"
  14172. },
  14173. "project": {
  14174. "type": "string"
  14175. },
  14176. "workspace": {
  14177. "type": "string"
  14178. },
  14179. "payload": {
  14180. "anyOf": [
  14181. {
  14182. "type": "object",
  14183. "properties": {
  14184. "id": {
  14185. "type": "string",
  14186. "pattern": "^evt_"
  14187. },
  14188. "type": {
  14189. "type": "string",
  14190. "enum": ["models-dev.refreshed"]
  14191. },
  14192. "properties": {
  14193. "type": "object",
  14194. "properties": {}
  14195. }
  14196. },
  14197. "required": ["id", "type", "properties"],
  14198. "additionalProperties": false
  14199. },
  14200. {
  14201. "type": "object",
  14202. "properties": {
  14203. "id": {
  14204. "type": "string",
  14205. "pattern": "^evt_"
  14206. },
  14207. "type": {
  14208. "type": "string",
  14209. "enum": ["plugin.added"]
  14210. },
  14211. "properties": {
  14212. "type": "object",
  14213. "properties": {
  14214. "id": {
  14215. "type": "string"
  14216. }
  14217. },
  14218. "required": ["id"],
  14219. "additionalProperties": false
  14220. }
  14221. },
  14222. "required": ["id", "type", "properties"],
  14223. "additionalProperties": false
  14224. },
  14225. {
  14226. "type": "object",
  14227. "properties": {
  14228. "id": {
  14229. "type": "string",
  14230. "pattern": "^evt_"
  14231. },
  14232. "type": {
  14233. "type": "string",
  14234. "enum": ["catalog.model.updated"]
  14235. },
  14236. "properties": {
  14237. "type": "object",
  14238. "properties": {
  14239. "model": {
  14240. "$ref": "#/components/schemas/ModelV2Info"
  14241. }
  14242. },
  14243. "required": ["model"],
  14244. "additionalProperties": false
  14245. }
  14246. },
  14247. "required": ["id", "type", "properties"],
  14248. "additionalProperties": false
  14249. },
  14250. {
  14251. "type": "object",
  14252. "properties": {
  14253. "id": {
  14254. "type": "string",
  14255. "pattern": "^evt_"
  14256. },
  14257. "type": {
  14258. "type": "string",
  14259. "enum": ["session.created"]
  14260. },
  14261. "properties": {
  14262. "type": "object",
  14263. "properties": {
  14264. "sessionID": {
  14265. "type": "string",
  14266. "pattern": "^ses"
  14267. },
  14268. "info": {
  14269. "$ref": "#/components/schemas/Session"
  14270. }
  14271. },
  14272. "required": ["sessionID", "info"],
  14273. "additionalProperties": false
  14274. }
  14275. },
  14276. "required": ["id", "type", "properties"],
  14277. "additionalProperties": false
  14278. },
  14279. {
  14280. "type": "object",
  14281. "properties": {
  14282. "id": {
  14283. "type": "string",
  14284. "pattern": "^evt_"
  14285. },
  14286. "type": {
  14287. "type": "string",
  14288. "enum": ["session.updated"]
  14289. },
  14290. "properties": {
  14291. "type": "object",
  14292. "properties": {
  14293. "sessionID": {
  14294. "type": "string",
  14295. "pattern": "^ses"
  14296. },
  14297. "info": {
  14298. "$ref": "#/components/schemas/Session"
  14299. }
  14300. },
  14301. "required": ["sessionID", "info"],
  14302. "additionalProperties": false
  14303. }
  14304. },
  14305. "required": ["id", "type", "properties"],
  14306. "additionalProperties": false
  14307. },
  14308. {
  14309. "type": "object",
  14310. "properties": {
  14311. "id": {
  14312. "type": "string",
  14313. "pattern": "^evt_"
  14314. },
  14315. "type": {
  14316. "type": "string",
  14317. "enum": ["session.deleted"]
  14318. },
  14319. "properties": {
  14320. "type": "object",
  14321. "properties": {
  14322. "sessionID": {
  14323. "type": "string",
  14324. "pattern": "^ses"
  14325. },
  14326. "info": {
  14327. "$ref": "#/components/schemas/Session"
  14328. }
  14329. },
  14330. "required": ["sessionID", "info"],
  14331. "additionalProperties": false
  14332. }
  14333. },
  14334. "required": ["id", "type", "properties"],
  14335. "additionalProperties": false
  14336. },
  14337. {
  14338. "type": "object",
  14339. "properties": {
  14340. "id": {
  14341. "type": "string",
  14342. "pattern": "^evt_"
  14343. },
  14344. "type": {
  14345. "type": "string",
  14346. "enum": ["message.updated"]
  14347. },
  14348. "properties": {
  14349. "type": "object",
  14350. "properties": {
  14351. "sessionID": {
  14352. "type": "string",
  14353. "pattern": "^ses"
  14354. },
  14355. "info": {
  14356. "$ref": "#/components/schemas/Message"
  14357. }
  14358. },
  14359. "required": ["sessionID", "info"],
  14360. "additionalProperties": false
  14361. }
  14362. },
  14363. "required": ["id", "type", "properties"],
  14364. "additionalProperties": false
  14365. },
  14366. {
  14367. "type": "object",
  14368. "properties": {
  14369. "id": {
  14370. "type": "string",
  14371. "pattern": "^evt_"
  14372. },
  14373. "type": {
  14374. "type": "string",
  14375. "enum": ["message.removed"]
  14376. },
  14377. "properties": {
  14378. "type": "object",
  14379. "properties": {
  14380. "sessionID": {
  14381. "type": "string",
  14382. "pattern": "^ses"
  14383. },
  14384. "messageID": {
  14385. "type": "string",
  14386. "pattern": "^msg"
  14387. }
  14388. },
  14389. "required": ["sessionID", "messageID"],
  14390. "additionalProperties": false
  14391. }
  14392. },
  14393. "required": ["id", "type", "properties"],
  14394. "additionalProperties": false
  14395. },
  14396. {
  14397. "type": "object",
  14398. "properties": {
  14399. "id": {
  14400. "type": "string",
  14401. "pattern": "^evt_"
  14402. },
  14403. "type": {
  14404. "type": "string",
  14405. "enum": ["message.part.updated"]
  14406. },
  14407. "properties": {
  14408. "type": "object",
  14409. "properties": {
  14410. "sessionID": {
  14411. "type": "string",
  14412. "pattern": "^ses"
  14413. },
  14414. "part": {
  14415. "$ref": "#/components/schemas/Part"
  14416. },
  14417. "time": {
  14418. "type": "number"
  14419. }
  14420. },
  14421. "required": ["sessionID", "part", "time"],
  14422. "additionalProperties": false
  14423. }
  14424. },
  14425. "required": ["id", "type", "properties"],
  14426. "additionalProperties": false
  14427. },
  14428. {
  14429. "type": "object",
  14430. "properties": {
  14431. "id": {
  14432. "type": "string",
  14433. "pattern": "^evt_"
  14434. },
  14435. "type": {
  14436. "type": "string",
  14437. "enum": ["message.part.removed"]
  14438. },
  14439. "properties": {
  14440. "type": "object",
  14441. "properties": {
  14442. "sessionID": {
  14443. "type": "string",
  14444. "pattern": "^ses"
  14445. },
  14446. "messageID": {
  14447. "type": "string",
  14448. "pattern": "^msg"
  14449. },
  14450. "partID": {
  14451. "type": "string",
  14452. "pattern": "^prt"
  14453. }
  14454. },
  14455. "required": ["sessionID", "messageID", "partID"],
  14456. "additionalProperties": false
  14457. }
  14458. },
  14459. "required": ["id", "type", "properties"],
  14460. "additionalProperties": false
  14461. },
  14462. {
  14463. "type": "object",
  14464. "properties": {
  14465. "id": {
  14466. "type": "string",
  14467. "pattern": "^evt_"
  14468. },
  14469. "type": {
  14470. "type": "string",
  14471. "enum": ["session.next.agent.switched"]
  14472. },
  14473. "properties": {
  14474. "type": "object",
  14475. "properties": {
  14476. "timestamp": {
  14477. "type": "number"
  14478. },
  14479. "sessionID": {
  14480. "type": "string",
  14481. "pattern": "^ses"
  14482. },
  14483. "messageID": {
  14484. "type": "string",
  14485. "pattern": "^msg_"
  14486. },
  14487. "agent": {
  14488. "type": "string"
  14489. }
  14490. },
  14491. "required": ["timestamp", "sessionID", "messageID", "agent"],
  14492. "additionalProperties": false
  14493. }
  14494. },
  14495. "required": ["id", "type", "properties"],
  14496. "additionalProperties": false
  14497. },
  14498. {
  14499. "type": "object",
  14500. "properties": {
  14501. "id": {
  14502. "type": "string",
  14503. "pattern": "^evt_"
  14504. },
  14505. "type": {
  14506. "type": "string",
  14507. "enum": ["session.next.model.switched"]
  14508. },
  14509. "properties": {
  14510. "type": "object",
  14511. "properties": {
  14512. "timestamp": {
  14513. "type": "number"
  14514. },
  14515. "sessionID": {
  14516. "type": "string",
  14517. "pattern": "^ses"
  14518. },
  14519. "messageID": {
  14520. "type": "string",
  14521. "pattern": "^msg_"
  14522. },
  14523. "model": {
  14524. "type": "object",
  14525. "properties": {
  14526. "id": {
  14527. "type": "string"
  14528. },
  14529. "providerID": {
  14530. "type": "string"
  14531. },
  14532. "variant": {
  14533. "type": "string"
  14534. }
  14535. },
  14536. "required": ["id", "providerID"],
  14537. "additionalProperties": false
  14538. }
  14539. },
  14540. "required": ["timestamp", "sessionID", "messageID", "model"],
  14541. "additionalProperties": false
  14542. }
  14543. },
  14544. "required": ["id", "type", "properties"],
  14545. "additionalProperties": false
  14546. },
  14547. {
  14548. "type": "object",
  14549. "properties": {
  14550. "id": {
  14551. "type": "string",
  14552. "pattern": "^evt_"
  14553. },
  14554. "type": {
  14555. "type": "string",
  14556. "enum": ["session.next.moved"]
  14557. },
  14558. "properties": {
  14559. "type": "object",
  14560. "properties": {
  14561. "timestamp": {
  14562. "type": "number"
  14563. },
  14564. "sessionID": {
  14565. "type": "string",
  14566. "pattern": "^ses"
  14567. },
  14568. "location": {
  14569. "$ref": "#/components/schemas/LocationRef"
  14570. },
  14571. "subdirectory": {
  14572. "type": "string"
  14573. }
  14574. },
  14575. "required": ["timestamp", "sessionID", "location"],
  14576. "additionalProperties": false
  14577. }
  14578. },
  14579. "required": ["id", "type", "properties"],
  14580. "additionalProperties": false
  14581. },
  14582. {
  14583. "type": "object",
  14584. "properties": {
  14585. "id": {
  14586. "type": "string",
  14587. "pattern": "^evt_"
  14588. },
  14589. "type": {
  14590. "type": "string",
  14591. "enum": ["session.next.prompted"]
  14592. },
  14593. "properties": {
  14594. "type": "object",
  14595. "properties": {
  14596. "timestamp": {
  14597. "type": "number"
  14598. },
  14599. "sessionID": {
  14600. "type": "string",
  14601. "pattern": "^ses"
  14602. },
  14603. "messageID": {
  14604. "type": "string",
  14605. "pattern": "^msg_"
  14606. },
  14607. "prompt": {
  14608. "$ref": "#/components/schemas/Prompt"
  14609. },
  14610. "delivery": {
  14611. "type": "string",
  14612. "enum": ["steer", "queue"]
  14613. }
  14614. },
  14615. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14616. "additionalProperties": false
  14617. }
  14618. },
  14619. "required": ["id", "type", "properties"],
  14620. "additionalProperties": false
  14621. },
  14622. {
  14623. "type": "object",
  14624. "properties": {
  14625. "id": {
  14626. "type": "string",
  14627. "pattern": "^evt_"
  14628. },
  14629. "type": {
  14630. "type": "string",
  14631. "enum": ["session.next.prompt.admitted"]
  14632. },
  14633. "properties": {
  14634. "type": "object",
  14635. "properties": {
  14636. "timestamp": {
  14637. "type": "number"
  14638. },
  14639. "sessionID": {
  14640. "type": "string",
  14641. "pattern": "^ses"
  14642. },
  14643. "messageID": {
  14644. "type": "string",
  14645. "pattern": "^msg_"
  14646. },
  14647. "prompt": {
  14648. "$ref": "#/components/schemas/Prompt"
  14649. },
  14650. "delivery": {
  14651. "type": "string",
  14652. "enum": ["steer", "queue"]
  14653. }
  14654. },
  14655. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14656. "additionalProperties": false
  14657. }
  14658. },
  14659. "required": ["id", "type", "properties"],
  14660. "additionalProperties": false
  14661. },
  14662. {
  14663. "type": "object",
  14664. "properties": {
  14665. "id": {
  14666. "type": "string",
  14667. "pattern": "^evt_"
  14668. },
  14669. "type": {
  14670. "type": "string",
  14671. "enum": ["session.next.prompt.promoted"]
  14672. },
  14673. "properties": {
  14674. "type": "object",
  14675. "properties": {
  14676. "timestamp": {
  14677. "type": "number"
  14678. },
  14679. "sessionID": {
  14680. "type": "string",
  14681. "pattern": "^ses"
  14682. },
  14683. "messageID": {
  14684. "type": "string",
  14685. "pattern": "^msg_"
  14686. },
  14687. "prompt": {
  14688. "$ref": "#/components/schemas/Prompt"
  14689. },
  14690. "timeCreated": {
  14691. "type": "number"
  14692. }
  14693. },
  14694. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  14695. "additionalProperties": false
  14696. }
  14697. },
  14698. "required": ["id", "type", "properties"],
  14699. "additionalProperties": false
  14700. },
  14701. {
  14702. "type": "object",
  14703. "properties": {
  14704. "id": {
  14705. "type": "string",
  14706. "pattern": "^evt_"
  14707. },
  14708. "type": {
  14709. "type": "string",
  14710. "enum": ["session.next.interrupt.requested"]
  14711. },
  14712. "properties": {
  14713. "type": "object",
  14714. "properties": {
  14715. "timestamp": {
  14716. "type": "number"
  14717. },
  14718. "sessionID": {
  14719. "type": "string",
  14720. "pattern": "^ses"
  14721. }
  14722. },
  14723. "required": ["timestamp", "sessionID"],
  14724. "additionalProperties": false
  14725. }
  14726. },
  14727. "required": ["id", "type", "properties"],
  14728. "additionalProperties": false
  14729. },
  14730. {
  14731. "type": "object",
  14732. "properties": {
  14733. "id": {
  14734. "type": "string",
  14735. "pattern": "^evt_"
  14736. },
  14737. "type": {
  14738. "type": "string",
  14739. "enum": ["session.next.context.updated"]
  14740. },
  14741. "properties": {
  14742. "type": "object",
  14743. "properties": {
  14744. "timestamp": {
  14745. "type": "number"
  14746. },
  14747. "sessionID": {
  14748. "type": "string",
  14749. "pattern": "^ses"
  14750. },
  14751. "messageID": {
  14752. "type": "string",
  14753. "pattern": "^msg_"
  14754. },
  14755. "text": {
  14756. "type": "string"
  14757. }
  14758. },
  14759. "required": ["timestamp", "sessionID", "messageID", "text"],
  14760. "additionalProperties": false
  14761. }
  14762. },
  14763. "required": ["id", "type", "properties"],
  14764. "additionalProperties": false
  14765. },
  14766. {
  14767. "type": "object",
  14768. "properties": {
  14769. "id": {
  14770. "type": "string",
  14771. "pattern": "^evt_"
  14772. },
  14773. "type": {
  14774. "type": "string",
  14775. "enum": ["session.next.synthetic"]
  14776. },
  14777. "properties": {
  14778. "type": "object",
  14779. "properties": {
  14780. "timestamp": {
  14781. "type": "number"
  14782. },
  14783. "sessionID": {
  14784. "type": "string",
  14785. "pattern": "^ses"
  14786. },
  14787. "messageID": {
  14788. "type": "string",
  14789. "pattern": "^msg_"
  14790. },
  14791. "text": {
  14792. "type": "string"
  14793. }
  14794. },
  14795. "required": ["timestamp", "sessionID", "messageID", "text"],
  14796. "additionalProperties": false
  14797. }
  14798. },
  14799. "required": ["id", "type", "properties"],
  14800. "additionalProperties": false
  14801. },
  14802. {
  14803. "type": "object",
  14804. "properties": {
  14805. "id": {
  14806. "type": "string",
  14807. "pattern": "^evt_"
  14808. },
  14809. "type": {
  14810. "type": "string",
  14811. "enum": ["session.next.shell.started"]
  14812. },
  14813. "properties": {
  14814. "type": "object",
  14815. "properties": {
  14816. "timestamp": {
  14817. "type": "number"
  14818. },
  14819. "sessionID": {
  14820. "type": "string",
  14821. "pattern": "^ses"
  14822. },
  14823. "messageID": {
  14824. "type": "string",
  14825. "pattern": "^msg_"
  14826. },
  14827. "callID": {
  14828. "type": "string"
  14829. },
  14830. "command": {
  14831. "type": "string"
  14832. }
  14833. },
  14834. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  14835. "additionalProperties": false
  14836. }
  14837. },
  14838. "required": ["id", "type", "properties"],
  14839. "additionalProperties": false
  14840. },
  14841. {
  14842. "type": "object",
  14843. "properties": {
  14844. "id": {
  14845. "type": "string",
  14846. "pattern": "^evt_"
  14847. },
  14848. "type": {
  14849. "type": "string",
  14850. "enum": ["session.next.shell.ended"]
  14851. },
  14852. "properties": {
  14853. "type": "object",
  14854. "properties": {
  14855. "timestamp": {
  14856. "type": "number"
  14857. },
  14858. "sessionID": {
  14859. "type": "string",
  14860. "pattern": "^ses"
  14861. },
  14862. "callID": {
  14863. "type": "string"
  14864. },
  14865. "output": {
  14866. "type": "string"
  14867. }
  14868. },
  14869. "required": ["timestamp", "sessionID", "callID", "output"],
  14870. "additionalProperties": false
  14871. }
  14872. },
  14873. "required": ["id", "type", "properties"],
  14874. "additionalProperties": false
  14875. },
  14876. {
  14877. "type": "object",
  14878. "properties": {
  14879. "id": {
  14880. "type": "string",
  14881. "pattern": "^evt_"
  14882. },
  14883. "type": {
  14884. "type": "string",
  14885. "enum": ["session.next.step.started"]
  14886. },
  14887. "properties": {
  14888. "type": "object",
  14889. "properties": {
  14890. "timestamp": {
  14891. "type": "number"
  14892. },
  14893. "sessionID": {
  14894. "type": "string",
  14895. "pattern": "^ses"
  14896. },
  14897. "assistantMessageID": {
  14898. "type": "string",
  14899. "pattern": "^msg_"
  14900. },
  14901. "agent": {
  14902. "type": "string"
  14903. },
  14904. "model": {
  14905. "type": "object",
  14906. "properties": {
  14907. "id": {
  14908. "type": "string"
  14909. },
  14910. "providerID": {
  14911. "type": "string"
  14912. },
  14913. "variant": {
  14914. "type": "string"
  14915. }
  14916. },
  14917. "required": ["id", "providerID"],
  14918. "additionalProperties": false
  14919. },
  14920. "snapshot": {
  14921. "type": "string"
  14922. }
  14923. },
  14924. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  14925. "additionalProperties": false
  14926. }
  14927. },
  14928. "required": ["id", "type", "properties"],
  14929. "additionalProperties": false
  14930. },
  14931. {
  14932. "type": "object",
  14933. "properties": {
  14934. "id": {
  14935. "type": "string",
  14936. "pattern": "^evt_"
  14937. },
  14938. "type": {
  14939. "type": "string",
  14940. "enum": ["session.next.step.ended"]
  14941. },
  14942. "properties": {
  14943. "type": "object",
  14944. "properties": {
  14945. "timestamp": {
  14946. "type": "number"
  14947. },
  14948. "sessionID": {
  14949. "type": "string",
  14950. "pattern": "^ses"
  14951. },
  14952. "assistantMessageID": {
  14953. "type": "string",
  14954. "pattern": "^msg_"
  14955. },
  14956. "finish": {
  14957. "type": "string"
  14958. },
  14959. "cost": {
  14960. "type": "number"
  14961. },
  14962. "tokens": {
  14963. "type": "object",
  14964. "properties": {
  14965. "input": {
  14966. "type": "number"
  14967. },
  14968. "output": {
  14969. "type": "number"
  14970. },
  14971. "reasoning": {
  14972. "type": "number"
  14973. },
  14974. "cache": {
  14975. "type": "object",
  14976. "properties": {
  14977. "read": {
  14978. "type": "number"
  14979. },
  14980. "write": {
  14981. "type": "number"
  14982. }
  14983. },
  14984. "required": ["read", "write"],
  14985. "additionalProperties": false
  14986. }
  14987. },
  14988. "required": ["input", "output", "reasoning", "cache"],
  14989. "additionalProperties": false
  14990. },
  14991. "snapshot": {
  14992. "type": "string"
  14993. }
  14994. },
  14995. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  14996. "additionalProperties": false
  14997. }
  14998. },
  14999. "required": ["id", "type", "properties"],
  15000. "additionalProperties": false
  15001. },
  15002. {
  15003. "type": "object",
  15004. "properties": {
  15005. "id": {
  15006. "type": "string",
  15007. "pattern": "^evt_"
  15008. },
  15009. "type": {
  15010. "type": "string",
  15011. "enum": ["session.next.step.failed"]
  15012. },
  15013. "properties": {
  15014. "type": "object",
  15015. "properties": {
  15016. "timestamp": {
  15017. "type": "number"
  15018. },
  15019. "sessionID": {
  15020. "type": "string",
  15021. "pattern": "^ses"
  15022. },
  15023. "assistantMessageID": {
  15024. "type": "string",
  15025. "pattern": "^msg_"
  15026. },
  15027. "error": {
  15028. "$ref": "#/components/schemas/SessionErrorUnknown"
  15029. }
  15030. },
  15031. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  15032. "additionalProperties": false
  15033. }
  15034. },
  15035. "required": ["id", "type", "properties"],
  15036. "additionalProperties": false
  15037. },
  15038. {
  15039. "type": "object",
  15040. "properties": {
  15041. "id": {
  15042. "type": "string",
  15043. "pattern": "^evt_"
  15044. },
  15045. "type": {
  15046. "type": "string",
  15047. "enum": ["session.next.text.started"]
  15048. },
  15049. "properties": {
  15050. "type": "object",
  15051. "properties": {
  15052. "timestamp": {
  15053. "type": "number"
  15054. },
  15055. "sessionID": {
  15056. "type": "string",
  15057. "pattern": "^ses"
  15058. },
  15059. "assistantMessageID": {
  15060. "type": "string",
  15061. "pattern": "^msg_"
  15062. },
  15063. "textID": {
  15064. "type": "string"
  15065. }
  15066. },
  15067. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  15068. "additionalProperties": false
  15069. }
  15070. },
  15071. "required": ["id", "type", "properties"],
  15072. "additionalProperties": false
  15073. },
  15074. {
  15075. "type": "object",
  15076. "properties": {
  15077. "id": {
  15078. "type": "string",
  15079. "pattern": "^evt_"
  15080. },
  15081. "type": {
  15082. "type": "string",
  15083. "enum": ["session.next.text.delta"]
  15084. },
  15085. "properties": {
  15086. "type": "object",
  15087. "properties": {
  15088. "timestamp": {
  15089. "type": "number"
  15090. },
  15091. "sessionID": {
  15092. "type": "string",
  15093. "pattern": "^ses"
  15094. },
  15095. "assistantMessageID": {
  15096. "type": "string",
  15097. "pattern": "^msg_"
  15098. },
  15099. "textID": {
  15100. "type": "string"
  15101. },
  15102. "delta": {
  15103. "type": "string"
  15104. }
  15105. },
  15106. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  15107. "additionalProperties": false
  15108. }
  15109. },
  15110. "required": ["id", "type", "properties"],
  15111. "additionalProperties": false
  15112. },
  15113. {
  15114. "type": "object",
  15115. "properties": {
  15116. "id": {
  15117. "type": "string",
  15118. "pattern": "^evt_"
  15119. },
  15120. "type": {
  15121. "type": "string",
  15122. "enum": ["session.next.text.ended"]
  15123. },
  15124. "properties": {
  15125. "type": "object",
  15126. "properties": {
  15127. "timestamp": {
  15128. "type": "number"
  15129. },
  15130. "sessionID": {
  15131. "type": "string",
  15132. "pattern": "^ses"
  15133. },
  15134. "assistantMessageID": {
  15135. "type": "string",
  15136. "pattern": "^msg_"
  15137. },
  15138. "textID": {
  15139. "type": "string"
  15140. },
  15141. "text": {
  15142. "type": "string"
  15143. }
  15144. },
  15145. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  15146. "additionalProperties": false
  15147. }
  15148. },
  15149. "required": ["id", "type", "properties"],
  15150. "additionalProperties": false
  15151. },
  15152. {
  15153. "type": "object",
  15154. "properties": {
  15155. "id": {
  15156. "type": "string",
  15157. "pattern": "^evt_"
  15158. },
  15159. "type": {
  15160. "type": "string",
  15161. "enum": ["session.next.reasoning.started"]
  15162. },
  15163. "properties": {
  15164. "type": "object",
  15165. "properties": {
  15166. "timestamp": {
  15167. "type": "number"
  15168. },
  15169. "sessionID": {
  15170. "type": "string",
  15171. "pattern": "^ses"
  15172. },
  15173. "assistantMessageID": {
  15174. "type": "string",
  15175. "pattern": "^msg_"
  15176. },
  15177. "reasoningID": {
  15178. "type": "string"
  15179. },
  15180. "providerMetadata": {
  15181. "type": "object",
  15182. "additionalProperties": {
  15183. "type": "object"
  15184. }
  15185. }
  15186. },
  15187. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  15188. "additionalProperties": false
  15189. }
  15190. },
  15191. "required": ["id", "type", "properties"],
  15192. "additionalProperties": false
  15193. },
  15194. {
  15195. "type": "object",
  15196. "properties": {
  15197. "id": {
  15198. "type": "string",
  15199. "pattern": "^evt_"
  15200. },
  15201. "type": {
  15202. "type": "string",
  15203. "enum": ["session.next.reasoning.delta"]
  15204. },
  15205. "properties": {
  15206. "type": "object",
  15207. "properties": {
  15208. "timestamp": {
  15209. "type": "number"
  15210. },
  15211. "sessionID": {
  15212. "type": "string",
  15213. "pattern": "^ses"
  15214. },
  15215. "assistantMessageID": {
  15216. "type": "string",
  15217. "pattern": "^msg_"
  15218. },
  15219. "reasoningID": {
  15220. "type": "string"
  15221. },
  15222. "delta": {
  15223. "type": "string"
  15224. }
  15225. },
  15226. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  15227. "additionalProperties": false
  15228. }
  15229. },
  15230. "required": ["id", "type", "properties"],
  15231. "additionalProperties": false
  15232. },
  15233. {
  15234. "type": "object",
  15235. "properties": {
  15236. "id": {
  15237. "type": "string",
  15238. "pattern": "^evt_"
  15239. },
  15240. "type": {
  15241. "type": "string",
  15242. "enum": ["session.next.reasoning.ended"]
  15243. },
  15244. "properties": {
  15245. "type": "object",
  15246. "properties": {
  15247. "timestamp": {
  15248. "type": "number"
  15249. },
  15250. "sessionID": {
  15251. "type": "string",
  15252. "pattern": "^ses"
  15253. },
  15254. "assistantMessageID": {
  15255. "type": "string",
  15256. "pattern": "^msg_"
  15257. },
  15258. "reasoningID": {
  15259. "type": "string"
  15260. },
  15261. "text": {
  15262. "type": "string"
  15263. },
  15264. "providerMetadata": {
  15265. "type": "object",
  15266. "additionalProperties": {
  15267. "type": "object"
  15268. }
  15269. }
  15270. },
  15271. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  15272. "additionalProperties": false
  15273. }
  15274. },
  15275. "required": ["id", "type", "properties"],
  15276. "additionalProperties": false
  15277. },
  15278. {
  15279. "type": "object",
  15280. "properties": {
  15281. "id": {
  15282. "type": "string",
  15283. "pattern": "^evt_"
  15284. },
  15285. "type": {
  15286. "type": "string",
  15287. "enum": ["session.next.tool.input.started"]
  15288. },
  15289. "properties": {
  15290. "type": "object",
  15291. "properties": {
  15292. "timestamp": {
  15293. "type": "number"
  15294. },
  15295. "sessionID": {
  15296. "type": "string",
  15297. "pattern": "^ses"
  15298. },
  15299. "assistantMessageID": {
  15300. "type": "string",
  15301. "pattern": "^msg_"
  15302. },
  15303. "callID": {
  15304. "type": "string"
  15305. },
  15306. "name": {
  15307. "type": "string"
  15308. }
  15309. },
  15310. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  15311. "additionalProperties": false
  15312. }
  15313. },
  15314. "required": ["id", "type", "properties"],
  15315. "additionalProperties": false
  15316. },
  15317. {
  15318. "type": "object",
  15319. "properties": {
  15320. "id": {
  15321. "type": "string",
  15322. "pattern": "^evt_"
  15323. },
  15324. "type": {
  15325. "type": "string",
  15326. "enum": ["session.next.tool.input.delta"]
  15327. },
  15328. "properties": {
  15329. "type": "object",
  15330. "properties": {
  15331. "timestamp": {
  15332. "type": "number"
  15333. },
  15334. "sessionID": {
  15335. "type": "string",
  15336. "pattern": "^ses"
  15337. },
  15338. "assistantMessageID": {
  15339. "type": "string",
  15340. "pattern": "^msg_"
  15341. },
  15342. "callID": {
  15343. "type": "string"
  15344. },
  15345. "delta": {
  15346. "type": "string"
  15347. }
  15348. },
  15349. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  15350. "additionalProperties": false
  15351. }
  15352. },
  15353. "required": ["id", "type", "properties"],
  15354. "additionalProperties": false
  15355. },
  15356. {
  15357. "type": "object",
  15358. "properties": {
  15359. "id": {
  15360. "type": "string",
  15361. "pattern": "^evt_"
  15362. },
  15363. "type": {
  15364. "type": "string",
  15365. "enum": ["session.next.tool.input.ended"]
  15366. },
  15367. "properties": {
  15368. "type": "object",
  15369. "properties": {
  15370. "timestamp": {
  15371. "type": "number"
  15372. },
  15373. "sessionID": {
  15374. "type": "string",
  15375. "pattern": "^ses"
  15376. },
  15377. "assistantMessageID": {
  15378. "type": "string",
  15379. "pattern": "^msg_"
  15380. },
  15381. "callID": {
  15382. "type": "string"
  15383. },
  15384. "text": {
  15385. "type": "string"
  15386. }
  15387. },
  15388. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  15389. "additionalProperties": false
  15390. }
  15391. },
  15392. "required": ["id", "type", "properties"],
  15393. "additionalProperties": false
  15394. },
  15395. {
  15396. "type": "object",
  15397. "properties": {
  15398. "id": {
  15399. "type": "string",
  15400. "pattern": "^evt_"
  15401. },
  15402. "type": {
  15403. "type": "string",
  15404. "enum": ["session.next.tool.called"]
  15405. },
  15406. "properties": {
  15407. "type": "object",
  15408. "properties": {
  15409. "timestamp": {
  15410. "type": "number"
  15411. },
  15412. "sessionID": {
  15413. "type": "string",
  15414. "pattern": "^ses"
  15415. },
  15416. "assistantMessageID": {
  15417. "type": "string",
  15418. "pattern": "^msg_"
  15419. },
  15420. "callID": {
  15421. "type": "string"
  15422. },
  15423. "tool": {
  15424. "type": "string"
  15425. },
  15426. "input": {
  15427. "type": "object"
  15428. },
  15429. "provider": {
  15430. "type": "object",
  15431. "properties": {
  15432. "executed": {
  15433. "type": "boolean"
  15434. },
  15435. "metadata": {
  15436. "type": "object",
  15437. "additionalProperties": {
  15438. "type": "object"
  15439. }
  15440. }
  15441. },
  15442. "required": ["executed"],
  15443. "additionalProperties": false
  15444. }
  15445. },
  15446. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15447. "additionalProperties": false
  15448. }
  15449. },
  15450. "required": ["id", "type", "properties"],
  15451. "additionalProperties": false
  15452. },
  15453. {
  15454. "type": "object",
  15455. "properties": {
  15456. "id": {
  15457. "type": "string",
  15458. "pattern": "^evt_"
  15459. },
  15460. "type": {
  15461. "type": "string",
  15462. "enum": ["session.next.tool.progress"]
  15463. },
  15464. "properties": {
  15465. "type": "object",
  15466. "properties": {
  15467. "timestamp": {
  15468. "type": "number"
  15469. },
  15470. "sessionID": {
  15471. "type": "string",
  15472. "pattern": "^ses"
  15473. },
  15474. "assistantMessageID": {
  15475. "type": "string",
  15476. "pattern": "^msg_"
  15477. },
  15478. "callID": {
  15479. "type": "string"
  15480. },
  15481. "structured": {
  15482. "type": "object"
  15483. },
  15484. "content": {
  15485. "type": "array",
  15486. "items": {
  15487. "anyOf": [
  15488. {
  15489. "$ref": "#/components/schemas/ToolTextContent"
  15490. },
  15491. {
  15492. "$ref": "#/components/schemas/ToolFileContent"
  15493. }
  15494. ]
  15495. }
  15496. }
  15497. },
  15498. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  15499. "additionalProperties": false
  15500. }
  15501. },
  15502. "required": ["id", "type", "properties"],
  15503. "additionalProperties": false
  15504. },
  15505. {
  15506. "type": "object",
  15507. "properties": {
  15508. "id": {
  15509. "type": "string",
  15510. "pattern": "^evt_"
  15511. },
  15512. "type": {
  15513. "type": "string",
  15514. "enum": ["session.next.tool.success"]
  15515. },
  15516. "properties": {
  15517. "type": "object",
  15518. "properties": {
  15519. "timestamp": {
  15520. "type": "number"
  15521. },
  15522. "sessionID": {
  15523. "type": "string",
  15524. "pattern": "^ses"
  15525. },
  15526. "assistantMessageID": {
  15527. "type": "string",
  15528. "pattern": "^msg_"
  15529. },
  15530. "callID": {
  15531. "type": "string"
  15532. },
  15533. "structured": {
  15534. "type": "object"
  15535. },
  15536. "content": {
  15537. "type": "array",
  15538. "items": {
  15539. "anyOf": [
  15540. {
  15541. "$ref": "#/components/schemas/ToolTextContent"
  15542. },
  15543. {
  15544. "$ref": "#/components/schemas/ToolFileContent"
  15545. }
  15546. ]
  15547. }
  15548. },
  15549. "result": {},
  15550. "provider": {
  15551. "type": "object",
  15552. "properties": {
  15553. "executed": {
  15554. "type": "boolean"
  15555. },
  15556. "metadata": {
  15557. "type": "object",
  15558. "additionalProperties": {
  15559. "type": "object"
  15560. }
  15561. }
  15562. },
  15563. "required": ["executed"],
  15564. "additionalProperties": false
  15565. }
  15566. },
  15567. "required": [
  15568. "timestamp",
  15569. "sessionID",
  15570. "assistantMessageID",
  15571. "callID",
  15572. "structured",
  15573. "content",
  15574. "provider"
  15575. ],
  15576. "additionalProperties": false
  15577. }
  15578. },
  15579. "required": ["id", "type", "properties"],
  15580. "additionalProperties": false
  15581. },
  15582. {
  15583. "type": "object",
  15584. "properties": {
  15585. "id": {
  15586. "type": "string",
  15587. "pattern": "^evt_"
  15588. },
  15589. "type": {
  15590. "type": "string",
  15591. "enum": ["session.next.tool.failed"]
  15592. },
  15593. "properties": {
  15594. "type": "object",
  15595. "properties": {
  15596. "timestamp": {
  15597. "type": "number"
  15598. },
  15599. "sessionID": {
  15600. "type": "string",
  15601. "pattern": "^ses"
  15602. },
  15603. "assistantMessageID": {
  15604. "type": "string",
  15605. "pattern": "^msg_"
  15606. },
  15607. "callID": {
  15608. "type": "string"
  15609. },
  15610. "error": {
  15611. "$ref": "#/components/schemas/SessionErrorUnknown"
  15612. },
  15613. "result": {},
  15614. "provider": {
  15615. "type": "object",
  15616. "properties": {
  15617. "executed": {
  15618. "type": "boolean"
  15619. },
  15620. "metadata": {
  15621. "type": "object",
  15622. "additionalProperties": {
  15623. "type": "object"
  15624. }
  15625. }
  15626. },
  15627. "required": ["executed"],
  15628. "additionalProperties": false
  15629. }
  15630. },
  15631. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  15632. "additionalProperties": false
  15633. }
  15634. },
  15635. "required": ["id", "type", "properties"],
  15636. "additionalProperties": false
  15637. },
  15638. {
  15639. "type": "object",
  15640. "properties": {
  15641. "id": {
  15642. "type": "string",
  15643. "pattern": "^evt_"
  15644. },
  15645. "type": {
  15646. "type": "string",
  15647. "enum": ["session.next.retried"]
  15648. },
  15649. "properties": {
  15650. "type": "object",
  15651. "properties": {
  15652. "timestamp": {
  15653. "type": "number"
  15654. },
  15655. "sessionID": {
  15656. "type": "string",
  15657. "pattern": "^ses"
  15658. },
  15659. "attempt": {
  15660. "type": "number"
  15661. },
  15662. "error": {
  15663. "$ref": "#/components/schemas/SessionNextRetry_error"
  15664. }
  15665. },
  15666. "required": ["timestamp", "sessionID", "attempt", "error"],
  15667. "additionalProperties": false
  15668. }
  15669. },
  15670. "required": ["id", "type", "properties"],
  15671. "additionalProperties": false
  15672. },
  15673. {
  15674. "type": "object",
  15675. "properties": {
  15676. "id": {
  15677. "type": "string",
  15678. "pattern": "^evt_"
  15679. },
  15680. "type": {
  15681. "type": "string",
  15682. "enum": ["session.next.compaction.started"]
  15683. },
  15684. "properties": {
  15685. "type": "object",
  15686. "properties": {
  15687. "timestamp": {
  15688. "type": "number"
  15689. },
  15690. "sessionID": {
  15691. "type": "string",
  15692. "pattern": "^ses"
  15693. },
  15694. "messageID": {
  15695. "type": "string",
  15696. "pattern": "^msg_"
  15697. },
  15698. "reason": {
  15699. "type": "string",
  15700. "enum": ["auto", "manual"]
  15701. }
  15702. },
  15703. "required": ["timestamp", "sessionID", "messageID", "reason"],
  15704. "additionalProperties": false
  15705. }
  15706. },
  15707. "required": ["id", "type", "properties"],
  15708. "additionalProperties": false
  15709. },
  15710. {
  15711. "type": "object",
  15712. "properties": {
  15713. "id": {
  15714. "type": "string",
  15715. "pattern": "^evt_"
  15716. },
  15717. "type": {
  15718. "type": "string",
  15719. "enum": ["session.next.compaction.delta"]
  15720. },
  15721. "properties": {
  15722. "type": "object",
  15723. "properties": {
  15724. "timestamp": {
  15725. "type": "number"
  15726. },
  15727. "sessionID": {
  15728. "type": "string",
  15729. "pattern": "^ses"
  15730. },
  15731. "messageID": {
  15732. "type": "string",
  15733. "pattern": "^msg_"
  15734. },
  15735. "text": {
  15736. "type": "string"
  15737. }
  15738. },
  15739. "required": ["timestamp", "sessionID", "messageID", "text"],
  15740. "additionalProperties": false
  15741. }
  15742. },
  15743. "required": ["id", "type", "properties"],
  15744. "additionalProperties": false
  15745. },
  15746. {
  15747. "type": "object",
  15748. "properties": {
  15749. "id": {
  15750. "type": "string",
  15751. "pattern": "^evt_"
  15752. },
  15753. "type": {
  15754. "type": "string",
  15755. "enum": ["session.next.compaction.ended"]
  15756. },
  15757. "properties": {
  15758. "type": "object",
  15759. "properties": {
  15760. "timestamp": {
  15761. "type": "number"
  15762. },
  15763. "sessionID": {
  15764. "type": "string",
  15765. "pattern": "^ses"
  15766. },
  15767. "messageID": {
  15768. "type": "string",
  15769. "pattern": "^msg_"
  15770. },
  15771. "reason": {
  15772. "type": "string",
  15773. "enum": ["auto", "manual"]
  15774. },
  15775. "text": {
  15776. "type": "string"
  15777. },
  15778. "recent": {
  15779. "type": "string"
  15780. }
  15781. },
  15782. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  15783. "additionalProperties": false
  15784. }
  15785. },
  15786. "required": ["id", "type", "properties"],
  15787. "additionalProperties": false
  15788. },
  15789. {
  15790. "type": "object",
  15791. "properties": {
  15792. "id": {
  15793. "type": "string",
  15794. "pattern": "^evt_"
  15795. },
  15796. "type": {
  15797. "type": "string",
  15798. "enum": ["message.part.delta"]
  15799. },
  15800. "properties": {
  15801. "type": "object",
  15802. "properties": {
  15803. "sessionID": {
  15804. "type": "string",
  15805. "pattern": "^ses"
  15806. },
  15807. "messageID": {
  15808. "type": "string",
  15809. "pattern": "^msg"
  15810. },
  15811. "partID": {
  15812. "type": "string",
  15813. "pattern": "^prt"
  15814. },
  15815. "field": {
  15816. "type": "string"
  15817. },
  15818. "delta": {
  15819. "type": "string"
  15820. }
  15821. },
  15822. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15823. "additionalProperties": false
  15824. }
  15825. },
  15826. "required": ["id", "type", "properties"],
  15827. "additionalProperties": false
  15828. },
  15829. {
  15830. "type": "object",
  15831. "properties": {
  15832. "id": {
  15833. "type": "string",
  15834. "pattern": "^evt_"
  15835. },
  15836. "type": {
  15837. "type": "string",
  15838. "enum": ["session.diff"]
  15839. },
  15840. "properties": {
  15841. "type": "object",
  15842. "properties": {
  15843. "sessionID": {
  15844. "type": "string",
  15845. "pattern": "^ses"
  15846. },
  15847. "diff": {
  15848. "type": "array",
  15849. "items": {
  15850. "$ref": "#/components/schemas/SnapshotFileDiff"
  15851. }
  15852. }
  15853. },
  15854. "required": ["sessionID", "diff"],
  15855. "additionalProperties": false
  15856. }
  15857. },
  15858. "required": ["id", "type", "properties"],
  15859. "additionalProperties": false
  15860. },
  15861. {
  15862. "type": "object",
  15863. "properties": {
  15864. "id": {
  15865. "type": "string",
  15866. "pattern": "^evt_"
  15867. },
  15868. "type": {
  15869. "type": "string",
  15870. "enum": ["session.error"]
  15871. },
  15872. "properties": {
  15873. "type": "object",
  15874. "properties": {
  15875. "sessionID": {
  15876. "type": "string",
  15877. "pattern": "^ses"
  15878. },
  15879. "error": {
  15880. "anyOf": [
  15881. {
  15882. "$ref": "#/components/schemas/ProviderAuthError"
  15883. },
  15884. {
  15885. "$ref": "#/components/schemas/UnknownError"
  15886. },
  15887. {
  15888. "$ref": "#/components/schemas/MessageOutputLengthError"
  15889. },
  15890. {
  15891. "$ref": "#/components/schemas/MessageAbortedError"
  15892. },
  15893. {
  15894. "$ref": "#/components/schemas/StructuredOutputError"
  15895. },
  15896. {
  15897. "$ref": "#/components/schemas/ContextOverflowError"
  15898. },
  15899. {
  15900. "$ref": "#/components/schemas/APIError"
  15901. }
  15902. ]
  15903. }
  15904. },
  15905. "additionalProperties": false
  15906. }
  15907. },
  15908. "required": ["id", "type", "properties"],
  15909. "additionalProperties": false
  15910. },
  15911. {
  15912. "type": "object",
  15913. "properties": {
  15914. "id": {
  15915. "type": "string",
  15916. "pattern": "^evt_"
  15917. },
  15918. "type": {
  15919. "type": "string",
  15920. "enum": ["installation.updated"]
  15921. },
  15922. "properties": {
  15923. "type": "object",
  15924. "properties": {
  15925. "version": {
  15926. "type": "string"
  15927. }
  15928. },
  15929. "required": ["version"],
  15930. "additionalProperties": false
  15931. }
  15932. },
  15933. "required": ["id", "type", "properties"],
  15934. "additionalProperties": false
  15935. },
  15936. {
  15937. "type": "object",
  15938. "properties": {
  15939. "id": {
  15940. "type": "string",
  15941. "pattern": "^evt_"
  15942. },
  15943. "type": {
  15944. "type": "string",
  15945. "enum": ["installation.update-available"]
  15946. },
  15947. "properties": {
  15948. "type": "object",
  15949. "properties": {
  15950. "version": {
  15951. "type": "string"
  15952. }
  15953. },
  15954. "required": ["version"],
  15955. "additionalProperties": false
  15956. }
  15957. },
  15958. "required": ["id", "type", "properties"],
  15959. "additionalProperties": false
  15960. },
  15961. {
  15962. "type": "object",
  15963. "properties": {
  15964. "id": {
  15965. "type": "string",
  15966. "pattern": "^evt_"
  15967. },
  15968. "type": {
  15969. "type": "string",
  15970. "enum": ["file.edited"]
  15971. },
  15972. "properties": {
  15973. "type": "object",
  15974. "properties": {
  15975. "file": {
  15976. "type": "string"
  15977. }
  15978. },
  15979. "required": ["file"],
  15980. "additionalProperties": false
  15981. }
  15982. },
  15983. "required": ["id", "type", "properties"],
  15984. "additionalProperties": false
  15985. },
  15986. {
  15987. "type": "object",
  15988. "properties": {
  15989. "id": {
  15990. "type": "string",
  15991. "pattern": "^evt_"
  15992. },
  15993. "type": {
  15994. "type": "string",
  15995. "enum": ["account.added"]
  15996. },
  15997. "properties": {
  15998. "type": "object",
  15999. "properties": {
  16000. "account": {
  16001. "$ref": "#/components/schemas/AuthInfo"
  16002. }
  16003. },
  16004. "required": ["account"],
  16005. "additionalProperties": false
  16006. }
  16007. },
  16008. "required": ["id", "type", "properties"],
  16009. "additionalProperties": false
  16010. },
  16011. {
  16012. "type": "object",
  16013. "properties": {
  16014. "id": {
  16015. "type": "string",
  16016. "pattern": "^evt_"
  16017. },
  16018. "type": {
  16019. "type": "string",
  16020. "enum": ["account.removed"]
  16021. },
  16022. "properties": {
  16023. "type": "object",
  16024. "properties": {
  16025. "account": {
  16026. "$ref": "#/components/schemas/AuthInfo"
  16027. }
  16028. },
  16029. "required": ["account"],
  16030. "additionalProperties": false
  16031. }
  16032. },
  16033. "required": ["id", "type", "properties"],
  16034. "additionalProperties": false
  16035. },
  16036. {
  16037. "type": "object",
  16038. "properties": {
  16039. "id": {
  16040. "type": "string",
  16041. "pattern": "^evt_"
  16042. },
  16043. "type": {
  16044. "type": "string",
  16045. "enum": ["account.switched"]
  16046. },
  16047. "properties": {
  16048. "type": "object",
  16049. "properties": {
  16050. "serviceID": {
  16051. "type": "string"
  16052. },
  16053. "from": {
  16054. "type": "string"
  16055. },
  16056. "to": {
  16057. "type": "string"
  16058. }
  16059. },
  16060. "required": ["serviceID"],
  16061. "additionalProperties": false
  16062. }
  16063. },
  16064. "required": ["id", "type", "properties"],
  16065. "additionalProperties": false
  16066. },
  16067. {
  16068. "type": "object",
  16069. "properties": {
  16070. "id": {
  16071. "type": "string",
  16072. "pattern": "^evt_"
  16073. },
  16074. "type": {
  16075. "type": "string",
  16076. "enum": ["permission.v2.asked"]
  16077. },
  16078. "properties": {
  16079. "type": "object",
  16080. "properties": {
  16081. "id": {
  16082. "type": "string",
  16083. "pattern": "^per"
  16084. },
  16085. "sessionID": {
  16086. "type": "string",
  16087. "pattern": "^ses"
  16088. },
  16089. "action": {
  16090. "type": "string"
  16091. },
  16092. "resources": {
  16093. "type": "array",
  16094. "items": {
  16095. "type": "string"
  16096. }
  16097. },
  16098. "save": {
  16099. "type": "array",
  16100. "items": {
  16101. "type": "string"
  16102. }
  16103. },
  16104. "metadata": {
  16105. "type": "object"
  16106. },
  16107. "source": {
  16108. "$ref": "#/components/schemas/PermissionV2Source"
  16109. }
  16110. },
  16111. "required": ["id", "sessionID", "action", "resources"],
  16112. "additionalProperties": false
  16113. }
  16114. },
  16115. "required": ["id", "type", "properties"],
  16116. "additionalProperties": false
  16117. },
  16118. {
  16119. "type": "object",
  16120. "properties": {
  16121. "id": {
  16122. "type": "string",
  16123. "pattern": "^evt_"
  16124. },
  16125. "type": {
  16126. "type": "string",
  16127. "enum": ["permission.v2.replied"]
  16128. },
  16129. "properties": {
  16130. "type": "object",
  16131. "properties": {
  16132. "sessionID": {
  16133. "type": "string",
  16134. "pattern": "^ses"
  16135. },
  16136. "requestID": {
  16137. "type": "string",
  16138. "pattern": "^per"
  16139. },
  16140. "reply": {
  16141. "$ref": "#/components/schemas/PermissionV2Reply"
  16142. }
  16143. },
  16144. "required": ["sessionID", "requestID", "reply"],
  16145. "additionalProperties": false
  16146. }
  16147. },
  16148. "required": ["id", "type", "properties"],
  16149. "additionalProperties": false
  16150. },
  16151. {
  16152. "type": "object",
  16153. "properties": {
  16154. "id": {
  16155. "type": "string",
  16156. "pattern": "^evt_"
  16157. },
  16158. "type": {
  16159. "type": "string",
  16160. "enum": ["file.watcher.updated"]
  16161. },
  16162. "properties": {
  16163. "type": "object",
  16164. "properties": {
  16165. "file": {
  16166. "type": "string"
  16167. },
  16168. "event": {
  16169. "type": "string",
  16170. "enum": ["add", "change", "unlink"]
  16171. }
  16172. },
  16173. "required": ["file", "event"],
  16174. "additionalProperties": false
  16175. }
  16176. },
  16177. "required": ["id", "type", "properties"],
  16178. "additionalProperties": false
  16179. },
  16180. {
  16181. "type": "object",
  16182. "properties": {
  16183. "id": {
  16184. "type": "string",
  16185. "pattern": "^evt_"
  16186. },
  16187. "type": {
  16188. "type": "string",
  16189. "enum": ["pty.created"]
  16190. },
  16191. "properties": {
  16192. "type": "object",
  16193. "properties": {
  16194. "info": {
  16195. "$ref": "#/components/schemas/Pty"
  16196. }
  16197. },
  16198. "required": ["info"],
  16199. "additionalProperties": false
  16200. }
  16201. },
  16202. "required": ["id", "type", "properties"],
  16203. "additionalProperties": false
  16204. },
  16205. {
  16206. "type": "object",
  16207. "properties": {
  16208. "id": {
  16209. "type": "string",
  16210. "pattern": "^evt_"
  16211. },
  16212. "type": {
  16213. "type": "string",
  16214. "enum": ["pty.updated"]
  16215. },
  16216. "properties": {
  16217. "type": "object",
  16218. "properties": {
  16219. "info": {
  16220. "$ref": "#/components/schemas/Pty"
  16221. }
  16222. },
  16223. "required": ["info"],
  16224. "additionalProperties": false
  16225. }
  16226. },
  16227. "required": ["id", "type", "properties"],
  16228. "additionalProperties": false
  16229. },
  16230. {
  16231. "type": "object",
  16232. "properties": {
  16233. "id": {
  16234. "type": "string",
  16235. "pattern": "^evt_"
  16236. },
  16237. "type": {
  16238. "type": "string",
  16239. "enum": ["pty.exited"]
  16240. },
  16241. "properties": {
  16242. "type": "object",
  16243. "properties": {
  16244. "id": {
  16245. "type": "string",
  16246. "pattern": "^pty"
  16247. },
  16248. "exitCode": {
  16249. "type": "integer",
  16250. "minimum": 0
  16251. }
  16252. },
  16253. "required": ["id", "exitCode"],
  16254. "additionalProperties": false
  16255. }
  16256. },
  16257. "required": ["id", "type", "properties"],
  16258. "additionalProperties": false
  16259. },
  16260. {
  16261. "type": "object",
  16262. "properties": {
  16263. "id": {
  16264. "type": "string",
  16265. "pattern": "^evt_"
  16266. },
  16267. "type": {
  16268. "type": "string",
  16269. "enum": ["pty.deleted"]
  16270. },
  16271. "properties": {
  16272. "type": "object",
  16273. "properties": {
  16274. "id": {
  16275. "type": "string",
  16276. "pattern": "^pty"
  16277. }
  16278. },
  16279. "required": ["id"],
  16280. "additionalProperties": false
  16281. }
  16282. },
  16283. "required": ["id", "type", "properties"],
  16284. "additionalProperties": false
  16285. },
  16286. {
  16287. "type": "object",
  16288. "properties": {
  16289. "id": {
  16290. "type": "string",
  16291. "pattern": "^evt_"
  16292. },
  16293. "type": {
  16294. "type": "string",
  16295. "enum": ["question.v2.asked"]
  16296. },
  16297. "properties": {
  16298. "type": "object",
  16299. "properties": {
  16300. "id": {
  16301. "type": "string",
  16302. "pattern": "^que"
  16303. },
  16304. "sessionID": {
  16305. "type": "string",
  16306. "pattern": "^ses"
  16307. },
  16308. "questions": {
  16309. "type": "array",
  16310. "items": {
  16311. "$ref": "#/components/schemas/QuestionV2Info"
  16312. },
  16313. "description": "Questions to ask"
  16314. },
  16315. "tool": {
  16316. "$ref": "#/components/schemas/QuestionV2Tool"
  16317. }
  16318. },
  16319. "required": ["id", "sessionID", "questions"],
  16320. "additionalProperties": false
  16321. }
  16322. },
  16323. "required": ["id", "type", "properties"],
  16324. "additionalProperties": false
  16325. },
  16326. {
  16327. "type": "object",
  16328. "properties": {
  16329. "id": {
  16330. "type": "string",
  16331. "pattern": "^evt_"
  16332. },
  16333. "type": {
  16334. "type": "string",
  16335. "enum": ["question.v2.replied"]
  16336. },
  16337. "properties": {
  16338. "type": "object",
  16339. "properties": {
  16340. "sessionID": {
  16341. "type": "string",
  16342. "pattern": "^ses"
  16343. },
  16344. "requestID": {
  16345. "type": "string",
  16346. "pattern": "^que"
  16347. },
  16348. "answers": {
  16349. "type": "array",
  16350. "items": {
  16351. "$ref": "#/components/schemas/QuestionV2Answer"
  16352. }
  16353. }
  16354. },
  16355. "required": ["sessionID", "requestID", "answers"],
  16356. "additionalProperties": false
  16357. }
  16358. },
  16359. "required": ["id", "type", "properties"],
  16360. "additionalProperties": false
  16361. },
  16362. {
  16363. "type": "object",
  16364. "properties": {
  16365. "id": {
  16366. "type": "string",
  16367. "pattern": "^evt_"
  16368. },
  16369. "type": {
  16370. "type": "string",
  16371. "enum": ["question.v2.rejected"]
  16372. },
  16373. "properties": {
  16374. "type": "object",
  16375. "properties": {
  16376. "sessionID": {
  16377. "type": "string",
  16378. "pattern": "^ses"
  16379. },
  16380. "requestID": {
  16381. "type": "string",
  16382. "pattern": "^que"
  16383. }
  16384. },
  16385. "required": ["sessionID", "requestID"],
  16386. "additionalProperties": false
  16387. }
  16388. },
  16389. "required": ["id", "type", "properties"],
  16390. "additionalProperties": false
  16391. },
  16392. {
  16393. "type": "object",
  16394. "properties": {
  16395. "id": {
  16396. "type": "string",
  16397. "pattern": "^evt_"
  16398. },
  16399. "type": {
  16400. "type": "string",
  16401. "enum": ["todo.updated"]
  16402. },
  16403. "properties": {
  16404. "type": "object",
  16405. "properties": {
  16406. "sessionID": {
  16407. "type": "string",
  16408. "pattern": "^ses"
  16409. },
  16410. "todos": {
  16411. "type": "array",
  16412. "items": {
  16413. "$ref": "#/components/schemas/Todo"
  16414. }
  16415. }
  16416. },
  16417. "required": ["sessionID", "todos"],
  16418. "additionalProperties": false
  16419. }
  16420. },
  16421. "required": ["id", "type", "properties"],
  16422. "additionalProperties": false
  16423. },
  16424. {
  16425. "type": "object",
  16426. "properties": {
  16427. "id": {
  16428. "type": "string",
  16429. "pattern": "^evt_"
  16430. },
  16431. "type": {
  16432. "type": "string",
  16433. "enum": ["lsp.updated"]
  16434. },
  16435. "properties": {
  16436. "type": "object",
  16437. "properties": {}
  16438. }
  16439. },
  16440. "required": ["id", "type", "properties"],
  16441. "additionalProperties": false
  16442. },
  16443. {
  16444. "type": "object",
  16445. "properties": {
  16446. "id": {
  16447. "type": "string",
  16448. "pattern": "^evt_"
  16449. },
  16450. "type": {
  16451. "type": "string",
  16452. "enum": ["permission.asked"]
  16453. },
  16454. "properties": {
  16455. "type": "object",
  16456. "properties": {
  16457. "id": {
  16458. "type": "string",
  16459. "pattern": "^per"
  16460. },
  16461. "sessionID": {
  16462. "type": "string",
  16463. "pattern": "^ses"
  16464. },
  16465. "permission": {
  16466. "type": "string"
  16467. },
  16468. "patterns": {
  16469. "type": "array",
  16470. "items": {
  16471. "type": "string"
  16472. }
  16473. },
  16474. "metadata": {
  16475. "type": "object"
  16476. },
  16477. "always": {
  16478. "type": "array",
  16479. "items": {
  16480. "type": "string"
  16481. }
  16482. },
  16483. "tool": {
  16484. "type": "object",
  16485. "properties": {
  16486. "messageID": {
  16487. "type": "string"
  16488. },
  16489. "callID": {
  16490. "type": "string"
  16491. }
  16492. },
  16493. "required": ["messageID", "callID"],
  16494. "additionalProperties": false
  16495. }
  16496. },
  16497. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  16498. "additionalProperties": false
  16499. }
  16500. },
  16501. "required": ["id", "type", "properties"],
  16502. "additionalProperties": false
  16503. },
  16504. {
  16505. "type": "object",
  16506. "properties": {
  16507. "id": {
  16508. "type": "string",
  16509. "pattern": "^evt_"
  16510. },
  16511. "type": {
  16512. "type": "string",
  16513. "enum": ["permission.replied"]
  16514. },
  16515. "properties": {
  16516. "type": "object",
  16517. "properties": {
  16518. "sessionID": {
  16519. "type": "string",
  16520. "pattern": "^ses"
  16521. },
  16522. "requestID": {
  16523. "type": "string",
  16524. "pattern": "^per"
  16525. },
  16526. "reply": {
  16527. "type": "string",
  16528. "enum": ["once", "always", "reject"]
  16529. }
  16530. },
  16531. "required": ["sessionID", "requestID", "reply"],
  16532. "additionalProperties": false
  16533. }
  16534. },
  16535. "required": ["id", "type", "properties"],
  16536. "additionalProperties": false
  16537. },
  16538. {
  16539. "type": "object",
  16540. "properties": {
  16541. "id": {
  16542. "type": "string",
  16543. "pattern": "^evt_"
  16544. },
  16545. "type": {
  16546. "type": "string",
  16547. "enum": ["tui.prompt.append"]
  16548. },
  16549. "properties": {
  16550. "type": "object",
  16551. "properties": {
  16552. "text": {
  16553. "type": "string"
  16554. }
  16555. },
  16556. "required": ["text"],
  16557. "additionalProperties": false
  16558. }
  16559. },
  16560. "required": ["id", "type", "properties"],
  16561. "additionalProperties": false
  16562. },
  16563. {
  16564. "type": "object",
  16565. "properties": {
  16566. "id": {
  16567. "type": "string",
  16568. "pattern": "^evt_"
  16569. },
  16570. "type": {
  16571. "type": "string",
  16572. "enum": ["tui.command.execute"]
  16573. },
  16574. "properties": {
  16575. "type": "object",
  16576. "properties": {
  16577. "command": {
  16578. "anyOf": [
  16579. {
  16580. "type": "string",
  16581. "enum": [
  16582. "session.list",
  16583. "session.new",
  16584. "session.share",
  16585. "session.interrupt",
  16586. "session.compact",
  16587. "session.page.up",
  16588. "session.page.down",
  16589. "session.line.up",
  16590. "session.line.down",
  16591. "session.half.page.up",
  16592. "session.half.page.down",
  16593. "session.first",
  16594. "session.last",
  16595. "prompt.clear",
  16596. "prompt.submit",
  16597. "agent.cycle"
  16598. ]
  16599. },
  16600. {
  16601. "type": "string"
  16602. }
  16603. ]
  16604. }
  16605. },
  16606. "required": ["command"],
  16607. "additionalProperties": false
  16608. }
  16609. },
  16610. "required": ["id", "type", "properties"],
  16611. "additionalProperties": false
  16612. },
  16613. {
  16614. "type": "object",
  16615. "properties": {
  16616. "id": {
  16617. "type": "string",
  16618. "pattern": "^evt_"
  16619. },
  16620. "type": {
  16621. "type": "string",
  16622. "enum": ["tui.toast.show"]
  16623. },
  16624. "properties": {
  16625. "type": "object",
  16626. "properties": {
  16627. "title": {
  16628. "type": "string"
  16629. },
  16630. "message": {
  16631. "type": "string"
  16632. },
  16633. "variant": {
  16634. "type": "string",
  16635. "enum": ["info", "success", "warning", "error"]
  16636. },
  16637. "duration": {
  16638. "type": "integer",
  16639. "exclusiveMinimum": 0
  16640. }
  16641. },
  16642. "required": ["message", "variant"],
  16643. "additionalProperties": false
  16644. }
  16645. },
  16646. "required": ["id", "type", "properties"],
  16647. "additionalProperties": false
  16648. },
  16649. {
  16650. "type": "object",
  16651. "properties": {
  16652. "id": {
  16653. "type": "string",
  16654. "pattern": "^evt_"
  16655. },
  16656. "type": {
  16657. "type": "string",
  16658. "enum": ["tui.session.select"]
  16659. },
  16660. "properties": {
  16661. "type": "object",
  16662. "properties": {
  16663. "sessionID": {
  16664. "type": "string",
  16665. "pattern": "^ses",
  16666. "description": "Session ID to navigate to"
  16667. }
  16668. },
  16669. "required": ["sessionID"],
  16670. "additionalProperties": false
  16671. }
  16672. },
  16673. "required": ["id", "type", "properties"],
  16674. "additionalProperties": false
  16675. },
  16676. {
  16677. "type": "object",
  16678. "properties": {
  16679. "id": {
  16680. "type": "string",
  16681. "pattern": "^evt_"
  16682. },
  16683. "type": {
  16684. "type": "string",
  16685. "enum": ["mcp.tools.changed"]
  16686. },
  16687. "properties": {
  16688. "type": "object",
  16689. "properties": {
  16690. "server": {
  16691. "type": "string"
  16692. }
  16693. },
  16694. "required": ["server"],
  16695. "additionalProperties": false
  16696. }
  16697. },
  16698. "required": ["id", "type", "properties"],
  16699. "additionalProperties": false
  16700. },
  16701. {
  16702. "type": "object",
  16703. "properties": {
  16704. "id": {
  16705. "type": "string",
  16706. "pattern": "^evt_"
  16707. },
  16708. "type": {
  16709. "type": "string",
  16710. "enum": ["mcp.browser.open.failed"]
  16711. },
  16712. "properties": {
  16713. "type": "object",
  16714. "properties": {
  16715. "mcpName": {
  16716. "type": "string"
  16717. },
  16718. "url": {
  16719. "type": "string"
  16720. }
  16721. },
  16722. "required": ["mcpName", "url"],
  16723. "additionalProperties": false
  16724. }
  16725. },
  16726. "required": ["id", "type", "properties"],
  16727. "additionalProperties": false
  16728. },
  16729. {
  16730. "type": "object",
  16731. "properties": {
  16732. "id": {
  16733. "type": "string",
  16734. "pattern": "^evt_"
  16735. },
  16736. "type": {
  16737. "type": "string",
  16738. "enum": ["command.executed"]
  16739. },
  16740. "properties": {
  16741. "type": "object",
  16742. "properties": {
  16743. "name": {
  16744. "type": "string"
  16745. },
  16746. "sessionID": {
  16747. "type": "string",
  16748. "pattern": "^ses"
  16749. },
  16750. "arguments": {
  16751. "type": "string"
  16752. },
  16753. "messageID": {
  16754. "type": "string",
  16755. "pattern": "^msg"
  16756. }
  16757. },
  16758. "required": ["name", "sessionID", "arguments", "messageID"],
  16759. "additionalProperties": false
  16760. }
  16761. },
  16762. "required": ["id", "type", "properties"],
  16763. "additionalProperties": false
  16764. },
  16765. {
  16766. "type": "object",
  16767. "properties": {
  16768. "id": {
  16769. "type": "string",
  16770. "pattern": "^evt_"
  16771. },
  16772. "type": {
  16773. "type": "string",
  16774. "enum": ["project.directories.updated"]
  16775. },
  16776. "properties": {
  16777. "type": "object",
  16778. "properties": {
  16779. "projectID": {
  16780. "type": "string"
  16781. }
  16782. },
  16783. "required": ["projectID"],
  16784. "additionalProperties": false
  16785. }
  16786. },
  16787. "required": ["id", "type", "properties"],
  16788. "additionalProperties": false
  16789. },
  16790. {
  16791. "type": "object",
  16792. "properties": {
  16793. "id": {
  16794. "type": "string",
  16795. "pattern": "^evt_"
  16796. },
  16797. "type": {
  16798. "type": "string",
  16799. "enum": ["project.updated"]
  16800. },
  16801. "properties": {
  16802. "type": "object",
  16803. "properties": {
  16804. "id": {
  16805. "type": "string"
  16806. },
  16807. "worktree": {
  16808. "type": "string"
  16809. },
  16810. "vcs": {
  16811. "type": "string",
  16812. "enum": ["git"]
  16813. },
  16814. "name": {
  16815. "type": "string"
  16816. },
  16817. "icon": {
  16818. "type": "object",
  16819. "properties": {
  16820. "url": {
  16821. "type": "string"
  16822. },
  16823. "override": {
  16824. "type": "string"
  16825. },
  16826. "color": {
  16827. "type": "string"
  16828. }
  16829. },
  16830. "additionalProperties": false
  16831. },
  16832. "commands": {
  16833. "type": "object",
  16834. "properties": {
  16835. "start": {
  16836. "type": "string",
  16837. "description": "Startup script to run when creating a new workspace (worktree)"
  16838. }
  16839. },
  16840. "additionalProperties": false
  16841. },
  16842. "time": {
  16843. "type": "object",
  16844. "properties": {
  16845. "created": {
  16846. "type": "integer",
  16847. "minimum": 0
  16848. },
  16849. "updated": {
  16850. "type": "integer",
  16851. "minimum": 0
  16852. },
  16853. "initialized": {
  16854. "type": "integer",
  16855. "minimum": 0
  16856. }
  16857. },
  16858. "required": ["created", "updated"],
  16859. "additionalProperties": false
  16860. },
  16861. "sandboxes": {
  16862. "type": "array",
  16863. "items": {
  16864. "type": "string"
  16865. }
  16866. }
  16867. },
  16868. "required": ["id", "worktree", "time", "sandboxes"],
  16869. "additionalProperties": false
  16870. }
  16871. },
  16872. "required": ["id", "type", "properties"],
  16873. "additionalProperties": false
  16874. },
  16875. {
  16876. "type": "object",
  16877. "properties": {
  16878. "id": {
  16879. "type": "string",
  16880. "pattern": "^evt_"
  16881. },
  16882. "type": {
  16883. "type": "string",
  16884. "enum": ["question.asked"]
  16885. },
  16886. "properties": {
  16887. "type": "object",
  16888. "properties": {
  16889. "id": {
  16890. "type": "string",
  16891. "pattern": "^que"
  16892. },
  16893. "sessionID": {
  16894. "type": "string",
  16895. "pattern": "^ses"
  16896. },
  16897. "questions": {
  16898. "type": "array",
  16899. "items": {
  16900. "$ref": "#/components/schemas/QuestionInfo"
  16901. },
  16902. "description": "Questions to ask"
  16903. },
  16904. "tool": {
  16905. "$ref": "#/components/schemas/QuestionTool"
  16906. }
  16907. },
  16908. "required": ["id", "sessionID", "questions"],
  16909. "additionalProperties": false
  16910. }
  16911. },
  16912. "required": ["id", "type", "properties"],
  16913. "additionalProperties": false
  16914. },
  16915. {
  16916. "type": "object",
  16917. "properties": {
  16918. "id": {
  16919. "type": "string",
  16920. "pattern": "^evt_"
  16921. },
  16922. "type": {
  16923. "type": "string",
  16924. "enum": ["question.replied"]
  16925. },
  16926. "properties": {
  16927. "type": "object",
  16928. "properties": {
  16929. "sessionID": {
  16930. "type": "string",
  16931. "pattern": "^ses"
  16932. },
  16933. "requestID": {
  16934. "type": "string",
  16935. "pattern": "^que"
  16936. },
  16937. "answers": {
  16938. "type": "array",
  16939. "items": {
  16940. "$ref": "#/components/schemas/QuestionAnswer"
  16941. }
  16942. }
  16943. },
  16944. "required": ["sessionID", "requestID", "answers"],
  16945. "additionalProperties": false
  16946. }
  16947. },
  16948. "required": ["id", "type", "properties"],
  16949. "additionalProperties": false
  16950. },
  16951. {
  16952. "type": "object",
  16953. "properties": {
  16954. "id": {
  16955. "type": "string",
  16956. "pattern": "^evt_"
  16957. },
  16958. "type": {
  16959. "type": "string",
  16960. "enum": ["question.rejected"]
  16961. },
  16962. "properties": {
  16963. "type": "object",
  16964. "properties": {
  16965. "sessionID": {
  16966. "type": "string",
  16967. "pattern": "^ses"
  16968. },
  16969. "requestID": {
  16970. "type": "string",
  16971. "pattern": "^que"
  16972. }
  16973. },
  16974. "required": ["sessionID", "requestID"],
  16975. "additionalProperties": false
  16976. }
  16977. },
  16978. "required": ["id", "type", "properties"],
  16979. "additionalProperties": false
  16980. },
  16981. {
  16982. "type": "object",
  16983. "properties": {
  16984. "id": {
  16985. "type": "string",
  16986. "pattern": "^evt_"
  16987. },
  16988. "type": {
  16989. "type": "string",
  16990. "enum": ["session.status"]
  16991. },
  16992. "properties": {
  16993. "type": "object",
  16994. "properties": {
  16995. "sessionID": {
  16996. "type": "string",
  16997. "pattern": "^ses"
  16998. },
  16999. "status": {
  17000. "$ref": "#/components/schemas/SessionStatus"
  17001. }
  17002. },
  17003. "required": ["sessionID", "status"],
  17004. "additionalProperties": false
  17005. }
  17006. },
  17007. "required": ["id", "type", "properties"],
  17008. "additionalProperties": false
  17009. },
  17010. {
  17011. "type": "object",
  17012. "properties": {
  17013. "id": {
  17014. "type": "string",
  17015. "pattern": "^evt_"
  17016. },
  17017. "type": {
  17018. "type": "string",
  17019. "enum": ["session.idle"]
  17020. },
  17021. "properties": {
  17022. "type": "object",
  17023. "properties": {
  17024. "sessionID": {
  17025. "type": "string",
  17026. "pattern": "^ses"
  17027. }
  17028. },
  17029. "required": ["sessionID"],
  17030. "additionalProperties": false
  17031. }
  17032. },
  17033. "required": ["id", "type", "properties"],
  17034. "additionalProperties": false
  17035. },
  17036. {
  17037. "type": "object",
  17038. "properties": {
  17039. "id": {
  17040. "type": "string",
  17041. "pattern": "^evt_"
  17042. },
  17043. "type": {
  17044. "type": "string",
  17045. "enum": ["session.compacted"]
  17046. },
  17047. "properties": {
  17048. "type": "object",
  17049. "properties": {
  17050. "sessionID": {
  17051. "type": "string",
  17052. "pattern": "^ses"
  17053. }
  17054. },
  17055. "required": ["sessionID"],
  17056. "additionalProperties": false
  17057. }
  17058. },
  17059. "required": ["id", "type", "properties"],
  17060. "additionalProperties": false
  17061. },
  17062. {
  17063. "type": "object",
  17064. "properties": {
  17065. "id": {
  17066. "type": "string",
  17067. "pattern": "^evt_"
  17068. },
  17069. "type": {
  17070. "type": "string",
  17071. "enum": ["vcs.branch.updated"]
  17072. },
  17073. "properties": {
  17074. "type": "object",
  17075. "properties": {
  17076. "branch": {
  17077. "type": "string"
  17078. }
  17079. },
  17080. "additionalProperties": false
  17081. }
  17082. },
  17083. "required": ["id", "type", "properties"],
  17084. "additionalProperties": false
  17085. },
  17086. {
  17087. "type": "object",
  17088. "properties": {
  17089. "id": {
  17090. "type": "string",
  17091. "pattern": "^evt_"
  17092. },
  17093. "type": {
  17094. "type": "string",
  17095. "enum": ["worktree.ready"]
  17096. },
  17097. "properties": {
  17098. "type": "object",
  17099. "properties": {
  17100. "name": {
  17101. "type": "string"
  17102. },
  17103. "branch": {
  17104. "type": "string"
  17105. }
  17106. },
  17107. "required": ["name"],
  17108. "additionalProperties": false
  17109. }
  17110. },
  17111. "required": ["id", "type", "properties"],
  17112. "additionalProperties": false
  17113. },
  17114. {
  17115. "type": "object",
  17116. "properties": {
  17117. "id": {
  17118. "type": "string",
  17119. "pattern": "^evt_"
  17120. },
  17121. "type": {
  17122. "type": "string",
  17123. "enum": ["worktree.failed"]
  17124. },
  17125. "properties": {
  17126. "type": "object",
  17127. "properties": {
  17128. "message": {
  17129. "type": "string"
  17130. }
  17131. },
  17132. "required": ["message"],
  17133. "additionalProperties": false
  17134. }
  17135. },
  17136. "required": ["id", "type", "properties"],
  17137. "additionalProperties": false
  17138. },
  17139. {
  17140. "type": "object",
  17141. "properties": {
  17142. "id": {
  17143. "type": "string",
  17144. "pattern": "^evt_"
  17145. },
  17146. "type": {
  17147. "type": "string",
  17148. "enum": ["workspace.ready"]
  17149. },
  17150. "properties": {
  17151. "type": "object",
  17152. "properties": {
  17153. "name": {
  17154. "type": "string"
  17155. }
  17156. },
  17157. "required": ["name"],
  17158. "additionalProperties": false
  17159. }
  17160. },
  17161. "required": ["id", "type", "properties"],
  17162. "additionalProperties": false
  17163. },
  17164. {
  17165. "type": "object",
  17166. "properties": {
  17167. "id": {
  17168. "type": "string",
  17169. "pattern": "^evt_"
  17170. },
  17171. "type": {
  17172. "type": "string",
  17173. "enum": ["workspace.failed"]
  17174. },
  17175. "properties": {
  17176. "type": "object",
  17177. "properties": {
  17178. "message": {
  17179. "type": "string"
  17180. }
  17181. },
  17182. "required": ["message"],
  17183. "additionalProperties": false
  17184. }
  17185. },
  17186. "required": ["id", "type", "properties"],
  17187. "additionalProperties": false
  17188. },
  17189. {
  17190. "type": "object",
  17191. "properties": {
  17192. "id": {
  17193. "type": "string",
  17194. "pattern": "^evt_"
  17195. },
  17196. "type": {
  17197. "type": "string",
  17198. "enum": ["workspace.status"]
  17199. },
  17200. "properties": {
  17201. "type": "object",
  17202. "properties": {
  17203. "workspaceID": {
  17204. "type": "string",
  17205. "pattern": "^wrk"
  17206. },
  17207. "status": {
  17208. "type": "string",
  17209. "enum": ["connected", "connecting", "disconnected", "error"]
  17210. }
  17211. },
  17212. "required": ["workspaceID", "status"],
  17213. "additionalProperties": false
  17214. }
  17215. },
  17216. "required": ["id", "type", "properties"],
  17217. "additionalProperties": false
  17218. },
  17219. {
  17220. "type": "object",
  17221. "properties": {
  17222. "id": {
  17223. "type": "string",
  17224. "pattern": "^evt_"
  17225. },
  17226. "type": {
  17227. "type": "string",
  17228. "enum": ["server.connected"]
  17229. },
  17230. "properties": {
  17231. "type": "object",
  17232. "properties": {}
  17233. }
  17234. },
  17235. "required": ["id", "type", "properties"],
  17236. "additionalProperties": false
  17237. },
  17238. {
  17239. "type": "object",
  17240. "properties": {
  17241. "id": {
  17242. "type": "string",
  17243. "pattern": "^evt_"
  17244. },
  17245. "type": {
  17246. "type": "string",
  17247. "enum": ["global.disposed"]
  17248. },
  17249. "properties": {
  17250. "type": "object",
  17251. "properties": {}
  17252. }
  17253. },
  17254. "required": ["id", "type", "properties"],
  17255. "additionalProperties": false
  17256. },
  17257. {
  17258. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  17259. },
  17260. {
  17261. "$ref": "#/components/schemas/SyncEventSessionCreated"
  17262. },
  17263. {
  17264. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  17265. },
  17266. {
  17267. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  17268. },
  17269. {
  17270. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  17271. },
  17272. {
  17273. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  17274. },
  17275. {
  17276. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  17277. },
  17278. {
  17279. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  17280. },
  17281. {
  17282. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  17283. },
  17284. {
  17285. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  17286. },
  17287. {
  17288. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  17289. },
  17290. {
  17291. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  17292. },
  17293. {
  17294. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  17295. },
  17296. {
  17297. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  17298. },
  17299. {
  17300. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  17301. },
  17302. {
  17303. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  17304. },
  17305. {
  17306. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  17307. },
  17308. {
  17309. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  17310. },
  17311. {
  17312. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  17313. },
  17314. {
  17315. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  17316. },
  17317. {
  17318. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  17319. },
  17320. {
  17321. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  17322. },
  17323. {
  17324. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  17325. },
  17326. {
  17327. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  17328. },
  17329. {
  17330. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  17331. },
  17332. {
  17333. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  17334. },
  17335. {
  17336. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  17337. },
  17338. {
  17339. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  17340. },
  17341. {
  17342. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  17343. },
  17344. {
  17345. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  17346. },
  17347. {
  17348. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  17349. },
  17350. {
  17351. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  17352. },
  17353. {
  17354. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  17355. },
  17356. {
  17357. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  17358. },
  17359. {
  17360. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  17361. }
  17362. ]
  17363. }
  17364. },
  17365. "required": ["directory", "payload"],
  17366. "additionalProperties": false
  17367. },
  17368. "LogLevel": {
  17369. "type": "string",
  17370. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  17371. "description": "Log level"
  17372. },
  17373. "ServerConfig": {
  17374. "type": "object",
  17375. "properties": {
  17376. "port": {
  17377. "type": "integer",
  17378. "exclusiveMinimum": 0
  17379. },
  17380. "hostname": {
  17381. "type": "string"
  17382. },
  17383. "mdns": {
  17384. "type": "boolean"
  17385. },
  17386. "mdnsDomain": {
  17387. "type": "string"
  17388. },
  17389. "cors": {
  17390. "type": "array",
  17391. "items": {
  17392. "type": "string"
  17393. }
  17394. }
  17395. },
  17396. "additionalProperties": false,
  17397. "description": "Server configuration for opencode serve and web commands"
  17398. },
  17399. "ReferenceConfigEntry": {
  17400. "anyOf": [
  17401. {
  17402. "type": "string"
  17403. },
  17404. {
  17405. "type": "object",
  17406. "properties": {
  17407. "repository": {
  17408. "type": "string",
  17409. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  17410. },
  17411. "branch": {
  17412. "type": "string"
  17413. }
  17414. },
  17415. "required": ["repository"],
  17416. "additionalProperties": false
  17417. },
  17418. {
  17419. "type": "object",
  17420. "properties": {
  17421. "path": {
  17422. "type": "string",
  17423. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  17424. }
  17425. },
  17426. "required": ["path"],
  17427. "additionalProperties": false
  17428. }
  17429. ]
  17430. },
  17431. "ReferenceConfig": {
  17432. "type": "object",
  17433. "additionalProperties": {
  17434. "$ref": "#/components/schemas/ReferenceConfigEntry"
  17435. }
  17436. },
  17437. "PermissionActionConfig": {
  17438. "type": "string",
  17439. "enum": ["ask", "allow", "deny"]
  17440. },
  17441. "PermissionObjectConfig": {
  17442. "type": "object",
  17443. "additionalProperties": {
  17444. "$ref": "#/components/schemas/PermissionActionConfig"
  17445. }
  17446. },
  17447. "PermissionRuleConfig": {
  17448. "anyOf": [
  17449. {
  17450. "$ref": "#/components/schemas/PermissionActionConfig"
  17451. },
  17452. {
  17453. "$ref": "#/components/schemas/PermissionObjectConfig"
  17454. }
  17455. ]
  17456. },
  17457. "PermissionConfig": {
  17458. "anyOf": [
  17459. {
  17460. "$ref": "#/components/schemas/PermissionActionConfig"
  17461. },
  17462. {
  17463. "type": "object",
  17464. "properties": {
  17465. "read": {
  17466. "$ref": "#/components/schemas/PermissionRuleConfig"
  17467. },
  17468. "edit": {
  17469. "$ref": "#/components/schemas/PermissionRuleConfig"
  17470. },
  17471. "glob": {
  17472. "$ref": "#/components/schemas/PermissionRuleConfig"
  17473. },
  17474. "grep": {
  17475. "$ref": "#/components/schemas/PermissionRuleConfig"
  17476. },
  17477. "list": {
  17478. "$ref": "#/components/schemas/PermissionRuleConfig"
  17479. },
  17480. "bash": {
  17481. "$ref": "#/components/schemas/PermissionRuleConfig"
  17482. },
  17483. "task": {
  17484. "$ref": "#/components/schemas/PermissionRuleConfig"
  17485. },
  17486. "external_directory": {
  17487. "$ref": "#/components/schemas/PermissionRuleConfig"
  17488. },
  17489. "todowrite": {
  17490. "$ref": "#/components/schemas/PermissionActionConfig"
  17491. },
  17492. "question": {
  17493. "$ref": "#/components/schemas/PermissionActionConfig"
  17494. },
  17495. "webfetch": {
  17496. "$ref": "#/components/schemas/PermissionActionConfig"
  17497. },
  17498. "websearch": {
  17499. "$ref": "#/components/schemas/PermissionActionConfig"
  17500. },
  17501. "lsp": {
  17502. "$ref": "#/components/schemas/PermissionRuleConfig"
  17503. },
  17504. "doom_loop": {
  17505. "$ref": "#/components/schemas/PermissionActionConfig"
  17506. },
  17507. "skill": {
  17508. "$ref": "#/components/schemas/PermissionRuleConfig"
  17509. }
  17510. },
  17511. "additionalProperties": {
  17512. "$ref": "#/components/schemas/PermissionRuleConfig"
  17513. }
  17514. }
  17515. ]
  17516. },
  17517. "AgentConfig": {
  17518. "type": "object",
  17519. "properties": {
  17520. "model": {
  17521. "type": "string"
  17522. },
  17523. "variant": {
  17524. "type": "string"
  17525. },
  17526. "temperature": {
  17527. "type": "number"
  17528. },
  17529. "top_p": {
  17530. "type": "number"
  17531. },
  17532. "prompt": {
  17533. "type": "string"
  17534. },
  17535. "tools": {
  17536. "type": "object",
  17537. "additionalProperties": {
  17538. "type": "boolean"
  17539. }
  17540. },
  17541. "disable": {
  17542. "type": "boolean"
  17543. },
  17544. "description": {
  17545. "type": "string"
  17546. },
  17547. "mode": {
  17548. "type": "string",
  17549. "enum": ["subagent", "primary", "all"]
  17550. },
  17551. "hidden": {
  17552. "type": "boolean"
  17553. },
  17554. "options": {
  17555. "type": "object"
  17556. },
  17557. "color": {
  17558. "anyOf": [
  17559. {
  17560. "type": "string",
  17561. "pattern": "^#[0-9a-fA-F]{6}$"
  17562. },
  17563. {
  17564. "type": "string",
  17565. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  17566. }
  17567. ],
  17568. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  17569. },
  17570. "steps": {
  17571. "type": "integer",
  17572. "exclusiveMinimum": 0
  17573. },
  17574. "maxSteps": {
  17575. "type": "integer",
  17576. "exclusiveMinimum": 0
  17577. },
  17578. "permission": {
  17579. "$ref": "#/components/schemas/PermissionConfig"
  17580. }
  17581. },
  17582. "additionalProperties": {}
  17583. },
  17584. "ProviderConfig": {
  17585. "type": "object",
  17586. "properties": {
  17587. "api": {
  17588. "type": "string"
  17589. },
  17590. "name": {
  17591. "type": "string"
  17592. },
  17593. "env": {
  17594. "type": "array",
  17595. "items": {
  17596. "type": "string"
  17597. }
  17598. },
  17599. "id": {
  17600. "type": "string"
  17601. },
  17602. "npm": {
  17603. "type": "string"
  17604. },
  17605. "whitelist": {
  17606. "type": "array",
  17607. "items": {
  17608. "type": "string"
  17609. }
  17610. },
  17611. "blacklist": {
  17612. "type": "array",
  17613. "items": {
  17614. "type": "string"
  17615. }
  17616. },
  17617. "options": {
  17618. "type": "object",
  17619. "properties": {
  17620. "apiKey": {
  17621. "type": "string"
  17622. },
  17623. "baseURL": {
  17624. "type": "string"
  17625. },
  17626. "enterpriseUrl": {
  17627. "type": "string"
  17628. },
  17629. "setCacheKey": {
  17630. "type": "boolean"
  17631. },
  17632. "timeout": {
  17633. "anyOf": [
  17634. {
  17635. "type": "integer",
  17636. "exclusiveMinimum": 0
  17637. },
  17638. {
  17639. "type": "boolean",
  17640. "enum": [false]
  17641. }
  17642. ],
  17643. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  17644. },
  17645. "headerTimeout": {
  17646. "anyOf": [
  17647. {
  17648. "type": "integer",
  17649. "exclusiveMinimum": 0
  17650. },
  17651. {
  17652. "type": "boolean",
  17653. "enum": [false]
  17654. }
  17655. ],
  17656. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  17657. },
  17658. "chunkTimeout": {
  17659. "type": "integer",
  17660. "exclusiveMinimum": 0
  17661. }
  17662. },
  17663. "additionalProperties": {}
  17664. },
  17665. "models": {
  17666. "type": "object",
  17667. "additionalProperties": {
  17668. "type": "object",
  17669. "properties": {
  17670. "id": {
  17671. "type": "string"
  17672. },
  17673. "name": {
  17674. "type": "string"
  17675. },
  17676. "family": {
  17677. "type": "string"
  17678. },
  17679. "release_date": {
  17680. "type": "string"
  17681. },
  17682. "attachment": {
  17683. "type": "boolean"
  17684. },
  17685. "reasoning": {
  17686. "type": "boolean"
  17687. },
  17688. "temperature": {
  17689. "type": "boolean"
  17690. },
  17691. "tool_call": {
  17692. "type": "boolean"
  17693. },
  17694. "interleaved": {
  17695. "anyOf": [
  17696. {
  17697. "type": "boolean",
  17698. "enum": [true]
  17699. },
  17700. {
  17701. "type": "object",
  17702. "properties": {
  17703. "field": {
  17704. "type": "string",
  17705. "enum": ["reasoning_content", "reasoning_details"]
  17706. }
  17707. },
  17708. "required": ["field"],
  17709. "additionalProperties": false
  17710. }
  17711. ]
  17712. },
  17713. "cost": {
  17714. "type": "object",
  17715. "properties": {
  17716. "input": {
  17717. "type": "number"
  17718. },
  17719. "output": {
  17720. "type": "number"
  17721. },
  17722. "cache_read": {
  17723. "type": "number"
  17724. },
  17725. "cache_write": {
  17726. "type": "number"
  17727. },
  17728. "context_over_200k": {
  17729. "type": "object",
  17730. "properties": {
  17731. "input": {
  17732. "type": "number"
  17733. },
  17734. "output": {
  17735. "type": "number"
  17736. },
  17737. "cache_read": {
  17738. "type": "number"
  17739. },
  17740. "cache_write": {
  17741. "type": "number"
  17742. }
  17743. },
  17744. "required": ["input", "output"],
  17745. "additionalProperties": false
  17746. }
  17747. },
  17748. "required": ["input", "output"],
  17749. "additionalProperties": false
  17750. },
  17751. "limit": {
  17752. "type": "object",
  17753. "properties": {
  17754. "context": {
  17755. "type": "number"
  17756. },
  17757. "input": {
  17758. "type": "number"
  17759. },
  17760. "output": {
  17761. "type": "number"
  17762. }
  17763. },
  17764. "required": ["context", "output"],
  17765. "additionalProperties": false
  17766. },
  17767. "modalities": {
  17768. "type": "object",
  17769. "properties": {
  17770. "input": {
  17771. "type": "array",
  17772. "items": {
  17773. "type": "string",
  17774. "enum": ["text", "audio", "image", "video", "pdf"]
  17775. }
  17776. },
  17777. "output": {
  17778. "type": "array",
  17779. "items": {
  17780. "type": "string",
  17781. "enum": ["text", "audio", "image", "video", "pdf"]
  17782. }
  17783. }
  17784. },
  17785. "additionalProperties": false
  17786. },
  17787. "experimental": {
  17788. "type": "boolean"
  17789. },
  17790. "status": {
  17791. "type": "string",
  17792. "enum": ["alpha", "beta", "deprecated", "active"]
  17793. },
  17794. "provider": {
  17795. "type": "object",
  17796. "properties": {
  17797. "npm": {
  17798. "type": "string"
  17799. },
  17800. "api": {
  17801. "type": "string"
  17802. }
  17803. },
  17804. "additionalProperties": false
  17805. },
  17806. "options": {
  17807. "type": "object"
  17808. },
  17809. "headers": {
  17810. "type": "object",
  17811. "additionalProperties": {
  17812. "type": "string"
  17813. }
  17814. },
  17815. "variants": {
  17816. "type": "object",
  17817. "additionalProperties": {
  17818. "type": "object",
  17819. "properties": {
  17820. "disabled": {
  17821. "type": "boolean"
  17822. }
  17823. },
  17824. "additionalProperties": {}
  17825. },
  17826. "description": "Variant-specific configuration"
  17827. }
  17828. },
  17829. "additionalProperties": false
  17830. }
  17831. }
  17832. },
  17833. "additionalProperties": false
  17834. },
  17835. "McpLocalConfig": {
  17836. "type": "object",
  17837. "properties": {
  17838. "type": {
  17839. "type": "string",
  17840. "enum": ["local"],
  17841. "description": "Type of MCP server connection"
  17842. },
  17843. "command": {
  17844. "type": "array",
  17845. "items": {
  17846. "type": "string"
  17847. },
  17848. "description": "Command and arguments to run the MCP server"
  17849. },
  17850. "environment": {
  17851. "type": "object",
  17852. "additionalProperties": {
  17853. "type": "string"
  17854. }
  17855. },
  17856. "enabled": {
  17857. "type": "boolean"
  17858. },
  17859. "timeout": {
  17860. "type": "integer",
  17861. "exclusiveMinimum": 0
  17862. }
  17863. },
  17864. "required": ["type", "command"],
  17865. "additionalProperties": false
  17866. },
  17867. "McpOAuthConfig": {
  17868. "type": "object",
  17869. "properties": {
  17870. "clientId": {
  17871. "type": "string"
  17872. },
  17873. "clientSecret": {
  17874. "type": "string"
  17875. },
  17876. "scope": {
  17877. "type": "string"
  17878. },
  17879. "callbackPort": {
  17880. "type": "integer",
  17881. "minimum": 1,
  17882. "maximum": 65535
  17883. },
  17884. "redirectUri": {
  17885. "type": "string"
  17886. }
  17887. },
  17888. "additionalProperties": false
  17889. },
  17890. "McpRemoteConfig": {
  17891. "type": "object",
  17892. "properties": {
  17893. "type": {
  17894. "type": "string",
  17895. "enum": ["remote"],
  17896. "description": "Type of MCP server connection"
  17897. },
  17898. "url": {
  17899. "type": "string",
  17900. "description": "URL of the remote MCP server"
  17901. },
  17902. "enabled": {
  17903. "type": "boolean"
  17904. },
  17905. "headers": {
  17906. "type": "object",
  17907. "additionalProperties": {
  17908. "type": "string"
  17909. }
  17910. },
  17911. "oauth": {
  17912. "anyOf": [
  17913. {
  17914. "$ref": "#/components/schemas/McpOAuthConfig"
  17915. },
  17916. {
  17917. "type": "boolean",
  17918. "enum": [false]
  17919. }
  17920. ],
  17921. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  17922. },
  17923. "timeout": {
  17924. "type": "integer",
  17925. "exclusiveMinimum": 0
  17926. }
  17927. },
  17928. "required": ["type", "url"],
  17929. "additionalProperties": false
  17930. },
  17931. "LayoutConfig": {
  17932. "type": "string",
  17933. "enum": ["auto", "stretch"],
  17934. "description": "@deprecated Always uses stretch layout."
  17935. },
  17936. "ImageAttachmentConfig": {
  17937. "type": "object",
  17938. "properties": {
  17939. "auto_resize": {
  17940. "type": "boolean"
  17941. },
  17942. "max_width": {
  17943. "type": "integer",
  17944. "exclusiveMinimum": 0
  17945. },
  17946. "max_height": {
  17947. "type": "integer",
  17948. "exclusiveMinimum": 0
  17949. },
  17950. "max_base64_bytes": {
  17951. "type": "integer",
  17952. "exclusiveMinimum": 0
  17953. }
  17954. },
  17955. "additionalProperties": false
  17956. },
  17957. "AttachmentConfig": {
  17958. "type": "object",
  17959. "properties": {
  17960. "image": {
  17961. "$ref": "#/components/schemas/ImageAttachmentConfig"
  17962. }
  17963. },
  17964. "additionalProperties": false
  17965. },
  17966. "Config": {
  17967. "type": "object",
  17968. "properties": {
  17969. "$schema": {
  17970. "type": "string"
  17971. },
  17972. "shell": {
  17973. "type": "string"
  17974. },
  17975. "logLevel": {
  17976. "$ref": "#/components/schemas/LogLevel"
  17977. },
  17978. "server": {
  17979. "$ref": "#/components/schemas/ServerConfig"
  17980. },
  17981. "command": {
  17982. "type": "object",
  17983. "additionalProperties": {
  17984. "type": "object",
  17985. "properties": {
  17986. "template": {
  17987. "type": "string"
  17988. },
  17989. "description": {
  17990. "type": "string"
  17991. },
  17992. "agent": {
  17993. "type": "string"
  17994. },
  17995. "model": {
  17996. "type": "string"
  17997. },
  17998. "variant": {
  17999. "type": "string"
  18000. },
  18001. "subtask": {
  18002. "type": "boolean"
  18003. }
  18004. },
  18005. "required": ["template"],
  18006. "additionalProperties": false
  18007. }
  18008. },
  18009. "skills": {
  18010. "type": "object",
  18011. "properties": {
  18012. "paths": {
  18013. "type": "array",
  18014. "items": {
  18015. "type": "string"
  18016. }
  18017. },
  18018. "urls": {
  18019. "type": "array",
  18020. "items": {
  18021. "type": "string"
  18022. }
  18023. }
  18024. },
  18025. "additionalProperties": false
  18026. },
  18027. "reference": {
  18028. "$ref": "#/components/schemas/ReferenceConfig"
  18029. },
  18030. "watcher": {
  18031. "type": "object",
  18032. "properties": {
  18033. "ignore": {
  18034. "type": "array",
  18035. "items": {
  18036. "type": "string"
  18037. }
  18038. }
  18039. },
  18040. "additionalProperties": false
  18041. },
  18042. "snapshot": {
  18043. "type": "boolean"
  18044. },
  18045. "plugin": {
  18046. "type": "array",
  18047. "items": {
  18048. "anyOf": [
  18049. {
  18050. "type": "string"
  18051. },
  18052. {
  18053. "type": "array",
  18054. "prefixItems": [
  18055. {
  18056. "type": "string"
  18057. },
  18058. {
  18059. "type": "object"
  18060. }
  18061. ],
  18062. "maxItems": 2,
  18063. "minItems": 2
  18064. }
  18065. ]
  18066. }
  18067. },
  18068. "share": {
  18069. "type": "string",
  18070. "enum": ["manual", "auto", "disabled"]
  18071. },
  18072. "autoshare": {
  18073. "type": "boolean"
  18074. },
  18075. "autoupdate": {
  18076. "anyOf": [
  18077. {
  18078. "type": "boolean"
  18079. },
  18080. {
  18081. "type": "string",
  18082. "enum": ["notify"]
  18083. }
  18084. ],
  18085. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  18086. },
  18087. "disabled_providers": {
  18088. "type": "array",
  18089. "items": {
  18090. "type": "string"
  18091. }
  18092. },
  18093. "enabled_providers": {
  18094. "type": "array",
  18095. "items": {
  18096. "type": "string"
  18097. }
  18098. },
  18099. "model": {
  18100. "type": "string"
  18101. },
  18102. "small_model": {
  18103. "type": "string"
  18104. },
  18105. "default_agent": {
  18106. "type": "string"
  18107. },
  18108. "username": {
  18109. "type": "string"
  18110. },
  18111. "mode": {
  18112. "type": "object",
  18113. "properties": {
  18114. "build": {
  18115. "$ref": "#/components/schemas/AgentConfig"
  18116. },
  18117. "plan": {
  18118. "$ref": "#/components/schemas/AgentConfig"
  18119. }
  18120. },
  18121. "additionalProperties": {
  18122. "$ref": "#/components/schemas/AgentConfig"
  18123. }
  18124. },
  18125. "agent": {
  18126. "type": "object",
  18127. "properties": {
  18128. "plan": {
  18129. "$ref": "#/components/schemas/AgentConfig"
  18130. },
  18131. "build": {
  18132. "$ref": "#/components/schemas/AgentConfig"
  18133. },
  18134. "general": {
  18135. "$ref": "#/components/schemas/AgentConfig"
  18136. },
  18137. "explore": {
  18138. "$ref": "#/components/schemas/AgentConfig"
  18139. },
  18140. "title": {
  18141. "$ref": "#/components/schemas/AgentConfig"
  18142. },
  18143. "summary": {
  18144. "$ref": "#/components/schemas/AgentConfig"
  18145. },
  18146. "compaction": {
  18147. "$ref": "#/components/schemas/AgentConfig"
  18148. }
  18149. },
  18150. "additionalProperties": {
  18151. "$ref": "#/components/schemas/AgentConfig"
  18152. }
  18153. },
  18154. "provider": {
  18155. "type": "object",
  18156. "additionalProperties": {
  18157. "$ref": "#/components/schemas/ProviderConfig"
  18158. }
  18159. },
  18160. "mcp": {
  18161. "type": "object",
  18162. "additionalProperties": {
  18163. "anyOf": [
  18164. {
  18165. "$ref": "#/components/schemas/McpLocalConfig"
  18166. },
  18167. {
  18168. "$ref": "#/components/schemas/McpRemoteConfig"
  18169. },
  18170. {
  18171. "type": "object",
  18172. "properties": {
  18173. "enabled": {
  18174. "type": "boolean"
  18175. }
  18176. },
  18177. "required": ["enabled"],
  18178. "additionalProperties": false
  18179. }
  18180. ]
  18181. }
  18182. },
  18183. "formatter": {
  18184. "anyOf": [
  18185. {
  18186. "type": "boolean"
  18187. },
  18188. {
  18189. "type": "object",
  18190. "additionalProperties": {
  18191. "type": "object",
  18192. "properties": {
  18193. "disabled": {
  18194. "type": "boolean"
  18195. },
  18196. "command": {
  18197. "type": "array",
  18198. "items": {
  18199. "type": "string"
  18200. }
  18201. },
  18202. "environment": {
  18203. "type": "object",
  18204. "additionalProperties": {
  18205. "type": "string"
  18206. }
  18207. },
  18208. "extensions": {
  18209. "type": "array",
  18210. "items": {
  18211. "type": "string"
  18212. }
  18213. }
  18214. },
  18215. "additionalProperties": false
  18216. }
  18217. }
  18218. ],
  18219. "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."
  18220. },
  18221. "lsp": {
  18222. "anyOf": [
  18223. {
  18224. "type": "boolean"
  18225. },
  18226. {
  18227. "type": "object",
  18228. "additionalProperties": {
  18229. "anyOf": [
  18230. {
  18231. "type": "object",
  18232. "properties": {
  18233. "disabled": {
  18234. "type": "boolean",
  18235. "enum": [true]
  18236. }
  18237. },
  18238. "required": ["disabled"],
  18239. "additionalProperties": false
  18240. },
  18241. {
  18242. "type": "object",
  18243. "properties": {
  18244. "command": {
  18245. "type": "array",
  18246. "items": {
  18247. "type": "string"
  18248. }
  18249. },
  18250. "extensions": {
  18251. "type": "array",
  18252. "items": {
  18253. "type": "string"
  18254. }
  18255. },
  18256. "disabled": {
  18257. "type": "boolean"
  18258. },
  18259. "env": {
  18260. "type": "object",
  18261. "additionalProperties": {
  18262. "type": "string"
  18263. }
  18264. },
  18265. "initialization": {
  18266. "type": "object"
  18267. }
  18268. },
  18269. "required": ["command"],
  18270. "additionalProperties": false
  18271. }
  18272. ]
  18273. }
  18274. }
  18275. ],
  18276. "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."
  18277. },
  18278. "instructions": {
  18279. "type": "array",
  18280. "items": {
  18281. "type": "string"
  18282. }
  18283. },
  18284. "layout": {
  18285. "$ref": "#/components/schemas/LayoutConfig"
  18286. },
  18287. "permission": {
  18288. "$ref": "#/components/schemas/PermissionConfig"
  18289. },
  18290. "tools": {
  18291. "type": "object",
  18292. "additionalProperties": {
  18293. "type": "boolean"
  18294. }
  18295. },
  18296. "attachment": {
  18297. "$ref": "#/components/schemas/AttachmentConfig"
  18298. },
  18299. "enterprise": {
  18300. "type": "object",
  18301. "properties": {
  18302. "url": {
  18303. "type": "string"
  18304. }
  18305. },
  18306. "additionalProperties": false
  18307. },
  18308. "tool_output": {
  18309. "type": "object",
  18310. "properties": {
  18311. "max_lines": {
  18312. "type": "integer",
  18313. "exclusiveMinimum": 0
  18314. },
  18315. "max_bytes": {
  18316. "type": "integer",
  18317. "exclusiveMinimum": 0
  18318. }
  18319. },
  18320. "additionalProperties": false
  18321. },
  18322. "compaction": {
  18323. "type": "object",
  18324. "properties": {
  18325. "auto": {
  18326. "type": "boolean"
  18327. },
  18328. "prune": {
  18329. "type": "boolean"
  18330. },
  18331. "tail_turns": {
  18332. "type": "integer",
  18333. "minimum": 0
  18334. },
  18335. "preserve_recent_tokens": {
  18336. "type": "integer",
  18337. "minimum": 0
  18338. },
  18339. "reserved": {
  18340. "type": "integer",
  18341. "minimum": 0
  18342. }
  18343. },
  18344. "additionalProperties": false
  18345. },
  18346. "experimental": {
  18347. "type": "object",
  18348. "properties": {
  18349. "disable_paste_summary": {
  18350. "type": "boolean"
  18351. },
  18352. "batch_tool": {
  18353. "type": "boolean"
  18354. },
  18355. "openTelemetry": {
  18356. "type": "boolean"
  18357. },
  18358. "primary_tools": {
  18359. "type": "array",
  18360. "items": {
  18361. "type": "string"
  18362. }
  18363. },
  18364. "continue_loop_on_deny": {
  18365. "type": "boolean"
  18366. },
  18367. "mcp_timeout": {
  18368. "type": "integer",
  18369. "exclusiveMinimum": 0
  18370. },
  18371. "policies": {
  18372. "type": "array",
  18373. "items": {
  18374. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  18375. }
  18376. }
  18377. },
  18378. "additionalProperties": false
  18379. }
  18380. },
  18381. "additionalProperties": false
  18382. },
  18383. "Model": {
  18384. "type": "object",
  18385. "properties": {
  18386. "id": {
  18387. "type": "string"
  18388. },
  18389. "providerID": {
  18390. "type": "string"
  18391. },
  18392. "api": {
  18393. "type": "object",
  18394. "properties": {
  18395. "id": {
  18396. "type": "string"
  18397. },
  18398. "url": {
  18399. "type": "string"
  18400. },
  18401. "npm": {
  18402. "type": "string"
  18403. }
  18404. },
  18405. "required": ["id", "url", "npm"],
  18406. "additionalProperties": false
  18407. },
  18408. "name": {
  18409. "type": "string"
  18410. },
  18411. "family": {
  18412. "type": "string"
  18413. },
  18414. "capabilities": {
  18415. "type": "object",
  18416. "properties": {
  18417. "temperature": {
  18418. "type": "boolean"
  18419. },
  18420. "reasoning": {
  18421. "type": "boolean"
  18422. },
  18423. "attachment": {
  18424. "type": "boolean"
  18425. },
  18426. "toolcall": {
  18427. "type": "boolean"
  18428. },
  18429. "input": {
  18430. "type": "object",
  18431. "properties": {
  18432. "text": {
  18433. "type": "boolean"
  18434. },
  18435. "audio": {
  18436. "type": "boolean"
  18437. },
  18438. "image": {
  18439. "type": "boolean"
  18440. },
  18441. "video": {
  18442. "type": "boolean"
  18443. },
  18444. "pdf": {
  18445. "type": "boolean"
  18446. }
  18447. },
  18448. "required": ["text", "audio", "image", "video", "pdf"],
  18449. "additionalProperties": false
  18450. },
  18451. "output": {
  18452. "type": "object",
  18453. "properties": {
  18454. "text": {
  18455. "type": "boolean"
  18456. },
  18457. "audio": {
  18458. "type": "boolean"
  18459. },
  18460. "image": {
  18461. "type": "boolean"
  18462. },
  18463. "video": {
  18464. "type": "boolean"
  18465. },
  18466. "pdf": {
  18467. "type": "boolean"
  18468. }
  18469. },
  18470. "required": ["text", "audio", "image", "video", "pdf"],
  18471. "additionalProperties": false
  18472. },
  18473. "interleaved": {
  18474. "anyOf": [
  18475. {
  18476. "type": "boolean"
  18477. },
  18478. {
  18479. "type": "object",
  18480. "properties": {
  18481. "field": {
  18482. "type": "string",
  18483. "enum": ["reasoning_content", "reasoning_details"]
  18484. }
  18485. },
  18486. "required": ["field"],
  18487. "additionalProperties": false
  18488. }
  18489. ]
  18490. }
  18491. },
  18492. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  18493. "additionalProperties": false
  18494. },
  18495. "cost": {
  18496. "type": "object",
  18497. "properties": {
  18498. "input": {
  18499. "type": "number"
  18500. },
  18501. "output": {
  18502. "type": "number"
  18503. },
  18504. "cache": {
  18505. "type": "object",
  18506. "properties": {
  18507. "read": {
  18508. "type": "number"
  18509. },
  18510. "write": {
  18511. "type": "number"
  18512. }
  18513. },
  18514. "required": ["read", "write"],
  18515. "additionalProperties": false
  18516. },
  18517. "tiers": {
  18518. "type": "array",
  18519. "items": {
  18520. "type": "object",
  18521. "properties": {
  18522. "input": {
  18523. "type": "number"
  18524. },
  18525. "output": {
  18526. "type": "number"
  18527. },
  18528. "cache": {
  18529. "type": "object",
  18530. "properties": {
  18531. "read": {
  18532. "type": "number"
  18533. },
  18534. "write": {
  18535. "type": "number"
  18536. }
  18537. },
  18538. "required": ["read", "write"],
  18539. "additionalProperties": false
  18540. },
  18541. "tier": {
  18542. "type": "object",
  18543. "properties": {
  18544. "type": {
  18545. "type": "string",
  18546. "enum": ["context"]
  18547. },
  18548. "size": {
  18549. "type": "number"
  18550. }
  18551. },
  18552. "required": ["type", "size"],
  18553. "additionalProperties": false
  18554. }
  18555. },
  18556. "required": ["input", "output", "cache", "tier"],
  18557. "additionalProperties": false
  18558. }
  18559. },
  18560. "experimentalOver200K": {
  18561. "type": "object",
  18562. "properties": {
  18563. "input": {
  18564. "type": "number"
  18565. },
  18566. "output": {
  18567. "type": "number"
  18568. },
  18569. "cache": {
  18570. "type": "object",
  18571. "properties": {
  18572. "read": {
  18573. "type": "number"
  18574. },
  18575. "write": {
  18576. "type": "number"
  18577. }
  18578. },
  18579. "required": ["read", "write"],
  18580. "additionalProperties": false
  18581. }
  18582. },
  18583. "required": ["input", "output", "cache"],
  18584. "additionalProperties": false
  18585. }
  18586. },
  18587. "required": ["input", "output", "cache"],
  18588. "additionalProperties": false
  18589. },
  18590. "limit": {
  18591. "type": "object",
  18592. "properties": {
  18593. "context": {
  18594. "type": "number"
  18595. },
  18596. "input": {
  18597. "type": "number"
  18598. },
  18599. "output": {
  18600. "type": "number"
  18601. }
  18602. },
  18603. "required": ["context", "output"],
  18604. "additionalProperties": false
  18605. },
  18606. "status": {
  18607. "type": "string",
  18608. "enum": ["alpha", "beta", "deprecated", "active"]
  18609. },
  18610. "options": {
  18611. "type": "object"
  18612. },
  18613. "headers": {
  18614. "type": "object",
  18615. "additionalProperties": {
  18616. "type": "string"
  18617. }
  18618. },
  18619. "release_date": {
  18620. "type": "string"
  18621. },
  18622. "variants": {
  18623. "type": "object",
  18624. "additionalProperties": {
  18625. "type": "object"
  18626. }
  18627. }
  18628. },
  18629. "required": [
  18630. "id",
  18631. "providerID",
  18632. "api",
  18633. "name",
  18634. "capabilities",
  18635. "cost",
  18636. "limit",
  18637. "status",
  18638. "options",
  18639. "headers",
  18640. "release_date"
  18641. ],
  18642. "additionalProperties": false
  18643. },
  18644. "Provider": {
  18645. "type": "object",
  18646. "properties": {
  18647. "id": {
  18648. "type": "string"
  18649. },
  18650. "name": {
  18651. "type": "string"
  18652. },
  18653. "source": {
  18654. "type": "string",
  18655. "enum": ["env", "config", "custom", "api"]
  18656. },
  18657. "env": {
  18658. "type": "array",
  18659. "items": {
  18660. "type": "string"
  18661. }
  18662. },
  18663. "key": {
  18664. "type": "string"
  18665. },
  18666. "options": {
  18667. "type": "object"
  18668. },
  18669. "models": {
  18670. "type": "object",
  18671. "additionalProperties": {
  18672. "$ref": "#/components/schemas/Model"
  18673. }
  18674. }
  18675. },
  18676. "required": ["id", "name", "source", "env", "options", "models"],
  18677. "additionalProperties": false
  18678. },
  18679. "ConsoleState": {
  18680. "type": "object",
  18681. "properties": {
  18682. "consoleManagedProviders": {
  18683. "type": "array",
  18684. "items": {
  18685. "type": "string"
  18686. }
  18687. },
  18688. "activeOrgName": {
  18689. "type": "string"
  18690. },
  18691. "switchableOrgCount": {
  18692. "type": "integer",
  18693. "minimum": 0
  18694. }
  18695. },
  18696. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18697. "additionalProperties": false
  18698. },
  18699. "effect_HttpApiError_InternalServerError": {
  18700. "type": "object",
  18701. "properties": {
  18702. "_tag": {
  18703. "type": "string",
  18704. "enum": ["InternalServerError"]
  18705. }
  18706. },
  18707. "required": ["_tag"],
  18708. "additionalProperties": false
  18709. },
  18710. "ToolListItem": {
  18711. "type": "object",
  18712. "properties": {
  18713. "id": {
  18714. "type": "string"
  18715. },
  18716. "description": {
  18717. "type": "string"
  18718. },
  18719. "parameters": {}
  18720. },
  18721. "required": ["id", "description", "parameters"],
  18722. "additionalProperties": false
  18723. },
  18724. "ToolList": {
  18725. "type": "array",
  18726. "items": {
  18727. "$ref": "#/components/schemas/ToolListItem"
  18728. }
  18729. },
  18730. "ToolIDs": {
  18731. "type": "array",
  18732. "items": {
  18733. "type": "string"
  18734. }
  18735. },
  18736. "WorktreeError": {
  18737. "type": "object",
  18738. "properties": {
  18739. "name": {
  18740. "type": "string",
  18741. "enum": [
  18742. "WorktreeNotGitError",
  18743. "WorktreeNameGenerationFailedError",
  18744. "WorktreeCreateFailedError",
  18745. "WorktreeStartCommandFailedError",
  18746. "WorktreeRemoveFailedError",
  18747. "WorktreeResetFailedError",
  18748. "WorktreeListFailedError"
  18749. ]
  18750. },
  18751. "data": {
  18752. "type": "object",
  18753. "properties": {
  18754. "message": {
  18755. "type": "string"
  18756. }
  18757. },
  18758. "required": ["message"],
  18759. "additionalProperties": false
  18760. }
  18761. },
  18762. "required": ["name", "data"],
  18763. "additionalProperties": false
  18764. },
  18765. "WorktreeCreateInput": {
  18766. "type": "object",
  18767. "properties": {
  18768. "name": {
  18769. "type": "string"
  18770. },
  18771. "startCommand": {
  18772. "type": "string",
  18773. "description": "Additional startup script to run after the project's start command"
  18774. }
  18775. },
  18776. "additionalProperties": false
  18777. },
  18778. "Worktree": {
  18779. "type": "object",
  18780. "properties": {
  18781. "name": {
  18782. "type": "string"
  18783. },
  18784. "branch": {
  18785. "type": "string"
  18786. },
  18787. "directory": {
  18788. "type": "string"
  18789. }
  18790. },
  18791. "required": ["name", "directory"],
  18792. "additionalProperties": false
  18793. },
  18794. "WorktreeRemoveInput": {
  18795. "type": "object",
  18796. "properties": {
  18797. "directory": {
  18798. "type": "string"
  18799. }
  18800. },
  18801. "required": ["directory"],
  18802. "additionalProperties": false
  18803. },
  18804. "WorktreeResetInput": {
  18805. "type": "object",
  18806. "properties": {
  18807. "directory": {
  18808. "type": "string"
  18809. }
  18810. },
  18811. "required": ["directory"],
  18812. "additionalProperties": false
  18813. },
  18814. "ProjectSummary": {
  18815. "type": "object",
  18816. "properties": {
  18817. "id": {
  18818. "type": "string"
  18819. },
  18820. "name": {
  18821. "type": "string"
  18822. },
  18823. "worktree": {
  18824. "type": "string"
  18825. }
  18826. },
  18827. "required": ["id", "worktree"],
  18828. "additionalProperties": false
  18829. },
  18830. "GlobalSession": {
  18831. "type": "object",
  18832. "properties": {
  18833. "id": {
  18834. "type": "string",
  18835. "pattern": "^ses"
  18836. },
  18837. "slug": {
  18838. "type": "string"
  18839. },
  18840. "projectID": {
  18841. "type": "string"
  18842. },
  18843. "workspaceID": {
  18844. "type": "string",
  18845. "pattern": "^wrk"
  18846. },
  18847. "directory": {
  18848. "type": "string"
  18849. },
  18850. "path": {
  18851. "type": "string"
  18852. },
  18853. "parentID": {
  18854. "type": "string",
  18855. "pattern": "^ses"
  18856. },
  18857. "summary": {
  18858. "type": "object",
  18859. "properties": {
  18860. "additions": {
  18861. "type": "number"
  18862. },
  18863. "deletions": {
  18864. "type": "number"
  18865. },
  18866. "files": {
  18867. "type": "number"
  18868. },
  18869. "diffs": {
  18870. "type": "array",
  18871. "items": {
  18872. "$ref": "#/components/schemas/SnapshotFileDiff"
  18873. }
  18874. }
  18875. },
  18876. "required": ["additions", "deletions", "files"],
  18877. "additionalProperties": false
  18878. },
  18879. "cost": {
  18880. "type": "number"
  18881. },
  18882. "tokens": {
  18883. "type": "object",
  18884. "properties": {
  18885. "input": {
  18886. "type": "number"
  18887. },
  18888. "output": {
  18889. "type": "number"
  18890. },
  18891. "reasoning": {
  18892. "type": "number"
  18893. },
  18894. "cache": {
  18895. "type": "object",
  18896. "properties": {
  18897. "read": {
  18898. "type": "number"
  18899. },
  18900. "write": {
  18901. "type": "number"
  18902. }
  18903. },
  18904. "required": ["read", "write"],
  18905. "additionalProperties": false
  18906. }
  18907. },
  18908. "required": ["input", "output", "reasoning", "cache"],
  18909. "additionalProperties": false
  18910. },
  18911. "share": {
  18912. "type": "object",
  18913. "properties": {
  18914. "url": {
  18915. "type": "string"
  18916. }
  18917. },
  18918. "required": ["url"],
  18919. "additionalProperties": false
  18920. },
  18921. "title": {
  18922. "type": "string"
  18923. },
  18924. "agent": {
  18925. "type": "string"
  18926. },
  18927. "model": {
  18928. "type": "object",
  18929. "properties": {
  18930. "id": {
  18931. "type": "string"
  18932. },
  18933. "providerID": {
  18934. "type": "string"
  18935. },
  18936. "variant": {
  18937. "type": "string"
  18938. }
  18939. },
  18940. "required": ["id", "providerID"],
  18941. "additionalProperties": false
  18942. },
  18943. "version": {
  18944. "type": "string"
  18945. },
  18946. "metadata": {
  18947. "type": "object"
  18948. },
  18949. "time": {
  18950. "type": "object",
  18951. "properties": {
  18952. "created": {
  18953. "type": "integer",
  18954. "minimum": 0
  18955. },
  18956. "updated": {
  18957. "type": "integer",
  18958. "minimum": 0
  18959. },
  18960. "compacting": {
  18961. "type": "integer",
  18962. "minimum": 0
  18963. },
  18964. "archived": {
  18965. "type": "number"
  18966. }
  18967. },
  18968. "required": ["created", "updated"],
  18969. "additionalProperties": false
  18970. },
  18971. "permission": {
  18972. "$ref": "#/components/schemas/PermissionRuleset"
  18973. },
  18974. "revert": {
  18975. "type": "object",
  18976. "properties": {
  18977. "messageID": {
  18978. "type": "string",
  18979. "pattern": "^msg"
  18980. },
  18981. "partID": {
  18982. "type": "string",
  18983. "pattern": "^prt"
  18984. },
  18985. "snapshot": {
  18986. "type": "string"
  18987. },
  18988. "diff": {
  18989. "type": "string"
  18990. }
  18991. },
  18992. "required": ["messageID"],
  18993. "additionalProperties": false
  18994. },
  18995. "project": {
  18996. "anyOf": [
  18997. {
  18998. "$ref": "#/components/schemas/ProjectSummary"
  18999. },
  19000. {
  19001. "type": "null"
  19002. }
  19003. ]
  19004. }
  19005. },
  19006. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  19007. "additionalProperties": false
  19008. },
  19009. "McpResource": {
  19010. "type": "object",
  19011. "properties": {
  19012. "name": {
  19013. "type": "string"
  19014. },
  19015. "uri": {
  19016. "type": "string"
  19017. },
  19018. "description": {
  19019. "type": "string"
  19020. },
  19021. "mimeType": {
  19022. "type": "string"
  19023. },
  19024. "client": {
  19025. "type": "string"
  19026. }
  19027. },
  19028. "required": ["name", "uri", "client"],
  19029. "additionalProperties": false
  19030. },
  19031. "Symbol": {
  19032. "type": "object",
  19033. "properties": {
  19034. "name": {
  19035. "type": "string"
  19036. },
  19037. "kind": {
  19038. "type": "integer",
  19039. "minimum": 0
  19040. },
  19041. "location": {
  19042. "type": "object",
  19043. "properties": {
  19044. "uri": {
  19045. "type": "string"
  19046. },
  19047. "range": {
  19048. "$ref": "#/components/schemas/Range"
  19049. }
  19050. },
  19051. "required": ["uri", "range"],
  19052. "additionalProperties": false
  19053. }
  19054. },
  19055. "required": ["name", "kind", "location"],
  19056. "additionalProperties": false
  19057. },
  19058. "FileNode": {
  19059. "type": "object",
  19060. "properties": {
  19061. "name": {
  19062. "type": "string"
  19063. },
  19064. "path": {
  19065. "type": "string"
  19066. },
  19067. "absolute": {
  19068. "type": "string"
  19069. },
  19070. "type": {
  19071. "type": "string",
  19072. "enum": ["file", "directory"]
  19073. },
  19074. "ignored": {
  19075. "type": "boolean"
  19076. }
  19077. },
  19078. "required": ["name", "path", "absolute", "type", "ignored"],
  19079. "additionalProperties": false
  19080. },
  19081. "FileContent": {
  19082. "type": "object",
  19083. "properties": {
  19084. "type": {
  19085. "type": "string",
  19086. "enum": ["text", "binary"]
  19087. },
  19088. "content": {
  19089. "type": "string"
  19090. },
  19091. "diff": {
  19092. "type": "string"
  19093. },
  19094. "patch": {
  19095. "type": "object",
  19096. "properties": {
  19097. "oldFileName": {
  19098. "type": "string"
  19099. },
  19100. "newFileName": {
  19101. "type": "string"
  19102. },
  19103. "oldHeader": {
  19104. "type": "string"
  19105. },
  19106. "newHeader": {
  19107. "type": "string"
  19108. },
  19109. "hunks": {
  19110. "type": "array",
  19111. "items": {
  19112. "type": "object",
  19113. "properties": {
  19114. "oldStart": {
  19115. "type": "integer",
  19116. "minimum": 0
  19117. },
  19118. "oldLines": {
  19119. "type": "integer",
  19120. "minimum": 0
  19121. },
  19122. "newStart": {
  19123. "type": "integer",
  19124. "minimum": 0
  19125. },
  19126. "newLines": {
  19127. "type": "integer",
  19128. "minimum": 0
  19129. },
  19130. "lines": {
  19131. "type": "array",
  19132. "items": {
  19133. "type": "string"
  19134. }
  19135. }
  19136. },
  19137. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  19138. "additionalProperties": false
  19139. }
  19140. },
  19141. "index": {
  19142. "type": "string"
  19143. }
  19144. },
  19145. "required": ["oldFileName", "newFileName", "hunks"],
  19146. "additionalProperties": false
  19147. },
  19148. "encoding": {
  19149. "type": "string",
  19150. "enum": ["base64"]
  19151. },
  19152. "mimeType": {
  19153. "type": "string"
  19154. }
  19155. },
  19156. "required": ["type", "content"],
  19157. "additionalProperties": false
  19158. },
  19159. "File": {
  19160. "type": "object",
  19161. "properties": {
  19162. "path": {
  19163. "type": "string"
  19164. },
  19165. "added": {
  19166. "type": "integer",
  19167. "minimum": 0
  19168. },
  19169. "removed": {
  19170. "type": "integer",
  19171. "minimum": 0
  19172. },
  19173. "status": {
  19174. "type": "string",
  19175. "enum": ["added", "deleted", "modified"]
  19176. }
  19177. },
  19178. "required": ["path", "added", "removed", "status"],
  19179. "additionalProperties": false
  19180. },
  19181. "Path": {
  19182. "type": "object",
  19183. "properties": {
  19184. "home": {
  19185. "type": "string"
  19186. },
  19187. "state": {
  19188. "type": "string"
  19189. },
  19190. "config": {
  19191. "type": "string"
  19192. },
  19193. "worktree": {
  19194. "type": "string"
  19195. },
  19196. "directory": {
  19197. "type": "string"
  19198. }
  19199. },
  19200. "required": ["home", "state", "config", "worktree", "directory"],
  19201. "additionalProperties": false
  19202. },
  19203. "VcsInfo": {
  19204. "type": "object",
  19205. "properties": {
  19206. "branch": {
  19207. "type": "string"
  19208. },
  19209. "default_branch": {
  19210. "type": "string"
  19211. }
  19212. },
  19213. "additionalProperties": false
  19214. },
  19215. "VcsFileStatus": {
  19216. "type": "object",
  19217. "properties": {
  19218. "file": {
  19219. "type": "string"
  19220. },
  19221. "additions": {
  19222. "type": "number"
  19223. },
  19224. "deletions": {
  19225. "type": "number"
  19226. },
  19227. "status": {
  19228. "type": "string",
  19229. "enum": ["added", "deleted", "modified"]
  19230. }
  19231. },
  19232. "required": ["file", "additions", "deletions", "status"],
  19233. "additionalProperties": false
  19234. },
  19235. "VcsFileDiff": {
  19236. "type": "object",
  19237. "properties": {
  19238. "file": {
  19239. "type": "string"
  19240. },
  19241. "patch": {
  19242. "type": "string"
  19243. },
  19244. "additions": {
  19245. "type": "number"
  19246. },
  19247. "deletions": {
  19248. "type": "number"
  19249. },
  19250. "status": {
  19251. "type": "string",
  19252. "enum": ["added", "deleted", "modified"]
  19253. }
  19254. },
  19255. "required": ["file", "additions", "deletions"],
  19256. "additionalProperties": false
  19257. },
  19258. "VcsApplyError": {
  19259. "type": "object",
  19260. "properties": {
  19261. "name": {
  19262. "type": "string",
  19263. "enum": ["VcsApplyError"]
  19264. },
  19265. "data": {
  19266. "type": "object",
  19267. "properties": {
  19268. "message": {
  19269. "type": "string"
  19270. },
  19271. "reason": {
  19272. "type": "string",
  19273. "enum": ["non-git", "not-clean"]
  19274. }
  19275. },
  19276. "required": ["message", "reason"],
  19277. "additionalProperties": false
  19278. }
  19279. },
  19280. "required": ["name", "data"],
  19281. "additionalProperties": false
  19282. },
  19283. "Command": {
  19284. "type": "object",
  19285. "properties": {
  19286. "name": {
  19287. "type": "string"
  19288. },
  19289. "description": {
  19290. "type": "string"
  19291. },
  19292. "agent": {
  19293. "type": "string"
  19294. },
  19295. "model": {
  19296. "type": "string"
  19297. },
  19298. "source": {
  19299. "type": "string",
  19300. "enum": ["command", "mcp", "skill"]
  19301. },
  19302. "template": {
  19303. "type": "string"
  19304. },
  19305. "subtask": {
  19306. "type": "boolean"
  19307. },
  19308. "hints": {
  19309. "type": "array",
  19310. "items": {
  19311. "type": "string"
  19312. }
  19313. }
  19314. },
  19315. "required": ["name", "template", "hints"],
  19316. "additionalProperties": false
  19317. },
  19318. "Agent": {
  19319. "type": "object",
  19320. "properties": {
  19321. "name": {
  19322. "type": "string"
  19323. },
  19324. "description": {
  19325. "type": "string"
  19326. },
  19327. "mode": {
  19328. "type": "string",
  19329. "enum": ["subagent", "primary", "all"]
  19330. },
  19331. "native": {
  19332. "type": "boolean"
  19333. },
  19334. "hidden": {
  19335. "type": "boolean"
  19336. },
  19337. "topP": {
  19338. "type": "number"
  19339. },
  19340. "temperature": {
  19341. "type": "number"
  19342. },
  19343. "color": {
  19344. "type": "string"
  19345. },
  19346. "permission": {
  19347. "$ref": "#/components/schemas/PermissionRuleset"
  19348. },
  19349. "model": {
  19350. "type": "object",
  19351. "properties": {
  19352. "modelID": {
  19353. "type": "string"
  19354. },
  19355. "providerID": {
  19356. "type": "string"
  19357. }
  19358. },
  19359. "required": ["modelID", "providerID"],
  19360. "additionalProperties": false
  19361. },
  19362. "variant": {
  19363. "type": "string"
  19364. },
  19365. "prompt": {
  19366. "type": "string"
  19367. },
  19368. "options": {
  19369. "type": "object"
  19370. },
  19371. "steps": {
  19372. "type": "number"
  19373. }
  19374. },
  19375. "required": ["name", "mode", "permission", "options"],
  19376. "additionalProperties": false
  19377. },
  19378. "LSPStatus": {
  19379. "type": "object",
  19380. "properties": {
  19381. "id": {
  19382. "type": "string"
  19383. },
  19384. "name": {
  19385. "type": "string"
  19386. },
  19387. "root": {
  19388. "type": "string"
  19389. },
  19390. "status": {
  19391. "type": "string",
  19392. "enum": ["connected", "error"]
  19393. }
  19394. },
  19395. "required": ["id", "name", "root", "status"],
  19396. "additionalProperties": false
  19397. },
  19398. "FormatterStatus": {
  19399. "type": "object",
  19400. "properties": {
  19401. "name": {
  19402. "type": "string"
  19403. },
  19404. "extensions": {
  19405. "type": "array",
  19406. "items": {
  19407. "type": "string"
  19408. }
  19409. },
  19410. "enabled": {
  19411. "type": "boolean"
  19412. }
  19413. },
  19414. "required": ["name", "extensions", "enabled"],
  19415. "additionalProperties": false
  19416. },
  19417. "MCPStatusConnected": {
  19418. "type": "object",
  19419. "properties": {
  19420. "status": {
  19421. "type": "string",
  19422. "enum": ["connected"]
  19423. }
  19424. },
  19425. "required": ["status"],
  19426. "additionalProperties": false
  19427. },
  19428. "MCPStatusDisabled": {
  19429. "type": "object",
  19430. "properties": {
  19431. "status": {
  19432. "type": "string",
  19433. "enum": ["disabled"]
  19434. }
  19435. },
  19436. "required": ["status"],
  19437. "additionalProperties": false
  19438. },
  19439. "MCPStatusFailed": {
  19440. "type": "object",
  19441. "properties": {
  19442. "status": {
  19443. "type": "string",
  19444. "enum": ["failed"]
  19445. },
  19446. "error": {
  19447. "type": "string"
  19448. }
  19449. },
  19450. "required": ["status", "error"],
  19451. "additionalProperties": false
  19452. },
  19453. "MCPStatusNeedsAuth": {
  19454. "type": "object",
  19455. "properties": {
  19456. "status": {
  19457. "type": "string",
  19458. "enum": ["needs_auth"]
  19459. }
  19460. },
  19461. "required": ["status"],
  19462. "additionalProperties": false
  19463. },
  19464. "MCPStatusNeedsClientRegistration": {
  19465. "type": "object",
  19466. "properties": {
  19467. "status": {
  19468. "type": "string",
  19469. "enum": ["needs_client_registration"]
  19470. },
  19471. "error": {
  19472. "type": "string"
  19473. }
  19474. },
  19475. "required": ["status", "error"],
  19476. "additionalProperties": false
  19477. },
  19478. "MCPStatus": {
  19479. "anyOf": [
  19480. {
  19481. "$ref": "#/components/schemas/MCPStatusConnected"
  19482. },
  19483. {
  19484. "$ref": "#/components/schemas/MCPStatusDisabled"
  19485. },
  19486. {
  19487. "$ref": "#/components/schemas/MCPStatusFailed"
  19488. },
  19489. {
  19490. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  19491. },
  19492. {
  19493. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  19494. }
  19495. ]
  19496. },
  19497. "McpUnsupportedOAuthError": {
  19498. "type": "object",
  19499. "properties": {
  19500. "error": {
  19501. "type": "string"
  19502. }
  19503. },
  19504. "required": ["error"],
  19505. "additionalProperties": false
  19506. },
  19507. "McpServerNotFoundError": {
  19508. "type": "object",
  19509. "properties": {
  19510. "_tag": {
  19511. "type": "string",
  19512. "enum": ["McpServerNotFoundError"]
  19513. },
  19514. "name": {
  19515. "type": "string"
  19516. },
  19517. "message": {
  19518. "type": "string"
  19519. }
  19520. },
  19521. "required": ["_tag", "name", "message"],
  19522. "additionalProperties": false
  19523. },
  19524. "Project": {
  19525. "type": "object",
  19526. "properties": {
  19527. "id": {
  19528. "type": "string"
  19529. },
  19530. "worktree": {
  19531. "type": "string"
  19532. },
  19533. "vcs": {
  19534. "type": "string",
  19535. "enum": ["git"]
  19536. },
  19537. "name": {
  19538. "type": "string"
  19539. },
  19540. "icon": {
  19541. "type": "object",
  19542. "properties": {
  19543. "url": {
  19544. "type": "string"
  19545. },
  19546. "override": {
  19547. "type": "string"
  19548. },
  19549. "color": {
  19550. "type": "string"
  19551. }
  19552. },
  19553. "additionalProperties": false
  19554. },
  19555. "commands": {
  19556. "type": "object",
  19557. "properties": {
  19558. "start": {
  19559. "type": "string",
  19560. "description": "Startup script to run when creating a new workspace (worktree)"
  19561. }
  19562. },
  19563. "additionalProperties": false
  19564. },
  19565. "time": {
  19566. "type": "object",
  19567. "properties": {
  19568. "created": {
  19569. "type": "integer",
  19570. "minimum": 0
  19571. },
  19572. "updated": {
  19573. "type": "integer",
  19574. "minimum": 0
  19575. },
  19576. "initialized": {
  19577. "type": "integer",
  19578. "minimum": 0
  19579. }
  19580. },
  19581. "required": ["created", "updated"],
  19582. "additionalProperties": false
  19583. },
  19584. "sandboxes": {
  19585. "type": "array",
  19586. "items": {
  19587. "type": "string"
  19588. }
  19589. }
  19590. },
  19591. "required": ["id", "worktree", "time", "sandboxes"],
  19592. "additionalProperties": false
  19593. },
  19594. "ProjectNotFoundError": {
  19595. "type": "object",
  19596. "properties": {
  19597. "_tag": {
  19598. "type": "string",
  19599. "enum": ["ProjectNotFoundError"]
  19600. },
  19601. "projectID": {
  19602. "type": "string"
  19603. },
  19604. "message": {
  19605. "type": "string"
  19606. }
  19607. },
  19608. "required": ["_tag", "projectID", "message"],
  19609. "additionalProperties": false
  19610. },
  19611. "ProjectCopyError": {
  19612. "type": "object",
  19613. "properties": {
  19614. "name": {
  19615. "type": "string",
  19616. "enum": ["ProjectCopyError"]
  19617. },
  19618. "data": {
  19619. "type": "object",
  19620. "properties": {
  19621. "message": {
  19622. "type": "string"
  19623. }
  19624. },
  19625. "required": ["message"],
  19626. "additionalProperties": false
  19627. }
  19628. },
  19629. "required": ["name", "data"],
  19630. "additionalProperties": false
  19631. },
  19632. "PtyNotFoundError": {
  19633. "type": "object",
  19634. "properties": {
  19635. "_tag": {
  19636. "type": "string",
  19637. "enum": ["PtyNotFoundError"]
  19638. },
  19639. "ptyID": {
  19640. "type": "string"
  19641. },
  19642. "message": {
  19643. "type": "string"
  19644. }
  19645. },
  19646. "required": ["_tag", "ptyID", "message"],
  19647. "additionalProperties": false
  19648. },
  19649. "PtyForbiddenError": {
  19650. "type": "object",
  19651. "properties": {
  19652. "_tag": {
  19653. "type": "string",
  19654. "enum": ["PtyForbiddenError"]
  19655. },
  19656. "message": {
  19657. "type": "string"
  19658. }
  19659. },
  19660. "required": ["_tag", "message"],
  19661. "additionalProperties": false
  19662. },
  19663. "QuestionRequest": {
  19664. "type": "object",
  19665. "properties": {
  19666. "id": {
  19667. "type": "string",
  19668. "pattern": "^que"
  19669. },
  19670. "sessionID": {
  19671. "type": "string",
  19672. "pattern": "^ses"
  19673. },
  19674. "questions": {
  19675. "type": "array",
  19676. "items": {
  19677. "$ref": "#/components/schemas/QuestionInfo"
  19678. },
  19679. "description": "Questions to ask"
  19680. },
  19681. "tool": {
  19682. "$ref": "#/components/schemas/QuestionTool"
  19683. }
  19684. },
  19685. "required": ["id", "sessionID", "questions"],
  19686. "additionalProperties": false
  19687. },
  19688. "QuestionNotFoundError": {
  19689. "type": "object",
  19690. "properties": {
  19691. "_tag": {
  19692. "type": "string",
  19693. "enum": ["QuestionNotFoundError"]
  19694. },
  19695. "requestID": {
  19696. "type": "string"
  19697. },
  19698. "message": {
  19699. "type": "string"
  19700. }
  19701. },
  19702. "required": ["_tag", "requestID", "message"],
  19703. "additionalProperties": false
  19704. },
  19705. "PermissionRequest": {
  19706. "type": "object",
  19707. "properties": {
  19708. "id": {
  19709. "type": "string",
  19710. "pattern": "^per"
  19711. },
  19712. "sessionID": {
  19713. "type": "string",
  19714. "pattern": "^ses"
  19715. },
  19716. "permission": {
  19717. "type": "string"
  19718. },
  19719. "patterns": {
  19720. "type": "array",
  19721. "items": {
  19722. "type": "string"
  19723. }
  19724. },
  19725. "metadata": {
  19726. "type": "object"
  19727. },
  19728. "always": {
  19729. "type": "array",
  19730. "items": {
  19731. "type": "string"
  19732. }
  19733. },
  19734. "tool": {
  19735. "type": "object",
  19736. "properties": {
  19737. "messageID": {
  19738. "type": "string"
  19739. },
  19740. "callID": {
  19741. "type": "string"
  19742. }
  19743. },
  19744. "required": ["messageID", "callID"],
  19745. "additionalProperties": false
  19746. }
  19747. },
  19748. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19749. "additionalProperties": false
  19750. },
  19751. "PermissionNotFoundError": {
  19752. "type": "object",
  19753. "properties": {
  19754. "_tag": {
  19755. "type": "string",
  19756. "enum": ["PermissionNotFoundError"]
  19757. },
  19758. "requestID": {
  19759. "type": "string"
  19760. },
  19761. "message": {
  19762. "type": "string"
  19763. }
  19764. },
  19765. "required": ["_tag", "requestID", "message"],
  19766. "additionalProperties": false
  19767. },
  19768. "ProviderAuthMethod": {
  19769. "type": "object",
  19770. "properties": {
  19771. "type": {
  19772. "type": "string",
  19773. "enum": ["oauth", "api"]
  19774. },
  19775. "label": {
  19776. "type": "string"
  19777. },
  19778. "prompts": {
  19779. "type": "array",
  19780. "items": {
  19781. "anyOf": [
  19782. {
  19783. "type": "object",
  19784. "properties": {
  19785. "type": {
  19786. "type": "string",
  19787. "enum": ["text"]
  19788. },
  19789. "key": {
  19790. "type": "string"
  19791. },
  19792. "message": {
  19793. "type": "string"
  19794. },
  19795. "placeholder": {
  19796. "type": "string"
  19797. },
  19798. "when": {
  19799. "type": "object",
  19800. "properties": {
  19801. "key": {
  19802. "type": "string"
  19803. },
  19804. "op": {
  19805. "type": "string",
  19806. "enum": ["eq", "neq"]
  19807. },
  19808. "value": {
  19809. "type": "string"
  19810. }
  19811. },
  19812. "required": ["key", "op", "value"],
  19813. "additionalProperties": false
  19814. }
  19815. },
  19816. "required": ["type", "key", "message"],
  19817. "additionalProperties": false
  19818. },
  19819. {
  19820. "type": "object",
  19821. "properties": {
  19822. "type": {
  19823. "type": "string",
  19824. "enum": ["select"]
  19825. },
  19826. "key": {
  19827. "type": "string"
  19828. },
  19829. "message": {
  19830. "type": "string"
  19831. },
  19832. "options": {
  19833. "type": "array",
  19834. "items": {
  19835. "type": "object",
  19836. "properties": {
  19837. "label": {
  19838. "type": "string"
  19839. },
  19840. "value": {
  19841. "type": "string"
  19842. },
  19843. "hint": {
  19844. "type": "string"
  19845. }
  19846. },
  19847. "required": ["label", "value"],
  19848. "additionalProperties": false
  19849. }
  19850. },
  19851. "when": {
  19852. "type": "object",
  19853. "properties": {
  19854. "key": {
  19855. "type": "string"
  19856. },
  19857. "op": {
  19858. "type": "string",
  19859. "enum": ["eq", "neq"]
  19860. },
  19861. "value": {
  19862. "type": "string"
  19863. }
  19864. },
  19865. "required": ["key", "op", "value"],
  19866. "additionalProperties": false
  19867. }
  19868. },
  19869. "required": ["type", "key", "message", "options"],
  19870. "additionalProperties": false
  19871. }
  19872. ]
  19873. }
  19874. }
  19875. },
  19876. "required": ["type", "label"],
  19877. "additionalProperties": false
  19878. },
  19879. "ProviderAuthAuthorization": {
  19880. "type": "object",
  19881. "properties": {
  19882. "url": {
  19883. "type": "string"
  19884. },
  19885. "method": {
  19886. "type": "string",
  19887. "enum": ["auto", "code"]
  19888. },
  19889. "instructions": {
  19890. "type": "string"
  19891. }
  19892. },
  19893. "required": ["url", "method", "instructions"],
  19894. "additionalProperties": false
  19895. },
  19896. "ProviderAuthError1": {
  19897. "type": "object",
  19898. "properties": {
  19899. "name": {
  19900. "type": "string",
  19901. "enum": [
  19902. "BadRequest",
  19903. "ProviderAuthOauthMissing",
  19904. "ProviderAuthOauthCodeMissing",
  19905. "ProviderAuthOauthCallbackFailed",
  19906. "ProviderAuthValidationFailed"
  19907. ]
  19908. },
  19909. "data": {
  19910. "type": "object",
  19911. "properties": {
  19912. "providerID": {
  19913. "type": "string"
  19914. },
  19915. "field": {
  19916. "type": "string"
  19917. },
  19918. "message": {
  19919. "type": "string"
  19920. },
  19921. "kind": {
  19922. "type": "string"
  19923. }
  19924. },
  19925. "additionalProperties": false
  19926. }
  19927. },
  19928. "required": ["name", "data"],
  19929. "additionalProperties": false
  19930. },
  19931. "NotFoundError": {
  19932. "type": "object",
  19933. "required": ["name", "data"],
  19934. "properties": {
  19935. "name": {
  19936. "type": "string",
  19937. "enum": ["NotFoundError"]
  19938. },
  19939. "data": {
  19940. "type": "object",
  19941. "required": ["message"],
  19942. "properties": {
  19943. "message": {
  19944. "type": "string"
  19945. }
  19946. }
  19947. }
  19948. }
  19949. },
  19950. "TextPartInput": {
  19951. "type": "object",
  19952. "properties": {
  19953. "id": {
  19954. "type": "string",
  19955. "pattern": "^prt"
  19956. },
  19957. "type": {
  19958. "type": "string",
  19959. "enum": ["text"]
  19960. },
  19961. "text": {
  19962. "type": "string"
  19963. },
  19964. "synthetic": {
  19965. "type": "boolean"
  19966. },
  19967. "ignored": {
  19968. "type": "boolean"
  19969. },
  19970. "time": {
  19971. "type": "object",
  19972. "properties": {
  19973. "start": {
  19974. "type": "integer",
  19975. "minimum": 0
  19976. },
  19977. "end": {
  19978. "type": "integer",
  19979. "minimum": 0
  19980. }
  19981. },
  19982. "required": ["start"],
  19983. "additionalProperties": false
  19984. },
  19985. "metadata": {
  19986. "type": "object"
  19987. }
  19988. },
  19989. "required": ["type", "text"],
  19990. "additionalProperties": false
  19991. },
  19992. "FilePartInput": {
  19993. "type": "object",
  19994. "properties": {
  19995. "id": {
  19996. "type": "string",
  19997. "pattern": "^prt"
  19998. },
  19999. "type": {
  20000. "type": "string",
  20001. "enum": ["file"]
  20002. },
  20003. "mime": {
  20004. "type": "string"
  20005. },
  20006. "filename": {
  20007. "type": "string"
  20008. },
  20009. "url": {
  20010. "type": "string"
  20011. },
  20012. "source": {
  20013. "$ref": "#/components/schemas/FilePartSource"
  20014. }
  20015. },
  20016. "required": ["type", "mime", "url"],
  20017. "additionalProperties": false
  20018. },
  20019. "AgentPartInput": {
  20020. "type": "object",
  20021. "properties": {
  20022. "id": {
  20023. "type": "string",
  20024. "pattern": "^prt"
  20025. },
  20026. "type": {
  20027. "type": "string",
  20028. "enum": ["agent"]
  20029. },
  20030. "name": {
  20031. "type": "string"
  20032. },
  20033. "source": {
  20034. "type": "object",
  20035. "properties": {
  20036. "value": {
  20037. "type": "string"
  20038. },
  20039. "start": {
  20040. "type": "integer",
  20041. "minimum": 0
  20042. },
  20043. "end": {
  20044. "type": "integer",
  20045. "minimum": 0
  20046. }
  20047. },
  20048. "required": ["value", "start", "end"],
  20049. "additionalProperties": false
  20050. }
  20051. },
  20052. "required": ["type", "name"],
  20053. "additionalProperties": false
  20054. },
  20055. "SubtaskPartInput": {
  20056. "type": "object",
  20057. "properties": {
  20058. "id": {
  20059. "type": "string",
  20060. "pattern": "^prt"
  20061. },
  20062. "type": {
  20063. "type": "string",
  20064. "enum": ["subtask"]
  20065. },
  20066. "prompt": {
  20067. "type": "string"
  20068. },
  20069. "description": {
  20070. "type": "string"
  20071. },
  20072. "agent": {
  20073. "type": "string"
  20074. },
  20075. "model": {
  20076. "type": "object",
  20077. "properties": {
  20078. "providerID": {
  20079. "type": "string"
  20080. },
  20081. "modelID": {
  20082. "type": "string"
  20083. }
  20084. },
  20085. "required": ["providerID", "modelID"],
  20086. "additionalProperties": false
  20087. },
  20088. "command": {
  20089. "type": "string"
  20090. }
  20091. },
  20092. "required": ["type", "prompt", "description", "agent"],
  20093. "additionalProperties": false
  20094. },
  20095. "SessionBusyError": {
  20096. "type": "object",
  20097. "properties": {
  20098. "_tag": {
  20099. "type": "string",
  20100. "enum": ["SessionBusyError"]
  20101. },
  20102. "sessionID": {
  20103. "type": "string"
  20104. },
  20105. "message": {
  20106. "type": "string"
  20107. }
  20108. },
  20109. "required": ["_tag", "sessionID", "message"],
  20110. "additionalProperties": false
  20111. },
  20112. "EventTuiPromptAppend": {
  20113. "type": "object",
  20114. "properties": {
  20115. "type": {
  20116. "type": "string",
  20117. "enum": ["tui.prompt.append"]
  20118. },
  20119. "properties": {
  20120. "type": "object",
  20121. "properties": {
  20122. "text": {
  20123. "type": "string"
  20124. }
  20125. },
  20126. "required": ["text"],
  20127. "additionalProperties": false
  20128. }
  20129. },
  20130. "required": ["type", "properties"],
  20131. "additionalProperties": false
  20132. },
  20133. "EventTuiCommandExecute": {
  20134. "type": "object",
  20135. "properties": {
  20136. "type": {
  20137. "type": "string",
  20138. "enum": ["tui.command.execute"]
  20139. },
  20140. "properties": {
  20141. "type": "object",
  20142. "properties": {
  20143. "command": {
  20144. "anyOf": [
  20145. {
  20146. "type": "string",
  20147. "enum": [
  20148. "session.list",
  20149. "session.new",
  20150. "session.share",
  20151. "session.interrupt",
  20152. "session.compact",
  20153. "session.page.up",
  20154. "session.page.down",
  20155. "session.line.up",
  20156. "session.line.down",
  20157. "session.half.page.up",
  20158. "session.half.page.down",
  20159. "session.first",
  20160. "session.last",
  20161. "prompt.clear",
  20162. "prompt.submit",
  20163. "agent.cycle"
  20164. ]
  20165. },
  20166. {
  20167. "type": "string"
  20168. }
  20169. ]
  20170. }
  20171. },
  20172. "required": ["command"],
  20173. "additionalProperties": false
  20174. }
  20175. },
  20176. "required": ["type", "properties"],
  20177. "additionalProperties": false
  20178. },
  20179. "EventTuiToastShow": {
  20180. "type": "object",
  20181. "properties": {
  20182. "type": {
  20183. "type": "string",
  20184. "enum": ["tui.toast.show"]
  20185. },
  20186. "properties": {
  20187. "type": "object",
  20188. "properties": {
  20189. "title": {
  20190. "type": "string"
  20191. },
  20192. "message": {
  20193. "type": "string"
  20194. },
  20195. "variant": {
  20196. "type": "string",
  20197. "enum": ["info", "success", "warning", "error"]
  20198. },
  20199. "duration": {
  20200. "type": "integer",
  20201. "exclusiveMinimum": 0
  20202. }
  20203. },
  20204. "required": ["message", "variant"],
  20205. "additionalProperties": false
  20206. }
  20207. },
  20208. "required": ["type", "properties"],
  20209. "additionalProperties": false
  20210. },
  20211. "EventTuiSessionSelect": {
  20212. "type": "object",
  20213. "properties": {
  20214. "type": {
  20215. "type": "string",
  20216. "enum": ["tui.session.select"]
  20217. },
  20218. "properties": {
  20219. "type": "object",
  20220. "properties": {
  20221. "sessionID": {
  20222. "type": "string",
  20223. "pattern": "^ses",
  20224. "description": "Session ID to navigate to"
  20225. }
  20226. },
  20227. "required": ["sessionID"],
  20228. "additionalProperties": false
  20229. }
  20230. },
  20231. "required": ["type", "properties"],
  20232. "additionalProperties": false
  20233. },
  20234. "Workspace": {
  20235. "type": "object",
  20236. "properties": {
  20237. "id": {
  20238. "type": "string",
  20239. "pattern": "^wrk"
  20240. },
  20241. "type": {
  20242. "type": "string"
  20243. },
  20244. "name": {
  20245. "type": "string"
  20246. },
  20247. "branch": {
  20248. "anyOf": [
  20249. {
  20250. "type": "string"
  20251. },
  20252. {
  20253. "type": "null"
  20254. }
  20255. ]
  20256. },
  20257. "directory": {
  20258. "anyOf": [
  20259. {
  20260. "type": "string"
  20261. },
  20262. {
  20263. "type": "null"
  20264. }
  20265. ]
  20266. },
  20267. "extra": {
  20268. "anyOf": [
  20269. {},
  20270. {
  20271. "type": "null"
  20272. }
  20273. ]
  20274. },
  20275. "projectID": {
  20276. "type": "string"
  20277. },
  20278. "timeUsed": {
  20279. "anyOf": [
  20280. {
  20281. "type": "number"
  20282. },
  20283. {
  20284. "type": "string",
  20285. "enum": ["NaN"]
  20286. },
  20287. {
  20288. "type": "string",
  20289. "enum": ["Infinity"]
  20290. },
  20291. {
  20292. "type": "string",
  20293. "enum": ["-Infinity"]
  20294. },
  20295. {
  20296. "type": "string",
  20297. "enum": ["Infinity", "-Infinity", "NaN"]
  20298. }
  20299. ]
  20300. }
  20301. },
  20302. "required": ["id", "type", "name", "projectID", "timeUsed"],
  20303. "additionalProperties": false
  20304. },
  20305. "WorkspaceCreateError": {
  20306. "type": "object",
  20307. "properties": {
  20308. "name": {
  20309. "type": "string",
  20310. "enum": ["WorkspaceCreateError"]
  20311. },
  20312. "data": {
  20313. "type": "object",
  20314. "properties": {
  20315. "message": {
  20316. "type": "string"
  20317. }
  20318. },
  20319. "required": ["message"],
  20320. "additionalProperties": false
  20321. }
  20322. },
  20323. "required": ["name", "data"],
  20324. "additionalProperties": false
  20325. },
  20326. "WorkspaceWarpError": {
  20327. "type": "object",
  20328. "properties": {
  20329. "name": {
  20330. "type": "string",
  20331. "enum": ["WorkspaceWarpError"]
  20332. },
  20333. "data": {
  20334. "type": "object",
  20335. "properties": {
  20336. "message": {
  20337. "type": "string"
  20338. }
  20339. },
  20340. "required": ["message"],
  20341. "additionalProperties": false
  20342. }
  20343. },
  20344. "required": ["name", "data"],
  20345. "additionalProperties": false
  20346. },
  20347. "UnauthorizedError": {
  20348. "type": "object",
  20349. "properties": {
  20350. "_tag": {
  20351. "type": "string",
  20352. "enum": ["UnauthorizedError"]
  20353. },
  20354. "message": {
  20355. "type": "string"
  20356. }
  20357. },
  20358. "required": ["_tag", "message"],
  20359. "additionalProperties": false
  20360. },
  20361. "V2SessionsResponse": {
  20362. "type": "object",
  20363. "properties": {
  20364. "data": {
  20365. "type": "array",
  20366. "items": {
  20367. "$ref": "#/components/schemas/SessionV2Info"
  20368. }
  20369. },
  20370. "cursor": {
  20371. "type": "object",
  20372. "properties": {
  20373. "previous": {
  20374. "type": "string"
  20375. },
  20376. "next": {
  20377. "type": "string"
  20378. }
  20379. },
  20380. "additionalProperties": false
  20381. }
  20382. },
  20383. "required": ["data", "cursor"],
  20384. "additionalProperties": false
  20385. },
  20386. "InvalidCursorError": {
  20387. "type": "object",
  20388. "properties": {
  20389. "_tag": {
  20390. "type": "string",
  20391. "enum": ["InvalidCursorError"]
  20392. },
  20393. "message": {
  20394. "type": "string"
  20395. }
  20396. },
  20397. "required": ["_tag", "message"],
  20398. "additionalProperties": false
  20399. },
  20400. "ConflictError": {
  20401. "type": "object",
  20402. "properties": {
  20403. "_tag": {
  20404. "type": "string",
  20405. "enum": ["ConflictError"]
  20406. },
  20407. "message": {
  20408. "type": "string"
  20409. },
  20410. "resource": {
  20411. "type": "string"
  20412. }
  20413. },
  20414. "required": ["_tag", "message"],
  20415. "additionalProperties": false
  20416. },
  20417. "SessionNotFoundError": {
  20418. "type": "object",
  20419. "properties": {
  20420. "_tag": {
  20421. "type": "string",
  20422. "enum": ["SessionNotFoundError"]
  20423. },
  20424. "sessionID": {
  20425. "type": "string"
  20426. },
  20427. "message": {
  20428. "type": "string"
  20429. }
  20430. },
  20431. "required": ["_tag", "sessionID", "message"],
  20432. "additionalProperties": false
  20433. },
  20434. "ServiceUnavailableError": {
  20435. "type": "object",
  20436. "properties": {
  20437. "_tag": {
  20438. "type": "string",
  20439. "enum": ["ServiceUnavailableError"]
  20440. },
  20441. "message": {
  20442. "type": "string"
  20443. },
  20444. "service": {
  20445. "type": "string"
  20446. }
  20447. },
  20448. "required": ["_tag", "message"],
  20449. "additionalProperties": false
  20450. },
  20451. "UnknownError1": {
  20452. "type": "object",
  20453. "properties": {
  20454. "_tag": {
  20455. "type": "string",
  20456. "enum": ["UnknownError"]
  20457. },
  20458. "message": {
  20459. "type": "string"
  20460. },
  20461. "ref": {
  20462. "type": "string"
  20463. }
  20464. },
  20465. "required": ["_tag", "message"],
  20466. "additionalProperties": false
  20467. },
  20468. "V2SessionMessagesResponse": {
  20469. "type": "object",
  20470. "properties": {
  20471. "data": {
  20472. "type": "array",
  20473. "items": {
  20474. "$ref": "#/components/schemas/SessionMessage"
  20475. }
  20476. },
  20477. "cursor": {
  20478. "type": "object",
  20479. "properties": {
  20480. "previous": {
  20481. "type": "string"
  20482. },
  20483. "next": {
  20484. "type": "string"
  20485. }
  20486. },
  20487. "additionalProperties": false
  20488. }
  20489. },
  20490. "required": ["data", "cursor"],
  20491. "additionalProperties": false
  20492. },
  20493. "ProviderNotFoundError": {
  20494. "type": "object",
  20495. "properties": {
  20496. "_tag": {
  20497. "type": "string",
  20498. "enum": ["ProviderNotFoundError"]
  20499. },
  20500. "providerID": {
  20501. "type": "string"
  20502. },
  20503. "message": {
  20504. "type": "string"
  20505. }
  20506. },
  20507. "required": ["_tag", "providerID", "message"],
  20508. "additionalProperties": false
  20509. },
  20510. "effect_HttpApiError_Forbidden": {
  20511. "type": "object",
  20512. "properties": {
  20513. "_tag": {
  20514. "type": "string",
  20515. "enum": ["Forbidden"]
  20516. }
  20517. },
  20518. "required": ["_tag"],
  20519. "additionalProperties": false
  20520. },
  20521. "Event.tui.prompt.append": {
  20522. "type": "object",
  20523. "properties": {
  20524. "id": {
  20525. "type": "string",
  20526. "pattern": "^evt_"
  20527. },
  20528. "type": {
  20529. "type": "string",
  20530. "enum": ["tui.prompt.append"]
  20531. },
  20532. "properties": {
  20533. "type": "object",
  20534. "properties": {
  20535. "text": {
  20536. "type": "string"
  20537. }
  20538. },
  20539. "required": ["text"],
  20540. "additionalProperties": false
  20541. }
  20542. },
  20543. "required": ["id", "type", "properties"],
  20544. "additionalProperties": false
  20545. },
  20546. "Event.tui.command.execute": {
  20547. "type": "object",
  20548. "properties": {
  20549. "id": {
  20550. "type": "string",
  20551. "pattern": "^evt_"
  20552. },
  20553. "type": {
  20554. "type": "string",
  20555. "enum": ["tui.command.execute"]
  20556. },
  20557. "properties": {
  20558. "type": "object",
  20559. "properties": {
  20560. "command": {
  20561. "anyOf": [
  20562. {
  20563. "type": "string",
  20564. "enum": [
  20565. "session.list",
  20566. "session.new",
  20567. "session.share",
  20568. "session.interrupt",
  20569. "session.compact",
  20570. "session.page.up",
  20571. "session.page.down",
  20572. "session.line.up",
  20573. "session.line.down",
  20574. "session.half.page.up",
  20575. "session.half.page.down",
  20576. "session.first",
  20577. "session.last",
  20578. "prompt.clear",
  20579. "prompt.submit",
  20580. "agent.cycle"
  20581. ]
  20582. },
  20583. {
  20584. "type": "string"
  20585. }
  20586. ]
  20587. }
  20588. },
  20589. "required": ["command"],
  20590. "additionalProperties": false
  20591. }
  20592. },
  20593. "required": ["id", "type", "properties"],
  20594. "additionalProperties": false
  20595. },
  20596. "Event.tui.toast.show": {
  20597. "type": "object",
  20598. "properties": {
  20599. "id": {
  20600. "type": "string",
  20601. "pattern": "^evt_"
  20602. },
  20603. "type": {
  20604. "type": "string",
  20605. "enum": ["tui.toast.show"]
  20606. },
  20607. "properties": {
  20608. "type": "object",
  20609. "properties": {
  20610. "title": {
  20611. "type": "string"
  20612. },
  20613. "message": {
  20614. "type": "string"
  20615. },
  20616. "variant": {
  20617. "type": "string",
  20618. "enum": ["info", "success", "warning", "error"]
  20619. },
  20620. "duration": {
  20621. "type": "integer",
  20622. "exclusiveMinimum": 0
  20623. }
  20624. },
  20625. "required": ["message", "variant"],
  20626. "additionalProperties": false
  20627. }
  20628. },
  20629. "required": ["id", "type", "properties"],
  20630. "additionalProperties": false
  20631. },
  20632. "Event.tui.session.select": {
  20633. "type": "object",
  20634. "properties": {
  20635. "id": {
  20636. "type": "string",
  20637. "pattern": "^evt_"
  20638. },
  20639. "type": {
  20640. "type": "string",
  20641. "enum": ["tui.session.select"]
  20642. },
  20643. "properties": {
  20644. "type": "object",
  20645. "properties": {
  20646. "sessionID": {
  20647. "type": "string",
  20648. "pattern": "^ses",
  20649. "description": "Session ID to navigate to"
  20650. }
  20651. },
  20652. "required": ["sessionID"],
  20653. "additionalProperties": false
  20654. }
  20655. },
  20656. "required": ["id", "type", "properties"],
  20657. "additionalProperties": false
  20658. },
  20659. "MoveSessionDestination": {
  20660. "type": "object",
  20661. "properties": {
  20662. "directory": {
  20663. "type": "string"
  20664. }
  20665. },
  20666. "required": ["directory"],
  20667. "additionalProperties": false
  20668. },
  20669. "ModelV2Info": {
  20670. "type": "object",
  20671. "properties": {
  20672. "id": {
  20673. "type": "string"
  20674. },
  20675. "providerID": {
  20676. "type": "string"
  20677. },
  20678. "family": {
  20679. "type": "string"
  20680. },
  20681. "name": {
  20682. "type": "string"
  20683. },
  20684. "api": {
  20685. "anyOf": [
  20686. {
  20687. "type": "object",
  20688. "properties": {
  20689. "id": {
  20690. "type": "string"
  20691. },
  20692. "type": {
  20693. "type": "string",
  20694. "enum": ["aisdk"]
  20695. },
  20696. "package": {
  20697. "type": "string"
  20698. },
  20699. "url": {
  20700. "type": "string"
  20701. },
  20702. "settings": {
  20703. "type": "object"
  20704. }
  20705. },
  20706. "required": ["id", "type", "package"],
  20707. "additionalProperties": false
  20708. },
  20709. {
  20710. "type": "object",
  20711. "properties": {
  20712. "id": {
  20713. "type": "string"
  20714. },
  20715. "type": {
  20716. "type": "string",
  20717. "enum": ["native"]
  20718. },
  20719. "url": {
  20720. "type": "string"
  20721. },
  20722. "settings": {
  20723. "type": "object"
  20724. }
  20725. },
  20726. "required": ["id", "type", "settings"],
  20727. "additionalProperties": false
  20728. }
  20729. ]
  20730. },
  20731. "capabilities": {
  20732. "type": "object",
  20733. "properties": {
  20734. "tools": {
  20735. "type": "boolean"
  20736. },
  20737. "input": {
  20738. "type": "array",
  20739. "items": {
  20740. "type": "string"
  20741. }
  20742. },
  20743. "output": {
  20744. "type": "array",
  20745. "items": {
  20746. "type": "string"
  20747. }
  20748. }
  20749. },
  20750. "required": ["tools", "input", "output"],
  20751. "additionalProperties": false
  20752. },
  20753. "request": {
  20754. "type": "object",
  20755. "properties": {
  20756. "headers": {
  20757. "type": "object",
  20758. "additionalProperties": {
  20759. "type": "string"
  20760. }
  20761. },
  20762. "body": {
  20763. "type": "object"
  20764. },
  20765. "variant": {
  20766. "type": "string"
  20767. }
  20768. },
  20769. "required": ["headers", "body"],
  20770. "additionalProperties": false
  20771. },
  20772. "variants": {
  20773. "type": "array",
  20774. "items": {
  20775. "type": "object",
  20776. "properties": {
  20777. "id": {
  20778. "type": "string"
  20779. },
  20780. "headers": {
  20781. "type": "object",
  20782. "additionalProperties": {
  20783. "type": "string"
  20784. }
  20785. },
  20786. "body": {
  20787. "type": "object"
  20788. }
  20789. },
  20790. "required": ["id", "headers", "body"],
  20791. "additionalProperties": false
  20792. }
  20793. },
  20794. "time": {
  20795. "type": "object",
  20796. "properties": {
  20797. "released": {
  20798. "anyOf": [
  20799. {
  20800. "type": "number"
  20801. },
  20802. {
  20803. "type": "string",
  20804. "enum": ["NaN"]
  20805. },
  20806. {
  20807. "type": "string",
  20808. "enum": ["Infinity"]
  20809. },
  20810. {
  20811. "type": "string",
  20812. "enum": ["-Infinity"]
  20813. },
  20814. {
  20815. "type": "string",
  20816. "enum": ["Infinity", "-Infinity", "NaN"]
  20817. }
  20818. ]
  20819. }
  20820. },
  20821. "required": ["released"],
  20822. "additionalProperties": false
  20823. },
  20824. "cost": {
  20825. "type": "array",
  20826. "items": {
  20827. "type": "object",
  20828. "properties": {
  20829. "tier": {
  20830. "type": "object",
  20831. "properties": {
  20832. "type": {
  20833. "type": "string",
  20834. "enum": ["context"]
  20835. },
  20836. "size": {
  20837. "type": "integer"
  20838. }
  20839. },
  20840. "required": ["type", "size"],
  20841. "additionalProperties": false
  20842. },
  20843. "input": {
  20844. "type": "number"
  20845. },
  20846. "output": {
  20847. "type": "number"
  20848. },
  20849. "cache": {
  20850. "type": "object",
  20851. "properties": {
  20852. "read": {
  20853. "type": "number"
  20854. },
  20855. "write": {
  20856. "type": "number"
  20857. }
  20858. },
  20859. "required": ["read", "write"],
  20860. "additionalProperties": false
  20861. }
  20862. },
  20863. "required": ["input", "output", "cache"],
  20864. "additionalProperties": false
  20865. }
  20866. },
  20867. "status": {
  20868. "type": "string",
  20869. "enum": ["alpha", "beta", "deprecated", "active"]
  20870. },
  20871. "enabled": {
  20872. "type": "boolean"
  20873. },
  20874. "limit": {
  20875. "type": "object",
  20876. "properties": {
  20877. "context": {
  20878. "type": "integer"
  20879. },
  20880. "input": {
  20881. "type": "integer"
  20882. },
  20883. "output": {
  20884. "type": "integer"
  20885. }
  20886. },
  20887. "required": ["context", "output"],
  20888. "additionalProperties": false
  20889. }
  20890. },
  20891. "required": [
  20892. "id",
  20893. "providerID",
  20894. "name",
  20895. "api",
  20896. "capabilities",
  20897. "request",
  20898. "variants",
  20899. "time",
  20900. "cost",
  20901. "status",
  20902. "enabled",
  20903. "limit"
  20904. ],
  20905. "additionalProperties": false
  20906. },
  20907. "LocationRef": {
  20908. "type": "object",
  20909. "properties": {
  20910. "directory": {
  20911. "type": "string"
  20912. },
  20913. "workspaceID": {
  20914. "type": "string",
  20915. "pattern": "^wrk"
  20916. }
  20917. },
  20918. "required": ["directory"],
  20919. "additionalProperties": false
  20920. },
  20921. "PromptSource": {
  20922. "type": "object",
  20923. "properties": {
  20924. "start": {
  20925. "type": "number"
  20926. },
  20927. "end": {
  20928. "type": "number"
  20929. },
  20930. "text": {
  20931. "type": "string"
  20932. }
  20933. },
  20934. "required": ["start", "end", "text"],
  20935. "additionalProperties": false
  20936. },
  20937. "PromptFileAttachment": {
  20938. "type": "object",
  20939. "properties": {
  20940. "uri": {
  20941. "type": "string"
  20942. },
  20943. "mime": {
  20944. "type": "string"
  20945. },
  20946. "name": {
  20947. "type": "string"
  20948. },
  20949. "description": {
  20950. "type": "string"
  20951. },
  20952. "source": {
  20953. "$ref": "#/components/schemas/PromptSource"
  20954. }
  20955. },
  20956. "required": ["uri", "mime"],
  20957. "additionalProperties": false
  20958. },
  20959. "PromptAgentAttachment": {
  20960. "type": "object",
  20961. "properties": {
  20962. "name": {
  20963. "type": "string"
  20964. },
  20965. "source": {
  20966. "$ref": "#/components/schemas/PromptSource"
  20967. }
  20968. },
  20969. "required": ["name"],
  20970. "additionalProperties": false
  20971. },
  20972. "PromptReferenceAttachment": {
  20973. "type": "object",
  20974. "properties": {
  20975. "name": {
  20976. "type": "string"
  20977. },
  20978. "kind": {
  20979. "type": "string",
  20980. "enum": ["local", "git", "invalid"]
  20981. },
  20982. "uri": {
  20983. "type": "string"
  20984. },
  20985. "repository": {
  20986. "type": "string"
  20987. },
  20988. "branch": {
  20989. "type": "string"
  20990. },
  20991. "target": {
  20992. "type": "string"
  20993. },
  20994. "targetUri": {
  20995. "type": "string"
  20996. },
  20997. "problem": {
  20998. "type": "string"
  20999. },
  21000. "source": {
  21001. "$ref": "#/components/schemas/PromptSource"
  21002. }
  21003. },
  21004. "required": ["name", "kind"],
  21005. "additionalProperties": false
  21006. },
  21007. "SessionErrorUnknown": {
  21008. "type": "object",
  21009. "properties": {
  21010. "type": {
  21011. "type": "string",
  21012. "enum": ["unknown"]
  21013. },
  21014. "message": {
  21015. "type": "string"
  21016. }
  21017. },
  21018. "required": ["type", "message"],
  21019. "additionalProperties": false
  21020. },
  21021. "ToolTextContent": {
  21022. "type": "object",
  21023. "properties": {
  21024. "type": {
  21025. "type": "string",
  21026. "enum": ["text"]
  21027. },
  21028. "text": {
  21029. "type": "string"
  21030. }
  21031. },
  21032. "required": ["type", "text"],
  21033. "additionalProperties": false
  21034. },
  21035. "ToolFileContent": {
  21036. "type": "object",
  21037. "properties": {
  21038. "type": {
  21039. "type": "string",
  21040. "enum": ["file"]
  21041. },
  21042. "source": {
  21043. "anyOf": [
  21044. {
  21045. "type": "object",
  21046. "properties": {
  21047. "type": {
  21048. "type": "string",
  21049. "enum": ["data"]
  21050. },
  21051. "data": {
  21052. "type": "string"
  21053. }
  21054. },
  21055. "required": ["type", "data"],
  21056. "additionalProperties": false
  21057. },
  21058. {
  21059. "type": "object",
  21060. "properties": {
  21061. "type": {
  21062. "type": "string",
  21063. "enum": ["url"]
  21064. },
  21065. "url": {
  21066. "type": "string"
  21067. }
  21068. },
  21069. "required": ["type", "url"],
  21070. "additionalProperties": false
  21071. },
  21072. {
  21073. "type": "object",
  21074. "properties": {
  21075. "type": {
  21076. "type": "string",
  21077. "enum": ["file"]
  21078. },
  21079. "uri": {
  21080. "type": "string"
  21081. }
  21082. },
  21083. "required": ["type", "uri"],
  21084. "additionalProperties": false
  21085. }
  21086. ]
  21087. },
  21088. "mime": {
  21089. "type": "string"
  21090. },
  21091. "name": {
  21092. "type": "string"
  21093. }
  21094. },
  21095. "required": ["type", "source", "mime"],
  21096. "additionalProperties": false
  21097. },
  21098. "SessionNextRetry_error": {
  21099. "type": "object",
  21100. "properties": {
  21101. "message": {
  21102. "type": "string"
  21103. },
  21104. "statusCode": {
  21105. "type": "number"
  21106. },
  21107. "isRetryable": {
  21108. "type": "boolean"
  21109. },
  21110. "responseHeaders": {
  21111. "type": "object",
  21112. "additionalProperties": {
  21113. "type": "string"
  21114. }
  21115. },
  21116. "responseBody": {
  21117. "type": "string"
  21118. },
  21119. "metadata": {
  21120. "type": "object",
  21121. "additionalProperties": {
  21122. "type": "string"
  21123. }
  21124. }
  21125. },
  21126. "required": ["message", "isRetryable"],
  21127. "additionalProperties": false
  21128. },
  21129. "AuthOAuthCredential": {
  21130. "type": "object",
  21131. "properties": {
  21132. "type": {
  21133. "type": "string",
  21134. "enum": ["oauth"]
  21135. },
  21136. "refresh": {
  21137. "type": "string"
  21138. },
  21139. "access": {
  21140. "type": "string"
  21141. },
  21142. "expires": {
  21143. "type": "integer",
  21144. "minimum": 0
  21145. }
  21146. },
  21147. "required": ["type", "refresh", "access", "expires"],
  21148. "additionalProperties": false
  21149. },
  21150. "AuthApiKeyCredential": {
  21151. "type": "object",
  21152. "properties": {
  21153. "type": {
  21154. "type": "string",
  21155. "enum": ["api"]
  21156. },
  21157. "key": {
  21158. "type": "string"
  21159. },
  21160. "metadata": {
  21161. "type": "object",
  21162. "additionalProperties": {
  21163. "type": "string"
  21164. }
  21165. }
  21166. },
  21167. "required": ["type", "key"],
  21168. "additionalProperties": false
  21169. },
  21170. "AuthCredential": {
  21171. "anyOf": [
  21172. {
  21173. "$ref": "#/components/schemas/AuthOAuthCredential"
  21174. },
  21175. {
  21176. "$ref": "#/components/schemas/AuthApiKeyCredential"
  21177. }
  21178. ]
  21179. },
  21180. "AuthInfo": {
  21181. "type": "object",
  21182. "properties": {
  21183. "id": {
  21184. "type": "string"
  21185. },
  21186. "serviceID": {
  21187. "type": "string"
  21188. },
  21189. "description": {
  21190. "type": "string"
  21191. },
  21192. "credential": {
  21193. "$ref": "#/components/schemas/AuthCredential"
  21194. }
  21195. },
  21196. "required": ["id", "serviceID", "description", "credential"],
  21197. "additionalProperties": false
  21198. },
  21199. "PermissionV2Source": {
  21200. "type": "object",
  21201. "properties": {
  21202. "type": {
  21203. "type": "string",
  21204. "enum": ["tool"]
  21205. },
  21206. "messageID": {
  21207. "type": "string"
  21208. },
  21209. "callID": {
  21210. "type": "string"
  21211. }
  21212. },
  21213. "required": ["type", "messageID", "callID"],
  21214. "additionalProperties": false
  21215. },
  21216. "PermissionV2Reply": {
  21217. "type": "string",
  21218. "enum": ["once", "always", "reject"]
  21219. },
  21220. "QuestionV2Option": {
  21221. "type": "object",
  21222. "properties": {
  21223. "label": {
  21224. "type": "string",
  21225. "description": "Display text (1-5 words, concise)"
  21226. },
  21227. "description": {
  21228. "type": "string",
  21229. "description": "Explanation of choice"
  21230. }
  21231. },
  21232. "required": ["label", "description"],
  21233. "additionalProperties": false
  21234. },
  21235. "QuestionV2Info": {
  21236. "type": "object",
  21237. "properties": {
  21238. "question": {
  21239. "type": "string",
  21240. "description": "Complete question"
  21241. },
  21242. "header": {
  21243. "type": "string",
  21244. "description": "Very short label (max 30 chars)"
  21245. },
  21246. "options": {
  21247. "type": "array",
  21248. "items": {
  21249. "$ref": "#/components/schemas/QuestionV2Option"
  21250. },
  21251. "description": "Available choices"
  21252. },
  21253. "multiple": {
  21254. "type": "boolean"
  21255. },
  21256. "custom": {
  21257. "type": "boolean"
  21258. }
  21259. },
  21260. "required": ["question", "header", "options"],
  21261. "additionalProperties": false
  21262. },
  21263. "QuestionV2Tool": {
  21264. "type": "object",
  21265. "properties": {
  21266. "messageID": {
  21267. "type": "string"
  21268. },
  21269. "callID": {
  21270. "type": "string"
  21271. }
  21272. },
  21273. "required": ["messageID", "callID"],
  21274. "additionalProperties": false
  21275. },
  21276. "QuestionV2Answer": {
  21277. "type": "array",
  21278. "items": {
  21279. "type": "string"
  21280. }
  21281. },
  21282. "EventServerInstanceDisposed": {
  21283. "type": "object",
  21284. "properties": {
  21285. "id": {
  21286. "type": "string"
  21287. },
  21288. "type": {
  21289. "type": "string",
  21290. "enum": ["server.instance.disposed"]
  21291. },
  21292. "properties": {
  21293. "type": "object",
  21294. "properties": {
  21295. "directory": {
  21296. "type": "string"
  21297. }
  21298. },
  21299. "required": ["directory"],
  21300. "additionalProperties": false
  21301. }
  21302. },
  21303. "required": ["id", "type", "properties"],
  21304. "additionalProperties": false
  21305. },
  21306. "SyncEventSessionCreated": {
  21307. "type": "object",
  21308. "properties": {
  21309. "type": {
  21310. "type": "string",
  21311. "enum": ["sync"]
  21312. },
  21313. "id": {
  21314. "type": "string",
  21315. "pattern": "^evt_"
  21316. },
  21317. "syncEvent": {
  21318. "type": "object",
  21319. "properties": {
  21320. "type": {
  21321. "type": "string",
  21322. "enum": ["session.created.1"]
  21323. },
  21324. "id": {
  21325. "type": "string",
  21326. "pattern": "^evt_"
  21327. },
  21328. "seq": {
  21329. "type": "number"
  21330. },
  21331. "aggregateID": {
  21332. "type": "string"
  21333. },
  21334. "data": {
  21335. "type": "object",
  21336. "properties": {
  21337. "sessionID": {
  21338. "type": "string",
  21339. "pattern": "^ses"
  21340. },
  21341. "info": {
  21342. "$ref": "#/components/schemas/Session"
  21343. }
  21344. },
  21345. "required": ["sessionID", "info"],
  21346. "additionalProperties": false
  21347. }
  21348. },
  21349. "required": ["type", "id", "seq", "aggregateID", "data"],
  21350. "additionalProperties": false
  21351. }
  21352. },
  21353. "required": ["type", "id", "syncEvent"],
  21354. "additionalProperties": false
  21355. },
  21356. "SyncEventSessionUpdated": {
  21357. "type": "object",
  21358. "properties": {
  21359. "type": {
  21360. "type": "string",
  21361. "enum": ["sync"]
  21362. },
  21363. "id": {
  21364. "type": "string",
  21365. "pattern": "^evt_"
  21366. },
  21367. "syncEvent": {
  21368. "type": "object",
  21369. "properties": {
  21370. "type": {
  21371. "type": "string",
  21372. "enum": ["session.updated.1"]
  21373. },
  21374. "id": {
  21375. "type": "string",
  21376. "pattern": "^evt_"
  21377. },
  21378. "seq": {
  21379. "type": "number"
  21380. },
  21381. "aggregateID": {
  21382. "type": "string"
  21383. },
  21384. "data": {
  21385. "type": "object",
  21386. "properties": {
  21387. "sessionID": {
  21388. "type": "string",
  21389. "pattern": "^ses"
  21390. },
  21391. "info": {
  21392. "$ref": "#/components/schemas/Session"
  21393. }
  21394. },
  21395. "required": ["sessionID", "info"],
  21396. "additionalProperties": false
  21397. }
  21398. },
  21399. "required": ["type", "id", "seq", "aggregateID", "data"],
  21400. "additionalProperties": false
  21401. }
  21402. },
  21403. "required": ["type", "id", "syncEvent"],
  21404. "additionalProperties": false
  21405. },
  21406. "SyncEventSessionDeleted": {
  21407. "type": "object",
  21408. "properties": {
  21409. "type": {
  21410. "type": "string",
  21411. "enum": ["sync"]
  21412. },
  21413. "id": {
  21414. "type": "string",
  21415. "pattern": "^evt_"
  21416. },
  21417. "syncEvent": {
  21418. "type": "object",
  21419. "properties": {
  21420. "type": {
  21421. "type": "string",
  21422. "enum": ["session.deleted.1"]
  21423. },
  21424. "id": {
  21425. "type": "string",
  21426. "pattern": "^evt_"
  21427. },
  21428. "seq": {
  21429. "type": "number"
  21430. },
  21431. "aggregateID": {
  21432. "type": "string"
  21433. },
  21434. "data": {
  21435. "type": "object",
  21436. "properties": {
  21437. "sessionID": {
  21438. "type": "string",
  21439. "pattern": "^ses"
  21440. },
  21441. "info": {
  21442. "$ref": "#/components/schemas/Session"
  21443. }
  21444. },
  21445. "required": ["sessionID", "info"],
  21446. "additionalProperties": false
  21447. }
  21448. },
  21449. "required": ["type", "id", "seq", "aggregateID", "data"],
  21450. "additionalProperties": false
  21451. }
  21452. },
  21453. "required": ["type", "id", "syncEvent"],
  21454. "additionalProperties": false
  21455. },
  21456. "SyncEventMessageUpdated": {
  21457. "type": "object",
  21458. "properties": {
  21459. "type": {
  21460. "type": "string",
  21461. "enum": ["sync"]
  21462. },
  21463. "id": {
  21464. "type": "string",
  21465. "pattern": "^evt_"
  21466. },
  21467. "syncEvent": {
  21468. "type": "object",
  21469. "properties": {
  21470. "type": {
  21471. "type": "string",
  21472. "enum": ["message.updated.1"]
  21473. },
  21474. "id": {
  21475. "type": "string",
  21476. "pattern": "^evt_"
  21477. },
  21478. "seq": {
  21479. "type": "number"
  21480. },
  21481. "aggregateID": {
  21482. "type": "string"
  21483. },
  21484. "data": {
  21485. "type": "object",
  21486. "properties": {
  21487. "sessionID": {
  21488. "type": "string",
  21489. "pattern": "^ses"
  21490. },
  21491. "info": {
  21492. "$ref": "#/components/schemas/Message"
  21493. }
  21494. },
  21495. "required": ["sessionID", "info"],
  21496. "additionalProperties": false
  21497. }
  21498. },
  21499. "required": ["type", "id", "seq", "aggregateID", "data"],
  21500. "additionalProperties": false
  21501. }
  21502. },
  21503. "required": ["type", "id", "syncEvent"],
  21504. "additionalProperties": false
  21505. },
  21506. "SyncEventMessageRemoved": {
  21507. "type": "object",
  21508. "properties": {
  21509. "type": {
  21510. "type": "string",
  21511. "enum": ["sync"]
  21512. },
  21513. "id": {
  21514. "type": "string",
  21515. "pattern": "^evt_"
  21516. },
  21517. "syncEvent": {
  21518. "type": "object",
  21519. "properties": {
  21520. "type": {
  21521. "type": "string",
  21522. "enum": ["message.removed.1"]
  21523. },
  21524. "id": {
  21525. "type": "string",
  21526. "pattern": "^evt_"
  21527. },
  21528. "seq": {
  21529. "type": "number"
  21530. },
  21531. "aggregateID": {
  21532. "type": "string"
  21533. },
  21534. "data": {
  21535. "type": "object",
  21536. "properties": {
  21537. "sessionID": {
  21538. "type": "string",
  21539. "pattern": "^ses"
  21540. },
  21541. "messageID": {
  21542. "type": "string",
  21543. "pattern": "^msg"
  21544. }
  21545. },
  21546. "required": ["sessionID", "messageID"],
  21547. "additionalProperties": false
  21548. }
  21549. },
  21550. "required": ["type", "id", "seq", "aggregateID", "data"],
  21551. "additionalProperties": false
  21552. }
  21553. },
  21554. "required": ["type", "id", "syncEvent"],
  21555. "additionalProperties": false
  21556. },
  21557. "SyncEventMessagePartUpdated": {
  21558. "type": "object",
  21559. "properties": {
  21560. "type": {
  21561. "type": "string",
  21562. "enum": ["sync"]
  21563. },
  21564. "id": {
  21565. "type": "string",
  21566. "pattern": "^evt_"
  21567. },
  21568. "syncEvent": {
  21569. "type": "object",
  21570. "properties": {
  21571. "type": {
  21572. "type": "string",
  21573. "enum": ["message.part.updated.1"]
  21574. },
  21575. "id": {
  21576. "type": "string",
  21577. "pattern": "^evt_"
  21578. },
  21579. "seq": {
  21580. "type": "number"
  21581. },
  21582. "aggregateID": {
  21583. "type": "string"
  21584. },
  21585. "data": {
  21586. "type": "object",
  21587. "properties": {
  21588. "sessionID": {
  21589. "type": "string",
  21590. "pattern": "^ses"
  21591. },
  21592. "part": {
  21593. "$ref": "#/components/schemas/Part"
  21594. },
  21595. "time": {
  21596. "type": "number"
  21597. }
  21598. },
  21599. "required": ["sessionID", "part", "time"],
  21600. "additionalProperties": false
  21601. }
  21602. },
  21603. "required": ["type", "id", "seq", "aggregateID", "data"],
  21604. "additionalProperties": false
  21605. }
  21606. },
  21607. "required": ["type", "id", "syncEvent"],
  21608. "additionalProperties": false
  21609. },
  21610. "SyncEventMessagePartRemoved": {
  21611. "type": "object",
  21612. "properties": {
  21613. "type": {
  21614. "type": "string",
  21615. "enum": ["sync"]
  21616. },
  21617. "id": {
  21618. "type": "string",
  21619. "pattern": "^evt_"
  21620. },
  21621. "syncEvent": {
  21622. "type": "object",
  21623. "properties": {
  21624. "type": {
  21625. "type": "string",
  21626. "enum": ["message.part.removed.1"]
  21627. },
  21628. "id": {
  21629. "type": "string",
  21630. "pattern": "^evt_"
  21631. },
  21632. "seq": {
  21633. "type": "number"
  21634. },
  21635. "aggregateID": {
  21636. "type": "string"
  21637. },
  21638. "data": {
  21639. "type": "object",
  21640. "properties": {
  21641. "sessionID": {
  21642. "type": "string",
  21643. "pattern": "^ses"
  21644. },
  21645. "messageID": {
  21646. "type": "string",
  21647. "pattern": "^msg"
  21648. },
  21649. "partID": {
  21650. "type": "string",
  21651. "pattern": "^prt"
  21652. }
  21653. },
  21654. "required": ["sessionID", "messageID", "partID"],
  21655. "additionalProperties": false
  21656. }
  21657. },
  21658. "required": ["type", "id", "seq", "aggregateID", "data"],
  21659. "additionalProperties": false
  21660. }
  21661. },
  21662. "required": ["type", "id", "syncEvent"],
  21663. "additionalProperties": false
  21664. },
  21665. "SyncEventSessionNextAgentSwitched": {
  21666. "type": "object",
  21667. "properties": {
  21668. "type": {
  21669. "type": "string",
  21670. "enum": ["sync"]
  21671. },
  21672. "id": {
  21673. "type": "string",
  21674. "pattern": "^evt_"
  21675. },
  21676. "syncEvent": {
  21677. "type": "object",
  21678. "properties": {
  21679. "type": {
  21680. "type": "string",
  21681. "enum": ["session.next.agent.switched.1"]
  21682. },
  21683. "id": {
  21684. "type": "string",
  21685. "pattern": "^evt_"
  21686. },
  21687. "seq": {
  21688. "type": "number"
  21689. },
  21690. "aggregateID": {
  21691. "type": "string"
  21692. },
  21693. "data": {
  21694. "type": "object",
  21695. "properties": {
  21696. "timestamp": {
  21697. "type": "number"
  21698. },
  21699. "sessionID": {
  21700. "type": "string",
  21701. "pattern": "^ses"
  21702. },
  21703. "messageID": {
  21704. "type": "string",
  21705. "pattern": "^msg_"
  21706. },
  21707. "agent": {
  21708. "type": "string"
  21709. }
  21710. },
  21711. "required": ["timestamp", "sessionID", "messageID", "agent"],
  21712. "additionalProperties": false
  21713. }
  21714. },
  21715. "required": ["type", "id", "seq", "aggregateID", "data"],
  21716. "additionalProperties": false
  21717. }
  21718. },
  21719. "required": ["type", "id", "syncEvent"],
  21720. "additionalProperties": false
  21721. },
  21722. "SyncEventSessionNextModelSwitched": {
  21723. "type": "object",
  21724. "properties": {
  21725. "type": {
  21726. "type": "string",
  21727. "enum": ["sync"]
  21728. },
  21729. "id": {
  21730. "type": "string",
  21731. "pattern": "^evt_"
  21732. },
  21733. "syncEvent": {
  21734. "type": "object",
  21735. "properties": {
  21736. "type": {
  21737. "type": "string",
  21738. "enum": ["session.next.model.switched.1"]
  21739. },
  21740. "id": {
  21741. "type": "string",
  21742. "pattern": "^evt_"
  21743. },
  21744. "seq": {
  21745. "type": "number"
  21746. },
  21747. "aggregateID": {
  21748. "type": "string"
  21749. },
  21750. "data": {
  21751. "type": "object",
  21752. "properties": {
  21753. "timestamp": {
  21754. "type": "number"
  21755. },
  21756. "sessionID": {
  21757. "type": "string",
  21758. "pattern": "^ses"
  21759. },
  21760. "messageID": {
  21761. "type": "string",
  21762. "pattern": "^msg_"
  21763. },
  21764. "model": {
  21765. "type": "object",
  21766. "properties": {
  21767. "id": {
  21768. "type": "string"
  21769. },
  21770. "providerID": {
  21771. "type": "string"
  21772. },
  21773. "variant": {
  21774. "type": "string"
  21775. }
  21776. },
  21777. "required": ["id", "providerID"],
  21778. "additionalProperties": false
  21779. }
  21780. },
  21781. "required": ["timestamp", "sessionID", "messageID", "model"],
  21782. "additionalProperties": false
  21783. }
  21784. },
  21785. "required": ["type", "id", "seq", "aggregateID", "data"],
  21786. "additionalProperties": false
  21787. }
  21788. },
  21789. "required": ["type", "id", "syncEvent"],
  21790. "additionalProperties": false
  21791. },
  21792. "SyncEventSessionNextMoved": {
  21793. "type": "object",
  21794. "properties": {
  21795. "type": {
  21796. "type": "string",
  21797. "enum": ["sync"]
  21798. },
  21799. "id": {
  21800. "type": "string",
  21801. "pattern": "^evt_"
  21802. },
  21803. "syncEvent": {
  21804. "type": "object",
  21805. "properties": {
  21806. "type": {
  21807. "type": "string",
  21808. "enum": ["session.next.moved.1"]
  21809. },
  21810. "id": {
  21811. "type": "string",
  21812. "pattern": "^evt_"
  21813. },
  21814. "seq": {
  21815. "type": "number"
  21816. },
  21817. "aggregateID": {
  21818. "type": "string"
  21819. },
  21820. "data": {
  21821. "type": "object",
  21822. "properties": {
  21823. "timestamp": {
  21824. "type": "number"
  21825. },
  21826. "sessionID": {
  21827. "type": "string",
  21828. "pattern": "^ses"
  21829. },
  21830. "location": {
  21831. "$ref": "#/components/schemas/LocationRef"
  21832. },
  21833. "subdirectory": {
  21834. "type": "string"
  21835. }
  21836. },
  21837. "required": ["timestamp", "sessionID", "location"],
  21838. "additionalProperties": false
  21839. }
  21840. },
  21841. "required": ["type", "id", "seq", "aggregateID", "data"],
  21842. "additionalProperties": false
  21843. }
  21844. },
  21845. "required": ["type", "id", "syncEvent"],
  21846. "additionalProperties": false
  21847. },
  21848. "SyncEventSessionNextPrompted": {
  21849. "type": "object",
  21850. "properties": {
  21851. "type": {
  21852. "type": "string",
  21853. "enum": ["sync"]
  21854. },
  21855. "id": {
  21856. "type": "string",
  21857. "pattern": "^evt_"
  21858. },
  21859. "syncEvent": {
  21860. "type": "object",
  21861. "properties": {
  21862. "type": {
  21863. "type": "string",
  21864. "enum": ["session.next.prompted.1"]
  21865. },
  21866. "id": {
  21867. "type": "string",
  21868. "pattern": "^evt_"
  21869. },
  21870. "seq": {
  21871. "type": "number"
  21872. },
  21873. "aggregateID": {
  21874. "type": "string"
  21875. },
  21876. "data": {
  21877. "type": "object",
  21878. "properties": {
  21879. "timestamp": {
  21880. "type": "number"
  21881. },
  21882. "sessionID": {
  21883. "type": "string",
  21884. "pattern": "^ses"
  21885. },
  21886. "messageID": {
  21887. "type": "string",
  21888. "pattern": "^msg_"
  21889. },
  21890. "prompt": {
  21891. "$ref": "#/components/schemas/Prompt"
  21892. },
  21893. "delivery": {
  21894. "type": "string",
  21895. "enum": ["steer", "queue"]
  21896. }
  21897. },
  21898. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  21899. "additionalProperties": false
  21900. }
  21901. },
  21902. "required": ["type", "id", "seq", "aggregateID", "data"],
  21903. "additionalProperties": false
  21904. }
  21905. },
  21906. "required": ["type", "id", "syncEvent"],
  21907. "additionalProperties": false
  21908. },
  21909. "SyncEventSessionNextPromptAdmitted": {
  21910. "type": "object",
  21911. "properties": {
  21912. "type": {
  21913. "type": "string",
  21914. "enum": ["sync"]
  21915. },
  21916. "id": {
  21917. "type": "string",
  21918. "pattern": "^evt_"
  21919. },
  21920. "syncEvent": {
  21921. "type": "object",
  21922. "properties": {
  21923. "type": {
  21924. "type": "string",
  21925. "enum": ["session.next.prompt.admitted.1"]
  21926. },
  21927. "id": {
  21928. "type": "string",
  21929. "pattern": "^evt_"
  21930. },
  21931. "seq": {
  21932. "type": "number"
  21933. },
  21934. "aggregateID": {
  21935. "type": "string"
  21936. },
  21937. "data": {
  21938. "type": "object",
  21939. "properties": {
  21940. "timestamp": {
  21941. "type": "number"
  21942. },
  21943. "sessionID": {
  21944. "type": "string",
  21945. "pattern": "^ses"
  21946. },
  21947. "messageID": {
  21948. "type": "string",
  21949. "pattern": "^msg_"
  21950. },
  21951. "prompt": {
  21952. "$ref": "#/components/schemas/Prompt"
  21953. },
  21954. "delivery": {
  21955. "type": "string",
  21956. "enum": ["steer", "queue"]
  21957. }
  21958. },
  21959. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  21960. "additionalProperties": false
  21961. }
  21962. },
  21963. "required": ["type", "id", "seq", "aggregateID", "data"],
  21964. "additionalProperties": false
  21965. }
  21966. },
  21967. "required": ["type", "id", "syncEvent"],
  21968. "additionalProperties": false
  21969. },
  21970. "SyncEventSessionNextPromptPromoted": {
  21971. "type": "object",
  21972. "properties": {
  21973. "type": {
  21974. "type": "string",
  21975. "enum": ["sync"]
  21976. },
  21977. "id": {
  21978. "type": "string",
  21979. "pattern": "^evt_"
  21980. },
  21981. "syncEvent": {
  21982. "type": "object",
  21983. "properties": {
  21984. "type": {
  21985. "type": "string",
  21986. "enum": ["session.next.prompt.promoted.1"]
  21987. },
  21988. "id": {
  21989. "type": "string",
  21990. "pattern": "^evt_"
  21991. },
  21992. "seq": {
  21993. "type": "number"
  21994. },
  21995. "aggregateID": {
  21996. "type": "string"
  21997. },
  21998. "data": {
  21999. "type": "object",
  22000. "properties": {
  22001. "timestamp": {
  22002. "type": "number"
  22003. },
  22004. "sessionID": {
  22005. "type": "string",
  22006. "pattern": "^ses"
  22007. },
  22008. "messageID": {
  22009. "type": "string",
  22010. "pattern": "^msg_"
  22011. },
  22012. "prompt": {
  22013. "$ref": "#/components/schemas/Prompt"
  22014. },
  22015. "timeCreated": {
  22016. "type": "number"
  22017. }
  22018. },
  22019. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  22020. "additionalProperties": false
  22021. }
  22022. },
  22023. "required": ["type", "id", "seq", "aggregateID", "data"],
  22024. "additionalProperties": false
  22025. }
  22026. },
  22027. "required": ["type", "id", "syncEvent"],
  22028. "additionalProperties": false
  22029. },
  22030. "SyncEventSessionNextInterruptRequested": {
  22031. "type": "object",
  22032. "properties": {
  22033. "type": {
  22034. "type": "string",
  22035. "enum": ["sync"]
  22036. },
  22037. "id": {
  22038. "type": "string",
  22039. "pattern": "^evt_"
  22040. },
  22041. "syncEvent": {
  22042. "type": "object",
  22043. "properties": {
  22044. "type": {
  22045. "type": "string",
  22046. "enum": ["session.next.interrupt.requested.1"]
  22047. },
  22048. "id": {
  22049. "type": "string",
  22050. "pattern": "^evt_"
  22051. },
  22052. "seq": {
  22053. "type": "number"
  22054. },
  22055. "aggregateID": {
  22056. "type": "string"
  22057. },
  22058. "data": {
  22059. "type": "object",
  22060. "properties": {
  22061. "timestamp": {
  22062. "type": "number"
  22063. },
  22064. "sessionID": {
  22065. "type": "string",
  22066. "pattern": "^ses"
  22067. }
  22068. },
  22069. "required": ["timestamp", "sessionID"],
  22070. "additionalProperties": false
  22071. }
  22072. },
  22073. "required": ["type", "id", "seq", "aggregateID", "data"],
  22074. "additionalProperties": false
  22075. }
  22076. },
  22077. "required": ["type", "id", "syncEvent"],
  22078. "additionalProperties": false
  22079. },
  22080. "SyncEventSessionNextContextUpdated": {
  22081. "type": "object",
  22082. "properties": {
  22083. "type": {
  22084. "type": "string",
  22085. "enum": ["sync"]
  22086. },
  22087. "id": {
  22088. "type": "string",
  22089. "pattern": "^evt_"
  22090. },
  22091. "syncEvent": {
  22092. "type": "object",
  22093. "properties": {
  22094. "type": {
  22095. "type": "string",
  22096. "enum": ["session.next.context.updated.1"]
  22097. },
  22098. "id": {
  22099. "type": "string",
  22100. "pattern": "^evt_"
  22101. },
  22102. "seq": {
  22103. "type": "number"
  22104. },
  22105. "aggregateID": {
  22106. "type": "string"
  22107. },
  22108. "data": {
  22109. "type": "object",
  22110. "properties": {
  22111. "timestamp": {
  22112. "type": "number"
  22113. },
  22114. "sessionID": {
  22115. "type": "string",
  22116. "pattern": "^ses"
  22117. },
  22118. "messageID": {
  22119. "type": "string",
  22120. "pattern": "^msg_"
  22121. },
  22122. "text": {
  22123. "type": "string"
  22124. }
  22125. },
  22126. "required": ["timestamp", "sessionID", "messageID", "text"],
  22127. "additionalProperties": false
  22128. }
  22129. },
  22130. "required": ["type", "id", "seq", "aggregateID", "data"],
  22131. "additionalProperties": false
  22132. }
  22133. },
  22134. "required": ["type", "id", "syncEvent"],
  22135. "additionalProperties": false
  22136. },
  22137. "SyncEventSessionNextSynthetic": {
  22138. "type": "object",
  22139. "properties": {
  22140. "type": {
  22141. "type": "string",
  22142. "enum": ["sync"]
  22143. },
  22144. "id": {
  22145. "type": "string",
  22146. "pattern": "^evt_"
  22147. },
  22148. "syncEvent": {
  22149. "type": "object",
  22150. "properties": {
  22151. "type": {
  22152. "type": "string",
  22153. "enum": ["session.next.synthetic.1"]
  22154. },
  22155. "id": {
  22156. "type": "string",
  22157. "pattern": "^evt_"
  22158. },
  22159. "seq": {
  22160. "type": "number"
  22161. },
  22162. "aggregateID": {
  22163. "type": "string"
  22164. },
  22165. "data": {
  22166. "type": "object",
  22167. "properties": {
  22168. "timestamp": {
  22169. "type": "number"
  22170. },
  22171. "sessionID": {
  22172. "type": "string",
  22173. "pattern": "^ses"
  22174. },
  22175. "messageID": {
  22176. "type": "string",
  22177. "pattern": "^msg_"
  22178. },
  22179. "text": {
  22180. "type": "string"
  22181. }
  22182. },
  22183. "required": ["timestamp", "sessionID", "messageID", "text"],
  22184. "additionalProperties": false
  22185. }
  22186. },
  22187. "required": ["type", "id", "seq", "aggregateID", "data"],
  22188. "additionalProperties": false
  22189. }
  22190. },
  22191. "required": ["type", "id", "syncEvent"],
  22192. "additionalProperties": false
  22193. },
  22194. "SyncEventSessionNextShellStarted": {
  22195. "type": "object",
  22196. "properties": {
  22197. "type": {
  22198. "type": "string",
  22199. "enum": ["sync"]
  22200. },
  22201. "id": {
  22202. "type": "string",
  22203. "pattern": "^evt_"
  22204. },
  22205. "syncEvent": {
  22206. "type": "object",
  22207. "properties": {
  22208. "type": {
  22209. "type": "string",
  22210. "enum": ["session.next.shell.started.1"]
  22211. },
  22212. "id": {
  22213. "type": "string",
  22214. "pattern": "^evt_"
  22215. },
  22216. "seq": {
  22217. "type": "number"
  22218. },
  22219. "aggregateID": {
  22220. "type": "string"
  22221. },
  22222. "data": {
  22223. "type": "object",
  22224. "properties": {
  22225. "timestamp": {
  22226. "type": "number"
  22227. },
  22228. "sessionID": {
  22229. "type": "string",
  22230. "pattern": "^ses"
  22231. },
  22232. "messageID": {
  22233. "type": "string",
  22234. "pattern": "^msg_"
  22235. },
  22236. "callID": {
  22237. "type": "string"
  22238. },
  22239. "command": {
  22240. "type": "string"
  22241. }
  22242. },
  22243. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  22244. "additionalProperties": false
  22245. }
  22246. },
  22247. "required": ["type", "id", "seq", "aggregateID", "data"],
  22248. "additionalProperties": false
  22249. }
  22250. },
  22251. "required": ["type", "id", "syncEvent"],
  22252. "additionalProperties": false
  22253. },
  22254. "SyncEventSessionNextShellEnded": {
  22255. "type": "object",
  22256. "properties": {
  22257. "type": {
  22258. "type": "string",
  22259. "enum": ["sync"]
  22260. },
  22261. "id": {
  22262. "type": "string",
  22263. "pattern": "^evt_"
  22264. },
  22265. "syncEvent": {
  22266. "type": "object",
  22267. "properties": {
  22268. "type": {
  22269. "type": "string",
  22270. "enum": ["session.next.shell.ended.1"]
  22271. },
  22272. "id": {
  22273. "type": "string",
  22274. "pattern": "^evt_"
  22275. },
  22276. "seq": {
  22277. "type": "number"
  22278. },
  22279. "aggregateID": {
  22280. "type": "string"
  22281. },
  22282. "data": {
  22283. "type": "object",
  22284. "properties": {
  22285. "timestamp": {
  22286. "type": "number"
  22287. },
  22288. "sessionID": {
  22289. "type": "string",
  22290. "pattern": "^ses"
  22291. },
  22292. "callID": {
  22293. "type": "string"
  22294. },
  22295. "output": {
  22296. "type": "string"
  22297. }
  22298. },
  22299. "required": ["timestamp", "sessionID", "callID", "output"],
  22300. "additionalProperties": false
  22301. }
  22302. },
  22303. "required": ["type", "id", "seq", "aggregateID", "data"],
  22304. "additionalProperties": false
  22305. }
  22306. },
  22307. "required": ["type", "id", "syncEvent"],
  22308. "additionalProperties": false
  22309. },
  22310. "SyncEventSessionNextStepStarted": {
  22311. "type": "object",
  22312. "properties": {
  22313. "type": {
  22314. "type": "string",
  22315. "enum": ["sync"]
  22316. },
  22317. "id": {
  22318. "type": "string",
  22319. "pattern": "^evt_"
  22320. },
  22321. "syncEvent": {
  22322. "type": "object",
  22323. "properties": {
  22324. "type": {
  22325. "type": "string",
  22326. "enum": ["session.next.step.started.1"]
  22327. },
  22328. "id": {
  22329. "type": "string",
  22330. "pattern": "^evt_"
  22331. },
  22332. "seq": {
  22333. "type": "number"
  22334. },
  22335. "aggregateID": {
  22336. "type": "string"
  22337. },
  22338. "data": {
  22339. "type": "object",
  22340. "properties": {
  22341. "timestamp": {
  22342. "type": "number"
  22343. },
  22344. "sessionID": {
  22345. "type": "string",
  22346. "pattern": "^ses"
  22347. },
  22348. "assistantMessageID": {
  22349. "type": "string",
  22350. "pattern": "^msg_"
  22351. },
  22352. "agent": {
  22353. "type": "string"
  22354. },
  22355. "model": {
  22356. "type": "object",
  22357. "properties": {
  22358. "id": {
  22359. "type": "string"
  22360. },
  22361. "providerID": {
  22362. "type": "string"
  22363. },
  22364. "variant": {
  22365. "type": "string"
  22366. }
  22367. },
  22368. "required": ["id", "providerID"],
  22369. "additionalProperties": false
  22370. },
  22371. "snapshot": {
  22372. "type": "string"
  22373. }
  22374. },
  22375. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  22376. "additionalProperties": false
  22377. }
  22378. },
  22379. "required": ["type", "id", "seq", "aggregateID", "data"],
  22380. "additionalProperties": false
  22381. }
  22382. },
  22383. "required": ["type", "id", "syncEvent"],
  22384. "additionalProperties": false
  22385. },
  22386. "SyncEventSessionNextStepEnded": {
  22387. "type": "object",
  22388. "properties": {
  22389. "type": {
  22390. "type": "string",
  22391. "enum": ["sync"]
  22392. },
  22393. "id": {
  22394. "type": "string",
  22395. "pattern": "^evt_"
  22396. },
  22397. "syncEvent": {
  22398. "type": "object",
  22399. "properties": {
  22400. "type": {
  22401. "type": "string",
  22402. "enum": ["session.next.step.ended.2"]
  22403. },
  22404. "id": {
  22405. "type": "string",
  22406. "pattern": "^evt_"
  22407. },
  22408. "seq": {
  22409. "type": "number"
  22410. },
  22411. "aggregateID": {
  22412. "type": "string"
  22413. },
  22414. "data": {
  22415. "type": "object",
  22416. "properties": {
  22417. "timestamp": {
  22418. "type": "number"
  22419. },
  22420. "sessionID": {
  22421. "type": "string",
  22422. "pattern": "^ses"
  22423. },
  22424. "assistantMessageID": {
  22425. "type": "string",
  22426. "pattern": "^msg_"
  22427. },
  22428. "finish": {
  22429. "type": "string"
  22430. },
  22431. "cost": {
  22432. "type": "number"
  22433. },
  22434. "tokens": {
  22435. "type": "object",
  22436. "properties": {
  22437. "input": {
  22438. "type": "number"
  22439. },
  22440. "output": {
  22441. "type": "number"
  22442. },
  22443. "reasoning": {
  22444. "type": "number"
  22445. },
  22446. "cache": {
  22447. "type": "object",
  22448. "properties": {
  22449. "read": {
  22450. "type": "number"
  22451. },
  22452. "write": {
  22453. "type": "number"
  22454. }
  22455. },
  22456. "required": ["read", "write"],
  22457. "additionalProperties": false
  22458. }
  22459. },
  22460. "required": ["input", "output", "reasoning", "cache"],
  22461. "additionalProperties": false
  22462. },
  22463. "snapshot": {
  22464. "type": "string"
  22465. }
  22466. },
  22467. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  22468. "additionalProperties": false
  22469. }
  22470. },
  22471. "required": ["type", "id", "seq", "aggregateID", "data"],
  22472. "additionalProperties": false
  22473. }
  22474. },
  22475. "required": ["type", "id", "syncEvent"],
  22476. "additionalProperties": false
  22477. },
  22478. "SyncEventSessionNextStepFailed": {
  22479. "type": "object",
  22480. "properties": {
  22481. "type": {
  22482. "type": "string",
  22483. "enum": ["sync"]
  22484. },
  22485. "id": {
  22486. "type": "string",
  22487. "pattern": "^evt_"
  22488. },
  22489. "syncEvent": {
  22490. "type": "object",
  22491. "properties": {
  22492. "type": {
  22493. "type": "string",
  22494. "enum": ["session.next.step.failed.2"]
  22495. },
  22496. "id": {
  22497. "type": "string",
  22498. "pattern": "^evt_"
  22499. },
  22500. "seq": {
  22501. "type": "number"
  22502. },
  22503. "aggregateID": {
  22504. "type": "string"
  22505. },
  22506. "data": {
  22507. "type": "object",
  22508. "properties": {
  22509. "timestamp": {
  22510. "type": "number"
  22511. },
  22512. "sessionID": {
  22513. "type": "string",
  22514. "pattern": "^ses"
  22515. },
  22516. "assistantMessageID": {
  22517. "type": "string",
  22518. "pattern": "^msg_"
  22519. },
  22520. "error": {
  22521. "$ref": "#/components/schemas/SessionErrorUnknown"
  22522. }
  22523. },
  22524. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  22525. "additionalProperties": false
  22526. }
  22527. },
  22528. "required": ["type", "id", "seq", "aggregateID", "data"],
  22529. "additionalProperties": false
  22530. }
  22531. },
  22532. "required": ["type", "id", "syncEvent"],
  22533. "additionalProperties": false
  22534. },
  22535. "SyncEventSessionNextTextStarted": {
  22536. "type": "object",
  22537. "properties": {
  22538. "type": {
  22539. "type": "string",
  22540. "enum": ["sync"]
  22541. },
  22542. "id": {
  22543. "type": "string",
  22544. "pattern": "^evt_"
  22545. },
  22546. "syncEvent": {
  22547. "type": "object",
  22548. "properties": {
  22549. "type": {
  22550. "type": "string",
  22551. "enum": ["session.next.text.started.1"]
  22552. },
  22553. "id": {
  22554. "type": "string",
  22555. "pattern": "^evt_"
  22556. },
  22557. "seq": {
  22558. "type": "number"
  22559. },
  22560. "aggregateID": {
  22561. "type": "string"
  22562. },
  22563. "data": {
  22564. "type": "object",
  22565. "properties": {
  22566. "timestamp": {
  22567. "type": "number"
  22568. },
  22569. "sessionID": {
  22570. "type": "string",
  22571. "pattern": "^ses"
  22572. },
  22573. "assistantMessageID": {
  22574. "type": "string",
  22575. "pattern": "^msg_"
  22576. },
  22577. "textID": {
  22578. "type": "string"
  22579. }
  22580. },
  22581. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  22582. "additionalProperties": false
  22583. }
  22584. },
  22585. "required": ["type", "id", "seq", "aggregateID", "data"],
  22586. "additionalProperties": false
  22587. }
  22588. },
  22589. "required": ["type", "id", "syncEvent"],
  22590. "additionalProperties": false
  22591. },
  22592. "SyncEventSessionNextTextEnded": {
  22593. "type": "object",
  22594. "properties": {
  22595. "type": {
  22596. "type": "string",
  22597. "enum": ["sync"]
  22598. },
  22599. "id": {
  22600. "type": "string",
  22601. "pattern": "^evt_"
  22602. },
  22603. "syncEvent": {
  22604. "type": "object",
  22605. "properties": {
  22606. "type": {
  22607. "type": "string",
  22608. "enum": ["session.next.text.ended.1"]
  22609. },
  22610. "id": {
  22611. "type": "string",
  22612. "pattern": "^evt_"
  22613. },
  22614. "seq": {
  22615. "type": "number"
  22616. },
  22617. "aggregateID": {
  22618. "type": "string"
  22619. },
  22620. "data": {
  22621. "type": "object",
  22622. "properties": {
  22623. "timestamp": {
  22624. "type": "number"
  22625. },
  22626. "sessionID": {
  22627. "type": "string",
  22628. "pattern": "^ses"
  22629. },
  22630. "assistantMessageID": {
  22631. "type": "string",
  22632. "pattern": "^msg_"
  22633. },
  22634. "textID": {
  22635. "type": "string"
  22636. },
  22637. "text": {
  22638. "type": "string"
  22639. }
  22640. },
  22641. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  22642. "additionalProperties": false
  22643. }
  22644. },
  22645. "required": ["type", "id", "seq", "aggregateID", "data"],
  22646. "additionalProperties": false
  22647. }
  22648. },
  22649. "required": ["type", "id", "syncEvent"],
  22650. "additionalProperties": false
  22651. },
  22652. "SyncEventSessionNextReasoningStarted": {
  22653. "type": "object",
  22654. "properties": {
  22655. "type": {
  22656. "type": "string",
  22657. "enum": ["sync"]
  22658. },
  22659. "id": {
  22660. "type": "string",
  22661. "pattern": "^evt_"
  22662. },
  22663. "syncEvent": {
  22664. "type": "object",
  22665. "properties": {
  22666. "type": {
  22667. "type": "string",
  22668. "enum": ["session.next.reasoning.started.1"]
  22669. },
  22670. "id": {
  22671. "type": "string",
  22672. "pattern": "^evt_"
  22673. },
  22674. "seq": {
  22675. "type": "number"
  22676. },
  22677. "aggregateID": {
  22678. "type": "string"
  22679. },
  22680. "data": {
  22681. "type": "object",
  22682. "properties": {
  22683. "timestamp": {
  22684. "type": "number"
  22685. },
  22686. "sessionID": {
  22687. "type": "string",
  22688. "pattern": "^ses"
  22689. },
  22690. "assistantMessageID": {
  22691. "type": "string",
  22692. "pattern": "^msg_"
  22693. },
  22694. "reasoningID": {
  22695. "type": "string"
  22696. },
  22697. "providerMetadata": {
  22698. "type": "object",
  22699. "additionalProperties": {
  22700. "type": "object"
  22701. }
  22702. }
  22703. },
  22704. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  22705. "additionalProperties": false
  22706. }
  22707. },
  22708. "required": ["type", "id", "seq", "aggregateID", "data"],
  22709. "additionalProperties": false
  22710. }
  22711. },
  22712. "required": ["type", "id", "syncEvent"],
  22713. "additionalProperties": false
  22714. },
  22715. "SyncEventSessionNextReasoningEnded": {
  22716. "type": "object",
  22717. "properties": {
  22718. "type": {
  22719. "type": "string",
  22720. "enum": ["sync"]
  22721. },
  22722. "id": {
  22723. "type": "string",
  22724. "pattern": "^evt_"
  22725. },
  22726. "syncEvent": {
  22727. "type": "object",
  22728. "properties": {
  22729. "type": {
  22730. "type": "string",
  22731. "enum": ["session.next.reasoning.ended.1"]
  22732. },
  22733. "id": {
  22734. "type": "string",
  22735. "pattern": "^evt_"
  22736. },
  22737. "seq": {
  22738. "type": "number"
  22739. },
  22740. "aggregateID": {
  22741. "type": "string"
  22742. },
  22743. "data": {
  22744. "type": "object",
  22745. "properties": {
  22746. "timestamp": {
  22747. "type": "number"
  22748. },
  22749. "sessionID": {
  22750. "type": "string",
  22751. "pattern": "^ses"
  22752. },
  22753. "assistantMessageID": {
  22754. "type": "string",
  22755. "pattern": "^msg_"
  22756. },
  22757. "reasoningID": {
  22758. "type": "string"
  22759. },
  22760. "text": {
  22761. "type": "string"
  22762. },
  22763. "providerMetadata": {
  22764. "type": "object",
  22765. "additionalProperties": {
  22766. "type": "object"
  22767. }
  22768. }
  22769. },
  22770. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  22771. "additionalProperties": false
  22772. }
  22773. },
  22774. "required": ["type", "id", "seq", "aggregateID", "data"],
  22775. "additionalProperties": false
  22776. }
  22777. },
  22778. "required": ["type", "id", "syncEvent"],
  22779. "additionalProperties": false
  22780. },
  22781. "SyncEventSessionNextToolInputStarted": {
  22782. "type": "object",
  22783. "properties": {
  22784. "type": {
  22785. "type": "string",
  22786. "enum": ["sync"]
  22787. },
  22788. "id": {
  22789. "type": "string",
  22790. "pattern": "^evt_"
  22791. },
  22792. "syncEvent": {
  22793. "type": "object",
  22794. "properties": {
  22795. "type": {
  22796. "type": "string",
  22797. "enum": ["session.next.tool.input.started.1"]
  22798. },
  22799. "id": {
  22800. "type": "string",
  22801. "pattern": "^evt_"
  22802. },
  22803. "seq": {
  22804. "type": "number"
  22805. },
  22806. "aggregateID": {
  22807. "type": "string"
  22808. },
  22809. "data": {
  22810. "type": "object",
  22811. "properties": {
  22812. "timestamp": {
  22813. "type": "number"
  22814. },
  22815. "sessionID": {
  22816. "type": "string",
  22817. "pattern": "^ses"
  22818. },
  22819. "assistantMessageID": {
  22820. "type": "string",
  22821. "pattern": "^msg_"
  22822. },
  22823. "callID": {
  22824. "type": "string"
  22825. },
  22826. "name": {
  22827. "type": "string"
  22828. }
  22829. },
  22830. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  22831. "additionalProperties": false
  22832. }
  22833. },
  22834. "required": ["type", "id", "seq", "aggregateID", "data"],
  22835. "additionalProperties": false
  22836. }
  22837. },
  22838. "required": ["type", "id", "syncEvent"],
  22839. "additionalProperties": false
  22840. },
  22841. "SyncEventSessionNextToolInputEnded": {
  22842. "type": "object",
  22843. "properties": {
  22844. "type": {
  22845. "type": "string",
  22846. "enum": ["sync"]
  22847. },
  22848. "id": {
  22849. "type": "string",
  22850. "pattern": "^evt_"
  22851. },
  22852. "syncEvent": {
  22853. "type": "object",
  22854. "properties": {
  22855. "type": {
  22856. "type": "string",
  22857. "enum": ["session.next.tool.input.ended.1"]
  22858. },
  22859. "id": {
  22860. "type": "string",
  22861. "pattern": "^evt_"
  22862. },
  22863. "seq": {
  22864. "type": "number"
  22865. },
  22866. "aggregateID": {
  22867. "type": "string"
  22868. },
  22869. "data": {
  22870. "type": "object",
  22871. "properties": {
  22872. "timestamp": {
  22873. "type": "number"
  22874. },
  22875. "sessionID": {
  22876. "type": "string",
  22877. "pattern": "^ses"
  22878. },
  22879. "assistantMessageID": {
  22880. "type": "string",
  22881. "pattern": "^msg_"
  22882. },
  22883. "callID": {
  22884. "type": "string"
  22885. },
  22886. "text": {
  22887. "type": "string"
  22888. }
  22889. },
  22890. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  22891. "additionalProperties": false
  22892. }
  22893. },
  22894. "required": ["type", "id", "seq", "aggregateID", "data"],
  22895. "additionalProperties": false
  22896. }
  22897. },
  22898. "required": ["type", "id", "syncEvent"],
  22899. "additionalProperties": false
  22900. },
  22901. "SyncEventSessionNextToolCalled": {
  22902. "type": "object",
  22903. "properties": {
  22904. "type": {
  22905. "type": "string",
  22906. "enum": ["sync"]
  22907. },
  22908. "id": {
  22909. "type": "string",
  22910. "pattern": "^evt_"
  22911. },
  22912. "syncEvent": {
  22913. "type": "object",
  22914. "properties": {
  22915. "type": {
  22916. "type": "string",
  22917. "enum": ["session.next.tool.called.1"]
  22918. },
  22919. "id": {
  22920. "type": "string",
  22921. "pattern": "^evt_"
  22922. },
  22923. "seq": {
  22924. "type": "number"
  22925. },
  22926. "aggregateID": {
  22927. "type": "string"
  22928. },
  22929. "data": {
  22930. "type": "object",
  22931. "properties": {
  22932. "timestamp": {
  22933. "type": "number"
  22934. },
  22935. "sessionID": {
  22936. "type": "string",
  22937. "pattern": "^ses"
  22938. },
  22939. "assistantMessageID": {
  22940. "type": "string",
  22941. "pattern": "^msg_"
  22942. },
  22943. "callID": {
  22944. "type": "string"
  22945. },
  22946. "tool": {
  22947. "type": "string"
  22948. },
  22949. "input": {
  22950. "type": "object"
  22951. },
  22952. "provider": {
  22953. "type": "object",
  22954. "properties": {
  22955. "executed": {
  22956. "type": "boolean"
  22957. },
  22958. "metadata": {
  22959. "type": "object",
  22960. "additionalProperties": {
  22961. "type": "object"
  22962. }
  22963. }
  22964. },
  22965. "required": ["executed"],
  22966. "additionalProperties": false
  22967. }
  22968. },
  22969. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  22970. "additionalProperties": false
  22971. }
  22972. },
  22973. "required": ["type", "id", "seq", "aggregateID", "data"],
  22974. "additionalProperties": false
  22975. }
  22976. },
  22977. "required": ["type", "id", "syncEvent"],
  22978. "additionalProperties": false
  22979. },
  22980. "SyncEventSessionNextToolProgress": {
  22981. "type": "object",
  22982. "properties": {
  22983. "type": {
  22984. "type": "string",
  22985. "enum": ["sync"]
  22986. },
  22987. "id": {
  22988. "type": "string",
  22989. "pattern": "^evt_"
  22990. },
  22991. "syncEvent": {
  22992. "type": "object",
  22993. "properties": {
  22994. "type": {
  22995. "type": "string",
  22996. "enum": ["session.next.tool.progress.1"]
  22997. },
  22998. "id": {
  22999. "type": "string",
  23000. "pattern": "^evt_"
  23001. },
  23002. "seq": {
  23003. "type": "number"
  23004. },
  23005. "aggregateID": {
  23006. "type": "string"
  23007. },
  23008. "data": {
  23009. "type": "object",
  23010. "properties": {
  23011. "timestamp": {
  23012. "type": "number"
  23013. },
  23014. "sessionID": {
  23015. "type": "string",
  23016. "pattern": "^ses"
  23017. },
  23018. "assistantMessageID": {
  23019. "type": "string",
  23020. "pattern": "^msg_"
  23021. },
  23022. "callID": {
  23023. "type": "string"
  23024. },
  23025. "structured": {
  23026. "type": "object"
  23027. },
  23028. "content": {
  23029. "type": "array",
  23030. "items": {
  23031. "anyOf": [
  23032. {
  23033. "$ref": "#/components/schemas/ToolTextContent"
  23034. },
  23035. {
  23036. "$ref": "#/components/schemas/ToolFileContent"
  23037. }
  23038. ]
  23039. }
  23040. }
  23041. },
  23042. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  23043. "additionalProperties": false
  23044. }
  23045. },
  23046. "required": ["type", "id", "seq", "aggregateID", "data"],
  23047. "additionalProperties": false
  23048. }
  23049. },
  23050. "required": ["type", "id", "syncEvent"],
  23051. "additionalProperties": false
  23052. },
  23053. "SyncEventSessionNextToolSuccess": {
  23054. "type": "object",
  23055. "properties": {
  23056. "type": {
  23057. "type": "string",
  23058. "enum": ["sync"]
  23059. },
  23060. "id": {
  23061. "type": "string",
  23062. "pattern": "^evt_"
  23063. },
  23064. "syncEvent": {
  23065. "type": "object",
  23066. "properties": {
  23067. "type": {
  23068. "type": "string",
  23069. "enum": ["session.next.tool.success.1"]
  23070. },
  23071. "id": {
  23072. "type": "string",
  23073. "pattern": "^evt_"
  23074. },
  23075. "seq": {
  23076. "type": "number"
  23077. },
  23078. "aggregateID": {
  23079. "type": "string"
  23080. },
  23081. "data": {
  23082. "type": "object",
  23083. "properties": {
  23084. "timestamp": {
  23085. "type": "number"
  23086. },
  23087. "sessionID": {
  23088. "type": "string",
  23089. "pattern": "^ses"
  23090. },
  23091. "assistantMessageID": {
  23092. "type": "string",
  23093. "pattern": "^msg_"
  23094. },
  23095. "callID": {
  23096. "type": "string"
  23097. },
  23098. "structured": {
  23099. "type": "object"
  23100. },
  23101. "content": {
  23102. "type": "array",
  23103. "items": {
  23104. "anyOf": [
  23105. {
  23106. "$ref": "#/components/schemas/ToolTextContent"
  23107. },
  23108. {
  23109. "$ref": "#/components/schemas/ToolFileContent"
  23110. }
  23111. ]
  23112. }
  23113. },
  23114. "result": {},
  23115. "provider": {
  23116. "type": "object",
  23117. "properties": {
  23118. "executed": {
  23119. "type": "boolean"
  23120. },
  23121. "metadata": {
  23122. "type": "object",
  23123. "additionalProperties": {
  23124. "type": "object"
  23125. }
  23126. }
  23127. },
  23128. "required": ["executed"],
  23129. "additionalProperties": false
  23130. }
  23131. },
  23132. "required": [
  23133. "timestamp",
  23134. "sessionID",
  23135. "assistantMessageID",
  23136. "callID",
  23137. "structured",
  23138. "content",
  23139. "provider"
  23140. ],
  23141. "additionalProperties": false
  23142. }
  23143. },
  23144. "required": ["type", "id", "seq", "aggregateID", "data"],
  23145. "additionalProperties": false
  23146. }
  23147. },
  23148. "required": ["type", "id", "syncEvent"],
  23149. "additionalProperties": false
  23150. },
  23151. "SyncEventSessionNextToolFailed": {
  23152. "type": "object",
  23153. "properties": {
  23154. "type": {
  23155. "type": "string",
  23156. "enum": ["sync"]
  23157. },
  23158. "id": {
  23159. "type": "string",
  23160. "pattern": "^evt_"
  23161. },
  23162. "syncEvent": {
  23163. "type": "object",
  23164. "properties": {
  23165. "type": {
  23166. "type": "string",
  23167. "enum": ["session.next.tool.failed.1"]
  23168. },
  23169. "id": {
  23170. "type": "string",
  23171. "pattern": "^evt_"
  23172. },
  23173. "seq": {
  23174. "type": "number"
  23175. },
  23176. "aggregateID": {
  23177. "type": "string"
  23178. },
  23179. "data": {
  23180. "type": "object",
  23181. "properties": {
  23182. "timestamp": {
  23183. "type": "number"
  23184. },
  23185. "sessionID": {
  23186. "type": "string",
  23187. "pattern": "^ses"
  23188. },
  23189. "assistantMessageID": {
  23190. "type": "string",
  23191. "pattern": "^msg_"
  23192. },
  23193. "callID": {
  23194. "type": "string"
  23195. },
  23196. "error": {
  23197. "$ref": "#/components/schemas/SessionErrorUnknown"
  23198. },
  23199. "result": {},
  23200. "provider": {
  23201. "type": "object",
  23202. "properties": {
  23203. "executed": {
  23204. "type": "boolean"
  23205. },
  23206. "metadata": {
  23207. "type": "object",
  23208. "additionalProperties": {
  23209. "type": "object"
  23210. }
  23211. }
  23212. },
  23213. "required": ["executed"],
  23214. "additionalProperties": false
  23215. }
  23216. },
  23217. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  23218. "additionalProperties": false
  23219. }
  23220. },
  23221. "required": ["type", "id", "seq", "aggregateID", "data"],
  23222. "additionalProperties": false
  23223. }
  23224. },
  23225. "required": ["type", "id", "syncEvent"],
  23226. "additionalProperties": false
  23227. },
  23228. "SyncEventSessionNextRetried": {
  23229. "type": "object",
  23230. "properties": {
  23231. "type": {
  23232. "type": "string",
  23233. "enum": ["sync"]
  23234. },
  23235. "id": {
  23236. "type": "string",
  23237. "pattern": "^evt_"
  23238. },
  23239. "syncEvent": {
  23240. "type": "object",
  23241. "properties": {
  23242. "type": {
  23243. "type": "string",
  23244. "enum": ["session.next.retried.1"]
  23245. },
  23246. "id": {
  23247. "type": "string",
  23248. "pattern": "^evt_"
  23249. },
  23250. "seq": {
  23251. "type": "number"
  23252. },
  23253. "aggregateID": {
  23254. "type": "string"
  23255. },
  23256. "data": {
  23257. "type": "object",
  23258. "properties": {
  23259. "timestamp": {
  23260. "type": "number"
  23261. },
  23262. "sessionID": {
  23263. "type": "string",
  23264. "pattern": "^ses"
  23265. },
  23266. "attempt": {
  23267. "type": "number"
  23268. },
  23269. "error": {
  23270. "$ref": "#/components/schemas/SessionNextRetry_error"
  23271. }
  23272. },
  23273. "required": ["timestamp", "sessionID", "attempt", "error"],
  23274. "additionalProperties": false
  23275. }
  23276. },
  23277. "required": ["type", "id", "seq", "aggregateID", "data"],
  23278. "additionalProperties": false
  23279. }
  23280. },
  23281. "required": ["type", "id", "syncEvent"],
  23282. "additionalProperties": false
  23283. },
  23284. "SyncEventSessionNextCompactionStarted": {
  23285. "type": "object",
  23286. "properties": {
  23287. "type": {
  23288. "type": "string",
  23289. "enum": ["sync"]
  23290. },
  23291. "id": {
  23292. "type": "string",
  23293. "pattern": "^evt_"
  23294. },
  23295. "syncEvent": {
  23296. "type": "object",
  23297. "properties": {
  23298. "type": {
  23299. "type": "string",
  23300. "enum": ["session.next.compaction.started.1"]
  23301. },
  23302. "id": {
  23303. "type": "string",
  23304. "pattern": "^evt_"
  23305. },
  23306. "seq": {
  23307. "type": "number"
  23308. },
  23309. "aggregateID": {
  23310. "type": "string"
  23311. },
  23312. "data": {
  23313. "type": "object",
  23314. "properties": {
  23315. "timestamp": {
  23316. "type": "number"
  23317. },
  23318. "sessionID": {
  23319. "type": "string",
  23320. "pattern": "^ses"
  23321. },
  23322. "messageID": {
  23323. "type": "string",
  23324. "pattern": "^msg_"
  23325. },
  23326. "reason": {
  23327. "type": "string",
  23328. "enum": ["auto", "manual"]
  23329. }
  23330. },
  23331. "required": ["timestamp", "sessionID", "messageID", "reason"],
  23332. "additionalProperties": false
  23333. }
  23334. },
  23335. "required": ["type", "id", "seq", "aggregateID", "data"],
  23336. "additionalProperties": false
  23337. }
  23338. },
  23339. "required": ["type", "id", "syncEvent"],
  23340. "additionalProperties": false
  23341. },
  23342. "SyncEventSessionNextCompactionEnded": {
  23343. "type": "object",
  23344. "properties": {
  23345. "type": {
  23346. "type": "string",
  23347. "enum": ["sync"]
  23348. },
  23349. "id": {
  23350. "type": "string",
  23351. "pattern": "^evt_"
  23352. },
  23353. "syncEvent": {
  23354. "type": "object",
  23355. "properties": {
  23356. "type": {
  23357. "type": "string",
  23358. "enum": ["session.next.compaction.ended.2"]
  23359. },
  23360. "id": {
  23361. "type": "string",
  23362. "pattern": "^evt_"
  23363. },
  23364. "seq": {
  23365. "type": "number"
  23366. },
  23367. "aggregateID": {
  23368. "type": "string"
  23369. },
  23370. "data": {
  23371. "type": "object",
  23372. "properties": {
  23373. "timestamp": {
  23374. "type": "number"
  23375. },
  23376. "sessionID": {
  23377. "type": "string",
  23378. "pattern": "^ses"
  23379. },
  23380. "messageID": {
  23381. "type": "string",
  23382. "pattern": "^msg_"
  23383. },
  23384. "reason": {
  23385. "type": "string",
  23386. "enum": ["auto", "manual"]
  23387. },
  23388. "text": {
  23389. "type": "string"
  23390. },
  23391. "recent": {
  23392. "type": "string"
  23393. }
  23394. },
  23395. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  23396. "additionalProperties": false
  23397. }
  23398. },
  23399. "required": ["type", "id", "seq", "aggregateID", "data"],
  23400. "additionalProperties": false
  23401. }
  23402. },
  23403. "required": ["type", "id", "syncEvent"],
  23404. "additionalProperties": false
  23405. },
  23406. "PolicyEffect": {
  23407. "type": "string",
  23408. "enum": ["allow", "deny"]
  23409. },
  23410. "ConfigV2ExperimentalPolicy": {
  23411. "type": "object",
  23412. "properties": {
  23413. "action": {
  23414. "type": "string",
  23415. "enum": ["provider.use"]
  23416. },
  23417. "effect": {
  23418. "$ref": "#/components/schemas/PolicyEffect"
  23419. },
  23420. "resource": {
  23421. "type": "string"
  23422. }
  23423. },
  23424. "required": ["action", "effect", "resource"],
  23425. "additionalProperties": false
  23426. },
  23427. "ProjectDirectories": {
  23428. "type": "array",
  23429. "items": {
  23430. "type": "string"
  23431. }
  23432. },
  23433. "ProjectCopyCopy": {
  23434. "type": "object",
  23435. "properties": {
  23436. "directory": {
  23437. "type": "string"
  23438. }
  23439. },
  23440. "required": ["directory"],
  23441. "additionalProperties": false
  23442. },
  23443. "LocationInfo": {
  23444. "type": "object",
  23445. "properties": {
  23446. "directory": {
  23447. "type": "string"
  23448. },
  23449. "workspaceID": {
  23450. "type": "string",
  23451. "pattern": "^wrk"
  23452. },
  23453. "project": {
  23454. "type": "object",
  23455. "properties": {
  23456. "id": {
  23457. "type": "string"
  23458. },
  23459. "directory": {
  23460. "type": "string"
  23461. }
  23462. },
  23463. "required": ["id", "directory"],
  23464. "additionalProperties": false
  23465. }
  23466. },
  23467. "required": ["directory", "project"],
  23468. "additionalProperties": false
  23469. },
  23470. "PermissionV2Effect": {
  23471. "type": "string",
  23472. "enum": ["allow", "deny", "ask"]
  23473. },
  23474. "PermissionV2Rule": {
  23475. "type": "object",
  23476. "properties": {
  23477. "action": {
  23478. "type": "string"
  23479. },
  23480. "resource": {
  23481. "type": "string"
  23482. },
  23483. "effect": {
  23484. "$ref": "#/components/schemas/PermissionV2Effect"
  23485. }
  23486. },
  23487. "required": ["action", "resource", "effect"],
  23488. "additionalProperties": false
  23489. },
  23490. "PermissionV2Ruleset": {
  23491. "type": "array",
  23492. "items": {
  23493. "$ref": "#/components/schemas/PermissionV2Rule"
  23494. }
  23495. },
  23496. "AgentV2Info": {
  23497. "type": "object",
  23498. "properties": {
  23499. "id": {
  23500. "type": "string"
  23501. },
  23502. "model": {
  23503. "type": "object",
  23504. "properties": {
  23505. "id": {
  23506. "type": "string"
  23507. },
  23508. "providerID": {
  23509. "type": "string"
  23510. },
  23511. "variant": {
  23512. "type": "string"
  23513. }
  23514. },
  23515. "required": ["id", "providerID"],
  23516. "additionalProperties": false
  23517. },
  23518. "request": {
  23519. "type": "object",
  23520. "properties": {
  23521. "headers": {
  23522. "type": "object",
  23523. "additionalProperties": {
  23524. "type": "string"
  23525. }
  23526. },
  23527. "body": {
  23528. "type": "object"
  23529. }
  23530. },
  23531. "required": ["headers", "body"],
  23532. "additionalProperties": false
  23533. },
  23534. "system": {
  23535. "type": "string"
  23536. },
  23537. "description": {
  23538. "type": "string"
  23539. },
  23540. "mode": {
  23541. "type": "string",
  23542. "enum": ["subagent", "primary", "all"]
  23543. },
  23544. "hidden": {
  23545. "type": "boolean"
  23546. },
  23547. "color": {
  23548. "anyOf": [
  23549. {
  23550. "type": "string",
  23551. "pattern": "^#[0-9a-fA-F]{6}$"
  23552. },
  23553. {
  23554. "type": "string",
  23555. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  23556. }
  23557. ]
  23558. },
  23559. "steps": {
  23560. "type": "integer",
  23561. "exclusiveMinimum": 0
  23562. },
  23563. "permissions": {
  23564. "$ref": "#/components/schemas/PermissionV2Ruleset"
  23565. }
  23566. },
  23567. "required": ["id", "request", "mode", "hidden", "permissions"],
  23568. "additionalProperties": false
  23569. },
  23570. "SessionV2Info": {
  23571. "type": "object",
  23572. "properties": {
  23573. "id": {
  23574. "type": "string",
  23575. "pattern": "^ses"
  23576. },
  23577. "parentID": {
  23578. "type": "string",
  23579. "pattern": "^ses"
  23580. },
  23581. "projectID": {
  23582. "type": "string"
  23583. },
  23584. "agent": {
  23585. "type": "string"
  23586. },
  23587. "model": {
  23588. "type": "object",
  23589. "properties": {
  23590. "id": {
  23591. "type": "string"
  23592. },
  23593. "providerID": {
  23594. "type": "string"
  23595. },
  23596. "variant": {
  23597. "type": "string"
  23598. }
  23599. },
  23600. "required": ["id", "providerID"],
  23601. "additionalProperties": false
  23602. },
  23603. "cost": {
  23604. "type": "number"
  23605. },
  23606. "tokens": {
  23607. "type": "object",
  23608. "properties": {
  23609. "input": {
  23610. "type": "number"
  23611. },
  23612. "output": {
  23613. "type": "number"
  23614. },
  23615. "reasoning": {
  23616. "type": "number"
  23617. },
  23618. "cache": {
  23619. "type": "object",
  23620. "properties": {
  23621. "read": {
  23622. "type": "number"
  23623. },
  23624. "write": {
  23625. "type": "number"
  23626. }
  23627. },
  23628. "required": ["read", "write"],
  23629. "additionalProperties": false
  23630. }
  23631. },
  23632. "required": ["input", "output", "reasoning", "cache"],
  23633. "additionalProperties": false
  23634. },
  23635. "time": {
  23636. "type": "object",
  23637. "properties": {
  23638. "created": {
  23639. "type": "number"
  23640. },
  23641. "updated": {
  23642. "type": "number"
  23643. },
  23644. "archived": {
  23645. "type": "number"
  23646. }
  23647. },
  23648. "required": ["created", "updated"],
  23649. "additionalProperties": false
  23650. },
  23651. "title": {
  23652. "type": "string"
  23653. },
  23654. "location": {
  23655. "$ref": "#/components/schemas/LocationRef"
  23656. },
  23657. "subpath": {
  23658. "type": "string"
  23659. }
  23660. },
  23661. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  23662. "additionalProperties": false
  23663. },
  23664. "SessionInputAdmitted": {
  23665. "type": "object",
  23666. "properties": {
  23667. "admittedSeq": {
  23668. "type": "integer",
  23669. "minimum": 0
  23670. },
  23671. "id": {
  23672. "type": "string",
  23673. "pattern": "^msg_"
  23674. },
  23675. "sessionID": {
  23676. "type": "string",
  23677. "pattern": "^ses"
  23678. },
  23679. "prompt": {
  23680. "$ref": "#/components/schemas/Prompt"
  23681. },
  23682. "delivery": {
  23683. "type": "string",
  23684. "enum": ["steer", "queue"]
  23685. },
  23686. "timeCreated": {
  23687. "type": "number"
  23688. },
  23689. "promotedSeq": {
  23690. "type": "integer",
  23691. "minimum": 0
  23692. }
  23693. },
  23694. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  23695. "additionalProperties": false
  23696. },
  23697. "SessionMessageAgentSwitched": {
  23698. "type": "object",
  23699. "properties": {
  23700. "id": {
  23701. "type": "string",
  23702. "pattern": "^msg_"
  23703. },
  23704. "metadata": {
  23705. "type": "object"
  23706. },
  23707. "time": {
  23708. "type": "object",
  23709. "properties": {
  23710. "created": {
  23711. "type": "number"
  23712. }
  23713. },
  23714. "required": ["created"],
  23715. "additionalProperties": false
  23716. },
  23717. "type": {
  23718. "type": "string",
  23719. "enum": ["agent-switched"]
  23720. },
  23721. "agent": {
  23722. "type": "string"
  23723. }
  23724. },
  23725. "required": ["id", "time", "type", "agent"],
  23726. "additionalProperties": false
  23727. },
  23728. "SessionMessageModelSwitched": {
  23729. "type": "object",
  23730. "properties": {
  23731. "id": {
  23732. "type": "string",
  23733. "pattern": "^msg_"
  23734. },
  23735. "metadata": {
  23736. "type": "object"
  23737. },
  23738. "time": {
  23739. "type": "object",
  23740. "properties": {
  23741. "created": {
  23742. "type": "number"
  23743. }
  23744. },
  23745. "required": ["created"],
  23746. "additionalProperties": false
  23747. },
  23748. "type": {
  23749. "type": "string",
  23750. "enum": ["model-switched"]
  23751. },
  23752. "model": {
  23753. "type": "object",
  23754. "properties": {
  23755. "id": {
  23756. "type": "string"
  23757. },
  23758. "providerID": {
  23759. "type": "string"
  23760. },
  23761. "variant": {
  23762. "type": "string"
  23763. }
  23764. },
  23765. "required": ["id", "providerID"],
  23766. "additionalProperties": false
  23767. }
  23768. },
  23769. "required": ["id", "time", "type", "model"],
  23770. "additionalProperties": false
  23771. },
  23772. "SessionMessageUser": {
  23773. "type": "object",
  23774. "properties": {
  23775. "id": {
  23776. "type": "string",
  23777. "pattern": "^msg_"
  23778. },
  23779. "metadata": {
  23780. "type": "object"
  23781. },
  23782. "time": {
  23783. "type": "object",
  23784. "properties": {
  23785. "created": {
  23786. "type": "number"
  23787. }
  23788. },
  23789. "required": ["created"],
  23790. "additionalProperties": false
  23791. },
  23792. "text": {
  23793. "type": "string"
  23794. },
  23795. "files": {
  23796. "type": "array",
  23797. "items": {
  23798. "$ref": "#/components/schemas/PromptFileAttachment"
  23799. }
  23800. },
  23801. "agents": {
  23802. "type": "array",
  23803. "items": {
  23804. "$ref": "#/components/schemas/PromptAgentAttachment"
  23805. }
  23806. },
  23807. "references": {
  23808. "type": "array",
  23809. "items": {
  23810. "$ref": "#/components/schemas/PromptReferenceAttachment"
  23811. }
  23812. },
  23813. "type": {
  23814. "type": "string",
  23815. "enum": ["user"]
  23816. }
  23817. },
  23818. "required": ["id", "time", "text", "type"],
  23819. "additionalProperties": false
  23820. },
  23821. "SessionMessageSynthetic": {
  23822. "type": "object",
  23823. "properties": {
  23824. "id": {
  23825. "type": "string",
  23826. "pattern": "^msg_"
  23827. },
  23828. "metadata": {
  23829. "type": "object"
  23830. },
  23831. "time": {
  23832. "type": "object",
  23833. "properties": {
  23834. "created": {
  23835. "type": "number"
  23836. }
  23837. },
  23838. "required": ["created"],
  23839. "additionalProperties": false
  23840. },
  23841. "sessionID": {
  23842. "type": "string",
  23843. "pattern": "^ses"
  23844. },
  23845. "text": {
  23846. "type": "string"
  23847. },
  23848. "type": {
  23849. "type": "string",
  23850. "enum": ["synthetic"]
  23851. }
  23852. },
  23853. "required": ["id", "time", "sessionID", "text", "type"],
  23854. "additionalProperties": false
  23855. },
  23856. "SessionMessageSystem": {
  23857. "type": "object",
  23858. "properties": {
  23859. "id": {
  23860. "type": "string",
  23861. "pattern": "^msg_"
  23862. },
  23863. "metadata": {
  23864. "type": "object"
  23865. },
  23866. "time": {
  23867. "type": "object",
  23868. "properties": {
  23869. "created": {
  23870. "type": "number"
  23871. }
  23872. },
  23873. "required": ["created"],
  23874. "additionalProperties": false
  23875. },
  23876. "type": {
  23877. "type": "string",
  23878. "enum": ["system"]
  23879. },
  23880. "text": {
  23881. "type": "string"
  23882. }
  23883. },
  23884. "required": ["id", "time", "type", "text"],
  23885. "additionalProperties": false
  23886. },
  23887. "SessionMessageShell": {
  23888. "type": "object",
  23889. "properties": {
  23890. "id": {
  23891. "type": "string",
  23892. "pattern": "^msg_"
  23893. },
  23894. "metadata": {
  23895. "type": "object"
  23896. },
  23897. "time": {
  23898. "type": "object",
  23899. "properties": {
  23900. "created": {
  23901. "type": "number"
  23902. },
  23903. "completed": {
  23904. "type": "number"
  23905. }
  23906. },
  23907. "required": ["created"],
  23908. "additionalProperties": false
  23909. },
  23910. "type": {
  23911. "type": "string",
  23912. "enum": ["shell"]
  23913. },
  23914. "callID": {
  23915. "type": "string"
  23916. },
  23917. "command": {
  23918. "type": "string"
  23919. },
  23920. "output": {
  23921. "type": "string"
  23922. }
  23923. },
  23924. "required": ["id", "time", "type", "callID", "command", "output"],
  23925. "additionalProperties": false
  23926. },
  23927. "SessionMessageAssistantText": {
  23928. "type": "object",
  23929. "properties": {
  23930. "type": {
  23931. "type": "string",
  23932. "enum": ["text"]
  23933. },
  23934. "id": {
  23935. "type": "string"
  23936. },
  23937. "text": {
  23938. "type": "string"
  23939. }
  23940. },
  23941. "required": ["type", "id", "text"],
  23942. "additionalProperties": false
  23943. },
  23944. "SessionMessageAssistantReasoning": {
  23945. "type": "object",
  23946. "properties": {
  23947. "type": {
  23948. "type": "string",
  23949. "enum": ["reasoning"]
  23950. },
  23951. "id": {
  23952. "type": "string"
  23953. },
  23954. "text": {
  23955. "type": "string"
  23956. },
  23957. "providerMetadata": {
  23958. "type": "object",
  23959. "additionalProperties": {
  23960. "type": "object"
  23961. }
  23962. }
  23963. },
  23964. "required": ["type", "id", "text"],
  23965. "additionalProperties": false
  23966. },
  23967. "SessionMessageToolStatePending": {
  23968. "type": "object",
  23969. "properties": {
  23970. "status": {
  23971. "type": "string",
  23972. "enum": ["pending"]
  23973. },
  23974. "input": {
  23975. "type": "string"
  23976. }
  23977. },
  23978. "required": ["status", "input"],
  23979. "additionalProperties": false
  23980. },
  23981. "SessionMessageToolStateRunning": {
  23982. "type": "object",
  23983. "properties": {
  23984. "status": {
  23985. "type": "string",
  23986. "enum": ["running"]
  23987. },
  23988. "input": {
  23989. "type": "object"
  23990. },
  23991. "structured": {
  23992. "type": "object"
  23993. },
  23994. "content": {
  23995. "type": "array",
  23996. "items": {
  23997. "anyOf": [
  23998. {
  23999. "$ref": "#/components/schemas/ToolTextContent"
  24000. },
  24001. {
  24002. "$ref": "#/components/schemas/ToolFileContent"
  24003. }
  24004. ]
  24005. }
  24006. }
  24007. },
  24008. "required": ["status", "input", "structured", "content"],
  24009. "additionalProperties": false
  24010. },
  24011. "SessionMessageToolStateCompleted": {
  24012. "type": "object",
  24013. "properties": {
  24014. "status": {
  24015. "type": "string",
  24016. "enum": ["completed"]
  24017. },
  24018. "input": {
  24019. "type": "object"
  24020. },
  24021. "attachments": {
  24022. "type": "array",
  24023. "items": {
  24024. "$ref": "#/components/schemas/PromptFileAttachment"
  24025. }
  24026. },
  24027. "content": {
  24028. "type": "array",
  24029. "items": {
  24030. "anyOf": [
  24031. {
  24032. "$ref": "#/components/schemas/ToolTextContent"
  24033. },
  24034. {
  24035. "$ref": "#/components/schemas/ToolFileContent"
  24036. }
  24037. ]
  24038. }
  24039. },
  24040. "structured": {
  24041. "type": "object"
  24042. },
  24043. "result": {}
  24044. },
  24045. "required": ["status", "input", "content", "structured"],
  24046. "additionalProperties": false
  24047. },
  24048. "SessionMessageToolStateError": {
  24049. "type": "object",
  24050. "properties": {
  24051. "status": {
  24052. "type": "string",
  24053. "enum": ["error"]
  24054. },
  24055. "input": {
  24056. "type": "object"
  24057. },
  24058. "content": {
  24059. "type": "array",
  24060. "items": {
  24061. "anyOf": [
  24062. {
  24063. "$ref": "#/components/schemas/ToolTextContent"
  24064. },
  24065. {
  24066. "$ref": "#/components/schemas/ToolFileContent"
  24067. }
  24068. ]
  24069. }
  24070. },
  24071. "structured": {
  24072. "type": "object"
  24073. },
  24074. "error": {
  24075. "$ref": "#/components/schemas/SessionErrorUnknown"
  24076. },
  24077. "result": {}
  24078. },
  24079. "required": ["status", "input", "content", "structured", "error"],
  24080. "additionalProperties": false
  24081. },
  24082. "SessionMessageAssistantTool": {
  24083. "type": "object",
  24084. "properties": {
  24085. "type": {
  24086. "type": "string",
  24087. "enum": ["tool"]
  24088. },
  24089. "id": {
  24090. "type": "string"
  24091. },
  24092. "name": {
  24093. "type": "string"
  24094. },
  24095. "provider": {
  24096. "type": "object",
  24097. "properties": {
  24098. "executed": {
  24099. "type": "boolean"
  24100. },
  24101. "metadata": {
  24102. "type": "object",
  24103. "additionalProperties": {
  24104. "type": "object"
  24105. }
  24106. },
  24107. "resultMetadata": {
  24108. "type": "object",
  24109. "additionalProperties": {
  24110. "type": "object"
  24111. }
  24112. }
  24113. },
  24114. "required": ["executed"],
  24115. "additionalProperties": false
  24116. },
  24117. "state": {
  24118. "anyOf": [
  24119. {
  24120. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  24121. },
  24122. {
  24123. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  24124. },
  24125. {
  24126. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  24127. },
  24128. {
  24129. "$ref": "#/components/schemas/SessionMessageToolStateError"
  24130. }
  24131. ]
  24132. },
  24133. "time": {
  24134. "type": "object",
  24135. "properties": {
  24136. "created": {
  24137. "type": "number"
  24138. },
  24139. "ran": {
  24140. "type": "number"
  24141. },
  24142. "completed": {
  24143. "type": "number"
  24144. },
  24145. "pruned": {
  24146. "type": "number"
  24147. }
  24148. },
  24149. "required": ["created"],
  24150. "additionalProperties": false
  24151. }
  24152. },
  24153. "required": ["type", "id", "name", "state", "time"],
  24154. "additionalProperties": false
  24155. },
  24156. "SessionMessageAssistant": {
  24157. "type": "object",
  24158. "properties": {
  24159. "id": {
  24160. "type": "string",
  24161. "pattern": "^msg_"
  24162. },
  24163. "metadata": {
  24164. "type": "object"
  24165. },
  24166. "time": {
  24167. "type": "object",
  24168. "properties": {
  24169. "created": {
  24170. "type": "number"
  24171. },
  24172. "completed": {
  24173. "type": "number"
  24174. }
  24175. },
  24176. "required": ["created"],
  24177. "additionalProperties": false
  24178. },
  24179. "type": {
  24180. "type": "string",
  24181. "enum": ["assistant"]
  24182. },
  24183. "agent": {
  24184. "type": "string"
  24185. },
  24186. "model": {
  24187. "type": "object",
  24188. "properties": {
  24189. "id": {
  24190. "type": "string"
  24191. },
  24192. "providerID": {
  24193. "type": "string"
  24194. },
  24195. "variant": {
  24196. "type": "string"
  24197. }
  24198. },
  24199. "required": ["id", "providerID"],
  24200. "additionalProperties": false
  24201. },
  24202. "content": {
  24203. "type": "array",
  24204. "items": {
  24205. "anyOf": [
  24206. {
  24207. "$ref": "#/components/schemas/SessionMessageAssistantText"
  24208. },
  24209. {
  24210. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  24211. },
  24212. {
  24213. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  24214. }
  24215. ]
  24216. }
  24217. },
  24218. "snapshot": {
  24219. "type": "object",
  24220. "properties": {
  24221. "start": {
  24222. "type": "string"
  24223. },
  24224. "end": {
  24225. "type": "string"
  24226. }
  24227. },
  24228. "additionalProperties": false
  24229. },
  24230. "finish": {
  24231. "type": "string"
  24232. },
  24233. "cost": {
  24234. "type": "number"
  24235. },
  24236. "tokens": {
  24237. "type": "object",
  24238. "properties": {
  24239. "input": {
  24240. "type": "number"
  24241. },
  24242. "output": {
  24243. "type": "number"
  24244. },
  24245. "reasoning": {
  24246. "type": "number"
  24247. },
  24248. "cache": {
  24249. "type": "object",
  24250. "properties": {
  24251. "read": {
  24252. "type": "number"
  24253. },
  24254. "write": {
  24255. "type": "number"
  24256. }
  24257. },
  24258. "required": ["read", "write"],
  24259. "additionalProperties": false
  24260. }
  24261. },
  24262. "required": ["input", "output", "reasoning", "cache"],
  24263. "additionalProperties": false
  24264. },
  24265. "error": {
  24266. "$ref": "#/components/schemas/SessionErrorUnknown"
  24267. }
  24268. },
  24269. "required": ["id", "time", "type", "agent", "model", "content"],
  24270. "additionalProperties": false
  24271. },
  24272. "SessionMessageCompaction": {
  24273. "type": "object",
  24274. "properties": {
  24275. "type": {
  24276. "type": "string",
  24277. "enum": ["compaction"]
  24278. },
  24279. "reason": {
  24280. "type": "string",
  24281. "enum": ["auto", "manual"]
  24282. },
  24283. "summary": {
  24284. "type": "string"
  24285. },
  24286. "recent": {
  24287. "type": "string"
  24288. },
  24289. "id": {
  24290. "type": "string",
  24291. "pattern": "^msg_"
  24292. },
  24293. "metadata": {
  24294. "type": "object"
  24295. },
  24296. "time": {
  24297. "type": "object",
  24298. "properties": {
  24299. "created": {
  24300. "type": "number"
  24301. }
  24302. },
  24303. "required": ["created"],
  24304. "additionalProperties": false
  24305. }
  24306. },
  24307. "required": ["type", "reason", "summary", "recent", "id", "time"],
  24308. "additionalProperties": false
  24309. },
  24310. "SessionMessage": {
  24311. "anyOf": [
  24312. {
  24313. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  24314. },
  24315. {
  24316. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  24317. },
  24318. {
  24319. "$ref": "#/components/schemas/SessionMessageUser"
  24320. },
  24321. {
  24322. "$ref": "#/components/schemas/SessionMessageSynthetic"
  24323. },
  24324. {
  24325. "$ref": "#/components/schemas/SessionMessageSystem"
  24326. },
  24327. {
  24328. "$ref": "#/components/schemas/SessionMessageShell"
  24329. },
  24330. {
  24331. "$ref": "#/components/schemas/SessionMessageAssistant"
  24332. },
  24333. {
  24334. "$ref": "#/components/schemas/SessionMessageCompaction"
  24335. }
  24336. ]
  24337. },
  24338. "ProviderV2Info": {
  24339. "type": "object",
  24340. "properties": {
  24341. "id": {
  24342. "type": "string"
  24343. },
  24344. "name": {
  24345. "type": "string"
  24346. },
  24347. "enabled": {
  24348. "anyOf": [
  24349. {
  24350. "type": "boolean",
  24351. "enum": [false]
  24352. },
  24353. {
  24354. "type": "object",
  24355. "properties": {
  24356. "via": {
  24357. "type": "string",
  24358. "enum": ["env"]
  24359. },
  24360. "name": {
  24361. "type": "string"
  24362. }
  24363. },
  24364. "required": ["via", "name"],
  24365. "additionalProperties": false
  24366. },
  24367. {
  24368. "type": "object",
  24369. "properties": {
  24370. "via": {
  24371. "type": "string",
  24372. "enum": ["account"]
  24373. },
  24374. "service": {
  24375. "type": "string"
  24376. }
  24377. },
  24378. "required": ["via", "service"],
  24379. "additionalProperties": false
  24380. },
  24381. {
  24382. "type": "object",
  24383. "properties": {
  24384. "via": {
  24385. "type": "string",
  24386. "enum": ["custom"]
  24387. },
  24388. "data": {
  24389. "type": "object"
  24390. }
  24391. },
  24392. "required": ["via", "data"],
  24393. "additionalProperties": false
  24394. }
  24395. ]
  24396. },
  24397. "env": {
  24398. "type": "array",
  24399. "items": {
  24400. "type": "string"
  24401. }
  24402. },
  24403. "api": {
  24404. "anyOf": [
  24405. {
  24406. "type": "object",
  24407. "properties": {
  24408. "type": {
  24409. "type": "string",
  24410. "enum": ["aisdk"]
  24411. },
  24412. "package": {
  24413. "type": "string"
  24414. },
  24415. "url": {
  24416. "type": "string"
  24417. },
  24418. "settings": {
  24419. "type": "object"
  24420. }
  24421. },
  24422. "required": ["type", "package"],
  24423. "additionalProperties": false
  24424. },
  24425. {
  24426. "type": "object",
  24427. "properties": {
  24428. "type": {
  24429. "type": "string",
  24430. "enum": ["native"]
  24431. },
  24432. "url": {
  24433. "type": "string"
  24434. },
  24435. "settings": {
  24436. "type": "object"
  24437. }
  24438. },
  24439. "required": ["type", "settings"],
  24440. "additionalProperties": false
  24441. }
  24442. ]
  24443. },
  24444. "request": {
  24445. "type": "object",
  24446. "properties": {
  24447. "headers": {
  24448. "type": "object",
  24449. "additionalProperties": {
  24450. "type": "string"
  24451. }
  24452. },
  24453. "body": {
  24454. "type": "object"
  24455. }
  24456. },
  24457. "required": ["headers", "body"],
  24458. "additionalProperties": false
  24459. }
  24460. },
  24461. "required": ["id", "name", "enabled", "env", "api", "request"],
  24462. "additionalProperties": false
  24463. },
  24464. "PermissionV2Request": {
  24465. "type": "object",
  24466. "properties": {
  24467. "id": {
  24468. "type": "string",
  24469. "pattern": "^per"
  24470. },
  24471. "sessionID": {
  24472. "type": "string",
  24473. "pattern": "^ses"
  24474. },
  24475. "action": {
  24476. "type": "string"
  24477. },
  24478. "resources": {
  24479. "type": "array",
  24480. "items": {
  24481. "type": "string"
  24482. }
  24483. },
  24484. "save": {
  24485. "type": "array",
  24486. "items": {
  24487. "type": "string"
  24488. }
  24489. },
  24490. "metadata": {
  24491. "type": "object"
  24492. },
  24493. "source": {
  24494. "$ref": "#/components/schemas/PermissionV2Source"
  24495. }
  24496. },
  24497. "required": ["id", "sessionID", "action", "resources"],
  24498. "additionalProperties": false
  24499. },
  24500. "PermissionSavedInfo": {
  24501. "type": "object",
  24502. "properties": {
  24503. "id": {
  24504. "type": "string"
  24505. },
  24506. "projectID": {
  24507. "type": "string"
  24508. },
  24509. "action": {
  24510. "type": "string"
  24511. },
  24512. "resource": {
  24513. "type": "string"
  24514. }
  24515. },
  24516. "required": ["id", "projectID", "action", "resource"],
  24517. "additionalProperties": false
  24518. },
  24519. "FileSystemTextContent": {
  24520. "type": "object",
  24521. "properties": {
  24522. "type": {
  24523. "type": "string",
  24524. "enum": ["text"]
  24525. },
  24526. "content": {
  24527. "type": "string"
  24528. },
  24529. "mime": {
  24530. "type": "string"
  24531. }
  24532. },
  24533. "required": ["type", "content", "mime"],
  24534. "additionalProperties": false
  24535. },
  24536. "FileSystemBinaryContent": {
  24537. "type": "object",
  24538. "properties": {
  24539. "type": {
  24540. "type": "string",
  24541. "enum": ["binary"]
  24542. },
  24543. "content": {
  24544. "type": "string"
  24545. },
  24546. "encoding": {
  24547. "type": "string",
  24548. "enum": ["base64"]
  24549. },
  24550. "mime": {
  24551. "type": "string"
  24552. }
  24553. },
  24554. "required": ["type", "content", "encoding", "mime"],
  24555. "additionalProperties": false
  24556. },
  24557. "FileSystemEntry": {
  24558. "type": "object",
  24559. "properties": {
  24560. "path": {
  24561. "type": "string"
  24562. },
  24563. "uri": {
  24564. "type": "string"
  24565. },
  24566. "type": {
  24567. "type": "string",
  24568. "enum": ["file", "directory"]
  24569. },
  24570. "mime": {
  24571. "type": "string"
  24572. }
  24573. },
  24574. "required": ["path", "uri", "type", "mime"],
  24575. "additionalProperties": false
  24576. },
  24577. "CommandV2Info": {
  24578. "type": "object",
  24579. "properties": {
  24580. "name": {
  24581. "type": "string"
  24582. },
  24583. "template": {
  24584. "type": "string"
  24585. },
  24586. "description": {
  24587. "type": "string"
  24588. },
  24589. "agent": {
  24590. "type": "string"
  24591. },
  24592. "model": {
  24593. "type": "object",
  24594. "properties": {
  24595. "id": {
  24596. "type": "string"
  24597. },
  24598. "providerID": {
  24599. "type": "string"
  24600. },
  24601. "variant": {
  24602. "type": "string"
  24603. }
  24604. },
  24605. "required": ["id", "providerID"],
  24606. "additionalProperties": false
  24607. },
  24608. "subtask": {
  24609. "type": "boolean"
  24610. }
  24611. },
  24612. "required": ["name", "template"],
  24613. "additionalProperties": false
  24614. },
  24615. "SkillV2Info": {
  24616. "type": "object",
  24617. "properties": {
  24618. "name": {
  24619. "type": "string"
  24620. },
  24621. "description": {
  24622. "type": "string"
  24623. },
  24624. "slash": {
  24625. "type": "boolean"
  24626. },
  24627. "location": {
  24628. "type": "string"
  24629. },
  24630. "content": {
  24631. "type": "string"
  24632. }
  24633. },
  24634. "required": ["name", "location", "content"],
  24635. "additionalProperties": false
  24636. },
  24637. "QuestionV2Request": {
  24638. "type": "object",
  24639. "properties": {
  24640. "id": {
  24641. "type": "string",
  24642. "pattern": "^que"
  24643. },
  24644. "sessionID": {
  24645. "type": "string",
  24646. "pattern": "^ses"
  24647. },
  24648. "questions": {
  24649. "type": "array",
  24650. "items": {
  24651. "$ref": "#/components/schemas/QuestionV2Info"
  24652. },
  24653. "description": "Questions to ask"
  24654. },
  24655. "tool": {
  24656. "$ref": "#/components/schemas/QuestionV2Tool"
  24657. }
  24658. },
  24659. "required": ["id", "sessionID", "questions"],
  24660. "additionalProperties": false
  24661. },
  24662. "QuestionV2Reply": {
  24663. "type": "object",
  24664. "properties": {
  24665. "answers": {
  24666. "type": "array",
  24667. "items": {
  24668. "$ref": "#/components/schemas/QuestionV2Answer"
  24669. },
  24670. "description": "User answers in order of questions (each answer is an array of selected labels)"
  24671. }
  24672. },
  24673. "required": ["answers"],
  24674. "additionalProperties": false
  24675. },
  24676. "EventModels-devRefreshed": {
  24677. "type": "object",
  24678. "properties": {
  24679. "id": {
  24680. "type": "string",
  24681. "pattern": "^evt_"
  24682. },
  24683. "type": {
  24684. "type": "string",
  24685. "enum": ["models-dev.refreshed"]
  24686. },
  24687. "properties": {
  24688. "type": "object",
  24689. "properties": {}
  24690. }
  24691. },
  24692. "required": ["id", "type", "properties"],
  24693. "additionalProperties": false
  24694. },
  24695. "EventPluginAdded": {
  24696. "type": "object",
  24697. "properties": {
  24698. "id": {
  24699. "type": "string",
  24700. "pattern": "^evt_"
  24701. },
  24702. "type": {
  24703. "type": "string",
  24704. "enum": ["plugin.added"]
  24705. },
  24706. "properties": {
  24707. "type": "object",
  24708. "properties": {
  24709. "id": {
  24710. "type": "string"
  24711. }
  24712. },
  24713. "required": ["id"],
  24714. "additionalProperties": false
  24715. }
  24716. },
  24717. "required": ["id", "type", "properties"],
  24718. "additionalProperties": false
  24719. },
  24720. "ModelV2Info1": {
  24721. "type": "object",
  24722. "properties": {
  24723. "id": {
  24724. "type": "string"
  24725. },
  24726. "providerID": {
  24727. "type": "string"
  24728. },
  24729. "family": {
  24730. "type": "string"
  24731. },
  24732. "name": {
  24733. "type": "string"
  24734. },
  24735. "api": {
  24736. "anyOf": [
  24737. {
  24738. "type": "object",
  24739. "properties": {
  24740. "id": {
  24741. "type": "string"
  24742. },
  24743. "type": {
  24744. "type": "string",
  24745. "enum": ["aisdk"]
  24746. },
  24747. "package": {
  24748. "type": "string"
  24749. },
  24750. "url": {
  24751. "type": "string"
  24752. },
  24753. "settings": {
  24754. "type": "object"
  24755. }
  24756. },
  24757. "required": ["id", "type", "package"],
  24758. "additionalProperties": false
  24759. },
  24760. {
  24761. "type": "object",
  24762. "properties": {
  24763. "id": {
  24764. "type": "string"
  24765. },
  24766. "type": {
  24767. "type": "string",
  24768. "enum": ["native"]
  24769. },
  24770. "url": {
  24771. "type": "string"
  24772. },
  24773. "settings": {
  24774. "type": "object"
  24775. }
  24776. },
  24777. "required": ["id", "type", "settings"],
  24778. "additionalProperties": false
  24779. }
  24780. ]
  24781. },
  24782. "capabilities": {
  24783. "type": "object",
  24784. "properties": {
  24785. "tools": {
  24786. "type": "boolean"
  24787. },
  24788. "input": {
  24789. "type": "array",
  24790. "items": {
  24791. "type": "string"
  24792. }
  24793. },
  24794. "output": {
  24795. "type": "array",
  24796. "items": {
  24797. "type": "string"
  24798. }
  24799. }
  24800. },
  24801. "required": ["tools", "input", "output"],
  24802. "additionalProperties": false
  24803. },
  24804. "request": {
  24805. "type": "object",
  24806. "properties": {
  24807. "headers": {
  24808. "type": "object",
  24809. "additionalProperties": {
  24810. "type": "string"
  24811. }
  24812. },
  24813. "body": {
  24814. "type": "object"
  24815. },
  24816. "variant": {
  24817. "type": "string"
  24818. }
  24819. },
  24820. "required": ["headers", "body"],
  24821. "additionalProperties": false
  24822. },
  24823. "variants": {
  24824. "type": "array",
  24825. "items": {
  24826. "type": "object",
  24827. "properties": {
  24828. "id": {
  24829. "type": "string"
  24830. },
  24831. "headers": {
  24832. "type": "object",
  24833. "additionalProperties": {
  24834. "type": "string"
  24835. }
  24836. },
  24837. "body": {
  24838. "type": "object"
  24839. }
  24840. },
  24841. "required": ["id", "headers", "body"],
  24842. "additionalProperties": false
  24843. }
  24844. },
  24845. "time": {
  24846. "type": "object",
  24847. "properties": {
  24848. "released": {
  24849. "anyOf": [
  24850. {
  24851. "type": "number"
  24852. },
  24853. {
  24854. "type": "string",
  24855. "enum": ["NaN"]
  24856. },
  24857. {
  24858. "type": "string",
  24859. "enum": ["Infinity"]
  24860. },
  24861. {
  24862. "type": "string",
  24863. "enum": ["-Infinity"]
  24864. }
  24865. ]
  24866. }
  24867. },
  24868. "required": ["released"],
  24869. "additionalProperties": false
  24870. },
  24871. "cost": {
  24872. "type": "array",
  24873. "items": {
  24874. "type": "object",
  24875. "properties": {
  24876. "tier": {
  24877. "type": "object",
  24878. "properties": {
  24879. "type": {
  24880. "type": "string",
  24881. "enum": ["context"]
  24882. },
  24883. "size": {
  24884. "type": "integer"
  24885. }
  24886. },
  24887. "required": ["type", "size"],
  24888. "additionalProperties": false
  24889. },
  24890. "input": {
  24891. "type": "number"
  24892. },
  24893. "output": {
  24894. "type": "number"
  24895. },
  24896. "cache": {
  24897. "type": "object",
  24898. "properties": {
  24899. "read": {
  24900. "type": "number"
  24901. },
  24902. "write": {
  24903. "type": "number"
  24904. }
  24905. },
  24906. "required": ["read", "write"],
  24907. "additionalProperties": false
  24908. }
  24909. },
  24910. "required": ["input", "output", "cache"],
  24911. "additionalProperties": false
  24912. }
  24913. },
  24914. "status": {
  24915. "type": "string",
  24916. "enum": ["alpha", "beta", "deprecated", "active"]
  24917. },
  24918. "enabled": {
  24919. "type": "boolean"
  24920. },
  24921. "limit": {
  24922. "type": "object",
  24923. "properties": {
  24924. "context": {
  24925. "type": "integer"
  24926. },
  24927. "input": {
  24928. "type": "integer"
  24929. },
  24930. "output": {
  24931. "type": "integer"
  24932. }
  24933. },
  24934. "required": ["context", "output"],
  24935. "additionalProperties": false
  24936. }
  24937. },
  24938. "required": [
  24939. "id",
  24940. "providerID",
  24941. "name",
  24942. "api",
  24943. "capabilities",
  24944. "request",
  24945. "variants",
  24946. "time",
  24947. "cost",
  24948. "status",
  24949. "enabled",
  24950. "limit"
  24951. ],
  24952. "additionalProperties": false
  24953. },
  24954. "EventCatalogModelUpdated": {
  24955. "type": "object",
  24956. "properties": {
  24957. "id": {
  24958. "type": "string",
  24959. "pattern": "^evt_"
  24960. },
  24961. "type": {
  24962. "type": "string",
  24963. "enum": ["catalog.model.updated"]
  24964. },
  24965. "properties": {
  24966. "type": "object",
  24967. "properties": {
  24968. "model": {
  24969. "$ref": "#/components/schemas/ModelV2Info1"
  24970. }
  24971. },
  24972. "required": ["model"],
  24973. "additionalProperties": false
  24974. }
  24975. },
  24976. "required": ["id", "type", "properties"],
  24977. "additionalProperties": false
  24978. },
  24979. "EventSessionCreated": {
  24980. "type": "object",
  24981. "properties": {
  24982. "id": {
  24983. "type": "string",
  24984. "pattern": "^evt_"
  24985. },
  24986. "type": {
  24987. "type": "string",
  24988. "enum": ["session.created"]
  24989. },
  24990. "properties": {
  24991. "type": "object",
  24992. "properties": {
  24993. "sessionID": {
  24994. "type": "string",
  24995. "pattern": "^ses"
  24996. },
  24997. "info": {
  24998. "$ref": "#/components/schemas/Session"
  24999. }
  25000. },
  25001. "required": ["sessionID", "info"],
  25002. "additionalProperties": false
  25003. }
  25004. },
  25005. "required": ["id", "type", "properties"],
  25006. "additionalProperties": false
  25007. },
  25008. "EventSessionUpdated": {
  25009. "type": "object",
  25010. "properties": {
  25011. "id": {
  25012. "type": "string",
  25013. "pattern": "^evt_"
  25014. },
  25015. "type": {
  25016. "type": "string",
  25017. "enum": ["session.updated"]
  25018. },
  25019. "properties": {
  25020. "type": "object",
  25021. "properties": {
  25022. "sessionID": {
  25023. "type": "string",
  25024. "pattern": "^ses"
  25025. },
  25026. "info": {
  25027. "$ref": "#/components/schemas/Session"
  25028. }
  25029. },
  25030. "required": ["sessionID", "info"],
  25031. "additionalProperties": false
  25032. }
  25033. },
  25034. "required": ["id", "type", "properties"],
  25035. "additionalProperties": false
  25036. },
  25037. "EventSessionDeleted": {
  25038. "type": "object",
  25039. "properties": {
  25040. "id": {
  25041. "type": "string",
  25042. "pattern": "^evt_"
  25043. },
  25044. "type": {
  25045. "type": "string",
  25046. "enum": ["session.deleted"]
  25047. },
  25048. "properties": {
  25049. "type": "object",
  25050. "properties": {
  25051. "sessionID": {
  25052. "type": "string",
  25053. "pattern": "^ses"
  25054. },
  25055. "info": {
  25056. "$ref": "#/components/schemas/Session"
  25057. }
  25058. },
  25059. "required": ["sessionID", "info"],
  25060. "additionalProperties": false
  25061. }
  25062. },
  25063. "required": ["id", "type", "properties"],
  25064. "additionalProperties": false
  25065. },
  25066. "EventMessageUpdated": {
  25067. "type": "object",
  25068. "properties": {
  25069. "id": {
  25070. "type": "string",
  25071. "pattern": "^evt_"
  25072. },
  25073. "type": {
  25074. "type": "string",
  25075. "enum": ["message.updated"]
  25076. },
  25077. "properties": {
  25078. "type": "object",
  25079. "properties": {
  25080. "sessionID": {
  25081. "type": "string",
  25082. "pattern": "^ses"
  25083. },
  25084. "info": {
  25085. "$ref": "#/components/schemas/Message"
  25086. }
  25087. },
  25088. "required": ["sessionID", "info"],
  25089. "additionalProperties": false
  25090. }
  25091. },
  25092. "required": ["id", "type", "properties"],
  25093. "additionalProperties": false
  25094. },
  25095. "EventMessageRemoved": {
  25096. "type": "object",
  25097. "properties": {
  25098. "id": {
  25099. "type": "string",
  25100. "pattern": "^evt_"
  25101. },
  25102. "type": {
  25103. "type": "string",
  25104. "enum": ["message.removed"]
  25105. },
  25106. "properties": {
  25107. "type": "object",
  25108. "properties": {
  25109. "sessionID": {
  25110. "type": "string",
  25111. "pattern": "^ses"
  25112. },
  25113. "messageID": {
  25114. "type": "string",
  25115. "pattern": "^msg"
  25116. }
  25117. },
  25118. "required": ["sessionID", "messageID"],
  25119. "additionalProperties": false
  25120. }
  25121. },
  25122. "required": ["id", "type", "properties"],
  25123. "additionalProperties": false
  25124. },
  25125. "EventMessagePartUpdated": {
  25126. "type": "object",
  25127. "properties": {
  25128. "id": {
  25129. "type": "string",
  25130. "pattern": "^evt_"
  25131. },
  25132. "type": {
  25133. "type": "string",
  25134. "enum": ["message.part.updated"]
  25135. },
  25136. "properties": {
  25137. "type": "object",
  25138. "properties": {
  25139. "sessionID": {
  25140. "type": "string",
  25141. "pattern": "^ses"
  25142. },
  25143. "part": {
  25144. "$ref": "#/components/schemas/Part"
  25145. },
  25146. "time": {
  25147. "type": "number"
  25148. }
  25149. },
  25150. "required": ["sessionID", "part", "time"],
  25151. "additionalProperties": false
  25152. }
  25153. },
  25154. "required": ["id", "type", "properties"],
  25155. "additionalProperties": false
  25156. },
  25157. "EventMessagePartRemoved": {
  25158. "type": "object",
  25159. "properties": {
  25160. "id": {
  25161. "type": "string",
  25162. "pattern": "^evt_"
  25163. },
  25164. "type": {
  25165. "type": "string",
  25166. "enum": ["message.part.removed"]
  25167. },
  25168. "properties": {
  25169. "type": "object",
  25170. "properties": {
  25171. "sessionID": {
  25172. "type": "string",
  25173. "pattern": "^ses"
  25174. },
  25175. "messageID": {
  25176. "type": "string",
  25177. "pattern": "^msg"
  25178. },
  25179. "partID": {
  25180. "type": "string",
  25181. "pattern": "^prt"
  25182. }
  25183. },
  25184. "required": ["sessionID", "messageID", "partID"],
  25185. "additionalProperties": false
  25186. }
  25187. },
  25188. "required": ["id", "type", "properties"],
  25189. "additionalProperties": false
  25190. },
  25191. "EventSessionNextAgentSwitched": {
  25192. "type": "object",
  25193. "properties": {
  25194. "id": {
  25195. "type": "string",
  25196. "pattern": "^evt_"
  25197. },
  25198. "type": {
  25199. "type": "string",
  25200. "enum": ["session.next.agent.switched"]
  25201. },
  25202. "properties": {
  25203. "type": "object",
  25204. "properties": {
  25205. "timestamp": {
  25206. "type": "number"
  25207. },
  25208. "sessionID": {
  25209. "type": "string",
  25210. "pattern": "^ses"
  25211. },
  25212. "messageID": {
  25213. "type": "string",
  25214. "pattern": "^msg_"
  25215. },
  25216. "agent": {
  25217. "type": "string"
  25218. }
  25219. },
  25220. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25221. "additionalProperties": false
  25222. }
  25223. },
  25224. "required": ["id", "type", "properties"],
  25225. "additionalProperties": false
  25226. },
  25227. "EventSessionNextModelSwitched": {
  25228. "type": "object",
  25229. "properties": {
  25230. "id": {
  25231. "type": "string",
  25232. "pattern": "^evt_"
  25233. },
  25234. "type": {
  25235. "type": "string",
  25236. "enum": ["session.next.model.switched"]
  25237. },
  25238. "properties": {
  25239. "type": "object",
  25240. "properties": {
  25241. "timestamp": {
  25242. "type": "number"
  25243. },
  25244. "sessionID": {
  25245. "type": "string",
  25246. "pattern": "^ses"
  25247. },
  25248. "messageID": {
  25249. "type": "string",
  25250. "pattern": "^msg_"
  25251. },
  25252. "model": {
  25253. "type": "object",
  25254. "properties": {
  25255. "id": {
  25256. "type": "string"
  25257. },
  25258. "providerID": {
  25259. "type": "string"
  25260. },
  25261. "variant": {
  25262. "type": "string"
  25263. }
  25264. },
  25265. "required": ["id", "providerID"],
  25266. "additionalProperties": false
  25267. }
  25268. },
  25269. "required": ["timestamp", "sessionID", "messageID", "model"],
  25270. "additionalProperties": false
  25271. }
  25272. },
  25273. "required": ["id", "type", "properties"],
  25274. "additionalProperties": false
  25275. },
  25276. "EventSessionNextMoved": {
  25277. "type": "object",
  25278. "properties": {
  25279. "id": {
  25280. "type": "string",
  25281. "pattern": "^evt_"
  25282. },
  25283. "type": {
  25284. "type": "string",
  25285. "enum": ["session.next.moved"]
  25286. },
  25287. "properties": {
  25288. "type": "object",
  25289. "properties": {
  25290. "timestamp": {
  25291. "type": "number"
  25292. },
  25293. "sessionID": {
  25294. "type": "string",
  25295. "pattern": "^ses"
  25296. },
  25297. "location": {
  25298. "$ref": "#/components/schemas/LocationRef"
  25299. },
  25300. "subdirectory": {
  25301. "type": "string"
  25302. }
  25303. },
  25304. "required": ["timestamp", "sessionID", "location"],
  25305. "additionalProperties": false
  25306. }
  25307. },
  25308. "required": ["id", "type", "properties"],
  25309. "additionalProperties": false
  25310. },
  25311. "EventSessionNextPrompted": {
  25312. "type": "object",
  25313. "properties": {
  25314. "id": {
  25315. "type": "string",
  25316. "pattern": "^evt_"
  25317. },
  25318. "type": {
  25319. "type": "string",
  25320. "enum": ["session.next.prompted"]
  25321. },
  25322. "properties": {
  25323. "type": "object",
  25324. "properties": {
  25325. "timestamp": {
  25326. "type": "number"
  25327. },
  25328. "sessionID": {
  25329. "type": "string",
  25330. "pattern": "^ses"
  25331. },
  25332. "messageID": {
  25333. "type": "string",
  25334. "pattern": "^msg_"
  25335. },
  25336. "prompt": {
  25337. "$ref": "#/components/schemas/Prompt"
  25338. },
  25339. "delivery": {
  25340. "type": "string",
  25341. "enum": ["steer", "queue"]
  25342. }
  25343. },
  25344. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25345. "additionalProperties": false
  25346. }
  25347. },
  25348. "required": ["id", "type", "properties"],
  25349. "additionalProperties": false
  25350. },
  25351. "EventSessionNextPromptAdmitted": {
  25352. "type": "object",
  25353. "properties": {
  25354. "id": {
  25355. "type": "string",
  25356. "pattern": "^evt_"
  25357. },
  25358. "type": {
  25359. "type": "string",
  25360. "enum": ["session.next.prompt.admitted"]
  25361. },
  25362. "properties": {
  25363. "type": "object",
  25364. "properties": {
  25365. "timestamp": {
  25366. "type": "number"
  25367. },
  25368. "sessionID": {
  25369. "type": "string",
  25370. "pattern": "^ses"
  25371. },
  25372. "messageID": {
  25373. "type": "string",
  25374. "pattern": "^msg_"
  25375. },
  25376. "prompt": {
  25377. "$ref": "#/components/schemas/Prompt"
  25378. },
  25379. "delivery": {
  25380. "type": "string",
  25381. "enum": ["steer", "queue"]
  25382. }
  25383. },
  25384. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25385. "additionalProperties": false
  25386. }
  25387. },
  25388. "required": ["id", "type", "properties"],
  25389. "additionalProperties": false
  25390. },
  25391. "EventSessionNextPromptPromoted": {
  25392. "type": "object",
  25393. "properties": {
  25394. "id": {
  25395. "type": "string",
  25396. "pattern": "^evt_"
  25397. },
  25398. "type": {
  25399. "type": "string",
  25400. "enum": ["session.next.prompt.promoted"]
  25401. },
  25402. "properties": {
  25403. "type": "object",
  25404. "properties": {
  25405. "timestamp": {
  25406. "type": "number"
  25407. },
  25408. "sessionID": {
  25409. "type": "string",
  25410. "pattern": "^ses"
  25411. },
  25412. "messageID": {
  25413. "type": "string",
  25414. "pattern": "^msg_"
  25415. },
  25416. "prompt": {
  25417. "$ref": "#/components/schemas/Prompt"
  25418. },
  25419. "timeCreated": {
  25420. "type": "number"
  25421. }
  25422. },
  25423. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  25424. "additionalProperties": false
  25425. }
  25426. },
  25427. "required": ["id", "type", "properties"],
  25428. "additionalProperties": false
  25429. },
  25430. "EventSessionNextInterruptRequested": {
  25431. "type": "object",
  25432. "properties": {
  25433. "id": {
  25434. "type": "string",
  25435. "pattern": "^evt_"
  25436. },
  25437. "type": {
  25438. "type": "string",
  25439. "enum": ["session.next.interrupt.requested"]
  25440. },
  25441. "properties": {
  25442. "type": "object",
  25443. "properties": {
  25444. "timestamp": {
  25445. "type": "number"
  25446. },
  25447. "sessionID": {
  25448. "type": "string",
  25449. "pattern": "^ses"
  25450. }
  25451. },
  25452. "required": ["timestamp", "sessionID"],
  25453. "additionalProperties": false
  25454. }
  25455. },
  25456. "required": ["id", "type", "properties"],
  25457. "additionalProperties": false
  25458. },
  25459. "EventSessionNextContextUpdated": {
  25460. "type": "object",
  25461. "properties": {
  25462. "id": {
  25463. "type": "string",
  25464. "pattern": "^evt_"
  25465. },
  25466. "type": {
  25467. "type": "string",
  25468. "enum": ["session.next.context.updated"]
  25469. },
  25470. "properties": {
  25471. "type": "object",
  25472. "properties": {
  25473. "timestamp": {
  25474. "type": "number"
  25475. },
  25476. "sessionID": {
  25477. "type": "string",
  25478. "pattern": "^ses"
  25479. },
  25480. "messageID": {
  25481. "type": "string",
  25482. "pattern": "^msg_"
  25483. },
  25484. "text": {
  25485. "type": "string"
  25486. }
  25487. },
  25488. "required": ["timestamp", "sessionID", "messageID", "text"],
  25489. "additionalProperties": false
  25490. }
  25491. },
  25492. "required": ["id", "type", "properties"],
  25493. "additionalProperties": false
  25494. },
  25495. "EventSessionNextSynthetic": {
  25496. "type": "object",
  25497. "properties": {
  25498. "id": {
  25499. "type": "string",
  25500. "pattern": "^evt_"
  25501. },
  25502. "type": {
  25503. "type": "string",
  25504. "enum": ["session.next.synthetic"]
  25505. },
  25506. "properties": {
  25507. "type": "object",
  25508. "properties": {
  25509. "timestamp": {
  25510. "type": "number"
  25511. },
  25512. "sessionID": {
  25513. "type": "string",
  25514. "pattern": "^ses"
  25515. },
  25516. "messageID": {
  25517. "type": "string",
  25518. "pattern": "^msg_"
  25519. },
  25520. "text": {
  25521. "type": "string"
  25522. }
  25523. },
  25524. "required": ["timestamp", "sessionID", "messageID", "text"],
  25525. "additionalProperties": false
  25526. }
  25527. },
  25528. "required": ["id", "type", "properties"],
  25529. "additionalProperties": false
  25530. },
  25531. "EventSessionNextShellStarted": {
  25532. "type": "object",
  25533. "properties": {
  25534. "id": {
  25535. "type": "string",
  25536. "pattern": "^evt_"
  25537. },
  25538. "type": {
  25539. "type": "string",
  25540. "enum": ["session.next.shell.started"]
  25541. },
  25542. "properties": {
  25543. "type": "object",
  25544. "properties": {
  25545. "timestamp": {
  25546. "type": "number"
  25547. },
  25548. "sessionID": {
  25549. "type": "string",
  25550. "pattern": "^ses"
  25551. },
  25552. "messageID": {
  25553. "type": "string",
  25554. "pattern": "^msg_"
  25555. },
  25556. "callID": {
  25557. "type": "string"
  25558. },
  25559. "command": {
  25560. "type": "string"
  25561. }
  25562. },
  25563. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25564. "additionalProperties": false
  25565. }
  25566. },
  25567. "required": ["id", "type", "properties"],
  25568. "additionalProperties": false
  25569. },
  25570. "EventSessionNextShellEnded": {
  25571. "type": "object",
  25572. "properties": {
  25573. "id": {
  25574. "type": "string",
  25575. "pattern": "^evt_"
  25576. },
  25577. "type": {
  25578. "type": "string",
  25579. "enum": ["session.next.shell.ended"]
  25580. },
  25581. "properties": {
  25582. "type": "object",
  25583. "properties": {
  25584. "timestamp": {
  25585. "type": "number"
  25586. },
  25587. "sessionID": {
  25588. "type": "string",
  25589. "pattern": "^ses"
  25590. },
  25591. "callID": {
  25592. "type": "string"
  25593. },
  25594. "output": {
  25595. "type": "string"
  25596. }
  25597. },
  25598. "required": ["timestamp", "sessionID", "callID", "output"],
  25599. "additionalProperties": false
  25600. }
  25601. },
  25602. "required": ["id", "type", "properties"],
  25603. "additionalProperties": false
  25604. },
  25605. "EventSessionNextStepStarted": {
  25606. "type": "object",
  25607. "properties": {
  25608. "id": {
  25609. "type": "string",
  25610. "pattern": "^evt_"
  25611. },
  25612. "type": {
  25613. "type": "string",
  25614. "enum": ["session.next.step.started"]
  25615. },
  25616. "properties": {
  25617. "type": "object",
  25618. "properties": {
  25619. "timestamp": {
  25620. "type": "number"
  25621. },
  25622. "sessionID": {
  25623. "type": "string",
  25624. "pattern": "^ses"
  25625. },
  25626. "assistantMessageID": {
  25627. "type": "string",
  25628. "pattern": "^msg_"
  25629. },
  25630. "agent": {
  25631. "type": "string"
  25632. },
  25633. "model": {
  25634. "type": "object",
  25635. "properties": {
  25636. "id": {
  25637. "type": "string"
  25638. },
  25639. "providerID": {
  25640. "type": "string"
  25641. },
  25642. "variant": {
  25643. "type": "string"
  25644. }
  25645. },
  25646. "required": ["id", "providerID"],
  25647. "additionalProperties": false
  25648. },
  25649. "snapshot": {
  25650. "type": "string"
  25651. }
  25652. },
  25653. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25654. "additionalProperties": false
  25655. }
  25656. },
  25657. "required": ["id", "type", "properties"],
  25658. "additionalProperties": false
  25659. },
  25660. "EventSessionNextStepEnded": {
  25661. "type": "object",
  25662. "properties": {
  25663. "id": {
  25664. "type": "string",
  25665. "pattern": "^evt_"
  25666. },
  25667. "type": {
  25668. "type": "string",
  25669. "enum": ["session.next.step.ended"]
  25670. },
  25671. "properties": {
  25672. "type": "object",
  25673. "properties": {
  25674. "timestamp": {
  25675. "type": "number"
  25676. },
  25677. "sessionID": {
  25678. "type": "string",
  25679. "pattern": "^ses"
  25680. },
  25681. "assistantMessageID": {
  25682. "type": "string",
  25683. "pattern": "^msg_"
  25684. },
  25685. "finish": {
  25686. "type": "string"
  25687. },
  25688. "cost": {
  25689. "type": "number"
  25690. },
  25691. "tokens": {
  25692. "type": "object",
  25693. "properties": {
  25694. "input": {
  25695. "type": "number"
  25696. },
  25697. "output": {
  25698. "type": "number"
  25699. },
  25700. "reasoning": {
  25701. "type": "number"
  25702. },
  25703. "cache": {
  25704. "type": "object",
  25705. "properties": {
  25706. "read": {
  25707. "type": "number"
  25708. },
  25709. "write": {
  25710. "type": "number"
  25711. }
  25712. },
  25713. "required": ["read", "write"],
  25714. "additionalProperties": false
  25715. }
  25716. },
  25717. "required": ["input", "output", "reasoning", "cache"],
  25718. "additionalProperties": false
  25719. },
  25720. "snapshot": {
  25721. "type": "string"
  25722. }
  25723. },
  25724. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25725. "additionalProperties": false
  25726. }
  25727. },
  25728. "required": ["id", "type", "properties"],
  25729. "additionalProperties": false
  25730. },
  25731. "EventSessionNextStepFailed": {
  25732. "type": "object",
  25733. "properties": {
  25734. "id": {
  25735. "type": "string",
  25736. "pattern": "^evt_"
  25737. },
  25738. "type": {
  25739. "type": "string",
  25740. "enum": ["session.next.step.failed"]
  25741. },
  25742. "properties": {
  25743. "type": "object",
  25744. "properties": {
  25745. "timestamp": {
  25746. "type": "number"
  25747. },
  25748. "sessionID": {
  25749. "type": "string",
  25750. "pattern": "^ses"
  25751. },
  25752. "assistantMessageID": {
  25753. "type": "string",
  25754. "pattern": "^msg_"
  25755. },
  25756. "error": {
  25757. "$ref": "#/components/schemas/SessionErrorUnknown"
  25758. }
  25759. },
  25760. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25761. "additionalProperties": false
  25762. }
  25763. },
  25764. "required": ["id", "type", "properties"],
  25765. "additionalProperties": false
  25766. },
  25767. "EventSessionNextTextStarted": {
  25768. "type": "object",
  25769. "properties": {
  25770. "id": {
  25771. "type": "string",
  25772. "pattern": "^evt_"
  25773. },
  25774. "type": {
  25775. "type": "string",
  25776. "enum": ["session.next.text.started"]
  25777. },
  25778. "properties": {
  25779. "type": "object",
  25780. "properties": {
  25781. "timestamp": {
  25782. "type": "number"
  25783. },
  25784. "sessionID": {
  25785. "type": "string",
  25786. "pattern": "^ses"
  25787. },
  25788. "assistantMessageID": {
  25789. "type": "string",
  25790. "pattern": "^msg_"
  25791. },
  25792. "textID": {
  25793. "type": "string"
  25794. }
  25795. },
  25796. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25797. "additionalProperties": false
  25798. }
  25799. },
  25800. "required": ["id", "type", "properties"],
  25801. "additionalProperties": false
  25802. },
  25803. "EventSessionNextTextDelta": {
  25804. "type": "object",
  25805. "properties": {
  25806. "id": {
  25807. "type": "string",
  25808. "pattern": "^evt_"
  25809. },
  25810. "type": {
  25811. "type": "string",
  25812. "enum": ["session.next.text.delta"]
  25813. },
  25814. "properties": {
  25815. "type": "object",
  25816. "properties": {
  25817. "timestamp": {
  25818. "type": "number"
  25819. },
  25820. "sessionID": {
  25821. "type": "string",
  25822. "pattern": "^ses"
  25823. },
  25824. "assistantMessageID": {
  25825. "type": "string",
  25826. "pattern": "^msg_"
  25827. },
  25828. "textID": {
  25829. "type": "string"
  25830. },
  25831. "delta": {
  25832. "type": "string"
  25833. }
  25834. },
  25835. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  25836. "additionalProperties": false
  25837. }
  25838. },
  25839. "required": ["id", "type", "properties"],
  25840. "additionalProperties": false
  25841. },
  25842. "EventSessionNextTextEnded": {
  25843. "type": "object",
  25844. "properties": {
  25845. "id": {
  25846. "type": "string",
  25847. "pattern": "^evt_"
  25848. },
  25849. "type": {
  25850. "type": "string",
  25851. "enum": ["session.next.text.ended"]
  25852. },
  25853. "properties": {
  25854. "type": "object",
  25855. "properties": {
  25856. "timestamp": {
  25857. "type": "number"
  25858. },
  25859. "sessionID": {
  25860. "type": "string",
  25861. "pattern": "^ses"
  25862. },
  25863. "assistantMessageID": {
  25864. "type": "string",
  25865. "pattern": "^msg_"
  25866. },
  25867. "textID": {
  25868. "type": "string"
  25869. },
  25870. "text": {
  25871. "type": "string"
  25872. }
  25873. },
  25874. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25875. "additionalProperties": false
  25876. }
  25877. },
  25878. "required": ["id", "type", "properties"],
  25879. "additionalProperties": false
  25880. },
  25881. "EventSessionNextReasoningStarted": {
  25882. "type": "object",
  25883. "properties": {
  25884. "id": {
  25885. "type": "string",
  25886. "pattern": "^evt_"
  25887. },
  25888. "type": {
  25889. "type": "string",
  25890. "enum": ["session.next.reasoning.started"]
  25891. },
  25892. "properties": {
  25893. "type": "object",
  25894. "properties": {
  25895. "timestamp": {
  25896. "type": "number"
  25897. },
  25898. "sessionID": {
  25899. "type": "string",
  25900. "pattern": "^ses"
  25901. },
  25902. "assistantMessageID": {
  25903. "type": "string",
  25904. "pattern": "^msg_"
  25905. },
  25906. "reasoningID": {
  25907. "type": "string"
  25908. },
  25909. "providerMetadata": {
  25910. "type": "object",
  25911. "additionalProperties": {
  25912. "type": "object"
  25913. }
  25914. }
  25915. },
  25916. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25917. "additionalProperties": false
  25918. }
  25919. },
  25920. "required": ["id", "type", "properties"],
  25921. "additionalProperties": false
  25922. },
  25923. "EventSessionNextReasoningDelta": {
  25924. "type": "object",
  25925. "properties": {
  25926. "id": {
  25927. "type": "string",
  25928. "pattern": "^evt_"
  25929. },
  25930. "type": {
  25931. "type": "string",
  25932. "enum": ["session.next.reasoning.delta"]
  25933. },
  25934. "properties": {
  25935. "type": "object",
  25936. "properties": {
  25937. "timestamp": {
  25938. "type": "number"
  25939. },
  25940. "sessionID": {
  25941. "type": "string",
  25942. "pattern": "^ses"
  25943. },
  25944. "assistantMessageID": {
  25945. "type": "string",
  25946. "pattern": "^msg_"
  25947. },
  25948. "reasoningID": {
  25949. "type": "string"
  25950. },
  25951. "delta": {
  25952. "type": "string"
  25953. }
  25954. },
  25955. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  25956. "additionalProperties": false
  25957. }
  25958. },
  25959. "required": ["id", "type", "properties"],
  25960. "additionalProperties": false
  25961. },
  25962. "EventSessionNextReasoningEnded": {
  25963. "type": "object",
  25964. "properties": {
  25965. "id": {
  25966. "type": "string",
  25967. "pattern": "^evt_"
  25968. },
  25969. "type": {
  25970. "type": "string",
  25971. "enum": ["session.next.reasoning.ended"]
  25972. },
  25973. "properties": {
  25974. "type": "object",
  25975. "properties": {
  25976. "timestamp": {
  25977. "type": "number"
  25978. },
  25979. "sessionID": {
  25980. "type": "string",
  25981. "pattern": "^ses"
  25982. },
  25983. "assistantMessageID": {
  25984. "type": "string",
  25985. "pattern": "^msg_"
  25986. },
  25987. "reasoningID": {
  25988. "type": "string"
  25989. },
  25990. "text": {
  25991. "type": "string"
  25992. },
  25993. "providerMetadata": {
  25994. "type": "object",
  25995. "additionalProperties": {
  25996. "type": "object"
  25997. }
  25998. }
  25999. },
  26000. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26001. "additionalProperties": false
  26002. }
  26003. },
  26004. "required": ["id", "type", "properties"],
  26005. "additionalProperties": false
  26006. },
  26007. "EventSessionNextToolInputStarted": {
  26008. "type": "object",
  26009. "properties": {
  26010. "id": {
  26011. "type": "string",
  26012. "pattern": "^evt_"
  26013. },
  26014. "type": {
  26015. "type": "string",
  26016. "enum": ["session.next.tool.input.started"]
  26017. },
  26018. "properties": {
  26019. "type": "object",
  26020. "properties": {
  26021. "timestamp": {
  26022. "type": "number"
  26023. },
  26024. "sessionID": {
  26025. "type": "string",
  26026. "pattern": "^ses"
  26027. },
  26028. "assistantMessageID": {
  26029. "type": "string",
  26030. "pattern": "^msg_"
  26031. },
  26032. "callID": {
  26033. "type": "string"
  26034. },
  26035. "name": {
  26036. "type": "string"
  26037. }
  26038. },
  26039. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26040. "additionalProperties": false
  26041. }
  26042. },
  26043. "required": ["id", "type", "properties"],
  26044. "additionalProperties": false
  26045. },
  26046. "EventSessionNextToolInputDelta": {
  26047. "type": "object",
  26048. "properties": {
  26049. "id": {
  26050. "type": "string",
  26051. "pattern": "^evt_"
  26052. },
  26053. "type": {
  26054. "type": "string",
  26055. "enum": ["session.next.tool.input.delta"]
  26056. },
  26057. "properties": {
  26058. "type": "object",
  26059. "properties": {
  26060. "timestamp": {
  26061. "type": "number"
  26062. },
  26063. "sessionID": {
  26064. "type": "string",
  26065. "pattern": "^ses"
  26066. },
  26067. "assistantMessageID": {
  26068. "type": "string",
  26069. "pattern": "^msg_"
  26070. },
  26071. "callID": {
  26072. "type": "string"
  26073. },
  26074. "delta": {
  26075. "type": "string"
  26076. }
  26077. },
  26078. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  26079. "additionalProperties": false
  26080. }
  26081. },
  26082. "required": ["id", "type", "properties"],
  26083. "additionalProperties": false
  26084. },
  26085. "EventSessionNextToolInputEnded": {
  26086. "type": "object",
  26087. "properties": {
  26088. "id": {
  26089. "type": "string",
  26090. "pattern": "^evt_"
  26091. },
  26092. "type": {
  26093. "type": "string",
  26094. "enum": ["session.next.tool.input.ended"]
  26095. },
  26096. "properties": {
  26097. "type": "object",
  26098. "properties": {
  26099. "timestamp": {
  26100. "type": "number"
  26101. },
  26102. "sessionID": {
  26103. "type": "string",
  26104. "pattern": "^ses"
  26105. },
  26106. "assistantMessageID": {
  26107. "type": "string",
  26108. "pattern": "^msg_"
  26109. },
  26110. "callID": {
  26111. "type": "string"
  26112. },
  26113. "text": {
  26114. "type": "string"
  26115. }
  26116. },
  26117. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26118. "additionalProperties": false
  26119. }
  26120. },
  26121. "required": ["id", "type", "properties"],
  26122. "additionalProperties": false
  26123. },
  26124. "EventSessionNextToolCalled": {
  26125. "type": "object",
  26126. "properties": {
  26127. "id": {
  26128. "type": "string",
  26129. "pattern": "^evt_"
  26130. },
  26131. "type": {
  26132. "type": "string",
  26133. "enum": ["session.next.tool.called"]
  26134. },
  26135. "properties": {
  26136. "type": "object",
  26137. "properties": {
  26138. "timestamp": {
  26139. "type": "number"
  26140. },
  26141. "sessionID": {
  26142. "type": "string",
  26143. "pattern": "^ses"
  26144. },
  26145. "assistantMessageID": {
  26146. "type": "string",
  26147. "pattern": "^msg_"
  26148. },
  26149. "callID": {
  26150. "type": "string"
  26151. },
  26152. "tool": {
  26153. "type": "string"
  26154. },
  26155. "input": {
  26156. "type": "object"
  26157. },
  26158. "provider": {
  26159. "type": "object",
  26160. "properties": {
  26161. "executed": {
  26162. "type": "boolean"
  26163. },
  26164. "metadata": {
  26165. "type": "object",
  26166. "additionalProperties": {
  26167. "type": "object"
  26168. }
  26169. }
  26170. },
  26171. "required": ["executed"],
  26172. "additionalProperties": false
  26173. }
  26174. },
  26175. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26176. "additionalProperties": false
  26177. }
  26178. },
  26179. "required": ["id", "type", "properties"],
  26180. "additionalProperties": false
  26181. },
  26182. "EventSessionNextToolProgress": {
  26183. "type": "object",
  26184. "properties": {
  26185. "id": {
  26186. "type": "string",
  26187. "pattern": "^evt_"
  26188. },
  26189. "type": {
  26190. "type": "string",
  26191. "enum": ["session.next.tool.progress"]
  26192. },
  26193. "properties": {
  26194. "type": "object",
  26195. "properties": {
  26196. "timestamp": {
  26197. "type": "number"
  26198. },
  26199. "sessionID": {
  26200. "type": "string",
  26201. "pattern": "^ses"
  26202. },
  26203. "assistantMessageID": {
  26204. "type": "string",
  26205. "pattern": "^msg_"
  26206. },
  26207. "callID": {
  26208. "type": "string"
  26209. },
  26210. "structured": {
  26211. "type": "object"
  26212. },
  26213. "content": {
  26214. "type": "array",
  26215. "items": {
  26216. "anyOf": [
  26217. {
  26218. "$ref": "#/components/schemas/ToolTextContent"
  26219. },
  26220. {
  26221. "$ref": "#/components/schemas/ToolFileContent"
  26222. }
  26223. ]
  26224. }
  26225. }
  26226. },
  26227. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26228. "additionalProperties": false
  26229. }
  26230. },
  26231. "required": ["id", "type", "properties"],
  26232. "additionalProperties": false
  26233. },
  26234. "EventSessionNextToolSuccess": {
  26235. "type": "object",
  26236. "properties": {
  26237. "id": {
  26238. "type": "string",
  26239. "pattern": "^evt_"
  26240. },
  26241. "type": {
  26242. "type": "string",
  26243. "enum": ["session.next.tool.success"]
  26244. },
  26245. "properties": {
  26246. "type": "object",
  26247. "properties": {
  26248. "timestamp": {
  26249. "type": "number"
  26250. },
  26251. "sessionID": {
  26252. "type": "string",
  26253. "pattern": "^ses"
  26254. },
  26255. "assistantMessageID": {
  26256. "type": "string",
  26257. "pattern": "^msg_"
  26258. },
  26259. "callID": {
  26260. "type": "string"
  26261. },
  26262. "structured": {
  26263. "type": "object"
  26264. },
  26265. "content": {
  26266. "type": "array",
  26267. "items": {
  26268. "anyOf": [
  26269. {
  26270. "$ref": "#/components/schemas/ToolTextContent"
  26271. },
  26272. {
  26273. "$ref": "#/components/schemas/ToolFileContent"
  26274. }
  26275. ]
  26276. }
  26277. },
  26278. "result": {},
  26279. "provider": {
  26280. "type": "object",
  26281. "properties": {
  26282. "executed": {
  26283. "type": "boolean"
  26284. },
  26285. "metadata": {
  26286. "type": "object",
  26287. "additionalProperties": {
  26288. "type": "object"
  26289. }
  26290. }
  26291. },
  26292. "required": ["executed"],
  26293. "additionalProperties": false
  26294. }
  26295. },
  26296. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  26297. "additionalProperties": false
  26298. }
  26299. },
  26300. "required": ["id", "type", "properties"],
  26301. "additionalProperties": false
  26302. },
  26303. "EventSessionNextToolFailed": {
  26304. "type": "object",
  26305. "properties": {
  26306. "id": {
  26307. "type": "string",
  26308. "pattern": "^evt_"
  26309. },
  26310. "type": {
  26311. "type": "string",
  26312. "enum": ["session.next.tool.failed"]
  26313. },
  26314. "properties": {
  26315. "type": "object",
  26316. "properties": {
  26317. "timestamp": {
  26318. "type": "number"
  26319. },
  26320. "sessionID": {
  26321. "type": "string",
  26322. "pattern": "^ses"
  26323. },
  26324. "assistantMessageID": {
  26325. "type": "string",
  26326. "pattern": "^msg_"
  26327. },
  26328. "callID": {
  26329. "type": "string"
  26330. },
  26331. "error": {
  26332. "$ref": "#/components/schemas/SessionErrorUnknown"
  26333. },
  26334. "result": {},
  26335. "provider": {
  26336. "type": "object",
  26337. "properties": {
  26338. "executed": {
  26339. "type": "boolean"
  26340. },
  26341. "metadata": {
  26342. "type": "object",
  26343. "additionalProperties": {
  26344. "type": "object"
  26345. }
  26346. }
  26347. },
  26348. "required": ["executed"],
  26349. "additionalProperties": false
  26350. }
  26351. },
  26352. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26353. "additionalProperties": false
  26354. }
  26355. },
  26356. "required": ["id", "type", "properties"],
  26357. "additionalProperties": false
  26358. },
  26359. "EventSessionNextRetried": {
  26360. "type": "object",
  26361. "properties": {
  26362. "id": {
  26363. "type": "string",
  26364. "pattern": "^evt_"
  26365. },
  26366. "type": {
  26367. "type": "string",
  26368. "enum": ["session.next.retried"]
  26369. },
  26370. "properties": {
  26371. "type": "object",
  26372. "properties": {
  26373. "timestamp": {
  26374. "type": "number"
  26375. },
  26376. "sessionID": {
  26377. "type": "string",
  26378. "pattern": "^ses"
  26379. },
  26380. "attempt": {
  26381. "type": "number"
  26382. },
  26383. "error": {
  26384. "$ref": "#/components/schemas/SessionNextRetry_error"
  26385. }
  26386. },
  26387. "required": ["timestamp", "sessionID", "attempt", "error"],
  26388. "additionalProperties": false
  26389. }
  26390. },
  26391. "required": ["id", "type", "properties"],
  26392. "additionalProperties": false
  26393. },
  26394. "EventSessionNextCompactionStarted": {
  26395. "type": "object",
  26396. "properties": {
  26397. "id": {
  26398. "type": "string",
  26399. "pattern": "^evt_"
  26400. },
  26401. "type": {
  26402. "type": "string",
  26403. "enum": ["session.next.compaction.started"]
  26404. },
  26405. "properties": {
  26406. "type": "object",
  26407. "properties": {
  26408. "timestamp": {
  26409. "type": "number"
  26410. },
  26411. "sessionID": {
  26412. "type": "string",
  26413. "pattern": "^ses"
  26414. },
  26415. "messageID": {
  26416. "type": "string",
  26417. "pattern": "^msg_"
  26418. },
  26419. "reason": {
  26420. "type": "string",
  26421. "enum": ["auto", "manual"]
  26422. }
  26423. },
  26424. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26425. "additionalProperties": false
  26426. }
  26427. },
  26428. "required": ["id", "type", "properties"],
  26429. "additionalProperties": false
  26430. },
  26431. "EventSessionNextCompactionDelta": {
  26432. "type": "object",
  26433. "properties": {
  26434. "id": {
  26435. "type": "string",
  26436. "pattern": "^evt_"
  26437. },
  26438. "type": {
  26439. "type": "string",
  26440. "enum": ["session.next.compaction.delta"]
  26441. },
  26442. "properties": {
  26443. "type": "object",
  26444. "properties": {
  26445. "timestamp": {
  26446. "type": "number"
  26447. },
  26448. "sessionID": {
  26449. "type": "string",
  26450. "pattern": "^ses"
  26451. },
  26452. "messageID": {
  26453. "type": "string",
  26454. "pattern": "^msg_"
  26455. },
  26456. "text": {
  26457. "type": "string"
  26458. }
  26459. },
  26460. "required": ["timestamp", "sessionID", "messageID", "text"],
  26461. "additionalProperties": false
  26462. }
  26463. },
  26464. "required": ["id", "type", "properties"],
  26465. "additionalProperties": false
  26466. },
  26467. "EventSessionNextCompactionEnded": {
  26468. "type": "object",
  26469. "properties": {
  26470. "id": {
  26471. "type": "string",
  26472. "pattern": "^evt_"
  26473. },
  26474. "type": {
  26475. "type": "string",
  26476. "enum": ["session.next.compaction.ended"]
  26477. },
  26478. "properties": {
  26479. "type": "object",
  26480. "properties": {
  26481. "timestamp": {
  26482. "type": "number"
  26483. },
  26484. "sessionID": {
  26485. "type": "string",
  26486. "pattern": "^ses"
  26487. },
  26488. "messageID": {
  26489. "type": "string",
  26490. "pattern": "^msg_"
  26491. },
  26492. "reason": {
  26493. "type": "string",
  26494. "enum": ["auto", "manual"]
  26495. },
  26496. "text": {
  26497. "type": "string"
  26498. },
  26499. "recent": {
  26500. "type": "string"
  26501. }
  26502. },
  26503. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26504. "additionalProperties": false
  26505. }
  26506. },
  26507. "required": ["id", "type", "properties"],
  26508. "additionalProperties": false
  26509. },
  26510. "EventMessagePartDelta": {
  26511. "type": "object",
  26512. "properties": {
  26513. "id": {
  26514. "type": "string",
  26515. "pattern": "^evt_"
  26516. },
  26517. "type": {
  26518. "type": "string",
  26519. "enum": ["message.part.delta"]
  26520. },
  26521. "properties": {
  26522. "type": "object",
  26523. "properties": {
  26524. "sessionID": {
  26525. "type": "string",
  26526. "pattern": "^ses"
  26527. },
  26528. "messageID": {
  26529. "type": "string",
  26530. "pattern": "^msg"
  26531. },
  26532. "partID": {
  26533. "type": "string",
  26534. "pattern": "^prt"
  26535. },
  26536. "field": {
  26537. "type": "string"
  26538. },
  26539. "delta": {
  26540. "type": "string"
  26541. }
  26542. },
  26543. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  26544. "additionalProperties": false
  26545. }
  26546. },
  26547. "required": ["id", "type", "properties"],
  26548. "additionalProperties": false
  26549. },
  26550. "EventSessionDiff": {
  26551. "type": "object",
  26552. "properties": {
  26553. "id": {
  26554. "type": "string",
  26555. "pattern": "^evt_"
  26556. },
  26557. "type": {
  26558. "type": "string",
  26559. "enum": ["session.diff"]
  26560. },
  26561. "properties": {
  26562. "type": "object",
  26563. "properties": {
  26564. "sessionID": {
  26565. "type": "string",
  26566. "pattern": "^ses"
  26567. },
  26568. "diff": {
  26569. "type": "array",
  26570. "items": {
  26571. "$ref": "#/components/schemas/SnapshotFileDiff"
  26572. }
  26573. }
  26574. },
  26575. "required": ["sessionID", "diff"],
  26576. "additionalProperties": false
  26577. }
  26578. },
  26579. "required": ["id", "type", "properties"],
  26580. "additionalProperties": false
  26581. },
  26582. "EventSessionError": {
  26583. "type": "object",
  26584. "properties": {
  26585. "id": {
  26586. "type": "string",
  26587. "pattern": "^evt_"
  26588. },
  26589. "type": {
  26590. "type": "string",
  26591. "enum": ["session.error"]
  26592. },
  26593. "properties": {
  26594. "type": "object",
  26595. "properties": {
  26596. "sessionID": {
  26597. "type": "string",
  26598. "pattern": "^ses"
  26599. },
  26600. "error": {
  26601. "anyOf": [
  26602. {
  26603. "$ref": "#/components/schemas/ProviderAuthError"
  26604. },
  26605. {
  26606. "$ref": "#/components/schemas/UnknownError"
  26607. },
  26608. {
  26609. "$ref": "#/components/schemas/MessageOutputLengthError"
  26610. },
  26611. {
  26612. "$ref": "#/components/schemas/MessageAbortedError"
  26613. },
  26614. {
  26615. "$ref": "#/components/schemas/StructuredOutputError"
  26616. },
  26617. {
  26618. "$ref": "#/components/schemas/ContextOverflowError"
  26619. },
  26620. {
  26621. "$ref": "#/components/schemas/APIError"
  26622. }
  26623. ]
  26624. }
  26625. },
  26626. "additionalProperties": false
  26627. }
  26628. },
  26629. "required": ["id", "type", "properties"],
  26630. "additionalProperties": false
  26631. },
  26632. "EventInstallationUpdated": {
  26633. "type": "object",
  26634. "properties": {
  26635. "id": {
  26636. "type": "string",
  26637. "pattern": "^evt_"
  26638. },
  26639. "type": {
  26640. "type": "string",
  26641. "enum": ["installation.updated"]
  26642. },
  26643. "properties": {
  26644. "type": "object",
  26645. "properties": {
  26646. "version": {
  26647. "type": "string"
  26648. }
  26649. },
  26650. "required": ["version"],
  26651. "additionalProperties": false
  26652. }
  26653. },
  26654. "required": ["id", "type", "properties"],
  26655. "additionalProperties": false
  26656. },
  26657. "EventInstallationUpdate-available": {
  26658. "type": "object",
  26659. "properties": {
  26660. "id": {
  26661. "type": "string",
  26662. "pattern": "^evt_"
  26663. },
  26664. "type": {
  26665. "type": "string",
  26666. "enum": ["installation.update-available"]
  26667. },
  26668. "properties": {
  26669. "type": "object",
  26670. "properties": {
  26671. "version": {
  26672. "type": "string"
  26673. }
  26674. },
  26675. "required": ["version"],
  26676. "additionalProperties": false
  26677. }
  26678. },
  26679. "required": ["id", "type", "properties"],
  26680. "additionalProperties": false
  26681. },
  26682. "EventFileEdited": {
  26683. "type": "object",
  26684. "properties": {
  26685. "id": {
  26686. "type": "string",
  26687. "pattern": "^evt_"
  26688. },
  26689. "type": {
  26690. "type": "string",
  26691. "enum": ["file.edited"]
  26692. },
  26693. "properties": {
  26694. "type": "object",
  26695. "properties": {
  26696. "file": {
  26697. "type": "string"
  26698. }
  26699. },
  26700. "required": ["file"],
  26701. "additionalProperties": false
  26702. }
  26703. },
  26704. "required": ["id", "type", "properties"],
  26705. "additionalProperties": false
  26706. },
  26707. "EventAccountAdded": {
  26708. "type": "object",
  26709. "properties": {
  26710. "id": {
  26711. "type": "string",
  26712. "pattern": "^evt_"
  26713. },
  26714. "type": {
  26715. "type": "string",
  26716. "enum": ["account.added"]
  26717. },
  26718. "properties": {
  26719. "type": "object",
  26720. "properties": {
  26721. "account": {
  26722. "$ref": "#/components/schemas/AuthInfo"
  26723. }
  26724. },
  26725. "required": ["account"],
  26726. "additionalProperties": false
  26727. }
  26728. },
  26729. "required": ["id", "type", "properties"],
  26730. "additionalProperties": false
  26731. },
  26732. "EventAccountRemoved": {
  26733. "type": "object",
  26734. "properties": {
  26735. "id": {
  26736. "type": "string",
  26737. "pattern": "^evt_"
  26738. },
  26739. "type": {
  26740. "type": "string",
  26741. "enum": ["account.removed"]
  26742. },
  26743. "properties": {
  26744. "type": "object",
  26745. "properties": {
  26746. "account": {
  26747. "$ref": "#/components/schemas/AuthInfo"
  26748. }
  26749. },
  26750. "required": ["account"],
  26751. "additionalProperties": false
  26752. }
  26753. },
  26754. "required": ["id", "type", "properties"],
  26755. "additionalProperties": false
  26756. },
  26757. "EventAccountSwitched": {
  26758. "type": "object",
  26759. "properties": {
  26760. "id": {
  26761. "type": "string",
  26762. "pattern": "^evt_"
  26763. },
  26764. "type": {
  26765. "type": "string",
  26766. "enum": ["account.switched"]
  26767. },
  26768. "properties": {
  26769. "type": "object",
  26770. "properties": {
  26771. "serviceID": {
  26772. "type": "string"
  26773. },
  26774. "from": {
  26775. "type": "string"
  26776. },
  26777. "to": {
  26778. "type": "string"
  26779. }
  26780. },
  26781. "required": ["serviceID"],
  26782. "additionalProperties": false
  26783. }
  26784. },
  26785. "required": ["id", "type", "properties"],
  26786. "additionalProperties": false
  26787. },
  26788. "EventPermissionV2Asked": {
  26789. "type": "object",
  26790. "properties": {
  26791. "id": {
  26792. "type": "string",
  26793. "pattern": "^evt_"
  26794. },
  26795. "type": {
  26796. "type": "string",
  26797. "enum": ["permission.v2.asked"]
  26798. },
  26799. "properties": {
  26800. "type": "object",
  26801. "properties": {
  26802. "id": {
  26803. "type": "string",
  26804. "pattern": "^per"
  26805. },
  26806. "sessionID": {
  26807. "type": "string",
  26808. "pattern": "^ses"
  26809. },
  26810. "action": {
  26811. "type": "string"
  26812. },
  26813. "resources": {
  26814. "type": "array",
  26815. "items": {
  26816. "type": "string"
  26817. }
  26818. },
  26819. "save": {
  26820. "type": "array",
  26821. "items": {
  26822. "type": "string"
  26823. }
  26824. },
  26825. "metadata": {
  26826. "type": "object"
  26827. },
  26828. "source": {
  26829. "$ref": "#/components/schemas/PermissionV2Source"
  26830. }
  26831. },
  26832. "required": ["id", "sessionID", "action", "resources"],
  26833. "additionalProperties": false
  26834. }
  26835. },
  26836. "required": ["id", "type", "properties"],
  26837. "additionalProperties": false
  26838. },
  26839. "EventPermissionV2Replied": {
  26840. "type": "object",
  26841. "properties": {
  26842. "id": {
  26843. "type": "string",
  26844. "pattern": "^evt_"
  26845. },
  26846. "type": {
  26847. "type": "string",
  26848. "enum": ["permission.v2.replied"]
  26849. },
  26850. "properties": {
  26851. "type": "object",
  26852. "properties": {
  26853. "sessionID": {
  26854. "type": "string",
  26855. "pattern": "^ses"
  26856. },
  26857. "requestID": {
  26858. "type": "string",
  26859. "pattern": "^per"
  26860. },
  26861. "reply": {
  26862. "$ref": "#/components/schemas/PermissionV2Reply"
  26863. }
  26864. },
  26865. "required": ["sessionID", "requestID", "reply"],
  26866. "additionalProperties": false
  26867. }
  26868. },
  26869. "required": ["id", "type", "properties"],
  26870. "additionalProperties": false
  26871. },
  26872. "EventFileWatcherUpdated": {
  26873. "type": "object",
  26874. "properties": {
  26875. "id": {
  26876. "type": "string",
  26877. "pattern": "^evt_"
  26878. },
  26879. "type": {
  26880. "type": "string",
  26881. "enum": ["file.watcher.updated"]
  26882. },
  26883. "properties": {
  26884. "type": "object",
  26885. "properties": {
  26886. "file": {
  26887. "type": "string"
  26888. },
  26889. "event": {
  26890. "type": "string",
  26891. "enum": ["add", "change", "unlink"]
  26892. }
  26893. },
  26894. "required": ["file", "event"],
  26895. "additionalProperties": false
  26896. }
  26897. },
  26898. "required": ["id", "type", "properties"],
  26899. "additionalProperties": false
  26900. },
  26901. "EventPtyCreated": {
  26902. "type": "object",
  26903. "properties": {
  26904. "id": {
  26905. "type": "string",
  26906. "pattern": "^evt_"
  26907. },
  26908. "type": {
  26909. "type": "string",
  26910. "enum": ["pty.created"]
  26911. },
  26912. "properties": {
  26913. "type": "object",
  26914. "properties": {
  26915. "info": {
  26916. "$ref": "#/components/schemas/Pty"
  26917. }
  26918. },
  26919. "required": ["info"],
  26920. "additionalProperties": false
  26921. }
  26922. },
  26923. "required": ["id", "type", "properties"],
  26924. "additionalProperties": false
  26925. },
  26926. "EventPtyUpdated": {
  26927. "type": "object",
  26928. "properties": {
  26929. "id": {
  26930. "type": "string",
  26931. "pattern": "^evt_"
  26932. },
  26933. "type": {
  26934. "type": "string",
  26935. "enum": ["pty.updated"]
  26936. },
  26937. "properties": {
  26938. "type": "object",
  26939. "properties": {
  26940. "info": {
  26941. "$ref": "#/components/schemas/Pty"
  26942. }
  26943. },
  26944. "required": ["info"],
  26945. "additionalProperties": false
  26946. }
  26947. },
  26948. "required": ["id", "type", "properties"],
  26949. "additionalProperties": false
  26950. },
  26951. "EventPtyExited": {
  26952. "type": "object",
  26953. "properties": {
  26954. "id": {
  26955. "type": "string",
  26956. "pattern": "^evt_"
  26957. },
  26958. "type": {
  26959. "type": "string",
  26960. "enum": ["pty.exited"]
  26961. },
  26962. "properties": {
  26963. "type": "object",
  26964. "properties": {
  26965. "id": {
  26966. "type": "string",
  26967. "pattern": "^pty"
  26968. },
  26969. "exitCode": {
  26970. "type": "integer",
  26971. "minimum": 0
  26972. }
  26973. },
  26974. "required": ["id", "exitCode"],
  26975. "additionalProperties": false
  26976. }
  26977. },
  26978. "required": ["id", "type", "properties"],
  26979. "additionalProperties": false
  26980. },
  26981. "EventPtyDeleted": {
  26982. "type": "object",
  26983. "properties": {
  26984. "id": {
  26985. "type": "string",
  26986. "pattern": "^evt_"
  26987. },
  26988. "type": {
  26989. "type": "string",
  26990. "enum": ["pty.deleted"]
  26991. },
  26992. "properties": {
  26993. "type": "object",
  26994. "properties": {
  26995. "id": {
  26996. "type": "string",
  26997. "pattern": "^pty"
  26998. }
  26999. },
  27000. "required": ["id"],
  27001. "additionalProperties": false
  27002. }
  27003. },
  27004. "required": ["id", "type", "properties"],
  27005. "additionalProperties": false
  27006. },
  27007. "EventQuestionV2Asked": {
  27008. "type": "object",
  27009. "properties": {
  27010. "id": {
  27011. "type": "string",
  27012. "pattern": "^evt_"
  27013. },
  27014. "type": {
  27015. "type": "string",
  27016. "enum": ["question.v2.asked"]
  27017. },
  27018. "properties": {
  27019. "type": "object",
  27020. "properties": {
  27021. "id": {
  27022. "type": "string",
  27023. "pattern": "^que"
  27024. },
  27025. "sessionID": {
  27026. "type": "string",
  27027. "pattern": "^ses"
  27028. },
  27029. "questions": {
  27030. "type": "array",
  27031. "items": {
  27032. "$ref": "#/components/schemas/QuestionV2Info"
  27033. },
  27034. "description": "Questions to ask"
  27035. },
  27036. "tool": {
  27037. "$ref": "#/components/schemas/QuestionV2Tool"
  27038. }
  27039. },
  27040. "required": ["id", "sessionID", "questions"],
  27041. "additionalProperties": false
  27042. }
  27043. },
  27044. "required": ["id", "type", "properties"],
  27045. "additionalProperties": false
  27046. },
  27047. "EventQuestionV2Replied": {
  27048. "type": "object",
  27049. "properties": {
  27050. "id": {
  27051. "type": "string",
  27052. "pattern": "^evt_"
  27053. },
  27054. "type": {
  27055. "type": "string",
  27056. "enum": ["question.v2.replied"]
  27057. },
  27058. "properties": {
  27059. "type": "object",
  27060. "properties": {
  27061. "sessionID": {
  27062. "type": "string",
  27063. "pattern": "^ses"
  27064. },
  27065. "requestID": {
  27066. "type": "string",
  27067. "pattern": "^que"
  27068. },
  27069. "answers": {
  27070. "type": "array",
  27071. "items": {
  27072. "$ref": "#/components/schemas/QuestionV2Answer"
  27073. }
  27074. }
  27075. },
  27076. "required": ["sessionID", "requestID", "answers"],
  27077. "additionalProperties": false
  27078. }
  27079. },
  27080. "required": ["id", "type", "properties"],
  27081. "additionalProperties": false
  27082. },
  27083. "EventQuestionV2Rejected": {
  27084. "type": "object",
  27085. "properties": {
  27086. "id": {
  27087. "type": "string",
  27088. "pattern": "^evt_"
  27089. },
  27090. "type": {
  27091. "type": "string",
  27092. "enum": ["question.v2.rejected"]
  27093. },
  27094. "properties": {
  27095. "type": "object",
  27096. "properties": {
  27097. "sessionID": {
  27098. "type": "string",
  27099. "pattern": "^ses"
  27100. },
  27101. "requestID": {
  27102. "type": "string",
  27103. "pattern": "^que"
  27104. }
  27105. },
  27106. "required": ["sessionID", "requestID"],
  27107. "additionalProperties": false
  27108. }
  27109. },
  27110. "required": ["id", "type", "properties"],
  27111. "additionalProperties": false
  27112. },
  27113. "EventTodoUpdated": {
  27114. "type": "object",
  27115. "properties": {
  27116. "id": {
  27117. "type": "string",
  27118. "pattern": "^evt_"
  27119. },
  27120. "type": {
  27121. "type": "string",
  27122. "enum": ["todo.updated"]
  27123. },
  27124. "properties": {
  27125. "type": "object",
  27126. "properties": {
  27127. "sessionID": {
  27128. "type": "string",
  27129. "pattern": "^ses"
  27130. },
  27131. "todos": {
  27132. "type": "array",
  27133. "items": {
  27134. "$ref": "#/components/schemas/Todo"
  27135. }
  27136. }
  27137. },
  27138. "required": ["sessionID", "todos"],
  27139. "additionalProperties": false
  27140. }
  27141. },
  27142. "required": ["id", "type", "properties"],
  27143. "additionalProperties": false
  27144. },
  27145. "EventLspUpdated": {
  27146. "type": "object",
  27147. "properties": {
  27148. "id": {
  27149. "type": "string",
  27150. "pattern": "^evt_"
  27151. },
  27152. "type": {
  27153. "type": "string",
  27154. "enum": ["lsp.updated"]
  27155. },
  27156. "properties": {
  27157. "type": "object",
  27158. "properties": {}
  27159. }
  27160. },
  27161. "required": ["id", "type", "properties"],
  27162. "additionalProperties": false
  27163. },
  27164. "EventPermissionAsked": {
  27165. "type": "object",
  27166. "properties": {
  27167. "id": {
  27168. "type": "string",
  27169. "pattern": "^evt_"
  27170. },
  27171. "type": {
  27172. "type": "string",
  27173. "enum": ["permission.asked"]
  27174. },
  27175. "properties": {
  27176. "type": "object",
  27177. "properties": {
  27178. "id": {
  27179. "type": "string",
  27180. "pattern": "^per"
  27181. },
  27182. "sessionID": {
  27183. "type": "string",
  27184. "pattern": "^ses"
  27185. },
  27186. "permission": {
  27187. "type": "string"
  27188. },
  27189. "patterns": {
  27190. "type": "array",
  27191. "items": {
  27192. "type": "string"
  27193. }
  27194. },
  27195. "metadata": {
  27196. "type": "object"
  27197. },
  27198. "always": {
  27199. "type": "array",
  27200. "items": {
  27201. "type": "string"
  27202. }
  27203. },
  27204. "tool": {
  27205. "type": "object",
  27206. "properties": {
  27207. "messageID": {
  27208. "type": "string"
  27209. },
  27210. "callID": {
  27211. "type": "string"
  27212. }
  27213. },
  27214. "required": ["messageID", "callID"],
  27215. "additionalProperties": false
  27216. }
  27217. },
  27218. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  27219. "additionalProperties": false
  27220. }
  27221. },
  27222. "required": ["id", "type", "properties"],
  27223. "additionalProperties": false
  27224. },
  27225. "EventPermissionReplied": {
  27226. "type": "object",
  27227. "properties": {
  27228. "id": {
  27229. "type": "string",
  27230. "pattern": "^evt_"
  27231. },
  27232. "type": {
  27233. "type": "string",
  27234. "enum": ["permission.replied"]
  27235. },
  27236. "properties": {
  27237. "type": "object",
  27238. "properties": {
  27239. "sessionID": {
  27240. "type": "string",
  27241. "pattern": "^ses"
  27242. },
  27243. "requestID": {
  27244. "type": "string",
  27245. "pattern": "^per"
  27246. },
  27247. "reply": {
  27248. "type": "string",
  27249. "enum": ["once", "always", "reject"]
  27250. }
  27251. },
  27252. "required": ["sessionID", "requestID", "reply"],
  27253. "additionalProperties": false
  27254. }
  27255. },
  27256. "required": ["id", "type", "properties"],
  27257. "additionalProperties": false
  27258. },
  27259. "EventMcpToolsChanged": {
  27260. "type": "object",
  27261. "properties": {
  27262. "id": {
  27263. "type": "string",
  27264. "pattern": "^evt_"
  27265. },
  27266. "type": {
  27267. "type": "string",
  27268. "enum": ["mcp.tools.changed"]
  27269. },
  27270. "properties": {
  27271. "type": "object",
  27272. "properties": {
  27273. "server": {
  27274. "type": "string"
  27275. }
  27276. },
  27277. "required": ["server"],
  27278. "additionalProperties": false
  27279. }
  27280. },
  27281. "required": ["id", "type", "properties"],
  27282. "additionalProperties": false
  27283. },
  27284. "EventMcpBrowserOpenFailed": {
  27285. "type": "object",
  27286. "properties": {
  27287. "id": {
  27288. "type": "string",
  27289. "pattern": "^evt_"
  27290. },
  27291. "type": {
  27292. "type": "string",
  27293. "enum": ["mcp.browser.open.failed"]
  27294. },
  27295. "properties": {
  27296. "type": "object",
  27297. "properties": {
  27298. "mcpName": {
  27299. "type": "string"
  27300. },
  27301. "url": {
  27302. "type": "string"
  27303. }
  27304. },
  27305. "required": ["mcpName", "url"],
  27306. "additionalProperties": false
  27307. }
  27308. },
  27309. "required": ["id", "type", "properties"],
  27310. "additionalProperties": false
  27311. },
  27312. "EventCommandExecuted": {
  27313. "type": "object",
  27314. "properties": {
  27315. "id": {
  27316. "type": "string",
  27317. "pattern": "^evt_"
  27318. },
  27319. "type": {
  27320. "type": "string",
  27321. "enum": ["command.executed"]
  27322. },
  27323. "properties": {
  27324. "type": "object",
  27325. "properties": {
  27326. "name": {
  27327. "type": "string"
  27328. },
  27329. "sessionID": {
  27330. "type": "string",
  27331. "pattern": "^ses"
  27332. },
  27333. "arguments": {
  27334. "type": "string"
  27335. },
  27336. "messageID": {
  27337. "type": "string",
  27338. "pattern": "^msg"
  27339. }
  27340. },
  27341. "required": ["name", "sessionID", "arguments", "messageID"],
  27342. "additionalProperties": false
  27343. }
  27344. },
  27345. "required": ["id", "type", "properties"],
  27346. "additionalProperties": false
  27347. },
  27348. "EventProjectDirectoriesUpdated": {
  27349. "type": "object",
  27350. "properties": {
  27351. "id": {
  27352. "type": "string",
  27353. "pattern": "^evt_"
  27354. },
  27355. "type": {
  27356. "type": "string",
  27357. "enum": ["project.directories.updated"]
  27358. },
  27359. "properties": {
  27360. "type": "object",
  27361. "properties": {
  27362. "projectID": {
  27363. "type": "string"
  27364. }
  27365. },
  27366. "required": ["projectID"],
  27367. "additionalProperties": false
  27368. }
  27369. },
  27370. "required": ["id", "type", "properties"],
  27371. "additionalProperties": false
  27372. },
  27373. "EventProjectUpdated": {
  27374. "type": "object",
  27375. "properties": {
  27376. "id": {
  27377. "type": "string",
  27378. "pattern": "^evt_"
  27379. },
  27380. "type": {
  27381. "type": "string",
  27382. "enum": ["project.updated"]
  27383. },
  27384. "properties": {
  27385. "type": "object",
  27386. "properties": {
  27387. "id": {
  27388. "type": "string"
  27389. },
  27390. "worktree": {
  27391. "type": "string"
  27392. },
  27393. "vcs": {
  27394. "type": "string",
  27395. "enum": ["git"]
  27396. },
  27397. "name": {
  27398. "type": "string"
  27399. },
  27400. "icon": {
  27401. "type": "object",
  27402. "properties": {
  27403. "url": {
  27404. "type": "string"
  27405. },
  27406. "override": {
  27407. "type": "string"
  27408. },
  27409. "color": {
  27410. "type": "string"
  27411. }
  27412. },
  27413. "additionalProperties": false
  27414. },
  27415. "commands": {
  27416. "type": "object",
  27417. "properties": {
  27418. "start": {
  27419. "type": "string",
  27420. "description": "Startup script to run when creating a new workspace (worktree)"
  27421. }
  27422. },
  27423. "additionalProperties": false
  27424. },
  27425. "time": {
  27426. "type": "object",
  27427. "properties": {
  27428. "created": {
  27429. "type": "integer",
  27430. "minimum": 0
  27431. },
  27432. "updated": {
  27433. "type": "integer",
  27434. "minimum": 0
  27435. },
  27436. "initialized": {
  27437. "type": "integer",
  27438. "minimum": 0
  27439. }
  27440. },
  27441. "required": ["created", "updated"],
  27442. "additionalProperties": false
  27443. },
  27444. "sandboxes": {
  27445. "type": "array",
  27446. "items": {
  27447. "type": "string"
  27448. }
  27449. }
  27450. },
  27451. "required": ["id", "worktree", "time", "sandboxes"],
  27452. "additionalProperties": false
  27453. }
  27454. },
  27455. "required": ["id", "type", "properties"],
  27456. "additionalProperties": false
  27457. },
  27458. "EventQuestionAsked": {
  27459. "type": "object",
  27460. "properties": {
  27461. "id": {
  27462. "type": "string",
  27463. "pattern": "^evt_"
  27464. },
  27465. "type": {
  27466. "type": "string",
  27467. "enum": ["question.asked"]
  27468. },
  27469. "properties": {
  27470. "type": "object",
  27471. "properties": {
  27472. "id": {
  27473. "type": "string",
  27474. "pattern": "^que"
  27475. },
  27476. "sessionID": {
  27477. "type": "string",
  27478. "pattern": "^ses"
  27479. },
  27480. "questions": {
  27481. "type": "array",
  27482. "items": {
  27483. "$ref": "#/components/schemas/QuestionInfo"
  27484. },
  27485. "description": "Questions to ask"
  27486. },
  27487. "tool": {
  27488. "$ref": "#/components/schemas/QuestionTool"
  27489. }
  27490. },
  27491. "required": ["id", "sessionID", "questions"],
  27492. "additionalProperties": false
  27493. }
  27494. },
  27495. "required": ["id", "type", "properties"],
  27496. "additionalProperties": false
  27497. },
  27498. "EventQuestionReplied": {
  27499. "type": "object",
  27500. "properties": {
  27501. "id": {
  27502. "type": "string",
  27503. "pattern": "^evt_"
  27504. },
  27505. "type": {
  27506. "type": "string",
  27507. "enum": ["question.replied"]
  27508. },
  27509. "properties": {
  27510. "type": "object",
  27511. "properties": {
  27512. "sessionID": {
  27513. "type": "string",
  27514. "pattern": "^ses"
  27515. },
  27516. "requestID": {
  27517. "type": "string",
  27518. "pattern": "^que"
  27519. },
  27520. "answers": {
  27521. "type": "array",
  27522. "items": {
  27523. "$ref": "#/components/schemas/QuestionAnswer"
  27524. }
  27525. }
  27526. },
  27527. "required": ["sessionID", "requestID", "answers"],
  27528. "additionalProperties": false
  27529. }
  27530. },
  27531. "required": ["id", "type", "properties"],
  27532. "additionalProperties": false
  27533. },
  27534. "EventQuestionRejected": {
  27535. "type": "object",
  27536. "properties": {
  27537. "id": {
  27538. "type": "string",
  27539. "pattern": "^evt_"
  27540. },
  27541. "type": {
  27542. "type": "string",
  27543. "enum": ["question.rejected"]
  27544. },
  27545. "properties": {
  27546. "type": "object",
  27547. "properties": {
  27548. "sessionID": {
  27549. "type": "string",
  27550. "pattern": "^ses"
  27551. },
  27552. "requestID": {
  27553. "type": "string",
  27554. "pattern": "^que"
  27555. }
  27556. },
  27557. "required": ["sessionID", "requestID"],
  27558. "additionalProperties": false
  27559. }
  27560. },
  27561. "required": ["id", "type", "properties"],
  27562. "additionalProperties": false
  27563. },
  27564. "EventSessionStatus": {
  27565. "type": "object",
  27566. "properties": {
  27567. "id": {
  27568. "type": "string",
  27569. "pattern": "^evt_"
  27570. },
  27571. "type": {
  27572. "type": "string",
  27573. "enum": ["session.status"]
  27574. },
  27575. "properties": {
  27576. "type": "object",
  27577. "properties": {
  27578. "sessionID": {
  27579. "type": "string",
  27580. "pattern": "^ses"
  27581. },
  27582. "status": {
  27583. "$ref": "#/components/schemas/SessionStatus"
  27584. }
  27585. },
  27586. "required": ["sessionID", "status"],
  27587. "additionalProperties": false
  27588. }
  27589. },
  27590. "required": ["id", "type", "properties"],
  27591. "additionalProperties": false
  27592. },
  27593. "EventSessionIdle": {
  27594. "type": "object",
  27595. "properties": {
  27596. "id": {
  27597. "type": "string",
  27598. "pattern": "^evt_"
  27599. },
  27600. "type": {
  27601. "type": "string",
  27602. "enum": ["session.idle"]
  27603. },
  27604. "properties": {
  27605. "type": "object",
  27606. "properties": {
  27607. "sessionID": {
  27608. "type": "string",
  27609. "pattern": "^ses"
  27610. }
  27611. },
  27612. "required": ["sessionID"],
  27613. "additionalProperties": false
  27614. }
  27615. },
  27616. "required": ["id", "type", "properties"],
  27617. "additionalProperties": false
  27618. },
  27619. "EventSessionCompacted": {
  27620. "type": "object",
  27621. "properties": {
  27622. "id": {
  27623. "type": "string",
  27624. "pattern": "^evt_"
  27625. },
  27626. "type": {
  27627. "type": "string",
  27628. "enum": ["session.compacted"]
  27629. },
  27630. "properties": {
  27631. "type": "object",
  27632. "properties": {
  27633. "sessionID": {
  27634. "type": "string",
  27635. "pattern": "^ses"
  27636. }
  27637. },
  27638. "required": ["sessionID"],
  27639. "additionalProperties": false
  27640. }
  27641. },
  27642. "required": ["id", "type", "properties"],
  27643. "additionalProperties": false
  27644. },
  27645. "EventVcsBranchUpdated": {
  27646. "type": "object",
  27647. "properties": {
  27648. "id": {
  27649. "type": "string",
  27650. "pattern": "^evt_"
  27651. },
  27652. "type": {
  27653. "type": "string",
  27654. "enum": ["vcs.branch.updated"]
  27655. },
  27656. "properties": {
  27657. "type": "object",
  27658. "properties": {
  27659. "branch": {
  27660. "type": "string"
  27661. }
  27662. },
  27663. "additionalProperties": false
  27664. }
  27665. },
  27666. "required": ["id", "type", "properties"],
  27667. "additionalProperties": false
  27668. },
  27669. "EventWorktreeReady": {
  27670. "type": "object",
  27671. "properties": {
  27672. "id": {
  27673. "type": "string",
  27674. "pattern": "^evt_"
  27675. },
  27676. "type": {
  27677. "type": "string",
  27678. "enum": ["worktree.ready"]
  27679. },
  27680. "properties": {
  27681. "type": "object",
  27682. "properties": {
  27683. "name": {
  27684. "type": "string"
  27685. },
  27686. "branch": {
  27687. "type": "string"
  27688. }
  27689. },
  27690. "required": ["name"],
  27691. "additionalProperties": false
  27692. }
  27693. },
  27694. "required": ["id", "type", "properties"],
  27695. "additionalProperties": false
  27696. },
  27697. "EventWorktreeFailed": {
  27698. "type": "object",
  27699. "properties": {
  27700. "id": {
  27701. "type": "string",
  27702. "pattern": "^evt_"
  27703. },
  27704. "type": {
  27705. "type": "string",
  27706. "enum": ["worktree.failed"]
  27707. },
  27708. "properties": {
  27709. "type": "object",
  27710. "properties": {
  27711. "message": {
  27712. "type": "string"
  27713. }
  27714. },
  27715. "required": ["message"],
  27716. "additionalProperties": false
  27717. }
  27718. },
  27719. "required": ["id", "type", "properties"],
  27720. "additionalProperties": false
  27721. },
  27722. "EventWorkspaceReady": {
  27723. "type": "object",
  27724. "properties": {
  27725. "id": {
  27726. "type": "string",
  27727. "pattern": "^evt_"
  27728. },
  27729. "type": {
  27730. "type": "string",
  27731. "enum": ["workspace.ready"]
  27732. },
  27733. "properties": {
  27734. "type": "object",
  27735. "properties": {
  27736. "name": {
  27737. "type": "string"
  27738. }
  27739. },
  27740. "required": ["name"],
  27741. "additionalProperties": false
  27742. }
  27743. },
  27744. "required": ["id", "type", "properties"],
  27745. "additionalProperties": false
  27746. },
  27747. "EventWorkspaceFailed": {
  27748. "type": "object",
  27749. "properties": {
  27750. "id": {
  27751. "type": "string",
  27752. "pattern": "^evt_"
  27753. },
  27754. "type": {
  27755. "type": "string",
  27756. "enum": ["workspace.failed"]
  27757. },
  27758. "properties": {
  27759. "type": "object",
  27760. "properties": {
  27761. "message": {
  27762. "type": "string"
  27763. }
  27764. },
  27765. "required": ["message"],
  27766. "additionalProperties": false
  27767. }
  27768. },
  27769. "required": ["id", "type", "properties"],
  27770. "additionalProperties": false
  27771. },
  27772. "EventWorkspaceStatus": {
  27773. "type": "object",
  27774. "properties": {
  27775. "id": {
  27776. "type": "string",
  27777. "pattern": "^evt_"
  27778. },
  27779. "type": {
  27780. "type": "string",
  27781. "enum": ["workspace.status"]
  27782. },
  27783. "properties": {
  27784. "type": "object",
  27785. "properties": {
  27786. "workspaceID": {
  27787. "type": "string",
  27788. "pattern": "^wrk"
  27789. },
  27790. "status": {
  27791. "type": "string",
  27792. "enum": ["connected", "connecting", "disconnected", "error"]
  27793. }
  27794. },
  27795. "required": ["workspaceID", "status"],
  27796. "additionalProperties": false
  27797. }
  27798. },
  27799. "required": ["id", "type", "properties"],
  27800. "additionalProperties": false
  27801. },
  27802. "EventServerConnected": {
  27803. "type": "object",
  27804. "properties": {
  27805. "id": {
  27806. "type": "string",
  27807. "pattern": "^evt_"
  27808. },
  27809. "type": {
  27810. "type": "string",
  27811. "enum": ["server.connected"]
  27812. },
  27813. "properties": {
  27814. "type": "object",
  27815. "properties": {}
  27816. }
  27817. },
  27818. "required": ["id", "type", "properties"],
  27819. "additionalProperties": false
  27820. },
  27821. "EventGlobalDisposed": {
  27822. "type": "object",
  27823. "properties": {
  27824. "id": {
  27825. "type": "string",
  27826. "pattern": "^evt_"
  27827. },
  27828. "type": {
  27829. "type": "string",
  27830. "enum": ["global.disposed"]
  27831. },
  27832. "properties": {
  27833. "type": "object",
  27834. "properties": {}
  27835. }
  27836. },
  27837. "required": ["id", "type", "properties"],
  27838. "additionalProperties": false
  27839. },
  27840. "BadRequestError": {
  27841. "type": "object",
  27842. "required": ["name", "data"],
  27843. "properties": {
  27844. "name": {
  27845. "type": "string",
  27846. "enum": ["BadRequest"]
  27847. },
  27848. "data": {
  27849. "type": "object",
  27850. "required": ["message"],
  27851. "properties": {
  27852. "message": {
  27853. "type": "string"
  27854. },
  27855. "kind": {
  27856. "type": "string",
  27857. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  27858. }
  27859. }
  27860. }
  27861. }
  27862. }
  27863. }
  27864. },
  27865. "security": [],
  27866. "tags": [
  27867. {
  27868. "name": "control",
  27869. "description": "Control plane routes."
  27870. },
  27871. {
  27872. "name": "controlPlane",
  27873. "description": "Control-plane orchestration routes."
  27874. },
  27875. {
  27876. "name": "global",
  27877. "description": "Global server routes."
  27878. },
  27879. {
  27880. "name": "event",
  27881. "description": "Instance event stream route."
  27882. },
  27883. {
  27884. "name": "config",
  27885. "description": "Experimental HttpApi config routes."
  27886. },
  27887. {
  27888. "name": "experimental",
  27889. "description": "Experimental HttpApi read-only routes."
  27890. },
  27891. {
  27892. "name": "file",
  27893. "description": "Experimental HttpApi file routes."
  27894. },
  27895. {
  27896. "name": "instance",
  27897. "description": "Experimental HttpApi instance read routes."
  27898. },
  27899. {
  27900. "name": "mcp",
  27901. "description": "Experimental HttpApi MCP routes."
  27902. },
  27903. {
  27904. "name": "project",
  27905. "description": "Experimental HttpApi project routes."
  27906. },
  27907. {
  27908. "name": "projectCopy",
  27909. "description": "Project copy management routes."
  27910. },
  27911. {
  27912. "name": "pty",
  27913. "description": "Experimental HttpApi PTY routes."
  27914. },
  27915. {
  27916. "name": "question",
  27917. "description": "Question routes."
  27918. },
  27919. {
  27920. "name": "permission",
  27921. "description": "Experimental HttpApi permission routes."
  27922. },
  27923. {
  27924. "name": "provider",
  27925. "description": "Experimental HttpApi provider routes."
  27926. },
  27927. {
  27928. "name": "session",
  27929. "description": "Experimental HttpApi session routes."
  27930. },
  27931. {
  27932. "name": "sync",
  27933. "description": "Experimental HttpApi sync routes."
  27934. },
  27935. {
  27936. "name": "tui",
  27937. "description": "Experimental HttpApi TUI routes."
  27938. },
  27939. {
  27940. "name": "workspace",
  27941. "description": "Experimental HttpApi workspace routes."
  27942. },
  27943. {
  27944. "name": "opencode experimental HttpApi",
  27945. "description": "Experimental HttpApi surface for selected instance routes."
  27946. },
  27947. {
  27948. "name": "opencode experimental HttpApi",
  27949. "description": "Experimental HttpApi surface for selected instance routes."
  27950. },
  27951. {
  27952. "name": "v2",
  27953. "description": "Experimental v2 routes."
  27954. },
  27955. {
  27956. "name": "v2 messages",
  27957. "description": "Experimental v2 message routes."
  27958. },
  27959. {
  27960. "name": "v2 models",
  27961. "description": "Experimental v2 model routes."
  27962. },
  27963. {
  27964. "name": "v2 providers",
  27965. "description": "Experimental v2 provider routes."
  27966. },
  27967. {
  27968. "name": "v2 permissions",
  27969. "description": "Experimental v2 permission routes."
  27970. },
  27971. {
  27972. "name": "v2 session permissions",
  27973. "description": "Experimental v2 session permission routes."
  27974. },
  27975. {
  27976. "name": "v2 saved permissions",
  27977. "description": "Experimental v2 saved permission routes."
  27978. },
  27979. {
  27980. "name": "v2 filesystem",
  27981. "description": "Experimental v2 location-scoped filesystem routes."
  27982. },
  27983. {
  27984. "name": "v2 commands",
  27985. "description": "Experimental v2 command routes."
  27986. },
  27987. {
  27988. "name": "v2 skills",
  27989. "description": "Experimental v2 skill routes."
  27990. },
  27991. {
  27992. "name": "v2 events",
  27993. "description": "Experimental v2 event stream route."
  27994. },
  27995. {
  27996. "name": "v2 questions",
  27997. "description": "Experimental v2 question routes."
  27998. },
  27999. {
  28000. "name": "v2 session questions",
  28001. "description": "Experimental v2 session question routes."
  28002. },
  28003. {
  28004. "name": "pty",
  28005. "description": "PTY websocket route."
  28006. }
  28007. ]
  28008. }