openapi.json 790 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918
  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/EventSessionNextContextUpdated"
  12102. },
  12103. {
  12104. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12105. },
  12106. {
  12107. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12108. },
  12109. {
  12110. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12111. },
  12112. {
  12113. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12114. },
  12115. {
  12116. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12117. },
  12118. {
  12119. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12120. },
  12121. {
  12122. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12123. },
  12124. {
  12125. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12126. },
  12127. {
  12128. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12129. },
  12130. {
  12131. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12132. },
  12133. {
  12134. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12135. },
  12136. {
  12137. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12138. },
  12139. {
  12140. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12141. },
  12142. {
  12143. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12144. },
  12145. {
  12146. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12147. },
  12148. {
  12149. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12150. },
  12151. {
  12152. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12153. },
  12154. {
  12155. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12156. },
  12157. {
  12158. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12159. },
  12160. {
  12161. "$ref": "#/components/schemas/EventSessionNextRetried"
  12162. },
  12163. {
  12164. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12165. },
  12166. {
  12167. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12168. },
  12169. {
  12170. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12171. },
  12172. {
  12173. "$ref": "#/components/schemas/EventMessagePartDelta"
  12174. },
  12175. {
  12176. "$ref": "#/components/schemas/EventSessionDiff"
  12177. },
  12178. {
  12179. "$ref": "#/components/schemas/EventSessionError"
  12180. },
  12181. {
  12182. "$ref": "#/components/schemas/EventInstallationUpdated"
  12183. },
  12184. {
  12185. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12186. },
  12187. {
  12188. "$ref": "#/components/schemas/EventFileEdited"
  12189. },
  12190. {
  12191. "$ref": "#/components/schemas/EventAccountAdded"
  12192. },
  12193. {
  12194. "$ref": "#/components/schemas/EventAccountRemoved"
  12195. },
  12196. {
  12197. "$ref": "#/components/schemas/EventAccountSwitched"
  12198. },
  12199. {
  12200. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12201. },
  12202. {
  12203. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12204. },
  12205. {
  12206. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12207. },
  12208. {
  12209. "$ref": "#/components/schemas/EventPtyCreated"
  12210. },
  12211. {
  12212. "$ref": "#/components/schemas/EventPtyUpdated"
  12213. },
  12214. {
  12215. "$ref": "#/components/schemas/EventPtyExited"
  12216. },
  12217. {
  12218. "$ref": "#/components/schemas/EventPtyDeleted"
  12219. },
  12220. {
  12221. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12222. },
  12223. {
  12224. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12225. },
  12226. {
  12227. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12228. },
  12229. {
  12230. "$ref": "#/components/schemas/EventTodoUpdated"
  12231. },
  12232. {
  12233. "$ref": "#/components/schemas/EventLspUpdated"
  12234. },
  12235. {
  12236. "$ref": "#/components/schemas/EventPermissionAsked"
  12237. },
  12238. {
  12239. "$ref": "#/components/schemas/EventPermissionReplied"
  12240. },
  12241. {
  12242. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12243. },
  12244. {
  12245. "$ref": "#/components/schemas/Event.tui.command.execute"
  12246. },
  12247. {
  12248. "$ref": "#/components/schemas/Event.tui.toast.show"
  12249. },
  12250. {
  12251. "$ref": "#/components/schemas/Event.tui.session.select"
  12252. },
  12253. {
  12254. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12255. },
  12256. {
  12257. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12258. },
  12259. {
  12260. "$ref": "#/components/schemas/EventCommandExecuted"
  12261. },
  12262. {
  12263. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12264. },
  12265. {
  12266. "$ref": "#/components/schemas/EventProjectUpdated"
  12267. },
  12268. {
  12269. "$ref": "#/components/schemas/EventQuestionAsked"
  12270. },
  12271. {
  12272. "$ref": "#/components/schemas/EventQuestionReplied"
  12273. },
  12274. {
  12275. "$ref": "#/components/schemas/EventQuestionRejected"
  12276. },
  12277. {
  12278. "$ref": "#/components/schemas/EventSessionStatus"
  12279. },
  12280. {
  12281. "$ref": "#/components/schemas/EventSessionIdle"
  12282. },
  12283. {
  12284. "$ref": "#/components/schemas/EventSessionCompacted"
  12285. },
  12286. {
  12287. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12288. },
  12289. {
  12290. "$ref": "#/components/schemas/EventWorktreeReady"
  12291. },
  12292. {
  12293. "$ref": "#/components/schemas/EventWorktreeFailed"
  12294. },
  12295. {
  12296. "$ref": "#/components/schemas/EventWorkspaceReady"
  12297. },
  12298. {
  12299. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12300. },
  12301. {
  12302. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12303. },
  12304. {
  12305. "$ref": "#/components/schemas/EventServerConnected"
  12306. },
  12307. {
  12308. "$ref": "#/components/schemas/EventGlobalDisposed"
  12309. },
  12310. {
  12311. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12312. }
  12313. ]
  12314. },
  12315. "QuestionReplied": {
  12316. "type": "object",
  12317. "properties": {
  12318. "sessionID": {
  12319. "type": "string",
  12320. "pattern": "^ses"
  12321. },
  12322. "requestID": {
  12323. "type": "string",
  12324. "pattern": "^que"
  12325. },
  12326. "answers": {
  12327. "type": "array",
  12328. "items": {
  12329. "$ref": "#/components/schemas/QuestionAnswer"
  12330. }
  12331. }
  12332. },
  12333. "required": ["sessionID", "requestID", "answers"],
  12334. "additionalProperties": false
  12335. },
  12336. "QuestionRejected": {
  12337. "type": "object",
  12338. "properties": {
  12339. "sessionID": {
  12340. "type": "string",
  12341. "pattern": "^ses"
  12342. },
  12343. "requestID": {
  12344. "type": "string",
  12345. "pattern": "^que"
  12346. }
  12347. },
  12348. "required": ["sessionID", "requestID"],
  12349. "additionalProperties": false
  12350. },
  12351. "OAuth": {
  12352. "type": "object",
  12353. "properties": {
  12354. "type": {
  12355. "type": "string",
  12356. "enum": ["oauth"]
  12357. },
  12358. "refresh": {
  12359. "type": "string"
  12360. },
  12361. "access": {
  12362. "type": "string"
  12363. },
  12364. "expires": {
  12365. "type": "integer",
  12366. "minimum": 0
  12367. },
  12368. "accountId": {
  12369. "type": "string"
  12370. },
  12371. "enterpriseUrl": {
  12372. "type": "string"
  12373. }
  12374. },
  12375. "required": ["type", "refresh", "access", "expires"],
  12376. "additionalProperties": false
  12377. },
  12378. "ApiAuth": {
  12379. "type": "object",
  12380. "properties": {
  12381. "type": {
  12382. "type": "string",
  12383. "enum": ["api"]
  12384. },
  12385. "key": {
  12386. "type": "string"
  12387. },
  12388. "metadata": {
  12389. "type": "object",
  12390. "additionalProperties": {
  12391. "type": "string"
  12392. }
  12393. }
  12394. },
  12395. "required": ["type", "key"],
  12396. "additionalProperties": false
  12397. },
  12398. "WellKnownAuth": {
  12399. "type": "object",
  12400. "properties": {
  12401. "type": {
  12402. "type": "string",
  12403. "enum": ["wellknown"]
  12404. },
  12405. "key": {
  12406. "type": "string"
  12407. },
  12408. "token": {
  12409. "type": "string"
  12410. }
  12411. },
  12412. "required": ["type", "key", "token"],
  12413. "additionalProperties": false
  12414. },
  12415. "Auth": {
  12416. "anyOf": [
  12417. {
  12418. "$ref": "#/components/schemas/OAuth"
  12419. },
  12420. {
  12421. "$ref": "#/components/schemas/ApiAuth"
  12422. },
  12423. {
  12424. "$ref": "#/components/schemas/WellKnownAuth"
  12425. }
  12426. ]
  12427. },
  12428. "effect_HttpApiError_BadRequest": {
  12429. "type": "object",
  12430. "properties": {
  12431. "_tag": {
  12432. "type": "string",
  12433. "enum": ["BadRequest"]
  12434. }
  12435. },
  12436. "required": ["_tag"],
  12437. "additionalProperties": false
  12438. },
  12439. "InvalidRequestError": {
  12440. "type": "object",
  12441. "properties": {
  12442. "_tag": {
  12443. "type": "string",
  12444. "enum": ["InvalidRequestError"]
  12445. },
  12446. "message": {
  12447. "type": "string"
  12448. },
  12449. "kind": {
  12450. "type": "string"
  12451. },
  12452. "field": {
  12453. "type": "string"
  12454. }
  12455. },
  12456. "required": ["_tag", "message"],
  12457. "additionalProperties": false
  12458. },
  12459. "MoveSessionError": {
  12460. "type": "object",
  12461. "properties": {
  12462. "name": {
  12463. "type": "string",
  12464. "enum": ["MoveSessionError"]
  12465. },
  12466. "data": {
  12467. "type": "object",
  12468. "properties": {
  12469. "message": {
  12470. "type": "string"
  12471. }
  12472. },
  12473. "required": ["message"],
  12474. "additionalProperties": false
  12475. }
  12476. },
  12477. "required": ["name", "data"],
  12478. "additionalProperties": false
  12479. },
  12480. "SnapshotFileDiff": {
  12481. "type": "object",
  12482. "properties": {
  12483. "file": {
  12484. "type": "string"
  12485. },
  12486. "patch": {
  12487. "type": "string"
  12488. },
  12489. "additions": {
  12490. "type": "number"
  12491. },
  12492. "deletions": {
  12493. "type": "number"
  12494. },
  12495. "status": {
  12496. "type": "string",
  12497. "enum": ["added", "deleted", "modified"]
  12498. }
  12499. },
  12500. "required": ["additions", "deletions"],
  12501. "additionalProperties": false
  12502. },
  12503. "PermissionAction": {
  12504. "type": "string",
  12505. "enum": ["allow", "deny", "ask"]
  12506. },
  12507. "PermissionRule": {
  12508. "type": "object",
  12509. "properties": {
  12510. "permission": {
  12511. "type": "string"
  12512. },
  12513. "pattern": {
  12514. "type": "string"
  12515. },
  12516. "action": {
  12517. "$ref": "#/components/schemas/PermissionAction"
  12518. }
  12519. },
  12520. "required": ["permission", "pattern", "action"],
  12521. "additionalProperties": false
  12522. },
  12523. "PermissionRuleset": {
  12524. "type": "array",
  12525. "items": {
  12526. "$ref": "#/components/schemas/PermissionRule"
  12527. }
  12528. },
  12529. "Session": {
  12530. "type": "object",
  12531. "properties": {
  12532. "id": {
  12533. "type": "string",
  12534. "pattern": "^ses"
  12535. },
  12536. "slug": {
  12537. "type": "string"
  12538. },
  12539. "projectID": {
  12540. "type": "string"
  12541. },
  12542. "workspaceID": {
  12543. "type": "string",
  12544. "pattern": "^wrk"
  12545. },
  12546. "directory": {
  12547. "type": "string"
  12548. },
  12549. "path": {
  12550. "type": "string"
  12551. },
  12552. "parentID": {
  12553. "type": "string",
  12554. "pattern": "^ses"
  12555. },
  12556. "summary": {
  12557. "type": "object",
  12558. "properties": {
  12559. "additions": {
  12560. "type": "number"
  12561. },
  12562. "deletions": {
  12563. "type": "number"
  12564. },
  12565. "files": {
  12566. "type": "number"
  12567. },
  12568. "diffs": {
  12569. "type": "array",
  12570. "items": {
  12571. "$ref": "#/components/schemas/SnapshotFileDiff"
  12572. }
  12573. }
  12574. },
  12575. "required": ["additions", "deletions", "files"],
  12576. "additionalProperties": false
  12577. },
  12578. "cost": {
  12579. "type": "number"
  12580. },
  12581. "tokens": {
  12582. "type": "object",
  12583. "properties": {
  12584. "input": {
  12585. "type": "number"
  12586. },
  12587. "output": {
  12588. "type": "number"
  12589. },
  12590. "reasoning": {
  12591. "type": "number"
  12592. },
  12593. "cache": {
  12594. "type": "object",
  12595. "properties": {
  12596. "read": {
  12597. "type": "number"
  12598. },
  12599. "write": {
  12600. "type": "number"
  12601. }
  12602. },
  12603. "required": ["read", "write"],
  12604. "additionalProperties": false
  12605. }
  12606. },
  12607. "required": ["input", "output", "reasoning", "cache"],
  12608. "additionalProperties": false
  12609. },
  12610. "share": {
  12611. "type": "object",
  12612. "properties": {
  12613. "url": {
  12614. "type": "string"
  12615. }
  12616. },
  12617. "required": ["url"],
  12618. "additionalProperties": false
  12619. },
  12620. "title": {
  12621. "type": "string"
  12622. },
  12623. "agent": {
  12624. "type": "string"
  12625. },
  12626. "model": {
  12627. "type": "object",
  12628. "properties": {
  12629. "id": {
  12630. "type": "string"
  12631. },
  12632. "providerID": {
  12633. "type": "string"
  12634. },
  12635. "variant": {
  12636. "type": "string"
  12637. }
  12638. },
  12639. "required": ["id", "providerID"],
  12640. "additionalProperties": false
  12641. },
  12642. "version": {
  12643. "type": "string"
  12644. },
  12645. "metadata": {
  12646. "type": "object"
  12647. },
  12648. "time": {
  12649. "type": "object",
  12650. "properties": {
  12651. "created": {
  12652. "type": "integer",
  12653. "minimum": 0
  12654. },
  12655. "updated": {
  12656. "type": "integer",
  12657. "minimum": 0
  12658. },
  12659. "compacting": {
  12660. "type": "integer",
  12661. "minimum": 0
  12662. },
  12663. "archived": {
  12664. "type": "number"
  12665. }
  12666. },
  12667. "required": ["created", "updated"],
  12668. "additionalProperties": false
  12669. },
  12670. "permission": {
  12671. "$ref": "#/components/schemas/PermissionRuleset"
  12672. },
  12673. "revert": {
  12674. "type": "object",
  12675. "properties": {
  12676. "messageID": {
  12677. "type": "string",
  12678. "pattern": "^msg"
  12679. },
  12680. "partID": {
  12681. "type": "string",
  12682. "pattern": "^prt"
  12683. },
  12684. "snapshot": {
  12685. "type": "string"
  12686. },
  12687. "diff": {
  12688. "type": "string"
  12689. }
  12690. },
  12691. "required": ["messageID"],
  12692. "additionalProperties": false
  12693. }
  12694. },
  12695. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12696. "additionalProperties": false
  12697. },
  12698. "OutputFormatText": {
  12699. "type": "object",
  12700. "properties": {
  12701. "type": {
  12702. "type": "string",
  12703. "enum": ["text"]
  12704. }
  12705. },
  12706. "required": ["type"],
  12707. "additionalProperties": false
  12708. },
  12709. "JSONSchema": {
  12710. "type": "object"
  12711. },
  12712. "OutputFormatJsonSchema": {
  12713. "type": "object",
  12714. "properties": {
  12715. "type": {
  12716. "type": "string",
  12717. "enum": ["json_schema"]
  12718. },
  12719. "schema": {
  12720. "$ref": "#/components/schemas/JSONSchema"
  12721. },
  12722. "retryCount": {
  12723. "type": "integer",
  12724. "minimum": 0
  12725. }
  12726. },
  12727. "required": ["type", "schema"],
  12728. "additionalProperties": false
  12729. },
  12730. "OutputFormat": {
  12731. "anyOf": [
  12732. {
  12733. "$ref": "#/components/schemas/OutputFormatText"
  12734. },
  12735. {
  12736. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  12737. }
  12738. ]
  12739. },
  12740. "UserMessage": {
  12741. "type": "object",
  12742. "properties": {
  12743. "id": {
  12744. "type": "string",
  12745. "pattern": "^msg"
  12746. },
  12747. "sessionID": {
  12748. "type": "string",
  12749. "pattern": "^ses"
  12750. },
  12751. "role": {
  12752. "type": "string",
  12753. "enum": ["user"]
  12754. },
  12755. "time": {
  12756. "type": "object",
  12757. "properties": {
  12758. "created": {
  12759. "type": "number",
  12760. "minimum": 0
  12761. }
  12762. },
  12763. "required": ["created"],
  12764. "additionalProperties": false
  12765. },
  12766. "format": {
  12767. "$ref": "#/components/schemas/OutputFormat"
  12768. },
  12769. "summary": {
  12770. "type": "object",
  12771. "properties": {
  12772. "title": {
  12773. "type": "string"
  12774. },
  12775. "body": {
  12776. "type": "string"
  12777. },
  12778. "diffs": {
  12779. "type": "array",
  12780. "items": {
  12781. "$ref": "#/components/schemas/SnapshotFileDiff"
  12782. }
  12783. }
  12784. },
  12785. "required": ["diffs"],
  12786. "additionalProperties": false
  12787. },
  12788. "agent": {
  12789. "type": "string"
  12790. },
  12791. "model": {
  12792. "type": "object",
  12793. "properties": {
  12794. "providerID": {
  12795. "type": "string"
  12796. },
  12797. "modelID": {
  12798. "type": "string"
  12799. },
  12800. "variant": {
  12801. "type": "string"
  12802. }
  12803. },
  12804. "required": ["providerID", "modelID"],
  12805. "additionalProperties": false
  12806. },
  12807. "system": {
  12808. "type": "string"
  12809. },
  12810. "tools": {
  12811. "type": "object",
  12812. "additionalProperties": {
  12813. "type": "boolean"
  12814. }
  12815. }
  12816. },
  12817. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  12818. "additionalProperties": false
  12819. },
  12820. "ProviderAuthError": {
  12821. "type": "object",
  12822. "properties": {
  12823. "name": {
  12824. "type": "string",
  12825. "enum": ["ProviderAuthError"]
  12826. },
  12827. "data": {
  12828. "type": "object",
  12829. "properties": {
  12830. "providerID": {
  12831. "type": "string"
  12832. },
  12833. "message": {
  12834. "type": "string"
  12835. }
  12836. },
  12837. "required": ["providerID", "message"],
  12838. "additionalProperties": false
  12839. }
  12840. },
  12841. "required": ["name", "data"],
  12842. "additionalProperties": false
  12843. },
  12844. "UnknownError": {
  12845. "type": "object",
  12846. "properties": {
  12847. "name": {
  12848. "type": "string",
  12849. "enum": ["UnknownError"]
  12850. },
  12851. "data": {
  12852. "type": "object",
  12853. "properties": {
  12854. "message": {
  12855. "type": "string"
  12856. },
  12857. "ref": {
  12858. "type": "string"
  12859. }
  12860. },
  12861. "required": ["message"],
  12862. "additionalProperties": false
  12863. }
  12864. },
  12865. "required": ["name", "data"],
  12866. "additionalProperties": false
  12867. },
  12868. "MessageOutputLengthError": {
  12869. "type": "object",
  12870. "properties": {
  12871. "name": {
  12872. "type": "string",
  12873. "enum": ["MessageOutputLengthError"]
  12874. },
  12875. "data": {
  12876. "type": "object",
  12877. "properties": {}
  12878. }
  12879. },
  12880. "required": ["name", "data"],
  12881. "additionalProperties": false
  12882. },
  12883. "MessageAbortedError": {
  12884. "type": "object",
  12885. "properties": {
  12886. "name": {
  12887. "type": "string",
  12888. "enum": ["MessageAbortedError"]
  12889. },
  12890. "data": {
  12891. "type": "object",
  12892. "properties": {
  12893. "message": {
  12894. "type": "string"
  12895. }
  12896. },
  12897. "required": ["message"],
  12898. "additionalProperties": false
  12899. }
  12900. },
  12901. "required": ["name", "data"],
  12902. "additionalProperties": false
  12903. },
  12904. "StructuredOutputError": {
  12905. "type": "object",
  12906. "properties": {
  12907. "name": {
  12908. "type": "string",
  12909. "enum": ["StructuredOutputError"]
  12910. },
  12911. "data": {
  12912. "type": "object",
  12913. "properties": {
  12914. "message": {
  12915. "type": "string"
  12916. },
  12917. "retries": {
  12918. "type": "integer",
  12919. "minimum": 0
  12920. }
  12921. },
  12922. "required": ["message", "retries"],
  12923. "additionalProperties": false
  12924. }
  12925. },
  12926. "required": ["name", "data"],
  12927. "additionalProperties": false
  12928. },
  12929. "ContextOverflowError": {
  12930. "type": "object",
  12931. "properties": {
  12932. "name": {
  12933. "type": "string",
  12934. "enum": ["ContextOverflowError"]
  12935. },
  12936. "data": {
  12937. "type": "object",
  12938. "properties": {
  12939. "message": {
  12940. "type": "string"
  12941. },
  12942. "responseBody": {
  12943. "type": "string"
  12944. }
  12945. },
  12946. "required": ["message"],
  12947. "additionalProperties": false
  12948. }
  12949. },
  12950. "required": ["name", "data"],
  12951. "additionalProperties": false
  12952. },
  12953. "APIError": {
  12954. "type": "object",
  12955. "properties": {
  12956. "name": {
  12957. "type": "string",
  12958. "enum": ["APIError"]
  12959. },
  12960. "data": {
  12961. "type": "object",
  12962. "properties": {
  12963. "message": {
  12964. "type": "string"
  12965. },
  12966. "statusCode": {
  12967. "type": "integer",
  12968. "minimum": 0
  12969. },
  12970. "isRetryable": {
  12971. "type": "boolean"
  12972. },
  12973. "responseHeaders": {
  12974. "type": "object",
  12975. "additionalProperties": {
  12976. "type": "string"
  12977. }
  12978. },
  12979. "responseBody": {
  12980. "type": "string"
  12981. },
  12982. "metadata": {
  12983. "type": "object",
  12984. "additionalProperties": {
  12985. "type": "string"
  12986. }
  12987. }
  12988. },
  12989. "required": ["message", "isRetryable"],
  12990. "additionalProperties": false
  12991. }
  12992. },
  12993. "required": ["name", "data"],
  12994. "additionalProperties": false
  12995. },
  12996. "AssistantMessage": {
  12997. "type": "object",
  12998. "properties": {
  12999. "id": {
  13000. "type": "string",
  13001. "pattern": "^msg"
  13002. },
  13003. "sessionID": {
  13004. "type": "string",
  13005. "pattern": "^ses"
  13006. },
  13007. "role": {
  13008. "type": "string",
  13009. "enum": ["assistant"]
  13010. },
  13011. "time": {
  13012. "type": "object",
  13013. "properties": {
  13014. "created": {
  13015. "type": "integer",
  13016. "minimum": 0
  13017. },
  13018. "completed": {
  13019. "type": "integer",
  13020. "minimum": 0
  13021. }
  13022. },
  13023. "required": ["created"],
  13024. "additionalProperties": false
  13025. },
  13026. "error": {
  13027. "anyOf": [
  13028. {
  13029. "$ref": "#/components/schemas/ProviderAuthError"
  13030. },
  13031. {
  13032. "$ref": "#/components/schemas/UnknownError"
  13033. },
  13034. {
  13035. "$ref": "#/components/schemas/MessageOutputLengthError"
  13036. },
  13037. {
  13038. "$ref": "#/components/schemas/MessageAbortedError"
  13039. },
  13040. {
  13041. "$ref": "#/components/schemas/StructuredOutputError"
  13042. },
  13043. {
  13044. "$ref": "#/components/schemas/ContextOverflowError"
  13045. },
  13046. {
  13047. "$ref": "#/components/schemas/APIError"
  13048. }
  13049. ]
  13050. },
  13051. "parentID": {
  13052. "type": "string",
  13053. "pattern": "^msg"
  13054. },
  13055. "modelID": {
  13056. "type": "string"
  13057. },
  13058. "providerID": {
  13059. "type": "string"
  13060. },
  13061. "mode": {
  13062. "type": "string"
  13063. },
  13064. "agent": {
  13065. "type": "string"
  13066. },
  13067. "path": {
  13068. "type": "object",
  13069. "properties": {
  13070. "cwd": {
  13071. "type": "string"
  13072. },
  13073. "root": {
  13074. "type": "string"
  13075. }
  13076. },
  13077. "required": ["cwd", "root"],
  13078. "additionalProperties": false
  13079. },
  13080. "summary": {
  13081. "type": "boolean"
  13082. },
  13083. "cost": {
  13084. "type": "number"
  13085. },
  13086. "tokens": {
  13087. "type": "object",
  13088. "properties": {
  13089. "total": {
  13090. "type": "number"
  13091. },
  13092. "input": {
  13093. "type": "number"
  13094. },
  13095. "output": {
  13096. "type": "number"
  13097. },
  13098. "reasoning": {
  13099. "type": "number"
  13100. },
  13101. "cache": {
  13102. "type": "object",
  13103. "properties": {
  13104. "read": {
  13105. "type": "number"
  13106. },
  13107. "write": {
  13108. "type": "number"
  13109. }
  13110. },
  13111. "required": ["read", "write"],
  13112. "additionalProperties": false
  13113. }
  13114. },
  13115. "required": ["input", "output", "reasoning", "cache"],
  13116. "additionalProperties": false
  13117. },
  13118. "structured": {},
  13119. "variant": {
  13120. "type": "string"
  13121. },
  13122. "finish": {
  13123. "type": "string"
  13124. }
  13125. },
  13126. "required": [
  13127. "id",
  13128. "sessionID",
  13129. "role",
  13130. "time",
  13131. "parentID",
  13132. "modelID",
  13133. "providerID",
  13134. "mode",
  13135. "agent",
  13136. "path",
  13137. "cost",
  13138. "tokens"
  13139. ],
  13140. "additionalProperties": false
  13141. },
  13142. "Message": {
  13143. "anyOf": [
  13144. {
  13145. "$ref": "#/components/schemas/UserMessage"
  13146. },
  13147. {
  13148. "$ref": "#/components/schemas/AssistantMessage"
  13149. }
  13150. ]
  13151. },
  13152. "TextPart": {
  13153. "type": "object",
  13154. "properties": {
  13155. "id": {
  13156. "type": "string",
  13157. "pattern": "^prt"
  13158. },
  13159. "sessionID": {
  13160. "type": "string",
  13161. "pattern": "^ses"
  13162. },
  13163. "messageID": {
  13164. "type": "string",
  13165. "pattern": "^msg"
  13166. },
  13167. "type": {
  13168. "type": "string",
  13169. "enum": ["text"]
  13170. },
  13171. "text": {
  13172. "type": "string"
  13173. },
  13174. "synthetic": {
  13175. "type": "boolean"
  13176. },
  13177. "ignored": {
  13178. "type": "boolean"
  13179. },
  13180. "time": {
  13181. "type": "object",
  13182. "properties": {
  13183. "start": {
  13184. "type": "integer",
  13185. "minimum": 0
  13186. },
  13187. "end": {
  13188. "type": "integer",
  13189. "minimum": 0
  13190. }
  13191. },
  13192. "required": ["start"],
  13193. "additionalProperties": false
  13194. },
  13195. "metadata": {
  13196. "type": "object"
  13197. }
  13198. },
  13199. "required": ["id", "sessionID", "messageID", "type", "text"],
  13200. "additionalProperties": false
  13201. },
  13202. "SubtaskPart": {
  13203. "type": "object",
  13204. "properties": {
  13205. "id": {
  13206. "type": "string",
  13207. "pattern": "^prt"
  13208. },
  13209. "sessionID": {
  13210. "type": "string",
  13211. "pattern": "^ses"
  13212. },
  13213. "messageID": {
  13214. "type": "string",
  13215. "pattern": "^msg"
  13216. },
  13217. "type": {
  13218. "type": "string",
  13219. "enum": ["subtask"]
  13220. },
  13221. "prompt": {
  13222. "type": "string"
  13223. },
  13224. "description": {
  13225. "type": "string"
  13226. },
  13227. "agent": {
  13228. "type": "string"
  13229. },
  13230. "model": {
  13231. "type": "object",
  13232. "properties": {
  13233. "providerID": {
  13234. "type": "string"
  13235. },
  13236. "modelID": {
  13237. "type": "string"
  13238. }
  13239. },
  13240. "required": ["providerID", "modelID"],
  13241. "additionalProperties": false
  13242. },
  13243. "command": {
  13244. "type": "string"
  13245. }
  13246. },
  13247. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13248. "additionalProperties": false
  13249. },
  13250. "ReasoningPart": {
  13251. "type": "object",
  13252. "properties": {
  13253. "id": {
  13254. "type": "string",
  13255. "pattern": "^prt"
  13256. },
  13257. "sessionID": {
  13258. "type": "string",
  13259. "pattern": "^ses"
  13260. },
  13261. "messageID": {
  13262. "type": "string",
  13263. "pattern": "^msg"
  13264. },
  13265. "type": {
  13266. "type": "string",
  13267. "enum": ["reasoning"]
  13268. },
  13269. "text": {
  13270. "type": "string"
  13271. },
  13272. "metadata": {
  13273. "type": "object"
  13274. },
  13275. "time": {
  13276. "type": "object",
  13277. "properties": {
  13278. "start": {
  13279. "type": "integer",
  13280. "minimum": 0
  13281. },
  13282. "end": {
  13283. "type": "integer",
  13284. "minimum": 0
  13285. }
  13286. },
  13287. "required": ["start"],
  13288. "additionalProperties": false
  13289. }
  13290. },
  13291. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13292. "additionalProperties": false
  13293. },
  13294. "FilePartSourceText": {
  13295. "type": "object",
  13296. "properties": {
  13297. "value": {
  13298. "type": "string"
  13299. },
  13300. "start": {
  13301. "type": "number"
  13302. },
  13303. "end": {
  13304. "type": "number"
  13305. }
  13306. },
  13307. "required": ["value", "start", "end"],
  13308. "additionalProperties": false
  13309. },
  13310. "FileSource": {
  13311. "type": "object",
  13312. "properties": {
  13313. "text": {
  13314. "$ref": "#/components/schemas/FilePartSourceText"
  13315. },
  13316. "type": {
  13317. "type": "string",
  13318. "enum": ["file"]
  13319. },
  13320. "path": {
  13321. "type": "string"
  13322. }
  13323. },
  13324. "required": ["text", "type", "path"],
  13325. "additionalProperties": false
  13326. },
  13327. "Range": {
  13328. "type": "object",
  13329. "properties": {
  13330. "start": {
  13331. "type": "object",
  13332. "properties": {
  13333. "line": {
  13334. "type": "integer",
  13335. "minimum": 0
  13336. },
  13337. "character": {
  13338. "type": "integer",
  13339. "minimum": 0
  13340. }
  13341. },
  13342. "required": ["line", "character"],
  13343. "additionalProperties": false
  13344. },
  13345. "end": {
  13346. "type": "object",
  13347. "properties": {
  13348. "line": {
  13349. "type": "integer",
  13350. "minimum": 0
  13351. },
  13352. "character": {
  13353. "type": "integer",
  13354. "minimum": 0
  13355. }
  13356. },
  13357. "required": ["line", "character"],
  13358. "additionalProperties": false
  13359. }
  13360. },
  13361. "required": ["start", "end"],
  13362. "additionalProperties": false
  13363. },
  13364. "SymbolSource": {
  13365. "type": "object",
  13366. "properties": {
  13367. "text": {
  13368. "$ref": "#/components/schemas/FilePartSourceText"
  13369. },
  13370. "type": {
  13371. "type": "string",
  13372. "enum": ["symbol"]
  13373. },
  13374. "path": {
  13375. "type": "string"
  13376. },
  13377. "range": {
  13378. "$ref": "#/components/schemas/Range"
  13379. },
  13380. "name": {
  13381. "type": "string"
  13382. },
  13383. "kind": {
  13384. "type": "integer",
  13385. "minimum": 0
  13386. }
  13387. },
  13388. "required": ["text", "type", "path", "range", "name", "kind"],
  13389. "additionalProperties": false
  13390. },
  13391. "ResourceSource": {
  13392. "type": "object",
  13393. "properties": {
  13394. "text": {
  13395. "$ref": "#/components/schemas/FilePartSourceText"
  13396. },
  13397. "type": {
  13398. "type": "string",
  13399. "enum": ["resource"]
  13400. },
  13401. "clientName": {
  13402. "type": "string"
  13403. },
  13404. "uri": {
  13405. "type": "string"
  13406. }
  13407. },
  13408. "required": ["text", "type", "clientName", "uri"],
  13409. "additionalProperties": false
  13410. },
  13411. "FilePartSource": {
  13412. "anyOf": [
  13413. {
  13414. "$ref": "#/components/schemas/FileSource"
  13415. },
  13416. {
  13417. "$ref": "#/components/schemas/SymbolSource"
  13418. },
  13419. {
  13420. "$ref": "#/components/schemas/ResourceSource"
  13421. }
  13422. ]
  13423. },
  13424. "FilePart": {
  13425. "type": "object",
  13426. "properties": {
  13427. "id": {
  13428. "type": "string",
  13429. "pattern": "^prt"
  13430. },
  13431. "sessionID": {
  13432. "type": "string",
  13433. "pattern": "^ses"
  13434. },
  13435. "messageID": {
  13436. "type": "string",
  13437. "pattern": "^msg"
  13438. },
  13439. "type": {
  13440. "type": "string",
  13441. "enum": ["file"]
  13442. },
  13443. "mime": {
  13444. "type": "string"
  13445. },
  13446. "filename": {
  13447. "type": "string"
  13448. },
  13449. "url": {
  13450. "type": "string"
  13451. },
  13452. "source": {
  13453. "$ref": "#/components/schemas/FilePartSource"
  13454. }
  13455. },
  13456. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  13457. "additionalProperties": false
  13458. },
  13459. "ToolStatePending": {
  13460. "type": "object",
  13461. "properties": {
  13462. "status": {
  13463. "type": "string",
  13464. "enum": ["pending"]
  13465. },
  13466. "input": {
  13467. "type": "object"
  13468. },
  13469. "raw": {
  13470. "type": "string"
  13471. }
  13472. },
  13473. "required": ["status", "input", "raw"],
  13474. "additionalProperties": false
  13475. },
  13476. "ToolStateRunning": {
  13477. "type": "object",
  13478. "properties": {
  13479. "status": {
  13480. "type": "string",
  13481. "enum": ["running"]
  13482. },
  13483. "input": {
  13484. "type": "object"
  13485. },
  13486. "title": {
  13487. "type": "string"
  13488. },
  13489. "metadata": {
  13490. "type": "object"
  13491. },
  13492. "time": {
  13493. "type": "object",
  13494. "properties": {
  13495. "start": {
  13496. "type": "integer",
  13497. "minimum": 0
  13498. }
  13499. },
  13500. "required": ["start"],
  13501. "additionalProperties": false
  13502. }
  13503. },
  13504. "required": ["status", "input", "time"],
  13505. "additionalProperties": false
  13506. },
  13507. "ToolStateCompleted": {
  13508. "type": "object",
  13509. "properties": {
  13510. "status": {
  13511. "type": "string",
  13512. "enum": ["completed"]
  13513. },
  13514. "input": {
  13515. "type": "object"
  13516. },
  13517. "output": {
  13518. "type": "string"
  13519. },
  13520. "title": {
  13521. "type": "string"
  13522. },
  13523. "metadata": {
  13524. "type": "object"
  13525. },
  13526. "time": {
  13527. "type": "object",
  13528. "properties": {
  13529. "start": {
  13530. "type": "integer",
  13531. "minimum": 0
  13532. },
  13533. "end": {
  13534. "type": "integer",
  13535. "minimum": 0
  13536. },
  13537. "compacted": {
  13538. "type": "integer",
  13539. "minimum": 0
  13540. }
  13541. },
  13542. "required": ["start", "end"],
  13543. "additionalProperties": false
  13544. },
  13545. "attachments": {
  13546. "type": "array",
  13547. "items": {
  13548. "$ref": "#/components/schemas/FilePart"
  13549. }
  13550. }
  13551. },
  13552. "required": ["status", "input", "output", "title", "metadata", "time"],
  13553. "additionalProperties": false
  13554. },
  13555. "ToolStateError": {
  13556. "type": "object",
  13557. "properties": {
  13558. "status": {
  13559. "type": "string",
  13560. "enum": ["error"]
  13561. },
  13562. "input": {
  13563. "type": "object"
  13564. },
  13565. "error": {
  13566. "type": "string"
  13567. },
  13568. "metadata": {
  13569. "type": "object"
  13570. },
  13571. "time": {
  13572. "type": "object",
  13573. "properties": {
  13574. "start": {
  13575. "type": "integer",
  13576. "minimum": 0
  13577. },
  13578. "end": {
  13579. "type": "integer",
  13580. "minimum": 0
  13581. }
  13582. },
  13583. "required": ["start", "end"],
  13584. "additionalProperties": false
  13585. }
  13586. },
  13587. "required": ["status", "input", "error", "time"],
  13588. "additionalProperties": false
  13589. },
  13590. "ToolState": {
  13591. "anyOf": [
  13592. {
  13593. "$ref": "#/components/schemas/ToolStatePending"
  13594. },
  13595. {
  13596. "$ref": "#/components/schemas/ToolStateRunning"
  13597. },
  13598. {
  13599. "$ref": "#/components/schemas/ToolStateCompleted"
  13600. },
  13601. {
  13602. "$ref": "#/components/schemas/ToolStateError"
  13603. }
  13604. ]
  13605. },
  13606. "ToolPart": {
  13607. "type": "object",
  13608. "properties": {
  13609. "id": {
  13610. "type": "string",
  13611. "pattern": "^prt"
  13612. },
  13613. "sessionID": {
  13614. "type": "string",
  13615. "pattern": "^ses"
  13616. },
  13617. "messageID": {
  13618. "type": "string",
  13619. "pattern": "^msg"
  13620. },
  13621. "type": {
  13622. "type": "string",
  13623. "enum": ["tool"]
  13624. },
  13625. "callID": {
  13626. "type": "string"
  13627. },
  13628. "tool": {
  13629. "type": "string"
  13630. },
  13631. "state": {
  13632. "$ref": "#/components/schemas/ToolState"
  13633. },
  13634. "metadata": {
  13635. "type": "object"
  13636. }
  13637. },
  13638. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  13639. "additionalProperties": false
  13640. },
  13641. "StepStartPart": {
  13642. "type": "object",
  13643. "properties": {
  13644. "id": {
  13645. "type": "string",
  13646. "pattern": "^prt"
  13647. },
  13648. "sessionID": {
  13649. "type": "string",
  13650. "pattern": "^ses"
  13651. },
  13652. "messageID": {
  13653. "type": "string",
  13654. "pattern": "^msg"
  13655. },
  13656. "type": {
  13657. "type": "string",
  13658. "enum": ["step-start"]
  13659. },
  13660. "snapshot": {
  13661. "type": "string"
  13662. }
  13663. },
  13664. "required": ["id", "sessionID", "messageID", "type"],
  13665. "additionalProperties": false
  13666. },
  13667. "StepFinishPart": {
  13668. "type": "object",
  13669. "properties": {
  13670. "id": {
  13671. "type": "string",
  13672. "pattern": "^prt"
  13673. },
  13674. "sessionID": {
  13675. "type": "string",
  13676. "pattern": "^ses"
  13677. },
  13678. "messageID": {
  13679. "type": "string",
  13680. "pattern": "^msg"
  13681. },
  13682. "type": {
  13683. "type": "string",
  13684. "enum": ["step-finish"]
  13685. },
  13686. "reason": {
  13687. "type": "string"
  13688. },
  13689. "snapshot": {
  13690. "type": "string"
  13691. },
  13692. "cost": {
  13693. "type": "number"
  13694. },
  13695. "tokens": {
  13696. "type": "object",
  13697. "properties": {
  13698. "total": {
  13699. "type": "number"
  13700. },
  13701. "input": {
  13702. "type": "number"
  13703. },
  13704. "output": {
  13705. "type": "number"
  13706. },
  13707. "reasoning": {
  13708. "type": "number"
  13709. },
  13710. "cache": {
  13711. "type": "object",
  13712. "properties": {
  13713. "read": {
  13714. "type": "number"
  13715. },
  13716. "write": {
  13717. "type": "number"
  13718. }
  13719. },
  13720. "required": ["read", "write"],
  13721. "additionalProperties": false
  13722. }
  13723. },
  13724. "required": ["input", "output", "reasoning", "cache"],
  13725. "additionalProperties": false
  13726. }
  13727. },
  13728. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  13729. "additionalProperties": false
  13730. },
  13731. "SnapshotPart": {
  13732. "type": "object",
  13733. "properties": {
  13734. "id": {
  13735. "type": "string",
  13736. "pattern": "^prt"
  13737. },
  13738. "sessionID": {
  13739. "type": "string",
  13740. "pattern": "^ses"
  13741. },
  13742. "messageID": {
  13743. "type": "string",
  13744. "pattern": "^msg"
  13745. },
  13746. "type": {
  13747. "type": "string",
  13748. "enum": ["snapshot"]
  13749. },
  13750. "snapshot": {
  13751. "type": "string"
  13752. }
  13753. },
  13754. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  13755. "additionalProperties": false
  13756. },
  13757. "PatchPart": {
  13758. "type": "object",
  13759. "properties": {
  13760. "id": {
  13761. "type": "string",
  13762. "pattern": "^prt"
  13763. },
  13764. "sessionID": {
  13765. "type": "string",
  13766. "pattern": "^ses"
  13767. },
  13768. "messageID": {
  13769. "type": "string",
  13770. "pattern": "^msg"
  13771. },
  13772. "type": {
  13773. "type": "string",
  13774. "enum": ["patch"]
  13775. },
  13776. "hash": {
  13777. "type": "string"
  13778. },
  13779. "files": {
  13780. "type": "array",
  13781. "items": {
  13782. "type": "string"
  13783. }
  13784. }
  13785. },
  13786. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  13787. "additionalProperties": false
  13788. },
  13789. "AgentPart": {
  13790. "type": "object",
  13791. "properties": {
  13792. "id": {
  13793. "type": "string",
  13794. "pattern": "^prt"
  13795. },
  13796. "sessionID": {
  13797. "type": "string",
  13798. "pattern": "^ses"
  13799. },
  13800. "messageID": {
  13801. "type": "string",
  13802. "pattern": "^msg"
  13803. },
  13804. "type": {
  13805. "type": "string",
  13806. "enum": ["agent"]
  13807. },
  13808. "name": {
  13809. "type": "string"
  13810. },
  13811. "source": {
  13812. "type": "object",
  13813. "properties": {
  13814. "value": {
  13815. "type": "string"
  13816. },
  13817. "start": {
  13818. "type": "integer",
  13819. "minimum": 0
  13820. },
  13821. "end": {
  13822. "type": "integer",
  13823. "minimum": 0
  13824. }
  13825. },
  13826. "required": ["value", "start", "end"],
  13827. "additionalProperties": false
  13828. }
  13829. },
  13830. "required": ["id", "sessionID", "messageID", "type", "name"],
  13831. "additionalProperties": false
  13832. },
  13833. "RetryPart": {
  13834. "type": "object",
  13835. "properties": {
  13836. "id": {
  13837. "type": "string",
  13838. "pattern": "^prt"
  13839. },
  13840. "sessionID": {
  13841. "type": "string",
  13842. "pattern": "^ses"
  13843. },
  13844. "messageID": {
  13845. "type": "string",
  13846. "pattern": "^msg"
  13847. },
  13848. "type": {
  13849. "type": "string",
  13850. "enum": ["retry"]
  13851. },
  13852. "attempt": {
  13853. "type": "integer",
  13854. "minimum": 0
  13855. },
  13856. "error": {
  13857. "$ref": "#/components/schemas/APIError"
  13858. },
  13859. "time": {
  13860. "type": "object",
  13861. "properties": {
  13862. "created": {
  13863. "type": "integer",
  13864. "minimum": 0
  13865. }
  13866. },
  13867. "required": ["created"],
  13868. "additionalProperties": false
  13869. }
  13870. },
  13871. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  13872. "additionalProperties": false
  13873. },
  13874. "CompactionPart": {
  13875. "type": "object",
  13876. "properties": {
  13877. "id": {
  13878. "type": "string",
  13879. "pattern": "^prt"
  13880. },
  13881. "sessionID": {
  13882. "type": "string",
  13883. "pattern": "^ses"
  13884. },
  13885. "messageID": {
  13886. "type": "string",
  13887. "pattern": "^msg"
  13888. },
  13889. "type": {
  13890. "type": "string",
  13891. "enum": ["compaction"]
  13892. },
  13893. "auto": {
  13894. "type": "boolean"
  13895. },
  13896. "overflow": {
  13897. "type": "boolean"
  13898. },
  13899. "tail_start_id": {
  13900. "type": "string",
  13901. "pattern": "^msg"
  13902. }
  13903. },
  13904. "required": ["id", "sessionID", "messageID", "type", "auto"],
  13905. "additionalProperties": false
  13906. },
  13907. "Part": {
  13908. "anyOf": [
  13909. {
  13910. "$ref": "#/components/schemas/TextPart"
  13911. },
  13912. {
  13913. "$ref": "#/components/schemas/SubtaskPart"
  13914. },
  13915. {
  13916. "$ref": "#/components/schemas/ReasoningPart"
  13917. },
  13918. {
  13919. "$ref": "#/components/schemas/FilePart"
  13920. },
  13921. {
  13922. "$ref": "#/components/schemas/ToolPart"
  13923. },
  13924. {
  13925. "$ref": "#/components/schemas/StepStartPart"
  13926. },
  13927. {
  13928. "$ref": "#/components/schemas/StepFinishPart"
  13929. },
  13930. {
  13931. "$ref": "#/components/schemas/SnapshotPart"
  13932. },
  13933. {
  13934. "$ref": "#/components/schemas/PatchPart"
  13935. },
  13936. {
  13937. "$ref": "#/components/schemas/AgentPart"
  13938. },
  13939. {
  13940. "$ref": "#/components/schemas/RetryPart"
  13941. },
  13942. {
  13943. "$ref": "#/components/schemas/CompactionPart"
  13944. }
  13945. ]
  13946. },
  13947. "Prompt": {
  13948. "type": "object",
  13949. "properties": {
  13950. "text": {
  13951. "type": "string"
  13952. },
  13953. "files": {
  13954. "type": "array",
  13955. "items": {
  13956. "$ref": "#/components/schemas/PromptFileAttachment"
  13957. }
  13958. },
  13959. "agents": {
  13960. "type": "array",
  13961. "items": {
  13962. "$ref": "#/components/schemas/PromptAgentAttachment"
  13963. }
  13964. },
  13965. "references": {
  13966. "type": "array",
  13967. "items": {
  13968. "$ref": "#/components/schemas/PromptReferenceAttachment"
  13969. }
  13970. }
  13971. },
  13972. "required": ["text"],
  13973. "additionalProperties": false
  13974. },
  13975. "Pty": {
  13976. "type": "object",
  13977. "properties": {
  13978. "id": {
  13979. "type": "string",
  13980. "pattern": "^pty"
  13981. },
  13982. "title": {
  13983. "type": "string"
  13984. },
  13985. "command": {
  13986. "type": "string"
  13987. },
  13988. "args": {
  13989. "type": "array",
  13990. "items": {
  13991. "type": "string"
  13992. }
  13993. },
  13994. "cwd": {
  13995. "type": "string"
  13996. },
  13997. "status": {
  13998. "type": "string",
  13999. "enum": ["running", "exited"]
  14000. },
  14001. "pid": {
  14002. "type": "integer",
  14003. "minimum": 0
  14004. }
  14005. },
  14006. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  14007. "additionalProperties": false
  14008. },
  14009. "Todo": {
  14010. "type": "object",
  14011. "properties": {
  14012. "content": {
  14013. "type": "string",
  14014. "description": "Brief description of the task"
  14015. },
  14016. "status": {
  14017. "type": "string",
  14018. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  14019. },
  14020. "priority": {
  14021. "type": "string",
  14022. "description": "Priority level of the task: high, medium, low"
  14023. }
  14024. },
  14025. "required": ["content", "status", "priority"],
  14026. "additionalProperties": false
  14027. },
  14028. "QuestionOption": {
  14029. "type": "object",
  14030. "properties": {
  14031. "label": {
  14032. "type": "string",
  14033. "description": "Display text (1-5 words, concise)"
  14034. },
  14035. "description": {
  14036. "type": "string",
  14037. "description": "Explanation of choice"
  14038. }
  14039. },
  14040. "required": ["label", "description"],
  14041. "additionalProperties": false
  14042. },
  14043. "QuestionInfo": {
  14044. "type": "object",
  14045. "properties": {
  14046. "question": {
  14047. "type": "string",
  14048. "description": "Complete question"
  14049. },
  14050. "header": {
  14051. "type": "string",
  14052. "description": "Very short label (max 30 chars)"
  14053. },
  14054. "options": {
  14055. "type": "array",
  14056. "items": {
  14057. "$ref": "#/components/schemas/QuestionOption"
  14058. },
  14059. "description": "Available choices"
  14060. },
  14061. "multiple": {
  14062. "type": "boolean"
  14063. },
  14064. "custom": {
  14065. "type": "boolean"
  14066. }
  14067. },
  14068. "required": ["question", "header", "options"],
  14069. "additionalProperties": false
  14070. },
  14071. "QuestionTool": {
  14072. "type": "object",
  14073. "properties": {
  14074. "messageID": {
  14075. "type": "string",
  14076. "pattern": "^msg"
  14077. },
  14078. "callID": {
  14079. "type": "string"
  14080. }
  14081. },
  14082. "required": ["messageID", "callID"],
  14083. "additionalProperties": false
  14084. },
  14085. "QuestionAnswer": {
  14086. "type": "array",
  14087. "items": {
  14088. "type": "string"
  14089. }
  14090. },
  14091. "SessionStatus": {
  14092. "anyOf": [
  14093. {
  14094. "type": "object",
  14095. "properties": {
  14096. "type": {
  14097. "type": "string",
  14098. "enum": ["idle"]
  14099. }
  14100. },
  14101. "required": ["type"],
  14102. "additionalProperties": false
  14103. },
  14104. {
  14105. "type": "object",
  14106. "properties": {
  14107. "type": {
  14108. "type": "string",
  14109. "enum": ["retry"]
  14110. },
  14111. "attempt": {
  14112. "type": "integer",
  14113. "minimum": 0
  14114. },
  14115. "message": {
  14116. "type": "string"
  14117. },
  14118. "action": {
  14119. "type": "object",
  14120. "properties": {
  14121. "reason": {
  14122. "type": "string"
  14123. },
  14124. "provider": {
  14125. "type": "string"
  14126. },
  14127. "title": {
  14128. "type": "string"
  14129. },
  14130. "message": {
  14131. "type": "string"
  14132. },
  14133. "label": {
  14134. "type": "string"
  14135. },
  14136. "link": {
  14137. "type": "string"
  14138. }
  14139. },
  14140. "required": ["reason", "provider", "title", "message", "label"],
  14141. "additionalProperties": false
  14142. },
  14143. "next": {
  14144. "type": "integer",
  14145. "minimum": 0
  14146. }
  14147. },
  14148. "required": ["type", "attempt", "message", "next"],
  14149. "additionalProperties": false
  14150. },
  14151. {
  14152. "type": "object",
  14153. "properties": {
  14154. "type": {
  14155. "type": "string",
  14156. "enum": ["busy"]
  14157. }
  14158. },
  14159. "required": ["type"],
  14160. "additionalProperties": false
  14161. }
  14162. ]
  14163. },
  14164. "GlobalEvent": {
  14165. "type": "object",
  14166. "properties": {
  14167. "directory": {
  14168. "type": "string"
  14169. },
  14170. "project": {
  14171. "type": "string"
  14172. },
  14173. "workspace": {
  14174. "type": "string"
  14175. },
  14176. "payload": {
  14177. "anyOf": [
  14178. {
  14179. "type": "object",
  14180. "properties": {
  14181. "id": {
  14182. "type": "string",
  14183. "pattern": "^evt_"
  14184. },
  14185. "type": {
  14186. "type": "string",
  14187. "enum": ["models-dev.refreshed"]
  14188. },
  14189. "properties": {
  14190. "type": "object",
  14191. "properties": {}
  14192. }
  14193. },
  14194. "required": ["id", "type", "properties"],
  14195. "additionalProperties": false
  14196. },
  14197. {
  14198. "type": "object",
  14199. "properties": {
  14200. "id": {
  14201. "type": "string",
  14202. "pattern": "^evt_"
  14203. },
  14204. "type": {
  14205. "type": "string",
  14206. "enum": ["plugin.added"]
  14207. },
  14208. "properties": {
  14209. "type": "object",
  14210. "properties": {
  14211. "id": {
  14212. "type": "string"
  14213. }
  14214. },
  14215. "required": ["id"],
  14216. "additionalProperties": false
  14217. }
  14218. },
  14219. "required": ["id", "type", "properties"],
  14220. "additionalProperties": false
  14221. },
  14222. {
  14223. "type": "object",
  14224. "properties": {
  14225. "id": {
  14226. "type": "string",
  14227. "pattern": "^evt_"
  14228. },
  14229. "type": {
  14230. "type": "string",
  14231. "enum": ["catalog.model.updated"]
  14232. },
  14233. "properties": {
  14234. "type": "object",
  14235. "properties": {
  14236. "model": {
  14237. "$ref": "#/components/schemas/ModelV2Info"
  14238. }
  14239. },
  14240. "required": ["model"],
  14241. "additionalProperties": false
  14242. }
  14243. },
  14244. "required": ["id", "type", "properties"],
  14245. "additionalProperties": false
  14246. },
  14247. {
  14248. "type": "object",
  14249. "properties": {
  14250. "id": {
  14251. "type": "string",
  14252. "pattern": "^evt_"
  14253. },
  14254. "type": {
  14255. "type": "string",
  14256. "enum": ["session.created"]
  14257. },
  14258. "properties": {
  14259. "type": "object",
  14260. "properties": {
  14261. "sessionID": {
  14262. "type": "string",
  14263. "pattern": "^ses"
  14264. },
  14265. "info": {
  14266. "$ref": "#/components/schemas/Session"
  14267. }
  14268. },
  14269. "required": ["sessionID", "info"],
  14270. "additionalProperties": false
  14271. }
  14272. },
  14273. "required": ["id", "type", "properties"],
  14274. "additionalProperties": false
  14275. },
  14276. {
  14277. "type": "object",
  14278. "properties": {
  14279. "id": {
  14280. "type": "string",
  14281. "pattern": "^evt_"
  14282. },
  14283. "type": {
  14284. "type": "string",
  14285. "enum": ["session.updated"]
  14286. },
  14287. "properties": {
  14288. "type": "object",
  14289. "properties": {
  14290. "sessionID": {
  14291. "type": "string",
  14292. "pattern": "^ses"
  14293. },
  14294. "info": {
  14295. "$ref": "#/components/schemas/Session"
  14296. }
  14297. },
  14298. "required": ["sessionID", "info"],
  14299. "additionalProperties": false
  14300. }
  14301. },
  14302. "required": ["id", "type", "properties"],
  14303. "additionalProperties": false
  14304. },
  14305. {
  14306. "type": "object",
  14307. "properties": {
  14308. "id": {
  14309. "type": "string",
  14310. "pattern": "^evt_"
  14311. },
  14312. "type": {
  14313. "type": "string",
  14314. "enum": ["session.deleted"]
  14315. },
  14316. "properties": {
  14317. "type": "object",
  14318. "properties": {
  14319. "sessionID": {
  14320. "type": "string",
  14321. "pattern": "^ses"
  14322. },
  14323. "info": {
  14324. "$ref": "#/components/schemas/Session"
  14325. }
  14326. },
  14327. "required": ["sessionID", "info"],
  14328. "additionalProperties": false
  14329. }
  14330. },
  14331. "required": ["id", "type", "properties"],
  14332. "additionalProperties": false
  14333. },
  14334. {
  14335. "type": "object",
  14336. "properties": {
  14337. "id": {
  14338. "type": "string",
  14339. "pattern": "^evt_"
  14340. },
  14341. "type": {
  14342. "type": "string",
  14343. "enum": ["message.updated"]
  14344. },
  14345. "properties": {
  14346. "type": "object",
  14347. "properties": {
  14348. "sessionID": {
  14349. "type": "string",
  14350. "pattern": "^ses"
  14351. },
  14352. "info": {
  14353. "$ref": "#/components/schemas/Message"
  14354. }
  14355. },
  14356. "required": ["sessionID", "info"],
  14357. "additionalProperties": false
  14358. }
  14359. },
  14360. "required": ["id", "type", "properties"],
  14361. "additionalProperties": false
  14362. },
  14363. {
  14364. "type": "object",
  14365. "properties": {
  14366. "id": {
  14367. "type": "string",
  14368. "pattern": "^evt_"
  14369. },
  14370. "type": {
  14371. "type": "string",
  14372. "enum": ["message.removed"]
  14373. },
  14374. "properties": {
  14375. "type": "object",
  14376. "properties": {
  14377. "sessionID": {
  14378. "type": "string",
  14379. "pattern": "^ses"
  14380. },
  14381. "messageID": {
  14382. "type": "string",
  14383. "pattern": "^msg"
  14384. }
  14385. },
  14386. "required": ["sessionID", "messageID"],
  14387. "additionalProperties": false
  14388. }
  14389. },
  14390. "required": ["id", "type", "properties"],
  14391. "additionalProperties": false
  14392. },
  14393. {
  14394. "type": "object",
  14395. "properties": {
  14396. "id": {
  14397. "type": "string",
  14398. "pattern": "^evt_"
  14399. },
  14400. "type": {
  14401. "type": "string",
  14402. "enum": ["message.part.updated"]
  14403. },
  14404. "properties": {
  14405. "type": "object",
  14406. "properties": {
  14407. "sessionID": {
  14408. "type": "string",
  14409. "pattern": "^ses"
  14410. },
  14411. "part": {
  14412. "$ref": "#/components/schemas/Part"
  14413. },
  14414. "time": {
  14415. "type": "number"
  14416. }
  14417. },
  14418. "required": ["sessionID", "part", "time"],
  14419. "additionalProperties": false
  14420. }
  14421. },
  14422. "required": ["id", "type", "properties"],
  14423. "additionalProperties": false
  14424. },
  14425. {
  14426. "type": "object",
  14427. "properties": {
  14428. "id": {
  14429. "type": "string",
  14430. "pattern": "^evt_"
  14431. },
  14432. "type": {
  14433. "type": "string",
  14434. "enum": ["message.part.removed"]
  14435. },
  14436. "properties": {
  14437. "type": "object",
  14438. "properties": {
  14439. "sessionID": {
  14440. "type": "string",
  14441. "pattern": "^ses"
  14442. },
  14443. "messageID": {
  14444. "type": "string",
  14445. "pattern": "^msg"
  14446. },
  14447. "partID": {
  14448. "type": "string",
  14449. "pattern": "^prt"
  14450. }
  14451. },
  14452. "required": ["sessionID", "messageID", "partID"],
  14453. "additionalProperties": false
  14454. }
  14455. },
  14456. "required": ["id", "type", "properties"],
  14457. "additionalProperties": false
  14458. },
  14459. {
  14460. "type": "object",
  14461. "properties": {
  14462. "id": {
  14463. "type": "string",
  14464. "pattern": "^evt_"
  14465. },
  14466. "type": {
  14467. "type": "string",
  14468. "enum": ["session.next.agent.switched"]
  14469. },
  14470. "properties": {
  14471. "type": "object",
  14472. "properties": {
  14473. "timestamp": {
  14474. "type": "number"
  14475. },
  14476. "sessionID": {
  14477. "type": "string",
  14478. "pattern": "^ses"
  14479. },
  14480. "messageID": {
  14481. "type": "string",
  14482. "pattern": "^msg_"
  14483. },
  14484. "agent": {
  14485. "type": "string"
  14486. }
  14487. },
  14488. "required": ["timestamp", "sessionID", "messageID", "agent"],
  14489. "additionalProperties": false
  14490. }
  14491. },
  14492. "required": ["id", "type", "properties"],
  14493. "additionalProperties": false
  14494. },
  14495. {
  14496. "type": "object",
  14497. "properties": {
  14498. "id": {
  14499. "type": "string",
  14500. "pattern": "^evt_"
  14501. },
  14502. "type": {
  14503. "type": "string",
  14504. "enum": ["session.next.model.switched"]
  14505. },
  14506. "properties": {
  14507. "type": "object",
  14508. "properties": {
  14509. "timestamp": {
  14510. "type": "number"
  14511. },
  14512. "sessionID": {
  14513. "type": "string",
  14514. "pattern": "^ses"
  14515. },
  14516. "messageID": {
  14517. "type": "string",
  14518. "pattern": "^msg_"
  14519. },
  14520. "model": {
  14521. "type": "object",
  14522. "properties": {
  14523. "id": {
  14524. "type": "string"
  14525. },
  14526. "providerID": {
  14527. "type": "string"
  14528. },
  14529. "variant": {
  14530. "type": "string"
  14531. }
  14532. },
  14533. "required": ["id", "providerID"],
  14534. "additionalProperties": false
  14535. }
  14536. },
  14537. "required": ["timestamp", "sessionID", "messageID", "model"],
  14538. "additionalProperties": false
  14539. }
  14540. },
  14541. "required": ["id", "type", "properties"],
  14542. "additionalProperties": false
  14543. },
  14544. {
  14545. "type": "object",
  14546. "properties": {
  14547. "id": {
  14548. "type": "string",
  14549. "pattern": "^evt_"
  14550. },
  14551. "type": {
  14552. "type": "string",
  14553. "enum": ["session.next.moved"]
  14554. },
  14555. "properties": {
  14556. "type": "object",
  14557. "properties": {
  14558. "timestamp": {
  14559. "type": "number"
  14560. },
  14561. "sessionID": {
  14562. "type": "string",
  14563. "pattern": "^ses"
  14564. },
  14565. "location": {
  14566. "$ref": "#/components/schemas/LocationRef"
  14567. },
  14568. "subdirectory": {
  14569. "type": "string"
  14570. }
  14571. },
  14572. "required": ["timestamp", "sessionID", "location"],
  14573. "additionalProperties": false
  14574. }
  14575. },
  14576. "required": ["id", "type", "properties"],
  14577. "additionalProperties": false
  14578. },
  14579. {
  14580. "type": "object",
  14581. "properties": {
  14582. "id": {
  14583. "type": "string",
  14584. "pattern": "^evt_"
  14585. },
  14586. "type": {
  14587. "type": "string",
  14588. "enum": ["session.next.prompted"]
  14589. },
  14590. "properties": {
  14591. "type": "object",
  14592. "properties": {
  14593. "timestamp": {
  14594. "type": "number"
  14595. },
  14596. "sessionID": {
  14597. "type": "string",
  14598. "pattern": "^ses"
  14599. },
  14600. "messageID": {
  14601. "type": "string",
  14602. "pattern": "^msg_"
  14603. },
  14604. "prompt": {
  14605. "$ref": "#/components/schemas/Prompt"
  14606. },
  14607. "delivery": {
  14608. "type": "string",
  14609. "enum": ["steer", "queue"]
  14610. }
  14611. },
  14612. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14613. "additionalProperties": false
  14614. }
  14615. },
  14616. "required": ["id", "type", "properties"],
  14617. "additionalProperties": false
  14618. },
  14619. {
  14620. "type": "object",
  14621. "properties": {
  14622. "id": {
  14623. "type": "string",
  14624. "pattern": "^evt_"
  14625. },
  14626. "type": {
  14627. "type": "string",
  14628. "enum": ["session.next.prompt.admitted"]
  14629. },
  14630. "properties": {
  14631. "type": "object",
  14632. "properties": {
  14633. "timestamp": {
  14634. "type": "number"
  14635. },
  14636. "sessionID": {
  14637. "type": "string",
  14638. "pattern": "^ses"
  14639. },
  14640. "messageID": {
  14641. "type": "string",
  14642. "pattern": "^msg_"
  14643. },
  14644. "prompt": {
  14645. "$ref": "#/components/schemas/Prompt"
  14646. },
  14647. "delivery": {
  14648. "type": "string",
  14649. "enum": ["steer", "queue"]
  14650. }
  14651. },
  14652. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14653. "additionalProperties": false
  14654. }
  14655. },
  14656. "required": ["id", "type", "properties"],
  14657. "additionalProperties": false
  14658. },
  14659. {
  14660. "type": "object",
  14661. "properties": {
  14662. "id": {
  14663. "type": "string",
  14664. "pattern": "^evt_"
  14665. },
  14666. "type": {
  14667. "type": "string",
  14668. "enum": ["session.next.prompt.promoted"]
  14669. },
  14670. "properties": {
  14671. "type": "object",
  14672. "properties": {
  14673. "timestamp": {
  14674. "type": "number"
  14675. },
  14676. "sessionID": {
  14677. "type": "string",
  14678. "pattern": "^ses"
  14679. },
  14680. "messageID": {
  14681. "type": "string",
  14682. "pattern": "^msg_"
  14683. },
  14684. "prompt": {
  14685. "$ref": "#/components/schemas/Prompt"
  14686. },
  14687. "timeCreated": {
  14688. "type": "number"
  14689. }
  14690. },
  14691. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  14692. "additionalProperties": false
  14693. }
  14694. },
  14695. "required": ["id", "type", "properties"],
  14696. "additionalProperties": false
  14697. },
  14698. {
  14699. "type": "object",
  14700. "properties": {
  14701. "id": {
  14702. "type": "string",
  14703. "pattern": "^evt_"
  14704. },
  14705. "type": {
  14706. "type": "string",
  14707. "enum": ["session.next.context.updated"]
  14708. },
  14709. "properties": {
  14710. "type": "object",
  14711. "properties": {
  14712. "timestamp": {
  14713. "type": "number"
  14714. },
  14715. "sessionID": {
  14716. "type": "string",
  14717. "pattern": "^ses"
  14718. },
  14719. "messageID": {
  14720. "type": "string",
  14721. "pattern": "^msg_"
  14722. },
  14723. "text": {
  14724. "type": "string"
  14725. }
  14726. },
  14727. "required": ["timestamp", "sessionID", "messageID", "text"],
  14728. "additionalProperties": false
  14729. }
  14730. },
  14731. "required": ["id", "type", "properties"],
  14732. "additionalProperties": false
  14733. },
  14734. {
  14735. "type": "object",
  14736. "properties": {
  14737. "id": {
  14738. "type": "string",
  14739. "pattern": "^evt_"
  14740. },
  14741. "type": {
  14742. "type": "string",
  14743. "enum": ["session.next.synthetic"]
  14744. },
  14745. "properties": {
  14746. "type": "object",
  14747. "properties": {
  14748. "timestamp": {
  14749. "type": "number"
  14750. },
  14751. "sessionID": {
  14752. "type": "string",
  14753. "pattern": "^ses"
  14754. },
  14755. "messageID": {
  14756. "type": "string",
  14757. "pattern": "^msg_"
  14758. },
  14759. "text": {
  14760. "type": "string"
  14761. }
  14762. },
  14763. "required": ["timestamp", "sessionID", "messageID", "text"],
  14764. "additionalProperties": false
  14765. }
  14766. },
  14767. "required": ["id", "type", "properties"],
  14768. "additionalProperties": false
  14769. },
  14770. {
  14771. "type": "object",
  14772. "properties": {
  14773. "id": {
  14774. "type": "string",
  14775. "pattern": "^evt_"
  14776. },
  14777. "type": {
  14778. "type": "string",
  14779. "enum": ["session.next.shell.started"]
  14780. },
  14781. "properties": {
  14782. "type": "object",
  14783. "properties": {
  14784. "timestamp": {
  14785. "type": "number"
  14786. },
  14787. "sessionID": {
  14788. "type": "string",
  14789. "pattern": "^ses"
  14790. },
  14791. "messageID": {
  14792. "type": "string",
  14793. "pattern": "^msg_"
  14794. },
  14795. "callID": {
  14796. "type": "string"
  14797. },
  14798. "command": {
  14799. "type": "string"
  14800. }
  14801. },
  14802. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  14803. "additionalProperties": false
  14804. }
  14805. },
  14806. "required": ["id", "type", "properties"],
  14807. "additionalProperties": false
  14808. },
  14809. {
  14810. "type": "object",
  14811. "properties": {
  14812. "id": {
  14813. "type": "string",
  14814. "pattern": "^evt_"
  14815. },
  14816. "type": {
  14817. "type": "string",
  14818. "enum": ["session.next.shell.ended"]
  14819. },
  14820. "properties": {
  14821. "type": "object",
  14822. "properties": {
  14823. "timestamp": {
  14824. "type": "number"
  14825. },
  14826. "sessionID": {
  14827. "type": "string",
  14828. "pattern": "^ses"
  14829. },
  14830. "callID": {
  14831. "type": "string"
  14832. },
  14833. "output": {
  14834. "type": "string"
  14835. }
  14836. },
  14837. "required": ["timestamp", "sessionID", "callID", "output"],
  14838. "additionalProperties": false
  14839. }
  14840. },
  14841. "required": ["id", "type", "properties"],
  14842. "additionalProperties": false
  14843. },
  14844. {
  14845. "type": "object",
  14846. "properties": {
  14847. "id": {
  14848. "type": "string",
  14849. "pattern": "^evt_"
  14850. },
  14851. "type": {
  14852. "type": "string",
  14853. "enum": ["session.next.step.started"]
  14854. },
  14855. "properties": {
  14856. "type": "object",
  14857. "properties": {
  14858. "timestamp": {
  14859. "type": "number"
  14860. },
  14861. "sessionID": {
  14862. "type": "string",
  14863. "pattern": "^ses"
  14864. },
  14865. "assistantMessageID": {
  14866. "type": "string",
  14867. "pattern": "^msg_"
  14868. },
  14869. "agent": {
  14870. "type": "string"
  14871. },
  14872. "model": {
  14873. "type": "object",
  14874. "properties": {
  14875. "id": {
  14876. "type": "string"
  14877. },
  14878. "providerID": {
  14879. "type": "string"
  14880. },
  14881. "variant": {
  14882. "type": "string"
  14883. }
  14884. },
  14885. "required": ["id", "providerID"],
  14886. "additionalProperties": false
  14887. },
  14888. "snapshot": {
  14889. "type": "string"
  14890. }
  14891. },
  14892. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  14893. "additionalProperties": false
  14894. }
  14895. },
  14896. "required": ["id", "type", "properties"],
  14897. "additionalProperties": false
  14898. },
  14899. {
  14900. "type": "object",
  14901. "properties": {
  14902. "id": {
  14903. "type": "string",
  14904. "pattern": "^evt_"
  14905. },
  14906. "type": {
  14907. "type": "string",
  14908. "enum": ["session.next.step.ended"]
  14909. },
  14910. "properties": {
  14911. "type": "object",
  14912. "properties": {
  14913. "timestamp": {
  14914. "type": "number"
  14915. },
  14916. "sessionID": {
  14917. "type": "string",
  14918. "pattern": "^ses"
  14919. },
  14920. "assistantMessageID": {
  14921. "type": "string",
  14922. "pattern": "^msg_"
  14923. },
  14924. "finish": {
  14925. "type": "string"
  14926. },
  14927. "cost": {
  14928. "type": "number"
  14929. },
  14930. "tokens": {
  14931. "type": "object",
  14932. "properties": {
  14933. "input": {
  14934. "type": "number"
  14935. },
  14936. "output": {
  14937. "type": "number"
  14938. },
  14939. "reasoning": {
  14940. "type": "number"
  14941. },
  14942. "cache": {
  14943. "type": "object",
  14944. "properties": {
  14945. "read": {
  14946. "type": "number"
  14947. },
  14948. "write": {
  14949. "type": "number"
  14950. }
  14951. },
  14952. "required": ["read", "write"],
  14953. "additionalProperties": false
  14954. }
  14955. },
  14956. "required": ["input", "output", "reasoning", "cache"],
  14957. "additionalProperties": false
  14958. },
  14959. "snapshot": {
  14960. "type": "string"
  14961. }
  14962. },
  14963. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  14964. "additionalProperties": false
  14965. }
  14966. },
  14967. "required": ["id", "type", "properties"],
  14968. "additionalProperties": false
  14969. },
  14970. {
  14971. "type": "object",
  14972. "properties": {
  14973. "id": {
  14974. "type": "string",
  14975. "pattern": "^evt_"
  14976. },
  14977. "type": {
  14978. "type": "string",
  14979. "enum": ["session.next.step.failed"]
  14980. },
  14981. "properties": {
  14982. "type": "object",
  14983. "properties": {
  14984. "timestamp": {
  14985. "type": "number"
  14986. },
  14987. "sessionID": {
  14988. "type": "string",
  14989. "pattern": "^ses"
  14990. },
  14991. "assistantMessageID": {
  14992. "type": "string",
  14993. "pattern": "^msg_"
  14994. },
  14995. "error": {
  14996. "$ref": "#/components/schemas/SessionErrorUnknown"
  14997. }
  14998. },
  14999. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  15000. "additionalProperties": false
  15001. }
  15002. },
  15003. "required": ["id", "type", "properties"],
  15004. "additionalProperties": false
  15005. },
  15006. {
  15007. "type": "object",
  15008. "properties": {
  15009. "id": {
  15010. "type": "string",
  15011. "pattern": "^evt_"
  15012. },
  15013. "type": {
  15014. "type": "string",
  15015. "enum": ["session.next.text.started"]
  15016. },
  15017. "properties": {
  15018. "type": "object",
  15019. "properties": {
  15020. "timestamp": {
  15021. "type": "number"
  15022. },
  15023. "sessionID": {
  15024. "type": "string",
  15025. "pattern": "^ses"
  15026. },
  15027. "assistantMessageID": {
  15028. "type": "string",
  15029. "pattern": "^msg_"
  15030. },
  15031. "textID": {
  15032. "type": "string"
  15033. }
  15034. },
  15035. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  15036. "additionalProperties": false
  15037. }
  15038. },
  15039. "required": ["id", "type", "properties"],
  15040. "additionalProperties": false
  15041. },
  15042. {
  15043. "type": "object",
  15044. "properties": {
  15045. "id": {
  15046. "type": "string",
  15047. "pattern": "^evt_"
  15048. },
  15049. "type": {
  15050. "type": "string",
  15051. "enum": ["session.next.text.delta"]
  15052. },
  15053. "properties": {
  15054. "type": "object",
  15055. "properties": {
  15056. "timestamp": {
  15057. "type": "number"
  15058. },
  15059. "sessionID": {
  15060. "type": "string",
  15061. "pattern": "^ses"
  15062. },
  15063. "assistantMessageID": {
  15064. "type": "string",
  15065. "pattern": "^msg_"
  15066. },
  15067. "textID": {
  15068. "type": "string"
  15069. },
  15070. "delta": {
  15071. "type": "string"
  15072. }
  15073. },
  15074. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  15075. "additionalProperties": false
  15076. }
  15077. },
  15078. "required": ["id", "type", "properties"],
  15079. "additionalProperties": false
  15080. },
  15081. {
  15082. "type": "object",
  15083. "properties": {
  15084. "id": {
  15085. "type": "string",
  15086. "pattern": "^evt_"
  15087. },
  15088. "type": {
  15089. "type": "string",
  15090. "enum": ["session.next.text.ended"]
  15091. },
  15092. "properties": {
  15093. "type": "object",
  15094. "properties": {
  15095. "timestamp": {
  15096. "type": "number"
  15097. },
  15098. "sessionID": {
  15099. "type": "string",
  15100. "pattern": "^ses"
  15101. },
  15102. "assistantMessageID": {
  15103. "type": "string",
  15104. "pattern": "^msg_"
  15105. },
  15106. "textID": {
  15107. "type": "string"
  15108. },
  15109. "text": {
  15110. "type": "string"
  15111. }
  15112. },
  15113. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  15114. "additionalProperties": false
  15115. }
  15116. },
  15117. "required": ["id", "type", "properties"],
  15118. "additionalProperties": false
  15119. },
  15120. {
  15121. "type": "object",
  15122. "properties": {
  15123. "id": {
  15124. "type": "string",
  15125. "pattern": "^evt_"
  15126. },
  15127. "type": {
  15128. "type": "string",
  15129. "enum": ["session.next.reasoning.started"]
  15130. },
  15131. "properties": {
  15132. "type": "object",
  15133. "properties": {
  15134. "timestamp": {
  15135. "type": "number"
  15136. },
  15137. "sessionID": {
  15138. "type": "string",
  15139. "pattern": "^ses"
  15140. },
  15141. "assistantMessageID": {
  15142. "type": "string",
  15143. "pattern": "^msg_"
  15144. },
  15145. "reasoningID": {
  15146. "type": "string"
  15147. },
  15148. "providerMetadata": {
  15149. "type": "object",
  15150. "additionalProperties": {
  15151. "type": "object"
  15152. }
  15153. }
  15154. },
  15155. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  15156. "additionalProperties": false
  15157. }
  15158. },
  15159. "required": ["id", "type", "properties"],
  15160. "additionalProperties": false
  15161. },
  15162. {
  15163. "type": "object",
  15164. "properties": {
  15165. "id": {
  15166. "type": "string",
  15167. "pattern": "^evt_"
  15168. },
  15169. "type": {
  15170. "type": "string",
  15171. "enum": ["session.next.reasoning.delta"]
  15172. },
  15173. "properties": {
  15174. "type": "object",
  15175. "properties": {
  15176. "timestamp": {
  15177. "type": "number"
  15178. },
  15179. "sessionID": {
  15180. "type": "string",
  15181. "pattern": "^ses"
  15182. },
  15183. "assistantMessageID": {
  15184. "type": "string",
  15185. "pattern": "^msg_"
  15186. },
  15187. "reasoningID": {
  15188. "type": "string"
  15189. },
  15190. "delta": {
  15191. "type": "string"
  15192. }
  15193. },
  15194. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  15195. "additionalProperties": false
  15196. }
  15197. },
  15198. "required": ["id", "type", "properties"],
  15199. "additionalProperties": false
  15200. },
  15201. {
  15202. "type": "object",
  15203. "properties": {
  15204. "id": {
  15205. "type": "string",
  15206. "pattern": "^evt_"
  15207. },
  15208. "type": {
  15209. "type": "string",
  15210. "enum": ["session.next.reasoning.ended"]
  15211. },
  15212. "properties": {
  15213. "type": "object",
  15214. "properties": {
  15215. "timestamp": {
  15216. "type": "number"
  15217. },
  15218. "sessionID": {
  15219. "type": "string",
  15220. "pattern": "^ses"
  15221. },
  15222. "assistantMessageID": {
  15223. "type": "string",
  15224. "pattern": "^msg_"
  15225. },
  15226. "reasoningID": {
  15227. "type": "string"
  15228. },
  15229. "text": {
  15230. "type": "string"
  15231. },
  15232. "providerMetadata": {
  15233. "type": "object",
  15234. "additionalProperties": {
  15235. "type": "object"
  15236. }
  15237. }
  15238. },
  15239. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  15240. "additionalProperties": false
  15241. }
  15242. },
  15243. "required": ["id", "type", "properties"],
  15244. "additionalProperties": false
  15245. },
  15246. {
  15247. "type": "object",
  15248. "properties": {
  15249. "id": {
  15250. "type": "string",
  15251. "pattern": "^evt_"
  15252. },
  15253. "type": {
  15254. "type": "string",
  15255. "enum": ["session.next.tool.input.started"]
  15256. },
  15257. "properties": {
  15258. "type": "object",
  15259. "properties": {
  15260. "timestamp": {
  15261. "type": "number"
  15262. },
  15263. "sessionID": {
  15264. "type": "string",
  15265. "pattern": "^ses"
  15266. },
  15267. "assistantMessageID": {
  15268. "type": "string",
  15269. "pattern": "^msg_"
  15270. },
  15271. "callID": {
  15272. "type": "string"
  15273. },
  15274. "name": {
  15275. "type": "string"
  15276. }
  15277. },
  15278. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  15279. "additionalProperties": false
  15280. }
  15281. },
  15282. "required": ["id", "type", "properties"],
  15283. "additionalProperties": false
  15284. },
  15285. {
  15286. "type": "object",
  15287. "properties": {
  15288. "id": {
  15289. "type": "string",
  15290. "pattern": "^evt_"
  15291. },
  15292. "type": {
  15293. "type": "string",
  15294. "enum": ["session.next.tool.input.delta"]
  15295. },
  15296. "properties": {
  15297. "type": "object",
  15298. "properties": {
  15299. "timestamp": {
  15300. "type": "number"
  15301. },
  15302. "sessionID": {
  15303. "type": "string",
  15304. "pattern": "^ses"
  15305. },
  15306. "assistantMessageID": {
  15307. "type": "string",
  15308. "pattern": "^msg_"
  15309. },
  15310. "callID": {
  15311. "type": "string"
  15312. },
  15313. "delta": {
  15314. "type": "string"
  15315. }
  15316. },
  15317. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  15318. "additionalProperties": false
  15319. }
  15320. },
  15321. "required": ["id", "type", "properties"],
  15322. "additionalProperties": false
  15323. },
  15324. {
  15325. "type": "object",
  15326. "properties": {
  15327. "id": {
  15328. "type": "string",
  15329. "pattern": "^evt_"
  15330. },
  15331. "type": {
  15332. "type": "string",
  15333. "enum": ["session.next.tool.input.ended"]
  15334. },
  15335. "properties": {
  15336. "type": "object",
  15337. "properties": {
  15338. "timestamp": {
  15339. "type": "number"
  15340. },
  15341. "sessionID": {
  15342. "type": "string",
  15343. "pattern": "^ses"
  15344. },
  15345. "assistantMessageID": {
  15346. "type": "string",
  15347. "pattern": "^msg_"
  15348. },
  15349. "callID": {
  15350. "type": "string"
  15351. },
  15352. "text": {
  15353. "type": "string"
  15354. }
  15355. },
  15356. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  15357. "additionalProperties": false
  15358. }
  15359. },
  15360. "required": ["id", "type", "properties"],
  15361. "additionalProperties": false
  15362. },
  15363. {
  15364. "type": "object",
  15365. "properties": {
  15366. "id": {
  15367. "type": "string",
  15368. "pattern": "^evt_"
  15369. },
  15370. "type": {
  15371. "type": "string",
  15372. "enum": ["session.next.tool.called"]
  15373. },
  15374. "properties": {
  15375. "type": "object",
  15376. "properties": {
  15377. "timestamp": {
  15378. "type": "number"
  15379. },
  15380. "sessionID": {
  15381. "type": "string",
  15382. "pattern": "^ses"
  15383. },
  15384. "assistantMessageID": {
  15385. "type": "string",
  15386. "pattern": "^msg_"
  15387. },
  15388. "callID": {
  15389. "type": "string"
  15390. },
  15391. "tool": {
  15392. "type": "string"
  15393. },
  15394. "input": {
  15395. "type": "object"
  15396. },
  15397. "provider": {
  15398. "type": "object",
  15399. "properties": {
  15400. "executed": {
  15401. "type": "boolean"
  15402. },
  15403. "metadata": {
  15404. "type": "object",
  15405. "additionalProperties": {
  15406. "type": "object"
  15407. }
  15408. }
  15409. },
  15410. "required": ["executed"],
  15411. "additionalProperties": false
  15412. }
  15413. },
  15414. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15415. "additionalProperties": false
  15416. }
  15417. },
  15418. "required": ["id", "type", "properties"],
  15419. "additionalProperties": false
  15420. },
  15421. {
  15422. "type": "object",
  15423. "properties": {
  15424. "id": {
  15425. "type": "string",
  15426. "pattern": "^evt_"
  15427. },
  15428. "type": {
  15429. "type": "string",
  15430. "enum": ["session.next.tool.progress"]
  15431. },
  15432. "properties": {
  15433. "type": "object",
  15434. "properties": {
  15435. "timestamp": {
  15436. "type": "number"
  15437. },
  15438. "sessionID": {
  15439. "type": "string",
  15440. "pattern": "^ses"
  15441. },
  15442. "assistantMessageID": {
  15443. "type": "string",
  15444. "pattern": "^msg_"
  15445. },
  15446. "callID": {
  15447. "type": "string"
  15448. },
  15449. "structured": {
  15450. "type": "object"
  15451. },
  15452. "content": {
  15453. "type": "array",
  15454. "items": {
  15455. "anyOf": [
  15456. {
  15457. "$ref": "#/components/schemas/ToolTextContent"
  15458. },
  15459. {
  15460. "$ref": "#/components/schemas/ToolFileContent"
  15461. }
  15462. ]
  15463. }
  15464. }
  15465. },
  15466. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  15467. "additionalProperties": false
  15468. }
  15469. },
  15470. "required": ["id", "type", "properties"],
  15471. "additionalProperties": false
  15472. },
  15473. {
  15474. "type": "object",
  15475. "properties": {
  15476. "id": {
  15477. "type": "string",
  15478. "pattern": "^evt_"
  15479. },
  15480. "type": {
  15481. "type": "string",
  15482. "enum": ["session.next.tool.success"]
  15483. },
  15484. "properties": {
  15485. "type": "object",
  15486. "properties": {
  15487. "timestamp": {
  15488. "type": "number"
  15489. },
  15490. "sessionID": {
  15491. "type": "string",
  15492. "pattern": "^ses"
  15493. },
  15494. "assistantMessageID": {
  15495. "type": "string",
  15496. "pattern": "^msg_"
  15497. },
  15498. "callID": {
  15499. "type": "string"
  15500. },
  15501. "structured": {
  15502. "type": "object"
  15503. },
  15504. "content": {
  15505. "type": "array",
  15506. "items": {
  15507. "anyOf": [
  15508. {
  15509. "$ref": "#/components/schemas/ToolTextContent"
  15510. },
  15511. {
  15512. "$ref": "#/components/schemas/ToolFileContent"
  15513. }
  15514. ]
  15515. }
  15516. },
  15517. "result": {},
  15518. "provider": {
  15519. "type": "object",
  15520. "properties": {
  15521. "executed": {
  15522. "type": "boolean"
  15523. },
  15524. "metadata": {
  15525. "type": "object",
  15526. "additionalProperties": {
  15527. "type": "object"
  15528. }
  15529. }
  15530. },
  15531. "required": ["executed"],
  15532. "additionalProperties": false
  15533. }
  15534. },
  15535. "required": [
  15536. "timestamp",
  15537. "sessionID",
  15538. "assistantMessageID",
  15539. "callID",
  15540. "structured",
  15541. "content",
  15542. "provider"
  15543. ],
  15544. "additionalProperties": false
  15545. }
  15546. },
  15547. "required": ["id", "type", "properties"],
  15548. "additionalProperties": false
  15549. },
  15550. {
  15551. "type": "object",
  15552. "properties": {
  15553. "id": {
  15554. "type": "string",
  15555. "pattern": "^evt_"
  15556. },
  15557. "type": {
  15558. "type": "string",
  15559. "enum": ["session.next.tool.failed"]
  15560. },
  15561. "properties": {
  15562. "type": "object",
  15563. "properties": {
  15564. "timestamp": {
  15565. "type": "number"
  15566. },
  15567. "sessionID": {
  15568. "type": "string",
  15569. "pattern": "^ses"
  15570. },
  15571. "assistantMessageID": {
  15572. "type": "string",
  15573. "pattern": "^msg_"
  15574. },
  15575. "callID": {
  15576. "type": "string"
  15577. },
  15578. "error": {
  15579. "$ref": "#/components/schemas/SessionErrorUnknown"
  15580. },
  15581. "result": {},
  15582. "provider": {
  15583. "type": "object",
  15584. "properties": {
  15585. "executed": {
  15586. "type": "boolean"
  15587. },
  15588. "metadata": {
  15589. "type": "object",
  15590. "additionalProperties": {
  15591. "type": "object"
  15592. }
  15593. }
  15594. },
  15595. "required": ["executed"],
  15596. "additionalProperties": false
  15597. }
  15598. },
  15599. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  15600. "additionalProperties": false
  15601. }
  15602. },
  15603. "required": ["id", "type", "properties"],
  15604. "additionalProperties": false
  15605. },
  15606. {
  15607. "type": "object",
  15608. "properties": {
  15609. "id": {
  15610. "type": "string",
  15611. "pattern": "^evt_"
  15612. },
  15613. "type": {
  15614. "type": "string",
  15615. "enum": ["session.next.retried"]
  15616. },
  15617. "properties": {
  15618. "type": "object",
  15619. "properties": {
  15620. "timestamp": {
  15621. "type": "number"
  15622. },
  15623. "sessionID": {
  15624. "type": "string",
  15625. "pattern": "^ses"
  15626. },
  15627. "attempt": {
  15628. "type": "number"
  15629. },
  15630. "error": {
  15631. "$ref": "#/components/schemas/SessionNextRetry_error"
  15632. }
  15633. },
  15634. "required": ["timestamp", "sessionID", "attempt", "error"],
  15635. "additionalProperties": false
  15636. }
  15637. },
  15638. "required": ["id", "type", "properties"],
  15639. "additionalProperties": false
  15640. },
  15641. {
  15642. "type": "object",
  15643. "properties": {
  15644. "id": {
  15645. "type": "string",
  15646. "pattern": "^evt_"
  15647. },
  15648. "type": {
  15649. "type": "string",
  15650. "enum": ["session.next.compaction.started"]
  15651. },
  15652. "properties": {
  15653. "type": "object",
  15654. "properties": {
  15655. "timestamp": {
  15656. "type": "number"
  15657. },
  15658. "sessionID": {
  15659. "type": "string",
  15660. "pattern": "^ses"
  15661. },
  15662. "messageID": {
  15663. "type": "string",
  15664. "pattern": "^msg_"
  15665. },
  15666. "reason": {
  15667. "type": "string",
  15668. "enum": ["auto", "manual"]
  15669. }
  15670. },
  15671. "required": ["timestamp", "sessionID", "messageID", "reason"],
  15672. "additionalProperties": false
  15673. }
  15674. },
  15675. "required": ["id", "type", "properties"],
  15676. "additionalProperties": false
  15677. },
  15678. {
  15679. "type": "object",
  15680. "properties": {
  15681. "id": {
  15682. "type": "string",
  15683. "pattern": "^evt_"
  15684. },
  15685. "type": {
  15686. "type": "string",
  15687. "enum": ["session.next.compaction.delta"]
  15688. },
  15689. "properties": {
  15690. "type": "object",
  15691. "properties": {
  15692. "timestamp": {
  15693. "type": "number"
  15694. },
  15695. "sessionID": {
  15696. "type": "string",
  15697. "pattern": "^ses"
  15698. },
  15699. "text": {
  15700. "type": "string"
  15701. }
  15702. },
  15703. "required": ["timestamp", "sessionID", "text"],
  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.ended"]
  15720. },
  15721. "properties": {
  15722. "type": "object",
  15723. "properties": {
  15724. "timestamp": {
  15725. "type": "number"
  15726. },
  15727. "sessionID": {
  15728. "type": "string",
  15729. "pattern": "^ses"
  15730. },
  15731. "text": {
  15732. "type": "string"
  15733. },
  15734. "include": {
  15735. "type": "string"
  15736. }
  15737. },
  15738. "required": ["timestamp", "sessionID", "text"],
  15739. "additionalProperties": false
  15740. }
  15741. },
  15742. "required": ["id", "type", "properties"],
  15743. "additionalProperties": false
  15744. },
  15745. {
  15746. "type": "object",
  15747. "properties": {
  15748. "id": {
  15749. "type": "string",
  15750. "pattern": "^evt_"
  15751. },
  15752. "type": {
  15753. "type": "string",
  15754. "enum": ["message.part.delta"]
  15755. },
  15756. "properties": {
  15757. "type": "object",
  15758. "properties": {
  15759. "sessionID": {
  15760. "type": "string",
  15761. "pattern": "^ses"
  15762. },
  15763. "messageID": {
  15764. "type": "string",
  15765. "pattern": "^msg"
  15766. },
  15767. "partID": {
  15768. "type": "string",
  15769. "pattern": "^prt"
  15770. },
  15771. "field": {
  15772. "type": "string"
  15773. },
  15774. "delta": {
  15775. "type": "string"
  15776. }
  15777. },
  15778. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15779. "additionalProperties": false
  15780. }
  15781. },
  15782. "required": ["id", "type", "properties"],
  15783. "additionalProperties": false
  15784. },
  15785. {
  15786. "type": "object",
  15787. "properties": {
  15788. "id": {
  15789. "type": "string",
  15790. "pattern": "^evt_"
  15791. },
  15792. "type": {
  15793. "type": "string",
  15794. "enum": ["session.diff"]
  15795. },
  15796. "properties": {
  15797. "type": "object",
  15798. "properties": {
  15799. "sessionID": {
  15800. "type": "string",
  15801. "pattern": "^ses"
  15802. },
  15803. "diff": {
  15804. "type": "array",
  15805. "items": {
  15806. "$ref": "#/components/schemas/SnapshotFileDiff"
  15807. }
  15808. }
  15809. },
  15810. "required": ["sessionID", "diff"],
  15811. "additionalProperties": false
  15812. }
  15813. },
  15814. "required": ["id", "type", "properties"],
  15815. "additionalProperties": false
  15816. },
  15817. {
  15818. "type": "object",
  15819. "properties": {
  15820. "id": {
  15821. "type": "string",
  15822. "pattern": "^evt_"
  15823. },
  15824. "type": {
  15825. "type": "string",
  15826. "enum": ["session.error"]
  15827. },
  15828. "properties": {
  15829. "type": "object",
  15830. "properties": {
  15831. "sessionID": {
  15832. "type": "string",
  15833. "pattern": "^ses"
  15834. },
  15835. "error": {
  15836. "anyOf": [
  15837. {
  15838. "$ref": "#/components/schemas/ProviderAuthError"
  15839. },
  15840. {
  15841. "$ref": "#/components/schemas/UnknownError"
  15842. },
  15843. {
  15844. "$ref": "#/components/schemas/MessageOutputLengthError"
  15845. },
  15846. {
  15847. "$ref": "#/components/schemas/MessageAbortedError"
  15848. },
  15849. {
  15850. "$ref": "#/components/schemas/StructuredOutputError"
  15851. },
  15852. {
  15853. "$ref": "#/components/schemas/ContextOverflowError"
  15854. },
  15855. {
  15856. "$ref": "#/components/schemas/APIError"
  15857. }
  15858. ]
  15859. }
  15860. },
  15861. "additionalProperties": false
  15862. }
  15863. },
  15864. "required": ["id", "type", "properties"],
  15865. "additionalProperties": false
  15866. },
  15867. {
  15868. "type": "object",
  15869. "properties": {
  15870. "id": {
  15871. "type": "string",
  15872. "pattern": "^evt_"
  15873. },
  15874. "type": {
  15875. "type": "string",
  15876. "enum": ["installation.updated"]
  15877. },
  15878. "properties": {
  15879. "type": "object",
  15880. "properties": {
  15881. "version": {
  15882. "type": "string"
  15883. }
  15884. },
  15885. "required": ["version"],
  15886. "additionalProperties": false
  15887. }
  15888. },
  15889. "required": ["id", "type", "properties"],
  15890. "additionalProperties": false
  15891. },
  15892. {
  15893. "type": "object",
  15894. "properties": {
  15895. "id": {
  15896. "type": "string",
  15897. "pattern": "^evt_"
  15898. },
  15899. "type": {
  15900. "type": "string",
  15901. "enum": ["installation.update-available"]
  15902. },
  15903. "properties": {
  15904. "type": "object",
  15905. "properties": {
  15906. "version": {
  15907. "type": "string"
  15908. }
  15909. },
  15910. "required": ["version"],
  15911. "additionalProperties": false
  15912. }
  15913. },
  15914. "required": ["id", "type", "properties"],
  15915. "additionalProperties": false
  15916. },
  15917. {
  15918. "type": "object",
  15919. "properties": {
  15920. "id": {
  15921. "type": "string",
  15922. "pattern": "^evt_"
  15923. },
  15924. "type": {
  15925. "type": "string",
  15926. "enum": ["file.edited"]
  15927. },
  15928. "properties": {
  15929. "type": "object",
  15930. "properties": {
  15931. "file": {
  15932. "type": "string"
  15933. }
  15934. },
  15935. "required": ["file"],
  15936. "additionalProperties": false
  15937. }
  15938. },
  15939. "required": ["id", "type", "properties"],
  15940. "additionalProperties": false
  15941. },
  15942. {
  15943. "type": "object",
  15944. "properties": {
  15945. "id": {
  15946. "type": "string",
  15947. "pattern": "^evt_"
  15948. },
  15949. "type": {
  15950. "type": "string",
  15951. "enum": ["account.added"]
  15952. },
  15953. "properties": {
  15954. "type": "object",
  15955. "properties": {
  15956. "account": {
  15957. "$ref": "#/components/schemas/AuthInfo"
  15958. }
  15959. },
  15960. "required": ["account"],
  15961. "additionalProperties": false
  15962. }
  15963. },
  15964. "required": ["id", "type", "properties"],
  15965. "additionalProperties": false
  15966. },
  15967. {
  15968. "type": "object",
  15969. "properties": {
  15970. "id": {
  15971. "type": "string",
  15972. "pattern": "^evt_"
  15973. },
  15974. "type": {
  15975. "type": "string",
  15976. "enum": ["account.removed"]
  15977. },
  15978. "properties": {
  15979. "type": "object",
  15980. "properties": {
  15981. "account": {
  15982. "$ref": "#/components/schemas/AuthInfo"
  15983. }
  15984. },
  15985. "required": ["account"],
  15986. "additionalProperties": false
  15987. }
  15988. },
  15989. "required": ["id", "type", "properties"],
  15990. "additionalProperties": false
  15991. },
  15992. {
  15993. "type": "object",
  15994. "properties": {
  15995. "id": {
  15996. "type": "string",
  15997. "pattern": "^evt_"
  15998. },
  15999. "type": {
  16000. "type": "string",
  16001. "enum": ["account.switched"]
  16002. },
  16003. "properties": {
  16004. "type": "object",
  16005. "properties": {
  16006. "serviceID": {
  16007. "type": "string"
  16008. },
  16009. "from": {
  16010. "type": "string"
  16011. },
  16012. "to": {
  16013. "type": "string"
  16014. }
  16015. },
  16016. "required": ["serviceID"],
  16017. "additionalProperties": false
  16018. }
  16019. },
  16020. "required": ["id", "type", "properties"],
  16021. "additionalProperties": false
  16022. },
  16023. {
  16024. "type": "object",
  16025. "properties": {
  16026. "id": {
  16027. "type": "string",
  16028. "pattern": "^evt_"
  16029. },
  16030. "type": {
  16031. "type": "string",
  16032. "enum": ["permission.v2.asked"]
  16033. },
  16034. "properties": {
  16035. "type": "object",
  16036. "properties": {
  16037. "id": {
  16038. "type": "string",
  16039. "pattern": "^per"
  16040. },
  16041. "sessionID": {
  16042. "type": "string",
  16043. "pattern": "^ses"
  16044. },
  16045. "action": {
  16046. "type": "string"
  16047. },
  16048. "resources": {
  16049. "type": "array",
  16050. "items": {
  16051. "type": "string"
  16052. }
  16053. },
  16054. "save": {
  16055. "type": "array",
  16056. "items": {
  16057. "type": "string"
  16058. }
  16059. },
  16060. "metadata": {
  16061. "type": "object"
  16062. },
  16063. "source": {
  16064. "$ref": "#/components/schemas/PermissionV2Source"
  16065. }
  16066. },
  16067. "required": ["id", "sessionID", "action", "resources"],
  16068. "additionalProperties": false
  16069. }
  16070. },
  16071. "required": ["id", "type", "properties"],
  16072. "additionalProperties": false
  16073. },
  16074. {
  16075. "type": "object",
  16076. "properties": {
  16077. "id": {
  16078. "type": "string",
  16079. "pattern": "^evt_"
  16080. },
  16081. "type": {
  16082. "type": "string",
  16083. "enum": ["permission.v2.replied"]
  16084. },
  16085. "properties": {
  16086. "type": "object",
  16087. "properties": {
  16088. "sessionID": {
  16089. "type": "string",
  16090. "pattern": "^ses"
  16091. },
  16092. "requestID": {
  16093. "type": "string",
  16094. "pattern": "^per"
  16095. },
  16096. "reply": {
  16097. "$ref": "#/components/schemas/PermissionV2Reply"
  16098. }
  16099. },
  16100. "required": ["sessionID", "requestID", "reply"],
  16101. "additionalProperties": false
  16102. }
  16103. },
  16104. "required": ["id", "type", "properties"],
  16105. "additionalProperties": false
  16106. },
  16107. {
  16108. "type": "object",
  16109. "properties": {
  16110. "id": {
  16111. "type": "string",
  16112. "pattern": "^evt_"
  16113. },
  16114. "type": {
  16115. "type": "string",
  16116. "enum": ["file.watcher.updated"]
  16117. },
  16118. "properties": {
  16119. "type": "object",
  16120. "properties": {
  16121. "file": {
  16122. "type": "string"
  16123. },
  16124. "event": {
  16125. "type": "string",
  16126. "enum": ["add", "change", "unlink"]
  16127. }
  16128. },
  16129. "required": ["file", "event"],
  16130. "additionalProperties": false
  16131. }
  16132. },
  16133. "required": ["id", "type", "properties"],
  16134. "additionalProperties": false
  16135. },
  16136. {
  16137. "type": "object",
  16138. "properties": {
  16139. "id": {
  16140. "type": "string",
  16141. "pattern": "^evt_"
  16142. },
  16143. "type": {
  16144. "type": "string",
  16145. "enum": ["pty.created"]
  16146. },
  16147. "properties": {
  16148. "type": "object",
  16149. "properties": {
  16150. "info": {
  16151. "$ref": "#/components/schemas/Pty"
  16152. }
  16153. },
  16154. "required": ["info"],
  16155. "additionalProperties": false
  16156. }
  16157. },
  16158. "required": ["id", "type", "properties"],
  16159. "additionalProperties": false
  16160. },
  16161. {
  16162. "type": "object",
  16163. "properties": {
  16164. "id": {
  16165. "type": "string",
  16166. "pattern": "^evt_"
  16167. },
  16168. "type": {
  16169. "type": "string",
  16170. "enum": ["pty.updated"]
  16171. },
  16172. "properties": {
  16173. "type": "object",
  16174. "properties": {
  16175. "info": {
  16176. "$ref": "#/components/schemas/Pty"
  16177. }
  16178. },
  16179. "required": ["info"],
  16180. "additionalProperties": false
  16181. }
  16182. },
  16183. "required": ["id", "type", "properties"],
  16184. "additionalProperties": false
  16185. },
  16186. {
  16187. "type": "object",
  16188. "properties": {
  16189. "id": {
  16190. "type": "string",
  16191. "pattern": "^evt_"
  16192. },
  16193. "type": {
  16194. "type": "string",
  16195. "enum": ["pty.exited"]
  16196. },
  16197. "properties": {
  16198. "type": "object",
  16199. "properties": {
  16200. "id": {
  16201. "type": "string",
  16202. "pattern": "^pty"
  16203. },
  16204. "exitCode": {
  16205. "type": "integer",
  16206. "minimum": 0
  16207. }
  16208. },
  16209. "required": ["id", "exitCode"],
  16210. "additionalProperties": false
  16211. }
  16212. },
  16213. "required": ["id", "type", "properties"],
  16214. "additionalProperties": false
  16215. },
  16216. {
  16217. "type": "object",
  16218. "properties": {
  16219. "id": {
  16220. "type": "string",
  16221. "pattern": "^evt_"
  16222. },
  16223. "type": {
  16224. "type": "string",
  16225. "enum": ["pty.deleted"]
  16226. },
  16227. "properties": {
  16228. "type": "object",
  16229. "properties": {
  16230. "id": {
  16231. "type": "string",
  16232. "pattern": "^pty"
  16233. }
  16234. },
  16235. "required": ["id"],
  16236. "additionalProperties": false
  16237. }
  16238. },
  16239. "required": ["id", "type", "properties"],
  16240. "additionalProperties": false
  16241. },
  16242. {
  16243. "type": "object",
  16244. "properties": {
  16245. "id": {
  16246. "type": "string",
  16247. "pattern": "^evt_"
  16248. },
  16249. "type": {
  16250. "type": "string",
  16251. "enum": ["question.v2.asked"]
  16252. },
  16253. "properties": {
  16254. "type": "object",
  16255. "properties": {
  16256. "id": {
  16257. "type": "string",
  16258. "pattern": "^que"
  16259. },
  16260. "sessionID": {
  16261. "type": "string",
  16262. "pattern": "^ses"
  16263. },
  16264. "questions": {
  16265. "type": "array",
  16266. "items": {
  16267. "$ref": "#/components/schemas/QuestionV2Info"
  16268. },
  16269. "description": "Questions to ask"
  16270. },
  16271. "tool": {
  16272. "$ref": "#/components/schemas/QuestionV2Tool"
  16273. }
  16274. },
  16275. "required": ["id", "sessionID", "questions"],
  16276. "additionalProperties": false
  16277. }
  16278. },
  16279. "required": ["id", "type", "properties"],
  16280. "additionalProperties": false
  16281. },
  16282. {
  16283. "type": "object",
  16284. "properties": {
  16285. "id": {
  16286. "type": "string",
  16287. "pattern": "^evt_"
  16288. },
  16289. "type": {
  16290. "type": "string",
  16291. "enum": ["question.v2.replied"]
  16292. },
  16293. "properties": {
  16294. "type": "object",
  16295. "properties": {
  16296. "sessionID": {
  16297. "type": "string",
  16298. "pattern": "^ses"
  16299. },
  16300. "requestID": {
  16301. "type": "string",
  16302. "pattern": "^que"
  16303. },
  16304. "answers": {
  16305. "type": "array",
  16306. "items": {
  16307. "$ref": "#/components/schemas/QuestionV2Answer"
  16308. }
  16309. }
  16310. },
  16311. "required": ["sessionID", "requestID", "answers"],
  16312. "additionalProperties": false
  16313. }
  16314. },
  16315. "required": ["id", "type", "properties"],
  16316. "additionalProperties": false
  16317. },
  16318. {
  16319. "type": "object",
  16320. "properties": {
  16321. "id": {
  16322. "type": "string",
  16323. "pattern": "^evt_"
  16324. },
  16325. "type": {
  16326. "type": "string",
  16327. "enum": ["question.v2.rejected"]
  16328. },
  16329. "properties": {
  16330. "type": "object",
  16331. "properties": {
  16332. "sessionID": {
  16333. "type": "string",
  16334. "pattern": "^ses"
  16335. },
  16336. "requestID": {
  16337. "type": "string",
  16338. "pattern": "^que"
  16339. }
  16340. },
  16341. "required": ["sessionID", "requestID"],
  16342. "additionalProperties": false
  16343. }
  16344. },
  16345. "required": ["id", "type", "properties"],
  16346. "additionalProperties": false
  16347. },
  16348. {
  16349. "type": "object",
  16350. "properties": {
  16351. "id": {
  16352. "type": "string",
  16353. "pattern": "^evt_"
  16354. },
  16355. "type": {
  16356. "type": "string",
  16357. "enum": ["todo.updated"]
  16358. },
  16359. "properties": {
  16360. "type": "object",
  16361. "properties": {
  16362. "sessionID": {
  16363. "type": "string",
  16364. "pattern": "^ses"
  16365. },
  16366. "todos": {
  16367. "type": "array",
  16368. "items": {
  16369. "$ref": "#/components/schemas/Todo"
  16370. }
  16371. }
  16372. },
  16373. "required": ["sessionID", "todos"],
  16374. "additionalProperties": false
  16375. }
  16376. },
  16377. "required": ["id", "type", "properties"],
  16378. "additionalProperties": false
  16379. },
  16380. {
  16381. "type": "object",
  16382. "properties": {
  16383. "id": {
  16384. "type": "string",
  16385. "pattern": "^evt_"
  16386. },
  16387. "type": {
  16388. "type": "string",
  16389. "enum": ["lsp.updated"]
  16390. },
  16391. "properties": {
  16392. "type": "object",
  16393. "properties": {}
  16394. }
  16395. },
  16396. "required": ["id", "type", "properties"],
  16397. "additionalProperties": false
  16398. },
  16399. {
  16400. "type": "object",
  16401. "properties": {
  16402. "id": {
  16403. "type": "string",
  16404. "pattern": "^evt_"
  16405. },
  16406. "type": {
  16407. "type": "string",
  16408. "enum": ["permission.asked"]
  16409. },
  16410. "properties": {
  16411. "type": "object",
  16412. "properties": {
  16413. "id": {
  16414. "type": "string",
  16415. "pattern": "^per"
  16416. },
  16417. "sessionID": {
  16418. "type": "string",
  16419. "pattern": "^ses"
  16420. },
  16421. "permission": {
  16422. "type": "string"
  16423. },
  16424. "patterns": {
  16425. "type": "array",
  16426. "items": {
  16427. "type": "string"
  16428. }
  16429. },
  16430. "metadata": {
  16431. "type": "object"
  16432. },
  16433. "always": {
  16434. "type": "array",
  16435. "items": {
  16436. "type": "string"
  16437. }
  16438. },
  16439. "tool": {
  16440. "type": "object",
  16441. "properties": {
  16442. "messageID": {
  16443. "type": "string"
  16444. },
  16445. "callID": {
  16446. "type": "string"
  16447. }
  16448. },
  16449. "required": ["messageID", "callID"],
  16450. "additionalProperties": false
  16451. }
  16452. },
  16453. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  16454. "additionalProperties": false
  16455. }
  16456. },
  16457. "required": ["id", "type", "properties"],
  16458. "additionalProperties": false
  16459. },
  16460. {
  16461. "type": "object",
  16462. "properties": {
  16463. "id": {
  16464. "type": "string",
  16465. "pattern": "^evt_"
  16466. },
  16467. "type": {
  16468. "type": "string",
  16469. "enum": ["permission.replied"]
  16470. },
  16471. "properties": {
  16472. "type": "object",
  16473. "properties": {
  16474. "sessionID": {
  16475. "type": "string",
  16476. "pattern": "^ses"
  16477. },
  16478. "requestID": {
  16479. "type": "string",
  16480. "pattern": "^per"
  16481. },
  16482. "reply": {
  16483. "type": "string",
  16484. "enum": ["once", "always", "reject"]
  16485. }
  16486. },
  16487. "required": ["sessionID", "requestID", "reply"],
  16488. "additionalProperties": false
  16489. }
  16490. },
  16491. "required": ["id", "type", "properties"],
  16492. "additionalProperties": false
  16493. },
  16494. {
  16495. "type": "object",
  16496. "properties": {
  16497. "id": {
  16498. "type": "string",
  16499. "pattern": "^evt_"
  16500. },
  16501. "type": {
  16502. "type": "string",
  16503. "enum": ["tui.prompt.append"]
  16504. },
  16505. "properties": {
  16506. "type": "object",
  16507. "properties": {
  16508. "text": {
  16509. "type": "string"
  16510. }
  16511. },
  16512. "required": ["text"],
  16513. "additionalProperties": false
  16514. }
  16515. },
  16516. "required": ["id", "type", "properties"],
  16517. "additionalProperties": false
  16518. },
  16519. {
  16520. "type": "object",
  16521. "properties": {
  16522. "id": {
  16523. "type": "string",
  16524. "pattern": "^evt_"
  16525. },
  16526. "type": {
  16527. "type": "string",
  16528. "enum": ["tui.command.execute"]
  16529. },
  16530. "properties": {
  16531. "type": "object",
  16532. "properties": {
  16533. "command": {
  16534. "anyOf": [
  16535. {
  16536. "type": "string",
  16537. "enum": [
  16538. "session.list",
  16539. "session.new",
  16540. "session.share",
  16541. "session.interrupt",
  16542. "session.compact",
  16543. "session.page.up",
  16544. "session.page.down",
  16545. "session.line.up",
  16546. "session.line.down",
  16547. "session.half.page.up",
  16548. "session.half.page.down",
  16549. "session.first",
  16550. "session.last",
  16551. "prompt.clear",
  16552. "prompt.submit",
  16553. "agent.cycle"
  16554. ]
  16555. },
  16556. {
  16557. "type": "string"
  16558. }
  16559. ]
  16560. }
  16561. },
  16562. "required": ["command"],
  16563. "additionalProperties": false
  16564. }
  16565. },
  16566. "required": ["id", "type", "properties"],
  16567. "additionalProperties": false
  16568. },
  16569. {
  16570. "type": "object",
  16571. "properties": {
  16572. "id": {
  16573. "type": "string",
  16574. "pattern": "^evt_"
  16575. },
  16576. "type": {
  16577. "type": "string",
  16578. "enum": ["tui.toast.show"]
  16579. },
  16580. "properties": {
  16581. "type": "object",
  16582. "properties": {
  16583. "title": {
  16584. "type": "string"
  16585. },
  16586. "message": {
  16587. "type": "string"
  16588. },
  16589. "variant": {
  16590. "type": "string",
  16591. "enum": ["info", "success", "warning", "error"]
  16592. },
  16593. "duration": {
  16594. "type": "integer",
  16595. "exclusiveMinimum": 0
  16596. }
  16597. },
  16598. "required": ["message", "variant"],
  16599. "additionalProperties": false
  16600. }
  16601. },
  16602. "required": ["id", "type", "properties"],
  16603. "additionalProperties": false
  16604. },
  16605. {
  16606. "type": "object",
  16607. "properties": {
  16608. "id": {
  16609. "type": "string",
  16610. "pattern": "^evt_"
  16611. },
  16612. "type": {
  16613. "type": "string",
  16614. "enum": ["tui.session.select"]
  16615. },
  16616. "properties": {
  16617. "type": "object",
  16618. "properties": {
  16619. "sessionID": {
  16620. "type": "string",
  16621. "pattern": "^ses",
  16622. "description": "Session ID to navigate to"
  16623. }
  16624. },
  16625. "required": ["sessionID"],
  16626. "additionalProperties": false
  16627. }
  16628. },
  16629. "required": ["id", "type", "properties"],
  16630. "additionalProperties": false
  16631. },
  16632. {
  16633. "type": "object",
  16634. "properties": {
  16635. "id": {
  16636. "type": "string",
  16637. "pattern": "^evt_"
  16638. },
  16639. "type": {
  16640. "type": "string",
  16641. "enum": ["mcp.tools.changed"]
  16642. },
  16643. "properties": {
  16644. "type": "object",
  16645. "properties": {
  16646. "server": {
  16647. "type": "string"
  16648. }
  16649. },
  16650. "required": ["server"],
  16651. "additionalProperties": false
  16652. }
  16653. },
  16654. "required": ["id", "type", "properties"],
  16655. "additionalProperties": false
  16656. },
  16657. {
  16658. "type": "object",
  16659. "properties": {
  16660. "id": {
  16661. "type": "string",
  16662. "pattern": "^evt_"
  16663. },
  16664. "type": {
  16665. "type": "string",
  16666. "enum": ["mcp.browser.open.failed"]
  16667. },
  16668. "properties": {
  16669. "type": "object",
  16670. "properties": {
  16671. "mcpName": {
  16672. "type": "string"
  16673. },
  16674. "url": {
  16675. "type": "string"
  16676. }
  16677. },
  16678. "required": ["mcpName", "url"],
  16679. "additionalProperties": false
  16680. }
  16681. },
  16682. "required": ["id", "type", "properties"],
  16683. "additionalProperties": false
  16684. },
  16685. {
  16686. "type": "object",
  16687. "properties": {
  16688. "id": {
  16689. "type": "string",
  16690. "pattern": "^evt_"
  16691. },
  16692. "type": {
  16693. "type": "string",
  16694. "enum": ["command.executed"]
  16695. },
  16696. "properties": {
  16697. "type": "object",
  16698. "properties": {
  16699. "name": {
  16700. "type": "string"
  16701. },
  16702. "sessionID": {
  16703. "type": "string",
  16704. "pattern": "^ses"
  16705. },
  16706. "arguments": {
  16707. "type": "string"
  16708. },
  16709. "messageID": {
  16710. "type": "string",
  16711. "pattern": "^msg"
  16712. }
  16713. },
  16714. "required": ["name", "sessionID", "arguments", "messageID"],
  16715. "additionalProperties": false
  16716. }
  16717. },
  16718. "required": ["id", "type", "properties"],
  16719. "additionalProperties": false
  16720. },
  16721. {
  16722. "type": "object",
  16723. "properties": {
  16724. "id": {
  16725. "type": "string",
  16726. "pattern": "^evt_"
  16727. },
  16728. "type": {
  16729. "type": "string",
  16730. "enum": ["project.directories.updated"]
  16731. },
  16732. "properties": {
  16733. "type": "object",
  16734. "properties": {
  16735. "projectID": {
  16736. "type": "string"
  16737. }
  16738. },
  16739. "required": ["projectID"],
  16740. "additionalProperties": false
  16741. }
  16742. },
  16743. "required": ["id", "type", "properties"],
  16744. "additionalProperties": false
  16745. },
  16746. {
  16747. "type": "object",
  16748. "properties": {
  16749. "id": {
  16750. "type": "string",
  16751. "pattern": "^evt_"
  16752. },
  16753. "type": {
  16754. "type": "string",
  16755. "enum": ["project.updated"]
  16756. },
  16757. "properties": {
  16758. "type": "object",
  16759. "properties": {
  16760. "id": {
  16761. "type": "string"
  16762. },
  16763. "worktree": {
  16764. "type": "string"
  16765. },
  16766. "vcs": {
  16767. "type": "string",
  16768. "enum": ["git"]
  16769. },
  16770. "name": {
  16771. "type": "string"
  16772. },
  16773. "icon": {
  16774. "type": "object",
  16775. "properties": {
  16776. "url": {
  16777. "type": "string"
  16778. },
  16779. "override": {
  16780. "type": "string"
  16781. },
  16782. "color": {
  16783. "type": "string"
  16784. }
  16785. },
  16786. "additionalProperties": false
  16787. },
  16788. "commands": {
  16789. "type": "object",
  16790. "properties": {
  16791. "start": {
  16792. "type": "string",
  16793. "description": "Startup script to run when creating a new workspace (worktree)"
  16794. }
  16795. },
  16796. "additionalProperties": false
  16797. },
  16798. "time": {
  16799. "type": "object",
  16800. "properties": {
  16801. "created": {
  16802. "type": "integer",
  16803. "minimum": 0
  16804. },
  16805. "updated": {
  16806. "type": "integer",
  16807. "minimum": 0
  16808. },
  16809. "initialized": {
  16810. "type": "integer",
  16811. "minimum": 0
  16812. }
  16813. },
  16814. "required": ["created", "updated"],
  16815. "additionalProperties": false
  16816. },
  16817. "sandboxes": {
  16818. "type": "array",
  16819. "items": {
  16820. "type": "string"
  16821. }
  16822. }
  16823. },
  16824. "required": ["id", "worktree", "time", "sandboxes"],
  16825. "additionalProperties": false
  16826. }
  16827. },
  16828. "required": ["id", "type", "properties"],
  16829. "additionalProperties": false
  16830. },
  16831. {
  16832. "type": "object",
  16833. "properties": {
  16834. "id": {
  16835. "type": "string",
  16836. "pattern": "^evt_"
  16837. },
  16838. "type": {
  16839. "type": "string",
  16840. "enum": ["question.asked"]
  16841. },
  16842. "properties": {
  16843. "type": "object",
  16844. "properties": {
  16845. "id": {
  16846. "type": "string",
  16847. "pattern": "^que"
  16848. },
  16849. "sessionID": {
  16850. "type": "string",
  16851. "pattern": "^ses"
  16852. },
  16853. "questions": {
  16854. "type": "array",
  16855. "items": {
  16856. "$ref": "#/components/schemas/QuestionInfo"
  16857. },
  16858. "description": "Questions to ask"
  16859. },
  16860. "tool": {
  16861. "$ref": "#/components/schemas/QuestionTool"
  16862. }
  16863. },
  16864. "required": ["id", "sessionID", "questions"],
  16865. "additionalProperties": false
  16866. }
  16867. },
  16868. "required": ["id", "type", "properties"],
  16869. "additionalProperties": false
  16870. },
  16871. {
  16872. "type": "object",
  16873. "properties": {
  16874. "id": {
  16875. "type": "string",
  16876. "pattern": "^evt_"
  16877. },
  16878. "type": {
  16879. "type": "string",
  16880. "enum": ["question.replied"]
  16881. },
  16882. "properties": {
  16883. "type": "object",
  16884. "properties": {
  16885. "sessionID": {
  16886. "type": "string",
  16887. "pattern": "^ses"
  16888. },
  16889. "requestID": {
  16890. "type": "string",
  16891. "pattern": "^que"
  16892. },
  16893. "answers": {
  16894. "type": "array",
  16895. "items": {
  16896. "$ref": "#/components/schemas/QuestionAnswer"
  16897. }
  16898. }
  16899. },
  16900. "required": ["sessionID", "requestID", "answers"],
  16901. "additionalProperties": false
  16902. }
  16903. },
  16904. "required": ["id", "type", "properties"],
  16905. "additionalProperties": false
  16906. },
  16907. {
  16908. "type": "object",
  16909. "properties": {
  16910. "id": {
  16911. "type": "string",
  16912. "pattern": "^evt_"
  16913. },
  16914. "type": {
  16915. "type": "string",
  16916. "enum": ["question.rejected"]
  16917. },
  16918. "properties": {
  16919. "type": "object",
  16920. "properties": {
  16921. "sessionID": {
  16922. "type": "string",
  16923. "pattern": "^ses"
  16924. },
  16925. "requestID": {
  16926. "type": "string",
  16927. "pattern": "^que"
  16928. }
  16929. },
  16930. "required": ["sessionID", "requestID"],
  16931. "additionalProperties": false
  16932. }
  16933. },
  16934. "required": ["id", "type", "properties"],
  16935. "additionalProperties": false
  16936. },
  16937. {
  16938. "type": "object",
  16939. "properties": {
  16940. "id": {
  16941. "type": "string",
  16942. "pattern": "^evt_"
  16943. },
  16944. "type": {
  16945. "type": "string",
  16946. "enum": ["session.status"]
  16947. },
  16948. "properties": {
  16949. "type": "object",
  16950. "properties": {
  16951. "sessionID": {
  16952. "type": "string",
  16953. "pattern": "^ses"
  16954. },
  16955. "status": {
  16956. "$ref": "#/components/schemas/SessionStatus"
  16957. }
  16958. },
  16959. "required": ["sessionID", "status"],
  16960. "additionalProperties": false
  16961. }
  16962. },
  16963. "required": ["id", "type", "properties"],
  16964. "additionalProperties": false
  16965. },
  16966. {
  16967. "type": "object",
  16968. "properties": {
  16969. "id": {
  16970. "type": "string",
  16971. "pattern": "^evt_"
  16972. },
  16973. "type": {
  16974. "type": "string",
  16975. "enum": ["session.idle"]
  16976. },
  16977. "properties": {
  16978. "type": "object",
  16979. "properties": {
  16980. "sessionID": {
  16981. "type": "string",
  16982. "pattern": "^ses"
  16983. }
  16984. },
  16985. "required": ["sessionID"],
  16986. "additionalProperties": false
  16987. }
  16988. },
  16989. "required": ["id", "type", "properties"],
  16990. "additionalProperties": false
  16991. },
  16992. {
  16993. "type": "object",
  16994. "properties": {
  16995. "id": {
  16996. "type": "string",
  16997. "pattern": "^evt_"
  16998. },
  16999. "type": {
  17000. "type": "string",
  17001. "enum": ["session.compacted"]
  17002. },
  17003. "properties": {
  17004. "type": "object",
  17005. "properties": {
  17006. "sessionID": {
  17007. "type": "string",
  17008. "pattern": "^ses"
  17009. }
  17010. },
  17011. "required": ["sessionID"],
  17012. "additionalProperties": false
  17013. }
  17014. },
  17015. "required": ["id", "type", "properties"],
  17016. "additionalProperties": false
  17017. },
  17018. {
  17019. "type": "object",
  17020. "properties": {
  17021. "id": {
  17022. "type": "string",
  17023. "pattern": "^evt_"
  17024. },
  17025. "type": {
  17026. "type": "string",
  17027. "enum": ["vcs.branch.updated"]
  17028. },
  17029. "properties": {
  17030. "type": "object",
  17031. "properties": {
  17032. "branch": {
  17033. "type": "string"
  17034. }
  17035. },
  17036. "additionalProperties": false
  17037. }
  17038. },
  17039. "required": ["id", "type", "properties"],
  17040. "additionalProperties": false
  17041. },
  17042. {
  17043. "type": "object",
  17044. "properties": {
  17045. "id": {
  17046. "type": "string",
  17047. "pattern": "^evt_"
  17048. },
  17049. "type": {
  17050. "type": "string",
  17051. "enum": ["worktree.ready"]
  17052. },
  17053. "properties": {
  17054. "type": "object",
  17055. "properties": {
  17056. "name": {
  17057. "type": "string"
  17058. },
  17059. "branch": {
  17060. "type": "string"
  17061. }
  17062. },
  17063. "required": ["name"],
  17064. "additionalProperties": false
  17065. }
  17066. },
  17067. "required": ["id", "type", "properties"],
  17068. "additionalProperties": false
  17069. },
  17070. {
  17071. "type": "object",
  17072. "properties": {
  17073. "id": {
  17074. "type": "string",
  17075. "pattern": "^evt_"
  17076. },
  17077. "type": {
  17078. "type": "string",
  17079. "enum": ["worktree.failed"]
  17080. },
  17081. "properties": {
  17082. "type": "object",
  17083. "properties": {
  17084. "message": {
  17085. "type": "string"
  17086. }
  17087. },
  17088. "required": ["message"],
  17089. "additionalProperties": false
  17090. }
  17091. },
  17092. "required": ["id", "type", "properties"],
  17093. "additionalProperties": false
  17094. },
  17095. {
  17096. "type": "object",
  17097. "properties": {
  17098. "id": {
  17099. "type": "string",
  17100. "pattern": "^evt_"
  17101. },
  17102. "type": {
  17103. "type": "string",
  17104. "enum": ["workspace.ready"]
  17105. },
  17106. "properties": {
  17107. "type": "object",
  17108. "properties": {
  17109. "name": {
  17110. "type": "string"
  17111. }
  17112. },
  17113. "required": ["name"],
  17114. "additionalProperties": false
  17115. }
  17116. },
  17117. "required": ["id", "type", "properties"],
  17118. "additionalProperties": false
  17119. },
  17120. {
  17121. "type": "object",
  17122. "properties": {
  17123. "id": {
  17124. "type": "string",
  17125. "pattern": "^evt_"
  17126. },
  17127. "type": {
  17128. "type": "string",
  17129. "enum": ["workspace.failed"]
  17130. },
  17131. "properties": {
  17132. "type": "object",
  17133. "properties": {
  17134. "message": {
  17135. "type": "string"
  17136. }
  17137. },
  17138. "required": ["message"],
  17139. "additionalProperties": false
  17140. }
  17141. },
  17142. "required": ["id", "type", "properties"],
  17143. "additionalProperties": false
  17144. },
  17145. {
  17146. "type": "object",
  17147. "properties": {
  17148. "id": {
  17149. "type": "string",
  17150. "pattern": "^evt_"
  17151. },
  17152. "type": {
  17153. "type": "string",
  17154. "enum": ["workspace.status"]
  17155. },
  17156. "properties": {
  17157. "type": "object",
  17158. "properties": {
  17159. "workspaceID": {
  17160. "type": "string",
  17161. "pattern": "^wrk"
  17162. },
  17163. "status": {
  17164. "type": "string",
  17165. "enum": ["connected", "connecting", "disconnected", "error"]
  17166. }
  17167. },
  17168. "required": ["workspaceID", "status"],
  17169. "additionalProperties": false
  17170. }
  17171. },
  17172. "required": ["id", "type", "properties"],
  17173. "additionalProperties": false
  17174. },
  17175. {
  17176. "type": "object",
  17177. "properties": {
  17178. "id": {
  17179. "type": "string",
  17180. "pattern": "^evt_"
  17181. },
  17182. "type": {
  17183. "type": "string",
  17184. "enum": ["server.connected"]
  17185. },
  17186. "properties": {
  17187. "type": "object",
  17188. "properties": {}
  17189. }
  17190. },
  17191. "required": ["id", "type", "properties"],
  17192. "additionalProperties": false
  17193. },
  17194. {
  17195. "type": "object",
  17196. "properties": {
  17197. "id": {
  17198. "type": "string",
  17199. "pattern": "^evt_"
  17200. },
  17201. "type": {
  17202. "type": "string",
  17203. "enum": ["global.disposed"]
  17204. },
  17205. "properties": {
  17206. "type": "object",
  17207. "properties": {}
  17208. }
  17209. },
  17210. "required": ["id", "type", "properties"],
  17211. "additionalProperties": false
  17212. },
  17213. {
  17214. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  17215. },
  17216. {
  17217. "$ref": "#/components/schemas/SyncEventSessionCreated"
  17218. },
  17219. {
  17220. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  17221. },
  17222. {
  17223. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  17224. },
  17225. {
  17226. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  17227. },
  17228. {
  17229. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  17230. },
  17231. {
  17232. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  17233. },
  17234. {
  17235. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  17236. },
  17237. {
  17238. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  17239. },
  17240. {
  17241. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  17242. },
  17243. {
  17244. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  17245. },
  17246. {
  17247. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  17248. },
  17249. {
  17250. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  17251. },
  17252. {
  17253. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  17254. },
  17255. {
  17256. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  17257. },
  17258. {
  17259. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  17260. },
  17261. {
  17262. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  17263. },
  17264. {
  17265. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  17266. },
  17267. {
  17268. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  17269. },
  17270. {
  17271. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  17272. },
  17273. {
  17274. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  17275. },
  17276. {
  17277. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  17278. },
  17279. {
  17280. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  17281. },
  17282. {
  17283. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  17284. },
  17285. {
  17286. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  17287. },
  17288. {
  17289. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  17290. },
  17291. {
  17292. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  17293. },
  17294. {
  17295. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  17296. },
  17297. {
  17298. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  17299. },
  17300. {
  17301. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  17302. },
  17303. {
  17304. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  17305. },
  17306. {
  17307. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  17308. },
  17309. {
  17310. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  17311. },
  17312. {
  17313. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  17314. },
  17315. {
  17316. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  17317. }
  17318. ]
  17319. }
  17320. },
  17321. "required": ["directory", "payload"],
  17322. "additionalProperties": false
  17323. },
  17324. "LogLevel": {
  17325. "type": "string",
  17326. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  17327. "description": "Log level"
  17328. },
  17329. "ServerConfig": {
  17330. "type": "object",
  17331. "properties": {
  17332. "port": {
  17333. "type": "integer",
  17334. "exclusiveMinimum": 0
  17335. },
  17336. "hostname": {
  17337. "type": "string"
  17338. },
  17339. "mdns": {
  17340. "type": "boolean"
  17341. },
  17342. "mdnsDomain": {
  17343. "type": "string"
  17344. },
  17345. "cors": {
  17346. "type": "array",
  17347. "items": {
  17348. "type": "string"
  17349. }
  17350. }
  17351. },
  17352. "additionalProperties": false,
  17353. "description": "Server configuration for opencode serve and web commands"
  17354. },
  17355. "ReferenceConfigEntry": {
  17356. "anyOf": [
  17357. {
  17358. "type": "string"
  17359. },
  17360. {
  17361. "type": "object",
  17362. "properties": {
  17363. "repository": {
  17364. "type": "string",
  17365. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  17366. },
  17367. "branch": {
  17368. "type": "string"
  17369. }
  17370. },
  17371. "required": ["repository"],
  17372. "additionalProperties": false
  17373. },
  17374. {
  17375. "type": "object",
  17376. "properties": {
  17377. "path": {
  17378. "type": "string",
  17379. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  17380. }
  17381. },
  17382. "required": ["path"],
  17383. "additionalProperties": false
  17384. }
  17385. ]
  17386. },
  17387. "ReferenceConfig": {
  17388. "type": "object",
  17389. "additionalProperties": {
  17390. "$ref": "#/components/schemas/ReferenceConfigEntry"
  17391. }
  17392. },
  17393. "PermissionActionConfig": {
  17394. "type": "string",
  17395. "enum": ["ask", "allow", "deny"]
  17396. },
  17397. "PermissionObjectConfig": {
  17398. "type": "object",
  17399. "additionalProperties": {
  17400. "$ref": "#/components/schemas/PermissionActionConfig"
  17401. }
  17402. },
  17403. "PermissionRuleConfig": {
  17404. "anyOf": [
  17405. {
  17406. "$ref": "#/components/schemas/PermissionActionConfig"
  17407. },
  17408. {
  17409. "$ref": "#/components/schemas/PermissionObjectConfig"
  17410. }
  17411. ]
  17412. },
  17413. "PermissionConfig": {
  17414. "anyOf": [
  17415. {
  17416. "$ref": "#/components/schemas/PermissionActionConfig"
  17417. },
  17418. {
  17419. "type": "object",
  17420. "properties": {
  17421. "read": {
  17422. "$ref": "#/components/schemas/PermissionRuleConfig"
  17423. },
  17424. "edit": {
  17425. "$ref": "#/components/schemas/PermissionRuleConfig"
  17426. },
  17427. "glob": {
  17428. "$ref": "#/components/schemas/PermissionRuleConfig"
  17429. },
  17430. "grep": {
  17431. "$ref": "#/components/schemas/PermissionRuleConfig"
  17432. },
  17433. "list": {
  17434. "$ref": "#/components/schemas/PermissionRuleConfig"
  17435. },
  17436. "bash": {
  17437. "$ref": "#/components/schemas/PermissionRuleConfig"
  17438. },
  17439. "task": {
  17440. "$ref": "#/components/schemas/PermissionRuleConfig"
  17441. },
  17442. "external_directory": {
  17443. "$ref": "#/components/schemas/PermissionRuleConfig"
  17444. },
  17445. "todowrite": {
  17446. "$ref": "#/components/schemas/PermissionActionConfig"
  17447. },
  17448. "question": {
  17449. "$ref": "#/components/schemas/PermissionActionConfig"
  17450. },
  17451. "webfetch": {
  17452. "$ref": "#/components/schemas/PermissionActionConfig"
  17453. },
  17454. "websearch": {
  17455. "$ref": "#/components/schemas/PermissionActionConfig"
  17456. },
  17457. "lsp": {
  17458. "$ref": "#/components/schemas/PermissionRuleConfig"
  17459. },
  17460. "doom_loop": {
  17461. "$ref": "#/components/schemas/PermissionActionConfig"
  17462. },
  17463. "skill": {
  17464. "$ref": "#/components/schemas/PermissionRuleConfig"
  17465. }
  17466. },
  17467. "additionalProperties": {
  17468. "$ref": "#/components/schemas/PermissionRuleConfig"
  17469. }
  17470. }
  17471. ]
  17472. },
  17473. "AgentConfig": {
  17474. "type": "object",
  17475. "properties": {
  17476. "model": {
  17477. "type": "string"
  17478. },
  17479. "variant": {
  17480. "type": "string"
  17481. },
  17482. "temperature": {
  17483. "type": "number"
  17484. },
  17485. "top_p": {
  17486. "type": "number"
  17487. },
  17488. "prompt": {
  17489. "type": "string"
  17490. },
  17491. "tools": {
  17492. "type": "object",
  17493. "additionalProperties": {
  17494. "type": "boolean"
  17495. }
  17496. },
  17497. "disable": {
  17498. "type": "boolean"
  17499. },
  17500. "description": {
  17501. "type": "string"
  17502. },
  17503. "mode": {
  17504. "type": "string",
  17505. "enum": ["subagent", "primary", "all"]
  17506. },
  17507. "hidden": {
  17508. "type": "boolean"
  17509. },
  17510. "options": {
  17511. "type": "object"
  17512. },
  17513. "color": {
  17514. "anyOf": [
  17515. {
  17516. "type": "string",
  17517. "pattern": "^#[0-9a-fA-F]{6}$"
  17518. },
  17519. {
  17520. "type": "string",
  17521. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  17522. }
  17523. ],
  17524. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  17525. },
  17526. "steps": {
  17527. "type": "integer",
  17528. "exclusiveMinimum": 0
  17529. },
  17530. "maxSteps": {
  17531. "type": "integer",
  17532. "exclusiveMinimum": 0
  17533. },
  17534. "permission": {
  17535. "$ref": "#/components/schemas/PermissionConfig"
  17536. }
  17537. },
  17538. "additionalProperties": {}
  17539. },
  17540. "ProviderConfig": {
  17541. "type": "object",
  17542. "properties": {
  17543. "api": {
  17544. "type": "string"
  17545. },
  17546. "name": {
  17547. "type": "string"
  17548. },
  17549. "env": {
  17550. "type": "array",
  17551. "items": {
  17552. "type": "string"
  17553. }
  17554. },
  17555. "id": {
  17556. "type": "string"
  17557. },
  17558. "npm": {
  17559. "type": "string"
  17560. },
  17561. "whitelist": {
  17562. "type": "array",
  17563. "items": {
  17564. "type": "string"
  17565. }
  17566. },
  17567. "blacklist": {
  17568. "type": "array",
  17569. "items": {
  17570. "type": "string"
  17571. }
  17572. },
  17573. "options": {
  17574. "type": "object",
  17575. "properties": {
  17576. "apiKey": {
  17577. "type": "string"
  17578. },
  17579. "baseURL": {
  17580. "type": "string"
  17581. },
  17582. "enterpriseUrl": {
  17583. "type": "string"
  17584. },
  17585. "setCacheKey": {
  17586. "type": "boolean"
  17587. },
  17588. "timeout": {
  17589. "anyOf": [
  17590. {
  17591. "type": "integer",
  17592. "exclusiveMinimum": 0
  17593. },
  17594. {
  17595. "type": "boolean",
  17596. "enum": [false]
  17597. }
  17598. ],
  17599. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  17600. },
  17601. "headerTimeout": {
  17602. "anyOf": [
  17603. {
  17604. "type": "integer",
  17605. "exclusiveMinimum": 0
  17606. },
  17607. {
  17608. "type": "boolean",
  17609. "enum": [false]
  17610. }
  17611. ],
  17612. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  17613. },
  17614. "chunkTimeout": {
  17615. "type": "integer",
  17616. "exclusiveMinimum": 0
  17617. }
  17618. },
  17619. "additionalProperties": {}
  17620. },
  17621. "models": {
  17622. "type": "object",
  17623. "additionalProperties": {
  17624. "type": "object",
  17625. "properties": {
  17626. "id": {
  17627. "type": "string"
  17628. },
  17629. "name": {
  17630. "type": "string"
  17631. },
  17632. "family": {
  17633. "type": "string"
  17634. },
  17635. "release_date": {
  17636. "type": "string"
  17637. },
  17638. "attachment": {
  17639. "type": "boolean"
  17640. },
  17641. "reasoning": {
  17642. "type": "boolean"
  17643. },
  17644. "temperature": {
  17645. "type": "boolean"
  17646. },
  17647. "tool_call": {
  17648. "type": "boolean"
  17649. },
  17650. "interleaved": {
  17651. "anyOf": [
  17652. {
  17653. "type": "boolean",
  17654. "enum": [true]
  17655. },
  17656. {
  17657. "type": "object",
  17658. "properties": {
  17659. "field": {
  17660. "type": "string",
  17661. "enum": ["reasoning_content", "reasoning_details"]
  17662. }
  17663. },
  17664. "required": ["field"],
  17665. "additionalProperties": false
  17666. }
  17667. ]
  17668. },
  17669. "cost": {
  17670. "type": "object",
  17671. "properties": {
  17672. "input": {
  17673. "type": "number"
  17674. },
  17675. "output": {
  17676. "type": "number"
  17677. },
  17678. "cache_read": {
  17679. "type": "number"
  17680. },
  17681. "cache_write": {
  17682. "type": "number"
  17683. },
  17684. "context_over_200k": {
  17685. "type": "object",
  17686. "properties": {
  17687. "input": {
  17688. "type": "number"
  17689. },
  17690. "output": {
  17691. "type": "number"
  17692. },
  17693. "cache_read": {
  17694. "type": "number"
  17695. },
  17696. "cache_write": {
  17697. "type": "number"
  17698. }
  17699. },
  17700. "required": ["input", "output"],
  17701. "additionalProperties": false
  17702. }
  17703. },
  17704. "required": ["input", "output"],
  17705. "additionalProperties": false
  17706. },
  17707. "limit": {
  17708. "type": "object",
  17709. "properties": {
  17710. "context": {
  17711. "type": "number"
  17712. },
  17713. "input": {
  17714. "type": "number"
  17715. },
  17716. "output": {
  17717. "type": "number"
  17718. }
  17719. },
  17720. "required": ["context", "output"],
  17721. "additionalProperties": false
  17722. },
  17723. "modalities": {
  17724. "type": "object",
  17725. "properties": {
  17726. "input": {
  17727. "type": "array",
  17728. "items": {
  17729. "type": "string",
  17730. "enum": ["text", "audio", "image", "video", "pdf"]
  17731. }
  17732. },
  17733. "output": {
  17734. "type": "array",
  17735. "items": {
  17736. "type": "string",
  17737. "enum": ["text", "audio", "image", "video", "pdf"]
  17738. }
  17739. }
  17740. },
  17741. "additionalProperties": false
  17742. },
  17743. "experimental": {
  17744. "type": "boolean"
  17745. },
  17746. "status": {
  17747. "type": "string",
  17748. "enum": ["alpha", "beta", "deprecated", "active"]
  17749. },
  17750. "provider": {
  17751. "type": "object",
  17752. "properties": {
  17753. "npm": {
  17754. "type": "string"
  17755. },
  17756. "api": {
  17757. "type": "string"
  17758. }
  17759. },
  17760. "additionalProperties": false
  17761. },
  17762. "options": {
  17763. "type": "object"
  17764. },
  17765. "headers": {
  17766. "type": "object",
  17767. "additionalProperties": {
  17768. "type": "string"
  17769. }
  17770. },
  17771. "variants": {
  17772. "type": "object",
  17773. "additionalProperties": {
  17774. "type": "object",
  17775. "properties": {
  17776. "disabled": {
  17777. "type": "boolean"
  17778. }
  17779. },
  17780. "additionalProperties": {}
  17781. },
  17782. "description": "Variant-specific configuration"
  17783. }
  17784. },
  17785. "additionalProperties": false
  17786. }
  17787. }
  17788. },
  17789. "additionalProperties": false
  17790. },
  17791. "McpLocalConfig": {
  17792. "type": "object",
  17793. "properties": {
  17794. "type": {
  17795. "type": "string",
  17796. "enum": ["local"],
  17797. "description": "Type of MCP server connection"
  17798. },
  17799. "command": {
  17800. "type": "array",
  17801. "items": {
  17802. "type": "string"
  17803. },
  17804. "description": "Command and arguments to run the MCP server"
  17805. },
  17806. "environment": {
  17807. "type": "object",
  17808. "additionalProperties": {
  17809. "type": "string"
  17810. }
  17811. },
  17812. "enabled": {
  17813. "type": "boolean"
  17814. },
  17815. "timeout": {
  17816. "type": "integer",
  17817. "exclusiveMinimum": 0
  17818. }
  17819. },
  17820. "required": ["type", "command"],
  17821. "additionalProperties": false
  17822. },
  17823. "McpOAuthConfig": {
  17824. "type": "object",
  17825. "properties": {
  17826. "clientId": {
  17827. "type": "string"
  17828. },
  17829. "clientSecret": {
  17830. "type": "string"
  17831. },
  17832. "scope": {
  17833. "type": "string"
  17834. },
  17835. "callbackPort": {
  17836. "type": "integer",
  17837. "minimum": 1,
  17838. "maximum": 65535
  17839. },
  17840. "redirectUri": {
  17841. "type": "string"
  17842. }
  17843. },
  17844. "additionalProperties": false
  17845. },
  17846. "McpRemoteConfig": {
  17847. "type": "object",
  17848. "properties": {
  17849. "type": {
  17850. "type": "string",
  17851. "enum": ["remote"],
  17852. "description": "Type of MCP server connection"
  17853. },
  17854. "url": {
  17855. "type": "string",
  17856. "description": "URL of the remote MCP server"
  17857. },
  17858. "enabled": {
  17859. "type": "boolean"
  17860. },
  17861. "headers": {
  17862. "type": "object",
  17863. "additionalProperties": {
  17864. "type": "string"
  17865. }
  17866. },
  17867. "oauth": {
  17868. "anyOf": [
  17869. {
  17870. "$ref": "#/components/schemas/McpOAuthConfig"
  17871. },
  17872. {
  17873. "type": "boolean",
  17874. "enum": [false]
  17875. }
  17876. ],
  17877. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  17878. },
  17879. "timeout": {
  17880. "type": "integer",
  17881. "exclusiveMinimum": 0
  17882. }
  17883. },
  17884. "required": ["type", "url"],
  17885. "additionalProperties": false
  17886. },
  17887. "LayoutConfig": {
  17888. "type": "string",
  17889. "enum": ["auto", "stretch"],
  17890. "description": "@deprecated Always uses stretch layout."
  17891. },
  17892. "ImageAttachmentConfig": {
  17893. "type": "object",
  17894. "properties": {
  17895. "auto_resize": {
  17896. "type": "boolean"
  17897. },
  17898. "max_width": {
  17899. "type": "integer",
  17900. "exclusiveMinimum": 0
  17901. },
  17902. "max_height": {
  17903. "type": "integer",
  17904. "exclusiveMinimum": 0
  17905. },
  17906. "max_base64_bytes": {
  17907. "type": "integer",
  17908. "exclusiveMinimum": 0
  17909. }
  17910. },
  17911. "additionalProperties": false
  17912. },
  17913. "AttachmentConfig": {
  17914. "type": "object",
  17915. "properties": {
  17916. "image": {
  17917. "$ref": "#/components/schemas/ImageAttachmentConfig"
  17918. }
  17919. },
  17920. "additionalProperties": false
  17921. },
  17922. "Config": {
  17923. "type": "object",
  17924. "properties": {
  17925. "$schema": {
  17926. "type": "string"
  17927. },
  17928. "shell": {
  17929. "type": "string"
  17930. },
  17931. "logLevel": {
  17932. "$ref": "#/components/schemas/LogLevel"
  17933. },
  17934. "server": {
  17935. "$ref": "#/components/schemas/ServerConfig"
  17936. },
  17937. "command": {
  17938. "type": "object",
  17939. "additionalProperties": {
  17940. "type": "object",
  17941. "properties": {
  17942. "template": {
  17943. "type": "string"
  17944. },
  17945. "description": {
  17946. "type": "string"
  17947. },
  17948. "agent": {
  17949. "type": "string"
  17950. },
  17951. "model": {
  17952. "type": "string"
  17953. },
  17954. "variant": {
  17955. "type": "string"
  17956. },
  17957. "subtask": {
  17958. "type": "boolean"
  17959. }
  17960. },
  17961. "required": ["template"],
  17962. "additionalProperties": false
  17963. }
  17964. },
  17965. "skills": {
  17966. "type": "object",
  17967. "properties": {
  17968. "paths": {
  17969. "type": "array",
  17970. "items": {
  17971. "type": "string"
  17972. }
  17973. },
  17974. "urls": {
  17975. "type": "array",
  17976. "items": {
  17977. "type": "string"
  17978. }
  17979. }
  17980. },
  17981. "additionalProperties": false
  17982. },
  17983. "reference": {
  17984. "$ref": "#/components/schemas/ReferenceConfig"
  17985. },
  17986. "watcher": {
  17987. "type": "object",
  17988. "properties": {
  17989. "ignore": {
  17990. "type": "array",
  17991. "items": {
  17992. "type": "string"
  17993. }
  17994. }
  17995. },
  17996. "additionalProperties": false
  17997. },
  17998. "snapshot": {
  17999. "type": "boolean"
  18000. },
  18001. "plugin": {
  18002. "type": "array",
  18003. "items": {
  18004. "anyOf": [
  18005. {
  18006. "type": "string"
  18007. },
  18008. {
  18009. "type": "array",
  18010. "prefixItems": [
  18011. {
  18012. "type": "string"
  18013. },
  18014. {
  18015. "type": "object"
  18016. }
  18017. ],
  18018. "maxItems": 2,
  18019. "minItems": 2
  18020. }
  18021. ]
  18022. }
  18023. },
  18024. "share": {
  18025. "type": "string",
  18026. "enum": ["manual", "auto", "disabled"]
  18027. },
  18028. "autoshare": {
  18029. "type": "boolean"
  18030. },
  18031. "autoupdate": {
  18032. "anyOf": [
  18033. {
  18034. "type": "boolean"
  18035. },
  18036. {
  18037. "type": "string",
  18038. "enum": ["notify"]
  18039. }
  18040. ],
  18041. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  18042. },
  18043. "disabled_providers": {
  18044. "type": "array",
  18045. "items": {
  18046. "type": "string"
  18047. }
  18048. },
  18049. "enabled_providers": {
  18050. "type": "array",
  18051. "items": {
  18052. "type": "string"
  18053. }
  18054. },
  18055. "model": {
  18056. "type": "string"
  18057. },
  18058. "small_model": {
  18059. "type": "string"
  18060. },
  18061. "default_agent": {
  18062. "type": "string"
  18063. },
  18064. "username": {
  18065. "type": "string"
  18066. },
  18067. "mode": {
  18068. "type": "object",
  18069. "properties": {
  18070. "build": {
  18071. "$ref": "#/components/schemas/AgentConfig"
  18072. },
  18073. "plan": {
  18074. "$ref": "#/components/schemas/AgentConfig"
  18075. }
  18076. },
  18077. "additionalProperties": {
  18078. "$ref": "#/components/schemas/AgentConfig"
  18079. }
  18080. },
  18081. "agent": {
  18082. "type": "object",
  18083. "properties": {
  18084. "plan": {
  18085. "$ref": "#/components/schemas/AgentConfig"
  18086. },
  18087. "build": {
  18088. "$ref": "#/components/schemas/AgentConfig"
  18089. },
  18090. "general": {
  18091. "$ref": "#/components/schemas/AgentConfig"
  18092. },
  18093. "explore": {
  18094. "$ref": "#/components/schemas/AgentConfig"
  18095. },
  18096. "title": {
  18097. "$ref": "#/components/schemas/AgentConfig"
  18098. },
  18099. "summary": {
  18100. "$ref": "#/components/schemas/AgentConfig"
  18101. },
  18102. "compaction": {
  18103. "$ref": "#/components/schemas/AgentConfig"
  18104. }
  18105. },
  18106. "additionalProperties": {
  18107. "$ref": "#/components/schemas/AgentConfig"
  18108. }
  18109. },
  18110. "provider": {
  18111. "type": "object",
  18112. "additionalProperties": {
  18113. "$ref": "#/components/schemas/ProviderConfig"
  18114. }
  18115. },
  18116. "mcp": {
  18117. "type": "object",
  18118. "additionalProperties": {
  18119. "anyOf": [
  18120. {
  18121. "$ref": "#/components/schemas/McpLocalConfig"
  18122. },
  18123. {
  18124. "$ref": "#/components/schemas/McpRemoteConfig"
  18125. },
  18126. {
  18127. "type": "object",
  18128. "properties": {
  18129. "enabled": {
  18130. "type": "boolean"
  18131. }
  18132. },
  18133. "required": ["enabled"],
  18134. "additionalProperties": false
  18135. }
  18136. ]
  18137. }
  18138. },
  18139. "formatter": {
  18140. "anyOf": [
  18141. {
  18142. "type": "boolean"
  18143. },
  18144. {
  18145. "type": "object",
  18146. "additionalProperties": {
  18147. "type": "object",
  18148. "properties": {
  18149. "disabled": {
  18150. "type": "boolean"
  18151. },
  18152. "command": {
  18153. "type": "array",
  18154. "items": {
  18155. "type": "string"
  18156. }
  18157. },
  18158. "environment": {
  18159. "type": "object",
  18160. "additionalProperties": {
  18161. "type": "string"
  18162. }
  18163. },
  18164. "extensions": {
  18165. "type": "array",
  18166. "items": {
  18167. "type": "string"
  18168. }
  18169. }
  18170. },
  18171. "additionalProperties": false
  18172. }
  18173. }
  18174. ],
  18175. "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."
  18176. },
  18177. "lsp": {
  18178. "anyOf": [
  18179. {
  18180. "type": "boolean"
  18181. },
  18182. {
  18183. "type": "object",
  18184. "additionalProperties": {
  18185. "anyOf": [
  18186. {
  18187. "type": "object",
  18188. "properties": {
  18189. "disabled": {
  18190. "type": "boolean",
  18191. "enum": [true]
  18192. }
  18193. },
  18194. "required": ["disabled"],
  18195. "additionalProperties": false
  18196. },
  18197. {
  18198. "type": "object",
  18199. "properties": {
  18200. "command": {
  18201. "type": "array",
  18202. "items": {
  18203. "type": "string"
  18204. }
  18205. },
  18206. "extensions": {
  18207. "type": "array",
  18208. "items": {
  18209. "type": "string"
  18210. }
  18211. },
  18212. "disabled": {
  18213. "type": "boolean"
  18214. },
  18215. "env": {
  18216. "type": "object",
  18217. "additionalProperties": {
  18218. "type": "string"
  18219. }
  18220. },
  18221. "initialization": {
  18222. "type": "object"
  18223. }
  18224. },
  18225. "required": ["command"],
  18226. "additionalProperties": false
  18227. }
  18228. ]
  18229. }
  18230. }
  18231. ],
  18232. "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."
  18233. },
  18234. "instructions": {
  18235. "type": "array",
  18236. "items": {
  18237. "type": "string"
  18238. }
  18239. },
  18240. "layout": {
  18241. "$ref": "#/components/schemas/LayoutConfig"
  18242. },
  18243. "permission": {
  18244. "$ref": "#/components/schemas/PermissionConfig"
  18245. },
  18246. "tools": {
  18247. "type": "object",
  18248. "additionalProperties": {
  18249. "type": "boolean"
  18250. }
  18251. },
  18252. "attachment": {
  18253. "$ref": "#/components/schemas/AttachmentConfig"
  18254. },
  18255. "enterprise": {
  18256. "type": "object",
  18257. "properties": {
  18258. "url": {
  18259. "type": "string"
  18260. }
  18261. },
  18262. "additionalProperties": false
  18263. },
  18264. "tool_output": {
  18265. "type": "object",
  18266. "properties": {
  18267. "max_lines": {
  18268. "type": "integer",
  18269. "exclusiveMinimum": 0
  18270. },
  18271. "max_bytes": {
  18272. "type": "integer",
  18273. "exclusiveMinimum": 0
  18274. }
  18275. },
  18276. "additionalProperties": false
  18277. },
  18278. "compaction": {
  18279. "type": "object",
  18280. "properties": {
  18281. "auto": {
  18282. "type": "boolean"
  18283. },
  18284. "prune": {
  18285. "type": "boolean"
  18286. },
  18287. "tail_turns": {
  18288. "type": "integer",
  18289. "minimum": 0
  18290. },
  18291. "preserve_recent_tokens": {
  18292. "type": "integer",
  18293. "minimum": 0
  18294. },
  18295. "reserved": {
  18296. "type": "integer",
  18297. "minimum": 0
  18298. }
  18299. },
  18300. "additionalProperties": false
  18301. },
  18302. "experimental": {
  18303. "type": "object",
  18304. "properties": {
  18305. "disable_paste_summary": {
  18306. "type": "boolean"
  18307. },
  18308. "batch_tool": {
  18309. "type": "boolean"
  18310. },
  18311. "openTelemetry": {
  18312. "type": "boolean"
  18313. },
  18314. "primary_tools": {
  18315. "type": "array",
  18316. "items": {
  18317. "type": "string"
  18318. }
  18319. },
  18320. "continue_loop_on_deny": {
  18321. "type": "boolean"
  18322. },
  18323. "mcp_timeout": {
  18324. "type": "integer",
  18325. "exclusiveMinimum": 0
  18326. },
  18327. "policies": {
  18328. "type": "array",
  18329. "items": {
  18330. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  18331. }
  18332. }
  18333. },
  18334. "additionalProperties": false
  18335. }
  18336. },
  18337. "additionalProperties": false
  18338. },
  18339. "Model": {
  18340. "type": "object",
  18341. "properties": {
  18342. "id": {
  18343. "type": "string"
  18344. },
  18345. "providerID": {
  18346. "type": "string"
  18347. },
  18348. "api": {
  18349. "type": "object",
  18350. "properties": {
  18351. "id": {
  18352. "type": "string"
  18353. },
  18354. "url": {
  18355. "type": "string"
  18356. },
  18357. "npm": {
  18358. "type": "string"
  18359. }
  18360. },
  18361. "required": ["id", "url", "npm"],
  18362. "additionalProperties": false
  18363. },
  18364. "name": {
  18365. "type": "string"
  18366. },
  18367. "family": {
  18368. "type": "string"
  18369. },
  18370. "capabilities": {
  18371. "type": "object",
  18372. "properties": {
  18373. "temperature": {
  18374. "type": "boolean"
  18375. },
  18376. "reasoning": {
  18377. "type": "boolean"
  18378. },
  18379. "attachment": {
  18380. "type": "boolean"
  18381. },
  18382. "toolcall": {
  18383. "type": "boolean"
  18384. },
  18385. "input": {
  18386. "type": "object",
  18387. "properties": {
  18388. "text": {
  18389. "type": "boolean"
  18390. },
  18391. "audio": {
  18392. "type": "boolean"
  18393. },
  18394. "image": {
  18395. "type": "boolean"
  18396. },
  18397. "video": {
  18398. "type": "boolean"
  18399. },
  18400. "pdf": {
  18401. "type": "boolean"
  18402. }
  18403. },
  18404. "required": ["text", "audio", "image", "video", "pdf"],
  18405. "additionalProperties": false
  18406. },
  18407. "output": {
  18408. "type": "object",
  18409. "properties": {
  18410. "text": {
  18411. "type": "boolean"
  18412. },
  18413. "audio": {
  18414. "type": "boolean"
  18415. },
  18416. "image": {
  18417. "type": "boolean"
  18418. },
  18419. "video": {
  18420. "type": "boolean"
  18421. },
  18422. "pdf": {
  18423. "type": "boolean"
  18424. }
  18425. },
  18426. "required": ["text", "audio", "image", "video", "pdf"],
  18427. "additionalProperties": false
  18428. },
  18429. "interleaved": {
  18430. "anyOf": [
  18431. {
  18432. "type": "boolean"
  18433. },
  18434. {
  18435. "type": "object",
  18436. "properties": {
  18437. "field": {
  18438. "type": "string",
  18439. "enum": ["reasoning_content", "reasoning_details"]
  18440. }
  18441. },
  18442. "required": ["field"],
  18443. "additionalProperties": false
  18444. }
  18445. ]
  18446. }
  18447. },
  18448. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  18449. "additionalProperties": false
  18450. },
  18451. "cost": {
  18452. "type": "object",
  18453. "properties": {
  18454. "input": {
  18455. "type": "number"
  18456. },
  18457. "output": {
  18458. "type": "number"
  18459. },
  18460. "cache": {
  18461. "type": "object",
  18462. "properties": {
  18463. "read": {
  18464. "type": "number"
  18465. },
  18466. "write": {
  18467. "type": "number"
  18468. }
  18469. },
  18470. "required": ["read", "write"],
  18471. "additionalProperties": false
  18472. },
  18473. "tiers": {
  18474. "type": "array",
  18475. "items": {
  18476. "type": "object",
  18477. "properties": {
  18478. "input": {
  18479. "type": "number"
  18480. },
  18481. "output": {
  18482. "type": "number"
  18483. },
  18484. "cache": {
  18485. "type": "object",
  18486. "properties": {
  18487. "read": {
  18488. "type": "number"
  18489. },
  18490. "write": {
  18491. "type": "number"
  18492. }
  18493. },
  18494. "required": ["read", "write"],
  18495. "additionalProperties": false
  18496. },
  18497. "tier": {
  18498. "type": "object",
  18499. "properties": {
  18500. "type": {
  18501. "type": "string",
  18502. "enum": ["context"]
  18503. },
  18504. "size": {
  18505. "type": "number"
  18506. }
  18507. },
  18508. "required": ["type", "size"],
  18509. "additionalProperties": false
  18510. }
  18511. },
  18512. "required": ["input", "output", "cache", "tier"],
  18513. "additionalProperties": false
  18514. }
  18515. },
  18516. "experimentalOver200K": {
  18517. "type": "object",
  18518. "properties": {
  18519. "input": {
  18520. "type": "number"
  18521. },
  18522. "output": {
  18523. "type": "number"
  18524. },
  18525. "cache": {
  18526. "type": "object",
  18527. "properties": {
  18528. "read": {
  18529. "type": "number"
  18530. },
  18531. "write": {
  18532. "type": "number"
  18533. }
  18534. },
  18535. "required": ["read", "write"],
  18536. "additionalProperties": false
  18537. }
  18538. },
  18539. "required": ["input", "output", "cache"],
  18540. "additionalProperties": false
  18541. }
  18542. },
  18543. "required": ["input", "output", "cache"],
  18544. "additionalProperties": false
  18545. },
  18546. "limit": {
  18547. "type": "object",
  18548. "properties": {
  18549. "context": {
  18550. "type": "number"
  18551. },
  18552. "input": {
  18553. "type": "number"
  18554. },
  18555. "output": {
  18556. "type": "number"
  18557. }
  18558. },
  18559. "required": ["context", "output"],
  18560. "additionalProperties": false
  18561. },
  18562. "status": {
  18563. "type": "string",
  18564. "enum": ["alpha", "beta", "deprecated", "active"]
  18565. },
  18566. "options": {
  18567. "type": "object"
  18568. },
  18569. "headers": {
  18570. "type": "object",
  18571. "additionalProperties": {
  18572. "type": "string"
  18573. }
  18574. },
  18575. "release_date": {
  18576. "type": "string"
  18577. },
  18578. "variants": {
  18579. "type": "object",
  18580. "additionalProperties": {
  18581. "type": "object"
  18582. }
  18583. }
  18584. },
  18585. "required": [
  18586. "id",
  18587. "providerID",
  18588. "api",
  18589. "name",
  18590. "capabilities",
  18591. "cost",
  18592. "limit",
  18593. "status",
  18594. "options",
  18595. "headers",
  18596. "release_date"
  18597. ],
  18598. "additionalProperties": false
  18599. },
  18600. "Provider": {
  18601. "type": "object",
  18602. "properties": {
  18603. "id": {
  18604. "type": "string"
  18605. },
  18606. "name": {
  18607. "type": "string"
  18608. },
  18609. "source": {
  18610. "type": "string",
  18611. "enum": ["env", "config", "custom", "api"]
  18612. },
  18613. "env": {
  18614. "type": "array",
  18615. "items": {
  18616. "type": "string"
  18617. }
  18618. },
  18619. "key": {
  18620. "type": "string"
  18621. },
  18622. "options": {
  18623. "type": "object"
  18624. },
  18625. "models": {
  18626. "type": "object",
  18627. "additionalProperties": {
  18628. "$ref": "#/components/schemas/Model"
  18629. }
  18630. }
  18631. },
  18632. "required": ["id", "name", "source", "env", "options", "models"],
  18633. "additionalProperties": false
  18634. },
  18635. "ConsoleState": {
  18636. "type": "object",
  18637. "properties": {
  18638. "consoleManagedProviders": {
  18639. "type": "array",
  18640. "items": {
  18641. "type": "string"
  18642. }
  18643. },
  18644. "activeOrgName": {
  18645. "type": "string"
  18646. },
  18647. "switchableOrgCount": {
  18648. "type": "integer",
  18649. "minimum": 0
  18650. }
  18651. },
  18652. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18653. "additionalProperties": false
  18654. },
  18655. "effect_HttpApiError_InternalServerError": {
  18656. "type": "object",
  18657. "properties": {
  18658. "_tag": {
  18659. "type": "string",
  18660. "enum": ["InternalServerError"]
  18661. }
  18662. },
  18663. "required": ["_tag"],
  18664. "additionalProperties": false
  18665. },
  18666. "ToolListItem": {
  18667. "type": "object",
  18668. "properties": {
  18669. "id": {
  18670. "type": "string"
  18671. },
  18672. "description": {
  18673. "type": "string"
  18674. },
  18675. "parameters": {}
  18676. },
  18677. "required": ["id", "description", "parameters"],
  18678. "additionalProperties": false
  18679. },
  18680. "ToolList": {
  18681. "type": "array",
  18682. "items": {
  18683. "$ref": "#/components/schemas/ToolListItem"
  18684. }
  18685. },
  18686. "ToolIDs": {
  18687. "type": "array",
  18688. "items": {
  18689. "type": "string"
  18690. }
  18691. },
  18692. "WorktreeError": {
  18693. "type": "object",
  18694. "properties": {
  18695. "name": {
  18696. "type": "string",
  18697. "enum": [
  18698. "WorktreeNotGitError",
  18699. "WorktreeNameGenerationFailedError",
  18700. "WorktreeCreateFailedError",
  18701. "WorktreeStartCommandFailedError",
  18702. "WorktreeRemoveFailedError",
  18703. "WorktreeResetFailedError",
  18704. "WorktreeListFailedError"
  18705. ]
  18706. },
  18707. "data": {
  18708. "type": "object",
  18709. "properties": {
  18710. "message": {
  18711. "type": "string"
  18712. }
  18713. },
  18714. "required": ["message"],
  18715. "additionalProperties": false
  18716. }
  18717. },
  18718. "required": ["name", "data"],
  18719. "additionalProperties": false
  18720. },
  18721. "WorktreeCreateInput": {
  18722. "type": "object",
  18723. "properties": {
  18724. "name": {
  18725. "type": "string"
  18726. },
  18727. "startCommand": {
  18728. "type": "string",
  18729. "description": "Additional startup script to run after the project's start command"
  18730. }
  18731. },
  18732. "additionalProperties": false
  18733. },
  18734. "Worktree": {
  18735. "type": "object",
  18736. "properties": {
  18737. "name": {
  18738. "type": "string"
  18739. },
  18740. "branch": {
  18741. "type": "string"
  18742. },
  18743. "directory": {
  18744. "type": "string"
  18745. }
  18746. },
  18747. "required": ["name", "directory"],
  18748. "additionalProperties": false
  18749. },
  18750. "WorktreeRemoveInput": {
  18751. "type": "object",
  18752. "properties": {
  18753. "directory": {
  18754. "type": "string"
  18755. }
  18756. },
  18757. "required": ["directory"],
  18758. "additionalProperties": false
  18759. },
  18760. "WorktreeResetInput": {
  18761. "type": "object",
  18762. "properties": {
  18763. "directory": {
  18764. "type": "string"
  18765. }
  18766. },
  18767. "required": ["directory"],
  18768. "additionalProperties": false
  18769. },
  18770. "ProjectSummary": {
  18771. "type": "object",
  18772. "properties": {
  18773. "id": {
  18774. "type": "string"
  18775. },
  18776. "name": {
  18777. "type": "string"
  18778. },
  18779. "worktree": {
  18780. "type": "string"
  18781. }
  18782. },
  18783. "required": ["id", "worktree"],
  18784. "additionalProperties": false
  18785. },
  18786. "GlobalSession": {
  18787. "type": "object",
  18788. "properties": {
  18789. "id": {
  18790. "type": "string",
  18791. "pattern": "^ses"
  18792. },
  18793. "slug": {
  18794. "type": "string"
  18795. },
  18796. "projectID": {
  18797. "type": "string"
  18798. },
  18799. "workspaceID": {
  18800. "type": "string",
  18801. "pattern": "^wrk"
  18802. },
  18803. "directory": {
  18804. "type": "string"
  18805. },
  18806. "path": {
  18807. "type": "string"
  18808. },
  18809. "parentID": {
  18810. "type": "string",
  18811. "pattern": "^ses"
  18812. },
  18813. "summary": {
  18814. "type": "object",
  18815. "properties": {
  18816. "additions": {
  18817. "type": "number"
  18818. },
  18819. "deletions": {
  18820. "type": "number"
  18821. },
  18822. "files": {
  18823. "type": "number"
  18824. },
  18825. "diffs": {
  18826. "type": "array",
  18827. "items": {
  18828. "$ref": "#/components/schemas/SnapshotFileDiff"
  18829. }
  18830. }
  18831. },
  18832. "required": ["additions", "deletions", "files"],
  18833. "additionalProperties": false
  18834. },
  18835. "cost": {
  18836. "type": "number"
  18837. },
  18838. "tokens": {
  18839. "type": "object",
  18840. "properties": {
  18841. "input": {
  18842. "type": "number"
  18843. },
  18844. "output": {
  18845. "type": "number"
  18846. },
  18847. "reasoning": {
  18848. "type": "number"
  18849. },
  18850. "cache": {
  18851. "type": "object",
  18852. "properties": {
  18853. "read": {
  18854. "type": "number"
  18855. },
  18856. "write": {
  18857. "type": "number"
  18858. }
  18859. },
  18860. "required": ["read", "write"],
  18861. "additionalProperties": false
  18862. }
  18863. },
  18864. "required": ["input", "output", "reasoning", "cache"],
  18865. "additionalProperties": false
  18866. },
  18867. "share": {
  18868. "type": "object",
  18869. "properties": {
  18870. "url": {
  18871. "type": "string"
  18872. }
  18873. },
  18874. "required": ["url"],
  18875. "additionalProperties": false
  18876. },
  18877. "title": {
  18878. "type": "string"
  18879. },
  18880. "agent": {
  18881. "type": "string"
  18882. },
  18883. "model": {
  18884. "type": "object",
  18885. "properties": {
  18886. "id": {
  18887. "type": "string"
  18888. },
  18889. "providerID": {
  18890. "type": "string"
  18891. },
  18892. "variant": {
  18893. "type": "string"
  18894. }
  18895. },
  18896. "required": ["id", "providerID"],
  18897. "additionalProperties": false
  18898. },
  18899. "version": {
  18900. "type": "string"
  18901. },
  18902. "metadata": {
  18903. "type": "object"
  18904. },
  18905. "time": {
  18906. "type": "object",
  18907. "properties": {
  18908. "created": {
  18909. "type": "integer",
  18910. "minimum": 0
  18911. },
  18912. "updated": {
  18913. "type": "integer",
  18914. "minimum": 0
  18915. },
  18916. "compacting": {
  18917. "type": "integer",
  18918. "minimum": 0
  18919. },
  18920. "archived": {
  18921. "type": "number"
  18922. }
  18923. },
  18924. "required": ["created", "updated"],
  18925. "additionalProperties": false
  18926. },
  18927. "permission": {
  18928. "$ref": "#/components/schemas/PermissionRuleset"
  18929. },
  18930. "revert": {
  18931. "type": "object",
  18932. "properties": {
  18933. "messageID": {
  18934. "type": "string",
  18935. "pattern": "^msg"
  18936. },
  18937. "partID": {
  18938. "type": "string",
  18939. "pattern": "^prt"
  18940. },
  18941. "snapshot": {
  18942. "type": "string"
  18943. },
  18944. "diff": {
  18945. "type": "string"
  18946. }
  18947. },
  18948. "required": ["messageID"],
  18949. "additionalProperties": false
  18950. },
  18951. "project": {
  18952. "anyOf": [
  18953. {
  18954. "$ref": "#/components/schemas/ProjectSummary"
  18955. },
  18956. {
  18957. "type": "null"
  18958. }
  18959. ]
  18960. }
  18961. },
  18962. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  18963. "additionalProperties": false
  18964. },
  18965. "McpResource": {
  18966. "type": "object",
  18967. "properties": {
  18968. "name": {
  18969. "type": "string"
  18970. },
  18971. "uri": {
  18972. "type": "string"
  18973. },
  18974. "description": {
  18975. "type": "string"
  18976. },
  18977. "mimeType": {
  18978. "type": "string"
  18979. },
  18980. "client": {
  18981. "type": "string"
  18982. }
  18983. },
  18984. "required": ["name", "uri", "client"],
  18985. "additionalProperties": false
  18986. },
  18987. "Symbol": {
  18988. "type": "object",
  18989. "properties": {
  18990. "name": {
  18991. "type": "string"
  18992. },
  18993. "kind": {
  18994. "type": "integer",
  18995. "minimum": 0
  18996. },
  18997. "location": {
  18998. "type": "object",
  18999. "properties": {
  19000. "uri": {
  19001. "type": "string"
  19002. },
  19003. "range": {
  19004. "$ref": "#/components/schemas/Range"
  19005. }
  19006. },
  19007. "required": ["uri", "range"],
  19008. "additionalProperties": false
  19009. }
  19010. },
  19011. "required": ["name", "kind", "location"],
  19012. "additionalProperties": false
  19013. },
  19014. "FileNode": {
  19015. "type": "object",
  19016. "properties": {
  19017. "name": {
  19018. "type": "string"
  19019. },
  19020. "path": {
  19021. "type": "string"
  19022. },
  19023. "absolute": {
  19024. "type": "string"
  19025. },
  19026. "type": {
  19027. "type": "string",
  19028. "enum": ["file", "directory"]
  19029. },
  19030. "ignored": {
  19031. "type": "boolean"
  19032. }
  19033. },
  19034. "required": ["name", "path", "absolute", "type", "ignored"],
  19035. "additionalProperties": false
  19036. },
  19037. "FileContent": {
  19038. "type": "object",
  19039. "properties": {
  19040. "type": {
  19041. "type": "string",
  19042. "enum": ["text", "binary"]
  19043. },
  19044. "content": {
  19045. "type": "string"
  19046. },
  19047. "diff": {
  19048. "type": "string"
  19049. },
  19050. "patch": {
  19051. "type": "object",
  19052. "properties": {
  19053. "oldFileName": {
  19054. "type": "string"
  19055. },
  19056. "newFileName": {
  19057. "type": "string"
  19058. },
  19059. "oldHeader": {
  19060. "type": "string"
  19061. },
  19062. "newHeader": {
  19063. "type": "string"
  19064. },
  19065. "hunks": {
  19066. "type": "array",
  19067. "items": {
  19068. "type": "object",
  19069. "properties": {
  19070. "oldStart": {
  19071. "type": "integer",
  19072. "minimum": 0
  19073. },
  19074. "oldLines": {
  19075. "type": "integer",
  19076. "minimum": 0
  19077. },
  19078. "newStart": {
  19079. "type": "integer",
  19080. "minimum": 0
  19081. },
  19082. "newLines": {
  19083. "type": "integer",
  19084. "minimum": 0
  19085. },
  19086. "lines": {
  19087. "type": "array",
  19088. "items": {
  19089. "type": "string"
  19090. }
  19091. }
  19092. },
  19093. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  19094. "additionalProperties": false
  19095. }
  19096. },
  19097. "index": {
  19098. "type": "string"
  19099. }
  19100. },
  19101. "required": ["oldFileName", "newFileName", "hunks"],
  19102. "additionalProperties": false
  19103. },
  19104. "encoding": {
  19105. "type": "string",
  19106. "enum": ["base64"]
  19107. },
  19108. "mimeType": {
  19109. "type": "string"
  19110. }
  19111. },
  19112. "required": ["type", "content"],
  19113. "additionalProperties": false
  19114. },
  19115. "File": {
  19116. "type": "object",
  19117. "properties": {
  19118. "path": {
  19119. "type": "string"
  19120. },
  19121. "added": {
  19122. "type": "integer",
  19123. "minimum": 0
  19124. },
  19125. "removed": {
  19126. "type": "integer",
  19127. "minimum": 0
  19128. },
  19129. "status": {
  19130. "type": "string",
  19131. "enum": ["added", "deleted", "modified"]
  19132. }
  19133. },
  19134. "required": ["path", "added", "removed", "status"],
  19135. "additionalProperties": false
  19136. },
  19137. "Path": {
  19138. "type": "object",
  19139. "properties": {
  19140. "home": {
  19141. "type": "string"
  19142. },
  19143. "state": {
  19144. "type": "string"
  19145. },
  19146. "config": {
  19147. "type": "string"
  19148. },
  19149. "worktree": {
  19150. "type": "string"
  19151. },
  19152. "directory": {
  19153. "type": "string"
  19154. }
  19155. },
  19156. "required": ["home", "state", "config", "worktree", "directory"],
  19157. "additionalProperties": false
  19158. },
  19159. "VcsInfo": {
  19160. "type": "object",
  19161. "properties": {
  19162. "branch": {
  19163. "type": "string"
  19164. },
  19165. "default_branch": {
  19166. "type": "string"
  19167. }
  19168. },
  19169. "additionalProperties": false
  19170. },
  19171. "VcsFileStatus": {
  19172. "type": "object",
  19173. "properties": {
  19174. "file": {
  19175. "type": "string"
  19176. },
  19177. "additions": {
  19178. "type": "number"
  19179. },
  19180. "deletions": {
  19181. "type": "number"
  19182. },
  19183. "status": {
  19184. "type": "string",
  19185. "enum": ["added", "deleted", "modified"]
  19186. }
  19187. },
  19188. "required": ["file", "additions", "deletions", "status"],
  19189. "additionalProperties": false
  19190. },
  19191. "VcsFileDiff": {
  19192. "type": "object",
  19193. "properties": {
  19194. "file": {
  19195. "type": "string"
  19196. },
  19197. "patch": {
  19198. "type": "string"
  19199. },
  19200. "additions": {
  19201. "type": "number"
  19202. },
  19203. "deletions": {
  19204. "type": "number"
  19205. },
  19206. "status": {
  19207. "type": "string",
  19208. "enum": ["added", "deleted", "modified"]
  19209. }
  19210. },
  19211. "required": ["file", "additions", "deletions"],
  19212. "additionalProperties": false
  19213. },
  19214. "VcsApplyError": {
  19215. "type": "object",
  19216. "properties": {
  19217. "name": {
  19218. "type": "string",
  19219. "enum": ["VcsApplyError"]
  19220. },
  19221. "data": {
  19222. "type": "object",
  19223. "properties": {
  19224. "message": {
  19225. "type": "string"
  19226. },
  19227. "reason": {
  19228. "type": "string",
  19229. "enum": ["non-git", "not-clean"]
  19230. }
  19231. },
  19232. "required": ["message", "reason"],
  19233. "additionalProperties": false
  19234. }
  19235. },
  19236. "required": ["name", "data"],
  19237. "additionalProperties": false
  19238. },
  19239. "Command": {
  19240. "type": "object",
  19241. "properties": {
  19242. "name": {
  19243. "type": "string"
  19244. },
  19245. "description": {
  19246. "type": "string"
  19247. },
  19248. "agent": {
  19249. "type": "string"
  19250. },
  19251. "model": {
  19252. "type": "string"
  19253. },
  19254. "source": {
  19255. "type": "string",
  19256. "enum": ["command", "mcp", "skill"]
  19257. },
  19258. "template": {
  19259. "type": "string"
  19260. },
  19261. "subtask": {
  19262. "type": "boolean"
  19263. },
  19264. "hints": {
  19265. "type": "array",
  19266. "items": {
  19267. "type": "string"
  19268. }
  19269. }
  19270. },
  19271. "required": ["name", "template", "hints"],
  19272. "additionalProperties": false
  19273. },
  19274. "Agent": {
  19275. "type": "object",
  19276. "properties": {
  19277. "name": {
  19278. "type": "string"
  19279. },
  19280. "description": {
  19281. "type": "string"
  19282. },
  19283. "mode": {
  19284. "type": "string",
  19285. "enum": ["subagent", "primary", "all"]
  19286. },
  19287. "native": {
  19288. "type": "boolean"
  19289. },
  19290. "hidden": {
  19291. "type": "boolean"
  19292. },
  19293. "topP": {
  19294. "type": "number"
  19295. },
  19296. "temperature": {
  19297. "type": "number"
  19298. },
  19299. "color": {
  19300. "type": "string"
  19301. },
  19302. "permission": {
  19303. "$ref": "#/components/schemas/PermissionRuleset"
  19304. },
  19305. "model": {
  19306. "type": "object",
  19307. "properties": {
  19308. "modelID": {
  19309. "type": "string"
  19310. },
  19311. "providerID": {
  19312. "type": "string"
  19313. }
  19314. },
  19315. "required": ["modelID", "providerID"],
  19316. "additionalProperties": false
  19317. },
  19318. "variant": {
  19319. "type": "string"
  19320. },
  19321. "prompt": {
  19322. "type": "string"
  19323. },
  19324. "options": {
  19325. "type": "object"
  19326. },
  19327. "steps": {
  19328. "type": "number"
  19329. }
  19330. },
  19331. "required": ["name", "mode", "permission", "options"],
  19332. "additionalProperties": false
  19333. },
  19334. "LSPStatus": {
  19335. "type": "object",
  19336. "properties": {
  19337. "id": {
  19338. "type": "string"
  19339. },
  19340. "name": {
  19341. "type": "string"
  19342. },
  19343. "root": {
  19344. "type": "string"
  19345. },
  19346. "status": {
  19347. "type": "string",
  19348. "enum": ["connected", "error"]
  19349. }
  19350. },
  19351. "required": ["id", "name", "root", "status"],
  19352. "additionalProperties": false
  19353. },
  19354. "FormatterStatus": {
  19355. "type": "object",
  19356. "properties": {
  19357. "name": {
  19358. "type": "string"
  19359. },
  19360. "extensions": {
  19361. "type": "array",
  19362. "items": {
  19363. "type": "string"
  19364. }
  19365. },
  19366. "enabled": {
  19367. "type": "boolean"
  19368. }
  19369. },
  19370. "required": ["name", "extensions", "enabled"],
  19371. "additionalProperties": false
  19372. },
  19373. "MCPStatusConnected": {
  19374. "type": "object",
  19375. "properties": {
  19376. "status": {
  19377. "type": "string",
  19378. "enum": ["connected"]
  19379. }
  19380. },
  19381. "required": ["status"],
  19382. "additionalProperties": false
  19383. },
  19384. "MCPStatusDisabled": {
  19385. "type": "object",
  19386. "properties": {
  19387. "status": {
  19388. "type": "string",
  19389. "enum": ["disabled"]
  19390. }
  19391. },
  19392. "required": ["status"],
  19393. "additionalProperties": false
  19394. },
  19395. "MCPStatusFailed": {
  19396. "type": "object",
  19397. "properties": {
  19398. "status": {
  19399. "type": "string",
  19400. "enum": ["failed"]
  19401. },
  19402. "error": {
  19403. "type": "string"
  19404. }
  19405. },
  19406. "required": ["status", "error"],
  19407. "additionalProperties": false
  19408. },
  19409. "MCPStatusNeedsAuth": {
  19410. "type": "object",
  19411. "properties": {
  19412. "status": {
  19413. "type": "string",
  19414. "enum": ["needs_auth"]
  19415. }
  19416. },
  19417. "required": ["status"],
  19418. "additionalProperties": false
  19419. },
  19420. "MCPStatusNeedsClientRegistration": {
  19421. "type": "object",
  19422. "properties": {
  19423. "status": {
  19424. "type": "string",
  19425. "enum": ["needs_client_registration"]
  19426. },
  19427. "error": {
  19428. "type": "string"
  19429. }
  19430. },
  19431. "required": ["status", "error"],
  19432. "additionalProperties": false
  19433. },
  19434. "MCPStatus": {
  19435. "anyOf": [
  19436. {
  19437. "$ref": "#/components/schemas/MCPStatusConnected"
  19438. },
  19439. {
  19440. "$ref": "#/components/schemas/MCPStatusDisabled"
  19441. },
  19442. {
  19443. "$ref": "#/components/schemas/MCPStatusFailed"
  19444. },
  19445. {
  19446. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  19447. },
  19448. {
  19449. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  19450. }
  19451. ]
  19452. },
  19453. "McpUnsupportedOAuthError": {
  19454. "type": "object",
  19455. "properties": {
  19456. "error": {
  19457. "type": "string"
  19458. }
  19459. },
  19460. "required": ["error"],
  19461. "additionalProperties": false
  19462. },
  19463. "McpServerNotFoundError": {
  19464. "type": "object",
  19465. "properties": {
  19466. "_tag": {
  19467. "type": "string",
  19468. "enum": ["McpServerNotFoundError"]
  19469. },
  19470. "name": {
  19471. "type": "string"
  19472. },
  19473. "message": {
  19474. "type": "string"
  19475. }
  19476. },
  19477. "required": ["_tag", "name", "message"],
  19478. "additionalProperties": false
  19479. },
  19480. "Project": {
  19481. "type": "object",
  19482. "properties": {
  19483. "id": {
  19484. "type": "string"
  19485. },
  19486. "worktree": {
  19487. "type": "string"
  19488. },
  19489. "vcs": {
  19490. "type": "string",
  19491. "enum": ["git"]
  19492. },
  19493. "name": {
  19494. "type": "string"
  19495. },
  19496. "icon": {
  19497. "type": "object",
  19498. "properties": {
  19499. "url": {
  19500. "type": "string"
  19501. },
  19502. "override": {
  19503. "type": "string"
  19504. },
  19505. "color": {
  19506. "type": "string"
  19507. }
  19508. },
  19509. "additionalProperties": false
  19510. },
  19511. "commands": {
  19512. "type": "object",
  19513. "properties": {
  19514. "start": {
  19515. "type": "string",
  19516. "description": "Startup script to run when creating a new workspace (worktree)"
  19517. }
  19518. },
  19519. "additionalProperties": false
  19520. },
  19521. "time": {
  19522. "type": "object",
  19523. "properties": {
  19524. "created": {
  19525. "type": "integer",
  19526. "minimum": 0
  19527. },
  19528. "updated": {
  19529. "type": "integer",
  19530. "minimum": 0
  19531. },
  19532. "initialized": {
  19533. "type": "integer",
  19534. "minimum": 0
  19535. }
  19536. },
  19537. "required": ["created", "updated"],
  19538. "additionalProperties": false
  19539. },
  19540. "sandboxes": {
  19541. "type": "array",
  19542. "items": {
  19543. "type": "string"
  19544. }
  19545. }
  19546. },
  19547. "required": ["id", "worktree", "time", "sandboxes"],
  19548. "additionalProperties": false
  19549. },
  19550. "ProjectNotFoundError": {
  19551. "type": "object",
  19552. "properties": {
  19553. "_tag": {
  19554. "type": "string",
  19555. "enum": ["ProjectNotFoundError"]
  19556. },
  19557. "projectID": {
  19558. "type": "string"
  19559. },
  19560. "message": {
  19561. "type": "string"
  19562. }
  19563. },
  19564. "required": ["_tag", "projectID", "message"],
  19565. "additionalProperties": false
  19566. },
  19567. "ProjectCopyError": {
  19568. "type": "object",
  19569. "properties": {
  19570. "name": {
  19571. "type": "string",
  19572. "enum": ["ProjectCopyError"]
  19573. },
  19574. "data": {
  19575. "type": "object",
  19576. "properties": {
  19577. "message": {
  19578. "type": "string"
  19579. }
  19580. },
  19581. "required": ["message"],
  19582. "additionalProperties": false
  19583. }
  19584. },
  19585. "required": ["name", "data"],
  19586. "additionalProperties": false
  19587. },
  19588. "PtyNotFoundError": {
  19589. "type": "object",
  19590. "properties": {
  19591. "_tag": {
  19592. "type": "string",
  19593. "enum": ["PtyNotFoundError"]
  19594. },
  19595. "ptyID": {
  19596. "type": "string"
  19597. },
  19598. "message": {
  19599. "type": "string"
  19600. }
  19601. },
  19602. "required": ["_tag", "ptyID", "message"],
  19603. "additionalProperties": false
  19604. },
  19605. "PtyForbiddenError": {
  19606. "type": "object",
  19607. "properties": {
  19608. "_tag": {
  19609. "type": "string",
  19610. "enum": ["PtyForbiddenError"]
  19611. },
  19612. "message": {
  19613. "type": "string"
  19614. }
  19615. },
  19616. "required": ["_tag", "message"],
  19617. "additionalProperties": false
  19618. },
  19619. "QuestionRequest": {
  19620. "type": "object",
  19621. "properties": {
  19622. "id": {
  19623. "type": "string",
  19624. "pattern": "^que"
  19625. },
  19626. "sessionID": {
  19627. "type": "string",
  19628. "pattern": "^ses"
  19629. },
  19630. "questions": {
  19631. "type": "array",
  19632. "items": {
  19633. "$ref": "#/components/schemas/QuestionInfo"
  19634. },
  19635. "description": "Questions to ask"
  19636. },
  19637. "tool": {
  19638. "$ref": "#/components/schemas/QuestionTool"
  19639. }
  19640. },
  19641. "required": ["id", "sessionID", "questions"],
  19642. "additionalProperties": false
  19643. },
  19644. "QuestionNotFoundError": {
  19645. "type": "object",
  19646. "properties": {
  19647. "_tag": {
  19648. "type": "string",
  19649. "enum": ["QuestionNotFoundError"]
  19650. },
  19651. "requestID": {
  19652. "type": "string"
  19653. },
  19654. "message": {
  19655. "type": "string"
  19656. }
  19657. },
  19658. "required": ["_tag", "requestID", "message"],
  19659. "additionalProperties": false
  19660. },
  19661. "PermissionRequest": {
  19662. "type": "object",
  19663. "properties": {
  19664. "id": {
  19665. "type": "string",
  19666. "pattern": "^per"
  19667. },
  19668. "sessionID": {
  19669. "type": "string",
  19670. "pattern": "^ses"
  19671. },
  19672. "permission": {
  19673. "type": "string"
  19674. },
  19675. "patterns": {
  19676. "type": "array",
  19677. "items": {
  19678. "type": "string"
  19679. }
  19680. },
  19681. "metadata": {
  19682. "type": "object"
  19683. },
  19684. "always": {
  19685. "type": "array",
  19686. "items": {
  19687. "type": "string"
  19688. }
  19689. },
  19690. "tool": {
  19691. "type": "object",
  19692. "properties": {
  19693. "messageID": {
  19694. "type": "string"
  19695. },
  19696. "callID": {
  19697. "type": "string"
  19698. }
  19699. },
  19700. "required": ["messageID", "callID"],
  19701. "additionalProperties": false
  19702. }
  19703. },
  19704. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19705. "additionalProperties": false
  19706. },
  19707. "PermissionNotFoundError": {
  19708. "type": "object",
  19709. "properties": {
  19710. "_tag": {
  19711. "type": "string",
  19712. "enum": ["PermissionNotFoundError"]
  19713. },
  19714. "requestID": {
  19715. "type": "string"
  19716. },
  19717. "message": {
  19718. "type": "string"
  19719. }
  19720. },
  19721. "required": ["_tag", "requestID", "message"],
  19722. "additionalProperties": false
  19723. },
  19724. "ProviderAuthMethod": {
  19725. "type": "object",
  19726. "properties": {
  19727. "type": {
  19728. "type": "string",
  19729. "enum": ["oauth", "api"]
  19730. },
  19731. "label": {
  19732. "type": "string"
  19733. },
  19734. "prompts": {
  19735. "type": "array",
  19736. "items": {
  19737. "anyOf": [
  19738. {
  19739. "type": "object",
  19740. "properties": {
  19741. "type": {
  19742. "type": "string",
  19743. "enum": ["text"]
  19744. },
  19745. "key": {
  19746. "type": "string"
  19747. },
  19748. "message": {
  19749. "type": "string"
  19750. },
  19751. "placeholder": {
  19752. "type": "string"
  19753. },
  19754. "when": {
  19755. "type": "object",
  19756. "properties": {
  19757. "key": {
  19758. "type": "string"
  19759. },
  19760. "op": {
  19761. "type": "string",
  19762. "enum": ["eq", "neq"]
  19763. },
  19764. "value": {
  19765. "type": "string"
  19766. }
  19767. },
  19768. "required": ["key", "op", "value"],
  19769. "additionalProperties": false
  19770. }
  19771. },
  19772. "required": ["type", "key", "message"],
  19773. "additionalProperties": false
  19774. },
  19775. {
  19776. "type": "object",
  19777. "properties": {
  19778. "type": {
  19779. "type": "string",
  19780. "enum": ["select"]
  19781. },
  19782. "key": {
  19783. "type": "string"
  19784. },
  19785. "message": {
  19786. "type": "string"
  19787. },
  19788. "options": {
  19789. "type": "array",
  19790. "items": {
  19791. "type": "object",
  19792. "properties": {
  19793. "label": {
  19794. "type": "string"
  19795. },
  19796. "value": {
  19797. "type": "string"
  19798. },
  19799. "hint": {
  19800. "type": "string"
  19801. }
  19802. },
  19803. "required": ["label", "value"],
  19804. "additionalProperties": false
  19805. }
  19806. },
  19807. "when": {
  19808. "type": "object",
  19809. "properties": {
  19810. "key": {
  19811. "type": "string"
  19812. },
  19813. "op": {
  19814. "type": "string",
  19815. "enum": ["eq", "neq"]
  19816. },
  19817. "value": {
  19818. "type": "string"
  19819. }
  19820. },
  19821. "required": ["key", "op", "value"],
  19822. "additionalProperties": false
  19823. }
  19824. },
  19825. "required": ["type", "key", "message", "options"],
  19826. "additionalProperties": false
  19827. }
  19828. ]
  19829. }
  19830. }
  19831. },
  19832. "required": ["type", "label"],
  19833. "additionalProperties": false
  19834. },
  19835. "ProviderAuthAuthorization": {
  19836. "type": "object",
  19837. "properties": {
  19838. "url": {
  19839. "type": "string"
  19840. },
  19841. "method": {
  19842. "type": "string",
  19843. "enum": ["auto", "code"]
  19844. },
  19845. "instructions": {
  19846. "type": "string"
  19847. }
  19848. },
  19849. "required": ["url", "method", "instructions"],
  19850. "additionalProperties": false
  19851. },
  19852. "ProviderAuthError1": {
  19853. "type": "object",
  19854. "properties": {
  19855. "name": {
  19856. "type": "string",
  19857. "enum": [
  19858. "BadRequest",
  19859. "ProviderAuthOauthMissing",
  19860. "ProviderAuthOauthCodeMissing",
  19861. "ProviderAuthOauthCallbackFailed",
  19862. "ProviderAuthValidationFailed"
  19863. ]
  19864. },
  19865. "data": {
  19866. "type": "object",
  19867. "properties": {
  19868. "providerID": {
  19869. "type": "string"
  19870. },
  19871. "field": {
  19872. "type": "string"
  19873. },
  19874. "message": {
  19875. "type": "string"
  19876. },
  19877. "kind": {
  19878. "type": "string"
  19879. }
  19880. },
  19881. "additionalProperties": false
  19882. }
  19883. },
  19884. "required": ["name", "data"],
  19885. "additionalProperties": false
  19886. },
  19887. "NotFoundError": {
  19888. "type": "object",
  19889. "required": ["name", "data"],
  19890. "properties": {
  19891. "name": {
  19892. "type": "string",
  19893. "enum": ["NotFoundError"]
  19894. },
  19895. "data": {
  19896. "type": "object",
  19897. "required": ["message"],
  19898. "properties": {
  19899. "message": {
  19900. "type": "string"
  19901. }
  19902. }
  19903. }
  19904. }
  19905. },
  19906. "TextPartInput": {
  19907. "type": "object",
  19908. "properties": {
  19909. "id": {
  19910. "type": "string",
  19911. "pattern": "^prt"
  19912. },
  19913. "type": {
  19914. "type": "string",
  19915. "enum": ["text"]
  19916. },
  19917. "text": {
  19918. "type": "string"
  19919. },
  19920. "synthetic": {
  19921. "type": "boolean"
  19922. },
  19923. "ignored": {
  19924. "type": "boolean"
  19925. },
  19926. "time": {
  19927. "type": "object",
  19928. "properties": {
  19929. "start": {
  19930. "type": "integer",
  19931. "minimum": 0
  19932. },
  19933. "end": {
  19934. "type": "integer",
  19935. "minimum": 0
  19936. }
  19937. },
  19938. "required": ["start"],
  19939. "additionalProperties": false
  19940. },
  19941. "metadata": {
  19942. "type": "object"
  19943. }
  19944. },
  19945. "required": ["type", "text"],
  19946. "additionalProperties": false
  19947. },
  19948. "FilePartInput": {
  19949. "type": "object",
  19950. "properties": {
  19951. "id": {
  19952. "type": "string",
  19953. "pattern": "^prt"
  19954. },
  19955. "type": {
  19956. "type": "string",
  19957. "enum": ["file"]
  19958. },
  19959. "mime": {
  19960. "type": "string"
  19961. },
  19962. "filename": {
  19963. "type": "string"
  19964. },
  19965. "url": {
  19966. "type": "string"
  19967. },
  19968. "source": {
  19969. "$ref": "#/components/schemas/FilePartSource"
  19970. }
  19971. },
  19972. "required": ["type", "mime", "url"],
  19973. "additionalProperties": false
  19974. },
  19975. "AgentPartInput": {
  19976. "type": "object",
  19977. "properties": {
  19978. "id": {
  19979. "type": "string",
  19980. "pattern": "^prt"
  19981. },
  19982. "type": {
  19983. "type": "string",
  19984. "enum": ["agent"]
  19985. },
  19986. "name": {
  19987. "type": "string"
  19988. },
  19989. "source": {
  19990. "type": "object",
  19991. "properties": {
  19992. "value": {
  19993. "type": "string"
  19994. },
  19995. "start": {
  19996. "type": "integer",
  19997. "minimum": 0
  19998. },
  19999. "end": {
  20000. "type": "integer",
  20001. "minimum": 0
  20002. }
  20003. },
  20004. "required": ["value", "start", "end"],
  20005. "additionalProperties": false
  20006. }
  20007. },
  20008. "required": ["type", "name"],
  20009. "additionalProperties": false
  20010. },
  20011. "SubtaskPartInput": {
  20012. "type": "object",
  20013. "properties": {
  20014. "id": {
  20015. "type": "string",
  20016. "pattern": "^prt"
  20017. },
  20018. "type": {
  20019. "type": "string",
  20020. "enum": ["subtask"]
  20021. },
  20022. "prompt": {
  20023. "type": "string"
  20024. },
  20025. "description": {
  20026. "type": "string"
  20027. },
  20028. "agent": {
  20029. "type": "string"
  20030. },
  20031. "model": {
  20032. "type": "object",
  20033. "properties": {
  20034. "providerID": {
  20035. "type": "string"
  20036. },
  20037. "modelID": {
  20038. "type": "string"
  20039. }
  20040. },
  20041. "required": ["providerID", "modelID"],
  20042. "additionalProperties": false
  20043. },
  20044. "command": {
  20045. "type": "string"
  20046. }
  20047. },
  20048. "required": ["type", "prompt", "description", "agent"],
  20049. "additionalProperties": false
  20050. },
  20051. "SessionBusyError": {
  20052. "type": "object",
  20053. "properties": {
  20054. "_tag": {
  20055. "type": "string",
  20056. "enum": ["SessionBusyError"]
  20057. },
  20058. "sessionID": {
  20059. "type": "string"
  20060. },
  20061. "message": {
  20062. "type": "string"
  20063. }
  20064. },
  20065. "required": ["_tag", "sessionID", "message"],
  20066. "additionalProperties": false
  20067. },
  20068. "EventTuiPromptAppend": {
  20069. "type": "object",
  20070. "properties": {
  20071. "type": {
  20072. "type": "string",
  20073. "enum": ["tui.prompt.append"]
  20074. },
  20075. "properties": {
  20076. "type": "object",
  20077. "properties": {
  20078. "text": {
  20079. "type": "string"
  20080. }
  20081. },
  20082. "required": ["text"],
  20083. "additionalProperties": false
  20084. }
  20085. },
  20086. "required": ["type", "properties"],
  20087. "additionalProperties": false
  20088. },
  20089. "EventTuiCommandExecute": {
  20090. "type": "object",
  20091. "properties": {
  20092. "type": {
  20093. "type": "string",
  20094. "enum": ["tui.command.execute"]
  20095. },
  20096. "properties": {
  20097. "type": "object",
  20098. "properties": {
  20099. "command": {
  20100. "anyOf": [
  20101. {
  20102. "type": "string",
  20103. "enum": [
  20104. "session.list",
  20105. "session.new",
  20106. "session.share",
  20107. "session.interrupt",
  20108. "session.compact",
  20109. "session.page.up",
  20110. "session.page.down",
  20111. "session.line.up",
  20112. "session.line.down",
  20113. "session.half.page.up",
  20114. "session.half.page.down",
  20115. "session.first",
  20116. "session.last",
  20117. "prompt.clear",
  20118. "prompt.submit",
  20119. "agent.cycle"
  20120. ]
  20121. },
  20122. {
  20123. "type": "string"
  20124. }
  20125. ]
  20126. }
  20127. },
  20128. "required": ["command"],
  20129. "additionalProperties": false
  20130. }
  20131. },
  20132. "required": ["type", "properties"],
  20133. "additionalProperties": false
  20134. },
  20135. "EventTuiToastShow": {
  20136. "type": "object",
  20137. "properties": {
  20138. "type": {
  20139. "type": "string",
  20140. "enum": ["tui.toast.show"]
  20141. },
  20142. "properties": {
  20143. "type": "object",
  20144. "properties": {
  20145. "title": {
  20146. "type": "string"
  20147. },
  20148. "message": {
  20149. "type": "string"
  20150. },
  20151. "variant": {
  20152. "type": "string",
  20153. "enum": ["info", "success", "warning", "error"]
  20154. },
  20155. "duration": {
  20156. "type": "integer",
  20157. "exclusiveMinimum": 0
  20158. }
  20159. },
  20160. "required": ["message", "variant"],
  20161. "additionalProperties": false
  20162. }
  20163. },
  20164. "required": ["type", "properties"],
  20165. "additionalProperties": false
  20166. },
  20167. "EventTuiSessionSelect": {
  20168. "type": "object",
  20169. "properties": {
  20170. "type": {
  20171. "type": "string",
  20172. "enum": ["tui.session.select"]
  20173. },
  20174. "properties": {
  20175. "type": "object",
  20176. "properties": {
  20177. "sessionID": {
  20178. "type": "string",
  20179. "pattern": "^ses",
  20180. "description": "Session ID to navigate to"
  20181. }
  20182. },
  20183. "required": ["sessionID"],
  20184. "additionalProperties": false
  20185. }
  20186. },
  20187. "required": ["type", "properties"],
  20188. "additionalProperties": false
  20189. },
  20190. "Workspace": {
  20191. "type": "object",
  20192. "properties": {
  20193. "id": {
  20194. "type": "string",
  20195. "pattern": "^wrk"
  20196. },
  20197. "type": {
  20198. "type": "string"
  20199. },
  20200. "name": {
  20201. "type": "string"
  20202. },
  20203. "branch": {
  20204. "anyOf": [
  20205. {
  20206. "type": "string"
  20207. },
  20208. {
  20209. "type": "null"
  20210. }
  20211. ]
  20212. },
  20213. "directory": {
  20214. "anyOf": [
  20215. {
  20216. "type": "string"
  20217. },
  20218. {
  20219. "type": "null"
  20220. }
  20221. ]
  20222. },
  20223. "extra": {
  20224. "anyOf": [
  20225. {},
  20226. {
  20227. "type": "null"
  20228. }
  20229. ]
  20230. },
  20231. "projectID": {
  20232. "type": "string"
  20233. },
  20234. "timeUsed": {
  20235. "anyOf": [
  20236. {
  20237. "type": "number"
  20238. },
  20239. {
  20240. "type": "string",
  20241. "enum": ["NaN"]
  20242. },
  20243. {
  20244. "type": "string",
  20245. "enum": ["Infinity"]
  20246. },
  20247. {
  20248. "type": "string",
  20249. "enum": ["-Infinity"]
  20250. },
  20251. {
  20252. "type": "string",
  20253. "enum": ["Infinity", "-Infinity", "NaN"]
  20254. }
  20255. ]
  20256. }
  20257. },
  20258. "required": ["id", "type", "name", "projectID", "timeUsed"],
  20259. "additionalProperties": false
  20260. },
  20261. "WorkspaceCreateError": {
  20262. "type": "object",
  20263. "properties": {
  20264. "name": {
  20265. "type": "string",
  20266. "enum": ["WorkspaceCreateError"]
  20267. },
  20268. "data": {
  20269. "type": "object",
  20270. "properties": {
  20271. "message": {
  20272. "type": "string"
  20273. }
  20274. },
  20275. "required": ["message"],
  20276. "additionalProperties": false
  20277. }
  20278. },
  20279. "required": ["name", "data"],
  20280. "additionalProperties": false
  20281. },
  20282. "WorkspaceWarpError": {
  20283. "type": "object",
  20284. "properties": {
  20285. "name": {
  20286. "type": "string",
  20287. "enum": ["WorkspaceWarpError"]
  20288. },
  20289. "data": {
  20290. "type": "object",
  20291. "properties": {
  20292. "message": {
  20293. "type": "string"
  20294. }
  20295. },
  20296. "required": ["message"],
  20297. "additionalProperties": false
  20298. }
  20299. },
  20300. "required": ["name", "data"],
  20301. "additionalProperties": false
  20302. },
  20303. "UnauthorizedError": {
  20304. "type": "object",
  20305. "properties": {
  20306. "_tag": {
  20307. "type": "string",
  20308. "enum": ["UnauthorizedError"]
  20309. },
  20310. "message": {
  20311. "type": "string"
  20312. }
  20313. },
  20314. "required": ["_tag", "message"],
  20315. "additionalProperties": false
  20316. },
  20317. "V2SessionsResponse": {
  20318. "type": "object",
  20319. "properties": {
  20320. "data": {
  20321. "type": "array",
  20322. "items": {
  20323. "$ref": "#/components/schemas/SessionV2Info"
  20324. }
  20325. },
  20326. "cursor": {
  20327. "type": "object",
  20328. "properties": {
  20329. "previous": {
  20330. "type": "string"
  20331. },
  20332. "next": {
  20333. "type": "string"
  20334. }
  20335. },
  20336. "additionalProperties": false
  20337. }
  20338. },
  20339. "required": ["data", "cursor"],
  20340. "additionalProperties": false
  20341. },
  20342. "InvalidCursorError": {
  20343. "type": "object",
  20344. "properties": {
  20345. "_tag": {
  20346. "type": "string",
  20347. "enum": ["InvalidCursorError"]
  20348. },
  20349. "message": {
  20350. "type": "string"
  20351. }
  20352. },
  20353. "required": ["_tag", "message"],
  20354. "additionalProperties": false
  20355. },
  20356. "ConflictError": {
  20357. "type": "object",
  20358. "properties": {
  20359. "_tag": {
  20360. "type": "string",
  20361. "enum": ["ConflictError"]
  20362. },
  20363. "message": {
  20364. "type": "string"
  20365. },
  20366. "resource": {
  20367. "type": "string"
  20368. }
  20369. },
  20370. "required": ["_tag", "message"],
  20371. "additionalProperties": false
  20372. },
  20373. "SessionNotFoundError": {
  20374. "type": "object",
  20375. "properties": {
  20376. "_tag": {
  20377. "type": "string",
  20378. "enum": ["SessionNotFoundError"]
  20379. },
  20380. "sessionID": {
  20381. "type": "string"
  20382. },
  20383. "message": {
  20384. "type": "string"
  20385. }
  20386. },
  20387. "required": ["_tag", "sessionID", "message"],
  20388. "additionalProperties": false
  20389. },
  20390. "ServiceUnavailableError": {
  20391. "type": "object",
  20392. "properties": {
  20393. "_tag": {
  20394. "type": "string",
  20395. "enum": ["ServiceUnavailableError"]
  20396. },
  20397. "message": {
  20398. "type": "string"
  20399. },
  20400. "service": {
  20401. "type": "string"
  20402. }
  20403. },
  20404. "required": ["_tag", "message"],
  20405. "additionalProperties": false
  20406. },
  20407. "UnknownError1": {
  20408. "type": "object",
  20409. "properties": {
  20410. "_tag": {
  20411. "type": "string",
  20412. "enum": ["UnknownError"]
  20413. },
  20414. "message": {
  20415. "type": "string"
  20416. },
  20417. "ref": {
  20418. "type": "string"
  20419. }
  20420. },
  20421. "required": ["_tag", "message"],
  20422. "additionalProperties": false
  20423. },
  20424. "V2SessionMessagesResponse": {
  20425. "type": "object",
  20426. "properties": {
  20427. "data": {
  20428. "type": "array",
  20429. "items": {
  20430. "$ref": "#/components/schemas/SessionMessage"
  20431. }
  20432. },
  20433. "cursor": {
  20434. "type": "object",
  20435. "properties": {
  20436. "previous": {
  20437. "type": "string"
  20438. },
  20439. "next": {
  20440. "type": "string"
  20441. }
  20442. },
  20443. "additionalProperties": false
  20444. }
  20445. },
  20446. "required": ["data", "cursor"],
  20447. "additionalProperties": false
  20448. },
  20449. "ProviderNotFoundError": {
  20450. "type": "object",
  20451. "properties": {
  20452. "_tag": {
  20453. "type": "string",
  20454. "enum": ["ProviderNotFoundError"]
  20455. },
  20456. "providerID": {
  20457. "type": "string"
  20458. },
  20459. "message": {
  20460. "type": "string"
  20461. }
  20462. },
  20463. "required": ["_tag", "providerID", "message"],
  20464. "additionalProperties": false
  20465. },
  20466. "effect_HttpApiError_Forbidden": {
  20467. "type": "object",
  20468. "properties": {
  20469. "_tag": {
  20470. "type": "string",
  20471. "enum": ["Forbidden"]
  20472. }
  20473. },
  20474. "required": ["_tag"],
  20475. "additionalProperties": false
  20476. },
  20477. "Event.tui.prompt.append": {
  20478. "type": "object",
  20479. "properties": {
  20480. "id": {
  20481. "type": "string",
  20482. "pattern": "^evt_"
  20483. },
  20484. "type": {
  20485. "type": "string",
  20486. "enum": ["tui.prompt.append"]
  20487. },
  20488. "properties": {
  20489. "type": "object",
  20490. "properties": {
  20491. "text": {
  20492. "type": "string"
  20493. }
  20494. },
  20495. "required": ["text"],
  20496. "additionalProperties": false
  20497. }
  20498. },
  20499. "required": ["id", "type", "properties"],
  20500. "additionalProperties": false
  20501. },
  20502. "Event.tui.command.execute": {
  20503. "type": "object",
  20504. "properties": {
  20505. "id": {
  20506. "type": "string",
  20507. "pattern": "^evt_"
  20508. },
  20509. "type": {
  20510. "type": "string",
  20511. "enum": ["tui.command.execute"]
  20512. },
  20513. "properties": {
  20514. "type": "object",
  20515. "properties": {
  20516. "command": {
  20517. "anyOf": [
  20518. {
  20519. "type": "string",
  20520. "enum": [
  20521. "session.list",
  20522. "session.new",
  20523. "session.share",
  20524. "session.interrupt",
  20525. "session.compact",
  20526. "session.page.up",
  20527. "session.page.down",
  20528. "session.line.up",
  20529. "session.line.down",
  20530. "session.half.page.up",
  20531. "session.half.page.down",
  20532. "session.first",
  20533. "session.last",
  20534. "prompt.clear",
  20535. "prompt.submit",
  20536. "agent.cycle"
  20537. ]
  20538. },
  20539. {
  20540. "type": "string"
  20541. }
  20542. ]
  20543. }
  20544. },
  20545. "required": ["command"],
  20546. "additionalProperties": false
  20547. }
  20548. },
  20549. "required": ["id", "type", "properties"],
  20550. "additionalProperties": false
  20551. },
  20552. "Event.tui.toast.show": {
  20553. "type": "object",
  20554. "properties": {
  20555. "id": {
  20556. "type": "string",
  20557. "pattern": "^evt_"
  20558. },
  20559. "type": {
  20560. "type": "string",
  20561. "enum": ["tui.toast.show"]
  20562. },
  20563. "properties": {
  20564. "type": "object",
  20565. "properties": {
  20566. "title": {
  20567. "type": "string"
  20568. },
  20569. "message": {
  20570. "type": "string"
  20571. },
  20572. "variant": {
  20573. "type": "string",
  20574. "enum": ["info", "success", "warning", "error"]
  20575. },
  20576. "duration": {
  20577. "type": "integer",
  20578. "exclusiveMinimum": 0
  20579. }
  20580. },
  20581. "required": ["message", "variant"],
  20582. "additionalProperties": false
  20583. }
  20584. },
  20585. "required": ["id", "type", "properties"],
  20586. "additionalProperties": false
  20587. },
  20588. "Event.tui.session.select": {
  20589. "type": "object",
  20590. "properties": {
  20591. "id": {
  20592. "type": "string",
  20593. "pattern": "^evt_"
  20594. },
  20595. "type": {
  20596. "type": "string",
  20597. "enum": ["tui.session.select"]
  20598. },
  20599. "properties": {
  20600. "type": "object",
  20601. "properties": {
  20602. "sessionID": {
  20603. "type": "string",
  20604. "pattern": "^ses",
  20605. "description": "Session ID to navigate to"
  20606. }
  20607. },
  20608. "required": ["sessionID"],
  20609. "additionalProperties": false
  20610. }
  20611. },
  20612. "required": ["id", "type", "properties"],
  20613. "additionalProperties": false
  20614. },
  20615. "MoveSessionDestination": {
  20616. "type": "object",
  20617. "properties": {
  20618. "directory": {
  20619. "type": "string"
  20620. }
  20621. },
  20622. "required": ["directory"],
  20623. "additionalProperties": false
  20624. },
  20625. "ModelV2Info": {
  20626. "type": "object",
  20627. "properties": {
  20628. "id": {
  20629. "type": "string"
  20630. },
  20631. "providerID": {
  20632. "type": "string"
  20633. },
  20634. "family": {
  20635. "type": "string"
  20636. },
  20637. "name": {
  20638. "type": "string"
  20639. },
  20640. "api": {
  20641. "anyOf": [
  20642. {
  20643. "type": "object",
  20644. "properties": {
  20645. "id": {
  20646. "type": "string"
  20647. },
  20648. "type": {
  20649. "type": "string",
  20650. "enum": ["aisdk"]
  20651. },
  20652. "package": {
  20653. "type": "string"
  20654. },
  20655. "url": {
  20656. "type": "string"
  20657. },
  20658. "settings": {
  20659. "type": "object"
  20660. }
  20661. },
  20662. "required": ["id", "type", "package"],
  20663. "additionalProperties": false
  20664. },
  20665. {
  20666. "type": "object",
  20667. "properties": {
  20668. "id": {
  20669. "type": "string"
  20670. },
  20671. "type": {
  20672. "type": "string",
  20673. "enum": ["native"]
  20674. },
  20675. "url": {
  20676. "type": "string"
  20677. },
  20678. "settings": {
  20679. "type": "object"
  20680. }
  20681. },
  20682. "required": ["id", "type", "settings"],
  20683. "additionalProperties": false
  20684. }
  20685. ]
  20686. },
  20687. "capabilities": {
  20688. "type": "object",
  20689. "properties": {
  20690. "tools": {
  20691. "type": "boolean"
  20692. },
  20693. "input": {
  20694. "type": "array",
  20695. "items": {
  20696. "type": "string"
  20697. }
  20698. },
  20699. "output": {
  20700. "type": "array",
  20701. "items": {
  20702. "type": "string"
  20703. }
  20704. }
  20705. },
  20706. "required": ["tools", "input", "output"],
  20707. "additionalProperties": false
  20708. },
  20709. "request": {
  20710. "type": "object",
  20711. "properties": {
  20712. "headers": {
  20713. "type": "object",
  20714. "additionalProperties": {
  20715. "type": "string"
  20716. }
  20717. },
  20718. "body": {
  20719. "type": "object"
  20720. },
  20721. "variant": {
  20722. "type": "string"
  20723. }
  20724. },
  20725. "required": ["headers", "body"],
  20726. "additionalProperties": false
  20727. },
  20728. "variants": {
  20729. "type": "array",
  20730. "items": {
  20731. "type": "object",
  20732. "properties": {
  20733. "id": {
  20734. "type": "string"
  20735. },
  20736. "headers": {
  20737. "type": "object",
  20738. "additionalProperties": {
  20739. "type": "string"
  20740. }
  20741. },
  20742. "body": {
  20743. "type": "object"
  20744. }
  20745. },
  20746. "required": ["id", "headers", "body"],
  20747. "additionalProperties": false
  20748. }
  20749. },
  20750. "time": {
  20751. "type": "object",
  20752. "properties": {
  20753. "released": {
  20754. "anyOf": [
  20755. {
  20756. "type": "number"
  20757. },
  20758. {
  20759. "type": "string",
  20760. "enum": ["NaN"]
  20761. },
  20762. {
  20763. "type": "string",
  20764. "enum": ["Infinity"]
  20765. },
  20766. {
  20767. "type": "string",
  20768. "enum": ["-Infinity"]
  20769. },
  20770. {
  20771. "type": "string",
  20772. "enum": ["Infinity", "-Infinity", "NaN"]
  20773. }
  20774. ]
  20775. }
  20776. },
  20777. "required": ["released"],
  20778. "additionalProperties": false
  20779. },
  20780. "cost": {
  20781. "type": "array",
  20782. "items": {
  20783. "type": "object",
  20784. "properties": {
  20785. "tier": {
  20786. "type": "object",
  20787. "properties": {
  20788. "type": {
  20789. "type": "string",
  20790. "enum": ["context"]
  20791. },
  20792. "size": {
  20793. "type": "integer"
  20794. }
  20795. },
  20796. "required": ["type", "size"],
  20797. "additionalProperties": false
  20798. },
  20799. "input": {
  20800. "type": "number"
  20801. },
  20802. "output": {
  20803. "type": "number"
  20804. },
  20805. "cache": {
  20806. "type": "object",
  20807. "properties": {
  20808. "read": {
  20809. "type": "number"
  20810. },
  20811. "write": {
  20812. "type": "number"
  20813. }
  20814. },
  20815. "required": ["read", "write"],
  20816. "additionalProperties": false
  20817. }
  20818. },
  20819. "required": ["input", "output", "cache"],
  20820. "additionalProperties": false
  20821. }
  20822. },
  20823. "status": {
  20824. "type": "string",
  20825. "enum": ["alpha", "beta", "deprecated", "active"]
  20826. },
  20827. "enabled": {
  20828. "type": "boolean"
  20829. },
  20830. "limit": {
  20831. "type": "object",
  20832. "properties": {
  20833. "context": {
  20834. "type": "integer"
  20835. },
  20836. "input": {
  20837. "type": "integer"
  20838. },
  20839. "output": {
  20840. "type": "integer"
  20841. }
  20842. },
  20843. "required": ["context", "output"],
  20844. "additionalProperties": false
  20845. }
  20846. },
  20847. "required": [
  20848. "id",
  20849. "providerID",
  20850. "name",
  20851. "api",
  20852. "capabilities",
  20853. "request",
  20854. "variants",
  20855. "time",
  20856. "cost",
  20857. "status",
  20858. "enabled",
  20859. "limit"
  20860. ],
  20861. "additionalProperties": false
  20862. },
  20863. "LocationRef": {
  20864. "type": "object",
  20865. "properties": {
  20866. "directory": {
  20867. "type": "string"
  20868. },
  20869. "workspaceID": {
  20870. "type": "string",
  20871. "pattern": "^wrk"
  20872. }
  20873. },
  20874. "required": ["directory"],
  20875. "additionalProperties": false
  20876. },
  20877. "PromptSource": {
  20878. "type": "object",
  20879. "properties": {
  20880. "start": {
  20881. "type": "number"
  20882. },
  20883. "end": {
  20884. "type": "number"
  20885. },
  20886. "text": {
  20887. "type": "string"
  20888. }
  20889. },
  20890. "required": ["start", "end", "text"],
  20891. "additionalProperties": false
  20892. },
  20893. "PromptFileAttachment": {
  20894. "type": "object",
  20895. "properties": {
  20896. "uri": {
  20897. "type": "string"
  20898. },
  20899. "mime": {
  20900. "type": "string"
  20901. },
  20902. "name": {
  20903. "type": "string"
  20904. },
  20905. "description": {
  20906. "type": "string"
  20907. },
  20908. "source": {
  20909. "$ref": "#/components/schemas/PromptSource"
  20910. }
  20911. },
  20912. "required": ["uri", "mime"],
  20913. "additionalProperties": false
  20914. },
  20915. "PromptAgentAttachment": {
  20916. "type": "object",
  20917. "properties": {
  20918. "name": {
  20919. "type": "string"
  20920. },
  20921. "source": {
  20922. "$ref": "#/components/schemas/PromptSource"
  20923. }
  20924. },
  20925. "required": ["name"],
  20926. "additionalProperties": false
  20927. },
  20928. "PromptReferenceAttachment": {
  20929. "type": "object",
  20930. "properties": {
  20931. "name": {
  20932. "type": "string"
  20933. },
  20934. "kind": {
  20935. "type": "string",
  20936. "enum": ["local", "git", "invalid"]
  20937. },
  20938. "uri": {
  20939. "type": "string"
  20940. },
  20941. "repository": {
  20942. "type": "string"
  20943. },
  20944. "branch": {
  20945. "type": "string"
  20946. },
  20947. "target": {
  20948. "type": "string"
  20949. },
  20950. "targetUri": {
  20951. "type": "string"
  20952. },
  20953. "problem": {
  20954. "type": "string"
  20955. },
  20956. "source": {
  20957. "$ref": "#/components/schemas/PromptSource"
  20958. }
  20959. },
  20960. "required": ["name", "kind"],
  20961. "additionalProperties": false
  20962. },
  20963. "SessionErrorUnknown": {
  20964. "type": "object",
  20965. "properties": {
  20966. "type": {
  20967. "type": "string",
  20968. "enum": ["unknown"]
  20969. },
  20970. "message": {
  20971. "type": "string"
  20972. }
  20973. },
  20974. "required": ["type", "message"],
  20975. "additionalProperties": false
  20976. },
  20977. "ToolTextContent": {
  20978. "type": "object",
  20979. "properties": {
  20980. "type": {
  20981. "type": "string",
  20982. "enum": ["text"]
  20983. },
  20984. "text": {
  20985. "type": "string"
  20986. }
  20987. },
  20988. "required": ["type", "text"],
  20989. "additionalProperties": false
  20990. },
  20991. "ToolFileContent": {
  20992. "type": "object",
  20993. "properties": {
  20994. "type": {
  20995. "type": "string",
  20996. "enum": ["file"]
  20997. },
  20998. "source": {
  20999. "anyOf": [
  21000. {
  21001. "type": "object",
  21002. "properties": {
  21003. "type": {
  21004. "type": "string",
  21005. "enum": ["data"]
  21006. },
  21007. "data": {
  21008. "type": "string"
  21009. }
  21010. },
  21011. "required": ["type", "data"],
  21012. "additionalProperties": false
  21013. },
  21014. {
  21015. "type": "object",
  21016. "properties": {
  21017. "type": {
  21018. "type": "string",
  21019. "enum": ["url"]
  21020. },
  21021. "url": {
  21022. "type": "string"
  21023. }
  21024. },
  21025. "required": ["type", "url"],
  21026. "additionalProperties": false
  21027. },
  21028. {
  21029. "type": "object",
  21030. "properties": {
  21031. "type": {
  21032. "type": "string",
  21033. "enum": ["file"]
  21034. },
  21035. "uri": {
  21036. "type": "string"
  21037. }
  21038. },
  21039. "required": ["type", "uri"],
  21040. "additionalProperties": false
  21041. }
  21042. ]
  21043. },
  21044. "mime": {
  21045. "type": "string"
  21046. },
  21047. "name": {
  21048. "type": "string"
  21049. }
  21050. },
  21051. "required": ["type", "source", "mime"],
  21052. "additionalProperties": false
  21053. },
  21054. "SessionNextRetry_error": {
  21055. "type": "object",
  21056. "properties": {
  21057. "message": {
  21058. "type": "string"
  21059. },
  21060. "statusCode": {
  21061. "type": "number"
  21062. },
  21063. "isRetryable": {
  21064. "type": "boolean"
  21065. },
  21066. "responseHeaders": {
  21067. "type": "object",
  21068. "additionalProperties": {
  21069. "type": "string"
  21070. }
  21071. },
  21072. "responseBody": {
  21073. "type": "string"
  21074. },
  21075. "metadata": {
  21076. "type": "object",
  21077. "additionalProperties": {
  21078. "type": "string"
  21079. }
  21080. }
  21081. },
  21082. "required": ["message", "isRetryable"],
  21083. "additionalProperties": false
  21084. },
  21085. "AuthOAuthCredential": {
  21086. "type": "object",
  21087. "properties": {
  21088. "type": {
  21089. "type": "string",
  21090. "enum": ["oauth"]
  21091. },
  21092. "refresh": {
  21093. "type": "string"
  21094. },
  21095. "access": {
  21096. "type": "string"
  21097. },
  21098. "expires": {
  21099. "type": "integer",
  21100. "minimum": 0
  21101. }
  21102. },
  21103. "required": ["type", "refresh", "access", "expires"],
  21104. "additionalProperties": false
  21105. },
  21106. "AuthApiKeyCredential": {
  21107. "type": "object",
  21108. "properties": {
  21109. "type": {
  21110. "type": "string",
  21111. "enum": ["api"]
  21112. },
  21113. "key": {
  21114. "type": "string"
  21115. },
  21116. "metadata": {
  21117. "type": "object",
  21118. "additionalProperties": {
  21119. "type": "string"
  21120. }
  21121. }
  21122. },
  21123. "required": ["type", "key"],
  21124. "additionalProperties": false
  21125. },
  21126. "AuthCredential": {
  21127. "anyOf": [
  21128. {
  21129. "$ref": "#/components/schemas/AuthOAuthCredential"
  21130. },
  21131. {
  21132. "$ref": "#/components/schemas/AuthApiKeyCredential"
  21133. }
  21134. ]
  21135. },
  21136. "AuthInfo": {
  21137. "type": "object",
  21138. "properties": {
  21139. "id": {
  21140. "type": "string"
  21141. },
  21142. "serviceID": {
  21143. "type": "string"
  21144. },
  21145. "description": {
  21146. "type": "string"
  21147. },
  21148. "credential": {
  21149. "$ref": "#/components/schemas/AuthCredential"
  21150. }
  21151. },
  21152. "required": ["id", "serviceID", "description", "credential"],
  21153. "additionalProperties": false
  21154. },
  21155. "PermissionV2Source": {
  21156. "type": "object",
  21157. "properties": {
  21158. "type": {
  21159. "type": "string",
  21160. "enum": ["tool"]
  21161. },
  21162. "messageID": {
  21163. "type": "string"
  21164. },
  21165. "callID": {
  21166. "type": "string"
  21167. }
  21168. },
  21169. "required": ["type", "messageID", "callID"],
  21170. "additionalProperties": false
  21171. },
  21172. "PermissionV2Reply": {
  21173. "type": "string",
  21174. "enum": ["once", "always", "reject"]
  21175. },
  21176. "QuestionV2Option": {
  21177. "type": "object",
  21178. "properties": {
  21179. "label": {
  21180. "type": "string",
  21181. "description": "Display text (1-5 words, concise)"
  21182. },
  21183. "description": {
  21184. "type": "string",
  21185. "description": "Explanation of choice"
  21186. }
  21187. },
  21188. "required": ["label", "description"],
  21189. "additionalProperties": false
  21190. },
  21191. "QuestionV2Info": {
  21192. "type": "object",
  21193. "properties": {
  21194. "question": {
  21195. "type": "string",
  21196. "description": "Complete question"
  21197. },
  21198. "header": {
  21199. "type": "string",
  21200. "description": "Very short label (max 30 chars)"
  21201. },
  21202. "options": {
  21203. "type": "array",
  21204. "items": {
  21205. "$ref": "#/components/schemas/QuestionV2Option"
  21206. },
  21207. "description": "Available choices"
  21208. },
  21209. "multiple": {
  21210. "type": "boolean"
  21211. },
  21212. "custom": {
  21213. "type": "boolean"
  21214. }
  21215. },
  21216. "required": ["question", "header", "options"],
  21217. "additionalProperties": false
  21218. },
  21219. "QuestionV2Tool": {
  21220. "type": "object",
  21221. "properties": {
  21222. "messageID": {
  21223. "type": "string"
  21224. },
  21225. "callID": {
  21226. "type": "string"
  21227. }
  21228. },
  21229. "required": ["messageID", "callID"],
  21230. "additionalProperties": false
  21231. },
  21232. "QuestionV2Answer": {
  21233. "type": "array",
  21234. "items": {
  21235. "type": "string"
  21236. }
  21237. },
  21238. "EventServerInstanceDisposed": {
  21239. "type": "object",
  21240. "properties": {
  21241. "id": {
  21242. "type": "string"
  21243. },
  21244. "type": {
  21245. "type": "string",
  21246. "enum": ["server.instance.disposed"]
  21247. },
  21248. "properties": {
  21249. "type": "object",
  21250. "properties": {
  21251. "directory": {
  21252. "type": "string"
  21253. }
  21254. },
  21255. "required": ["directory"],
  21256. "additionalProperties": false
  21257. }
  21258. },
  21259. "required": ["id", "type", "properties"],
  21260. "additionalProperties": false
  21261. },
  21262. "SyncEventSessionCreated": {
  21263. "type": "object",
  21264. "properties": {
  21265. "type": {
  21266. "type": "string",
  21267. "enum": ["sync"]
  21268. },
  21269. "id": {
  21270. "type": "string",
  21271. "pattern": "^evt_"
  21272. },
  21273. "syncEvent": {
  21274. "type": "object",
  21275. "properties": {
  21276. "type": {
  21277. "type": "string",
  21278. "enum": ["session.created.1"]
  21279. },
  21280. "id": {
  21281. "type": "string",
  21282. "pattern": "^evt_"
  21283. },
  21284. "seq": {
  21285. "type": "number"
  21286. },
  21287. "aggregateID": {
  21288. "type": "string"
  21289. },
  21290. "data": {
  21291. "type": "object",
  21292. "properties": {
  21293. "sessionID": {
  21294. "type": "string",
  21295. "pattern": "^ses"
  21296. },
  21297. "info": {
  21298. "$ref": "#/components/schemas/Session"
  21299. }
  21300. },
  21301. "required": ["sessionID", "info"],
  21302. "additionalProperties": false
  21303. }
  21304. },
  21305. "required": ["type", "id", "seq", "aggregateID", "data"],
  21306. "additionalProperties": false
  21307. }
  21308. },
  21309. "required": ["type", "id", "syncEvent"],
  21310. "additionalProperties": false
  21311. },
  21312. "SyncEventSessionUpdated": {
  21313. "type": "object",
  21314. "properties": {
  21315. "type": {
  21316. "type": "string",
  21317. "enum": ["sync"]
  21318. },
  21319. "id": {
  21320. "type": "string",
  21321. "pattern": "^evt_"
  21322. },
  21323. "syncEvent": {
  21324. "type": "object",
  21325. "properties": {
  21326. "type": {
  21327. "type": "string",
  21328. "enum": ["session.updated.1"]
  21329. },
  21330. "id": {
  21331. "type": "string",
  21332. "pattern": "^evt_"
  21333. },
  21334. "seq": {
  21335. "type": "number"
  21336. },
  21337. "aggregateID": {
  21338. "type": "string"
  21339. },
  21340. "data": {
  21341. "type": "object",
  21342. "properties": {
  21343. "sessionID": {
  21344. "type": "string",
  21345. "pattern": "^ses"
  21346. },
  21347. "info": {
  21348. "$ref": "#/components/schemas/Session"
  21349. }
  21350. },
  21351. "required": ["sessionID", "info"],
  21352. "additionalProperties": false
  21353. }
  21354. },
  21355. "required": ["type", "id", "seq", "aggregateID", "data"],
  21356. "additionalProperties": false
  21357. }
  21358. },
  21359. "required": ["type", "id", "syncEvent"],
  21360. "additionalProperties": false
  21361. },
  21362. "SyncEventSessionDeleted": {
  21363. "type": "object",
  21364. "properties": {
  21365. "type": {
  21366. "type": "string",
  21367. "enum": ["sync"]
  21368. },
  21369. "id": {
  21370. "type": "string",
  21371. "pattern": "^evt_"
  21372. },
  21373. "syncEvent": {
  21374. "type": "object",
  21375. "properties": {
  21376. "type": {
  21377. "type": "string",
  21378. "enum": ["session.deleted.1"]
  21379. },
  21380. "id": {
  21381. "type": "string",
  21382. "pattern": "^evt_"
  21383. },
  21384. "seq": {
  21385. "type": "number"
  21386. },
  21387. "aggregateID": {
  21388. "type": "string"
  21389. },
  21390. "data": {
  21391. "type": "object",
  21392. "properties": {
  21393. "sessionID": {
  21394. "type": "string",
  21395. "pattern": "^ses"
  21396. },
  21397. "info": {
  21398. "$ref": "#/components/schemas/Session"
  21399. }
  21400. },
  21401. "required": ["sessionID", "info"],
  21402. "additionalProperties": false
  21403. }
  21404. },
  21405. "required": ["type", "id", "seq", "aggregateID", "data"],
  21406. "additionalProperties": false
  21407. }
  21408. },
  21409. "required": ["type", "id", "syncEvent"],
  21410. "additionalProperties": false
  21411. },
  21412. "SyncEventMessageUpdated": {
  21413. "type": "object",
  21414. "properties": {
  21415. "type": {
  21416. "type": "string",
  21417. "enum": ["sync"]
  21418. },
  21419. "id": {
  21420. "type": "string",
  21421. "pattern": "^evt_"
  21422. },
  21423. "syncEvent": {
  21424. "type": "object",
  21425. "properties": {
  21426. "type": {
  21427. "type": "string",
  21428. "enum": ["message.updated.1"]
  21429. },
  21430. "id": {
  21431. "type": "string",
  21432. "pattern": "^evt_"
  21433. },
  21434. "seq": {
  21435. "type": "number"
  21436. },
  21437. "aggregateID": {
  21438. "type": "string"
  21439. },
  21440. "data": {
  21441. "type": "object",
  21442. "properties": {
  21443. "sessionID": {
  21444. "type": "string",
  21445. "pattern": "^ses"
  21446. },
  21447. "info": {
  21448. "$ref": "#/components/schemas/Message"
  21449. }
  21450. },
  21451. "required": ["sessionID", "info"],
  21452. "additionalProperties": false
  21453. }
  21454. },
  21455. "required": ["type", "id", "seq", "aggregateID", "data"],
  21456. "additionalProperties": false
  21457. }
  21458. },
  21459. "required": ["type", "id", "syncEvent"],
  21460. "additionalProperties": false
  21461. },
  21462. "SyncEventMessageRemoved": {
  21463. "type": "object",
  21464. "properties": {
  21465. "type": {
  21466. "type": "string",
  21467. "enum": ["sync"]
  21468. },
  21469. "id": {
  21470. "type": "string",
  21471. "pattern": "^evt_"
  21472. },
  21473. "syncEvent": {
  21474. "type": "object",
  21475. "properties": {
  21476. "type": {
  21477. "type": "string",
  21478. "enum": ["message.removed.1"]
  21479. },
  21480. "id": {
  21481. "type": "string",
  21482. "pattern": "^evt_"
  21483. },
  21484. "seq": {
  21485. "type": "number"
  21486. },
  21487. "aggregateID": {
  21488. "type": "string"
  21489. },
  21490. "data": {
  21491. "type": "object",
  21492. "properties": {
  21493. "sessionID": {
  21494. "type": "string",
  21495. "pattern": "^ses"
  21496. },
  21497. "messageID": {
  21498. "type": "string",
  21499. "pattern": "^msg"
  21500. }
  21501. },
  21502. "required": ["sessionID", "messageID"],
  21503. "additionalProperties": false
  21504. }
  21505. },
  21506. "required": ["type", "id", "seq", "aggregateID", "data"],
  21507. "additionalProperties": false
  21508. }
  21509. },
  21510. "required": ["type", "id", "syncEvent"],
  21511. "additionalProperties": false
  21512. },
  21513. "SyncEventMessagePartUpdated": {
  21514. "type": "object",
  21515. "properties": {
  21516. "type": {
  21517. "type": "string",
  21518. "enum": ["sync"]
  21519. },
  21520. "id": {
  21521. "type": "string",
  21522. "pattern": "^evt_"
  21523. },
  21524. "syncEvent": {
  21525. "type": "object",
  21526. "properties": {
  21527. "type": {
  21528. "type": "string",
  21529. "enum": ["message.part.updated.1"]
  21530. },
  21531. "id": {
  21532. "type": "string",
  21533. "pattern": "^evt_"
  21534. },
  21535. "seq": {
  21536. "type": "number"
  21537. },
  21538. "aggregateID": {
  21539. "type": "string"
  21540. },
  21541. "data": {
  21542. "type": "object",
  21543. "properties": {
  21544. "sessionID": {
  21545. "type": "string",
  21546. "pattern": "^ses"
  21547. },
  21548. "part": {
  21549. "$ref": "#/components/schemas/Part"
  21550. },
  21551. "time": {
  21552. "type": "number"
  21553. }
  21554. },
  21555. "required": ["sessionID", "part", "time"],
  21556. "additionalProperties": false
  21557. }
  21558. },
  21559. "required": ["type", "id", "seq", "aggregateID", "data"],
  21560. "additionalProperties": false
  21561. }
  21562. },
  21563. "required": ["type", "id", "syncEvent"],
  21564. "additionalProperties": false
  21565. },
  21566. "SyncEventMessagePartRemoved": {
  21567. "type": "object",
  21568. "properties": {
  21569. "type": {
  21570. "type": "string",
  21571. "enum": ["sync"]
  21572. },
  21573. "id": {
  21574. "type": "string",
  21575. "pattern": "^evt_"
  21576. },
  21577. "syncEvent": {
  21578. "type": "object",
  21579. "properties": {
  21580. "type": {
  21581. "type": "string",
  21582. "enum": ["message.part.removed.1"]
  21583. },
  21584. "id": {
  21585. "type": "string",
  21586. "pattern": "^evt_"
  21587. },
  21588. "seq": {
  21589. "type": "number"
  21590. },
  21591. "aggregateID": {
  21592. "type": "string"
  21593. },
  21594. "data": {
  21595. "type": "object",
  21596. "properties": {
  21597. "sessionID": {
  21598. "type": "string",
  21599. "pattern": "^ses"
  21600. },
  21601. "messageID": {
  21602. "type": "string",
  21603. "pattern": "^msg"
  21604. },
  21605. "partID": {
  21606. "type": "string",
  21607. "pattern": "^prt"
  21608. }
  21609. },
  21610. "required": ["sessionID", "messageID", "partID"],
  21611. "additionalProperties": false
  21612. }
  21613. },
  21614. "required": ["type", "id", "seq", "aggregateID", "data"],
  21615. "additionalProperties": false
  21616. }
  21617. },
  21618. "required": ["type", "id", "syncEvent"],
  21619. "additionalProperties": false
  21620. },
  21621. "SyncEventSessionNextAgentSwitched": {
  21622. "type": "object",
  21623. "properties": {
  21624. "type": {
  21625. "type": "string",
  21626. "enum": ["sync"]
  21627. },
  21628. "id": {
  21629. "type": "string",
  21630. "pattern": "^evt_"
  21631. },
  21632. "syncEvent": {
  21633. "type": "object",
  21634. "properties": {
  21635. "type": {
  21636. "type": "string",
  21637. "enum": ["session.next.agent.switched.1"]
  21638. },
  21639. "id": {
  21640. "type": "string",
  21641. "pattern": "^evt_"
  21642. },
  21643. "seq": {
  21644. "type": "number"
  21645. },
  21646. "aggregateID": {
  21647. "type": "string"
  21648. },
  21649. "data": {
  21650. "type": "object",
  21651. "properties": {
  21652. "timestamp": {
  21653. "type": "number"
  21654. },
  21655. "sessionID": {
  21656. "type": "string",
  21657. "pattern": "^ses"
  21658. },
  21659. "messageID": {
  21660. "type": "string",
  21661. "pattern": "^msg_"
  21662. },
  21663. "agent": {
  21664. "type": "string"
  21665. }
  21666. },
  21667. "required": ["timestamp", "sessionID", "messageID", "agent"],
  21668. "additionalProperties": false
  21669. }
  21670. },
  21671. "required": ["type", "id", "seq", "aggregateID", "data"],
  21672. "additionalProperties": false
  21673. }
  21674. },
  21675. "required": ["type", "id", "syncEvent"],
  21676. "additionalProperties": false
  21677. },
  21678. "SyncEventSessionNextModelSwitched": {
  21679. "type": "object",
  21680. "properties": {
  21681. "type": {
  21682. "type": "string",
  21683. "enum": ["sync"]
  21684. },
  21685. "id": {
  21686. "type": "string",
  21687. "pattern": "^evt_"
  21688. },
  21689. "syncEvent": {
  21690. "type": "object",
  21691. "properties": {
  21692. "type": {
  21693. "type": "string",
  21694. "enum": ["session.next.model.switched.1"]
  21695. },
  21696. "id": {
  21697. "type": "string",
  21698. "pattern": "^evt_"
  21699. },
  21700. "seq": {
  21701. "type": "number"
  21702. },
  21703. "aggregateID": {
  21704. "type": "string"
  21705. },
  21706. "data": {
  21707. "type": "object",
  21708. "properties": {
  21709. "timestamp": {
  21710. "type": "number"
  21711. },
  21712. "sessionID": {
  21713. "type": "string",
  21714. "pattern": "^ses"
  21715. },
  21716. "messageID": {
  21717. "type": "string",
  21718. "pattern": "^msg_"
  21719. },
  21720. "model": {
  21721. "type": "object",
  21722. "properties": {
  21723. "id": {
  21724. "type": "string"
  21725. },
  21726. "providerID": {
  21727. "type": "string"
  21728. },
  21729. "variant": {
  21730. "type": "string"
  21731. }
  21732. },
  21733. "required": ["id", "providerID"],
  21734. "additionalProperties": false
  21735. }
  21736. },
  21737. "required": ["timestamp", "sessionID", "messageID", "model"],
  21738. "additionalProperties": false
  21739. }
  21740. },
  21741. "required": ["type", "id", "seq", "aggregateID", "data"],
  21742. "additionalProperties": false
  21743. }
  21744. },
  21745. "required": ["type", "id", "syncEvent"],
  21746. "additionalProperties": false
  21747. },
  21748. "SyncEventSessionNextMoved": {
  21749. "type": "object",
  21750. "properties": {
  21751. "type": {
  21752. "type": "string",
  21753. "enum": ["sync"]
  21754. },
  21755. "id": {
  21756. "type": "string",
  21757. "pattern": "^evt_"
  21758. },
  21759. "syncEvent": {
  21760. "type": "object",
  21761. "properties": {
  21762. "type": {
  21763. "type": "string",
  21764. "enum": ["session.next.moved.1"]
  21765. },
  21766. "id": {
  21767. "type": "string",
  21768. "pattern": "^evt_"
  21769. },
  21770. "seq": {
  21771. "type": "number"
  21772. },
  21773. "aggregateID": {
  21774. "type": "string"
  21775. },
  21776. "data": {
  21777. "type": "object",
  21778. "properties": {
  21779. "timestamp": {
  21780. "type": "number"
  21781. },
  21782. "sessionID": {
  21783. "type": "string",
  21784. "pattern": "^ses"
  21785. },
  21786. "location": {
  21787. "$ref": "#/components/schemas/LocationRef"
  21788. },
  21789. "subdirectory": {
  21790. "type": "string"
  21791. }
  21792. },
  21793. "required": ["timestamp", "sessionID", "location"],
  21794. "additionalProperties": false
  21795. }
  21796. },
  21797. "required": ["type", "id", "seq", "aggregateID", "data"],
  21798. "additionalProperties": false
  21799. }
  21800. },
  21801. "required": ["type", "id", "syncEvent"],
  21802. "additionalProperties": false
  21803. },
  21804. "SyncEventSessionNextPrompted": {
  21805. "type": "object",
  21806. "properties": {
  21807. "type": {
  21808. "type": "string",
  21809. "enum": ["sync"]
  21810. },
  21811. "id": {
  21812. "type": "string",
  21813. "pattern": "^evt_"
  21814. },
  21815. "syncEvent": {
  21816. "type": "object",
  21817. "properties": {
  21818. "type": {
  21819. "type": "string",
  21820. "enum": ["session.next.prompted.1"]
  21821. },
  21822. "id": {
  21823. "type": "string",
  21824. "pattern": "^evt_"
  21825. },
  21826. "seq": {
  21827. "type": "number"
  21828. },
  21829. "aggregateID": {
  21830. "type": "string"
  21831. },
  21832. "data": {
  21833. "type": "object",
  21834. "properties": {
  21835. "timestamp": {
  21836. "type": "number"
  21837. },
  21838. "sessionID": {
  21839. "type": "string",
  21840. "pattern": "^ses"
  21841. },
  21842. "messageID": {
  21843. "type": "string",
  21844. "pattern": "^msg_"
  21845. },
  21846. "prompt": {
  21847. "$ref": "#/components/schemas/Prompt"
  21848. },
  21849. "delivery": {
  21850. "type": "string",
  21851. "enum": ["steer", "queue"]
  21852. }
  21853. },
  21854. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  21855. "additionalProperties": false
  21856. }
  21857. },
  21858. "required": ["type", "id", "seq", "aggregateID", "data"],
  21859. "additionalProperties": false
  21860. }
  21861. },
  21862. "required": ["type", "id", "syncEvent"],
  21863. "additionalProperties": false
  21864. },
  21865. "SyncEventSessionNextPromptAdmitted": {
  21866. "type": "object",
  21867. "properties": {
  21868. "type": {
  21869. "type": "string",
  21870. "enum": ["sync"]
  21871. },
  21872. "id": {
  21873. "type": "string",
  21874. "pattern": "^evt_"
  21875. },
  21876. "syncEvent": {
  21877. "type": "object",
  21878. "properties": {
  21879. "type": {
  21880. "type": "string",
  21881. "enum": ["session.next.prompt.admitted.1"]
  21882. },
  21883. "id": {
  21884. "type": "string",
  21885. "pattern": "^evt_"
  21886. },
  21887. "seq": {
  21888. "type": "number"
  21889. },
  21890. "aggregateID": {
  21891. "type": "string"
  21892. },
  21893. "data": {
  21894. "type": "object",
  21895. "properties": {
  21896. "timestamp": {
  21897. "type": "number"
  21898. },
  21899. "sessionID": {
  21900. "type": "string",
  21901. "pattern": "^ses"
  21902. },
  21903. "messageID": {
  21904. "type": "string",
  21905. "pattern": "^msg_"
  21906. },
  21907. "prompt": {
  21908. "$ref": "#/components/schemas/Prompt"
  21909. },
  21910. "delivery": {
  21911. "type": "string",
  21912. "enum": ["steer", "queue"]
  21913. }
  21914. },
  21915. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  21916. "additionalProperties": false
  21917. }
  21918. },
  21919. "required": ["type", "id", "seq", "aggregateID", "data"],
  21920. "additionalProperties": false
  21921. }
  21922. },
  21923. "required": ["type", "id", "syncEvent"],
  21924. "additionalProperties": false
  21925. },
  21926. "SyncEventSessionNextPromptPromoted": {
  21927. "type": "object",
  21928. "properties": {
  21929. "type": {
  21930. "type": "string",
  21931. "enum": ["sync"]
  21932. },
  21933. "id": {
  21934. "type": "string",
  21935. "pattern": "^evt_"
  21936. },
  21937. "syncEvent": {
  21938. "type": "object",
  21939. "properties": {
  21940. "type": {
  21941. "type": "string",
  21942. "enum": ["session.next.prompt.promoted.1"]
  21943. },
  21944. "id": {
  21945. "type": "string",
  21946. "pattern": "^evt_"
  21947. },
  21948. "seq": {
  21949. "type": "number"
  21950. },
  21951. "aggregateID": {
  21952. "type": "string"
  21953. },
  21954. "data": {
  21955. "type": "object",
  21956. "properties": {
  21957. "timestamp": {
  21958. "type": "number"
  21959. },
  21960. "sessionID": {
  21961. "type": "string",
  21962. "pattern": "^ses"
  21963. },
  21964. "messageID": {
  21965. "type": "string",
  21966. "pattern": "^msg_"
  21967. },
  21968. "prompt": {
  21969. "$ref": "#/components/schemas/Prompt"
  21970. },
  21971. "timeCreated": {
  21972. "type": "number"
  21973. }
  21974. },
  21975. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  21976. "additionalProperties": false
  21977. }
  21978. },
  21979. "required": ["type", "id", "seq", "aggregateID", "data"],
  21980. "additionalProperties": false
  21981. }
  21982. },
  21983. "required": ["type", "id", "syncEvent"],
  21984. "additionalProperties": false
  21985. },
  21986. "SyncEventSessionNextContextUpdated": {
  21987. "type": "object",
  21988. "properties": {
  21989. "type": {
  21990. "type": "string",
  21991. "enum": ["sync"]
  21992. },
  21993. "id": {
  21994. "type": "string",
  21995. "pattern": "^evt_"
  21996. },
  21997. "syncEvent": {
  21998. "type": "object",
  21999. "properties": {
  22000. "type": {
  22001. "type": "string",
  22002. "enum": ["session.next.context.updated.1"]
  22003. },
  22004. "id": {
  22005. "type": "string",
  22006. "pattern": "^evt_"
  22007. },
  22008. "seq": {
  22009. "type": "number"
  22010. },
  22011. "aggregateID": {
  22012. "type": "string"
  22013. },
  22014. "data": {
  22015. "type": "object",
  22016. "properties": {
  22017. "timestamp": {
  22018. "type": "number"
  22019. },
  22020. "sessionID": {
  22021. "type": "string",
  22022. "pattern": "^ses"
  22023. },
  22024. "messageID": {
  22025. "type": "string",
  22026. "pattern": "^msg_"
  22027. },
  22028. "text": {
  22029. "type": "string"
  22030. }
  22031. },
  22032. "required": ["timestamp", "sessionID", "messageID", "text"],
  22033. "additionalProperties": false
  22034. }
  22035. },
  22036. "required": ["type", "id", "seq", "aggregateID", "data"],
  22037. "additionalProperties": false
  22038. }
  22039. },
  22040. "required": ["type", "id", "syncEvent"],
  22041. "additionalProperties": false
  22042. },
  22043. "SyncEventSessionNextSynthetic": {
  22044. "type": "object",
  22045. "properties": {
  22046. "type": {
  22047. "type": "string",
  22048. "enum": ["sync"]
  22049. },
  22050. "id": {
  22051. "type": "string",
  22052. "pattern": "^evt_"
  22053. },
  22054. "syncEvent": {
  22055. "type": "object",
  22056. "properties": {
  22057. "type": {
  22058. "type": "string",
  22059. "enum": ["session.next.synthetic.1"]
  22060. },
  22061. "id": {
  22062. "type": "string",
  22063. "pattern": "^evt_"
  22064. },
  22065. "seq": {
  22066. "type": "number"
  22067. },
  22068. "aggregateID": {
  22069. "type": "string"
  22070. },
  22071. "data": {
  22072. "type": "object",
  22073. "properties": {
  22074. "timestamp": {
  22075. "type": "number"
  22076. },
  22077. "sessionID": {
  22078. "type": "string",
  22079. "pattern": "^ses"
  22080. },
  22081. "messageID": {
  22082. "type": "string",
  22083. "pattern": "^msg_"
  22084. },
  22085. "text": {
  22086. "type": "string"
  22087. }
  22088. },
  22089. "required": ["timestamp", "sessionID", "messageID", "text"],
  22090. "additionalProperties": false
  22091. }
  22092. },
  22093. "required": ["type", "id", "seq", "aggregateID", "data"],
  22094. "additionalProperties": false
  22095. }
  22096. },
  22097. "required": ["type", "id", "syncEvent"],
  22098. "additionalProperties": false
  22099. },
  22100. "SyncEventSessionNextShellStarted": {
  22101. "type": "object",
  22102. "properties": {
  22103. "type": {
  22104. "type": "string",
  22105. "enum": ["sync"]
  22106. },
  22107. "id": {
  22108. "type": "string",
  22109. "pattern": "^evt_"
  22110. },
  22111. "syncEvent": {
  22112. "type": "object",
  22113. "properties": {
  22114. "type": {
  22115. "type": "string",
  22116. "enum": ["session.next.shell.started.1"]
  22117. },
  22118. "id": {
  22119. "type": "string",
  22120. "pattern": "^evt_"
  22121. },
  22122. "seq": {
  22123. "type": "number"
  22124. },
  22125. "aggregateID": {
  22126. "type": "string"
  22127. },
  22128. "data": {
  22129. "type": "object",
  22130. "properties": {
  22131. "timestamp": {
  22132. "type": "number"
  22133. },
  22134. "sessionID": {
  22135. "type": "string",
  22136. "pattern": "^ses"
  22137. },
  22138. "messageID": {
  22139. "type": "string",
  22140. "pattern": "^msg_"
  22141. },
  22142. "callID": {
  22143. "type": "string"
  22144. },
  22145. "command": {
  22146. "type": "string"
  22147. }
  22148. },
  22149. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  22150. "additionalProperties": false
  22151. }
  22152. },
  22153. "required": ["type", "id", "seq", "aggregateID", "data"],
  22154. "additionalProperties": false
  22155. }
  22156. },
  22157. "required": ["type", "id", "syncEvent"],
  22158. "additionalProperties": false
  22159. },
  22160. "SyncEventSessionNextShellEnded": {
  22161. "type": "object",
  22162. "properties": {
  22163. "type": {
  22164. "type": "string",
  22165. "enum": ["sync"]
  22166. },
  22167. "id": {
  22168. "type": "string",
  22169. "pattern": "^evt_"
  22170. },
  22171. "syncEvent": {
  22172. "type": "object",
  22173. "properties": {
  22174. "type": {
  22175. "type": "string",
  22176. "enum": ["session.next.shell.ended.1"]
  22177. },
  22178. "id": {
  22179. "type": "string",
  22180. "pattern": "^evt_"
  22181. },
  22182. "seq": {
  22183. "type": "number"
  22184. },
  22185. "aggregateID": {
  22186. "type": "string"
  22187. },
  22188. "data": {
  22189. "type": "object",
  22190. "properties": {
  22191. "timestamp": {
  22192. "type": "number"
  22193. },
  22194. "sessionID": {
  22195. "type": "string",
  22196. "pattern": "^ses"
  22197. },
  22198. "callID": {
  22199. "type": "string"
  22200. },
  22201. "output": {
  22202. "type": "string"
  22203. }
  22204. },
  22205. "required": ["timestamp", "sessionID", "callID", "output"],
  22206. "additionalProperties": false
  22207. }
  22208. },
  22209. "required": ["type", "id", "seq", "aggregateID", "data"],
  22210. "additionalProperties": false
  22211. }
  22212. },
  22213. "required": ["type", "id", "syncEvent"],
  22214. "additionalProperties": false
  22215. },
  22216. "SyncEventSessionNextStepStarted": {
  22217. "type": "object",
  22218. "properties": {
  22219. "type": {
  22220. "type": "string",
  22221. "enum": ["sync"]
  22222. },
  22223. "id": {
  22224. "type": "string",
  22225. "pattern": "^evt_"
  22226. },
  22227. "syncEvent": {
  22228. "type": "object",
  22229. "properties": {
  22230. "type": {
  22231. "type": "string",
  22232. "enum": ["session.next.step.started.1"]
  22233. },
  22234. "id": {
  22235. "type": "string",
  22236. "pattern": "^evt_"
  22237. },
  22238. "seq": {
  22239. "type": "number"
  22240. },
  22241. "aggregateID": {
  22242. "type": "string"
  22243. },
  22244. "data": {
  22245. "type": "object",
  22246. "properties": {
  22247. "timestamp": {
  22248. "type": "number"
  22249. },
  22250. "sessionID": {
  22251. "type": "string",
  22252. "pattern": "^ses"
  22253. },
  22254. "assistantMessageID": {
  22255. "type": "string",
  22256. "pattern": "^msg_"
  22257. },
  22258. "agent": {
  22259. "type": "string"
  22260. },
  22261. "model": {
  22262. "type": "object",
  22263. "properties": {
  22264. "id": {
  22265. "type": "string"
  22266. },
  22267. "providerID": {
  22268. "type": "string"
  22269. },
  22270. "variant": {
  22271. "type": "string"
  22272. }
  22273. },
  22274. "required": ["id", "providerID"],
  22275. "additionalProperties": false
  22276. },
  22277. "snapshot": {
  22278. "type": "string"
  22279. }
  22280. },
  22281. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  22282. "additionalProperties": false
  22283. }
  22284. },
  22285. "required": ["type", "id", "seq", "aggregateID", "data"],
  22286. "additionalProperties": false
  22287. }
  22288. },
  22289. "required": ["type", "id", "syncEvent"],
  22290. "additionalProperties": false
  22291. },
  22292. "SyncEventSessionNextStepEnded": {
  22293. "type": "object",
  22294. "properties": {
  22295. "type": {
  22296. "type": "string",
  22297. "enum": ["sync"]
  22298. },
  22299. "id": {
  22300. "type": "string",
  22301. "pattern": "^evt_"
  22302. },
  22303. "syncEvent": {
  22304. "type": "object",
  22305. "properties": {
  22306. "type": {
  22307. "type": "string",
  22308. "enum": ["session.next.step.ended.2"]
  22309. },
  22310. "id": {
  22311. "type": "string",
  22312. "pattern": "^evt_"
  22313. },
  22314. "seq": {
  22315. "type": "number"
  22316. },
  22317. "aggregateID": {
  22318. "type": "string"
  22319. },
  22320. "data": {
  22321. "type": "object",
  22322. "properties": {
  22323. "timestamp": {
  22324. "type": "number"
  22325. },
  22326. "sessionID": {
  22327. "type": "string",
  22328. "pattern": "^ses"
  22329. },
  22330. "assistantMessageID": {
  22331. "type": "string",
  22332. "pattern": "^msg_"
  22333. },
  22334. "finish": {
  22335. "type": "string"
  22336. },
  22337. "cost": {
  22338. "type": "number"
  22339. },
  22340. "tokens": {
  22341. "type": "object",
  22342. "properties": {
  22343. "input": {
  22344. "type": "number"
  22345. },
  22346. "output": {
  22347. "type": "number"
  22348. },
  22349. "reasoning": {
  22350. "type": "number"
  22351. },
  22352. "cache": {
  22353. "type": "object",
  22354. "properties": {
  22355. "read": {
  22356. "type": "number"
  22357. },
  22358. "write": {
  22359. "type": "number"
  22360. }
  22361. },
  22362. "required": ["read", "write"],
  22363. "additionalProperties": false
  22364. }
  22365. },
  22366. "required": ["input", "output", "reasoning", "cache"],
  22367. "additionalProperties": false
  22368. },
  22369. "snapshot": {
  22370. "type": "string"
  22371. }
  22372. },
  22373. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  22374. "additionalProperties": false
  22375. }
  22376. },
  22377. "required": ["type", "id", "seq", "aggregateID", "data"],
  22378. "additionalProperties": false
  22379. }
  22380. },
  22381. "required": ["type", "id", "syncEvent"],
  22382. "additionalProperties": false
  22383. },
  22384. "SyncEventSessionNextStepFailed": {
  22385. "type": "object",
  22386. "properties": {
  22387. "type": {
  22388. "type": "string",
  22389. "enum": ["sync"]
  22390. },
  22391. "id": {
  22392. "type": "string",
  22393. "pattern": "^evt_"
  22394. },
  22395. "syncEvent": {
  22396. "type": "object",
  22397. "properties": {
  22398. "type": {
  22399. "type": "string",
  22400. "enum": ["session.next.step.failed.2"]
  22401. },
  22402. "id": {
  22403. "type": "string",
  22404. "pattern": "^evt_"
  22405. },
  22406. "seq": {
  22407. "type": "number"
  22408. },
  22409. "aggregateID": {
  22410. "type": "string"
  22411. },
  22412. "data": {
  22413. "type": "object",
  22414. "properties": {
  22415. "timestamp": {
  22416. "type": "number"
  22417. },
  22418. "sessionID": {
  22419. "type": "string",
  22420. "pattern": "^ses"
  22421. },
  22422. "assistantMessageID": {
  22423. "type": "string",
  22424. "pattern": "^msg_"
  22425. },
  22426. "error": {
  22427. "$ref": "#/components/schemas/SessionErrorUnknown"
  22428. }
  22429. },
  22430. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  22431. "additionalProperties": false
  22432. }
  22433. },
  22434. "required": ["type", "id", "seq", "aggregateID", "data"],
  22435. "additionalProperties": false
  22436. }
  22437. },
  22438. "required": ["type", "id", "syncEvent"],
  22439. "additionalProperties": false
  22440. },
  22441. "SyncEventSessionNextTextStarted": {
  22442. "type": "object",
  22443. "properties": {
  22444. "type": {
  22445. "type": "string",
  22446. "enum": ["sync"]
  22447. },
  22448. "id": {
  22449. "type": "string",
  22450. "pattern": "^evt_"
  22451. },
  22452. "syncEvent": {
  22453. "type": "object",
  22454. "properties": {
  22455. "type": {
  22456. "type": "string",
  22457. "enum": ["session.next.text.started.1"]
  22458. },
  22459. "id": {
  22460. "type": "string",
  22461. "pattern": "^evt_"
  22462. },
  22463. "seq": {
  22464. "type": "number"
  22465. },
  22466. "aggregateID": {
  22467. "type": "string"
  22468. },
  22469. "data": {
  22470. "type": "object",
  22471. "properties": {
  22472. "timestamp": {
  22473. "type": "number"
  22474. },
  22475. "sessionID": {
  22476. "type": "string",
  22477. "pattern": "^ses"
  22478. },
  22479. "assistantMessageID": {
  22480. "type": "string",
  22481. "pattern": "^msg_"
  22482. },
  22483. "textID": {
  22484. "type": "string"
  22485. }
  22486. },
  22487. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  22488. "additionalProperties": false
  22489. }
  22490. },
  22491. "required": ["type", "id", "seq", "aggregateID", "data"],
  22492. "additionalProperties": false
  22493. }
  22494. },
  22495. "required": ["type", "id", "syncEvent"],
  22496. "additionalProperties": false
  22497. },
  22498. "SyncEventSessionNextTextEnded": {
  22499. "type": "object",
  22500. "properties": {
  22501. "type": {
  22502. "type": "string",
  22503. "enum": ["sync"]
  22504. },
  22505. "id": {
  22506. "type": "string",
  22507. "pattern": "^evt_"
  22508. },
  22509. "syncEvent": {
  22510. "type": "object",
  22511. "properties": {
  22512. "type": {
  22513. "type": "string",
  22514. "enum": ["session.next.text.ended.1"]
  22515. },
  22516. "id": {
  22517. "type": "string",
  22518. "pattern": "^evt_"
  22519. },
  22520. "seq": {
  22521. "type": "number"
  22522. },
  22523. "aggregateID": {
  22524. "type": "string"
  22525. },
  22526. "data": {
  22527. "type": "object",
  22528. "properties": {
  22529. "timestamp": {
  22530. "type": "number"
  22531. },
  22532. "sessionID": {
  22533. "type": "string",
  22534. "pattern": "^ses"
  22535. },
  22536. "assistantMessageID": {
  22537. "type": "string",
  22538. "pattern": "^msg_"
  22539. },
  22540. "textID": {
  22541. "type": "string"
  22542. },
  22543. "text": {
  22544. "type": "string"
  22545. }
  22546. },
  22547. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  22548. "additionalProperties": false
  22549. }
  22550. },
  22551. "required": ["type", "id", "seq", "aggregateID", "data"],
  22552. "additionalProperties": false
  22553. }
  22554. },
  22555. "required": ["type", "id", "syncEvent"],
  22556. "additionalProperties": false
  22557. },
  22558. "SyncEventSessionNextReasoningStarted": {
  22559. "type": "object",
  22560. "properties": {
  22561. "type": {
  22562. "type": "string",
  22563. "enum": ["sync"]
  22564. },
  22565. "id": {
  22566. "type": "string",
  22567. "pattern": "^evt_"
  22568. },
  22569. "syncEvent": {
  22570. "type": "object",
  22571. "properties": {
  22572. "type": {
  22573. "type": "string",
  22574. "enum": ["session.next.reasoning.started.1"]
  22575. },
  22576. "id": {
  22577. "type": "string",
  22578. "pattern": "^evt_"
  22579. },
  22580. "seq": {
  22581. "type": "number"
  22582. },
  22583. "aggregateID": {
  22584. "type": "string"
  22585. },
  22586. "data": {
  22587. "type": "object",
  22588. "properties": {
  22589. "timestamp": {
  22590. "type": "number"
  22591. },
  22592. "sessionID": {
  22593. "type": "string",
  22594. "pattern": "^ses"
  22595. },
  22596. "assistantMessageID": {
  22597. "type": "string",
  22598. "pattern": "^msg_"
  22599. },
  22600. "reasoningID": {
  22601. "type": "string"
  22602. },
  22603. "providerMetadata": {
  22604. "type": "object",
  22605. "additionalProperties": {
  22606. "type": "object"
  22607. }
  22608. }
  22609. },
  22610. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  22611. "additionalProperties": false
  22612. }
  22613. },
  22614. "required": ["type", "id", "seq", "aggregateID", "data"],
  22615. "additionalProperties": false
  22616. }
  22617. },
  22618. "required": ["type", "id", "syncEvent"],
  22619. "additionalProperties": false
  22620. },
  22621. "SyncEventSessionNextReasoningEnded": {
  22622. "type": "object",
  22623. "properties": {
  22624. "type": {
  22625. "type": "string",
  22626. "enum": ["sync"]
  22627. },
  22628. "id": {
  22629. "type": "string",
  22630. "pattern": "^evt_"
  22631. },
  22632. "syncEvent": {
  22633. "type": "object",
  22634. "properties": {
  22635. "type": {
  22636. "type": "string",
  22637. "enum": ["session.next.reasoning.ended.1"]
  22638. },
  22639. "id": {
  22640. "type": "string",
  22641. "pattern": "^evt_"
  22642. },
  22643. "seq": {
  22644. "type": "number"
  22645. },
  22646. "aggregateID": {
  22647. "type": "string"
  22648. },
  22649. "data": {
  22650. "type": "object",
  22651. "properties": {
  22652. "timestamp": {
  22653. "type": "number"
  22654. },
  22655. "sessionID": {
  22656. "type": "string",
  22657. "pattern": "^ses"
  22658. },
  22659. "assistantMessageID": {
  22660. "type": "string",
  22661. "pattern": "^msg_"
  22662. },
  22663. "reasoningID": {
  22664. "type": "string"
  22665. },
  22666. "text": {
  22667. "type": "string"
  22668. },
  22669. "providerMetadata": {
  22670. "type": "object",
  22671. "additionalProperties": {
  22672. "type": "object"
  22673. }
  22674. }
  22675. },
  22676. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  22677. "additionalProperties": false
  22678. }
  22679. },
  22680. "required": ["type", "id", "seq", "aggregateID", "data"],
  22681. "additionalProperties": false
  22682. }
  22683. },
  22684. "required": ["type", "id", "syncEvent"],
  22685. "additionalProperties": false
  22686. },
  22687. "SyncEventSessionNextToolInputStarted": {
  22688. "type": "object",
  22689. "properties": {
  22690. "type": {
  22691. "type": "string",
  22692. "enum": ["sync"]
  22693. },
  22694. "id": {
  22695. "type": "string",
  22696. "pattern": "^evt_"
  22697. },
  22698. "syncEvent": {
  22699. "type": "object",
  22700. "properties": {
  22701. "type": {
  22702. "type": "string",
  22703. "enum": ["session.next.tool.input.started.1"]
  22704. },
  22705. "id": {
  22706. "type": "string",
  22707. "pattern": "^evt_"
  22708. },
  22709. "seq": {
  22710. "type": "number"
  22711. },
  22712. "aggregateID": {
  22713. "type": "string"
  22714. },
  22715. "data": {
  22716. "type": "object",
  22717. "properties": {
  22718. "timestamp": {
  22719. "type": "number"
  22720. },
  22721. "sessionID": {
  22722. "type": "string",
  22723. "pattern": "^ses"
  22724. },
  22725. "assistantMessageID": {
  22726. "type": "string",
  22727. "pattern": "^msg_"
  22728. },
  22729. "callID": {
  22730. "type": "string"
  22731. },
  22732. "name": {
  22733. "type": "string"
  22734. }
  22735. },
  22736. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  22737. "additionalProperties": false
  22738. }
  22739. },
  22740. "required": ["type", "id", "seq", "aggregateID", "data"],
  22741. "additionalProperties": false
  22742. }
  22743. },
  22744. "required": ["type", "id", "syncEvent"],
  22745. "additionalProperties": false
  22746. },
  22747. "SyncEventSessionNextToolInputEnded": {
  22748. "type": "object",
  22749. "properties": {
  22750. "type": {
  22751. "type": "string",
  22752. "enum": ["sync"]
  22753. },
  22754. "id": {
  22755. "type": "string",
  22756. "pattern": "^evt_"
  22757. },
  22758. "syncEvent": {
  22759. "type": "object",
  22760. "properties": {
  22761. "type": {
  22762. "type": "string",
  22763. "enum": ["session.next.tool.input.ended.1"]
  22764. },
  22765. "id": {
  22766. "type": "string",
  22767. "pattern": "^evt_"
  22768. },
  22769. "seq": {
  22770. "type": "number"
  22771. },
  22772. "aggregateID": {
  22773. "type": "string"
  22774. },
  22775. "data": {
  22776. "type": "object",
  22777. "properties": {
  22778. "timestamp": {
  22779. "type": "number"
  22780. },
  22781. "sessionID": {
  22782. "type": "string",
  22783. "pattern": "^ses"
  22784. },
  22785. "assistantMessageID": {
  22786. "type": "string",
  22787. "pattern": "^msg_"
  22788. },
  22789. "callID": {
  22790. "type": "string"
  22791. },
  22792. "text": {
  22793. "type": "string"
  22794. }
  22795. },
  22796. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  22797. "additionalProperties": false
  22798. }
  22799. },
  22800. "required": ["type", "id", "seq", "aggregateID", "data"],
  22801. "additionalProperties": false
  22802. }
  22803. },
  22804. "required": ["type", "id", "syncEvent"],
  22805. "additionalProperties": false
  22806. },
  22807. "SyncEventSessionNextToolCalled": {
  22808. "type": "object",
  22809. "properties": {
  22810. "type": {
  22811. "type": "string",
  22812. "enum": ["sync"]
  22813. },
  22814. "id": {
  22815. "type": "string",
  22816. "pattern": "^evt_"
  22817. },
  22818. "syncEvent": {
  22819. "type": "object",
  22820. "properties": {
  22821. "type": {
  22822. "type": "string",
  22823. "enum": ["session.next.tool.called.1"]
  22824. },
  22825. "id": {
  22826. "type": "string",
  22827. "pattern": "^evt_"
  22828. },
  22829. "seq": {
  22830. "type": "number"
  22831. },
  22832. "aggregateID": {
  22833. "type": "string"
  22834. },
  22835. "data": {
  22836. "type": "object",
  22837. "properties": {
  22838. "timestamp": {
  22839. "type": "number"
  22840. },
  22841. "sessionID": {
  22842. "type": "string",
  22843. "pattern": "^ses"
  22844. },
  22845. "assistantMessageID": {
  22846. "type": "string",
  22847. "pattern": "^msg_"
  22848. },
  22849. "callID": {
  22850. "type": "string"
  22851. },
  22852. "tool": {
  22853. "type": "string"
  22854. },
  22855. "input": {
  22856. "type": "object"
  22857. },
  22858. "provider": {
  22859. "type": "object",
  22860. "properties": {
  22861. "executed": {
  22862. "type": "boolean"
  22863. },
  22864. "metadata": {
  22865. "type": "object",
  22866. "additionalProperties": {
  22867. "type": "object"
  22868. }
  22869. }
  22870. },
  22871. "required": ["executed"],
  22872. "additionalProperties": false
  22873. }
  22874. },
  22875. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  22876. "additionalProperties": false
  22877. }
  22878. },
  22879. "required": ["type", "id", "seq", "aggregateID", "data"],
  22880. "additionalProperties": false
  22881. }
  22882. },
  22883. "required": ["type", "id", "syncEvent"],
  22884. "additionalProperties": false
  22885. },
  22886. "SyncEventSessionNextToolProgress": {
  22887. "type": "object",
  22888. "properties": {
  22889. "type": {
  22890. "type": "string",
  22891. "enum": ["sync"]
  22892. },
  22893. "id": {
  22894. "type": "string",
  22895. "pattern": "^evt_"
  22896. },
  22897. "syncEvent": {
  22898. "type": "object",
  22899. "properties": {
  22900. "type": {
  22901. "type": "string",
  22902. "enum": ["session.next.tool.progress.1"]
  22903. },
  22904. "id": {
  22905. "type": "string",
  22906. "pattern": "^evt_"
  22907. },
  22908. "seq": {
  22909. "type": "number"
  22910. },
  22911. "aggregateID": {
  22912. "type": "string"
  22913. },
  22914. "data": {
  22915. "type": "object",
  22916. "properties": {
  22917. "timestamp": {
  22918. "type": "number"
  22919. },
  22920. "sessionID": {
  22921. "type": "string",
  22922. "pattern": "^ses"
  22923. },
  22924. "assistantMessageID": {
  22925. "type": "string",
  22926. "pattern": "^msg_"
  22927. },
  22928. "callID": {
  22929. "type": "string"
  22930. },
  22931. "structured": {
  22932. "type": "object"
  22933. },
  22934. "content": {
  22935. "type": "array",
  22936. "items": {
  22937. "anyOf": [
  22938. {
  22939. "$ref": "#/components/schemas/ToolTextContent"
  22940. },
  22941. {
  22942. "$ref": "#/components/schemas/ToolFileContent"
  22943. }
  22944. ]
  22945. }
  22946. }
  22947. },
  22948. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  22949. "additionalProperties": false
  22950. }
  22951. },
  22952. "required": ["type", "id", "seq", "aggregateID", "data"],
  22953. "additionalProperties": false
  22954. }
  22955. },
  22956. "required": ["type", "id", "syncEvent"],
  22957. "additionalProperties": false
  22958. },
  22959. "SyncEventSessionNextToolSuccess": {
  22960. "type": "object",
  22961. "properties": {
  22962. "type": {
  22963. "type": "string",
  22964. "enum": ["sync"]
  22965. },
  22966. "id": {
  22967. "type": "string",
  22968. "pattern": "^evt_"
  22969. },
  22970. "syncEvent": {
  22971. "type": "object",
  22972. "properties": {
  22973. "type": {
  22974. "type": "string",
  22975. "enum": ["session.next.tool.success.1"]
  22976. },
  22977. "id": {
  22978. "type": "string",
  22979. "pattern": "^evt_"
  22980. },
  22981. "seq": {
  22982. "type": "number"
  22983. },
  22984. "aggregateID": {
  22985. "type": "string"
  22986. },
  22987. "data": {
  22988. "type": "object",
  22989. "properties": {
  22990. "timestamp": {
  22991. "type": "number"
  22992. },
  22993. "sessionID": {
  22994. "type": "string",
  22995. "pattern": "^ses"
  22996. },
  22997. "assistantMessageID": {
  22998. "type": "string",
  22999. "pattern": "^msg_"
  23000. },
  23001. "callID": {
  23002. "type": "string"
  23003. },
  23004. "structured": {
  23005. "type": "object"
  23006. },
  23007. "content": {
  23008. "type": "array",
  23009. "items": {
  23010. "anyOf": [
  23011. {
  23012. "$ref": "#/components/schemas/ToolTextContent"
  23013. },
  23014. {
  23015. "$ref": "#/components/schemas/ToolFileContent"
  23016. }
  23017. ]
  23018. }
  23019. },
  23020. "result": {},
  23021. "provider": {
  23022. "type": "object",
  23023. "properties": {
  23024. "executed": {
  23025. "type": "boolean"
  23026. },
  23027. "metadata": {
  23028. "type": "object",
  23029. "additionalProperties": {
  23030. "type": "object"
  23031. }
  23032. }
  23033. },
  23034. "required": ["executed"],
  23035. "additionalProperties": false
  23036. }
  23037. },
  23038. "required": [
  23039. "timestamp",
  23040. "sessionID",
  23041. "assistantMessageID",
  23042. "callID",
  23043. "structured",
  23044. "content",
  23045. "provider"
  23046. ],
  23047. "additionalProperties": false
  23048. }
  23049. },
  23050. "required": ["type", "id", "seq", "aggregateID", "data"],
  23051. "additionalProperties": false
  23052. }
  23053. },
  23054. "required": ["type", "id", "syncEvent"],
  23055. "additionalProperties": false
  23056. },
  23057. "SyncEventSessionNextToolFailed": {
  23058. "type": "object",
  23059. "properties": {
  23060. "type": {
  23061. "type": "string",
  23062. "enum": ["sync"]
  23063. },
  23064. "id": {
  23065. "type": "string",
  23066. "pattern": "^evt_"
  23067. },
  23068. "syncEvent": {
  23069. "type": "object",
  23070. "properties": {
  23071. "type": {
  23072. "type": "string",
  23073. "enum": ["session.next.tool.failed.1"]
  23074. },
  23075. "id": {
  23076. "type": "string",
  23077. "pattern": "^evt_"
  23078. },
  23079. "seq": {
  23080. "type": "number"
  23081. },
  23082. "aggregateID": {
  23083. "type": "string"
  23084. },
  23085. "data": {
  23086. "type": "object",
  23087. "properties": {
  23088. "timestamp": {
  23089. "type": "number"
  23090. },
  23091. "sessionID": {
  23092. "type": "string",
  23093. "pattern": "^ses"
  23094. },
  23095. "assistantMessageID": {
  23096. "type": "string",
  23097. "pattern": "^msg_"
  23098. },
  23099. "callID": {
  23100. "type": "string"
  23101. },
  23102. "error": {
  23103. "$ref": "#/components/schemas/SessionErrorUnknown"
  23104. },
  23105. "result": {},
  23106. "provider": {
  23107. "type": "object",
  23108. "properties": {
  23109. "executed": {
  23110. "type": "boolean"
  23111. },
  23112. "metadata": {
  23113. "type": "object",
  23114. "additionalProperties": {
  23115. "type": "object"
  23116. }
  23117. }
  23118. },
  23119. "required": ["executed"],
  23120. "additionalProperties": false
  23121. }
  23122. },
  23123. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  23124. "additionalProperties": false
  23125. }
  23126. },
  23127. "required": ["type", "id", "seq", "aggregateID", "data"],
  23128. "additionalProperties": false
  23129. }
  23130. },
  23131. "required": ["type", "id", "syncEvent"],
  23132. "additionalProperties": false
  23133. },
  23134. "SyncEventSessionNextRetried": {
  23135. "type": "object",
  23136. "properties": {
  23137. "type": {
  23138. "type": "string",
  23139. "enum": ["sync"]
  23140. },
  23141. "id": {
  23142. "type": "string",
  23143. "pattern": "^evt_"
  23144. },
  23145. "syncEvent": {
  23146. "type": "object",
  23147. "properties": {
  23148. "type": {
  23149. "type": "string",
  23150. "enum": ["session.next.retried.1"]
  23151. },
  23152. "id": {
  23153. "type": "string",
  23154. "pattern": "^evt_"
  23155. },
  23156. "seq": {
  23157. "type": "number"
  23158. },
  23159. "aggregateID": {
  23160. "type": "string"
  23161. },
  23162. "data": {
  23163. "type": "object",
  23164. "properties": {
  23165. "timestamp": {
  23166. "type": "number"
  23167. },
  23168. "sessionID": {
  23169. "type": "string",
  23170. "pattern": "^ses"
  23171. },
  23172. "attempt": {
  23173. "type": "number"
  23174. },
  23175. "error": {
  23176. "$ref": "#/components/schemas/SessionNextRetry_error"
  23177. }
  23178. },
  23179. "required": ["timestamp", "sessionID", "attempt", "error"],
  23180. "additionalProperties": false
  23181. }
  23182. },
  23183. "required": ["type", "id", "seq", "aggregateID", "data"],
  23184. "additionalProperties": false
  23185. }
  23186. },
  23187. "required": ["type", "id", "syncEvent"],
  23188. "additionalProperties": false
  23189. },
  23190. "SyncEventSessionNextCompactionStarted": {
  23191. "type": "object",
  23192. "properties": {
  23193. "type": {
  23194. "type": "string",
  23195. "enum": ["sync"]
  23196. },
  23197. "id": {
  23198. "type": "string",
  23199. "pattern": "^evt_"
  23200. },
  23201. "syncEvent": {
  23202. "type": "object",
  23203. "properties": {
  23204. "type": {
  23205. "type": "string",
  23206. "enum": ["session.next.compaction.started.1"]
  23207. },
  23208. "id": {
  23209. "type": "string",
  23210. "pattern": "^evt_"
  23211. },
  23212. "seq": {
  23213. "type": "number"
  23214. },
  23215. "aggregateID": {
  23216. "type": "string"
  23217. },
  23218. "data": {
  23219. "type": "object",
  23220. "properties": {
  23221. "timestamp": {
  23222. "type": "number"
  23223. },
  23224. "sessionID": {
  23225. "type": "string",
  23226. "pattern": "^ses"
  23227. },
  23228. "messageID": {
  23229. "type": "string",
  23230. "pattern": "^msg_"
  23231. },
  23232. "reason": {
  23233. "type": "string",
  23234. "enum": ["auto", "manual"]
  23235. }
  23236. },
  23237. "required": ["timestamp", "sessionID", "messageID", "reason"],
  23238. "additionalProperties": false
  23239. }
  23240. },
  23241. "required": ["type", "id", "seq", "aggregateID", "data"],
  23242. "additionalProperties": false
  23243. }
  23244. },
  23245. "required": ["type", "id", "syncEvent"],
  23246. "additionalProperties": false
  23247. },
  23248. "SyncEventSessionNextCompactionDelta": {
  23249. "type": "object",
  23250. "properties": {
  23251. "type": {
  23252. "type": "string",
  23253. "enum": ["sync"]
  23254. },
  23255. "id": {
  23256. "type": "string",
  23257. "pattern": "^evt_"
  23258. },
  23259. "syncEvent": {
  23260. "type": "object",
  23261. "properties": {
  23262. "type": {
  23263. "type": "string",
  23264. "enum": ["session.next.compaction.delta.1"]
  23265. },
  23266. "id": {
  23267. "type": "string",
  23268. "pattern": "^evt_"
  23269. },
  23270. "seq": {
  23271. "type": "number"
  23272. },
  23273. "aggregateID": {
  23274. "type": "string"
  23275. },
  23276. "data": {
  23277. "type": "object",
  23278. "properties": {
  23279. "timestamp": {
  23280. "type": "number"
  23281. },
  23282. "sessionID": {
  23283. "type": "string",
  23284. "pattern": "^ses"
  23285. },
  23286. "text": {
  23287. "type": "string"
  23288. }
  23289. },
  23290. "required": ["timestamp", "sessionID", "text"],
  23291. "additionalProperties": false
  23292. }
  23293. },
  23294. "required": ["type", "id", "seq", "aggregateID", "data"],
  23295. "additionalProperties": false
  23296. }
  23297. },
  23298. "required": ["type", "id", "syncEvent"],
  23299. "additionalProperties": false
  23300. },
  23301. "SyncEventSessionNextCompactionEnded": {
  23302. "type": "object",
  23303. "properties": {
  23304. "type": {
  23305. "type": "string",
  23306. "enum": ["sync"]
  23307. },
  23308. "id": {
  23309. "type": "string",
  23310. "pattern": "^evt_"
  23311. },
  23312. "syncEvent": {
  23313. "type": "object",
  23314. "properties": {
  23315. "type": {
  23316. "type": "string",
  23317. "enum": ["session.next.compaction.ended.1"]
  23318. },
  23319. "id": {
  23320. "type": "string",
  23321. "pattern": "^evt_"
  23322. },
  23323. "seq": {
  23324. "type": "number"
  23325. },
  23326. "aggregateID": {
  23327. "type": "string"
  23328. },
  23329. "data": {
  23330. "type": "object",
  23331. "properties": {
  23332. "timestamp": {
  23333. "type": "number"
  23334. },
  23335. "sessionID": {
  23336. "type": "string",
  23337. "pattern": "^ses"
  23338. },
  23339. "text": {
  23340. "type": "string"
  23341. },
  23342. "include": {
  23343. "type": "string"
  23344. }
  23345. },
  23346. "required": ["timestamp", "sessionID", "text"],
  23347. "additionalProperties": false
  23348. }
  23349. },
  23350. "required": ["type", "id", "seq", "aggregateID", "data"],
  23351. "additionalProperties": false
  23352. }
  23353. },
  23354. "required": ["type", "id", "syncEvent"],
  23355. "additionalProperties": false
  23356. },
  23357. "PolicyEffect": {
  23358. "type": "string",
  23359. "enum": ["allow", "deny"]
  23360. },
  23361. "ConfigV2ExperimentalPolicy": {
  23362. "type": "object",
  23363. "properties": {
  23364. "action": {
  23365. "type": "string",
  23366. "enum": ["provider.use"]
  23367. },
  23368. "effect": {
  23369. "$ref": "#/components/schemas/PolicyEffect"
  23370. },
  23371. "resource": {
  23372. "type": "string"
  23373. }
  23374. },
  23375. "required": ["action", "effect", "resource"],
  23376. "additionalProperties": false
  23377. },
  23378. "ProjectDirectories": {
  23379. "type": "array",
  23380. "items": {
  23381. "type": "string"
  23382. }
  23383. },
  23384. "ProjectCopyCopy": {
  23385. "type": "object",
  23386. "properties": {
  23387. "directory": {
  23388. "type": "string"
  23389. }
  23390. },
  23391. "required": ["directory"],
  23392. "additionalProperties": false
  23393. },
  23394. "LocationInfo": {
  23395. "type": "object",
  23396. "properties": {
  23397. "directory": {
  23398. "type": "string"
  23399. },
  23400. "workspaceID": {
  23401. "type": "string",
  23402. "pattern": "^wrk"
  23403. },
  23404. "project": {
  23405. "type": "object",
  23406. "properties": {
  23407. "id": {
  23408. "type": "string"
  23409. },
  23410. "directory": {
  23411. "type": "string"
  23412. }
  23413. },
  23414. "required": ["id", "directory"],
  23415. "additionalProperties": false
  23416. }
  23417. },
  23418. "required": ["directory", "project"],
  23419. "additionalProperties": false
  23420. },
  23421. "PermissionV2Effect": {
  23422. "type": "string",
  23423. "enum": ["allow", "deny", "ask"]
  23424. },
  23425. "PermissionV2Rule": {
  23426. "type": "object",
  23427. "properties": {
  23428. "action": {
  23429. "type": "string"
  23430. },
  23431. "resource": {
  23432. "type": "string"
  23433. },
  23434. "effect": {
  23435. "$ref": "#/components/schemas/PermissionV2Effect"
  23436. }
  23437. },
  23438. "required": ["action", "resource", "effect"],
  23439. "additionalProperties": false
  23440. },
  23441. "PermissionV2Ruleset": {
  23442. "type": "array",
  23443. "items": {
  23444. "$ref": "#/components/schemas/PermissionV2Rule"
  23445. }
  23446. },
  23447. "AgentV2Info": {
  23448. "type": "object",
  23449. "properties": {
  23450. "id": {
  23451. "type": "string"
  23452. },
  23453. "model": {
  23454. "type": "object",
  23455. "properties": {
  23456. "id": {
  23457. "type": "string"
  23458. },
  23459. "providerID": {
  23460. "type": "string"
  23461. },
  23462. "variant": {
  23463. "type": "string"
  23464. }
  23465. },
  23466. "required": ["id", "providerID"],
  23467. "additionalProperties": false
  23468. },
  23469. "request": {
  23470. "type": "object",
  23471. "properties": {
  23472. "headers": {
  23473. "type": "object",
  23474. "additionalProperties": {
  23475. "type": "string"
  23476. }
  23477. },
  23478. "body": {
  23479. "type": "object"
  23480. }
  23481. },
  23482. "required": ["headers", "body"],
  23483. "additionalProperties": false
  23484. },
  23485. "system": {
  23486. "type": "string"
  23487. },
  23488. "description": {
  23489. "type": "string"
  23490. },
  23491. "mode": {
  23492. "type": "string",
  23493. "enum": ["subagent", "primary", "all"]
  23494. },
  23495. "hidden": {
  23496. "type": "boolean"
  23497. },
  23498. "color": {
  23499. "anyOf": [
  23500. {
  23501. "type": "string",
  23502. "pattern": "^#[0-9a-fA-F]{6}$"
  23503. },
  23504. {
  23505. "type": "string",
  23506. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  23507. }
  23508. ]
  23509. },
  23510. "steps": {
  23511. "type": "integer",
  23512. "exclusiveMinimum": 0
  23513. },
  23514. "permissions": {
  23515. "$ref": "#/components/schemas/PermissionV2Ruleset"
  23516. }
  23517. },
  23518. "required": ["id", "request", "mode", "hidden", "permissions"],
  23519. "additionalProperties": false
  23520. },
  23521. "SessionV2Info": {
  23522. "type": "object",
  23523. "properties": {
  23524. "id": {
  23525. "type": "string",
  23526. "pattern": "^ses"
  23527. },
  23528. "parentID": {
  23529. "type": "string",
  23530. "pattern": "^ses"
  23531. },
  23532. "projectID": {
  23533. "type": "string"
  23534. },
  23535. "agent": {
  23536. "type": "string"
  23537. },
  23538. "model": {
  23539. "type": "object",
  23540. "properties": {
  23541. "id": {
  23542. "type": "string"
  23543. },
  23544. "providerID": {
  23545. "type": "string"
  23546. },
  23547. "variant": {
  23548. "type": "string"
  23549. }
  23550. },
  23551. "required": ["id", "providerID"],
  23552. "additionalProperties": false
  23553. },
  23554. "cost": {
  23555. "type": "number"
  23556. },
  23557. "tokens": {
  23558. "type": "object",
  23559. "properties": {
  23560. "input": {
  23561. "type": "number"
  23562. },
  23563. "output": {
  23564. "type": "number"
  23565. },
  23566. "reasoning": {
  23567. "type": "number"
  23568. },
  23569. "cache": {
  23570. "type": "object",
  23571. "properties": {
  23572. "read": {
  23573. "type": "number"
  23574. },
  23575. "write": {
  23576. "type": "number"
  23577. }
  23578. },
  23579. "required": ["read", "write"],
  23580. "additionalProperties": false
  23581. }
  23582. },
  23583. "required": ["input", "output", "reasoning", "cache"],
  23584. "additionalProperties": false
  23585. },
  23586. "time": {
  23587. "type": "object",
  23588. "properties": {
  23589. "created": {
  23590. "type": "number"
  23591. },
  23592. "updated": {
  23593. "type": "number"
  23594. },
  23595. "archived": {
  23596. "type": "number"
  23597. }
  23598. },
  23599. "required": ["created", "updated"],
  23600. "additionalProperties": false
  23601. },
  23602. "title": {
  23603. "type": "string"
  23604. },
  23605. "location": {
  23606. "$ref": "#/components/schemas/LocationRef"
  23607. },
  23608. "subpath": {
  23609. "type": "string"
  23610. }
  23611. },
  23612. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  23613. "additionalProperties": false
  23614. },
  23615. "SessionInputAdmitted": {
  23616. "type": "object",
  23617. "properties": {
  23618. "admittedSeq": {
  23619. "type": "integer",
  23620. "minimum": 0
  23621. },
  23622. "id": {
  23623. "type": "string",
  23624. "pattern": "^msg_"
  23625. },
  23626. "sessionID": {
  23627. "type": "string",
  23628. "pattern": "^ses"
  23629. },
  23630. "prompt": {
  23631. "$ref": "#/components/schemas/Prompt"
  23632. },
  23633. "delivery": {
  23634. "type": "string",
  23635. "enum": ["steer", "queue"]
  23636. },
  23637. "timeCreated": {
  23638. "type": "number"
  23639. },
  23640. "promotedSeq": {
  23641. "type": "integer",
  23642. "minimum": 0
  23643. }
  23644. },
  23645. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  23646. "additionalProperties": false
  23647. },
  23648. "SessionMessageAgentSwitched": {
  23649. "type": "object",
  23650. "properties": {
  23651. "id": {
  23652. "type": "string",
  23653. "pattern": "^msg_"
  23654. },
  23655. "metadata": {
  23656. "type": "object"
  23657. },
  23658. "time": {
  23659. "type": "object",
  23660. "properties": {
  23661. "created": {
  23662. "type": "number"
  23663. }
  23664. },
  23665. "required": ["created"],
  23666. "additionalProperties": false
  23667. },
  23668. "type": {
  23669. "type": "string",
  23670. "enum": ["agent-switched"]
  23671. },
  23672. "agent": {
  23673. "type": "string"
  23674. }
  23675. },
  23676. "required": ["id", "time", "type", "agent"],
  23677. "additionalProperties": false
  23678. },
  23679. "SessionMessageModelSwitched": {
  23680. "type": "object",
  23681. "properties": {
  23682. "id": {
  23683. "type": "string",
  23684. "pattern": "^msg_"
  23685. },
  23686. "metadata": {
  23687. "type": "object"
  23688. },
  23689. "time": {
  23690. "type": "object",
  23691. "properties": {
  23692. "created": {
  23693. "type": "number"
  23694. }
  23695. },
  23696. "required": ["created"],
  23697. "additionalProperties": false
  23698. },
  23699. "type": {
  23700. "type": "string",
  23701. "enum": ["model-switched"]
  23702. },
  23703. "model": {
  23704. "type": "object",
  23705. "properties": {
  23706. "id": {
  23707. "type": "string"
  23708. },
  23709. "providerID": {
  23710. "type": "string"
  23711. },
  23712. "variant": {
  23713. "type": "string"
  23714. }
  23715. },
  23716. "required": ["id", "providerID"],
  23717. "additionalProperties": false
  23718. }
  23719. },
  23720. "required": ["id", "time", "type", "model"],
  23721. "additionalProperties": false
  23722. },
  23723. "SessionMessageUser": {
  23724. "type": "object",
  23725. "properties": {
  23726. "id": {
  23727. "type": "string",
  23728. "pattern": "^msg_"
  23729. },
  23730. "metadata": {
  23731. "type": "object"
  23732. },
  23733. "time": {
  23734. "type": "object",
  23735. "properties": {
  23736. "created": {
  23737. "type": "number"
  23738. }
  23739. },
  23740. "required": ["created"],
  23741. "additionalProperties": false
  23742. },
  23743. "text": {
  23744. "type": "string"
  23745. },
  23746. "files": {
  23747. "type": "array",
  23748. "items": {
  23749. "$ref": "#/components/schemas/PromptFileAttachment"
  23750. }
  23751. },
  23752. "agents": {
  23753. "type": "array",
  23754. "items": {
  23755. "$ref": "#/components/schemas/PromptAgentAttachment"
  23756. }
  23757. },
  23758. "references": {
  23759. "type": "array",
  23760. "items": {
  23761. "$ref": "#/components/schemas/PromptReferenceAttachment"
  23762. }
  23763. },
  23764. "type": {
  23765. "type": "string",
  23766. "enum": ["user"]
  23767. }
  23768. },
  23769. "required": ["id", "time", "text", "type"],
  23770. "additionalProperties": false
  23771. },
  23772. "SessionMessageSynthetic": {
  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. "sessionID": {
  23793. "type": "string",
  23794. "pattern": "^ses"
  23795. },
  23796. "text": {
  23797. "type": "string"
  23798. },
  23799. "type": {
  23800. "type": "string",
  23801. "enum": ["synthetic"]
  23802. }
  23803. },
  23804. "required": ["id", "time", "sessionID", "text", "type"],
  23805. "additionalProperties": false
  23806. },
  23807. "SessionMessageSystem": {
  23808. "type": "object",
  23809. "properties": {
  23810. "id": {
  23811. "type": "string",
  23812. "pattern": "^msg_"
  23813. },
  23814. "metadata": {
  23815. "type": "object"
  23816. },
  23817. "time": {
  23818. "type": "object",
  23819. "properties": {
  23820. "created": {
  23821. "type": "number"
  23822. }
  23823. },
  23824. "required": ["created"],
  23825. "additionalProperties": false
  23826. },
  23827. "type": {
  23828. "type": "string",
  23829. "enum": ["system"]
  23830. },
  23831. "text": {
  23832. "type": "string"
  23833. }
  23834. },
  23835. "required": ["id", "time", "type", "text"],
  23836. "additionalProperties": false
  23837. },
  23838. "SessionMessageShell": {
  23839. "type": "object",
  23840. "properties": {
  23841. "id": {
  23842. "type": "string",
  23843. "pattern": "^msg_"
  23844. },
  23845. "metadata": {
  23846. "type": "object"
  23847. },
  23848. "time": {
  23849. "type": "object",
  23850. "properties": {
  23851. "created": {
  23852. "type": "number"
  23853. },
  23854. "completed": {
  23855. "type": "number"
  23856. }
  23857. },
  23858. "required": ["created"],
  23859. "additionalProperties": false
  23860. },
  23861. "type": {
  23862. "type": "string",
  23863. "enum": ["shell"]
  23864. },
  23865. "callID": {
  23866. "type": "string"
  23867. },
  23868. "command": {
  23869. "type": "string"
  23870. },
  23871. "output": {
  23872. "type": "string"
  23873. }
  23874. },
  23875. "required": ["id", "time", "type", "callID", "command", "output"],
  23876. "additionalProperties": false
  23877. },
  23878. "SessionMessageAssistantText": {
  23879. "type": "object",
  23880. "properties": {
  23881. "type": {
  23882. "type": "string",
  23883. "enum": ["text"]
  23884. },
  23885. "id": {
  23886. "type": "string"
  23887. },
  23888. "text": {
  23889. "type": "string"
  23890. }
  23891. },
  23892. "required": ["type", "id", "text"],
  23893. "additionalProperties": false
  23894. },
  23895. "SessionMessageAssistantReasoning": {
  23896. "type": "object",
  23897. "properties": {
  23898. "type": {
  23899. "type": "string",
  23900. "enum": ["reasoning"]
  23901. },
  23902. "id": {
  23903. "type": "string"
  23904. },
  23905. "text": {
  23906. "type": "string"
  23907. },
  23908. "providerMetadata": {
  23909. "type": "object",
  23910. "additionalProperties": {
  23911. "type": "object"
  23912. }
  23913. }
  23914. },
  23915. "required": ["type", "id", "text"],
  23916. "additionalProperties": false
  23917. },
  23918. "SessionMessageToolStatePending": {
  23919. "type": "object",
  23920. "properties": {
  23921. "status": {
  23922. "type": "string",
  23923. "enum": ["pending"]
  23924. },
  23925. "input": {
  23926. "type": "string"
  23927. }
  23928. },
  23929. "required": ["status", "input"],
  23930. "additionalProperties": false
  23931. },
  23932. "SessionMessageToolStateRunning": {
  23933. "type": "object",
  23934. "properties": {
  23935. "status": {
  23936. "type": "string",
  23937. "enum": ["running"]
  23938. },
  23939. "input": {
  23940. "type": "object"
  23941. },
  23942. "structured": {
  23943. "type": "object"
  23944. },
  23945. "content": {
  23946. "type": "array",
  23947. "items": {
  23948. "anyOf": [
  23949. {
  23950. "$ref": "#/components/schemas/ToolTextContent"
  23951. },
  23952. {
  23953. "$ref": "#/components/schemas/ToolFileContent"
  23954. }
  23955. ]
  23956. }
  23957. }
  23958. },
  23959. "required": ["status", "input", "structured", "content"],
  23960. "additionalProperties": false
  23961. },
  23962. "SessionMessageToolStateCompleted": {
  23963. "type": "object",
  23964. "properties": {
  23965. "status": {
  23966. "type": "string",
  23967. "enum": ["completed"]
  23968. },
  23969. "input": {
  23970. "type": "object"
  23971. },
  23972. "attachments": {
  23973. "type": "array",
  23974. "items": {
  23975. "$ref": "#/components/schemas/PromptFileAttachment"
  23976. }
  23977. },
  23978. "content": {
  23979. "type": "array",
  23980. "items": {
  23981. "anyOf": [
  23982. {
  23983. "$ref": "#/components/schemas/ToolTextContent"
  23984. },
  23985. {
  23986. "$ref": "#/components/schemas/ToolFileContent"
  23987. }
  23988. ]
  23989. }
  23990. },
  23991. "structured": {
  23992. "type": "object"
  23993. },
  23994. "result": {}
  23995. },
  23996. "required": ["status", "input", "content", "structured"],
  23997. "additionalProperties": false
  23998. },
  23999. "SessionMessageToolStateError": {
  24000. "type": "object",
  24001. "properties": {
  24002. "status": {
  24003. "type": "string",
  24004. "enum": ["error"]
  24005. },
  24006. "input": {
  24007. "type": "object"
  24008. },
  24009. "content": {
  24010. "type": "array",
  24011. "items": {
  24012. "anyOf": [
  24013. {
  24014. "$ref": "#/components/schemas/ToolTextContent"
  24015. },
  24016. {
  24017. "$ref": "#/components/schemas/ToolFileContent"
  24018. }
  24019. ]
  24020. }
  24021. },
  24022. "structured": {
  24023. "type": "object"
  24024. },
  24025. "error": {
  24026. "$ref": "#/components/schemas/SessionErrorUnknown"
  24027. },
  24028. "result": {}
  24029. },
  24030. "required": ["status", "input", "content", "structured", "error"],
  24031. "additionalProperties": false
  24032. },
  24033. "SessionMessageAssistantTool": {
  24034. "type": "object",
  24035. "properties": {
  24036. "type": {
  24037. "type": "string",
  24038. "enum": ["tool"]
  24039. },
  24040. "id": {
  24041. "type": "string"
  24042. },
  24043. "name": {
  24044. "type": "string"
  24045. },
  24046. "provider": {
  24047. "type": "object",
  24048. "properties": {
  24049. "executed": {
  24050. "type": "boolean"
  24051. },
  24052. "metadata": {
  24053. "type": "object",
  24054. "additionalProperties": {
  24055. "type": "object"
  24056. }
  24057. },
  24058. "resultMetadata": {
  24059. "type": "object",
  24060. "additionalProperties": {
  24061. "type": "object"
  24062. }
  24063. }
  24064. },
  24065. "required": ["executed"],
  24066. "additionalProperties": false
  24067. },
  24068. "state": {
  24069. "anyOf": [
  24070. {
  24071. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  24072. },
  24073. {
  24074. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  24075. },
  24076. {
  24077. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  24078. },
  24079. {
  24080. "$ref": "#/components/schemas/SessionMessageToolStateError"
  24081. }
  24082. ]
  24083. },
  24084. "time": {
  24085. "type": "object",
  24086. "properties": {
  24087. "created": {
  24088. "type": "number"
  24089. },
  24090. "ran": {
  24091. "type": "number"
  24092. },
  24093. "completed": {
  24094. "type": "number"
  24095. },
  24096. "pruned": {
  24097. "type": "number"
  24098. }
  24099. },
  24100. "required": ["created"],
  24101. "additionalProperties": false
  24102. }
  24103. },
  24104. "required": ["type", "id", "name", "state", "time"],
  24105. "additionalProperties": false
  24106. },
  24107. "SessionMessageAssistant": {
  24108. "type": "object",
  24109. "properties": {
  24110. "id": {
  24111. "type": "string",
  24112. "pattern": "^msg_"
  24113. },
  24114. "metadata": {
  24115. "type": "object"
  24116. },
  24117. "time": {
  24118. "type": "object",
  24119. "properties": {
  24120. "created": {
  24121. "type": "number"
  24122. },
  24123. "completed": {
  24124. "type": "number"
  24125. }
  24126. },
  24127. "required": ["created"],
  24128. "additionalProperties": false
  24129. },
  24130. "type": {
  24131. "type": "string",
  24132. "enum": ["assistant"]
  24133. },
  24134. "agent": {
  24135. "type": "string"
  24136. },
  24137. "model": {
  24138. "type": "object",
  24139. "properties": {
  24140. "id": {
  24141. "type": "string"
  24142. },
  24143. "providerID": {
  24144. "type": "string"
  24145. },
  24146. "variant": {
  24147. "type": "string"
  24148. }
  24149. },
  24150. "required": ["id", "providerID"],
  24151. "additionalProperties": false
  24152. },
  24153. "content": {
  24154. "type": "array",
  24155. "items": {
  24156. "anyOf": [
  24157. {
  24158. "$ref": "#/components/schemas/SessionMessageAssistantText"
  24159. },
  24160. {
  24161. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  24162. },
  24163. {
  24164. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  24165. }
  24166. ]
  24167. }
  24168. },
  24169. "snapshot": {
  24170. "type": "object",
  24171. "properties": {
  24172. "start": {
  24173. "type": "string"
  24174. },
  24175. "end": {
  24176. "type": "string"
  24177. }
  24178. },
  24179. "additionalProperties": false
  24180. },
  24181. "finish": {
  24182. "type": "string"
  24183. },
  24184. "cost": {
  24185. "type": "number"
  24186. },
  24187. "tokens": {
  24188. "type": "object",
  24189. "properties": {
  24190. "input": {
  24191. "type": "number"
  24192. },
  24193. "output": {
  24194. "type": "number"
  24195. },
  24196. "reasoning": {
  24197. "type": "number"
  24198. },
  24199. "cache": {
  24200. "type": "object",
  24201. "properties": {
  24202. "read": {
  24203. "type": "number"
  24204. },
  24205. "write": {
  24206. "type": "number"
  24207. }
  24208. },
  24209. "required": ["read", "write"],
  24210. "additionalProperties": false
  24211. }
  24212. },
  24213. "required": ["input", "output", "reasoning", "cache"],
  24214. "additionalProperties": false
  24215. },
  24216. "error": {
  24217. "$ref": "#/components/schemas/SessionErrorUnknown"
  24218. }
  24219. },
  24220. "required": ["id", "time", "type", "agent", "model", "content"],
  24221. "additionalProperties": false
  24222. },
  24223. "SessionMessageCompaction": {
  24224. "type": "object",
  24225. "properties": {
  24226. "type": {
  24227. "type": "string",
  24228. "enum": ["compaction"]
  24229. },
  24230. "reason": {
  24231. "type": "string",
  24232. "enum": ["auto", "manual"]
  24233. },
  24234. "summary": {
  24235. "type": "string"
  24236. },
  24237. "include": {
  24238. "type": "string"
  24239. },
  24240. "id": {
  24241. "type": "string",
  24242. "pattern": "^msg_"
  24243. },
  24244. "metadata": {
  24245. "type": "object"
  24246. },
  24247. "time": {
  24248. "type": "object",
  24249. "properties": {
  24250. "created": {
  24251. "type": "number"
  24252. }
  24253. },
  24254. "required": ["created"],
  24255. "additionalProperties": false
  24256. }
  24257. },
  24258. "required": ["type", "reason", "summary", "id", "time"],
  24259. "additionalProperties": false
  24260. },
  24261. "SessionMessage": {
  24262. "anyOf": [
  24263. {
  24264. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  24265. },
  24266. {
  24267. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  24268. },
  24269. {
  24270. "$ref": "#/components/schemas/SessionMessageUser"
  24271. },
  24272. {
  24273. "$ref": "#/components/schemas/SessionMessageSynthetic"
  24274. },
  24275. {
  24276. "$ref": "#/components/schemas/SessionMessageSystem"
  24277. },
  24278. {
  24279. "$ref": "#/components/schemas/SessionMessageShell"
  24280. },
  24281. {
  24282. "$ref": "#/components/schemas/SessionMessageAssistant"
  24283. },
  24284. {
  24285. "$ref": "#/components/schemas/SessionMessageCompaction"
  24286. }
  24287. ]
  24288. },
  24289. "ProviderV2Info": {
  24290. "type": "object",
  24291. "properties": {
  24292. "id": {
  24293. "type": "string"
  24294. },
  24295. "name": {
  24296. "type": "string"
  24297. },
  24298. "enabled": {
  24299. "anyOf": [
  24300. {
  24301. "type": "boolean",
  24302. "enum": [false]
  24303. },
  24304. {
  24305. "type": "object",
  24306. "properties": {
  24307. "via": {
  24308. "type": "string",
  24309. "enum": ["env"]
  24310. },
  24311. "name": {
  24312. "type": "string"
  24313. }
  24314. },
  24315. "required": ["via", "name"],
  24316. "additionalProperties": false
  24317. },
  24318. {
  24319. "type": "object",
  24320. "properties": {
  24321. "via": {
  24322. "type": "string",
  24323. "enum": ["account"]
  24324. },
  24325. "service": {
  24326. "type": "string"
  24327. }
  24328. },
  24329. "required": ["via", "service"],
  24330. "additionalProperties": false
  24331. },
  24332. {
  24333. "type": "object",
  24334. "properties": {
  24335. "via": {
  24336. "type": "string",
  24337. "enum": ["custom"]
  24338. },
  24339. "data": {
  24340. "type": "object"
  24341. }
  24342. },
  24343. "required": ["via", "data"],
  24344. "additionalProperties": false
  24345. }
  24346. ]
  24347. },
  24348. "env": {
  24349. "type": "array",
  24350. "items": {
  24351. "type": "string"
  24352. }
  24353. },
  24354. "api": {
  24355. "anyOf": [
  24356. {
  24357. "type": "object",
  24358. "properties": {
  24359. "type": {
  24360. "type": "string",
  24361. "enum": ["aisdk"]
  24362. },
  24363. "package": {
  24364. "type": "string"
  24365. },
  24366. "url": {
  24367. "type": "string"
  24368. },
  24369. "settings": {
  24370. "type": "object"
  24371. }
  24372. },
  24373. "required": ["type", "package"],
  24374. "additionalProperties": false
  24375. },
  24376. {
  24377. "type": "object",
  24378. "properties": {
  24379. "type": {
  24380. "type": "string",
  24381. "enum": ["native"]
  24382. },
  24383. "url": {
  24384. "type": "string"
  24385. },
  24386. "settings": {
  24387. "type": "object"
  24388. }
  24389. },
  24390. "required": ["type", "settings"],
  24391. "additionalProperties": false
  24392. }
  24393. ]
  24394. },
  24395. "request": {
  24396. "type": "object",
  24397. "properties": {
  24398. "headers": {
  24399. "type": "object",
  24400. "additionalProperties": {
  24401. "type": "string"
  24402. }
  24403. },
  24404. "body": {
  24405. "type": "object"
  24406. }
  24407. },
  24408. "required": ["headers", "body"],
  24409. "additionalProperties": false
  24410. }
  24411. },
  24412. "required": ["id", "name", "enabled", "env", "api", "request"],
  24413. "additionalProperties": false
  24414. },
  24415. "PermissionV2Request": {
  24416. "type": "object",
  24417. "properties": {
  24418. "id": {
  24419. "type": "string",
  24420. "pattern": "^per"
  24421. },
  24422. "sessionID": {
  24423. "type": "string",
  24424. "pattern": "^ses"
  24425. },
  24426. "action": {
  24427. "type": "string"
  24428. },
  24429. "resources": {
  24430. "type": "array",
  24431. "items": {
  24432. "type": "string"
  24433. }
  24434. },
  24435. "save": {
  24436. "type": "array",
  24437. "items": {
  24438. "type": "string"
  24439. }
  24440. },
  24441. "metadata": {
  24442. "type": "object"
  24443. },
  24444. "source": {
  24445. "$ref": "#/components/schemas/PermissionV2Source"
  24446. }
  24447. },
  24448. "required": ["id", "sessionID", "action", "resources"],
  24449. "additionalProperties": false
  24450. },
  24451. "PermissionSavedInfo": {
  24452. "type": "object",
  24453. "properties": {
  24454. "id": {
  24455. "type": "string"
  24456. },
  24457. "projectID": {
  24458. "type": "string"
  24459. },
  24460. "action": {
  24461. "type": "string"
  24462. },
  24463. "resource": {
  24464. "type": "string"
  24465. }
  24466. },
  24467. "required": ["id", "projectID", "action", "resource"],
  24468. "additionalProperties": false
  24469. },
  24470. "FileSystemTextContent": {
  24471. "type": "object",
  24472. "properties": {
  24473. "type": {
  24474. "type": "string",
  24475. "enum": ["text"]
  24476. },
  24477. "content": {
  24478. "type": "string"
  24479. },
  24480. "mime": {
  24481. "type": "string"
  24482. }
  24483. },
  24484. "required": ["type", "content", "mime"],
  24485. "additionalProperties": false
  24486. },
  24487. "FileSystemBinaryContent": {
  24488. "type": "object",
  24489. "properties": {
  24490. "type": {
  24491. "type": "string",
  24492. "enum": ["binary"]
  24493. },
  24494. "content": {
  24495. "type": "string"
  24496. },
  24497. "encoding": {
  24498. "type": "string",
  24499. "enum": ["base64"]
  24500. },
  24501. "mime": {
  24502. "type": "string"
  24503. }
  24504. },
  24505. "required": ["type", "content", "encoding", "mime"],
  24506. "additionalProperties": false
  24507. },
  24508. "FileSystemEntry": {
  24509. "type": "object",
  24510. "properties": {
  24511. "path": {
  24512. "type": "string"
  24513. },
  24514. "uri": {
  24515. "type": "string"
  24516. },
  24517. "type": {
  24518. "type": "string",
  24519. "enum": ["file", "directory"]
  24520. },
  24521. "mime": {
  24522. "type": "string"
  24523. }
  24524. },
  24525. "required": ["path", "uri", "type", "mime"],
  24526. "additionalProperties": false
  24527. },
  24528. "CommandV2Info": {
  24529. "type": "object",
  24530. "properties": {
  24531. "name": {
  24532. "type": "string"
  24533. },
  24534. "template": {
  24535. "type": "string"
  24536. },
  24537. "description": {
  24538. "type": "string"
  24539. },
  24540. "agent": {
  24541. "type": "string"
  24542. },
  24543. "model": {
  24544. "type": "object",
  24545. "properties": {
  24546. "id": {
  24547. "type": "string"
  24548. },
  24549. "providerID": {
  24550. "type": "string"
  24551. },
  24552. "variant": {
  24553. "type": "string"
  24554. }
  24555. },
  24556. "required": ["id", "providerID"],
  24557. "additionalProperties": false
  24558. },
  24559. "subtask": {
  24560. "type": "boolean"
  24561. }
  24562. },
  24563. "required": ["name", "template"],
  24564. "additionalProperties": false
  24565. },
  24566. "SkillV2Info": {
  24567. "type": "object",
  24568. "properties": {
  24569. "name": {
  24570. "type": "string"
  24571. },
  24572. "description": {
  24573. "type": "string"
  24574. },
  24575. "slash": {
  24576. "type": "boolean"
  24577. },
  24578. "location": {
  24579. "type": "string"
  24580. },
  24581. "content": {
  24582. "type": "string"
  24583. }
  24584. },
  24585. "required": ["name", "location", "content"],
  24586. "additionalProperties": false
  24587. },
  24588. "QuestionV2Request": {
  24589. "type": "object",
  24590. "properties": {
  24591. "id": {
  24592. "type": "string",
  24593. "pattern": "^que"
  24594. },
  24595. "sessionID": {
  24596. "type": "string",
  24597. "pattern": "^ses"
  24598. },
  24599. "questions": {
  24600. "type": "array",
  24601. "items": {
  24602. "$ref": "#/components/schemas/QuestionV2Info"
  24603. },
  24604. "description": "Questions to ask"
  24605. },
  24606. "tool": {
  24607. "$ref": "#/components/schemas/QuestionV2Tool"
  24608. }
  24609. },
  24610. "required": ["id", "sessionID", "questions"],
  24611. "additionalProperties": false
  24612. },
  24613. "QuestionV2Reply": {
  24614. "type": "object",
  24615. "properties": {
  24616. "answers": {
  24617. "type": "array",
  24618. "items": {
  24619. "$ref": "#/components/schemas/QuestionV2Answer"
  24620. },
  24621. "description": "User answers in order of questions (each answer is an array of selected labels)"
  24622. }
  24623. },
  24624. "required": ["answers"],
  24625. "additionalProperties": false
  24626. },
  24627. "EventModels-devRefreshed": {
  24628. "type": "object",
  24629. "properties": {
  24630. "id": {
  24631. "type": "string",
  24632. "pattern": "^evt_"
  24633. },
  24634. "type": {
  24635. "type": "string",
  24636. "enum": ["models-dev.refreshed"]
  24637. },
  24638. "properties": {
  24639. "type": "object",
  24640. "properties": {}
  24641. }
  24642. },
  24643. "required": ["id", "type", "properties"],
  24644. "additionalProperties": false
  24645. },
  24646. "EventPluginAdded": {
  24647. "type": "object",
  24648. "properties": {
  24649. "id": {
  24650. "type": "string",
  24651. "pattern": "^evt_"
  24652. },
  24653. "type": {
  24654. "type": "string",
  24655. "enum": ["plugin.added"]
  24656. },
  24657. "properties": {
  24658. "type": "object",
  24659. "properties": {
  24660. "id": {
  24661. "type": "string"
  24662. }
  24663. },
  24664. "required": ["id"],
  24665. "additionalProperties": false
  24666. }
  24667. },
  24668. "required": ["id", "type", "properties"],
  24669. "additionalProperties": false
  24670. },
  24671. "ModelV2Info1": {
  24672. "type": "object",
  24673. "properties": {
  24674. "id": {
  24675. "type": "string"
  24676. },
  24677. "providerID": {
  24678. "type": "string"
  24679. },
  24680. "family": {
  24681. "type": "string"
  24682. },
  24683. "name": {
  24684. "type": "string"
  24685. },
  24686. "api": {
  24687. "anyOf": [
  24688. {
  24689. "type": "object",
  24690. "properties": {
  24691. "id": {
  24692. "type": "string"
  24693. },
  24694. "type": {
  24695. "type": "string",
  24696. "enum": ["aisdk"]
  24697. },
  24698. "package": {
  24699. "type": "string"
  24700. },
  24701. "url": {
  24702. "type": "string"
  24703. },
  24704. "settings": {
  24705. "type": "object"
  24706. }
  24707. },
  24708. "required": ["id", "type", "package"],
  24709. "additionalProperties": false
  24710. },
  24711. {
  24712. "type": "object",
  24713. "properties": {
  24714. "id": {
  24715. "type": "string"
  24716. },
  24717. "type": {
  24718. "type": "string",
  24719. "enum": ["native"]
  24720. },
  24721. "url": {
  24722. "type": "string"
  24723. },
  24724. "settings": {
  24725. "type": "object"
  24726. }
  24727. },
  24728. "required": ["id", "type", "settings"],
  24729. "additionalProperties": false
  24730. }
  24731. ]
  24732. },
  24733. "capabilities": {
  24734. "type": "object",
  24735. "properties": {
  24736. "tools": {
  24737. "type": "boolean"
  24738. },
  24739. "input": {
  24740. "type": "array",
  24741. "items": {
  24742. "type": "string"
  24743. }
  24744. },
  24745. "output": {
  24746. "type": "array",
  24747. "items": {
  24748. "type": "string"
  24749. }
  24750. }
  24751. },
  24752. "required": ["tools", "input", "output"],
  24753. "additionalProperties": false
  24754. },
  24755. "request": {
  24756. "type": "object",
  24757. "properties": {
  24758. "headers": {
  24759. "type": "object",
  24760. "additionalProperties": {
  24761. "type": "string"
  24762. }
  24763. },
  24764. "body": {
  24765. "type": "object"
  24766. },
  24767. "variant": {
  24768. "type": "string"
  24769. }
  24770. },
  24771. "required": ["headers", "body"],
  24772. "additionalProperties": false
  24773. },
  24774. "variants": {
  24775. "type": "array",
  24776. "items": {
  24777. "type": "object",
  24778. "properties": {
  24779. "id": {
  24780. "type": "string"
  24781. },
  24782. "headers": {
  24783. "type": "object",
  24784. "additionalProperties": {
  24785. "type": "string"
  24786. }
  24787. },
  24788. "body": {
  24789. "type": "object"
  24790. }
  24791. },
  24792. "required": ["id", "headers", "body"],
  24793. "additionalProperties": false
  24794. }
  24795. },
  24796. "time": {
  24797. "type": "object",
  24798. "properties": {
  24799. "released": {
  24800. "anyOf": [
  24801. {
  24802. "type": "number"
  24803. },
  24804. {
  24805. "type": "string",
  24806. "enum": ["NaN"]
  24807. },
  24808. {
  24809. "type": "string",
  24810. "enum": ["Infinity"]
  24811. },
  24812. {
  24813. "type": "string",
  24814. "enum": ["-Infinity"]
  24815. }
  24816. ]
  24817. }
  24818. },
  24819. "required": ["released"],
  24820. "additionalProperties": false
  24821. },
  24822. "cost": {
  24823. "type": "array",
  24824. "items": {
  24825. "type": "object",
  24826. "properties": {
  24827. "tier": {
  24828. "type": "object",
  24829. "properties": {
  24830. "type": {
  24831. "type": "string",
  24832. "enum": ["context"]
  24833. },
  24834. "size": {
  24835. "type": "integer"
  24836. }
  24837. },
  24838. "required": ["type", "size"],
  24839. "additionalProperties": false
  24840. },
  24841. "input": {
  24842. "type": "number"
  24843. },
  24844. "output": {
  24845. "type": "number"
  24846. },
  24847. "cache": {
  24848. "type": "object",
  24849. "properties": {
  24850. "read": {
  24851. "type": "number"
  24852. },
  24853. "write": {
  24854. "type": "number"
  24855. }
  24856. },
  24857. "required": ["read", "write"],
  24858. "additionalProperties": false
  24859. }
  24860. },
  24861. "required": ["input", "output", "cache"],
  24862. "additionalProperties": false
  24863. }
  24864. },
  24865. "status": {
  24866. "type": "string",
  24867. "enum": ["alpha", "beta", "deprecated", "active"]
  24868. },
  24869. "enabled": {
  24870. "type": "boolean"
  24871. },
  24872. "limit": {
  24873. "type": "object",
  24874. "properties": {
  24875. "context": {
  24876. "type": "integer"
  24877. },
  24878. "input": {
  24879. "type": "integer"
  24880. },
  24881. "output": {
  24882. "type": "integer"
  24883. }
  24884. },
  24885. "required": ["context", "output"],
  24886. "additionalProperties": false
  24887. }
  24888. },
  24889. "required": [
  24890. "id",
  24891. "providerID",
  24892. "name",
  24893. "api",
  24894. "capabilities",
  24895. "request",
  24896. "variants",
  24897. "time",
  24898. "cost",
  24899. "status",
  24900. "enabled",
  24901. "limit"
  24902. ],
  24903. "additionalProperties": false
  24904. },
  24905. "EventCatalogModelUpdated": {
  24906. "type": "object",
  24907. "properties": {
  24908. "id": {
  24909. "type": "string",
  24910. "pattern": "^evt_"
  24911. },
  24912. "type": {
  24913. "type": "string",
  24914. "enum": ["catalog.model.updated"]
  24915. },
  24916. "properties": {
  24917. "type": "object",
  24918. "properties": {
  24919. "model": {
  24920. "$ref": "#/components/schemas/ModelV2Info1"
  24921. }
  24922. },
  24923. "required": ["model"],
  24924. "additionalProperties": false
  24925. }
  24926. },
  24927. "required": ["id", "type", "properties"],
  24928. "additionalProperties": false
  24929. },
  24930. "EventSessionCreated": {
  24931. "type": "object",
  24932. "properties": {
  24933. "id": {
  24934. "type": "string",
  24935. "pattern": "^evt_"
  24936. },
  24937. "type": {
  24938. "type": "string",
  24939. "enum": ["session.created"]
  24940. },
  24941. "properties": {
  24942. "type": "object",
  24943. "properties": {
  24944. "sessionID": {
  24945. "type": "string",
  24946. "pattern": "^ses"
  24947. },
  24948. "info": {
  24949. "$ref": "#/components/schemas/Session"
  24950. }
  24951. },
  24952. "required": ["sessionID", "info"],
  24953. "additionalProperties": false
  24954. }
  24955. },
  24956. "required": ["id", "type", "properties"],
  24957. "additionalProperties": false
  24958. },
  24959. "EventSessionUpdated": {
  24960. "type": "object",
  24961. "properties": {
  24962. "id": {
  24963. "type": "string",
  24964. "pattern": "^evt_"
  24965. },
  24966. "type": {
  24967. "type": "string",
  24968. "enum": ["session.updated"]
  24969. },
  24970. "properties": {
  24971. "type": "object",
  24972. "properties": {
  24973. "sessionID": {
  24974. "type": "string",
  24975. "pattern": "^ses"
  24976. },
  24977. "info": {
  24978. "$ref": "#/components/schemas/Session"
  24979. }
  24980. },
  24981. "required": ["sessionID", "info"],
  24982. "additionalProperties": false
  24983. }
  24984. },
  24985. "required": ["id", "type", "properties"],
  24986. "additionalProperties": false
  24987. },
  24988. "EventSessionDeleted": {
  24989. "type": "object",
  24990. "properties": {
  24991. "id": {
  24992. "type": "string",
  24993. "pattern": "^evt_"
  24994. },
  24995. "type": {
  24996. "type": "string",
  24997. "enum": ["session.deleted"]
  24998. },
  24999. "properties": {
  25000. "type": "object",
  25001. "properties": {
  25002. "sessionID": {
  25003. "type": "string",
  25004. "pattern": "^ses"
  25005. },
  25006. "info": {
  25007. "$ref": "#/components/schemas/Session"
  25008. }
  25009. },
  25010. "required": ["sessionID", "info"],
  25011. "additionalProperties": false
  25012. }
  25013. },
  25014. "required": ["id", "type", "properties"],
  25015. "additionalProperties": false
  25016. },
  25017. "EventMessageUpdated": {
  25018. "type": "object",
  25019. "properties": {
  25020. "id": {
  25021. "type": "string",
  25022. "pattern": "^evt_"
  25023. },
  25024. "type": {
  25025. "type": "string",
  25026. "enum": ["message.updated"]
  25027. },
  25028. "properties": {
  25029. "type": "object",
  25030. "properties": {
  25031. "sessionID": {
  25032. "type": "string",
  25033. "pattern": "^ses"
  25034. },
  25035. "info": {
  25036. "$ref": "#/components/schemas/Message"
  25037. }
  25038. },
  25039. "required": ["sessionID", "info"],
  25040. "additionalProperties": false
  25041. }
  25042. },
  25043. "required": ["id", "type", "properties"],
  25044. "additionalProperties": false
  25045. },
  25046. "EventMessageRemoved": {
  25047. "type": "object",
  25048. "properties": {
  25049. "id": {
  25050. "type": "string",
  25051. "pattern": "^evt_"
  25052. },
  25053. "type": {
  25054. "type": "string",
  25055. "enum": ["message.removed"]
  25056. },
  25057. "properties": {
  25058. "type": "object",
  25059. "properties": {
  25060. "sessionID": {
  25061. "type": "string",
  25062. "pattern": "^ses"
  25063. },
  25064. "messageID": {
  25065. "type": "string",
  25066. "pattern": "^msg"
  25067. }
  25068. },
  25069. "required": ["sessionID", "messageID"],
  25070. "additionalProperties": false
  25071. }
  25072. },
  25073. "required": ["id", "type", "properties"],
  25074. "additionalProperties": false
  25075. },
  25076. "EventMessagePartUpdated": {
  25077. "type": "object",
  25078. "properties": {
  25079. "id": {
  25080. "type": "string",
  25081. "pattern": "^evt_"
  25082. },
  25083. "type": {
  25084. "type": "string",
  25085. "enum": ["message.part.updated"]
  25086. },
  25087. "properties": {
  25088. "type": "object",
  25089. "properties": {
  25090. "sessionID": {
  25091. "type": "string",
  25092. "pattern": "^ses"
  25093. },
  25094. "part": {
  25095. "$ref": "#/components/schemas/Part"
  25096. },
  25097. "time": {
  25098. "type": "number"
  25099. }
  25100. },
  25101. "required": ["sessionID", "part", "time"],
  25102. "additionalProperties": false
  25103. }
  25104. },
  25105. "required": ["id", "type", "properties"],
  25106. "additionalProperties": false
  25107. },
  25108. "EventMessagePartRemoved": {
  25109. "type": "object",
  25110. "properties": {
  25111. "id": {
  25112. "type": "string",
  25113. "pattern": "^evt_"
  25114. },
  25115. "type": {
  25116. "type": "string",
  25117. "enum": ["message.part.removed"]
  25118. },
  25119. "properties": {
  25120. "type": "object",
  25121. "properties": {
  25122. "sessionID": {
  25123. "type": "string",
  25124. "pattern": "^ses"
  25125. },
  25126. "messageID": {
  25127. "type": "string",
  25128. "pattern": "^msg"
  25129. },
  25130. "partID": {
  25131. "type": "string",
  25132. "pattern": "^prt"
  25133. }
  25134. },
  25135. "required": ["sessionID", "messageID", "partID"],
  25136. "additionalProperties": false
  25137. }
  25138. },
  25139. "required": ["id", "type", "properties"],
  25140. "additionalProperties": false
  25141. },
  25142. "EventSessionNextAgentSwitched": {
  25143. "type": "object",
  25144. "properties": {
  25145. "id": {
  25146. "type": "string",
  25147. "pattern": "^evt_"
  25148. },
  25149. "type": {
  25150. "type": "string",
  25151. "enum": ["session.next.agent.switched"]
  25152. },
  25153. "properties": {
  25154. "type": "object",
  25155. "properties": {
  25156. "timestamp": {
  25157. "type": "number"
  25158. },
  25159. "sessionID": {
  25160. "type": "string",
  25161. "pattern": "^ses"
  25162. },
  25163. "messageID": {
  25164. "type": "string",
  25165. "pattern": "^msg_"
  25166. },
  25167. "agent": {
  25168. "type": "string"
  25169. }
  25170. },
  25171. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25172. "additionalProperties": false
  25173. }
  25174. },
  25175. "required": ["id", "type", "properties"],
  25176. "additionalProperties": false
  25177. },
  25178. "EventSessionNextModelSwitched": {
  25179. "type": "object",
  25180. "properties": {
  25181. "id": {
  25182. "type": "string",
  25183. "pattern": "^evt_"
  25184. },
  25185. "type": {
  25186. "type": "string",
  25187. "enum": ["session.next.model.switched"]
  25188. },
  25189. "properties": {
  25190. "type": "object",
  25191. "properties": {
  25192. "timestamp": {
  25193. "type": "number"
  25194. },
  25195. "sessionID": {
  25196. "type": "string",
  25197. "pattern": "^ses"
  25198. },
  25199. "messageID": {
  25200. "type": "string",
  25201. "pattern": "^msg_"
  25202. },
  25203. "model": {
  25204. "type": "object",
  25205. "properties": {
  25206. "id": {
  25207. "type": "string"
  25208. },
  25209. "providerID": {
  25210. "type": "string"
  25211. },
  25212. "variant": {
  25213. "type": "string"
  25214. }
  25215. },
  25216. "required": ["id", "providerID"],
  25217. "additionalProperties": false
  25218. }
  25219. },
  25220. "required": ["timestamp", "sessionID", "messageID", "model"],
  25221. "additionalProperties": false
  25222. }
  25223. },
  25224. "required": ["id", "type", "properties"],
  25225. "additionalProperties": false
  25226. },
  25227. "EventSessionNextMoved": {
  25228. "type": "object",
  25229. "properties": {
  25230. "id": {
  25231. "type": "string",
  25232. "pattern": "^evt_"
  25233. },
  25234. "type": {
  25235. "type": "string",
  25236. "enum": ["session.next.moved"]
  25237. },
  25238. "properties": {
  25239. "type": "object",
  25240. "properties": {
  25241. "timestamp": {
  25242. "type": "number"
  25243. },
  25244. "sessionID": {
  25245. "type": "string",
  25246. "pattern": "^ses"
  25247. },
  25248. "location": {
  25249. "$ref": "#/components/schemas/LocationRef"
  25250. },
  25251. "subdirectory": {
  25252. "type": "string"
  25253. }
  25254. },
  25255. "required": ["timestamp", "sessionID", "location"],
  25256. "additionalProperties": false
  25257. }
  25258. },
  25259. "required": ["id", "type", "properties"],
  25260. "additionalProperties": false
  25261. },
  25262. "EventSessionNextPrompted": {
  25263. "type": "object",
  25264. "properties": {
  25265. "id": {
  25266. "type": "string",
  25267. "pattern": "^evt_"
  25268. },
  25269. "type": {
  25270. "type": "string",
  25271. "enum": ["session.next.prompted"]
  25272. },
  25273. "properties": {
  25274. "type": "object",
  25275. "properties": {
  25276. "timestamp": {
  25277. "type": "number"
  25278. },
  25279. "sessionID": {
  25280. "type": "string",
  25281. "pattern": "^ses"
  25282. },
  25283. "messageID": {
  25284. "type": "string",
  25285. "pattern": "^msg_"
  25286. },
  25287. "prompt": {
  25288. "$ref": "#/components/schemas/Prompt"
  25289. },
  25290. "delivery": {
  25291. "type": "string",
  25292. "enum": ["steer", "queue"]
  25293. }
  25294. },
  25295. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25296. "additionalProperties": false
  25297. }
  25298. },
  25299. "required": ["id", "type", "properties"],
  25300. "additionalProperties": false
  25301. },
  25302. "EventSessionNextPromptAdmitted": {
  25303. "type": "object",
  25304. "properties": {
  25305. "id": {
  25306. "type": "string",
  25307. "pattern": "^evt_"
  25308. },
  25309. "type": {
  25310. "type": "string",
  25311. "enum": ["session.next.prompt.admitted"]
  25312. },
  25313. "properties": {
  25314. "type": "object",
  25315. "properties": {
  25316. "timestamp": {
  25317. "type": "number"
  25318. },
  25319. "sessionID": {
  25320. "type": "string",
  25321. "pattern": "^ses"
  25322. },
  25323. "messageID": {
  25324. "type": "string",
  25325. "pattern": "^msg_"
  25326. },
  25327. "prompt": {
  25328. "$ref": "#/components/schemas/Prompt"
  25329. },
  25330. "delivery": {
  25331. "type": "string",
  25332. "enum": ["steer", "queue"]
  25333. }
  25334. },
  25335. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25336. "additionalProperties": false
  25337. }
  25338. },
  25339. "required": ["id", "type", "properties"],
  25340. "additionalProperties": false
  25341. },
  25342. "EventSessionNextPromptPromoted": {
  25343. "type": "object",
  25344. "properties": {
  25345. "id": {
  25346. "type": "string",
  25347. "pattern": "^evt_"
  25348. },
  25349. "type": {
  25350. "type": "string",
  25351. "enum": ["session.next.prompt.promoted"]
  25352. },
  25353. "properties": {
  25354. "type": "object",
  25355. "properties": {
  25356. "timestamp": {
  25357. "type": "number"
  25358. },
  25359. "sessionID": {
  25360. "type": "string",
  25361. "pattern": "^ses"
  25362. },
  25363. "messageID": {
  25364. "type": "string",
  25365. "pattern": "^msg_"
  25366. },
  25367. "prompt": {
  25368. "$ref": "#/components/schemas/Prompt"
  25369. },
  25370. "timeCreated": {
  25371. "type": "number"
  25372. }
  25373. },
  25374. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  25375. "additionalProperties": false
  25376. }
  25377. },
  25378. "required": ["id", "type", "properties"],
  25379. "additionalProperties": false
  25380. },
  25381. "EventSessionNextContextUpdated": {
  25382. "type": "object",
  25383. "properties": {
  25384. "id": {
  25385. "type": "string",
  25386. "pattern": "^evt_"
  25387. },
  25388. "type": {
  25389. "type": "string",
  25390. "enum": ["session.next.context.updated"]
  25391. },
  25392. "properties": {
  25393. "type": "object",
  25394. "properties": {
  25395. "timestamp": {
  25396. "type": "number"
  25397. },
  25398. "sessionID": {
  25399. "type": "string",
  25400. "pattern": "^ses"
  25401. },
  25402. "messageID": {
  25403. "type": "string",
  25404. "pattern": "^msg_"
  25405. },
  25406. "text": {
  25407. "type": "string"
  25408. }
  25409. },
  25410. "required": ["timestamp", "sessionID", "messageID", "text"],
  25411. "additionalProperties": false
  25412. }
  25413. },
  25414. "required": ["id", "type", "properties"],
  25415. "additionalProperties": false
  25416. },
  25417. "EventSessionNextSynthetic": {
  25418. "type": "object",
  25419. "properties": {
  25420. "id": {
  25421. "type": "string",
  25422. "pattern": "^evt_"
  25423. },
  25424. "type": {
  25425. "type": "string",
  25426. "enum": ["session.next.synthetic"]
  25427. },
  25428. "properties": {
  25429. "type": "object",
  25430. "properties": {
  25431. "timestamp": {
  25432. "type": "number"
  25433. },
  25434. "sessionID": {
  25435. "type": "string",
  25436. "pattern": "^ses"
  25437. },
  25438. "messageID": {
  25439. "type": "string",
  25440. "pattern": "^msg_"
  25441. },
  25442. "text": {
  25443. "type": "string"
  25444. }
  25445. },
  25446. "required": ["timestamp", "sessionID", "messageID", "text"],
  25447. "additionalProperties": false
  25448. }
  25449. },
  25450. "required": ["id", "type", "properties"],
  25451. "additionalProperties": false
  25452. },
  25453. "EventSessionNextShellStarted": {
  25454. "type": "object",
  25455. "properties": {
  25456. "id": {
  25457. "type": "string",
  25458. "pattern": "^evt_"
  25459. },
  25460. "type": {
  25461. "type": "string",
  25462. "enum": ["session.next.shell.started"]
  25463. },
  25464. "properties": {
  25465. "type": "object",
  25466. "properties": {
  25467. "timestamp": {
  25468. "type": "number"
  25469. },
  25470. "sessionID": {
  25471. "type": "string",
  25472. "pattern": "^ses"
  25473. },
  25474. "messageID": {
  25475. "type": "string",
  25476. "pattern": "^msg_"
  25477. },
  25478. "callID": {
  25479. "type": "string"
  25480. },
  25481. "command": {
  25482. "type": "string"
  25483. }
  25484. },
  25485. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25486. "additionalProperties": false
  25487. }
  25488. },
  25489. "required": ["id", "type", "properties"],
  25490. "additionalProperties": false
  25491. },
  25492. "EventSessionNextShellEnded": {
  25493. "type": "object",
  25494. "properties": {
  25495. "id": {
  25496. "type": "string",
  25497. "pattern": "^evt_"
  25498. },
  25499. "type": {
  25500. "type": "string",
  25501. "enum": ["session.next.shell.ended"]
  25502. },
  25503. "properties": {
  25504. "type": "object",
  25505. "properties": {
  25506. "timestamp": {
  25507. "type": "number"
  25508. },
  25509. "sessionID": {
  25510. "type": "string",
  25511. "pattern": "^ses"
  25512. },
  25513. "callID": {
  25514. "type": "string"
  25515. },
  25516. "output": {
  25517. "type": "string"
  25518. }
  25519. },
  25520. "required": ["timestamp", "sessionID", "callID", "output"],
  25521. "additionalProperties": false
  25522. }
  25523. },
  25524. "required": ["id", "type", "properties"],
  25525. "additionalProperties": false
  25526. },
  25527. "EventSessionNextStepStarted": {
  25528. "type": "object",
  25529. "properties": {
  25530. "id": {
  25531. "type": "string",
  25532. "pattern": "^evt_"
  25533. },
  25534. "type": {
  25535. "type": "string",
  25536. "enum": ["session.next.step.started"]
  25537. },
  25538. "properties": {
  25539. "type": "object",
  25540. "properties": {
  25541. "timestamp": {
  25542. "type": "number"
  25543. },
  25544. "sessionID": {
  25545. "type": "string",
  25546. "pattern": "^ses"
  25547. },
  25548. "assistantMessageID": {
  25549. "type": "string",
  25550. "pattern": "^msg_"
  25551. },
  25552. "agent": {
  25553. "type": "string"
  25554. },
  25555. "model": {
  25556. "type": "object",
  25557. "properties": {
  25558. "id": {
  25559. "type": "string"
  25560. },
  25561. "providerID": {
  25562. "type": "string"
  25563. },
  25564. "variant": {
  25565. "type": "string"
  25566. }
  25567. },
  25568. "required": ["id", "providerID"],
  25569. "additionalProperties": false
  25570. },
  25571. "snapshot": {
  25572. "type": "string"
  25573. }
  25574. },
  25575. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25576. "additionalProperties": false
  25577. }
  25578. },
  25579. "required": ["id", "type", "properties"],
  25580. "additionalProperties": false
  25581. },
  25582. "EventSessionNextStepEnded": {
  25583. "type": "object",
  25584. "properties": {
  25585. "id": {
  25586. "type": "string",
  25587. "pattern": "^evt_"
  25588. },
  25589. "type": {
  25590. "type": "string",
  25591. "enum": ["session.next.step.ended"]
  25592. },
  25593. "properties": {
  25594. "type": "object",
  25595. "properties": {
  25596. "timestamp": {
  25597. "type": "number"
  25598. },
  25599. "sessionID": {
  25600. "type": "string",
  25601. "pattern": "^ses"
  25602. },
  25603. "assistantMessageID": {
  25604. "type": "string",
  25605. "pattern": "^msg_"
  25606. },
  25607. "finish": {
  25608. "type": "string"
  25609. },
  25610. "cost": {
  25611. "type": "number"
  25612. },
  25613. "tokens": {
  25614. "type": "object",
  25615. "properties": {
  25616. "input": {
  25617. "type": "number"
  25618. },
  25619. "output": {
  25620. "type": "number"
  25621. },
  25622. "reasoning": {
  25623. "type": "number"
  25624. },
  25625. "cache": {
  25626. "type": "object",
  25627. "properties": {
  25628. "read": {
  25629. "type": "number"
  25630. },
  25631. "write": {
  25632. "type": "number"
  25633. }
  25634. },
  25635. "required": ["read", "write"],
  25636. "additionalProperties": false
  25637. }
  25638. },
  25639. "required": ["input", "output", "reasoning", "cache"],
  25640. "additionalProperties": false
  25641. },
  25642. "snapshot": {
  25643. "type": "string"
  25644. }
  25645. },
  25646. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25647. "additionalProperties": false
  25648. }
  25649. },
  25650. "required": ["id", "type", "properties"],
  25651. "additionalProperties": false
  25652. },
  25653. "EventSessionNextStepFailed": {
  25654. "type": "object",
  25655. "properties": {
  25656. "id": {
  25657. "type": "string",
  25658. "pattern": "^evt_"
  25659. },
  25660. "type": {
  25661. "type": "string",
  25662. "enum": ["session.next.step.failed"]
  25663. },
  25664. "properties": {
  25665. "type": "object",
  25666. "properties": {
  25667. "timestamp": {
  25668. "type": "number"
  25669. },
  25670. "sessionID": {
  25671. "type": "string",
  25672. "pattern": "^ses"
  25673. },
  25674. "assistantMessageID": {
  25675. "type": "string",
  25676. "pattern": "^msg_"
  25677. },
  25678. "error": {
  25679. "$ref": "#/components/schemas/SessionErrorUnknown"
  25680. }
  25681. },
  25682. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25683. "additionalProperties": false
  25684. }
  25685. },
  25686. "required": ["id", "type", "properties"],
  25687. "additionalProperties": false
  25688. },
  25689. "EventSessionNextTextStarted": {
  25690. "type": "object",
  25691. "properties": {
  25692. "id": {
  25693. "type": "string",
  25694. "pattern": "^evt_"
  25695. },
  25696. "type": {
  25697. "type": "string",
  25698. "enum": ["session.next.text.started"]
  25699. },
  25700. "properties": {
  25701. "type": "object",
  25702. "properties": {
  25703. "timestamp": {
  25704. "type": "number"
  25705. },
  25706. "sessionID": {
  25707. "type": "string",
  25708. "pattern": "^ses"
  25709. },
  25710. "assistantMessageID": {
  25711. "type": "string",
  25712. "pattern": "^msg_"
  25713. },
  25714. "textID": {
  25715. "type": "string"
  25716. }
  25717. },
  25718. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25719. "additionalProperties": false
  25720. }
  25721. },
  25722. "required": ["id", "type", "properties"],
  25723. "additionalProperties": false
  25724. },
  25725. "EventSessionNextTextDelta": {
  25726. "type": "object",
  25727. "properties": {
  25728. "id": {
  25729. "type": "string",
  25730. "pattern": "^evt_"
  25731. },
  25732. "type": {
  25733. "type": "string",
  25734. "enum": ["session.next.text.delta"]
  25735. },
  25736. "properties": {
  25737. "type": "object",
  25738. "properties": {
  25739. "timestamp": {
  25740. "type": "number"
  25741. },
  25742. "sessionID": {
  25743. "type": "string",
  25744. "pattern": "^ses"
  25745. },
  25746. "assistantMessageID": {
  25747. "type": "string",
  25748. "pattern": "^msg_"
  25749. },
  25750. "textID": {
  25751. "type": "string"
  25752. },
  25753. "delta": {
  25754. "type": "string"
  25755. }
  25756. },
  25757. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  25758. "additionalProperties": false
  25759. }
  25760. },
  25761. "required": ["id", "type", "properties"],
  25762. "additionalProperties": false
  25763. },
  25764. "EventSessionNextTextEnded": {
  25765. "type": "object",
  25766. "properties": {
  25767. "id": {
  25768. "type": "string",
  25769. "pattern": "^evt_"
  25770. },
  25771. "type": {
  25772. "type": "string",
  25773. "enum": ["session.next.text.ended"]
  25774. },
  25775. "properties": {
  25776. "type": "object",
  25777. "properties": {
  25778. "timestamp": {
  25779. "type": "number"
  25780. },
  25781. "sessionID": {
  25782. "type": "string",
  25783. "pattern": "^ses"
  25784. },
  25785. "assistantMessageID": {
  25786. "type": "string",
  25787. "pattern": "^msg_"
  25788. },
  25789. "textID": {
  25790. "type": "string"
  25791. },
  25792. "text": {
  25793. "type": "string"
  25794. }
  25795. },
  25796. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25797. "additionalProperties": false
  25798. }
  25799. },
  25800. "required": ["id", "type", "properties"],
  25801. "additionalProperties": false
  25802. },
  25803. "EventSessionNextReasoningStarted": {
  25804. "type": "object",
  25805. "properties": {
  25806. "id": {
  25807. "type": "string",
  25808. "pattern": "^evt_"
  25809. },
  25810. "type": {
  25811. "type": "string",
  25812. "enum": ["session.next.reasoning.started"]
  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. "reasoningID": {
  25829. "type": "string"
  25830. },
  25831. "providerMetadata": {
  25832. "type": "object",
  25833. "additionalProperties": {
  25834. "type": "object"
  25835. }
  25836. }
  25837. },
  25838. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25839. "additionalProperties": false
  25840. }
  25841. },
  25842. "required": ["id", "type", "properties"],
  25843. "additionalProperties": false
  25844. },
  25845. "EventSessionNextReasoningDelta": {
  25846. "type": "object",
  25847. "properties": {
  25848. "id": {
  25849. "type": "string",
  25850. "pattern": "^evt_"
  25851. },
  25852. "type": {
  25853. "type": "string",
  25854. "enum": ["session.next.reasoning.delta"]
  25855. },
  25856. "properties": {
  25857. "type": "object",
  25858. "properties": {
  25859. "timestamp": {
  25860. "type": "number"
  25861. },
  25862. "sessionID": {
  25863. "type": "string",
  25864. "pattern": "^ses"
  25865. },
  25866. "assistantMessageID": {
  25867. "type": "string",
  25868. "pattern": "^msg_"
  25869. },
  25870. "reasoningID": {
  25871. "type": "string"
  25872. },
  25873. "delta": {
  25874. "type": "string"
  25875. }
  25876. },
  25877. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  25878. "additionalProperties": false
  25879. }
  25880. },
  25881. "required": ["id", "type", "properties"],
  25882. "additionalProperties": false
  25883. },
  25884. "EventSessionNextReasoningEnded": {
  25885. "type": "object",
  25886. "properties": {
  25887. "id": {
  25888. "type": "string",
  25889. "pattern": "^evt_"
  25890. },
  25891. "type": {
  25892. "type": "string",
  25893. "enum": ["session.next.reasoning.ended"]
  25894. },
  25895. "properties": {
  25896. "type": "object",
  25897. "properties": {
  25898. "timestamp": {
  25899. "type": "number"
  25900. },
  25901. "sessionID": {
  25902. "type": "string",
  25903. "pattern": "^ses"
  25904. },
  25905. "assistantMessageID": {
  25906. "type": "string",
  25907. "pattern": "^msg_"
  25908. },
  25909. "reasoningID": {
  25910. "type": "string"
  25911. },
  25912. "text": {
  25913. "type": "string"
  25914. },
  25915. "providerMetadata": {
  25916. "type": "object",
  25917. "additionalProperties": {
  25918. "type": "object"
  25919. }
  25920. }
  25921. },
  25922. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25923. "additionalProperties": false
  25924. }
  25925. },
  25926. "required": ["id", "type", "properties"],
  25927. "additionalProperties": false
  25928. },
  25929. "EventSessionNextToolInputStarted": {
  25930. "type": "object",
  25931. "properties": {
  25932. "id": {
  25933. "type": "string",
  25934. "pattern": "^evt_"
  25935. },
  25936. "type": {
  25937. "type": "string",
  25938. "enum": ["session.next.tool.input.started"]
  25939. },
  25940. "properties": {
  25941. "type": "object",
  25942. "properties": {
  25943. "timestamp": {
  25944. "type": "number"
  25945. },
  25946. "sessionID": {
  25947. "type": "string",
  25948. "pattern": "^ses"
  25949. },
  25950. "assistantMessageID": {
  25951. "type": "string",
  25952. "pattern": "^msg_"
  25953. },
  25954. "callID": {
  25955. "type": "string"
  25956. },
  25957. "name": {
  25958. "type": "string"
  25959. }
  25960. },
  25961. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25962. "additionalProperties": false
  25963. }
  25964. },
  25965. "required": ["id", "type", "properties"],
  25966. "additionalProperties": false
  25967. },
  25968. "EventSessionNextToolInputDelta": {
  25969. "type": "object",
  25970. "properties": {
  25971. "id": {
  25972. "type": "string",
  25973. "pattern": "^evt_"
  25974. },
  25975. "type": {
  25976. "type": "string",
  25977. "enum": ["session.next.tool.input.delta"]
  25978. },
  25979. "properties": {
  25980. "type": "object",
  25981. "properties": {
  25982. "timestamp": {
  25983. "type": "number"
  25984. },
  25985. "sessionID": {
  25986. "type": "string",
  25987. "pattern": "^ses"
  25988. },
  25989. "assistantMessageID": {
  25990. "type": "string",
  25991. "pattern": "^msg_"
  25992. },
  25993. "callID": {
  25994. "type": "string"
  25995. },
  25996. "delta": {
  25997. "type": "string"
  25998. }
  25999. },
  26000. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  26001. "additionalProperties": false
  26002. }
  26003. },
  26004. "required": ["id", "type", "properties"],
  26005. "additionalProperties": false
  26006. },
  26007. "EventSessionNextToolInputEnded": {
  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.ended"]
  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. "text": {
  26036. "type": "string"
  26037. }
  26038. },
  26039. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26040. "additionalProperties": false
  26041. }
  26042. },
  26043. "required": ["id", "type", "properties"],
  26044. "additionalProperties": false
  26045. },
  26046. "EventSessionNextToolCalled": {
  26047. "type": "object",
  26048. "properties": {
  26049. "id": {
  26050. "type": "string",
  26051. "pattern": "^evt_"
  26052. },
  26053. "type": {
  26054. "type": "string",
  26055. "enum": ["session.next.tool.called"]
  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. "tool": {
  26075. "type": "string"
  26076. },
  26077. "input": {
  26078. "type": "object"
  26079. },
  26080. "provider": {
  26081. "type": "object",
  26082. "properties": {
  26083. "executed": {
  26084. "type": "boolean"
  26085. },
  26086. "metadata": {
  26087. "type": "object",
  26088. "additionalProperties": {
  26089. "type": "object"
  26090. }
  26091. }
  26092. },
  26093. "required": ["executed"],
  26094. "additionalProperties": false
  26095. }
  26096. },
  26097. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26098. "additionalProperties": false
  26099. }
  26100. },
  26101. "required": ["id", "type", "properties"],
  26102. "additionalProperties": false
  26103. },
  26104. "EventSessionNextToolProgress": {
  26105. "type": "object",
  26106. "properties": {
  26107. "id": {
  26108. "type": "string",
  26109. "pattern": "^evt_"
  26110. },
  26111. "type": {
  26112. "type": "string",
  26113. "enum": ["session.next.tool.progress"]
  26114. },
  26115. "properties": {
  26116. "type": "object",
  26117. "properties": {
  26118. "timestamp": {
  26119. "type": "number"
  26120. },
  26121. "sessionID": {
  26122. "type": "string",
  26123. "pattern": "^ses"
  26124. },
  26125. "assistantMessageID": {
  26126. "type": "string",
  26127. "pattern": "^msg_"
  26128. },
  26129. "callID": {
  26130. "type": "string"
  26131. },
  26132. "structured": {
  26133. "type": "object"
  26134. },
  26135. "content": {
  26136. "type": "array",
  26137. "items": {
  26138. "anyOf": [
  26139. {
  26140. "$ref": "#/components/schemas/ToolTextContent"
  26141. },
  26142. {
  26143. "$ref": "#/components/schemas/ToolFileContent"
  26144. }
  26145. ]
  26146. }
  26147. }
  26148. },
  26149. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26150. "additionalProperties": false
  26151. }
  26152. },
  26153. "required": ["id", "type", "properties"],
  26154. "additionalProperties": false
  26155. },
  26156. "EventSessionNextToolSuccess": {
  26157. "type": "object",
  26158. "properties": {
  26159. "id": {
  26160. "type": "string",
  26161. "pattern": "^evt_"
  26162. },
  26163. "type": {
  26164. "type": "string",
  26165. "enum": ["session.next.tool.success"]
  26166. },
  26167. "properties": {
  26168. "type": "object",
  26169. "properties": {
  26170. "timestamp": {
  26171. "type": "number"
  26172. },
  26173. "sessionID": {
  26174. "type": "string",
  26175. "pattern": "^ses"
  26176. },
  26177. "assistantMessageID": {
  26178. "type": "string",
  26179. "pattern": "^msg_"
  26180. },
  26181. "callID": {
  26182. "type": "string"
  26183. },
  26184. "structured": {
  26185. "type": "object"
  26186. },
  26187. "content": {
  26188. "type": "array",
  26189. "items": {
  26190. "anyOf": [
  26191. {
  26192. "$ref": "#/components/schemas/ToolTextContent"
  26193. },
  26194. {
  26195. "$ref": "#/components/schemas/ToolFileContent"
  26196. }
  26197. ]
  26198. }
  26199. },
  26200. "result": {},
  26201. "provider": {
  26202. "type": "object",
  26203. "properties": {
  26204. "executed": {
  26205. "type": "boolean"
  26206. },
  26207. "metadata": {
  26208. "type": "object",
  26209. "additionalProperties": {
  26210. "type": "object"
  26211. }
  26212. }
  26213. },
  26214. "required": ["executed"],
  26215. "additionalProperties": false
  26216. }
  26217. },
  26218. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  26219. "additionalProperties": false
  26220. }
  26221. },
  26222. "required": ["id", "type", "properties"],
  26223. "additionalProperties": false
  26224. },
  26225. "EventSessionNextToolFailed": {
  26226. "type": "object",
  26227. "properties": {
  26228. "id": {
  26229. "type": "string",
  26230. "pattern": "^evt_"
  26231. },
  26232. "type": {
  26233. "type": "string",
  26234. "enum": ["session.next.tool.failed"]
  26235. },
  26236. "properties": {
  26237. "type": "object",
  26238. "properties": {
  26239. "timestamp": {
  26240. "type": "number"
  26241. },
  26242. "sessionID": {
  26243. "type": "string",
  26244. "pattern": "^ses"
  26245. },
  26246. "assistantMessageID": {
  26247. "type": "string",
  26248. "pattern": "^msg_"
  26249. },
  26250. "callID": {
  26251. "type": "string"
  26252. },
  26253. "error": {
  26254. "$ref": "#/components/schemas/SessionErrorUnknown"
  26255. },
  26256. "result": {},
  26257. "provider": {
  26258. "type": "object",
  26259. "properties": {
  26260. "executed": {
  26261. "type": "boolean"
  26262. },
  26263. "metadata": {
  26264. "type": "object",
  26265. "additionalProperties": {
  26266. "type": "object"
  26267. }
  26268. }
  26269. },
  26270. "required": ["executed"],
  26271. "additionalProperties": false
  26272. }
  26273. },
  26274. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26275. "additionalProperties": false
  26276. }
  26277. },
  26278. "required": ["id", "type", "properties"],
  26279. "additionalProperties": false
  26280. },
  26281. "EventSessionNextRetried": {
  26282. "type": "object",
  26283. "properties": {
  26284. "id": {
  26285. "type": "string",
  26286. "pattern": "^evt_"
  26287. },
  26288. "type": {
  26289. "type": "string",
  26290. "enum": ["session.next.retried"]
  26291. },
  26292. "properties": {
  26293. "type": "object",
  26294. "properties": {
  26295. "timestamp": {
  26296. "type": "number"
  26297. },
  26298. "sessionID": {
  26299. "type": "string",
  26300. "pattern": "^ses"
  26301. },
  26302. "attempt": {
  26303. "type": "number"
  26304. },
  26305. "error": {
  26306. "$ref": "#/components/schemas/SessionNextRetry_error"
  26307. }
  26308. },
  26309. "required": ["timestamp", "sessionID", "attempt", "error"],
  26310. "additionalProperties": false
  26311. }
  26312. },
  26313. "required": ["id", "type", "properties"],
  26314. "additionalProperties": false
  26315. },
  26316. "EventSessionNextCompactionStarted": {
  26317. "type": "object",
  26318. "properties": {
  26319. "id": {
  26320. "type": "string",
  26321. "pattern": "^evt_"
  26322. },
  26323. "type": {
  26324. "type": "string",
  26325. "enum": ["session.next.compaction.started"]
  26326. },
  26327. "properties": {
  26328. "type": "object",
  26329. "properties": {
  26330. "timestamp": {
  26331. "type": "number"
  26332. },
  26333. "sessionID": {
  26334. "type": "string",
  26335. "pattern": "^ses"
  26336. },
  26337. "messageID": {
  26338. "type": "string",
  26339. "pattern": "^msg_"
  26340. },
  26341. "reason": {
  26342. "type": "string",
  26343. "enum": ["auto", "manual"]
  26344. }
  26345. },
  26346. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26347. "additionalProperties": false
  26348. }
  26349. },
  26350. "required": ["id", "type", "properties"],
  26351. "additionalProperties": false
  26352. },
  26353. "EventSessionNextCompactionDelta": {
  26354. "type": "object",
  26355. "properties": {
  26356. "id": {
  26357. "type": "string",
  26358. "pattern": "^evt_"
  26359. },
  26360. "type": {
  26361. "type": "string",
  26362. "enum": ["session.next.compaction.delta"]
  26363. },
  26364. "properties": {
  26365. "type": "object",
  26366. "properties": {
  26367. "timestamp": {
  26368. "type": "number"
  26369. },
  26370. "sessionID": {
  26371. "type": "string",
  26372. "pattern": "^ses"
  26373. },
  26374. "text": {
  26375. "type": "string"
  26376. }
  26377. },
  26378. "required": ["timestamp", "sessionID", "text"],
  26379. "additionalProperties": false
  26380. }
  26381. },
  26382. "required": ["id", "type", "properties"],
  26383. "additionalProperties": false
  26384. },
  26385. "EventSessionNextCompactionEnded": {
  26386. "type": "object",
  26387. "properties": {
  26388. "id": {
  26389. "type": "string",
  26390. "pattern": "^evt_"
  26391. },
  26392. "type": {
  26393. "type": "string",
  26394. "enum": ["session.next.compaction.ended"]
  26395. },
  26396. "properties": {
  26397. "type": "object",
  26398. "properties": {
  26399. "timestamp": {
  26400. "type": "number"
  26401. },
  26402. "sessionID": {
  26403. "type": "string",
  26404. "pattern": "^ses"
  26405. },
  26406. "text": {
  26407. "type": "string"
  26408. },
  26409. "include": {
  26410. "type": "string"
  26411. }
  26412. },
  26413. "required": ["timestamp", "sessionID", "text"],
  26414. "additionalProperties": false
  26415. }
  26416. },
  26417. "required": ["id", "type", "properties"],
  26418. "additionalProperties": false
  26419. },
  26420. "EventMessagePartDelta": {
  26421. "type": "object",
  26422. "properties": {
  26423. "id": {
  26424. "type": "string",
  26425. "pattern": "^evt_"
  26426. },
  26427. "type": {
  26428. "type": "string",
  26429. "enum": ["message.part.delta"]
  26430. },
  26431. "properties": {
  26432. "type": "object",
  26433. "properties": {
  26434. "sessionID": {
  26435. "type": "string",
  26436. "pattern": "^ses"
  26437. },
  26438. "messageID": {
  26439. "type": "string",
  26440. "pattern": "^msg"
  26441. },
  26442. "partID": {
  26443. "type": "string",
  26444. "pattern": "^prt"
  26445. },
  26446. "field": {
  26447. "type": "string"
  26448. },
  26449. "delta": {
  26450. "type": "string"
  26451. }
  26452. },
  26453. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  26454. "additionalProperties": false
  26455. }
  26456. },
  26457. "required": ["id", "type", "properties"],
  26458. "additionalProperties": false
  26459. },
  26460. "EventSessionDiff": {
  26461. "type": "object",
  26462. "properties": {
  26463. "id": {
  26464. "type": "string",
  26465. "pattern": "^evt_"
  26466. },
  26467. "type": {
  26468. "type": "string",
  26469. "enum": ["session.diff"]
  26470. },
  26471. "properties": {
  26472. "type": "object",
  26473. "properties": {
  26474. "sessionID": {
  26475. "type": "string",
  26476. "pattern": "^ses"
  26477. },
  26478. "diff": {
  26479. "type": "array",
  26480. "items": {
  26481. "$ref": "#/components/schemas/SnapshotFileDiff"
  26482. }
  26483. }
  26484. },
  26485. "required": ["sessionID", "diff"],
  26486. "additionalProperties": false
  26487. }
  26488. },
  26489. "required": ["id", "type", "properties"],
  26490. "additionalProperties": false
  26491. },
  26492. "EventSessionError": {
  26493. "type": "object",
  26494. "properties": {
  26495. "id": {
  26496. "type": "string",
  26497. "pattern": "^evt_"
  26498. },
  26499. "type": {
  26500. "type": "string",
  26501. "enum": ["session.error"]
  26502. },
  26503. "properties": {
  26504. "type": "object",
  26505. "properties": {
  26506. "sessionID": {
  26507. "type": "string",
  26508. "pattern": "^ses"
  26509. },
  26510. "error": {
  26511. "anyOf": [
  26512. {
  26513. "$ref": "#/components/schemas/ProviderAuthError"
  26514. },
  26515. {
  26516. "$ref": "#/components/schemas/UnknownError"
  26517. },
  26518. {
  26519. "$ref": "#/components/schemas/MessageOutputLengthError"
  26520. },
  26521. {
  26522. "$ref": "#/components/schemas/MessageAbortedError"
  26523. },
  26524. {
  26525. "$ref": "#/components/schemas/StructuredOutputError"
  26526. },
  26527. {
  26528. "$ref": "#/components/schemas/ContextOverflowError"
  26529. },
  26530. {
  26531. "$ref": "#/components/schemas/APIError"
  26532. }
  26533. ]
  26534. }
  26535. },
  26536. "additionalProperties": false
  26537. }
  26538. },
  26539. "required": ["id", "type", "properties"],
  26540. "additionalProperties": false
  26541. },
  26542. "EventInstallationUpdated": {
  26543. "type": "object",
  26544. "properties": {
  26545. "id": {
  26546. "type": "string",
  26547. "pattern": "^evt_"
  26548. },
  26549. "type": {
  26550. "type": "string",
  26551. "enum": ["installation.updated"]
  26552. },
  26553. "properties": {
  26554. "type": "object",
  26555. "properties": {
  26556. "version": {
  26557. "type": "string"
  26558. }
  26559. },
  26560. "required": ["version"],
  26561. "additionalProperties": false
  26562. }
  26563. },
  26564. "required": ["id", "type", "properties"],
  26565. "additionalProperties": false
  26566. },
  26567. "EventInstallationUpdate-available": {
  26568. "type": "object",
  26569. "properties": {
  26570. "id": {
  26571. "type": "string",
  26572. "pattern": "^evt_"
  26573. },
  26574. "type": {
  26575. "type": "string",
  26576. "enum": ["installation.update-available"]
  26577. },
  26578. "properties": {
  26579. "type": "object",
  26580. "properties": {
  26581. "version": {
  26582. "type": "string"
  26583. }
  26584. },
  26585. "required": ["version"],
  26586. "additionalProperties": false
  26587. }
  26588. },
  26589. "required": ["id", "type", "properties"],
  26590. "additionalProperties": false
  26591. },
  26592. "EventFileEdited": {
  26593. "type": "object",
  26594. "properties": {
  26595. "id": {
  26596. "type": "string",
  26597. "pattern": "^evt_"
  26598. },
  26599. "type": {
  26600. "type": "string",
  26601. "enum": ["file.edited"]
  26602. },
  26603. "properties": {
  26604. "type": "object",
  26605. "properties": {
  26606. "file": {
  26607. "type": "string"
  26608. }
  26609. },
  26610. "required": ["file"],
  26611. "additionalProperties": false
  26612. }
  26613. },
  26614. "required": ["id", "type", "properties"],
  26615. "additionalProperties": false
  26616. },
  26617. "EventAccountAdded": {
  26618. "type": "object",
  26619. "properties": {
  26620. "id": {
  26621. "type": "string",
  26622. "pattern": "^evt_"
  26623. },
  26624. "type": {
  26625. "type": "string",
  26626. "enum": ["account.added"]
  26627. },
  26628. "properties": {
  26629. "type": "object",
  26630. "properties": {
  26631. "account": {
  26632. "$ref": "#/components/schemas/AuthInfo"
  26633. }
  26634. },
  26635. "required": ["account"],
  26636. "additionalProperties": false
  26637. }
  26638. },
  26639. "required": ["id", "type", "properties"],
  26640. "additionalProperties": false
  26641. },
  26642. "EventAccountRemoved": {
  26643. "type": "object",
  26644. "properties": {
  26645. "id": {
  26646. "type": "string",
  26647. "pattern": "^evt_"
  26648. },
  26649. "type": {
  26650. "type": "string",
  26651. "enum": ["account.removed"]
  26652. },
  26653. "properties": {
  26654. "type": "object",
  26655. "properties": {
  26656. "account": {
  26657. "$ref": "#/components/schemas/AuthInfo"
  26658. }
  26659. },
  26660. "required": ["account"],
  26661. "additionalProperties": false
  26662. }
  26663. },
  26664. "required": ["id", "type", "properties"],
  26665. "additionalProperties": false
  26666. },
  26667. "EventAccountSwitched": {
  26668. "type": "object",
  26669. "properties": {
  26670. "id": {
  26671. "type": "string",
  26672. "pattern": "^evt_"
  26673. },
  26674. "type": {
  26675. "type": "string",
  26676. "enum": ["account.switched"]
  26677. },
  26678. "properties": {
  26679. "type": "object",
  26680. "properties": {
  26681. "serviceID": {
  26682. "type": "string"
  26683. },
  26684. "from": {
  26685. "type": "string"
  26686. },
  26687. "to": {
  26688. "type": "string"
  26689. }
  26690. },
  26691. "required": ["serviceID"],
  26692. "additionalProperties": false
  26693. }
  26694. },
  26695. "required": ["id", "type", "properties"],
  26696. "additionalProperties": false
  26697. },
  26698. "EventPermissionV2Asked": {
  26699. "type": "object",
  26700. "properties": {
  26701. "id": {
  26702. "type": "string",
  26703. "pattern": "^evt_"
  26704. },
  26705. "type": {
  26706. "type": "string",
  26707. "enum": ["permission.v2.asked"]
  26708. },
  26709. "properties": {
  26710. "type": "object",
  26711. "properties": {
  26712. "id": {
  26713. "type": "string",
  26714. "pattern": "^per"
  26715. },
  26716. "sessionID": {
  26717. "type": "string",
  26718. "pattern": "^ses"
  26719. },
  26720. "action": {
  26721. "type": "string"
  26722. },
  26723. "resources": {
  26724. "type": "array",
  26725. "items": {
  26726. "type": "string"
  26727. }
  26728. },
  26729. "save": {
  26730. "type": "array",
  26731. "items": {
  26732. "type": "string"
  26733. }
  26734. },
  26735. "metadata": {
  26736. "type": "object"
  26737. },
  26738. "source": {
  26739. "$ref": "#/components/schemas/PermissionV2Source"
  26740. }
  26741. },
  26742. "required": ["id", "sessionID", "action", "resources"],
  26743. "additionalProperties": false
  26744. }
  26745. },
  26746. "required": ["id", "type", "properties"],
  26747. "additionalProperties": false
  26748. },
  26749. "EventPermissionV2Replied": {
  26750. "type": "object",
  26751. "properties": {
  26752. "id": {
  26753. "type": "string",
  26754. "pattern": "^evt_"
  26755. },
  26756. "type": {
  26757. "type": "string",
  26758. "enum": ["permission.v2.replied"]
  26759. },
  26760. "properties": {
  26761. "type": "object",
  26762. "properties": {
  26763. "sessionID": {
  26764. "type": "string",
  26765. "pattern": "^ses"
  26766. },
  26767. "requestID": {
  26768. "type": "string",
  26769. "pattern": "^per"
  26770. },
  26771. "reply": {
  26772. "$ref": "#/components/schemas/PermissionV2Reply"
  26773. }
  26774. },
  26775. "required": ["sessionID", "requestID", "reply"],
  26776. "additionalProperties": false
  26777. }
  26778. },
  26779. "required": ["id", "type", "properties"],
  26780. "additionalProperties": false
  26781. },
  26782. "EventFileWatcherUpdated": {
  26783. "type": "object",
  26784. "properties": {
  26785. "id": {
  26786. "type": "string",
  26787. "pattern": "^evt_"
  26788. },
  26789. "type": {
  26790. "type": "string",
  26791. "enum": ["file.watcher.updated"]
  26792. },
  26793. "properties": {
  26794. "type": "object",
  26795. "properties": {
  26796. "file": {
  26797. "type": "string"
  26798. },
  26799. "event": {
  26800. "type": "string",
  26801. "enum": ["add", "change", "unlink"]
  26802. }
  26803. },
  26804. "required": ["file", "event"],
  26805. "additionalProperties": false
  26806. }
  26807. },
  26808. "required": ["id", "type", "properties"],
  26809. "additionalProperties": false
  26810. },
  26811. "EventPtyCreated": {
  26812. "type": "object",
  26813. "properties": {
  26814. "id": {
  26815. "type": "string",
  26816. "pattern": "^evt_"
  26817. },
  26818. "type": {
  26819. "type": "string",
  26820. "enum": ["pty.created"]
  26821. },
  26822. "properties": {
  26823. "type": "object",
  26824. "properties": {
  26825. "info": {
  26826. "$ref": "#/components/schemas/Pty"
  26827. }
  26828. },
  26829. "required": ["info"],
  26830. "additionalProperties": false
  26831. }
  26832. },
  26833. "required": ["id", "type", "properties"],
  26834. "additionalProperties": false
  26835. },
  26836. "EventPtyUpdated": {
  26837. "type": "object",
  26838. "properties": {
  26839. "id": {
  26840. "type": "string",
  26841. "pattern": "^evt_"
  26842. },
  26843. "type": {
  26844. "type": "string",
  26845. "enum": ["pty.updated"]
  26846. },
  26847. "properties": {
  26848. "type": "object",
  26849. "properties": {
  26850. "info": {
  26851. "$ref": "#/components/schemas/Pty"
  26852. }
  26853. },
  26854. "required": ["info"],
  26855. "additionalProperties": false
  26856. }
  26857. },
  26858. "required": ["id", "type", "properties"],
  26859. "additionalProperties": false
  26860. },
  26861. "EventPtyExited": {
  26862. "type": "object",
  26863. "properties": {
  26864. "id": {
  26865. "type": "string",
  26866. "pattern": "^evt_"
  26867. },
  26868. "type": {
  26869. "type": "string",
  26870. "enum": ["pty.exited"]
  26871. },
  26872. "properties": {
  26873. "type": "object",
  26874. "properties": {
  26875. "id": {
  26876. "type": "string",
  26877. "pattern": "^pty"
  26878. },
  26879. "exitCode": {
  26880. "type": "integer",
  26881. "minimum": 0
  26882. }
  26883. },
  26884. "required": ["id", "exitCode"],
  26885. "additionalProperties": false
  26886. }
  26887. },
  26888. "required": ["id", "type", "properties"],
  26889. "additionalProperties": false
  26890. },
  26891. "EventPtyDeleted": {
  26892. "type": "object",
  26893. "properties": {
  26894. "id": {
  26895. "type": "string",
  26896. "pattern": "^evt_"
  26897. },
  26898. "type": {
  26899. "type": "string",
  26900. "enum": ["pty.deleted"]
  26901. },
  26902. "properties": {
  26903. "type": "object",
  26904. "properties": {
  26905. "id": {
  26906. "type": "string",
  26907. "pattern": "^pty"
  26908. }
  26909. },
  26910. "required": ["id"],
  26911. "additionalProperties": false
  26912. }
  26913. },
  26914. "required": ["id", "type", "properties"],
  26915. "additionalProperties": false
  26916. },
  26917. "EventQuestionV2Asked": {
  26918. "type": "object",
  26919. "properties": {
  26920. "id": {
  26921. "type": "string",
  26922. "pattern": "^evt_"
  26923. },
  26924. "type": {
  26925. "type": "string",
  26926. "enum": ["question.v2.asked"]
  26927. },
  26928. "properties": {
  26929. "type": "object",
  26930. "properties": {
  26931. "id": {
  26932. "type": "string",
  26933. "pattern": "^que"
  26934. },
  26935. "sessionID": {
  26936. "type": "string",
  26937. "pattern": "^ses"
  26938. },
  26939. "questions": {
  26940. "type": "array",
  26941. "items": {
  26942. "$ref": "#/components/schemas/QuestionV2Info"
  26943. },
  26944. "description": "Questions to ask"
  26945. },
  26946. "tool": {
  26947. "$ref": "#/components/schemas/QuestionV2Tool"
  26948. }
  26949. },
  26950. "required": ["id", "sessionID", "questions"],
  26951. "additionalProperties": false
  26952. }
  26953. },
  26954. "required": ["id", "type", "properties"],
  26955. "additionalProperties": false
  26956. },
  26957. "EventQuestionV2Replied": {
  26958. "type": "object",
  26959. "properties": {
  26960. "id": {
  26961. "type": "string",
  26962. "pattern": "^evt_"
  26963. },
  26964. "type": {
  26965. "type": "string",
  26966. "enum": ["question.v2.replied"]
  26967. },
  26968. "properties": {
  26969. "type": "object",
  26970. "properties": {
  26971. "sessionID": {
  26972. "type": "string",
  26973. "pattern": "^ses"
  26974. },
  26975. "requestID": {
  26976. "type": "string",
  26977. "pattern": "^que"
  26978. },
  26979. "answers": {
  26980. "type": "array",
  26981. "items": {
  26982. "$ref": "#/components/schemas/QuestionV2Answer"
  26983. }
  26984. }
  26985. },
  26986. "required": ["sessionID", "requestID", "answers"],
  26987. "additionalProperties": false
  26988. }
  26989. },
  26990. "required": ["id", "type", "properties"],
  26991. "additionalProperties": false
  26992. },
  26993. "EventQuestionV2Rejected": {
  26994. "type": "object",
  26995. "properties": {
  26996. "id": {
  26997. "type": "string",
  26998. "pattern": "^evt_"
  26999. },
  27000. "type": {
  27001. "type": "string",
  27002. "enum": ["question.v2.rejected"]
  27003. },
  27004. "properties": {
  27005. "type": "object",
  27006. "properties": {
  27007. "sessionID": {
  27008. "type": "string",
  27009. "pattern": "^ses"
  27010. },
  27011. "requestID": {
  27012. "type": "string",
  27013. "pattern": "^que"
  27014. }
  27015. },
  27016. "required": ["sessionID", "requestID"],
  27017. "additionalProperties": false
  27018. }
  27019. },
  27020. "required": ["id", "type", "properties"],
  27021. "additionalProperties": false
  27022. },
  27023. "EventTodoUpdated": {
  27024. "type": "object",
  27025. "properties": {
  27026. "id": {
  27027. "type": "string",
  27028. "pattern": "^evt_"
  27029. },
  27030. "type": {
  27031. "type": "string",
  27032. "enum": ["todo.updated"]
  27033. },
  27034. "properties": {
  27035. "type": "object",
  27036. "properties": {
  27037. "sessionID": {
  27038. "type": "string",
  27039. "pattern": "^ses"
  27040. },
  27041. "todos": {
  27042. "type": "array",
  27043. "items": {
  27044. "$ref": "#/components/schemas/Todo"
  27045. }
  27046. }
  27047. },
  27048. "required": ["sessionID", "todos"],
  27049. "additionalProperties": false
  27050. }
  27051. },
  27052. "required": ["id", "type", "properties"],
  27053. "additionalProperties": false
  27054. },
  27055. "EventLspUpdated": {
  27056. "type": "object",
  27057. "properties": {
  27058. "id": {
  27059. "type": "string",
  27060. "pattern": "^evt_"
  27061. },
  27062. "type": {
  27063. "type": "string",
  27064. "enum": ["lsp.updated"]
  27065. },
  27066. "properties": {
  27067. "type": "object",
  27068. "properties": {}
  27069. }
  27070. },
  27071. "required": ["id", "type", "properties"],
  27072. "additionalProperties": false
  27073. },
  27074. "EventPermissionAsked": {
  27075. "type": "object",
  27076. "properties": {
  27077. "id": {
  27078. "type": "string",
  27079. "pattern": "^evt_"
  27080. },
  27081. "type": {
  27082. "type": "string",
  27083. "enum": ["permission.asked"]
  27084. },
  27085. "properties": {
  27086. "type": "object",
  27087. "properties": {
  27088. "id": {
  27089. "type": "string",
  27090. "pattern": "^per"
  27091. },
  27092. "sessionID": {
  27093. "type": "string",
  27094. "pattern": "^ses"
  27095. },
  27096. "permission": {
  27097. "type": "string"
  27098. },
  27099. "patterns": {
  27100. "type": "array",
  27101. "items": {
  27102. "type": "string"
  27103. }
  27104. },
  27105. "metadata": {
  27106. "type": "object"
  27107. },
  27108. "always": {
  27109. "type": "array",
  27110. "items": {
  27111. "type": "string"
  27112. }
  27113. },
  27114. "tool": {
  27115. "type": "object",
  27116. "properties": {
  27117. "messageID": {
  27118. "type": "string"
  27119. },
  27120. "callID": {
  27121. "type": "string"
  27122. }
  27123. },
  27124. "required": ["messageID", "callID"],
  27125. "additionalProperties": false
  27126. }
  27127. },
  27128. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  27129. "additionalProperties": false
  27130. }
  27131. },
  27132. "required": ["id", "type", "properties"],
  27133. "additionalProperties": false
  27134. },
  27135. "EventPermissionReplied": {
  27136. "type": "object",
  27137. "properties": {
  27138. "id": {
  27139. "type": "string",
  27140. "pattern": "^evt_"
  27141. },
  27142. "type": {
  27143. "type": "string",
  27144. "enum": ["permission.replied"]
  27145. },
  27146. "properties": {
  27147. "type": "object",
  27148. "properties": {
  27149. "sessionID": {
  27150. "type": "string",
  27151. "pattern": "^ses"
  27152. },
  27153. "requestID": {
  27154. "type": "string",
  27155. "pattern": "^per"
  27156. },
  27157. "reply": {
  27158. "type": "string",
  27159. "enum": ["once", "always", "reject"]
  27160. }
  27161. },
  27162. "required": ["sessionID", "requestID", "reply"],
  27163. "additionalProperties": false
  27164. }
  27165. },
  27166. "required": ["id", "type", "properties"],
  27167. "additionalProperties": false
  27168. },
  27169. "EventMcpToolsChanged": {
  27170. "type": "object",
  27171. "properties": {
  27172. "id": {
  27173. "type": "string",
  27174. "pattern": "^evt_"
  27175. },
  27176. "type": {
  27177. "type": "string",
  27178. "enum": ["mcp.tools.changed"]
  27179. },
  27180. "properties": {
  27181. "type": "object",
  27182. "properties": {
  27183. "server": {
  27184. "type": "string"
  27185. }
  27186. },
  27187. "required": ["server"],
  27188. "additionalProperties": false
  27189. }
  27190. },
  27191. "required": ["id", "type", "properties"],
  27192. "additionalProperties": false
  27193. },
  27194. "EventMcpBrowserOpenFailed": {
  27195. "type": "object",
  27196. "properties": {
  27197. "id": {
  27198. "type": "string",
  27199. "pattern": "^evt_"
  27200. },
  27201. "type": {
  27202. "type": "string",
  27203. "enum": ["mcp.browser.open.failed"]
  27204. },
  27205. "properties": {
  27206. "type": "object",
  27207. "properties": {
  27208. "mcpName": {
  27209. "type": "string"
  27210. },
  27211. "url": {
  27212. "type": "string"
  27213. }
  27214. },
  27215. "required": ["mcpName", "url"],
  27216. "additionalProperties": false
  27217. }
  27218. },
  27219. "required": ["id", "type", "properties"],
  27220. "additionalProperties": false
  27221. },
  27222. "EventCommandExecuted": {
  27223. "type": "object",
  27224. "properties": {
  27225. "id": {
  27226. "type": "string",
  27227. "pattern": "^evt_"
  27228. },
  27229. "type": {
  27230. "type": "string",
  27231. "enum": ["command.executed"]
  27232. },
  27233. "properties": {
  27234. "type": "object",
  27235. "properties": {
  27236. "name": {
  27237. "type": "string"
  27238. },
  27239. "sessionID": {
  27240. "type": "string",
  27241. "pattern": "^ses"
  27242. },
  27243. "arguments": {
  27244. "type": "string"
  27245. },
  27246. "messageID": {
  27247. "type": "string",
  27248. "pattern": "^msg"
  27249. }
  27250. },
  27251. "required": ["name", "sessionID", "arguments", "messageID"],
  27252. "additionalProperties": false
  27253. }
  27254. },
  27255. "required": ["id", "type", "properties"],
  27256. "additionalProperties": false
  27257. },
  27258. "EventProjectDirectoriesUpdated": {
  27259. "type": "object",
  27260. "properties": {
  27261. "id": {
  27262. "type": "string",
  27263. "pattern": "^evt_"
  27264. },
  27265. "type": {
  27266. "type": "string",
  27267. "enum": ["project.directories.updated"]
  27268. },
  27269. "properties": {
  27270. "type": "object",
  27271. "properties": {
  27272. "projectID": {
  27273. "type": "string"
  27274. }
  27275. },
  27276. "required": ["projectID"],
  27277. "additionalProperties": false
  27278. }
  27279. },
  27280. "required": ["id", "type", "properties"],
  27281. "additionalProperties": false
  27282. },
  27283. "EventProjectUpdated": {
  27284. "type": "object",
  27285. "properties": {
  27286. "id": {
  27287. "type": "string",
  27288. "pattern": "^evt_"
  27289. },
  27290. "type": {
  27291. "type": "string",
  27292. "enum": ["project.updated"]
  27293. },
  27294. "properties": {
  27295. "type": "object",
  27296. "properties": {
  27297. "id": {
  27298. "type": "string"
  27299. },
  27300. "worktree": {
  27301. "type": "string"
  27302. },
  27303. "vcs": {
  27304. "type": "string",
  27305. "enum": ["git"]
  27306. },
  27307. "name": {
  27308. "type": "string"
  27309. },
  27310. "icon": {
  27311. "type": "object",
  27312. "properties": {
  27313. "url": {
  27314. "type": "string"
  27315. },
  27316. "override": {
  27317. "type": "string"
  27318. },
  27319. "color": {
  27320. "type": "string"
  27321. }
  27322. },
  27323. "additionalProperties": false
  27324. },
  27325. "commands": {
  27326. "type": "object",
  27327. "properties": {
  27328. "start": {
  27329. "type": "string",
  27330. "description": "Startup script to run when creating a new workspace (worktree)"
  27331. }
  27332. },
  27333. "additionalProperties": false
  27334. },
  27335. "time": {
  27336. "type": "object",
  27337. "properties": {
  27338. "created": {
  27339. "type": "integer",
  27340. "minimum": 0
  27341. },
  27342. "updated": {
  27343. "type": "integer",
  27344. "minimum": 0
  27345. },
  27346. "initialized": {
  27347. "type": "integer",
  27348. "minimum": 0
  27349. }
  27350. },
  27351. "required": ["created", "updated"],
  27352. "additionalProperties": false
  27353. },
  27354. "sandboxes": {
  27355. "type": "array",
  27356. "items": {
  27357. "type": "string"
  27358. }
  27359. }
  27360. },
  27361. "required": ["id", "worktree", "time", "sandboxes"],
  27362. "additionalProperties": false
  27363. }
  27364. },
  27365. "required": ["id", "type", "properties"],
  27366. "additionalProperties": false
  27367. },
  27368. "EventQuestionAsked": {
  27369. "type": "object",
  27370. "properties": {
  27371. "id": {
  27372. "type": "string",
  27373. "pattern": "^evt_"
  27374. },
  27375. "type": {
  27376. "type": "string",
  27377. "enum": ["question.asked"]
  27378. },
  27379. "properties": {
  27380. "type": "object",
  27381. "properties": {
  27382. "id": {
  27383. "type": "string",
  27384. "pattern": "^que"
  27385. },
  27386. "sessionID": {
  27387. "type": "string",
  27388. "pattern": "^ses"
  27389. },
  27390. "questions": {
  27391. "type": "array",
  27392. "items": {
  27393. "$ref": "#/components/schemas/QuestionInfo"
  27394. },
  27395. "description": "Questions to ask"
  27396. },
  27397. "tool": {
  27398. "$ref": "#/components/schemas/QuestionTool"
  27399. }
  27400. },
  27401. "required": ["id", "sessionID", "questions"],
  27402. "additionalProperties": false
  27403. }
  27404. },
  27405. "required": ["id", "type", "properties"],
  27406. "additionalProperties": false
  27407. },
  27408. "EventQuestionReplied": {
  27409. "type": "object",
  27410. "properties": {
  27411. "id": {
  27412. "type": "string",
  27413. "pattern": "^evt_"
  27414. },
  27415. "type": {
  27416. "type": "string",
  27417. "enum": ["question.replied"]
  27418. },
  27419. "properties": {
  27420. "type": "object",
  27421. "properties": {
  27422. "sessionID": {
  27423. "type": "string",
  27424. "pattern": "^ses"
  27425. },
  27426. "requestID": {
  27427. "type": "string",
  27428. "pattern": "^que"
  27429. },
  27430. "answers": {
  27431. "type": "array",
  27432. "items": {
  27433. "$ref": "#/components/schemas/QuestionAnswer"
  27434. }
  27435. }
  27436. },
  27437. "required": ["sessionID", "requestID", "answers"],
  27438. "additionalProperties": false
  27439. }
  27440. },
  27441. "required": ["id", "type", "properties"],
  27442. "additionalProperties": false
  27443. },
  27444. "EventQuestionRejected": {
  27445. "type": "object",
  27446. "properties": {
  27447. "id": {
  27448. "type": "string",
  27449. "pattern": "^evt_"
  27450. },
  27451. "type": {
  27452. "type": "string",
  27453. "enum": ["question.rejected"]
  27454. },
  27455. "properties": {
  27456. "type": "object",
  27457. "properties": {
  27458. "sessionID": {
  27459. "type": "string",
  27460. "pattern": "^ses"
  27461. },
  27462. "requestID": {
  27463. "type": "string",
  27464. "pattern": "^que"
  27465. }
  27466. },
  27467. "required": ["sessionID", "requestID"],
  27468. "additionalProperties": false
  27469. }
  27470. },
  27471. "required": ["id", "type", "properties"],
  27472. "additionalProperties": false
  27473. },
  27474. "EventSessionStatus": {
  27475. "type": "object",
  27476. "properties": {
  27477. "id": {
  27478. "type": "string",
  27479. "pattern": "^evt_"
  27480. },
  27481. "type": {
  27482. "type": "string",
  27483. "enum": ["session.status"]
  27484. },
  27485. "properties": {
  27486. "type": "object",
  27487. "properties": {
  27488. "sessionID": {
  27489. "type": "string",
  27490. "pattern": "^ses"
  27491. },
  27492. "status": {
  27493. "$ref": "#/components/schemas/SessionStatus"
  27494. }
  27495. },
  27496. "required": ["sessionID", "status"],
  27497. "additionalProperties": false
  27498. }
  27499. },
  27500. "required": ["id", "type", "properties"],
  27501. "additionalProperties": false
  27502. },
  27503. "EventSessionIdle": {
  27504. "type": "object",
  27505. "properties": {
  27506. "id": {
  27507. "type": "string",
  27508. "pattern": "^evt_"
  27509. },
  27510. "type": {
  27511. "type": "string",
  27512. "enum": ["session.idle"]
  27513. },
  27514. "properties": {
  27515. "type": "object",
  27516. "properties": {
  27517. "sessionID": {
  27518. "type": "string",
  27519. "pattern": "^ses"
  27520. }
  27521. },
  27522. "required": ["sessionID"],
  27523. "additionalProperties": false
  27524. }
  27525. },
  27526. "required": ["id", "type", "properties"],
  27527. "additionalProperties": false
  27528. },
  27529. "EventSessionCompacted": {
  27530. "type": "object",
  27531. "properties": {
  27532. "id": {
  27533. "type": "string",
  27534. "pattern": "^evt_"
  27535. },
  27536. "type": {
  27537. "type": "string",
  27538. "enum": ["session.compacted"]
  27539. },
  27540. "properties": {
  27541. "type": "object",
  27542. "properties": {
  27543. "sessionID": {
  27544. "type": "string",
  27545. "pattern": "^ses"
  27546. }
  27547. },
  27548. "required": ["sessionID"],
  27549. "additionalProperties": false
  27550. }
  27551. },
  27552. "required": ["id", "type", "properties"],
  27553. "additionalProperties": false
  27554. },
  27555. "EventVcsBranchUpdated": {
  27556. "type": "object",
  27557. "properties": {
  27558. "id": {
  27559. "type": "string",
  27560. "pattern": "^evt_"
  27561. },
  27562. "type": {
  27563. "type": "string",
  27564. "enum": ["vcs.branch.updated"]
  27565. },
  27566. "properties": {
  27567. "type": "object",
  27568. "properties": {
  27569. "branch": {
  27570. "type": "string"
  27571. }
  27572. },
  27573. "additionalProperties": false
  27574. }
  27575. },
  27576. "required": ["id", "type", "properties"],
  27577. "additionalProperties": false
  27578. },
  27579. "EventWorktreeReady": {
  27580. "type": "object",
  27581. "properties": {
  27582. "id": {
  27583. "type": "string",
  27584. "pattern": "^evt_"
  27585. },
  27586. "type": {
  27587. "type": "string",
  27588. "enum": ["worktree.ready"]
  27589. },
  27590. "properties": {
  27591. "type": "object",
  27592. "properties": {
  27593. "name": {
  27594. "type": "string"
  27595. },
  27596. "branch": {
  27597. "type": "string"
  27598. }
  27599. },
  27600. "required": ["name"],
  27601. "additionalProperties": false
  27602. }
  27603. },
  27604. "required": ["id", "type", "properties"],
  27605. "additionalProperties": false
  27606. },
  27607. "EventWorktreeFailed": {
  27608. "type": "object",
  27609. "properties": {
  27610. "id": {
  27611. "type": "string",
  27612. "pattern": "^evt_"
  27613. },
  27614. "type": {
  27615. "type": "string",
  27616. "enum": ["worktree.failed"]
  27617. },
  27618. "properties": {
  27619. "type": "object",
  27620. "properties": {
  27621. "message": {
  27622. "type": "string"
  27623. }
  27624. },
  27625. "required": ["message"],
  27626. "additionalProperties": false
  27627. }
  27628. },
  27629. "required": ["id", "type", "properties"],
  27630. "additionalProperties": false
  27631. },
  27632. "EventWorkspaceReady": {
  27633. "type": "object",
  27634. "properties": {
  27635. "id": {
  27636. "type": "string",
  27637. "pattern": "^evt_"
  27638. },
  27639. "type": {
  27640. "type": "string",
  27641. "enum": ["workspace.ready"]
  27642. },
  27643. "properties": {
  27644. "type": "object",
  27645. "properties": {
  27646. "name": {
  27647. "type": "string"
  27648. }
  27649. },
  27650. "required": ["name"],
  27651. "additionalProperties": false
  27652. }
  27653. },
  27654. "required": ["id", "type", "properties"],
  27655. "additionalProperties": false
  27656. },
  27657. "EventWorkspaceFailed": {
  27658. "type": "object",
  27659. "properties": {
  27660. "id": {
  27661. "type": "string",
  27662. "pattern": "^evt_"
  27663. },
  27664. "type": {
  27665. "type": "string",
  27666. "enum": ["workspace.failed"]
  27667. },
  27668. "properties": {
  27669. "type": "object",
  27670. "properties": {
  27671. "message": {
  27672. "type": "string"
  27673. }
  27674. },
  27675. "required": ["message"],
  27676. "additionalProperties": false
  27677. }
  27678. },
  27679. "required": ["id", "type", "properties"],
  27680. "additionalProperties": false
  27681. },
  27682. "EventWorkspaceStatus": {
  27683. "type": "object",
  27684. "properties": {
  27685. "id": {
  27686. "type": "string",
  27687. "pattern": "^evt_"
  27688. },
  27689. "type": {
  27690. "type": "string",
  27691. "enum": ["workspace.status"]
  27692. },
  27693. "properties": {
  27694. "type": "object",
  27695. "properties": {
  27696. "workspaceID": {
  27697. "type": "string",
  27698. "pattern": "^wrk"
  27699. },
  27700. "status": {
  27701. "type": "string",
  27702. "enum": ["connected", "connecting", "disconnected", "error"]
  27703. }
  27704. },
  27705. "required": ["workspaceID", "status"],
  27706. "additionalProperties": false
  27707. }
  27708. },
  27709. "required": ["id", "type", "properties"],
  27710. "additionalProperties": false
  27711. },
  27712. "EventServerConnected": {
  27713. "type": "object",
  27714. "properties": {
  27715. "id": {
  27716. "type": "string",
  27717. "pattern": "^evt_"
  27718. },
  27719. "type": {
  27720. "type": "string",
  27721. "enum": ["server.connected"]
  27722. },
  27723. "properties": {
  27724. "type": "object",
  27725. "properties": {}
  27726. }
  27727. },
  27728. "required": ["id", "type", "properties"],
  27729. "additionalProperties": false
  27730. },
  27731. "EventGlobalDisposed": {
  27732. "type": "object",
  27733. "properties": {
  27734. "id": {
  27735. "type": "string",
  27736. "pattern": "^evt_"
  27737. },
  27738. "type": {
  27739. "type": "string",
  27740. "enum": ["global.disposed"]
  27741. },
  27742. "properties": {
  27743. "type": "object",
  27744. "properties": {}
  27745. }
  27746. },
  27747. "required": ["id", "type", "properties"],
  27748. "additionalProperties": false
  27749. },
  27750. "BadRequestError": {
  27751. "type": "object",
  27752. "required": ["name", "data"],
  27753. "properties": {
  27754. "name": {
  27755. "type": "string",
  27756. "enum": ["BadRequest"]
  27757. },
  27758. "data": {
  27759. "type": "object",
  27760. "required": ["message"],
  27761. "properties": {
  27762. "message": {
  27763. "type": "string"
  27764. },
  27765. "kind": {
  27766. "type": "string",
  27767. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  27768. }
  27769. }
  27770. }
  27771. }
  27772. }
  27773. }
  27774. },
  27775. "security": [],
  27776. "tags": [
  27777. {
  27778. "name": "control",
  27779. "description": "Control plane routes."
  27780. },
  27781. {
  27782. "name": "controlPlane",
  27783. "description": "Control-plane orchestration routes."
  27784. },
  27785. {
  27786. "name": "global",
  27787. "description": "Global server routes."
  27788. },
  27789. {
  27790. "name": "event",
  27791. "description": "Instance event stream route."
  27792. },
  27793. {
  27794. "name": "config",
  27795. "description": "Experimental HttpApi config routes."
  27796. },
  27797. {
  27798. "name": "experimental",
  27799. "description": "Experimental HttpApi read-only routes."
  27800. },
  27801. {
  27802. "name": "file",
  27803. "description": "Experimental HttpApi file routes."
  27804. },
  27805. {
  27806. "name": "instance",
  27807. "description": "Experimental HttpApi instance read routes."
  27808. },
  27809. {
  27810. "name": "mcp",
  27811. "description": "Experimental HttpApi MCP routes."
  27812. },
  27813. {
  27814. "name": "project",
  27815. "description": "Experimental HttpApi project routes."
  27816. },
  27817. {
  27818. "name": "projectCopy",
  27819. "description": "Project copy management routes."
  27820. },
  27821. {
  27822. "name": "pty",
  27823. "description": "Experimental HttpApi PTY routes."
  27824. },
  27825. {
  27826. "name": "question",
  27827. "description": "Question routes."
  27828. },
  27829. {
  27830. "name": "permission",
  27831. "description": "Experimental HttpApi permission routes."
  27832. },
  27833. {
  27834. "name": "provider",
  27835. "description": "Experimental HttpApi provider routes."
  27836. },
  27837. {
  27838. "name": "session",
  27839. "description": "Experimental HttpApi session routes."
  27840. },
  27841. {
  27842. "name": "sync",
  27843. "description": "Experimental HttpApi sync routes."
  27844. },
  27845. {
  27846. "name": "tui",
  27847. "description": "Experimental HttpApi TUI routes."
  27848. },
  27849. {
  27850. "name": "workspace",
  27851. "description": "Experimental HttpApi workspace routes."
  27852. },
  27853. {
  27854. "name": "opencode experimental HttpApi",
  27855. "description": "Experimental HttpApi surface for selected instance routes."
  27856. },
  27857. {
  27858. "name": "opencode experimental HttpApi",
  27859. "description": "Experimental HttpApi surface for selected instance routes."
  27860. },
  27861. {
  27862. "name": "v2",
  27863. "description": "Experimental v2 routes."
  27864. },
  27865. {
  27866. "name": "v2 messages",
  27867. "description": "Experimental v2 message routes."
  27868. },
  27869. {
  27870. "name": "v2 models",
  27871. "description": "Experimental v2 model routes."
  27872. },
  27873. {
  27874. "name": "v2 providers",
  27875. "description": "Experimental v2 provider routes."
  27876. },
  27877. {
  27878. "name": "v2 permissions",
  27879. "description": "Experimental v2 permission routes."
  27880. },
  27881. {
  27882. "name": "v2 session permissions",
  27883. "description": "Experimental v2 session permission routes."
  27884. },
  27885. {
  27886. "name": "v2 saved permissions",
  27887. "description": "Experimental v2 saved permission routes."
  27888. },
  27889. {
  27890. "name": "v2 filesystem",
  27891. "description": "Experimental v2 location-scoped filesystem routes."
  27892. },
  27893. {
  27894. "name": "v2 commands",
  27895. "description": "Experimental v2 command routes."
  27896. },
  27897. {
  27898. "name": "v2 skills",
  27899. "description": "Experimental v2 skill routes."
  27900. },
  27901. {
  27902. "name": "v2 events",
  27903. "description": "Experimental v2 event stream route."
  27904. },
  27905. {
  27906. "name": "v2 questions",
  27907. "description": "Experimental v2 question routes."
  27908. },
  27909. {
  27910. "name": "v2 session questions",
  27911. "description": "Experimental v2 session question routes."
  27912. },
  27913. {
  27914. "name": "pty",
  27915. "description": "PTY websocket route."
  27916. }
  27917. ]
  27918. }