openapi.json 831 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/console": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.console.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Active Console provider metadata",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ConsoleState"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. },
  856. "500": {
  857. "description": "InternalServerError",
  858. "content": {
  859. "application/json": {
  860. "schema": {
  861. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  868. "summary": "Get active Console provider metadata",
  869. "x-codeSamples": [
  870. {
  871. "lang": "js",
  872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  873. }
  874. ]
  875. }
  876. },
  877. "/experimental/console/orgs": {
  878. "get": {
  879. "tags": ["experimental"],
  880. "operationId": "experimental.console.listOrgs",
  881. "parameters": [
  882. {
  883. "name": "directory",
  884. "in": "query",
  885. "schema": {
  886. "type": "string"
  887. },
  888. "required": false
  889. },
  890. {
  891. "name": "workspace",
  892. "in": "query",
  893. "schema": {
  894. "type": "string"
  895. },
  896. "required": false
  897. }
  898. ],
  899. "responses": {
  900. "200": {
  901. "description": "Switchable Console orgs",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "type": "object",
  906. "properties": {
  907. "orgs": {
  908. "type": "array",
  909. "items": {
  910. "type": "object",
  911. "properties": {
  912. "accountID": {
  913. "type": "string"
  914. },
  915. "accountEmail": {
  916. "type": "string"
  917. },
  918. "accountUrl": {
  919. "type": "string"
  920. },
  921. "orgID": {
  922. "type": "string"
  923. },
  924. "orgName": {
  925. "type": "string"
  926. },
  927. "active": {
  928. "type": "boolean"
  929. }
  930. },
  931. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  932. "additionalProperties": false
  933. }
  934. }
  935. },
  936. "required": ["orgs"],
  937. "additionalProperties": false,
  938. "description": "Switchable Console orgs"
  939. }
  940. }
  941. }
  942. },
  943. "400": {
  944. "description": "Bad request",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/BadRequestError"
  949. }
  950. }
  951. }
  952. },
  953. "500": {
  954. "description": "InternalServerError",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  959. }
  960. }
  961. }
  962. }
  963. },
  964. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  965. "summary": "List switchable Console orgs",
  966. "x-codeSamples": [
  967. {
  968. "lang": "js",
  969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  970. }
  971. ]
  972. }
  973. },
  974. "/experimental/console/switch": {
  975. "post": {
  976. "tags": ["experimental"],
  977. "operationId": "experimental.console.switchOrg",
  978. "parameters": [
  979. {
  980. "name": "directory",
  981. "in": "query",
  982. "schema": {
  983. "type": "string"
  984. },
  985. "required": false
  986. },
  987. {
  988. "name": "workspace",
  989. "in": "query",
  990. "schema": {
  991. "type": "string"
  992. },
  993. "required": false
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "Switch success",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "boolean",
  1003. "description": "Switch success"
  1004. }
  1005. }
  1006. }
  1007. }
  1008. },
  1009. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1010. "summary": "Switch active Console org",
  1011. "requestBody": {
  1012. "content": {
  1013. "application/json": {
  1014. "schema": {
  1015. "type": "object",
  1016. "properties": {
  1017. "accountID": {
  1018. "type": "string"
  1019. },
  1020. "orgID": {
  1021. "type": "string"
  1022. }
  1023. },
  1024. "required": ["accountID", "orgID"],
  1025. "additionalProperties": false
  1026. }
  1027. }
  1028. }
  1029. },
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1034. }
  1035. ]
  1036. }
  1037. },
  1038. "/experimental/tool": {
  1039. "get": {
  1040. "tags": ["experimental"],
  1041. "operationId": "tool.list",
  1042. "parameters": [
  1043. {
  1044. "name": "directory",
  1045. "in": "query",
  1046. "schema": {
  1047. "type": "string"
  1048. },
  1049. "required": false
  1050. },
  1051. {
  1052. "name": "workspace",
  1053. "in": "query",
  1054. "schema": {
  1055. "type": "string"
  1056. },
  1057. "required": false
  1058. },
  1059. {
  1060. "name": "provider",
  1061. "in": "query",
  1062. "schema": {
  1063. "type": "string"
  1064. },
  1065. "required": true
  1066. },
  1067. {
  1068. "name": "model",
  1069. "in": "query",
  1070. "schema": {
  1071. "type": "string"
  1072. },
  1073. "required": true
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "Tools",
  1079. "content": {
  1080. "application/json": {
  1081. "schema": {
  1082. "$ref": "#/components/schemas/ToolList"
  1083. }
  1084. }
  1085. }
  1086. },
  1087. "400": {
  1088. "description": "BadRequest | InvalidRequestError",
  1089. "content": {
  1090. "application/json": {
  1091. "schema": {
  1092. "anyOf": [
  1093. {
  1094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1095. },
  1096. {
  1097. "$ref": "#/components/schemas/InvalidRequestError"
  1098. }
  1099. ]
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1106. "summary": "List tools",
  1107. "x-codeSamples": [
  1108. {
  1109. "lang": "js",
  1110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1111. }
  1112. ]
  1113. }
  1114. },
  1115. "/experimental/tool/ids": {
  1116. "get": {
  1117. "tags": ["experimental"],
  1118. "operationId": "tool.ids",
  1119. "parameters": [
  1120. {
  1121. "name": "directory",
  1122. "in": "query",
  1123. "schema": {
  1124. "type": "string"
  1125. },
  1126. "required": false
  1127. },
  1128. {
  1129. "name": "workspace",
  1130. "in": "query",
  1131. "schema": {
  1132. "type": "string"
  1133. },
  1134. "required": false
  1135. }
  1136. ],
  1137. "responses": {
  1138. "200": {
  1139. "description": "Tool IDs",
  1140. "content": {
  1141. "application/json": {
  1142. "schema": {
  1143. "$ref": "#/components/schemas/ToolIDs"
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "400": {
  1149. "description": "BadRequest | InvalidRequestError",
  1150. "content": {
  1151. "application/json": {
  1152. "schema": {
  1153. "anyOf": [
  1154. {
  1155. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1156. },
  1157. {
  1158. "$ref": "#/components/schemas/InvalidRequestError"
  1159. }
  1160. ]
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1167. "summary": "List tool IDs",
  1168. "x-codeSamples": [
  1169. {
  1170. "lang": "js",
  1171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1172. }
  1173. ]
  1174. }
  1175. },
  1176. "/experimental/worktree": {
  1177. "get": {
  1178. "tags": ["experimental"],
  1179. "operationId": "worktree.list",
  1180. "parameters": [
  1181. {
  1182. "name": "directory",
  1183. "in": "query",
  1184. "schema": {
  1185. "type": "string"
  1186. },
  1187. "required": false
  1188. },
  1189. {
  1190. "name": "workspace",
  1191. "in": "query",
  1192. "schema": {
  1193. "type": "string"
  1194. },
  1195. "required": false
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "List of worktree directories",
  1201. "content": {
  1202. "application/json": {
  1203. "schema": {
  1204. "type": "array",
  1205. "items": {
  1206. "type": "string"
  1207. },
  1208. "description": "List of worktree directories"
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "400": {
  1214. "description": "WorktreeError | InvalidRequestError",
  1215. "content": {
  1216. "application/json": {
  1217. "schema": {
  1218. "anyOf": [
  1219. {
  1220. "$ref": "#/components/schemas/WorktreeError"
  1221. },
  1222. {
  1223. "$ref": "#/components/schemas/InvalidRequestError"
  1224. }
  1225. ]
  1226. }
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "description": "List all sandbox worktrees for the current project.",
  1232. "summary": "List worktrees",
  1233. "x-codeSamples": [
  1234. {
  1235. "lang": "js",
  1236. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1237. }
  1238. ]
  1239. },
  1240. "post": {
  1241. "tags": ["experimental"],
  1242. "operationId": "worktree.create",
  1243. "parameters": [
  1244. {
  1245. "name": "directory",
  1246. "in": "query",
  1247. "schema": {
  1248. "type": "string"
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "workspace",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. }
  1260. ],
  1261. "responses": {
  1262. "200": {
  1263. "description": "Worktree created",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/Worktree"
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "400": {
  1273. "description": "WorktreeError | InvalidRequestError",
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/components/schemas/WorktreeError"
  1280. },
  1281. {
  1282. "$ref": "#/components/schemas/InvalidRequestError"
  1283. }
  1284. ]
  1285. }
  1286. }
  1287. }
  1288. }
  1289. },
  1290. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1291. "summary": "Create worktree",
  1292. "requestBody": {
  1293. "content": {
  1294. "application/json": {
  1295. "schema": {
  1296. "$ref": "#/components/schemas/WorktreeCreateInput"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "x-codeSamples": [
  1302. {
  1303. "lang": "js",
  1304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1305. }
  1306. ]
  1307. },
  1308. "delete": {
  1309. "tags": ["experimental"],
  1310. "operationId": "worktree.remove",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "schema": {
  1316. "type": "string"
  1317. },
  1318. "required": false
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "schema": {
  1324. "type": "string"
  1325. },
  1326. "required": false
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "Worktree removed",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "boolean",
  1336. "description": "Worktree removed"
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "400": {
  1342. "description": "WorktreeError | InvalidRequestError",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "anyOf": [
  1347. {
  1348. "$ref": "#/components/schemas/WorktreeError"
  1349. },
  1350. {
  1351. "$ref": "#/components/schemas/InvalidRequestError"
  1352. }
  1353. ]
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "description": "Remove a git worktree and delete its branch.",
  1360. "summary": "Remove worktree",
  1361. "requestBody": {
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "x-codeSamples": [
  1371. {
  1372. "lang": "js",
  1373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1374. }
  1375. ]
  1376. }
  1377. },
  1378. "/experimental/worktree/reset": {
  1379. "post": {
  1380. "tags": ["experimental"],
  1381. "operationId": "worktree.reset",
  1382. "parameters": [
  1383. {
  1384. "name": "directory",
  1385. "in": "query",
  1386. "schema": {
  1387. "type": "string"
  1388. },
  1389. "required": false
  1390. },
  1391. {
  1392. "name": "workspace",
  1393. "in": "query",
  1394. "schema": {
  1395. "type": "string"
  1396. },
  1397. "required": false
  1398. }
  1399. ],
  1400. "responses": {
  1401. "200": {
  1402. "description": "Worktree reset",
  1403. "content": {
  1404. "application/json": {
  1405. "schema": {
  1406. "type": "boolean",
  1407. "description": "Worktree reset"
  1408. }
  1409. }
  1410. }
  1411. },
  1412. "400": {
  1413. "description": "WorktreeError | InvalidRequestError",
  1414. "content": {
  1415. "application/json": {
  1416. "schema": {
  1417. "anyOf": [
  1418. {
  1419. "$ref": "#/components/schemas/WorktreeError"
  1420. },
  1421. {
  1422. "$ref": "#/components/schemas/InvalidRequestError"
  1423. }
  1424. ]
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "description": "Reset a worktree branch to the primary default branch.",
  1431. "summary": "Reset worktree",
  1432. "requestBody": {
  1433. "content": {
  1434. "application/json": {
  1435. "schema": {
  1436. "$ref": "#/components/schemas/WorktreeResetInput"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "x-codeSamples": [
  1442. {
  1443. "lang": "js",
  1444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1445. }
  1446. ]
  1447. }
  1448. },
  1449. "/experimental/session": {
  1450. "get": {
  1451. "tags": ["experimental"],
  1452. "operationId": "experimental.session.list",
  1453. "parameters": [
  1454. {
  1455. "name": "directory",
  1456. "in": "query",
  1457. "schema": {
  1458. "type": "string"
  1459. },
  1460. "required": false
  1461. },
  1462. {
  1463. "name": "workspace",
  1464. "in": "query",
  1465. "schema": {
  1466. "type": "string"
  1467. },
  1468. "required": false
  1469. },
  1470. {
  1471. "name": "roots",
  1472. "in": "query",
  1473. "schema": {
  1474. "anyOf": [
  1475. {
  1476. "type": "boolean"
  1477. },
  1478. {
  1479. "type": "string",
  1480. "enum": ["true", "false"]
  1481. }
  1482. ]
  1483. },
  1484. "required": false
  1485. },
  1486. {
  1487. "name": "start",
  1488. "in": "query",
  1489. "schema": {
  1490. "type": "number"
  1491. },
  1492. "required": false
  1493. },
  1494. {
  1495. "name": "cursor",
  1496. "in": "query",
  1497. "schema": {
  1498. "type": "number"
  1499. },
  1500. "required": false
  1501. },
  1502. {
  1503. "name": "search",
  1504. "in": "query",
  1505. "schema": {
  1506. "type": "string"
  1507. },
  1508. "required": false
  1509. },
  1510. {
  1511. "name": "limit",
  1512. "in": "query",
  1513. "schema": {
  1514. "type": "number"
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "archived",
  1520. "in": "query",
  1521. "schema": {
  1522. "anyOf": [
  1523. {
  1524. "type": "boolean"
  1525. },
  1526. {
  1527. "type": "string",
  1528. "enum": ["true", "false"]
  1529. }
  1530. ]
  1531. },
  1532. "required": false
  1533. }
  1534. ],
  1535. "responses": {
  1536. "200": {
  1537. "description": "List of sessions",
  1538. "content": {
  1539. "application/json": {
  1540. "schema": {
  1541. "type": "array",
  1542. "items": {
  1543. "$ref": "#/components/schemas/GlobalSession"
  1544. },
  1545. "description": "List of sessions"
  1546. }
  1547. }
  1548. }
  1549. },
  1550. "400": {
  1551. "description": "Bad request",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "$ref": "#/components/schemas/BadRequestError"
  1556. }
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1562. "summary": "List sessions",
  1563. "x-codeSamples": [
  1564. {
  1565. "lang": "js",
  1566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1567. }
  1568. ]
  1569. }
  1570. },
  1571. "/experimental/session/{sessionID}/background": {
  1572. "post": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.session.background",
  1575. "parameters": [
  1576. {
  1577. "name": "sessionID",
  1578. "in": "path",
  1579. "schema": {
  1580. "type": "string",
  1581. "pattern": "^ses"
  1582. },
  1583. "required": true
  1584. },
  1585. {
  1586. "name": "directory",
  1587. "in": "query",
  1588. "schema": {
  1589. "type": "string"
  1590. },
  1591. "required": false
  1592. },
  1593. {
  1594. "name": "workspace",
  1595. "in": "query",
  1596. "schema": {
  1597. "type": "string"
  1598. },
  1599. "required": false
  1600. }
  1601. ],
  1602. "responses": {
  1603. "200": {
  1604. "description": "Backgrounded subagents",
  1605. "content": {
  1606. "application/json": {
  1607. "schema": {
  1608. "type": "boolean",
  1609. "description": "Backgrounded subagents"
  1610. }
  1611. }
  1612. }
  1613. },
  1614. "400": {
  1615. "description": "BadRequest | InvalidRequestError",
  1616. "content": {
  1617. "application/json": {
  1618. "schema": {
  1619. "anyOf": [
  1620. {
  1621. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1622. },
  1623. {
  1624. "$ref": "#/components/schemas/InvalidRequestError"
  1625. }
  1626. ]
  1627. }
  1628. }
  1629. }
  1630. }
  1631. },
  1632. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1633. "summary": "Background subagents",
  1634. "x-codeSamples": [
  1635. {
  1636. "lang": "js",
  1637. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1638. }
  1639. ]
  1640. }
  1641. },
  1642. "/experimental/resource": {
  1643. "get": {
  1644. "tags": ["experimental"],
  1645. "operationId": "experimental.resource.list",
  1646. "parameters": [
  1647. {
  1648. "name": "directory",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. },
  1655. {
  1656. "name": "workspace",
  1657. "in": "query",
  1658. "schema": {
  1659. "type": "string"
  1660. },
  1661. "required": false
  1662. }
  1663. ],
  1664. "responses": {
  1665. "200": {
  1666. "description": "MCP resources",
  1667. "content": {
  1668. "application/json": {
  1669. "schema": {
  1670. "type": "object",
  1671. "additionalProperties": {
  1672. "$ref": "#/components/schemas/McpResource"
  1673. },
  1674. "description": "MCP resources"
  1675. }
  1676. }
  1677. }
  1678. },
  1679. "400": {
  1680. "description": "Bad request",
  1681. "content": {
  1682. "application/json": {
  1683. "schema": {
  1684. "$ref": "#/components/schemas/BadRequestError"
  1685. }
  1686. }
  1687. }
  1688. }
  1689. },
  1690. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1691. "summary": "Get MCP resources",
  1692. "x-codeSamples": [
  1693. {
  1694. "lang": "js",
  1695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1696. }
  1697. ]
  1698. }
  1699. },
  1700. "/find": {
  1701. "get": {
  1702. "tags": ["file"],
  1703. "operationId": "find.text",
  1704. "parameters": [
  1705. {
  1706. "name": "directory",
  1707. "in": "query",
  1708. "schema": {
  1709. "type": "string"
  1710. },
  1711. "required": false
  1712. },
  1713. {
  1714. "name": "workspace",
  1715. "in": "query",
  1716. "schema": {
  1717. "type": "string"
  1718. },
  1719. "required": false
  1720. },
  1721. {
  1722. "name": "pattern",
  1723. "in": "query",
  1724. "schema": {
  1725. "type": "string"
  1726. },
  1727. "required": true
  1728. }
  1729. ],
  1730. "responses": {
  1731. "200": {
  1732. "description": "Matches",
  1733. "content": {
  1734. "application/json": {
  1735. "schema": {
  1736. "type": "array",
  1737. "items": {
  1738. "type": "object",
  1739. "properties": {
  1740. "path": {
  1741. "type": "object",
  1742. "properties": {
  1743. "text": {
  1744. "type": "string"
  1745. }
  1746. },
  1747. "required": ["text"],
  1748. "additionalProperties": false
  1749. },
  1750. "lines": {
  1751. "type": "object",
  1752. "properties": {
  1753. "text": {
  1754. "type": "string"
  1755. }
  1756. },
  1757. "required": ["text"],
  1758. "additionalProperties": false
  1759. },
  1760. "line_number": {
  1761. "type": "integer",
  1762. "minimum": 0
  1763. },
  1764. "absolute_offset": {
  1765. "type": "integer",
  1766. "minimum": 0
  1767. },
  1768. "submatches": {
  1769. "type": "array",
  1770. "items": {
  1771. "type": "object",
  1772. "properties": {
  1773. "match": {
  1774. "type": "object",
  1775. "properties": {
  1776. "text": {
  1777. "type": "string"
  1778. }
  1779. },
  1780. "required": ["text"],
  1781. "additionalProperties": false
  1782. },
  1783. "start": {
  1784. "type": "integer",
  1785. "minimum": 0
  1786. },
  1787. "end": {
  1788. "type": "integer",
  1789. "minimum": 0
  1790. }
  1791. },
  1792. "required": ["match", "start", "end"],
  1793. "additionalProperties": false
  1794. }
  1795. }
  1796. },
  1797. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1798. "additionalProperties": false
  1799. },
  1800. "description": "Matches"
  1801. }
  1802. }
  1803. }
  1804. },
  1805. "400": {
  1806. "description": "Bad request",
  1807. "content": {
  1808. "application/json": {
  1809. "schema": {
  1810. "$ref": "#/components/schemas/BadRequestError"
  1811. }
  1812. }
  1813. }
  1814. }
  1815. },
  1816. "description": "Search for text patterns across files in the project using ripgrep.",
  1817. "summary": "Find text",
  1818. "x-codeSamples": [
  1819. {
  1820. "lang": "js",
  1821. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1822. }
  1823. ]
  1824. }
  1825. },
  1826. "/find/file": {
  1827. "get": {
  1828. "tags": ["file"],
  1829. "operationId": "find.files",
  1830. "parameters": [
  1831. {
  1832. "name": "directory",
  1833. "in": "query",
  1834. "schema": {
  1835. "type": "string"
  1836. },
  1837. "required": false
  1838. },
  1839. {
  1840. "name": "workspace",
  1841. "in": "query",
  1842. "schema": {
  1843. "type": "string"
  1844. },
  1845. "required": false
  1846. },
  1847. {
  1848. "name": "query",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": true
  1854. },
  1855. {
  1856. "name": "dirs",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string",
  1860. "enum": ["true", "false"]
  1861. },
  1862. "required": false
  1863. },
  1864. {
  1865. "name": "type",
  1866. "in": "query",
  1867. "schema": {
  1868. "type": "string",
  1869. "enum": ["file", "directory"]
  1870. },
  1871. "required": false
  1872. },
  1873. {
  1874. "name": "limit",
  1875. "in": "query",
  1876. "schema": {
  1877. "type": "integer",
  1878. "minimum": 1,
  1879. "maximum": 200
  1880. },
  1881. "required": false
  1882. }
  1883. ],
  1884. "responses": {
  1885. "200": {
  1886. "description": "File paths",
  1887. "content": {
  1888. "application/json": {
  1889. "schema": {
  1890. "type": "array",
  1891. "items": {
  1892. "type": "string"
  1893. },
  1894. "description": "File paths"
  1895. }
  1896. }
  1897. }
  1898. },
  1899. "400": {
  1900. "description": "Bad request",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/BadRequestError"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Search for files or directories by name or pattern in the project directory.",
  1911. "summary": "Find files",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/find/symbol": {
  1921. "get": {
  1922. "tags": ["file"],
  1923. "operationId": "find.symbols",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. },
  1941. {
  1942. "name": "query",
  1943. "in": "query",
  1944. "schema": {
  1945. "type": "string"
  1946. },
  1947. "required": true
  1948. }
  1949. ],
  1950. "responses": {
  1951. "200": {
  1952. "description": "Symbols",
  1953. "content": {
  1954. "application/json": {
  1955. "schema": {
  1956. "type": "array",
  1957. "items": {
  1958. "$ref": "#/components/schemas/Symbol"
  1959. },
  1960. "description": "Symbols"
  1961. }
  1962. }
  1963. }
  1964. },
  1965. "400": {
  1966. "description": "Bad request",
  1967. "content": {
  1968. "application/json": {
  1969. "schema": {
  1970. "$ref": "#/components/schemas/BadRequestError"
  1971. }
  1972. }
  1973. }
  1974. }
  1975. },
  1976. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1977. "summary": "Find symbols",
  1978. "x-codeSamples": [
  1979. {
  1980. "lang": "js",
  1981. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1982. }
  1983. ]
  1984. }
  1985. },
  1986. "/file": {
  1987. "get": {
  1988. "tags": ["file"],
  1989. "operationId": "file.list",
  1990. "parameters": [
  1991. {
  1992. "name": "directory",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "workspace",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string"
  2004. },
  2005. "required": false
  2006. },
  2007. {
  2008. "name": "path",
  2009. "in": "query",
  2010. "schema": {
  2011. "type": "string"
  2012. },
  2013. "required": true
  2014. }
  2015. ],
  2016. "responses": {
  2017. "200": {
  2018. "description": "Files and directories",
  2019. "content": {
  2020. "application/json": {
  2021. "schema": {
  2022. "type": "array",
  2023. "items": {
  2024. "$ref": "#/components/schemas/FileNode"
  2025. },
  2026. "description": "Files and directories"
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "400": {
  2032. "description": "Bad request",
  2033. "content": {
  2034. "application/json": {
  2035. "schema": {
  2036. "$ref": "#/components/schemas/BadRequestError"
  2037. }
  2038. }
  2039. }
  2040. }
  2041. },
  2042. "description": "List files and directories in a specified path.",
  2043. "summary": "List files",
  2044. "x-codeSamples": [
  2045. {
  2046. "lang": "js",
  2047. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2048. }
  2049. ]
  2050. }
  2051. },
  2052. "/file/content": {
  2053. "get": {
  2054. "tags": ["file"],
  2055. "operationId": "file.read",
  2056. "parameters": [
  2057. {
  2058. "name": "directory",
  2059. "in": "query",
  2060. "schema": {
  2061. "type": "string"
  2062. },
  2063. "required": false
  2064. },
  2065. {
  2066. "name": "workspace",
  2067. "in": "query",
  2068. "schema": {
  2069. "type": "string"
  2070. },
  2071. "required": false
  2072. },
  2073. {
  2074. "name": "path",
  2075. "in": "query",
  2076. "schema": {
  2077. "type": "string"
  2078. },
  2079. "required": true
  2080. }
  2081. ],
  2082. "responses": {
  2083. "200": {
  2084. "description": "File content",
  2085. "content": {
  2086. "application/json": {
  2087. "schema": {
  2088. "$ref": "#/components/schemas/FileContent"
  2089. }
  2090. }
  2091. }
  2092. },
  2093. "400": {
  2094. "description": "Bad request",
  2095. "content": {
  2096. "application/json": {
  2097. "schema": {
  2098. "$ref": "#/components/schemas/BadRequestError"
  2099. }
  2100. }
  2101. }
  2102. }
  2103. },
  2104. "description": "Read the content of a specified file.",
  2105. "summary": "Read file",
  2106. "x-codeSamples": [
  2107. {
  2108. "lang": "js",
  2109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2110. }
  2111. ]
  2112. }
  2113. },
  2114. "/file/status": {
  2115. "get": {
  2116. "tags": ["file"],
  2117. "operationId": "file.status",
  2118. "parameters": [
  2119. {
  2120. "name": "directory",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "workspace",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": false
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File status",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "type": "array",
  2143. "items": {
  2144. "$ref": "#/components/schemas/File"
  2145. },
  2146. "description": "File status"
  2147. }
  2148. }
  2149. }
  2150. },
  2151. "400": {
  2152. "description": "Bad request",
  2153. "content": {
  2154. "application/json": {
  2155. "schema": {
  2156. "$ref": "#/components/schemas/BadRequestError"
  2157. }
  2158. }
  2159. }
  2160. }
  2161. },
  2162. "description": "Get the git status of all files in the project.",
  2163. "summary": "Get file status",
  2164. "x-codeSamples": [
  2165. {
  2166. "lang": "js",
  2167. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2168. }
  2169. ]
  2170. }
  2171. },
  2172. "/instance/dispose": {
  2173. "post": {
  2174. "tags": ["instance"],
  2175. "operationId": "instance.dispose",
  2176. "parameters": [
  2177. {
  2178. "name": "directory",
  2179. "in": "query",
  2180. "schema": {
  2181. "type": "string"
  2182. },
  2183. "required": false
  2184. },
  2185. {
  2186. "name": "workspace",
  2187. "in": "query",
  2188. "schema": {
  2189. "type": "string"
  2190. },
  2191. "required": false
  2192. }
  2193. ],
  2194. "responses": {
  2195. "200": {
  2196. "description": "Instance disposed",
  2197. "content": {
  2198. "application/json": {
  2199. "schema": {
  2200. "type": "boolean",
  2201. "description": "Instance disposed"
  2202. }
  2203. }
  2204. }
  2205. },
  2206. "400": {
  2207. "description": "Bad request",
  2208. "content": {
  2209. "application/json": {
  2210. "schema": {
  2211. "$ref": "#/components/schemas/BadRequestError"
  2212. }
  2213. }
  2214. }
  2215. }
  2216. },
  2217. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2218. "summary": "Dispose instance",
  2219. "x-codeSamples": [
  2220. {
  2221. "lang": "js",
  2222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2223. }
  2224. ]
  2225. }
  2226. },
  2227. "/path": {
  2228. "get": {
  2229. "tags": ["instance"],
  2230. "operationId": "path.get",
  2231. "parameters": [
  2232. {
  2233. "name": "directory",
  2234. "in": "query",
  2235. "schema": {
  2236. "type": "string"
  2237. },
  2238. "required": false
  2239. },
  2240. {
  2241. "name": "workspace",
  2242. "in": "query",
  2243. "schema": {
  2244. "type": "string"
  2245. },
  2246. "required": false
  2247. }
  2248. ],
  2249. "responses": {
  2250. "200": {
  2251. "description": "Path",
  2252. "content": {
  2253. "application/json": {
  2254. "schema": {
  2255. "$ref": "#/components/schemas/Path"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2272. "summary": "Get paths",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/vcs": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "vcs.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "VCS info",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/VcsInfo"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2326. "summary": "Get VCS info",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs/status": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.status",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS status",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "type": "array",
  2364. "items": {
  2365. "$ref": "#/components/schemas/VcsFileStatus"
  2366. },
  2367. "description": "VCS status"
  2368. }
  2369. }
  2370. }
  2371. },
  2372. "400": {
  2373. "description": "Bad request",
  2374. "content": {
  2375. "application/json": {
  2376. "schema": {
  2377. "$ref": "#/components/schemas/BadRequestError"
  2378. }
  2379. }
  2380. }
  2381. }
  2382. },
  2383. "description": "Retrieve changed files in the current working tree without patches.",
  2384. "summary": "Get VCS status",
  2385. "x-codeSamples": [
  2386. {
  2387. "lang": "js",
  2388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2389. }
  2390. ]
  2391. }
  2392. },
  2393. "/vcs/diff": {
  2394. "get": {
  2395. "tags": ["instance"],
  2396. "operationId": "vcs.diff",
  2397. "parameters": [
  2398. {
  2399. "name": "directory",
  2400. "in": "query",
  2401. "schema": {
  2402. "type": "string"
  2403. },
  2404. "required": false
  2405. },
  2406. {
  2407. "name": "workspace",
  2408. "in": "query",
  2409. "schema": {
  2410. "type": "string"
  2411. },
  2412. "required": false
  2413. },
  2414. {
  2415. "name": "mode",
  2416. "in": "query",
  2417. "schema": {
  2418. "type": "string",
  2419. "enum": ["git", "branch"]
  2420. },
  2421. "required": true
  2422. },
  2423. {
  2424. "name": "context",
  2425. "in": "query",
  2426. "schema": {
  2427. "type": "integer",
  2428. "minimum": 0
  2429. },
  2430. "required": false
  2431. }
  2432. ],
  2433. "responses": {
  2434. "200": {
  2435. "description": "VCS diff",
  2436. "content": {
  2437. "application/json": {
  2438. "schema": {
  2439. "type": "array",
  2440. "items": {
  2441. "$ref": "#/components/schemas/VcsFileDiff"
  2442. },
  2443. "description": "VCS diff"
  2444. }
  2445. }
  2446. }
  2447. },
  2448. "400": {
  2449. "description": "Bad request",
  2450. "content": {
  2451. "application/json": {
  2452. "schema": {
  2453. "$ref": "#/components/schemas/BadRequestError"
  2454. }
  2455. }
  2456. }
  2457. }
  2458. },
  2459. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2460. "summary": "Get VCS diff",
  2461. "x-codeSamples": [
  2462. {
  2463. "lang": "js",
  2464. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2465. }
  2466. ]
  2467. }
  2468. },
  2469. "/vcs/diff/raw": {
  2470. "get": {
  2471. "tags": ["instance"],
  2472. "operationId": "vcs.diff.raw",
  2473. "parameters": [
  2474. {
  2475. "name": "directory",
  2476. "in": "query",
  2477. "schema": {
  2478. "type": "string"
  2479. },
  2480. "required": false
  2481. },
  2482. {
  2483. "name": "workspace",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. }
  2490. ],
  2491. "responses": {
  2492. "200": {
  2493. "description": "Raw VCS diff",
  2494. "content": {
  2495. "text/x-diff; charset=utf-8": {
  2496. "schema": {
  2497. "type": "string"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve a raw patch for current uncommitted changes.",
  2514. "summary": "Get raw VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/apply": {
  2524. "post": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.apply",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "VCS patch applied",
  2548. "content": {
  2549. "application/json": {
  2550. "schema": {
  2551. "type": "object",
  2552. "properties": {
  2553. "applied": {
  2554. "type": "boolean"
  2555. }
  2556. },
  2557. "required": ["applied"],
  2558. "additionalProperties": false,
  2559. "description": "VCS patch applied"
  2560. }
  2561. }
  2562. }
  2563. },
  2564. "400": {
  2565. "description": "VcsApplyError | InvalidRequestError",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "anyOf": [
  2570. {
  2571. "$ref": "#/components/schemas/VcsApplyError"
  2572. },
  2573. {
  2574. "$ref": "#/components/schemas/InvalidRequestError"
  2575. }
  2576. ]
  2577. }
  2578. }
  2579. }
  2580. }
  2581. },
  2582. "description": "Apply a raw patch to the current working tree.",
  2583. "summary": "Apply VCS patch",
  2584. "requestBody": {
  2585. "content": {
  2586. "application/json": {
  2587. "schema": {
  2588. "type": "object",
  2589. "properties": {
  2590. "patch": {
  2591. "type": "string"
  2592. }
  2593. },
  2594. "required": ["patch"],
  2595. "additionalProperties": false
  2596. }
  2597. }
  2598. }
  2599. },
  2600. "x-codeSamples": [
  2601. {
  2602. "lang": "js",
  2603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2604. }
  2605. ]
  2606. }
  2607. },
  2608. "/command": {
  2609. "get": {
  2610. "tags": ["instance"],
  2611. "operationId": "command.list",
  2612. "parameters": [
  2613. {
  2614. "name": "directory",
  2615. "in": "query",
  2616. "schema": {
  2617. "type": "string"
  2618. },
  2619. "required": false
  2620. },
  2621. {
  2622. "name": "workspace",
  2623. "in": "query",
  2624. "schema": {
  2625. "type": "string"
  2626. },
  2627. "required": false
  2628. }
  2629. ],
  2630. "responses": {
  2631. "200": {
  2632. "description": "List of commands",
  2633. "content": {
  2634. "application/json": {
  2635. "schema": {
  2636. "type": "array",
  2637. "items": {
  2638. "$ref": "#/components/schemas/Command"
  2639. },
  2640. "description": "List of commands"
  2641. }
  2642. }
  2643. }
  2644. },
  2645. "400": {
  2646. "description": "Bad request",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "$ref": "#/components/schemas/BadRequestError"
  2651. }
  2652. }
  2653. }
  2654. }
  2655. },
  2656. "description": "Get a list of all available commands in the OpenCode system.",
  2657. "summary": "List commands",
  2658. "x-codeSamples": [
  2659. {
  2660. "lang": "js",
  2661. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2662. }
  2663. ]
  2664. }
  2665. },
  2666. "/agent": {
  2667. "get": {
  2668. "tags": ["instance"],
  2669. "operationId": "app.agents",
  2670. "parameters": [
  2671. {
  2672. "name": "directory",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. },
  2679. {
  2680. "name": "workspace",
  2681. "in": "query",
  2682. "schema": {
  2683. "type": "string"
  2684. },
  2685. "required": false
  2686. }
  2687. ],
  2688. "responses": {
  2689. "200": {
  2690. "description": "List of agents",
  2691. "content": {
  2692. "application/json": {
  2693. "schema": {
  2694. "type": "array",
  2695. "items": {
  2696. "$ref": "#/components/schemas/Agent"
  2697. },
  2698. "description": "List of agents"
  2699. }
  2700. }
  2701. }
  2702. },
  2703. "400": {
  2704. "description": "Bad request",
  2705. "content": {
  2706. "application/json": {
  2707. "schema": {
  2708. "$ref": "#/components/schemas/BadRequestError"
  2709. }
  2710. }
  2711. }
  2712. }
  2713. },
  2714. "description": "Get a list of all available AI agents in the OpenCode system.",
  2715. "summary": "List agents",
  2716. "x-codeSamples": [
  2717. {
  2718. "lang": "js",
  2719. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2720. }
  2721. ]
  2722. }
  2723. },
  2724. "/skill": {
  2725. "get": {
  2726. "tags": ["instance"],
  2727. "operationId": "app.skills",
  2728. "parameters": [
  2729. {
  2730. "name": "directory",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. },
  2737. {
  2738. "name": "workspace",
  2739. "in": "query",
  2740. "schema": {
  2741. "type": "string"
  2742. },
  2743. "required": false
  2744. }
  2745. ],
  2746. "responses": {
  2747. "200": {
  2748. "description": "List of skills",
  2749. "content": {
  2750. "application/json": {
  2751. "schema": {
  2752. "type": "array",
  2753. "items": {
  2754. "type": "object",
  2755. "properties": {
  2756. "name": {
  2757. "type": "string"
  2758. },
  2759. "description": {
  2760. "type": "string"
  2761. },
  2762. "location": {
  2763. "type": "string"
  2764. },
  2765. "content": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["name", "location", "content"],
  2770. "additionalProperties": false
  2771. },
  2772. "description": "List of skills"
  2773. }
  2774. }
  2775. }
  2776. },
  2777. "400": {
  2778. "description": "Bad request",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "$ref": "#/components/schemas/BadRequestError"
  2783. }
  2784. }
  2785. }
  2786. }
  2787. },
  2788. "description": "Get a list of all available skills in the OpenCode system.",
  2789. "summary": "List skills",
  2790. "x-codeSamples": [
  2791. {
  2792. "lang": "js",
  2793. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2794. }
  2795. ]
  2796. }
  2797. },
  2798. "/lsp": {
  2799. "get": {
  2800. "tags": ["instance"],
  2801. "operationId": "lsp.status",
  2802. "parameters": [
  2803. {
  2804. "name": "directory",
  2805. "in": "query",
  2806. "schema": {
  2807. "type": "string"
  2808. },
  2809. "required": false
  2810. },
  2811. {
  2812. "name": "workspace",
  2813. "in": "query",
  2814. "schema": {
  2815. "type": "string"
  2816. },
  2817. "required": false
  2818. }
  2819. ],
  2820. "responses": {
  2821. "200": {
  2822. "description": "LSP server status",
  2823. "content": {
  2824. "application/json": {
  2825. "schema": {
  2826. "type": "array",
  2827. "items": {
  2828. "$ref": "#/components/schemas/LSPStatus"
  2829. },
  2830. "description": "LSP server status"
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "400": {
  2836. "description": "Bad request",
  2837. "content": {
  2838. "application/json": {
  2839. "schema": {
  2840. "$ref": "#/components/schemas/BadRequestError"
  2841. }
  2842. }
  2843. }
  2844. }
  2845. },
  2846. "description": "Get LSP server status",
  2847. "summary": "Get LSP status",
  2848. "x-codeSamples": [
  2849. {
  2850. "lang": "js",
  2851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2852. }
  2853. ]
  2854. }
  2855. },
  2856. "/formatter": {
  2857. "get": {
  2858. "tags": ["instance"],
  2859. "operationId": "formatter.status",
  2860. "parameters": [
  2861. {
  2862. "name": "directory",
  2863. "in": "query",
  2864. "schema": {
  2865. "type": "string"
  2866. },
  2867. "required": false
  2868. },
  2869. {
  2870. "name": "workspace",
  2871. "in": "query",
  2872. "schema": {
  2873. "type": "string"
  2874. },
  2875. "required": false
  2876. }
  2877. ],
  2878. "responses": {
  2879. "200": {
  2880. "description": "Formatter status",
  2881. "content": {
  2882. "application/json": {
  2883. "schema": {
  2884. "type": "array",
  2885. "items": {
  2886. "$ref": "#/components/schemas/FormatterStatus"
  2887. },
  2888. "description": "Formatter status"
  2889. }
  2890. }
  2891. }
  2892. },
  2893. "400": {
  2894. "description": "Bad request",
  2895. "content": {
  2896. "application/json": {
  2897. "schema": {
  2898. "$ref": "#/components/schemas/BadRequestError"
  2899. }
  2900. }
  2901. }
  2902. }
  2903. },
  2904. "description": "Get formatter status",
  2905. "summary": "Get formatter status",
  2906. "x-codeSamples": [
  2907. {
  2908. "lang": "js",
  2909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2910. }
  2911. ]
  2912. }
  2913. },
  2914. "/mcp": {
  2915. "get": {
  2916. "tags": ["mcp"],
  2917. "operationId": "mcp.status",
  2918. "parameters": [
  2919. {
  2920. "name": "directory",
  2921. "in": "query",
  2922. "schema": {
  2923. "type": "string"
  2924. },
  2925. "required": false
  2926. },
  2927. {
  2928. "name": "workspace",
  2929. "in": "query",
  2930. "schema": {
  2931. "type": "string"
  2932. },
  2933. "required": false
  2934. }
  2935. ],
  2936. "responses": {
  2937. "200": {
  2938. "description": "MCP server status",
  2939. "content": {
  2940. "application/json": {
  2941. "schema": {
  2942. "type": "object",
  2943. "additionalProperties": {
  2944. "$ref": "#/components/schemas/MCPStatus"
  2945. },
  2946. "description": "MCP server status"
  2947. }
  2948. }
  2949. }
  2950. },
  2951. "400": {
  2952. "description": "Bad request",
  2953. "content": {
  2954. "application/json": {
  2955. "schema": {
  2956. "$ref": "#/components/schemas/BadRequestError"
  2957. }
  2958. }
  2959. }
  2960. }
  2961. },
  2962. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2963. "summary": "Get MCP status",
  2964. "x-codeSamples": [
  2965. {
  2966. "lang": "js",
  2967. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2968. }
  2969. ]
  2970. },
  2971. "post": {
  2972. "tags": ["mcp"],
  2973. "operationId": "mcp.add",
  2974. "parameters": [
  2975. {
  2976. "name": "directory",
  2977. "in": "query",
  2978. "schema": {
  2979. "type": "string"
  2980. },
  2981. "required": false
  2982. },
  2983. {
  2984. "name": "workspace",
  2985. "in": "query",
  2986. "schema": {
  2987. "type": "string"
  2988. },
  2989. "required": false
  2990. }
  2991. ],
  2992. "responses": {
  2993. "200": {
  2994. "description": "MCP server added successfully",
  2995. "content": {
  2996. "application/json": {
  2997. "schema": {
  2998. "type": "object",
  2999. "additionalProperties": {
  3000. "$ref": "#/components/schemas/MCPStatus"
  3001. },
  3002. "description": "MCP server added successfully"
  3003. }
  3004. }
  3005. }
  3006. },
  3007. "400": {
  3008. "description": "BadRequest | InvalidRequestError",
  3009. "content": {
  3010. "application/json": {
  3011. "schema": {
  3012. "anyOf": [
  3013. {
  3014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3015. },
  3016. {
  3017. "$ref": "#/components/schemas/InvalidRequestError"
  3018. }
  3019. ]
  3020. }
  3021. }
  3022. }
  3023. }
  3024. },
  3025. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3026. "summary": "Add MCP server",
  3027. "requestBody": {
  3028. "content": {
  3029. "application/json": {
  3030. "schema": {
  3031. "type": "object",
  3032. "properties": {
  3033. "name": {
  3034. "type": "string"
  3035. },
  3036. "config": {
  3037. "anyOf": [
  3038. {
  3039. "$ref": "#/components/schemas/McpLocalConfig"
  3040. },
  3041. {
  3042. "$ref": "#/components/schemas/McpRemoteConfig"
  3043. }
  3044. ]
  3045. }
  3046. },
  3047. "required": ["name", "config"],
  3048. "additionalProperties": false
  3049. }
  3050. }
  3051. }
  3052. },
  3053. "x-codeSamples": [
  3054. {
  3055. "lang": "js",
  3056. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3057. }
  3058. ]
  3059. }
  3060. },
  3061. "/mcp/{name}/auth": {
  3062. "post": {
  3063. "tags": ["mcp"],
  3064. "operationId": "mcp.auth.start",
  3065. "parameters": [
  3066. {
  3067. "name": "name",
  3068. "in": "path",
  3069. "schema": {
  3070. "type": "string"
  3071. },
  3072. "required": true
  3073. },
  3074. {
  3075. "name": "directory",
  3076. "in": "query",
  3077. "schema": {
  3078. "type": "string"
  3079. },
  3080. "required": false
  3081. },
  3082. {
  3083. "name": "workspace",
  3084. "in": "query",
  3085. "schema": {
  3086. "type": "string"
  3087. },
  3088. "required": false
  3089. }
  3090. ],
  3091. "responses": {
  3092. "200": {
  3093. "description": "OAuth flow started",
  3094. "content": {
  3095. "application/json": {
  3096. "schema": {
  3097. "type": "object",
  3098. "properties": {
  3099. "authorizationUrl": {
  3100. "type": "string"
  3101. },
  3102. "oauthState": {
  3103. "type": "string"
  3104. }
  3105. },
  3106. "required": ["authorizationUrl", "oauthState"],
  3107. "additionalProperties": false,
  3108. "description": "OAuth flow started"
  3109. }
  3110. }
  3111. }
  3112. },
  3113. "400": {
  3114. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3115. "content": {
  3116. "application/json": {
  3117. "schema": {
  3118. "anyOf": [
  3119. {
  3120. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3121. },
  3122. {
  3123. "$ref": "#/components/schemas/InvalidRequestError"
  3124. }
  3125. ]
  3126. }
  3127. }
  3128. }
  3129. },
  3130. "404": {
  3131. "description": "McpServerNotFoundError",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/McpServerNotFoundError"
  3136. }
  3137. }
  3138. }
  3139. }
  3140. },
  3141. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3142. "summary": "Start MCP OAuth",
  3143. "x-codeSamples": [
  3144. {
  3145. "lang": "js",
  3146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3147. }
  3148. ]
  3149. },
  3150. "delete": {
  3151. "tags": ["mcp"],
  3152. "operationId": "mcp.auth.remove",
  3153. "parameters": [
  3154. {
  3155. "name": "name",
  3156. "in": "path",
  3157. "schema": {
  3158. "type": "string"
  3159. },
  3160. "required": true
  3161. },
  3162. {
  3163. "name": "directory",
  3164. "in": "query",
  3165. "schema": {
  3166. "type": "string"
  3167. },
  3168. "required": false
  3169. },
  3170. {
  3171. "name": "workspace",
  3172. "in": "query",
  3173. "schema": {
  3174. "type": "string"
  3175. },
  3176. "required": false
  3177. }
  3178. ],
  3179. "responses": {
  3180. "200": {
  3181. "description": "OAuth credentials removed",
  3182. "content": {
  3183. "application/json": {
  3184. "schema": {
  3185. "type": "object",
  3186. "properties": {
  3187. "success": {
  3188. "type": "boolean",
  3189. "enum": [true]
  3190. }
  3191. },
  3192. "required": ["success"],
  3193. "additionalProperties": false,
  3194. "description": "OAuth credentials removed"
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "400": {
  3200. "description": "Bad request",
  3201. "content": {
  3202. "application/json": {
  3203. "schema": {
  3204. "$ref": "#/components/schemas/BadRequestError"
  3205. }
  3206. }
  3207. }
  3208. },
  3209. "404": {
  3210. "description": "McpServerNotFoundError",
  3211. "content": {
  3212. "application/json": {
  3213. "schema": {
  3214. "$ref": "#/components/schemas/McpServerNotFoundError"
  3215. }
  3216. }
  3217. }
  3218. }
  3219. },
  3220. "description": "Remove OAuth credentials for an MCP server.",
  3221. "summary": "Remove MCP OAuth",
  3222. "x-codeSamples": [
  3223. {
  3224. "lang": "js",
  3225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3226. }
  3227. ]
  3228. }
  3229. },
  3230. "/mcp/{name}/auth/callback": {
  3231. "post": {
  3232. "tags": ["mcp"],
  3233. "operationId": "mcp.auth.callback",
  3234. "parameters": [
  3235. {
  3236. "name": "name",
  3237. "in": "path",
  3238. "schema": {
  3239. "type": "string"
  3240. },
  3241. "required": true
  3242. },
  3243. {
  3244. "name": "directory",
  3245. "in": "query",
  3246. "schema": {
  3247. "type": "string"
  3248. },
  3249. "required": false
  3250. },
  3251. {
  3252. "name": "workspace",
  3253. "in": "query",
  3254. "schema": {
  3255. "type": "string"
  3256. },
  3257. "required": false
  3258. }
  3259. ],
  3260. "responses": {
  3261. "200": {
  3262. "description": "OAuth authentication completed",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "$ref": "#/components/schemas/MCPStatus"
  3267. }
  3268. }
  3269. }
  3270. },
  3271. "400": {
  3272. "description": "BadRequest | InvalidRequestError",
  3273. "content": {
  3274. "application/json": {
  3275. "schema": {
  3276. "anyOf": [
  3277. {
  3278. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3279. },
  3280. {
  3281. "$ref": "#/components/schemas/InvalidRequestError"
  3282. }
  3283. ]
  3284. }
  3285. }
  3286. }
  3287. },
  3288. "404": {
  3289. "description": "McpServerNotFoundError",
  3290. "content": {
  3291. "application/json": {
  3292. "schema": {
  3293. "$ref": "#/components/schemas/McpServerNotFoundError"
  3294. }
  3295. }
  3296. }
  3297. }
  3298. },
  3299. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3300. "summary": "Complete MCP OAuth",
  3301. "requestBody": {
  3302. "content": {
  3303. "application/json": {
  3304. "schema": {
  3305. "type": "object",
  3306. "properties": {
  3307. "code": {
  3308. "type": "string"
  3309. }
  3310. },
  3311. "required": ["code"],
  3312. "additionalProperties": false
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "x-codeSamples": [
  3318. {
  3319. "lang": "js",
  3320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3321. }
  3322. ]
  3323. }
  3324. },
  3325. "/mcp/{name}/auth/authenticate": {
  3326. "post": {
  3327. "tags": ["mcp"],
  3328. "operationId": "mcp.auth.authenticate",
  3329. "parameters": [
  3330. {
  3331. "name": "name",
  3332. "in": "path",
  3333. "schema": {
  3334. "type": "string"
  3335. },
  3336. "required": true
  3337. },
  3338. {
  3339. "name": "directory",
  3340. "in": "query",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": false
  3345. },
  3346. {
  3347. "name": "workspace",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. }
  3354. ],
  3355. "responses": {
  3356. "200": {
  3357. "description": "OAuth authentication completed",
  3358. "content": {
  3359. "application/json": {
  3360. "schema": {
  3361. "$ref": "#/components/schemas/MCPStatus"
  3362. }
  3363. }
  3364. }
  3365. },
  3366. "400": {
  3367. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3368. "content": {
  3369. "application/json": {
  3370. "schema": {
  3371. "anyOf": [
  3372. {
  3373. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3374. },
  3375. {
  3376. "$ref": "#/components/schemas/InvalidRequestError"
  3377. }
  3378. ]
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "404": {
  3384. "description": "McpServerNotFoundError",
  3385. "content": {
  3386. "application/json": {
  3387. "schema": {
  3388. "$ref": "#/components/schemas/McpServerNotFoundError"
  3389. }
  3390. }
  3391. }
  3392. }
  3393. },
  3394. "description": "Start OAuth flow and wait for callback (opens browser).",
  3395. "summary": "Authenticate MCP OAuth",
  3396. "x-codeSamples": [
  3397. {
  3398. "lang": "js",
  3399. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3400. }
  3401. ]
  3402. }
  3403. },
  3404. "/mcp/{name}/connect": {
  3405. "post": {
  3406. "tags": ["mcp"],
  3407. "operationId": "mcp.connect",
  3408. "parameters": [
  3409. {
  3410. "name": "name",
  3411. "in": "path",
  3412. "schema": {
  3413. "type": "string"
  3414. },
  3415. "required": true
  3416. },
  3417. {
  3418. "name": "directory",
  3419. "in": "query",
  3420. "schema": {
  3421. "type": "string"
  3422. },
  3423. "required": false
  3424. },
  3425. {
  3426. "name": "workspace",
  3427. "in": "query",
  3428. "schema": {
  3429. "type": "string"
  3430. },
  3431. "required": false
  3432. }
  3433. ],
  3434. "responses": {
  3435. "200": {
  3436. "description": "MCP server connected successfully",
  3437. "content": {
  3438. "application/json": {
  3439. "schema": {
  3440. "type": "boolean",
  3441. "description": "MCP server connected successfully"
  3442. }
  3443. }
  3444. }
  3445. },
  3446. "400": {
  3447. "description": "Bad request",
  3448. "content": {
  3449. "application/json": {
  3450. "schema": {
  3451. "$ref": "#/components/schemas/BadRequestError"
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "404": {
  3457. "description": "McpServerNotFoundError",
  3458. "content": {
  3459. "application/json": {
  3460. "schema": {
  3461. "$ref": "#/components/schemas/McpServerNotFoundError"
  3462. }
  3463. }
  3464. }
  3465. }
  3466. },
  3467. "description": "Connect an MCP server.",
  3468. "x-codeSamples": [
  3469. {
  3470. "lang": "js",
  3471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3472. }
  3473. ]
  3474. }
  3475. },
  3476. "/mcp/{name}/disconnect": {
  3477. "post": {
  3478. "tags": ["mcp"],
  3479. "operationId": "mcp.disconnect",
  3480. "parameters": [
  3481. {
  3482. "name": "name",
  3483. "in": "path",
  3484. "schema": {
  3485. "type": "string"
  3486. },
  3487. "required": true
  3488. },
  3489. {
  3490. "name": "directory",
  3491. "in": "query",
  3492. "schema": {
  3493. "type": "string"
  3494. },
  3495. "required": false
  3496. },
  3497. {
  3498. "name": "workspace",
  3499. "in": "query",
  3500. "schema": {
  3501. "type": "string"
  3502. },
  3503. "required": false
  3504. }
  3505. ],
  3506. "responses": {
  3507. "200": {
  3508. "description": "MCP server disconnected successfully",
  3509. "content": {
  3510. "application/json": {
  3511. "schema": {
  3512. "type": "boolean",
  3513. "description": "MCP server disconnected successfully"
  3514. }
  3515. }
  3516. }
  3517. },
  3518. "400": {
  3519. "description": "Bad request",
  3520. "content": {
  3521. "application/json": {
  3522. "schema": {
  3523. "$ref": "#/components/schemas/BadRequestError"
  3524. }
  3525. }
  3526. }
  3527. },
  3528. "404": {
  3529. "description": "McpServerNotFoundError",
  3530. "content": {
  3531. "application/json": {
  3532. "schema": {
  3533. "$ref": "#/components/schemas/McpServerNotFoundError"
  3534. }
  3535. }
  3536. }
  3537. }
  3538. },
  3539. "description": "Disconnect an MCP server.",
  3540. "x-codeSamples": [
  3541. {
  3542. "lang": "js",
  3543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3544. }
  3545. ]
  3546. }
  3547. },
  3548. "/project": {
  3549. "get": {
  3550. "tags": ["project"],
  3551. "operationId": "project.list",
  3552. "parameters": [
  3553. {
  3554. "name": "directory",
  3555. "in": "query",
  3556. "schema": {
  3557. "type": "string"
  3558. },
  3559. "required": false
  3560. },
  3561. {
  3562. "name": "workspace",
  3563. "in": "query",
  3564. "schema": {
  3565. "type": "string"
  3566. },
  3567. "required": false
  3568. }
  3569. ],
  3570. "responses": {
  3571. "200": {
  3572. "description": "List of projects",
  3573. "content": {
  3574. "application/json": {
  3575. "schema": {
  3576. "type": "array",
  3577. "items": {
  3578. "$ref": "#/components/schemas/Project"
  3579. },
  3580. "description": "List of projects"
  3581. }
  3582. }
  3583. }
  3584. },
  3585. "400": {
  3586. "description": "Bad request",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/BadRequestError"
  3591. }
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "description": "Get a list of projects that have been opened with OpenCode.",
  3597. "summary": "List all projects",
  3598. "x-codeSamples": [
  3599. {
  3600. "lang": "js",
  3601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3602. }
  3603. ]
  3604. }
  3605. },
  3606. "/project/current": {
  3607. "get": {
  3608. "tags": ["project"],
  3609. "operationId": "project.current",
  3610. "parameters": [
  3611. {
  3612. "name": "directory",
  3613. "in": "query",
  3614. "schema": {
  3615. "type": "string"
  3616. },
  3617. "required": false
  3618. },
  3619. {
  3620. "name": "workspace",
  3621. "in": "query",
  3622. "schema": {
  3623. "type": "string"
  3624. },
  3625. "required": false
  3626. }
  3627. ],
  3628. "responses": {
  3629. "200": {
  3630. "description": "Current project information",
  3631. "content": {
  3632. "application/json": {
  3633. "schema": {
  3634. "$ref": "#/components/schemas/Project"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Retrieve the currently active project that OpenCode is working with.",
  3651. "summary": "Get current project",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/git/init": {
  3661. "post": {
  3662. "tags": ["project"],
  3663. "operationId": "project.initGit",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Project information after git initialization",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Create a git repository for the current project and return the refreshed project info.",
  3705. "summary": "Initialize git repository",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/{projectID}": {
  3715. "patch": {
  3716. "tags": ["project"],
  3717. "operationId": "project.update",
  3718. "parameters": [
  3719. {
  3720. "name": "projectID",
  3721. "in": "path",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": true
  3726. },
  3727. {
  3728. "name": "directory",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. },
  3735. {
  3736. "name": "workspace",
  3737. "in": "query",
  3738. "schema": {
  3739. "type": "string"
  3740. },
  3741. "required": false
  3742. }
  3743. ],
  3744. "responses": {
  3745. "200": {
  3746. "description": "Updated project information",
  3747. "content": {
  3748. "application/json": {
  3749. "schema": {
  3750. "$ref": "#/components/schemas/Project"
  3751. }
  3752. }
  3753. }
  3754. },
  3755. "400": {
  3756. "description": "BadRequest | InvalidRequestError",
  3757. "content": {
  3758. "application/json": {
  3759. "schema": {
  3760. "anyOf": [
  3761. {
  3762. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3763. },
  3764. {
  3765. "$ref": "#/components/schemas/InvalidRequestError"
  3766. }
  3767. ]
  3768. }
  3769. }
  3770. }
  3771. },
  3772. "404": {
  3773. "description": "ProjectNotFoundError",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "$ref": "#/components/schemas/ProjectNotFoundError"
  3778. }
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "description": "Update project properties such as name, icon, and commands.",
  3784. "summary": "Update project",
  3785. "requestBody": {
  3786. "content": {
  3787. "application/json": {
  3788. "schema": {
  3789. "type": "object",
  3790. "properties": {
  3791. "name": {
  3792. "type": "string"
  3793. },
  3794. "icon": {
  3795. "type": "object",
  3796. "properties": {
  3797. "url": {
  3798. "type": "string"
  3799. },
  3800. "override": {
  3801. "type": "string"
  3802. },
  3803. "color": {
  3804. "type": "string"
  3805. }
  3806. },
  3807. "additionalProperties": false
  3808. },
  3809. "commands": {
  3810. "type": "object",
  3811. "properties": {
  3812. "start": {
  3813. "type": "string",
  3814. "description": "Startup script to run when creating a new workspace (worktree)"
  3815. }
  3816. },
  3817. "additionalProperties": false
  3818. }
  3819. },
  3820. "additionalProperties": false
  3821. }
  3822. }
  3823. }
  3824. },
  3825. "x-codeSamples": [
  3826. {
  3827. "lang": "js",
  3828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3829. }
  3830. ]
  3831. }
  3832. },
  3833. "/project/{projectID}/directories": {
  3834. "get": {
  3835. "tags": ["project"],
  3836. "operationId": "project.directories",
  3837. "parameters": [
  3838. {
  3839. "name": "projectID",
  3840. "in": "path",
  3841. "schema": {
  3842. "type": "string"
  3843. },
  3844. "required": true
  3845. },
  3846. {
  3847. "name": "directory",
  3848. "in": "query",
  3849. "schema": {
  3850. "type": "string"
  3851. },
  3852. "required": false
  3853. },
  3854. {
  3855. "name": "workspace",
  3856. "in": "query",
  3857. "schema": {
  3858. "type": "string"
  3859. },
  3860. "required": false
  3861. }
  3862. ],
  3863. "responses": {
  3864. "200": {
  3865. "description": "Project directories",
  3866. "content": {
  3867. "application/json": {
  3868. "schema": {
  3869. "$ref": "#/components/schemas/ProjectDirectories"
  3870. }
  3871. }
  3872. }
  3873. },
  3874. "400": {
  3875. "description": "Bad request",
  3876. "content": {
  3877. "application/json": {
  3878. "schema": {
  3879. "$ref": "#/components/schemas/BadRequestError"
  3880. }
  3881. }
  3882. }
  3883. }
  3884. },
  3885. "description": "List known local absolute directories for a project.",
  3886. "summary": "List project directories",
  3887. "x-codeSamples": [
  3888. {
  3889. "lang": "js",
  3890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3891. }
  3892. ]
  3893. }
  3894. },
  3895. "/experimental/project/{projectID}/copy": {
  3896. "post": {
  3897. "tags": ["projectCopy"],
  3898. "operationId": "experimental.projectCopy.create",
  3899. "parameters": [
  3900. {
  3901. "name": "projectID",
  3902. "in": "path",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": true
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project copy created",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectCopyCopy"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "ProjectCopyError | InvalidRequestError",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "anyOf": [
  3934. {
  3935. "$ref": "#/components/schemas/ProjectCopyError"
  3936. },
  3937. {
  3938. "$ref": "#/components/schemas/InvalidRequestError"
  3939. }
  3940. ]
  3941. }
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "description": "Create a local physical copy of a project using the selected strategy.",
  3947. "summary": "Create project copy",
  3948. "requestBody": {
  3949. "content": {
  3950. "application/json": {
  3951. "schema": {
  3952. "type": "object",
  3953. "properties": {
  3954. "strategy": {
  3955. "type": "string",
  3956. "enum": ["git_worktree"]
  3957. },
  3958. "directory": {
  3959. "type": "string"
  3960. },
  3961. "name": {
  3962. "type": "string"
  3963. },
  3964. "context": {
  3965. "type": "string"
  3966. }
  3967. },
  3968. "required": ["strategy", "directory"],
  3969. "additionalProperties": false
  3970. }
  3971. }
  3972. }
  3973. },
  3974. "x-codeSamples": [
  3975. {
  3976. "lang": "js",
  3977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3978. }
  3979. ]
  3980. },
  3981. "delete": {
  3982. "tags": ["projectCopy"],
  3983. "operationId": "experimental.projectCopy.remove",
  3984. "parameters": [
  3985. {
  3986. "name": "projectID",
  3987. "in": "path",
  3988. "schema": {
  3989. "type": "string"
  3990. },
  3991. "required": true
  3992. },
  3993. {
  3994. "name": "workspace",
  3995. "in": "query",
  3996. "schema": {
  3997. "type": "string"
  3998. },
  3999. "required": false
  4000. }
  4001. ],
  4002. "responses": {
  4003. "204": {
  4004. "description": "Project copy removed"
  4005. },
  4006. "400": {
  4007. "description": "ProjectCopyError | InvalidRequestError",
  4008. "content": {
  4009. "application/json": {
  4010. "schema": {
  4011. "anyOf": [
  4012. {
  4013. "$ref": "#/components/schemas/ProjectCopyError"
  4014. },
  4015. {
  4016. "$ref": "#/components/schemas/InvalidRequestError"
  4017. }
  4018. ]
  4019. }
  4020. }
  4021. }
  4022. }
  4023. },
  4024. "description": "Remove a local physical copy of a project using the selected strategy.",
  4025. "summary": "Remove project copy",
  4026. "requestBody": {
  4027. "content": {
  4028. "application/json": {
  4029. "schema": {
  4030. "type": "object",
  4031. "properties": {
  4032. "directory": {
  4033. "type": "string"
  4034. },
  4035. "force": {
  4036. "type": "boolean"
  4037. }
  4038. },
  4039. "required": ["directory", "force"],
  4040. "additionalProperties": false
  4041. }
  4042. }
  4043. }
  4044. },
  4045. "x-codeSamples": [
  4046. {
  4047. "lang": "js",
  4048. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  4049. }
  4050. ]
  4051. }
  4052. },
  4053. "/experimental/project/{projectID}/copy/refresh": {
  4054. "post": {
  4055. "tags": ["projectCopy"],
  4056. "operationId": "experimental.projectCopy.refresh",
  4057. "parameters": [
  4058. {
  4059. "name": "projectID",
  4060. "in": "path",
  4061. "schema": {
  4062. "type": "string"
  4063. },
  4064. "required": true
  4065. },
  4066. {
  4067. "name": "directory",
  4068. "in": "query",
  4069. "schema": {
  4070. "type": "string"
  4071. },
  4072. "required": false
  4073. },
  4074. {
  4075. "name": "workspace",
  4076. "in": "query",
  4077. "schema": {
  4078. "type": "string"
  4079. },
  4080. "required": false
  4081. }
  4082. ],
  4083. "responses": {
  4084. "204": {
  4085. "description": "Project copies refreshed"
  4086. },
  4087. "400": {
  4088. "description": "ProjectCopyError | InvalidRequestError",
  4089. "content": {
  4090. "application/json": {
  4091. "schema": {
  4092. "anyOf": [
  4093. {
  4094. "$ref": "#/components/schemas/ProjectCopyError"
  4095. },
  4096. {
  4097. "$ref": "#/components/schemas/InvalidRequestError"
  4098. }
  4099. ]
  4100. }
  4101. }
  4102. }
  4103. }
  4104. },
  4105. "description": "Discover local project copies using one or all configured strategies.",
  4106. "summary": "Refresh project copies",
  4107. "x-codeSamples": [
  4108. {
  4109. "lang": "js",
  4110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  4111. }
  4112. ]
  4113. }
  4114. },
  4115. "/pty/shells": {
  4116. "get": {
  4117. "tags": ["pty"],
  4118. "operationId": "pty.shells",
  4119. "parameters": [
  4120. {
  4121. "name": "directory",
  4122. "in": "query",
  4123. "schema": {
  4124. "type": "string"
  4125. },
  4126. "required": false
  4127. },
  4128. {
  4129. "name": "workspace",
  4130. "in": "query",
  4131. "schema": {
  4132. "type": "string"
  4133. },
  4134. "required": false
  4135. }
  4136. ],
  4137. "responses": {
  4138. "200": {
  4139. "description": "List of shells",
  4140. "content": {
  4141. "application/json": {
  4142. "schema": {
  4143. "type": "array",
  4144. "items": {
  4145. "type": "object",
  4146. "properties": {
  4147. "path": {
  4148. "type": "string"
  4149. },
  4150. "name": {
  4151. "type": "string"
  4152. },
  4153. "acceptable": {
  4154. "type": "boolean"
  4155. }
  4156. },
  4157. "required": ["path", "name", "acceptable"],
  4158. "additionalProperties": false
  4159. },
  4160. "description": "List of shells"
  4161. }
  4162. }
  4163. }
  4164. },
  4165. "400": {
  4166. "description": "Bad request",
  4167. "content": {
  4168. "application/json": {
  4169. "schema": {
  4170. "$ref": "#/components/schemas/BadRequestError"
  4171. }
  4172. }
  4173. }
  4174. }
  4175. },
  4176. "description": "Get a list of available shells on the system.",
  4177. "summary": "List available shells",
  4178. "x-codeSamples": [
  4179. {
  4180. "lang": "js",
  4181. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4182. }
  4183. ]
  4184. }
  4185. },
  4186. "/pty": {
  4187. "get": {
  4188. "tags": ["pty"],
  4189. "operationId": "pty.list",
  4190. "parameters": [
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "List of sessions",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "type": "array",
  4215. "items": {
  4216. "$ref": "#/components/schemas/Pty"
  4217. },
  4218. "description": "List of sessions"
  4219. }
  4220. }
  4221. }
  4222. },
  4223. "400": {
  4224. "description": "Bad request",
  4225. "content": {
  4226. "application/json": {
  4227. "schema": {
  4228. "$ref": "#/components/schemas/BadRequestError"
  4229. }
  4230. }
  4231. }
  4232. }
  4233. },
  4234. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4235. "summary": "List PTY sessions",
  4236. "x-codeSamples": [
  4237. {
  4238. "lang": "js",
  4239. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4240. }
  4241. ]
  4242. },
  4243. "post": {
  4244. "tags": ["pty"],
  4245. "operationId": "pty.create",
  4246. "parameters": [
  4247. {
  4248. "name": "directory",
  4249. "in": "query",
  4250. "schema": {
  4251. "type": "string"
  4252. },
  4253. "required": false
  4254. },
  4255. {
  4256. "name": "workspace",
  4257. "in": "query",
  4258. "schema": {
  4259. "type": "string"
  4260. },
  4261. "required": false
  4262. }
  4263. ],
  4264. "responses": {
  4265. "200": {
  4266. "description": "Created session",
  4267. "content": {
  4268. "application/json": {
  4269. "schema": {
  4270. "$ref": "#/components/schemas/Pty"
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "400": {
  4276. "description": "BadRequest | InvalidRequestError",
  4277. "content": {
  4278. "application/json": {
  4279. "schema": {
  4280. "anyOf": [
  4281. {
  4282. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4283. },
  4284. {
  4285. "$ref": "#/components/schemas/InvalidRequestError"
  4286. }
  4287. ]
  4288. }
  4289. }
  4290. }
  4291. }
  4292. },
  4293. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4294. "summary": "Create PTY session",
  4295. "requestBody": {
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "object",
  4300. "properties": {
  4301. "command": {
  4302. "type": "string"
  4303. },
  4304. "args": {
  4305. "type": "array",
  4306. "items": {
  4307. "type": "string"
  4308. }
  4309. },
  4310. "cwd": {
  4311. "type": "string"
  4312. },
  4313. "title": {
  4314. "type": "string"
  4315. },
  4316. "env": {
  4317. "type": "object",
  4318. "additionalProperties": {
  4319. "type": "string"
  4320. }
  4321. }
  4322. },
  4323. "additionalProperties": false
  4324. }
  4325. }
  4326. }
  4327. },
  4328. "x-codeSamples": [
  4329. {
  4330. "lang": "js",
  4331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4332. }
  4333. ]
  4334. }
  4335. },
  4336. "/pty/{ptyID}": {
  4337. "get": {
  4338. "tags": ["pty"],
  4339. "operationId": "pty.get",
  4340. "parameters": [
  4341. {
  4342. "name": "ptyID",
  4343. "in": "path",
  4344. "schema": {
  4345. "type": "string",
  4346. "pattern": "^pty"
  4347. },
  4348. "required": true
  4349. },
  4350. {
  4351. "name": "directory",
  4352. "in": "query",
  4353. "schema": {
  4354. "type": "string"
  4355. },
  4356. "required": false
  4357. },
  4358. {
  4359. "name": "workspace",
  4360. "in": "query",
  4361. "schema": {
  4362. "type": "string"
  4363. },
  4364. "required": false
  4365. }
  4366. ],
  4367. "responses": {
  4368. "200": {
  4369. "description": "Session info",
  4370. "content": {
  4371. "application/json": {
  4372. "schema": {
  4373. "$ref": "#/components/schemas/Pty"
  4374. }
  4375. }
  4376. }
  4377. },
  4378. "400": {
  4379. "description": "Bad request",
  4380. "content": {
  4381. "application/json": {
  4382. "schema": {
  4383. "$ref": "#/components/schemas/BadRequestError"
  4384. }
  4385. }
  4386. }
  4387. },
  4388. "404": {
  4389. "description": "PtyNotFoundError",
  4390. "content": {
  4391. "application/json": {
  4392. "schema": {
  4393. "$ref": "#/components/schemas/PtyNotFoundError"
  4394. }
  4395. }
  4396. }
  4397. }
  4398. },
  4399. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4400. "summary": "Get PTY session",
  4401. "x-codeSamples": [
  4402. {
  4403. "lang": "js",
  4404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4405. }
  4406. ]
  4407. },
  4408. "put": {
  4409. "tags": ["pty"],
  4410. "operationId": "pty.update",
  4411. "parameters": [
  4412. {
  4413. "name": "ptyID",
  4414. "in": "path",
  4415. "schema": {
  4416. "type": "string",
  4417. "pattern": "^pty"
  4418. },
  4419. "required": true
  4420. },
  4421. {
  4422. "name": "directory",
  4423. "in": "query",
  4424. "schema": {
  4425. "type": "string"
  4426. },
  4427. "required": false
  4428. },
  4429. {
  4430. "name": "workspace",
  4431. "in": "query",
  4432. "schema": {
  4433. "type": "string"
  4434. },
  4435. "required": false
  4436. }
  4437. ],
  4438. "responses": {
  4439. "200": {
  4440. "description": "Updated session",
  4441. "content": {
  4442. "application/json": {
  4443. "schema": {
  4444. "$ref": "#/components/schemas/Pty"
  4445. }
  4446. }
  4447. }
  4448. },
  4449. "400": {
  4450. "description": "BadRequest | InvalidRequestError",
  4451. "content": {
  4452. "application/json": {
  4453. "schema": {
  4454. "anyOf": [
  4455. {
  4456. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4457. },
  4458. {
  4459. "$ref": "#/components/schemas/InvalidRequestError"
  4460. }
  4461. ]
  4462. }
  4463. }
  4464. }
  4465. },
  4466. "404": {
  4467. "description": "PtyNotFoundError",
  4468. "content": {
  4469. "application/json": {
  4470. "schema": {
  4471. "$ref": "#/components/schemas/PtyNotFoundError"
  4472. }
  4473. }
  4474. }
  4475. }
  4476. },
  4477. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4478. "summary": "Update PTY session",
  4479. "requestBody": {
  4480. "content": {
  4481. "application/json": {
  4482. "schema": {
  4483. "type": "object",
  4484. "properties": {
  4485. "title": {
  4486. "type": "string"
  4487. },
  4488. "size": {
  4489. "type": "object",
  4490. "properties": {
  4491. "rows": {
  4492. "type": "integer",
  4493. "exclusiveMinimum": 0
  4494. },
  4495. "cols": {
  4496. "type": "integer",
  4497. "exclusiveMinimum": 0
  4498. }
  4499. },
  4500. "required": ["rows", "cols"],
  4501. "additionalProperties": false
  4502. }
  4503. },
  4504. "additionalProperties": false
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "x-codeSamples": [
  4510. {
  4511. "lang": "js",
  4512. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4513. }
  4514. ]
  4515. },
  4516. "delete": {
  4517. "tags": ["pty"],
  4518. "operationId": "pty.remove",
  4519. "parameters": [
  4520. {
  4521. "name": "ptyID",
  4522. "in": "path",
  4523. "schema": {
  4524. "type": "string",
  4525. "pattern": "^pty"
  4526. },
  4527. "required": true
  4528. },
  4529. {
  4530. "name": "directory",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. },
  4537. {
  4538. "name": "workspace",
  4539. "in": "query",
  4540. "schema": {
  4541. "type": "string"
  4542. },
  4543. "required": false
  4544. }
  4545. ],
  4546. "responses": {
  4547. "200": {
  4548. "description": "Session removed",
  4549. "content": {
  4550. "application/json": {
  4551. "schema": {
  4552. "type": "boolean",
  4553. "description": "Session removed"
  4554. }
  4555. }
  4556. }
  4557. },
  4558. "400": {
  4559. "description": "Bad request",
  4560. "content": {
  4561. "application/json": {
  4562. "schema": {
  4563. "$ref": "#/components/schemas/BadRequestError"
  4564. }
  4565. }
  4566. }
  4567. },
  4568. "404": {
  4569. "description": "PtyNotFoundError",
  4570. "content": {
  4571. "application/json": {
  4572. "schema": {
  4573. "$ref": "#/components/schemas/PtyNotFoundError"
  4574. }
  4575. }
  4576. }
  4577. }
  4578. },
  4579. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4580. "summary": "Remove PTY session",
  4581. "x-codeSamples": [
  4582. {
  4583. "lang": "js",
  4584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4585. }
  4586. ]
  4587. }
  4588. },
  4589. "/pty/{ptyID}/connect-token": {
  4590. "post": {
  4591. "tags": ["pty"],
  4592. "operationId": "pty.connectToken",
  4593. "parameters": [
  4594. {
  4595. "name": "ptyID",
  4596. "in": "path",
  4597. "schema": {
  4598. "type": "string",
  4599. "pattern": "^pty"
  4600. },
  4601. "required": true
  4602. },
  4603. {
  4604. "name": "directory",
  4605. "in": "query",
  4606. "schema": {
  4607. "type": "string"
  4608. },
  4609. "required": false
  4610. },
  4611. {
  4612. "name": "workspace",
  4613. "in": "query",
  4614. "schema": {
  4615. "type": "string"
  4616. },
  4617. "required": false
  4618. }
  4619. ],
  4620. "responses": {
  4621. "200": {
  4622. "description": "WebSocket connect token",
  4623. "content": {
  4624. "application/json": {
  4625. "schema": {
  4626. "type": "object",
  4627. "properties": {
  4628. "ticket": {
  4629. "type": "string"
  4630. },
  4631. "expires_in": {
  4632. "type": "integer",
  4633. "exclusiveMinimum": 0
  4634. }
  4635. },
  4636. "required": ["ticket", "expires_in"],
  4637. "additionalProperties": false,
  4638. "description": "WebSocket connect token"
  4639. }
  4640. }
  4641. }
  4642. },
  4643. "400": {
  4644. "description": "Bad request",
  4645. "content": {
  4646. "application/json": {
  4647. "schema": {
  4648. "$ref": "#/components/schemas/BadRequestError"
  4649. }
  4650. }
  4651. }
  4652. },
  4653. "403": {
  4654. "description": "PtyForbiddenError",
  4655. "content": {
  4656. "application/json": {
  4657. "schema": {
  4658. "$ref": "#/components/schemas/PtyForbiddenError"
  4659. }
  4660. }
  4661. }
  4662. },
  4663. "404": {
  4664. "description": "PtyNotFoundError",
  4665. "content": {
  4666. "application/json": {
  4667. "schema": {
  4668. "$ref": "#/components/schemas/PtyNotFoundError"
  4669. }
  4670. }
  4671. }
  4672. }
  4673. },
  4674. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4675. "summary": "Create PTY WebSocket token",
  4676. "x-codeSamples": [
  4677. {
  4678. "lang": "js",
  4679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4680. }
  4681. ]
  4682. }
  4683. },
  4684. "/question": {
  4685. "get": {
  4686. "tags": ["question"],
  4687. "operationId": "question.list",
  4688. "parameters": [
  4689. {
  4690. "name": "directory",
  4691. "in": "query",
  4692. "schema": {
  4693. "type": "string"
  4694. },
  4695. "required": false
  4696. },
  4697. {
  4698. "name": "workspace",
  4699. "in": "query",
  4700. "schema": {
  4701. "type": "string"
  4702. },
  4703. "required": false
  4704. }
  4705. ],
  4706. "responses": {
  4707. "200": {
  4708. "description": "List of pending questions",
  4709. "content": {
  4710. "application/json": {
  4711. "schema": {
  4712. "type": "array",
  4713. "items": {
  4714. "$ref": "#/components/schemas/QuestionRequest"
  4715. },
  4716. "description": "List of pending questions"
  4717. }
  4718. }
  4719. }
  4720. },
  4721. "400": {
  4722. "description": "Bad request",
  4723. "content": {
  4724. "application/json": {
  4725. "schema": {
  4726. "$ref": "#/components/schemas/BadRequestError"
  4727. }
  4728. }
  4729. }
  4730. }
  4731. },
  4732. "description": "Get all pending question requests across all sessions.",
  4733. "summary": "List pending questions",
  4734. "x-codeSamples": [
  4735. {
  4736. "lang": "js",
  4737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4738. }
  4739. ]
  4740. }
  4741. },
  4742. "/question/{requestID}/reply": {
  4743. "post": {
  4744. "tags": ["question"],
  4745. "operationId": "question.reply",
  4746. "parameters": [
  4747. {
  4748. "name": "requestID",
  4749. "in": "path",
  4750. "schema": {
  4751. "type": "string",
  4752. "pattern": "^que"
  4753. },
  4754. "required": true
  4755. },
  4756. {
  4757. "name": "directory",
  4758. "in": "query",
  4759. "schema": {
  4760. "type": "string"
  4761. },
  4762. "required": false
  4763. },
  4764. {
  4765. "name": "workspace",
  4766. "in": "query",
  4767. "schema": {
  4768. "type": "string"
  4769. },
  4770. "required": false
  4771. }
  4772. ],
  4773. "responses": {
  4774. "200": {
  4775. "description": "Question answered successfully",
  4776. "content": {
  4777. "application/json": {
  4778. "schema": {
  4779. "type": "boolean",
  4780. "description": "Question answered successfully"
  4781. }
  4782. }
  4783. }
  4784. },
  4785. "400": {
  4786. "description": "BadRequest | InvalidRequestError",
  4787. "content": {
  4788. "application/json": {
  4789. "schema": {
  4790. "anyOf": [
  4791. {
  4792. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4793. },
  4794. {
  4795. "$ref": "#/components/schemas/InvalidRequestError"
  4796. }
  4797. ]
  4798. }
  4799. }
  4800. }
  4801. },
  4802. "404": {
  4803. "description": "QuestionNotFoundError",
  4804. "content": {
  4805. "application/json": {
  4806. "schema": {
  4807. "$ref": "#/components/schemas/QuestionNotFoundError"
  4808. }
  4809. }
  4810. }
  4811. }
  4812. },
  4813. "description": "Provide answers to a question request from the AI assistant.",
  4814. "summary": "Reply to question request",
  4815. "requestBody": {
  4816. "content": {
  4817. "application/json": {
  4818. "schema": {
  4819. "type": "object",
  4820. "properties": {
  4821. "answers": {
  4822. "type": "array",
  4823. "items": {
  4824. "$ref": "#/components/schemas/QuestionAnswer"
  4825. },
  4826. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4827. }
  4828. },
  4829. "required": ["answers"],
  4830. "additionalProperties": false
  4831. }
  4832. }
  4833. }
  4834. },
  4835. "x-codeSamples": [
  4836. {
  4837. "lang": "js",
  4838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4839. }
  4840. ]
  4841. }
  4842. },
  4843. "/question/{requestID}/reject": {
  4844. "post": {
  4845. "tags": ["question"],
  4846. "operationId": "question.reject",
  4847. "parameters": [
  4848. {
  4849. "name": "requestID",
  4850. "in": "path",
  4851. "schema": {
  4852. "type": "string",
  4853. "pattern": "^que"
  4854. },
  4855. "required": true
  4856. },
  4857. {
  4858. "name": "directory",
  4859. "in": "query",
  4860. "schema": {
  4861. "type": "string"
  4862. },
  4863. "required": false
  4864. },
  4865. {
  4866. "name": "workspace",
  4867. "in": "query",
  4868. "schema": {
  4869. "type": "string"
  4870. },
  4871. "required": false
  4872. }
  4873. ],
  4874. "responses": {
  4875. "200": {
  4876. "description": "Question rejected successfully",
  4877. "content": {
  4878. "application/json": {
  4879. "schema": {
  4880. "type": "boolean",
  4881. "description": "Question rejected successfully"
  4882. }
  4883. }
  4884. }
  4885. },
  4886. "400": {
  4887. "description": "BadRequest | InvalidRequestError",
  4888. "content": {
  4889. "application/json": {
  4890. "schema": {
  4891. "anyOf": [
  4892. {
  4893. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4894. },
  4895. {
  4896. "$ref": "#/components/schemas/InvalidRequestError"
  4897. }
  4898. ]
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "404": {
  4904. "description": "QuestionNotFoundError",
  4905. "content": {
  4906. "application/json": {
  4907. "schema": {
  4908. "$ref": "#/components/schemas/QuestionNotFoundError"
  4909. }
  4910. }
  4911. }
  4912. }
  4913. },
  4914. "description": "Reject a question request from the AI assistant.",
  4915. "summary": "Reject question request",
  4916. "x-codeSamples": [
  4917. {
  4918. "lang": "js",
  4919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4920. }
  4921. ]
  4922. }
  4923. },
  4924. "/permission": {
  4925. "get": {
  4926. "tags": ["permission"],
  4927. "operationId": "permission.list",
  4928. "parameters": [
  4929. {
  4930. "name": "directory",
  4931. "in": "query",
  4932. "schema": {
  4933. "type": "string"
  4934. },
  4935. "required": false
  4936. },
  4937. {
  4938. "name": "workspace",
  4939. "in": "query",
  4940. "schema": {
  4941. "type": "string"
  4942. },
  4943. "required": false
  4944. }
  4945. ],
  4946. "responses": {
  4947. "200": {
  4948. "description": "List of pending permissions",
  4949. "content": {
  4950. "application/json": {
  4951. "schema": {
  4952. "type": "array",
  4953. "items": {
  4954. "$ref": "#/components/schemas/PermissionRequest"
  4955. },
  4956. "description": "List of pending permissions"
  4957. }
  4958. }
  4959. }
  4960. },
  4961. "400": {
  4962. "description": "Bad request",
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "$ref": "#/components/schemas/BadRequestError"
  4967. }
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "description": "Get all pending permission requests across all sessions.",
  4973. "summary": "List pending permissions",
  4974. "x-codeSamples": [
  4975. {
  4976. "lang": "js",
  4977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4978. }
  4979. ]
  4980. }
  4981. },
  4982. "/permission/{requestID}/reply": {
  4983. "post": {
  4984. "tags": ["permission"],
  4985. "operationId": "permission.reply",
  4986. "parameters": [
  4987. {
  4988. "name": "requestID",
  4989. "in": "path",
  4990. "schema": {
  4991. "type": "string",
  4992. "pattern": "^per"
  4993. },
  4994. "required": true
  4995. },
  4996. {
  4997. "name": "directory",
  4998. "in": "query",
  4999. "schema": {
  5000. "type": "string"
  5001. },
  5002. "required": false
  5003. },
  5004. {
  5005. "name": "workspace",
  5006. "in": "query",
  5007. "schema": {
  5008. "type": "string"
  5009. },
  5010. "required": false
  5011. }
  5012. ],
  5013. "responses": {
  5014. "200": {
  5015. "description": "Permission processed successfully",
  5016. "content": {
  5017. "application/json": {
  5018. "schema": {
  5019. "type": "boolean",
  5020. "description": "Permission processed successfully"
  5021. }
  5022. }
  5023. }
  5024. },
  5025. "400": {
  5026. "description": "BadRequest | InvalidRequestError",
  5027. "content": {
  5028. "application/json": {
  5029. "schema": {
  5030. "anyOf": [
  5031. {
  5032. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5033. },
  5034. {
  5035. "$ref": "#/components/schemas/InvalidRequestError"
  5036. }
  5037. ]
  5038. }
  5039. }
  5040. }
  5041. },
  5042. "404": {
  5043. "description": "PermissionNotFoundError",
  5044. "content": {
  5045. "application/json": {
  5046. "schema": {
  5047. "$ref": "#/components/schemas/PermissionNotFoundError"
  5048. }
  5049. }
  5050. }
  5051. }
  5052. },
  5053. "description": "Approve or deny a permission request from the AI assistant.",
  5054. "summary": "Respond to permission request",
  5055. "requestBody": {
  5056. "content": {
  5057. "application/json": {
  5058. "schema": {
  5059. "type": "object",
  5060. "properties": {
  5061. "reply": {
  5062. "type": "string",
  5063. "enum": ["once", "always", "reject"]
  5064. },
  5065. "message": {
  5066. "type": "string"
  5067. }
  5068. },
  5069. "required": ["reply"],
  5070. "additionalProperties": false
  5071. }
  5072. }
  5073. }
  5074. },
  5075. "x-codeSamples": [
  5076. {
  5077. "lang": "js",
  5078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  5079. }
  5080. ]
  5081. }
  5082. },
  5083. "/provider": {
  5084. "get": {
  5085. "tags": ["provider"],
  5086. "operationId": "provider.list",
  5087. "parameters": [
  5088. {
  5089. "name": "directory",
  5090. "in": "query",
  5091. "schema": {
  5092. "type": "string"
  5093. },
  5094. "required": false
  5095. },
  5096. {
  5097. "name": "workspace",
  5098. "in": "query",
  5099. "schema": {
  5100. "type": "string"
  5101. },
  5102. "required": false
  5103. }
  5104. ],
  5105. "responses": {
  5106. "200": {
  5107. "description": "List of providers",
  5108. "content": {
  5109. "application/json": {
  5110. "schema": {
  5111. "type": "object",
  5112. "properties": {
  5113. "all": {
  5114. "type": "array",
  5115. "items": {
  5116. "$ref": "#/components/schemas/Provider"
  5117. }
  5118. },
  5119. "default": {
  5120. "type": "object",
  5121. "additionalProperties": {
  5122. "type": "string"
  5123. }
  5124. },
  5125. "connected": {
  5126. "type": "array",
  5127. "items": {
  5128. "type": "string"
  5129. }
  5130. }
  5131. },
  5132. "required": ["all", "default", "connected"],
  5133. "additionalProperties": false,
  5134. "description": "List of providers"
  5135. }
  5136. }
  5137. }
  5138. },
  5139. "400": {
  5140. "description": "Bad request",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/BadRequestError"
  5145. }
  5146. }
  5147. }
  5148. }
  5149. },
  5150. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5151. "summary": "List providers",
  5152. "x-codeSamples": [
  5153. {
  5154. "lang": "js",
  5155. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5156. }
  5157. ]
  5158. }
  5159. },
  5160. "/provider/auth": {
  5161. "get": {
  5162. "tags": ["provider"],
  5163. "operationId": "provider.auth",
  5164. "parameters": [
  5165. {
  5166. "name": "directory",
  5167. "in": "query",
  5168. "schema": {
  5169. "type": "string"
  5170. },
  5171. "required": false
  5172. },
  5173. {
  5174. "name": "workspace",
  5175. "in": "query",
  5176. "schema": {
  5177. "type": "string"
  5178. },
  5179. "required": false
  5180. }
  5181. ],
  5182. "responses": {
  5183. "200": {
  5184. "description": "Provider auth methods",
  5185. "content": {
  5186. "application/json": {
  5187. "schema": {
  5188. "type": "object",
  5189. "additionalProperties": {
  5190. "type": "array",
  5191. "items": {
  5192. "$ref": "#/components/schemas/ProviderAuthMethod"
  5193. }
  5194. },
  5195. "description": "Provider auth methods"
  5196. }
  5197. }
  5198. }
  5199. },
  5200. "400": {
  5201. "description": "Bad request",
  5202. "content": {
  5203. "application/json": {
  5204. "schema": {
  5205. "$ref": "#/components/schemas/BadRequestError"
  5206. }
  5207. }
  5208. }
  5209. }
  5210. },
  5211. "description": "Retrieve available authentication methods for all AI providers.",
  5212. "summary": "Get provider auth methods",
  5213. "x-codeSamples": [
  5214. {
  5215. "lang": "js",
  5216. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5217. }
  5218. ]
  5219. }
  5220. },
  5221. "/provider/{providerID}/oauth/authorize": {
  5222. "post": {
  5223. "tags": ["provider"],
  5224. "operationId": "provider.oauth.authorize",
  5225. "parameters": [
  5226. {
  5227. "name": "providerID",
  5228. "in": "path",
  5229. "schema": {
  5230. "type": "string"
  5231. },
  5232. "required": true
  5233. },
  5234. {
  5235. "name": "directory",
  5236. "in": "query",
  5237. "schema": {
  5238. "type": "string"
  5239. },
  5240. "required": false
  5241. },
  5242. {
  5243. "name": "workspace",
  5244. "in": "query",
  5245. "schema": {
  5246. "type": "string"
  5247. },
  5248. "required": false
  5249. }
  5250. ],
  5251. "responses": {
  5252. "200": {
  5253. "description": "Authorization URL and method",
  5254. "content": {
  5255. "application/json": {
  5256. "schema": {
  5257. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5258. }
  5259. }
  5260. }
  5261. },
  5262. "400": {
  5263. "description": "ProviderAuthError | InvalidRequestError",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "anyOf": [
  5268. {
  5269. "$ref": "#/components/schemas/ProviderAuthError1"
  5270. },
  5271. {
  5272. "$ref": "#/components/schemas/InvalidRequestError"
  5273. }
  5274. ]
  5275. }
  5276. }
  5277. }
  5278. }
  5279. },
  5280. "description": "Start the OAuth authorization flow for a provider.",
  5281. "summary": "Start OAuth authorization",
  5282. "requestBody": {
  5283. "content": {
  5284. "application/json": {
  5285. "schema": {
  5286. "type": "object",
  5287. "properties": {
  5288. "method": {
  5289. "type": "number",
  5290. "description": "Auth method index"
  5291. },
  5292. "inputs": {
  5293. "type": "object",
  5294. "additionalProperties": {
  5295. "type": "string"
  5296. }
  5297. }
  5298. },
  5299. "required": ["method"],
  5300. "additionalProperties": false
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "x-codeSamples": [
  5306. {
  5307. "lang": "js",
  5308. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5309. }
  5310. ]
  5311. }
  5312. },
  5313. "/provider/{providerID}/oauth/callback": {
  5314. "post": {
  5315. "tags": ["provider"],
  5316. "operationId": "provider.oauth.callback",
  5317. "parameters": [
  5318. {
  5319. "name": "providerID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string"
  5323. },
  5324. "required": true
  5325. },
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. }
  5342. ],
  5343. "responses": {
  5344. "200": {
  5345. "description": "OAuth callback processed successfully",
  5346. "content": {
  5347. "application/json": {
  5348. "schema": {
  5349. "type": "boolean",
  5350. "description": "OAuth callback processed successfully"
  5351. }
  5352. }
  5353. }
  5354. },
  5355. "400": {
  5356. "description": "ProviderAuthError | InvalidRequestError",
  5357. "content": {
  5358. "application/json": {
  5359. "schema": {
  5360. "anyOf": [
  5361. {
  5362. "$ref": "#/components/schemas/ProviderAuthError1"
  5363. },
  5364. {
  5365. "$ref": "#/components/schemas/InvalidRequestError"
  5366. }
  5367. ]
  5368. }
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "description": "Handle the OAuth callback from a provider after user authorization.",
  5374. "summary": "Handle OAuth callback",
  5375. "requestBody": {
  5376. "content": {
  5377. "application/json": {
  5378. "schema": {
  5379. "type": "object",
  5380. "properties": {
  5381. "method": {
  5382. "type": "number",
  5383. "description": "Auth method index"
  5384. },
  5385. "code": {
  5386. "type": "string"
  5387. }
  5388. },
  5389. "required": ["method"],
  5390. "additionalProperties": false
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "x-codeSamples": [
  5396. {
  5397. "lang": "js",
  5398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5399. }
  5400. ]
  5401. }
  5402. },
  5403. "/session": {
  5404. "get": {
  5405. "tags": ["session"],
  5406. "operationId": "session.list",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. },
  5424. {
  5425. "name": "scope",
  5426. "in": "query",
  5427. "schema": {
  5428. "type": "string",
  5429. "enum": ["project"]
  5430. },
  5431. "required": false
  5432. },
  5433. {
  5434. "name": "path",
  5435. "in": "query",
  5436. "schema": {
  5437. "type": "string"
  5438. },
  5439. "required": false
  5440. },
  5441. {
  5442. "name": "roots",
  5443. "in": "query",
  5444. "schema": {
  5445. "anyOf": [
  5446. {
  5447. "type": "boolean"
  5448. },
  5449. {
  5450. "type": "string",
  5451. "enum": ["true", "false"]
  5452. }
  5453. ]
  5454. },
  5455. "required": false
  5456. },
  5457. {
  5458. "name": "start",
  5459. "in": "query",
  5460. "schema": {
  5461. "type": "number"
  5462. },
  5463. "required": false
  5464. },
  5465. {
  5466. "name": "search",
  5467. "in": "query",
  5468. "schema": {
  5469. "type": "string"
  5470. },
  5471. "required": false
  5472. },
  5473. {
  5474. "name": "limit",
  5475. "in": "query",
  5476. "schema": {
  5477. "type": "number"
  5478. },
  5479. "required": false
  5480. }
  5481. ],
  5482. "responses": {
  5483. "200": {
  5484. "description": "List of sessions",
  5485. "content": {
  5486. "application/json": {
  5487. "schema": {
  5488. "type": "array",
  5489. "items": {
  5490. "$ref": "#/components/schemas/Session"
  5491. },
  5492. "description": "List of sessions"
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "400": {
  5498. "description": "Bad request",
  5499. "content": {
  5500. "application/json": {
  5501. "schema": {
  5502. "$ref": "#/components/schemas/BadRequestError"
  5503. }
  5504. }
  5505. }
  5506. }
  5507. },
  5508. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5509. "summary": "List sessions",
  5510. "x-codeSamples": [
  5511. {
  5512. "lang": "js",
  5513. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5514. }
  5515. ]
  5516. },
  5517. "post": {
  5518. "tags": ["session"],
  5519. "operationId": "session.create",
  5520. "parameters": [
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "Successfully created session",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5568. "summary": "Create session",
  5569. "requestBody": {
  5570. "content": {
  5571. "application/json": {
  5572. "schema": {
  5573. "type": "object",
  5574. "properties": {
  5575. "parentID": {
  5576. "type": "string",
  5577. "pattern": "^ses"
  5578. },
  5579. "title": {
  5580. "type": "string"
  5581. },
  5582. "agent": {
  5583. "type": "string"
  5584. },
  5585. "model": {
  5586. "type": "object",
  5587. "properties": {
  5588. "id": {
  5589. "type": "string"
  5590. },
  5591. "providerID": {
  5592. "type": "string"
  5593. },
  5594. "variant": {
  5595. "type": "string"
  5596. }
  5597. },
  5598. "required": ["id", "providerID"],
  5599. "additionalProperties": false
  5600. },
  5601. "metadata": {
  5602. "type": "object"
  5603. },
  5604. "permission": {
  5605. "$ref": "#/components/schemas/PermissionRuleset"
  5606. },
  5607. "workspaceID": {
  5608. "type": "string",
  5609. "pattern": "^wrk"
  5610. }
  5611. },
  5612. "additionalProperties": false
  5613. }
  5614. }
  5615. }
  5616. },
  5617. "x-codeSamples": [
  5618. {
  5619. "lang": "js",
  5620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5621. }
  5622. ]
  5623. }
  5624. },
  5625. "/session/status": {
  5626. "get": {
  5627. "tags": ["session"],
  5628. "operationId": "session.status",
  5629. "parameters": [
  5630. {
  5631. "name": "directory",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. },
  5638. {
  5639. "name": "workspace",
  5640. "in": "query",
  5641. "schema": {
  5642. "type": "string"
  5643. },
  5644. "required": false
  5645. }
  5646. ],
  5647. "responses": {
  5648. "200": {
  5649. "description": "Get session status",
  5650. "content": {
  5651. "application/json": {
  5652. "schema": {
  5653. "type": "object",
  5654. "additionalProperties": {
  5655. "$ref": "#/components/schemas/SessionStatus"
  5656. },
  5657. "description": "Get session status"
  5658. }
  5659. }
  5660. }
  5661. },
  5662. "400": {
  5663. "description": "BadRequest | InvalidRequestError",
  5664. "content": {
  5665. "application/json": {
  5666. "schema": {
  5667. "anyOf": [
  5668. {
  5669. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5670. },
  5671. {
  5672. "$ref": "#/components/schemas/InvalidRequestError"
  5673. }
  5674. ]
  5675. }
  5676. }
  5677. }
  5678. }
  5679. },
  5680. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5681. "summary": "Get session status",
  5682. "x-codeSamples": [
  5683. {
  5684. "lang": "js",
  5685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5686. }
  5687. ]
  5688. }
  5689. },
  5690. "/session/{sessionID}": {
  5691. "get": {
  5692. "tags": ["session"],
  5693. "operationId": "session.get",
  5694. "parameters": [
  5695. {
  5696. "name": "sessionID",
  5697. "in": "path",
  5698. "schema": {
  5699. "type": "string",
  5700. "pattern": "^ses"
  5701. },
  5702. "required": true
  5703. },
  5704. {
  5705. "name": "directory",
  5706. "in": "query",
  5707. "schema": {
  5708. "type": "string"
  5709. },
  5710. "required": false
  5711. },
  5712. {
  5713. "name": "workspace",
  5714. "in": "query",
  5715. "schema": {
  5716. "type": "string"
  5717. },
  5718. "required": false
  5719. }
  5720. ],
  5721. "responses": {
  5722. "200": {
  5723. "description": "Get session",
  5724. "content": {
  5725. "application/json": {
  5726. "schema": {
  5727. "$ref": "#/components/schemas/Session"
  5728. }
  5729. }
  5730. }
  5731. },
  5732. "400": {
  5733. "description": "BadRequest | InvalidRequestError",
  5734. "content": {
  5735. "application/json": {
  5736. "schema": {
  5737. "anyOf": [
  5738. {
  5739. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5740. },
  5741. {
  5742. "$ref": "#/components/schemas/InvalidRequestError"
  5743. }
  5744. ]
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "404": {
  5750. "description": "NotFoundError",
  5751. "content": {
  5752. "application/json": {
  5753. "schema": {
  5754. "$ref": "#/components/schemas/NotFoundError"
  5755. }
  5756. }
  5757. }
  5758. }
  5759. },
  5760. "description": "Retrieve detailed information about a specific OpenCode session.",
  5761. "summary": "Get session",
  5762. "x-codeSamples": [
  5763. {
  5764. "lang": "js",
  5765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5766. }
  5767. ]
  5768. },
  5769. "delete": {
  5770. "tags": ["session"],
  5771. "operationId": "session.delete",
  5772. "parameters": [
  5773. {
  5774. "name": "sessionID",
  5775. "in": "path",
  5776. "schema": {
  5777. "type": "string",
  5778. "pattern": "^ses"
  5779. },
  5780. "required": true
  5781. },
  5782. {
  5783. "name": "directory",
  5784. "in": "query",
  5785. "schema": {
  5786. "type": "string"
  5787. },
  5788. "required": false
  5789. },
  5790. {
  5791. "name": "workspace",
  5792. "in": "query",
  5793. "schema": {
  5794. "type": "string"
  5795. },
  5796. "required": false
  5797. }
  5798. ],
  5799. "responses": {
  5800. "200": {
  5801. "description": "Successfully deleted session",
  5802. "content": {
  5803. "application/json": {
  5804. "schema": {
  5805. "type": "boolean",
  5806. "description": "Successfully deleted session"
  5807. }
  5808. }
  5809. }
  5810. },
  5811. "400": {
  5812. "description": "BadRequest | InvalidRequestError",
  5813. "content": {
  5814. "application/json": {
  5815. "schema": {
  5816. "anyOf": [
  5817. {
  5818. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5819. },
  5820. {
  5821. "$ref": "#/components/schemas/InvalidRequestError"
  5822. }
  5823. ]
  5824. }
  5825. }
  5826. }
  5827. },
  5828. "404": {
  5829. "description": "NotFoundError",
  5830. "content": {
  5831. "application/json": {
  5832. "schema": {
  5833. "$ref": "#/components/schemas/NotFoundError"
  5834. }
  5835. }
  5836. }
  5837. }
  5838. },
  5839. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5840. "summary": "Delete session",
  5841. "x-codeSamples": [
  5842. {
  5843. "lang": "js",
  5844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5845. }
  5846. ]
  5847. },
  5848. "patch": {
  5849. "tags": ["session"],
  5850. "operationId": "session.update",
  5851. "parameters": [
  5852. {
  5853. "name": "sessionID",
  5854. "in": "path",
  5855. "schema": {
  5856. "type": "string",
  5857. "pattern": "^ses"
  5858. },
  5859. "required": true
  5860. },
  5861. {
  5862. "name": "directory",
  5863. "in": "query",
  5864. "schema": {
  5865. "type": "string"
  5866. },
  5867. "required": false
  5868. },
  5869. {
  5870. "name": "workspace",
  5871. "in": "query",
  5872. "schema": {
  5873. "type": "string"
  5874. },
  5875. "required": false
  5876. }
  5877. ],
  5878. "responses": {
  5879. "200": {
  5880. "description": "Successfully updated session",
  5881. "content": {
  5882. "application/json": {
  5883. "schema": {
  5884. "$ref": "#/components/schemas/Session"
  5885. }
  5886. }
  5887. }
  5888. },
  5889. "400": {
  5890. "description": "BadRequest | InvalidRequestError",
  5891. "content": {
  5892. "application/json": {
  5893. "schema": {
  5894. "anyOf": [
  5895. {
  5896. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5897. },
  5898. {
  5899. "$ref": "#/components/schemas/InvalidRequestError"
  5900. }
  5901. ]
  5902. }
  5903. }
  5904. }
  5905. },
  5906. "404": {
  5907. "description": "NotFoundError",
  5908. "content": {
  5909. "application/json": {
  5910. "schema": {
  5911. "$ref": "#/components/schemas/NotFoundError"
  5912. }
  5913. }
  5914. }
  5915. }
  5916. },
  5917. "description": "Update properties of an existing session, such as title or other metadata.",
  5918. "summary": "Update session",
  5919. "requestBody": {
  5920. "content": {
  5921. "application/json": {
  5922. "schema": {
  5923. "type": "object",
  5924. "properties": {
  5925. "title": {
  5926. "type": "string"
  5927. },
  5928. "metadata": {
  5929. "type": "object"
  5930. },
  5931. "permission": {
  5932. "$ref": "#/components/schemas/PermissionRuleset"
  5933. },
  5934. "time": {
  5935. "type": "object",
  5936. "properties": {
  5937. "archived": {
  5938. "type": "number"
  5939. }
  5940. },
  5941. "additionalProperties": false
  5942. }
  5943. },
  5944. "additionalProperties": false
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "x-codeSamples": [
  5950. {
  5951. "lang": "js",
  5952. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5953. }
  5954. ]
  5955. }
  5956. },
  5957. "/session/{sessionID}/children": {
  5958. "get": {
  5959. "tags": ["session"],
  5960. "operationId": "session.children",
  5961. "parameters": [
  5962. {
  5963. "name": "sessionID",
  5964. "in": "path",
  5965. "schema": {
  5966. "type": "string",
  5967. "pattern": "^ses"
  5968. },
  5969. "required": true
  5970. },
  5971. {
  5972. "name": "directory",
  5973. "in": "query",
  5974. "schema": {
  5975. "type": "string"
  5976. },
  5977. "required": false
  5978. },
  5979. {
  5980. "name": "workspace",
  5981. "in": "query",
  5982. "schema": {
  5983. "type": "string"
  5984. },
  5985. "required": false
  5986. }
  5987. ],
  5988. "responses": {
  5989. "200": {
  5990. "description": "List of children",
  5991. "content": {
  5992. "application/json": {
  5993. "schema": {
  5994. "type": "array",
  5995. "items": {
  5996. "$ref": "#/components/schemas/Session"
  5997. },
  5998. "description": "List of children"
  5999. }
  6000. }
  6001. }
  6002. },
  6003. "400": {
  6004. "description": "BadRequest | InvalidRequestError",
  6005. "content": {
  6006. "application/json": {
  6007. "schema": {
  6008. "anyOf": [
  6009. {
  6010. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6011. },
  6012. {
  6013. "$ref": "#/components/schemas/InvalidRequestError"
  6014. }
  6015. ]
  6016. }
  6017. }
  6018. }
  6019. },
  6020. "404": {
  6021. "description": "NotFoundError",
  6022. "content": {
  6023. "application/json": {
  6024. "schema": {
  6025. "$ref": "#/components/schemas/NotFoundError"
  6026. }
  6027. }
  6028. }
  6029. }
  6030. },
  6031. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  6032. "summary": "Get session children",
  6033. "x-codeSamples": [
  6034. {
  6035. "lang": "js",
  6036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  6037. }
  6038. ]
  6039. }
  6040. },
  6041. "/session/{sessionID}/todo": {
  6042. "get": {
  6043. "tags": ["session"],
  6044. "operationId": "session.todo",
  6045. "parameters": [
  6046. {
  6047. "name": "sessionID",
  6048. "in": "path",
  6049. "schema": {
  6050. "type": "string",
  6051. "pattern": "^ses"
  6052. },
  6053. "required": true
  6054. },
  6055. {
  6056. "name": "directory",
  6057. "in": "query",
  6058. "schema": {
  6059. "type": "string"
  6060. },
  6061. "required": false
  6062. },
  6063. {
  6064. "name": "workspace",
  6065. "in": "query",
  6066. "schema": {
  6067. "type": "string"
  6068. },
  6069. "required": false
  6070. }
  6071. ],
  6072. "responses": {
  6073. "200": {
  6074. "description": "Todo list",
  6075. "content": {
  6076. "application/json": {
  6077. "schema": {
  6078. "type": "array",
  6079. "items": {
  6080. "$ref": "#/components/schemas/Todo"
  6081. },
  6082. "description": "Todo list"
  6083. }
  6084. }
  6085. }
  6086. },
  6087. "400": {
  6088. "description": "BadRequest | InvalidRequestError",
  6089. "content": {
  6090. "application/json": {
  6091. "schema": {
  6092. "anyOf": [
  6093. {
  6094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6095. },
  6096. {
  6097. "$ref": "#/components/schemas/InvalidRequestError"
  6098. }
  6099. ]
  6100. }
  6101. }
  6102. }
  6103. },
  6104. "404": {
  6105. "description": "NotFoundError",
  6106. "content": {
  6107. "application/json": {
  6108. "schema": {
  6109. "$ref": "#/components/schemas/NotFoundError"
  6110. }
  6111. }
  6112. }
  6113. }
  6114. },
  6115. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6116. "summary": "Get session todos",
  6117. "x-codeSamples": [
  6118. {
  6119. "lang": "js",
  6120. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6121. }
  6122. ]
  6123. }
  6124. },
  6125. "/session/{sessionID}/diff": {
  6126. "get": {
  6127. "tags": ["session"],
  6128. "operationId": "session.diff",
  6129. "parameters": [
  6130. {
  6131. "name": "sessionID",
  6132. "in": "path",
  6133. "schema": {
  6134. "type": "string",
  6135. "pattern": "^ses"
  6136. },
  6137. "required": true
  6138. },
  6139. {
  6140. "name": "directory",
  6141. "in": "query",
  6142. "schema": {
  6143. "type": "string"
  6144. },
  6145. "required": false
  6146. },
  6147. {
  6148. "name": "workspace",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "messageID",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string",
  6160. "pattern": "^msg"
  6161. },
  6162. "required": false
  6163. }
  6164. ],
  6165. "responses": {
  6166. "200": {
  6167. "description": "Successfully retrieved diff",
  6168. "content": {
  6169. "application/json": {
  6170. "schema": {
  6171. "type": "array",
  6172. "items": {
  6173. "$ref": "#/components/schemas/SnapshotFileDiff"
  6174. },
  6175. "description": "Successfully retrieved diff"
  6176. }
  6177. }
  6178. }
  6179. },
  6180. "400": {
  6181. "description": "Bad request",
  6182. "content": {
  6183. "application/json": {
  6184. "schema": {
  6185. "$ref": "#/components/schemas/BadRequestError"
  6186. }
  6187. }
  6188. }
  6189. }
  6190. },
  6191. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6192. "summary": "Get message diff",
  6193. "x-codeSamples": [
  6194. {
  6195. "lang": "js",
  6196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6197. }
  6198. ]
  6199. }
  6200. },
  6201. "/session/{sessionID}/message": {
  6202. "get": {
  6203. "tags": ["session"],
  6204. "operationId": "session.messages",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. },
  6231. {
  6232. "name": "limit",
  6233. "in": "query",
  6234. "schema": {
  6235. "type": "integer",
  6236. "minimum": 0,
  6237. "maximum": 9007199254740991
  6238. },
  6239. "required": false
  6240. },
  6241. {
  6242. "name": "before",
  6243. "in": "query",
  6244. "schema": {
  6245. "type": "string"
  6246. },
  6247. "required": false
  6248. }
  6249. ],
  6250. "responses": {
  6251. "200": {
  6252. "description": "List of messages",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "type": "array",
  6257. "items": {
  6258. "type": "object",
  6259. "properties": {
  6260. "info": {
  6261. "$ref": "#/components/schemas/Message"
  6262. },
  6263. "parts": {
  6264. "type": "array",
  6265. "items": {
  6266. "$ref": "#/components/schemas/Part"
  6267. }
  6268. }
  6269. },
  6270. "required": ["info", "parts"],
  6271. "additionalProperties": false
  6272. },
  6273. "description": "List of messages"
  6274. }
  6275. }
  6276. }
  6277. },
  6278. "400": {
  6279. "description": "BadRequest | InvalidRequestError",
  6280. "content": {
  6281. "application/json": {
  6282. "schema": {
  6283. "anyOf": [
  6284. {
  6285. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6286. },
  6287. {
  6288. "$ref": "#/components/schemas/InvalidRequestError"
  6289. }
  6290. ]
  6291. }
  6292. }
  6293. }
  6294. },
  6295. "404": {
  6296. "description": "NotFoundError",
  6297. "content": {
  6298. "application/json": {
  6299. "schema": {
  6300. "$ref": "#/components/schemas/NotFoundError"
  6301. }
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6307. "summary": "Get session messages",
  6308. "x-codeSamples": [
  6309. {
  6310. "lang": "js",
  6311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6312. }
  6313. ]
  6314. },
  6315. "post": {
  6316. "tags": ["session"],
  6317. "operationId": "session.prompt",
  6318. "parameters": [
  6319. {
  6320. "name": "sessionID",
  6321. "in": "path",
  6322. "schema": {
  6323. "type": "string",
  6324. "pattern": "^ses"
  6325. },
  6326. "required": true
  6327. },
  6328. {
  6329. "name": "directory",
  6330. "in": "query",
  6331. "schema": {
  6332. "type": "string"
  6333. },
  6334. "required": false
  6335. },
  6336. {
  6337. "name": "workspace",
  6338. "in": "query",
  6339. "schema": {
  6340. "type": "string"
  6341. },
  6342. "required": false
  6343. }
  6344. ],
  6345. "responses": {
  6346. "200": {
  6347. "description": "Created message",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "type": "object",
  6352. "required": ["info", "parts"],
  6353. "properties": {
  6354. "info": {
  6355. "$ref": "#/components/schemas/AssistantMessage"
  6356. },
  6357. "parts": {
  6358. "type": "array",
  6359. "items": {
  6360. "$ref": "#/components/schemas/Part"
  6361. }
  6362. }
  6363. }
  6364. }
  6365. }
  6366. }
  6367. },
  6368. "400": {
  6369. "description": "BadRequest | InvalidRequestError",
  6370. "content": {
  6371. "application/json": {
  6372. "schema": {
  6373. "anyOf": [
  6374. {
  6375. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6376. },
  6377. {
  6378. "$ref": "#/components/schemas/InvalidRequestError"
  6379. }
  6380. ]
  6381. }
  6382. }
  6383. }
  6384. },
  6385. "404": {
  6386. "description": "NotFoundError",
  6387. "content": {
  6388. "application/json": {
  6389. "schema": {
  6390. "$ref": "#/components/schemas/NotFoundError"
  6391. }
  6392. }
  6393. }
  6394. }
  6395. },
  6396. "description": "Create and send a new message to a session, streaming the AI response.",
  6397. "summary": "Send message",
  6398. "requestBody": {
  6399. "content": {
  6400. "application/json": {
  6401. "schema": {
  6402. "type": "object",
  6403. "properties": {
  6404. "messageID": {
  6405. "type": "string",
  6406. "pattern": "^msg"
  6407. },
  6408. "model": {
  6409. "type": "object",
  6410. "properties": {
  6411. "providerID": {
  6412. "type": "string"
  6413. },
  6414. "modelID": {
  6415. "type": "string"
  6416. }
  6417. },
  6418. "required": ["providerID", "modelID"],
  6419. "additionalProperties": false
  6420. },
  6421. "agent": {
  6422. "type": "string"
  6423. },
  6424. "noReply": {
  6425. "type": "boolean"
  6426. },
  6427. "tools": {
  6428. "type": "object",
  6429. "additionalProperties": {
  6430. "type": "boolean"
  6431. }
  6432. },
  6433. "format": {
  6434. "$ref": "#/components/schemas/OutputFormat"
  6435. },
  6436. "system": {
  6437. "type": "string"
  6438. },
  6439. "variant": {
  6440. "type": "string"
  6441. },
  6442. "parts": {
  6443. "type": "array",
  6444. "items": {
  6445. "anyOf": [
  6446. {
  6447. "$ref": "#/components/schemas/TextPartInput"
  6448. },
  6449. {
  6450. "$ref": "#/components/schemas/FilePartInput"
  6451. },
  6452. {
  6453. "$ref": "#/components/schemas/AgentPartInput"
  6454. },
  6455. {
  6456. "$ref": "#/components/schemas/SubtaskPartInput"
  6457. }
  6458. ]
  6459. }
  6460. }
  6461. },
  6462. "required": ["parts"],
  6463. "additionalProperties": false
  6464. }
  6465. }
  6466. }
  6467. },
  6468. "x-codeSamples": [
  6469. {
  6470. "lang": "js",
  6471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6472. }
  6473. ]
  6474. }
  6475. },
  6476. "/session/{sessionID}/message/{messageID}": {
  6477. "get": {
  6478. "tags": ["session"],
  6479. "operationId": "session.message",
  6480. "parameters": [
  6481. {
  6482. "name": "sessionID",
  6483. "in": "path",
  6484. "schema": {
  6485. "type": "string",
  6486. "pattern": "^ses"
  6487. },
  6488. "required": true
  6489. },
  6490. {
  6491. "name": "messageID",
  6492. "in": "path",
  6493. "schema": {
  6494. "type": "string",
  6495. "pattern": "^msg"
  6496. },
  6497. "required": true
  6498. },
  6499. {
  6500. "name": "directory",
  6501. "in": "query",
  6502. "schema": {
  6503. "type": "string"
  6504. },
  6505. "required": false
  6506. },
  6507. {
  6508. "name": "workspace",
  6509. "in": "query",
  6510. "schema": {
  6511. "type": "string"
  6512. },
  6513. "required": false
  6514. }
  6515. ],
  6516. "responses": {
  6517. "200": {
  6518. "description": "Message",
  6519. "content": {
  6520. "application/json": {
  6521. "schema": {
  6522. "type": "object",
  6523. "properties": {
  6524. "info": {
  6525. "$ref": "#/components/schemas/Message"
  6526. },
  6527. "parts": {
  6528. "type": "array",
  6529. "items": {
  6530. "$ref": "#/components/schemas/Part"
  6531. }
  6532. }
  6533. },
  6534. "required": ["info", "parts"],
  6535. "additionalProperties": false,
  6536. "description": "Message"
  6537. }
  6538. }
  6539. }
  6540. },
  6541. "400": {
  6542. "description": "BadRequest | InvalidRequestError",
  6543. "content": {
  6544. "application/json": {
  6545. "schema": {
  6546. "anyOf": [
  6547. {
  6548. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6549. },
  6550. {
  6551. "$ref": "#/components/schemas/InvalidRequestError"
  6552. }
  6553. ]
  6554. }
  6555. }
  6556. }
  6557. },
  6558. "404": {
  6559. "description": "NotFoundError",
  6560. "content": {
  6561. "application/json": {
  6562. "schema": {
  6563. "$ref": "#/components/schemas/NotFoundError"
  6564. }
  6565. }
  6566. }
  6567. }
  6568. },
  6569. "description": "Retrieve a specific message from a session by its message ID.",
  6570. "summary": "Get message",
  6571. "x-codeSamples": [
  6572. {
  6573. "lang": "js",
  6574. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6575. }
  6576. ]
  6577. },
  6578. "delete": {
  6579. "tags": ["session"],
  6580. "operationId": "session.deleteMessage",
  6581. "parameters": [
  6582. {
  6583. "name": "sessionID",
  6584. "in": "path",
  6585. "schema": {
  6586. "type": "string",
  6587. "pattern": "^ses"
  6588. },
  6589. "required": true
  6590. },
  6591. {
  6592. "name": "messageID",
  6593. "in": "path",
  6594. "schema": {
  6595. "type": "string",
  6596. "pattern": "^msg"
  6597. },
  6598. "required": true
  6599. },
  6600. {
  6601. "name": "directory",
  6602. "in": "query",
  6603. "schema": {
  6604. "type": "string"
  6605. },
  6606. "required": false
  6607. },
  6608. {
  6609. "name": "workspace",
  6610. "in": "query",
  6611. "schema": {
  6612. "type": "string"
  6613. },
  6614. "required": false
  6615. }
  6616. ],
  6617. "responses": {
  6618. "200": {
  6619. "description": "Successfully deleted message",
  6620. "content": {
  6621. "application/json": {
  6622. "schema": {
  6623. "type": "boolean",
  6624. "description": "Successfully deleted message"
  6625. }
  6626. }
  6627. }
  6628. },
  6629. "400": {
  6630. "description": "BadRequest | InvalidRequestError",
  6631. "content": {
  6632. "application/json": {
  6633. "schema": {
  6634. "anyOf": [
  6635. {
  6636. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6637. },
  6638. {
  6639. "$ref": "#/components/schemas/InvalidRequestError"
  6640. }
  6641. ]
  6642. }
  6643. }
  6644. }
  6645. },
  6646. "404": {
  6647. "description": "NotFoundError",
  6648. "content": {
  6649. "application/json": {
  6650. "schema": {
  6651. "$ref": "#/components/schemas/NotFoundError"
  6652. }
  6653. }
  6654. }
  6655. },
  6656. "409": {
  6657. "description": "SessionBusyError",
  6658. "content": {
  6659. "application/json": {
  6660. "schema": {
  6661. "$ref": "#/components/schemas/SessionBusyError"
  6662. }
  6663. }
  6664. }
  6665. }
  6666. },
  6667. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6668. "summary": "Delete message",
  6669. "x-codeSamples": [
  6670. {
  6671. "lang": "js",
  6672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6673. }
  6674. ]
  6675. }
  6676. },
  6677. "/session/{sessionID}/fork": {
  6678. "post": {
  6679. "tags": ["session"],
  6680. "operationId": "session.fork",
  6681. "parameters": [
  6682. {
  6683. "name": "sessionID",
  6684. "in": "path",
  6685. "schema": {
  6686. "type": "string",
  6687. "pattern": "^ses"
  6688. },
  6689. "required": true
  6690. },
  6691. {
  6692. "name": "directory",
  6693. "in": "query",
  6694. "schema": {
  6695. "type": "string"
  6696. },
  6697. "required": false
  6698. },
  6699. {
  6700. "name": "workspace",
  6701. "in": "query",
  6702. "schema": {
  6703. "type": "string"
  6704. },
  6705. "required": false
  6706. }
  6707. ],
  6708. "responses": {
  6709. "200": {
  6710. "description": "200",
  6711. "content": {
  6712. "application/json": {
  6713. "schema": {
  6714. "$ref": "#/components/schemas/Session"
  6715. }
  6716. }
  6717. }
  6718. },
  6719. "400": {
  6720. "description": "BadRequest | InvalidRequestError",
  6721. "content": {
  6722. "application/json": {
  6723. "schema": {
  6724. "anyOf": [
  6725. {
  6726. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6727. },
  6728. {
  6729. "$ref": "#/components/schemas/InvalidRequestError"
  6730. }
  6731. ]
  6732. }
  6733. }
  6734. }
  6735. },
  6736. "404": {
  6737. "description": "NotFoundError",
  6738. "content": {
  6739. "application/json": {
  6740. "schema": {
  6741. "$ref": "#/components/schemas/NotFoundError"
  6742. }
  6743. }
  6744. }
  6745. }
  6746. },
  6747. "description": "Create a new session by forking an existing session at a specific message point.",
  6748. "summary": "Fork session",
  6749. "requestBody": {
  6750. "content": {
  6751. "application/json": {
  6752. "schema": {
  6753. "type": "object",
  6754. "properties": {
  6755. "messageID": {
  6756. "type": "string",
  6757. "pattern": "^msg"
  6758. }
  6759. },
  6760. "additionalProperties": false
  6761. }
  6762. }
  6763. }
  6764. },
  6765. "x-codeSamples": [
  6766. {
  6767. "lang": "js",
  6768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6769. }
  6770. ]
  6771. }
  6772. },
  6773. "/session/{sessionID}/abort": {
  6774. "post": {
  6775. "tags": ["session"],
  6776. "operationId": "session.abort",
  6777. "parameters": [
  6778. {
  6779. "name": "sessionID",
  6780. "in": "path",
  6781. "schema": {
  6782. "type": "string",
  6783. "pattern": "^ses"
  6784. },
  6785. "required": true
  6786. },
  6787. {
  6788. "name": "directory",
  6789. "in": "query",
  6790. "schema": {
  6791. "type": "string"
  6792. },
  6793. "required": false
  6794. },
  6795. {
  6796. "name": "workspace",
  6797. "in": "query",
  6798. "schema": {
  6799. "type": "string"
  6800. },
  6801. "required": false
  6802. }
  6803. ],
  6804. "responses": {
  6805. "200": {
  6806. "description": "Aborted session",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "type": "boolean",
  6811. "description": "Aborted session"
  6812. }
  6813. }
  6814. }
  6815. },
  6816. "400": {
  6817. "description": "BadRequest | InvalidRequestError",
  6818. "content": {
  6819. "application/json": {
  6820. "schema": {
  6821. "anyOf": [
  6822. {
  6823. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6824. },
  6825. {
  6826. "$ref": "#/components/schemas/InvalidRequestError"
  6827. }
  6828. ]
  6829. }
  6830. }
  6831. }
  6832. }
  6833. },
  6834. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6835. "summary": "Abort session",
  6836. "x-codeSamples": [
  6837. {
  6838. "lang": "js",
  6839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6840. }
  6841. ]
  6842. }
  6843. },
  6844. "/session/{sessionID}/init": {
  6845. "post": {
  6846. "tags": ["session"],
  6847. "operationId": "session.init",
  6848. "parameters": [
  6849. {
  6850. "name": "sessionID",
  6851. "in": "path",
  6852. "schema": {
  6853. "type": "string",
  6854. "pattern": "^ses"
  6855. },
  6856. "required": true
  6857. },
  6858. {
  6859. "name": "directory",
  6860. "in": "query",
  6861. "schema": {
  6862. "type": "string"
  6863. },
  6864. "required": false
  6865. },
  6866. {
  6867. "name": "workspace",
  6868. "in": "query",
  6869. "schema": {
  6870. "type": "string"
  6871. },
  6872. "required": false
  6873. }
  6874. ],
  6875. "responses": {
  6876. "200": {
  6877. "description": "200",
  6878. "content": {
  6879. "application/json": {
  6880. "schema": {
  6881. "type": "boolean",
  6882. "description": "200"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "400": {
  6888. "description": "BadRequest | InvalidRequestError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "anyOf": [
  6893. {
  6894. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6895. },
  6896. {
  6897. "$ref": "#/components/schemas/InvalidRequestError"
  6898. }
  6899. ]
  6900. }
  6901. }
  6902. }
  6903. },
  6904. "404": {
  6905. "description": "NotFoundError",
  6906. "content": {
  6907. "application/json": {
  6908. "schema": {
  6909. "$ref": "#/components/schemas/NotFoundError"
  6910. }
  6911. }
  6912. }
  6913. }
  6914. },
  6915. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6916. "summary": "Initialize session",
  6917. "requestBody": {
  6918. "content": {
  6919. "application/json": {
  6920. "schema": {
  6921. "type": "object",
  6922. "properties": {
  6923. "modelID": {
  6924. "type": "string"
  6925. },
  6926. "providerID": {
  6927. "type": "string"
  6928. },
  6929. "messageID": {
  6930. "type": "string",
  6931. "pattern": "^msg"
  6932. }
  6933. },
  6934. "required": ["modelID", "providerID", "messageID"],
  6935. "additionalProperties": false
  6936. }
  6937. }
  6938. }
  6939. },
  6940. "x-codeSamples": [
  6941. {
  6942. "lang": "js",
  6943. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6944. }
  6945. ]
  6946. }
  6947. },
  6948. "/session/{sessionID}/share": {
  6949. "post": {
  6950. "tags": ["session"],
  6951. "operationId": "session.share",
  6952. "parameters": [
  6953. {
  6954. "name": "sessionID",
  6955. "in": "path",
  6956. "schema": {
  6957. "type": "string",
  6958. "pattern": "^ses"
  6959. },
  6960. "required": true
  6961. },
  6962. {
  6963. "name": "directory",
  6964. "in": "query",
  6965. "schema": {
  6966. "type": "string"
  6967. },
  6968. "required": false
  6969. },
  6970. {
  6971. "name": "workspace",
  6972. "in": "query",
  6973. "schema": {
  6974. "type": "string"
  6975. },
  6976. "required": false
  6977. }
  6978. ],
  6979. "responses": {
  6980. "200": {
  6981. "description": "Successfully shared session",
  6982. "content": {
  6983. "application/json": {
  6984. "schema": {
  6985. "$ref": "#/components/schemas/Session"
  6986. }
  6987. }
  6988. }
  6989. },
  6990. "400": {
  6991. "description": "Bad request",
  6992. "content": {
  6993. "application/json": {
  6994. "schema": {
  6995. "$ref": "#/components/schemas/BadRequestError"
  6996. }
  6997. }
  6998. }
  6999. },
  7000. "404": {
  7001. "description": "NotFoundError",
  7002. "content": {
  7003. "application/json": {
  7004. "schema": {
  7005. "$ref": "#/components/schemas/NotFoundError"
  7006. }
  7007. }
  7008. }
  7009. },
  7010. "500": {
  7011. "description": "InternalServerError",
  7012. "content": {
  7013. "application/json": {
  7014. "schema": {
  7015. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7016. }
  7017. }
  7018. }
  7019. }
  7020. },
  7021. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  7022. "summary": "Share session",
  7023. "x-codeSamples": [
  7024. {
  7025. "lang": "js",
  7026. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  7027. }
  7028. ]
  7029. },
  7030. "delete": {
  7031. "tags": ["session"],
  7032. "operationId": "session.unshare",
  7033. "parameters": [
  7034. {
  7035. "name": "sessionID",
  7036. "in": "path",
  7037. "schema": {
  7038. "type": "string",
  7039. "pattern": "^ses"
  7040. },
  7041. "required": true
  7042. },
  7043. {
  7044. "name": "directory",
  7045. "in": "query",
  7046. "schema": {
  7047. "type": "string"
  7048. },
  7049. "required": false
  7050. },
  7051. {
  7052. "name": "workspace",
  7053. "in": "query",
  7054. "schema": {
  7055. "type": "string"
  7056. },
  7057. "required": false
  7058. }
  7059. ],
  7060. "responses": {
  7061. "200": {
  7062. "description": "Successfully unshared session",
  7063. "content": {
  7064. "application/json": {
  7065. "schema": {
  7066. "$ref": "#/components/schemas/Session"
  7067. }
  7068. }
  7069. }
  7070. },
  7071. "400": {
  7072. "description": "Bad request",
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "$ref": "#/components/schemas/BadRequestError"
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "404": {
  7082. "description": "NotFoundError",
  7083. "content": {
  7084. "application/json": {
  7085. "schema": {
  7086. "$ref": "#/components/schemas/NotFoundError"
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "500": {
  7092. "description": "InternalServerError",
  7093. "content": {
  7094. "application/json": {
  7095. "schema": {
  7096. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7097. }
  7098. }
  7099. }
  7100. }
  7101. },
  7102. "description": "Remove the shareable link for a session, making it private again.",
  7103. "summary": "Unshare session",
  7104. "x-codeSamples": [
  7105. {
  7106. "lang": "js",
  7107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7108. }
  7109. ]
  7110. }
  7111. },
  7112. "/session/{sessionID}/summarize": {
  7113. "post": {
  7114. "tags": ["session"],
  7115. "operationId": "session.summarize",
  7116. "parameters": [
  7117. {
  7118. "name": "sessionID",
  7119. "in": "path",
  7120. "schema": {
  7121. "type": "string",
  7122. "pattern": "^ses"
  7123. },
  7124. "required": true
  7125. },
  7126. {
  7127. "name": "directory",
  7128. "in": "query",
  7129. "schema": {
  7130. "type": "string"
  7131. },
  7132. "required": false
  7133. },
  7134. {
  7135. "name": "workspace",
  7136. "in": "query",
  7137. "schema": {
  7138. "type": "string"
  7139. },
  7140. "required": false
  7141. }
  7142. ],
  7143. "responses": {
  7144. "200": {
  7145. "description": "Summarized session",
  7146. "content": {
  7147. "application/json": {
  7148. "schema": {
  7149. "type": "boolean",
  7150. "description": "Summarized session"
  7151. }
  7152. }
  7153. }
  7154. },
  7155. "400": {
  7156. "description": "BadRequest | InvalidRequestError",
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "anyOf": [
  7161. {
  7162. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7163. },
  7164. {
  7165. "$ref": "#/components/schemas/InvalidRequestError"
  7166. }
  7167. ]
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "404": {
  7173. "description": "NotFoundError",
  7174. "content": {
  7175. "application/json": {
  7176. "schema": {
  7177. "$ref": "#/components/schemas/NotFoundError"
  7178. }
  7179. }
  7180. }
  7181. }
  7182. },
  7183. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7184. "summary": "Summarize session",
  7185. "requestBody": {
  7186. "content": {
  7187. "application/json": {
  7188. "schema": {
  7189. "type": "object",
  7190. "properties": {
  7191. "providerID": {
  7192. "type": "string"
  7193. },
  7194. "modelID": {
  7195. "type": "string"
  7196. },
  7197. "auto": {
  7198. "type": "boolean"
  7199. }
  7200. },
  7201. "required": ["providerID", "modelID"],
  7202. "additionalProperties": false
  7203. }
  7204. }
  7205. }
  7206. },
  7207. "x-codeSamples": [
  7208. {
  7209. "lang": "js",
  7210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7211. }
  7212. ]
  7213. }
  7214. },
  7215. "/session/{sessionID}/prompt_async": {
  7216. "post": {
  7217. "tags": ["session"],
  7218. "operationId": "session.prompt_async",
  7219. "parameters": [
  7220. {
  7221. "name": "sessionID",
  7222. "in": "path",
  7223. "schema": {
  7224. "type": "string",
  7225. "pattern": "^ses"
  7226. },
  7227. "required": true
  7228. },
  7229. {
  7230. "name": "directory",
  7231. "in": "query",
  7232. "schema": {
  7233. "type": "string"
  7234. },
  7235. "required": false
  7236. },
  7237. {
  7238. "name": "workspace",
  7239. "in": "query",
  7240. "schema": {
  7241. "type": "string"
  7242. },
  7243. "required": false
  7244. }
  7245. ],
  7246. "responses": {
  7247. "204": {
  7248. "description": "Prompt accepted"
  7249. },
  7250. "400": {
  7251. "description": "BadRequest | InvalidRequestError",
  7252. "content": {
  7253. "application/json": {
  7254. "schema": {
  7255. "anyOf": [
  7256. {
  7257. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7258. },
  7259. {
  7260. "$ref": "#/components/schemas/InvalidRequestError"
  7261. }
  7262. ]
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "404": {
  7268. "description": "NotFoundError",
  7269. "content": {
  7270. "application/json": {
  7271. "schema": {
  7272. "$ref": "#/components/schemas/NotFoundError"
  7273. }
  7274. }
  7275. }
  7276. }
  7277. },
  7278. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7279. "summary": "Send async message",
  7280. "requestBody": {
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "type": "object",
  7285. "properties": {
  7286. "messageID": {
  7287. "type": "string",
  7288. "pattern": "^msg"
  7289. },
  7290. "model": {
  7291. "type": "object",
  7292. "properties": {
  7293. "providerID": {
  7294. "type": "string"
  7295. },
  7296. "modelID": {
  7297. "type": "string"
  7298. }
  7299. },
  7300. "required": ["providerID", "modelID"],
  7301. "additionalProperties": false
  7302. },
  7303. "agent": {
  7304. "type": "string"
  7305. },
  7306. "noReply": {
  7307. "type": "boolean"
  7308. },
  7309. "tools": {
  7310. "type": "object",
  7311. "additionalProperties": {
  7312. "type": "boolean"
  7313. }
  7314. },
  7315. "format": {
  7316. "$ref": "#/components/schemas/OutputFormat"
  7317. },
  7318. "system": {
  7319. "type": "string"
  7320. },
  7321. "variant": {
  7322. "type": "string"
  7323. },
  7324. "parts": {
  7325. "type": "array",
  7326. "items": {
  7327. "anyOf": [
  7328. {
  7329. "$ref": "#/components/schemas/TextPartInput"
  7330. },
  7331. {
  7332. "$ref": "#/components/schemas/FilePartInput"
  7333. },
  7334. {
  7335. "$ref": "#/components/schemas/AgentPartInput"
  7336. },
  7337. {
  7338. "$ref": "#/components/schemas/SubtaskPartInput"
  7339. }
  7340. ]
  7341. }
  7342. }
  7343. },
  7344. "required": ["parts"],
  7345. "additionalProperties": false
  7346. }
  7347. }
  7348. }
  7349. },
  7350. "x-codeSamples": [
  7351. {
  7352. "lang": "js",
  7353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7354. }
  7355. ]
  7356. }
  7357. },
  7358. "/session/{sessionID}/command": {
  7359. "post": {
  7360. "tags": ["session"],
  7361. "operationId": "session.command",
  7362. "parameters": [
  7363. {
  7364. "name": "sessionID",
  7365. "in": "path",
  7366. "schema": {
  7367. "type": "string",
  7368. "pattern": "^ses"
  7369. },
  7370. "required": true
  7371. },
  7372. {
  7373. "name": "directory",
  7374. "in": "query",
  7375. "schema": {
  7376. "type": "string"
  7377. },
  7378. "required": false
  7379. },
  7380. {
  7381. "name": "workspace",
  7382. "in": "query",
  7383. "schema": {
  7384. "type": "string"
  7385. },
  7386. "required": false
  7387. }
  7388. ],
  7389. "responses": {
  7390. "200": {
  7391. "description": "Created message",
  7392. "content": {
  7393. "application/json": {
  7394. "schema": {
  7395. "type": "object",
  7396. "required": ["info", "parts"],
  7397. "properties": {
  7398. "info": {
  7399. "$ref": "#/components/schemas/AssistantMessage"
  7400. },
  7401. "parts": {
  7402. "type": "array",
  7403. "items": {
  7404. "$ref": "#/components/schemas/Part"
  7405. }
  7406. }
  7407. }
  7408. }
  7409. }
  7410. }
  7411. },
  7412. "400": {
  7413. "description": "BadRequest | InvalidRequestError",
  7414. "content": {
  7415. "application/json": {
  7416. "schema": {
  7417. "anyOf": [
  7418. {
  7419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7420. },
  7421. {
  7422. "$ref": "#/components/schemas/InvalidRequestError"
  7423. }
  7424. ]
  7425. }
  7426. }
  7427. }
  7428. },
  7429. "404": {
  7430. "description": "NotFoundError",
  7431. "content": {
  7432. "application/json": {
  7433. "schema": {
  7434. "$ref": "#/components/schemas/NotFoundError"
  7435. }
  7436. }
  7437. }
  7438. }
  7439. },
  7440. "description": "Send a new command to a session for execution by the AI assistant.",
  7441. "summary": "Send command",
  7442. "requestBody": {
  7443. "content": {
  7444. "application/json": {
  7445. "schema": {
  7446. "type": "object",
  7447. "properties": {
  7448. "messageID": {
  7449. "type": "string",
  7450. "pattern": "^msg"
  7451. },
  7452. "agent": {
  7453. "type": "string"
  7454. },
  7455. "model": {
  7456. "type": "string"
  7457. },
  7458. "arguments": {
  7459. "type": "string"
  7460. },
  7461. "command": {
  7462. "type": "string"
  7463. },
  7464. "variant": {
  7465. "type": "string"
  7466. },
  7467. "parts": {
  7468. "type": "array",
  7469. "items": {
  7470. "type": "object",
  7471. "properties": {
  7472. "id": {
  7473. "type": "string",
  7474. "pattern": "^prt"
  7475. },
  7476. "type": {
  7477. "type": "string",
  7478. "enum": ["file"]
  7479. },
  7480. "mime": {
  7481. "type": "string"
  7482. },
  7483. "filename": {
  7484. "type": "string"
  7485. },
  7486. "url": {
  7487. "type": "string"
  7488. },
  7489. "source": {
  7490. "$ref": "#/components/schemas/FilePartSource"
  7491. }
  7492. },
  7493. "required": ["type", "mime", "url"],
  7494. "additionalProperties": false
  7495. }
  7496. }
  7497. },
  7498. "required": ["arguments", "command"],
  7499. "additionalProperties": false
  7500. }
  7501. }
  7502. }
  7503. },
  7504. "x-codeSamples": [
  7505. {
  7506. "lang": "js",
  7507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7508. }
  7509. ]
  7510. }
  7511. },
  7512. "/session/{sessionID}/shell": {
  7513. "post": {
  7514. "tags": ["session"],
  7515. "operationId": "session.shell",
  7516. "parameters": [
  7517. {
  7518. "name": "sessionID",
  7519. "in": "path",
  7520. "schema": {
  7521. "type": "string",
  7522. "pattern": "^ses"
  7523. },
  7524. "required": true
  7525. },
  7526. {
  7527. "name": "directory",
  7528. "in": "query",
  7529. "schema": {
  7530. "type": "string"
  7531. },
  7532. "required": false
  7533. },
  7534. {
  7535. "name": "workspace",
  7536. "in": "query",
  7537. "schema": {
  7538. "type": "string"
  7539. },
  7540. "required": false
  7541. }
  7542. ],
  7543. "responses": {
  7544. "200": {
  7545. "description": "Created message",
  7546. "content": {
  7547. "application/json": {
  7548. "schema": {
  7549. "type": "object",
  7550. "properties": {
  7551. "info": {
  7552. "$ref": "#/components/schemas/Message"
  7553. },
  7554. "parts": {
  7555. "type": "array",
  7556. "items": {
  7557. "$ref": "#/components/schemas/Part"
  7558. }
  7559. }
  7560. },
  7561. "required": ["info", "parts"],
  7562. "additionalProperties": false,
  7563. "description": "Created message"
  7564. }
  7565. }
  7566. }
  7567. },
  7568. "400": {
  7569. "description": "BadRequest | InvalidRequestError",
  7570. "content": {
  7571. "application/json": {
  7572. "schema": {
  7573. "anyOf": [
  7574. {
  7575. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7576. },
  7577. {
  7578. "$ref": "#/components/schemas/InvalidRequestError"
  7579. }
  7580. ]
  7581. }
  7582. }
  7583. }
  7584. },
  7585. "404": {
  7586. "description": "NotFoundError",
  7587. "content": {
  7588. "application/json": {
  7589. "schema": {
  7590. "$ref": "#/components/schemas/NotFoundError"
  7591. }
  7592. }
  7593. }
  7594. },
  7595. "409": {
  7596. "description": "SessionBusyError",
  7597. "content": {
  7598. "application/json": {
  7599. "schema": {
  7600. "$ref": "#/components/schemas/SessionBusyError"
  7601. }
  7602. }
  7603. }
  7604. }
  7605. },
  7606. "description": "Execute a shell command within the session context and return the AI's response.",
  7607. "summary": "Run shell command",
  7608. "requestBody": {
  7609. "content": {
  7610. "application/json": {
  7611. "schema": {
  7612. "type": "object",
  7613. "properties": {
  7614. "messageID": {
  7615. "type": "string",
  7616. "pattern": "^msg"
  7617. },
  7618. "agent": {
  7619. "type": "string"
  7620. },
  7621. "model": {
  7622. "type": "object",
  7623. "properties": {
  7624. "providerID": {
  7625. "type": "string"
  7626. },
  7627. "modelID": {
  7628. "type": "string"
  7629. }
  7630. },
  7631. "required": ["providerID", "modelID"],
  7632. "additionalProperties": false
  7633. },
  7634. "command": {
  7635. "type": "string"
  7636. }
  7637. },
  7638. "required": ["agent", "command"],
  7639. "additionalProperties": false
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "x-codeSamples": [
  7645. {
  7646. "lang": "js",
  7647. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7648. }
  7649. ]
  7650. }
  7651. },
  7652. "/session/{sessionID}/revert": {
  7653. "post": {
  7654. "tags": ["session"],
  7655. "operationId": "session.revert",
  7656. "parameters": [
  7657. {
  7658. "name": "sessionID",
  7659. "in": "path",
  7660. "schema": {
  7661. "type": "string",
  7662. "pattern": "^ses"
  7663. },
  7664. "required": true
  7665. },
  7666. {
  7667. "name": "directory",
  7668. "in": "query",
  7669. "schema": {
  7670. "type": "string"
  7671. },
  7672. "required": false
  7673. },
  7674. {
  7675. "name": "workspace",
  7676. "in": "query",
  7677. "schema": {
  7678. "type": "string"
  7679. },
  7680. "required": false
  7681. }
  7682. ],
  7683. "responses": {
  7684. "200": {
  7685. "description": "Updated session",
  7686. "content": {
  7687. "application/json": {
  7688. "schema": {
  7689. "$ref": "#/components/schemas/Session"
  7690. }
  7691. }
  7692. }
  7693. },
  7694. "400": {
  7695. "description": "BadRequest | InvalidRequestError",
  7696. "content": {
  7697. "application/json": {
  7698. "schema": {
  7699. "anyOf": [
  7700. {
  7701. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7702. },
  7703. {
  7704. "$ref": "#/components/schemas/InvalidRequestError"
  7705. }
  7706. ]
  7707. }
  7708. }
  7709. }
  7710. },
  7711. "404": {
  7712. "description": "NotFoundError",
  7713. "content": {
  7714. "application/json": {
  7715. "schema": {
  7716. "$ref": "#/components/schemas/NotFoundError"
  7717. }
  7718. }
  7719. }
  7720. },
  7721. "409": {
  7722. "description": "SessionBusyError",
  7723. "content": {
  7724. "application/json": {
  7725. "schema": {
  7726. "$ref": "#/components/schemas/SessionBusyError"
  7727. }
  7728. }
  7729. }
  7730. }
  7731. },
  7732. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7733. "summary": "Revert message",
  7734. "requestBody": {
  7735. "content": {
  7736. "application/json": {
  7737. "schema": {
  7738. "type": "object",
  7739. "properties": {
  7740. "messageID": {
  7741. "type": "string",
  7742. "pattern": "^msg"
  7743. },
  7744. "partID": {
  7745. "type": "string",
  7746. "pattern": "^prt"
  7747. }
  7748. },
  7749. "required": ["messageID"],
  7750. "additionalProperties": false
  7751. }
  7752. }
  7753. }
  7754. },
  7755. "x-codeSamples": [
  7756. {
  7757. "lang": "js",
  7758. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7759. }
  7760. ]
  7761. }
  7762. },
  7763. "/session/{sessionID}/unrevert": {
  7764. "post": {
  7765. "tags": ["session"],
  7766. "operationId": "session.unrevert",
  7767. "parameters": [
  7768. {
  7769. "name": "sessionID",
  7770. "in": "path",
  7771. "schema": {
  7772. "type": "string",
  7773. "pattern": "^ses"
  7774. },
  7775. "required": true
  7776. },
  7777. {
  7778. "name": "directory",
  7779. "in": "query",
  7780. "schema": {
  7781. "type": "string"
  7782. },
  7783. "required": false
  7784. },
  7785. {
  7786. "name": "workspace",
  7787. "in": "query",
  7788. "schema": {
  7789. "type": "string"
  7790. },
  7791. "required": false
  7792. }
  7793. ],
  7794. "responses": {
  7795. "200": {
  7796. "description": "Updated session",
  7797. "content": {
  7798. "application/json": {
  7799. "schema": {
  7800. "$ref": "#/components/schemas/Session"
  7801. }
  7802. }
  7803. }
  7804. },
  7805. "400": {
  7806. "description": "BadRequest | InvalidRequestError",
  7807. "content": {
  7808. "application/json": {
  7809. "schema": {
  7810. "anyOf": [
  7811. {
  7812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7813. },
  7814. {
  7815. "$ref": "#/components/schemas/InvalidRequestError"
  7816. }
  7817. ]
  7818. }
  7819. }
  7820. }
  7821. },
  7822. "404": {
  7823. "description": "NotFoundError",
  7824. "content": {
  7825. "application/json": {
  7826. "schema": {
  7827. "$ref": "#/components/schemas/NotFoundError"
  7828. }
  7829. }
  7830. }
  7831. },
  7832. "409": {
  7833. "description": "SessionBusyError",
  7834. "content": {
  7835. "application/json": {
  7836. "schema": {
  7837. "$ref": "#/components/schemas/SessionBusyError"
  7838. }
  7839. }
  7840. }
  7841. }
  7842. },
  7843. "description": "Restore all previously reverted messages in a session.",
  7844. "summary": "Restore reverted messages",
  7845. "x-codeSamples": [
  7846. {
  7847. "lang": "js",
  7848. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7849. }
  7850. ]
  7851. }
  7852. },
  7853. "/session/{sessionID}/permissions/{permissionID}": {
  7854. "post": {
  7855. "tags": ["session"],
  7856. "operationId": "permission.respond",
  7857. "parameters": [
  7858. {
  7859. "name": "sessionID",
  7860. "in": "path",
  7861. "schema": {
  7862. "type": "string",
  7863. "pattern": "^ses"
  7864. },
  7865. "required": true
  7866. },
  7867. {
  7868. "name": "permissionID",
  7869. "in": "path",
  7870. "schema": {
  7871. "type": "string",
  7872. "pattern": "^per"
  7873. },
  7874. "required": true
  7875. },
  7876. {
  7877. "name": "directory",
  7878. "in": "query",
  7879. "schema": {
  7880. "type": "string"
  7881. },
  7882. "required": false
  7883. },
  7884. {
  7885. "name": "workspace",
  7886. "in": "query",
  7887. "schema": {
  7888. "type": "string"
  7889. },
  7890. "required": false
  7891. }
  7892. ],
  7893. "responses": {
  7894. "200": {
  7895. "description": "Permission processed successfully",
  7896. "content": {
  7897. "application/json": {
  7898. "schema": {
  7899. "type": "boolean",
  7900. "description": "Permission processed successfully"
  7901. }
  7902. }
  7903. }
  7904. },
  7905. "400": {
  7906. "description": "BadRequest | InvalidRequestError",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "anyOf": [
  7911. {
  7912. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7913. },
  7914. {
  7915. "$ref": "#/components/schemas/InvalidRequestError"
  7916. }
  7917. ]
  7918. }
  7919. }
  7920. }
  7921. },
  7922. "404": {
  7923. "description": "NotFoundError | PermissionNotFoundError",
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "anyOf": [
  7928. {
  7929. "$ref": "#/components/schemas/NotFoundError"
  7930. },
  7931. {
  7932. "$ref": "#/components/schemas/PermissionNotFoundError"
  7933. }
  7934. ]
  7935. }
  7936. }
  7937. }
  7938. }
  7939. },
  7940. "description": "Approve or deny a permission request from the AI assistant.",
  7941. "summary": "Respond to permission",
  7942. "deprecated": true,
  7943. "requestBody": {
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "object",
  7948. "properties": {
  7949. "response": {
  7950. "type": "string",
  7951. "enum": ["once", "always", "reject"]
  7952. }
  7953. },
  7954. "required": ["response"],
  7955. "additionalProperties": false
  7956. }
  7957. }
  7958. }
  7959. },
  7960. "x-codeSamples": [
  7961. {
  7962. "lang": "js",
  7963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7964. }
  7965. ]
  7966. }
  7967. },
  7968. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7969. "delete": {
  7970. "tags": ["session"],
  7971. "operationId": "part.delete",
  7972. "parameters": [
  7973. {
  7974. "name": "sessionID",
  7975. "in": "path",
  7976. "schema": {
  7977. "type": "string",
  7978. "pattern": "^ses"
  7979. },
  7980. "required": true
  7981. },
  7982. {
  7983. "name": "messageID",
  7984. "in": "path",
  7985. "schema": {
  7986. "type": "string",
  7987. "pattern": "^msg"
  7988. },
  7989. "required": true
  7990. },
  7991. {
  7992. "name": "partID",
  7993. "in": "path",
  7994. "schema": {
  7995. "type": "string",
  7996. "pattern": "^prt"
  7997. },
  7998. "required": true
  7999. },
  8000. {
  8001. "name": "directory",
  8002. "in": "query",
  8003. "schema": {
  8004. "type": "string"
  8005. },
  8006. "required": false
  8007. },
  8008. {
  8009. "name": "workspace",
  8010. "in": "query",
  8011. "schema": {
  8012. "type": "string"
  8013. },
  8014. "required": false
  8015. }
  8016. ],
  8017. "responses": {
  8018. "200": {
  8019. "description": "Successfully deleted part",
  8020. "content": {
  8021. "application/json": {
  8022. "schema": {
  8023. "type": "boolean",
  8024. "description": "Successfully deleted part"
  8025. }
  8026. }
  8027. }
  8028. },
  8029. "400": {
  8030. "description": "BadRequest | InvalidRequestError",
  8031. "content": {
  8032. "application/json": {
  8033. "schema": {
  8034. "anyOf": [
  8035. {
  8036. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8037. },
  8038. {
  8039. "$ref": "#/components/schemas/InvalidRequestError"
  8040. }
  8041. ]
  8042. }
  8043. }
  8044. }
  8045. },
  8046. "404": {
  8047. "description": "NotFoundError",
  8048. "content": {
  8049. "application/json": {
  8050. "schema": {
  8051. "$ref": "#/components/schemas/NotFoundError"
  8052. }
  8053. }
  8054. }
  8055. }
  8056. },
  8057. "description": "Delete a part from a message.",
  8058. "x-codeSamples": [
  8059. {
  8060. "lang": "js",
  8061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  8062. }
  8063. ]
  8064. },
  8065. "patch": {
  8066. "tags": ["session"],
  8067. "operationId": "part.update",
  8068. "parameters": [
  8069. {
  8070. "name": "sessionID",
  8071. "in": "path",
  8072. "schema": {
  8073. "type": "string",
  8074. "pattern": "^ses"
  8075. },
  8076. "required": true
  8077. },
  8078. {
  8079. "name": "messageID",
  8080. "in": "path",
  8081. "schema": {
  8082. "type": "string",
  8083. "pattern": "^msg"
  8084. },
  8085. "required": true
  8086. },
  8087. {
  8088. "name": "partID",
  8089. "in": "path",
  8090. "schema": {
  8091. "type": "string",
  8092. "pattern": "^prt"
  8093. },
  8094. "required": true
  8095. },
  8096. {
  8097. "name": "directory",
  8098. "in": "query",
  8099. "schema": {
  8100. "type": "string"
  8101. },
  8102. "required": false
  8103. },
  8104. {
  8105. "name": "workspace",
  8106. "in": "query",
  8107. "schema": {
  8108. "type": "string"
  8109. },
  8110. "required": false
  8111. }
  8112. ],
  8113. "responses": {
  8114. "200": {
  8115. "description": "Successfully updated part",
  8116. "content": {
  8117. "application/json": {
  8118. "schema": {
  8119. "$ref": "#/components/schemas/Part"
  8120. }
  8121. }
  8122. }
  8123. },
  8124. "400": {
  8125. "description": "BadRequest | InvalidRequestError",
  8126. "content": {
  8127. "application/json": {
  8128. "schema": {
  8129. "anyOf": [
  8130. {
  8131. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8132. },
  8133. {
  8134. "$ref": "#/components/schemas/InvalidRequestError"
  8135. }
  8136. ]
  8137. }
  8138. }
  8139. }
  8140. },
  8141. "404": {
  8142. "description": "NotFoundError",
  8143. "content": {
  8144. "application/json": {
  8145. "schema": {
  8146. "$ref": "#/components/schemas/NotFoundError"
  8147. }
  8148. }
  8149. }
  8150. }
  8151. },
  8152. "description": "Update a part in a message.",
  8153. "requestBody": {
  8154. "content": {
  8155. "application/json": {
  8156. "schema": {
  8157. "$ref": "#/components/schemas/Part"
  8158. }
  8159. }
  8160. }
  8161. },
  8162. "x-codeSamples": [
  8163. {
  8164. "lang": "js",
  8165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8166. }
  8167. ]
  8168. }
  8169. },
  8170. "/sync/start": {
  8171. "post": {
  8172. "tags": ["sync"],
  8173. "operationId": "sync.start",
  8174. "parameters": [
  8175. {
  8176. "name": "directory",
  8177. "in": "query",
  8178. "schema": {
  8179. "type": "string"
  8180. },
  8181. "required": false
  8182. },
  8183. {
  8184. "name": "workspace",
  8185. "in": "query",
  8186. "schema": {
  8187. "type": "string"
  8188. },
  8189. "required": false
  8190. }
  8191. ],
  8192. "responses": {
  8193. "200": {
  8194. "description": "Workspace sync started",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "type": "boolean",
  8199. "description": "Workspace sync started"
  8200. }
  8201. }
  8202. }
  8203. },
  8204. "400": {
  8205. "description": "Bad request",
  8206. "content": {
  8207. "application/json": {
  8208. "schema": {
  8209. "$ref": "#/components/schemas/BadRequestError"
  8210. }
  8211. }
  8212. }
  8213. }
  8214. },
  8215. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8216. "summary": "Start workspace sync",
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/replay": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.replay",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Replayed sync events",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string"
  8257. }
  8258. },
  8259. "required": ["sessionID"],
  8260. "additionalProperties": false,
  8261. "description": "Replayed sync events"
  8262. }
  8263. }
  8264. }
  8265. },
  8266. "400": {
  8267. "description": "BadRequest | InvalidRequestError",
  8268. "content": {
  8269. "application/json": {
  8270. "schema": {
  8271. "anyOf": [
  8272. {
  8273. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8274. },
  8275. {
  8276. "$ref": "#/components/schemas/InvalidRequestError"
  8277. }
  8278. ]
  8279. }
  8280. }
  8281. }
  8282. }
  8283. },
  8284. "description": "Validate and replay a complete sync event history.",
  8285. "summary": "Replay sync events",
  8286. "requestBody": {
  8287. "content": {
  8288. "application/json": {
  8289. "schema": {
  8290. "type": "object",
  8291. "properties": {
  8292. "directory": {
  8293. "type": "string"
  8294. },
  8295. "events": {
  8296. "type": "array",
  8297. "minItems": 1,
  8298. "items": {
  8299. "type": "object",
  8300. "properties": {
  8301. "id": {
  8302. "type": "string",
  8303. "pattern": "^evt_"
  8304. },
  8305. "aggregateID": {
  8306. "type": "string"
  8307. },
  8308. "seq": {
  8309. "type": "integer",
  8310. "minimum": 0
  8311. },
  8312. "type": {
  8313. "type": "string"
  8314. },
  8315. "data": {
  8316. "type": "object"
  8317. }
  8318. },
  8319. "required": ["id", "aggregateID", "seq", "type", "data"],
  8320. "additionalProperties": false
  8321. }
  8322. }
  8323. },
  8324. "required": ["directory", "events"],
  8325. "additionalProperties": false
  8326. }
  8327. }
  8328. }
  8329. },
  8330. "x-codeSamples": [
  8331. {
  8332. "lang": "js",
  8333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8334. }
  8335. ]
  8336. }
  8337. },
  8338. "/sync/steal": {
  8339. "post": {
  8340. "tags": ["sync"],
  8341. "operationId": "sync.steal",
  8342. "parameters": [
  8343. {
  8344. "name": "directory",
  8345. "in": "query",
  8346. "schema": {
  8347. "type": "string"
  8348. },
  8349. "required": false
  8350. },
  8351. {
  8352. "name": "workspace",
  8353. "in": "query",
  8354. "schema": {
  8355. "type": "string"
  8356. },
  8357. "required": false
  8358. }
  8359. ],
  8360. "responses": {
  8361. "200": {
  8362. "description": "Session stolen into workspace",
  8363. "content": {
  8364. "application/json": {
  8365. "schema": {
  8366. "type": "object",
  8367. "properties": {
  8368. "sessionID": {
  8369. "type": "string",
  8370. "pattern": "^ses"
  8371. }
  8372. },
  8373. "required": ["sessionID"],
  8374. "additionalProperties": false,
  8375. "description": "Session stolen into workspace"
  8376. }
  8377. }
  8378. }
  8379. },
  8380. "400": {
  8381. "description": "BadRequest | InvalidRequestError",
  8382. "content": {
  8383. "application/json": {
  8384. "schema": {
  8385. "anyOf": [
  8386. {
  8387. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8388. },
  8389. {
  8390. "$ref": "#/components/schemas/InvalidRequestError"
  8391. }
  8392. ]
  8393. }
  8394. }
  8395. }
  8396. }
  8397. },
  8398. "description": "Update a session to belong to the current workspace through the sync event system.",
  8399. "summary": "Steal session into workspace",
  8400. "requestBody": {
  8401. "content": {
  8402. "application/json": {
  8403. "schema": {
  8404. "type": "object",
  8405. "properties": {
  8406. "sessionID": {
  8407. "type": "string",
  8408. "pattern": "^ses"
  8409. }
  8410. },
  8411. "required": ["sessionID"],
  8412. "additionalProperties": false
  8413. }
  8414. }
  8415. }
  8416. },
  8417. "x-codeSamples": [
  8418. {
  8419. "lang": "js",
  8420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8421. }
  8422. ]
  8423. }
  8424. },
  8425. "/sync/history": {
  8426. "post": {
  8427. "tags": ["sync"],
  8428. "operationId": "sync.history.list",
  8429. "parameters": [
  8430. {
  8431. "name": "directory",
  8432. "in": "query",
  8433. "schema": {
  8434. "type": "string"
  8435. },
  8436. "required": false
  8437. },
  8438. {
  8439. "name": "workspace",
  8440. "in": "query",
  8441. "schema": {
  8442. "type": "string"
  8443. },
  8444. "required": false
  8445. }
  8446. ],
  8447. "responses": {
  8448. "200": {
  8449. "description": "Sync events",
  8450. "content": {
  8451. "application/json": {
  8452. "schema": {
  8453. "type": "array",
  8454. "items": {
  8455. "type": "object",
  8456. "properties": {
  8457. "id": {
  8458. "type": "string",
  8459. "pattern": "^evt_"
  8460. },
  8461. "aggregate_id": {
  8462. "type": "string"
  8463. },
  8464. "seq": {
  8465. "type": "integer",
  8466. "minimum": 0
  8467. },
  8468. "type": {
  8469. "type": "string"
  8470. },
  8471. "data": {
  8472. "type": "object"
  8473. }
  8474. },
  8475. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8476. "additionalProperties": false
  8477. },
  8478. "description": "Sync events"
  8479. }
  8480. }
  8481. }
  8482. },
  8483. "400": {
  8484. "description": "BadRequest | InvalidRequestError",
  8485. "content": {
  8486. "application/json": {
  8487. "schema": {
  8488. "anyOf": [
  8489. {
  8490. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8491. },
  8492. {
  8493. "$ref": "#/components/schemas/InvalidRequestError"
  8494. }
  8495. ]
  8496. }
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8502. "summary": "List sync events",
  8503. "requestBody": {
  8504. "content": {
  8505. "application/json": {
  8506. "schema": {
  8507. "type": "object",
  8508. "additionalProperties": {
  8509. "type": "integer",
  8510. "minimum": 0
  8511. }
  8512. }
  8513. }
  8514. }
  8515. },
  8516. "x-codeSamples": [
  8517. {
  8518. "lang": "js",
  8519. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8520. }
  8521. ]
  8522. }
  8523. },
  8524. "/tui/append-prompt": {
  8525. "post": {
  8526. "tags": ["tui"],
  8527. "operationId": "tui.appendPrompt",
  8528. "parameters": [
  8529. {
  8530. "name": "directory",
  8531. "in": "query",
  8532. "schema": {
  8533. "type": "string"
  8534. },
  8535. "required": false
  8536. },
  8537. {
  8538. "name": "workspace",
  8539. "in": "query",
  8540. "schema": {
  8541. "type": "string"
  8542. },
  8543. "required": false
  8544. }
  8545. ],
  8546. "responses": {
  8547. "200": {
  8548. "description": "Prompt processed successfully",
  8549. "content": {
  8550. "application/json": {
  8551. "schema": {
  8552. "type": "boolean",
  8553. "description": "Prompt processed successfully"
  8554. }
  8555. }
  8556. }
  8557. },
  8558. "400": {
  8559. "description": "BadRequest | InvalidRequestError",
  8560. "content": {
  8561. "application/json": {
  8562. "schema": {
  8563. "anyOf": [
  8564. {
  8565. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8566. },
  8567. {
  8568. "$ref": "#/components/schemas/InvalidRequestError"
  8569. }
  8570. ]
  8571. }
  8572. }
  8573. }
  8574. }
  8575. },
  8576. "description": "Append prompt to the TUI.",
  8577. "summary": "Append TUI prompt",
  8578. "requestBody": {
  8579. "content": {
  8580. "application/json": {
  8581. "schema": {
  8582. "type": "object",
  8583. "properties": {
  8584. "text": {
  8585. "type": "string"
  8586. }
  8587. },
  8588. "required": ["text"],
  8589. "additionalProperties": false
  8590. }
  8591. }
  8592. }
  8593. },
  8594. "x-codeSamples": [
  8595. {
  8596. "lang": "js",
  8597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8598. }
  8599. ]
  8600. }
  8601. },
  8602. "/tui/open-help": {
  8603. "post": {
  8604. "tags": ["tui"],
  8605. "operationId": "tui.openHelp",
  8606. "parameters": [
  8607. {
  8608. "name": "directory",
  8609. "in": "query",
  8610. "schema": {
  8611. "type": "string"
  8612. },
  8613. "required": false
  8614. },
  8615. {
  8616. "name": "workspace",
  8617. "in": "query",
  8618. "schema": {
  8619. "type": "string"
  8620. },
  8621. "required": false
  8622. }
  8623. ],
  8624. "responses": {
  8625. "200": {
  8626. "description": "Help dialog opened successfully",
  8627. "content": {
  8628. "application/json": {
  8629. "schema": {
  8630. "type": "boolean",
  8631. "description": "Help dialog opened successfully"
  8632. }
  8633. }
  8634. }
  8635. },
  8636. "400": {
  8637. "description": "Bad request",
  8638. "content": {
  8639. "application/json": {
  8640. "schema": {
  8641. "$ref": "#/components/schemas/BadRequestError"
  8642. }
  8643. }
  8644. }
  8645. }
  8646. },
  8647. "description": "Open the help dialog in the TUI to display user assistance information.",
  8648. "summary": "Open help dialog",
  8649. "x-codeSamples": [
  8650. {
  8651. "lang": "js",
  8652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8653. }
  8654. ]
  8655. }
  8656. },
  8657. "/tui/open-sessions": {
  8658. "post": {
  8659. "tags": ["tui"],
  8660. "operationId": "tui.openSessions",
  8661. "parameters": [
  8662. {
  8663. "name": "directory",
  8664. "in": "query",
  8665. "schema": {
  8666. "type": "string"
  8667. },
  8668. "required": false
  8669. },
  8670. {
  8671. "name": "workspace",
  8672. "in": "query",
  8673. "schema": {
  8674. "type": "string"
  8675. },
  8676. "required": false
  8677. }
  8678. ],
  8679. "responses": {
  8680. "200": {
  8681. "description": "Session dialog opened successfully",
  8682. "content": {
  8683. "application/json": {
  8684. "schema": {
  8685. "type": "boolean",
  8686. "description": "Session dialog opened successfully"
  8687. }
  8688. }
  8689. }
  8690. },
  8691. "400": {
  8692. "description": "Bad request",
  8693. "content": {
  8694. "application/json": {
  8695. "schema": {
  8696. "$ref": "#/components/schemas/BadRequestError"
  8697. }
  8698. }
  8699. }
  8700. }
  8701. },
  8702. "description": "Open the session dialog.",
  8703. "summary": "Open sessions dialog",
  8704. "x-codeSamples": [
  8705. {
  8706. "lang": "js",
  8707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8708. }
  8709. ]
  8710. }
  8711. },
  8712. "/tui/open-themes": {
  8713. "post": {
  8714. "tags": ["tui"],
  8715. "operationId": "tui.openThemes",
  8716. "parameters": [
  8717. {
  8718. "name": "directory",
  8719. "in": "query",
  8720. "schema": {
  8721. "type": "string"
  8722. },
  8723. "required": false
  8724. },
  8725. {
  8726. "name": "workspace",
  8727. "in": "query",
  8728. "schema": {
  8729. "type": "string"
  8730. },
  8731. "required": false
  8732. }
  8733. ],
  8734. "responses": {
  8735. "200": {
  8736. "description": "Theme dialog opened successfully",
  8737. "content": {
  8738. "application/json": {
  8739. "schema": {
  8740. "type": "boolean",
  8741. "description": "Theme dialog opened successfully"
  8742. }
  8743. }
  8744. }
  8745. },
  8746. "400": {
  8747. "description": "Bad request",
  8748. "content": {
  8749. "application/json": {
  8750. "schema": {
  8751. "$ref": "#/components/schemas/BadRequestError"
  8752. }
  8753. }
  8754. }
  8755. }
  8756. },
  8757. "description": "Open the theme dialog.",
  8758. "summary": "Open themes dialog",
  8759. "x-codeSamples": [
  8760. {
  8761. "lang": "js",
  8762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8763. }
  8764. ]
  8765. }
  8766. },
  8767. "/tui/open-models": {
  8768. "post": {
  8769. "tags": ["tui"],
  8770. "operationId": "tui.openModels",
  8771. "parameters": [
  8772. {
  8773. "name": "directory",
  8774. "in": "query",
  8775. "schema": {
  8776. "type": "string"
  8777. },
  8778. "required": false
  8779. },
  8780. {
  8781. "name": "workspace",
  8782. "in": "query",
  8783. "schema": {
  8784. "type": "string"
  8785. },
  8786. "required": false
  8787. }
  8788. ],
  8789. "responses": {
  8790. "200": {
  8791. "description": "Model dialog opened successfully",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "type": "boolean",
  8796. "description": "Model dialog opened successfully"
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "400": {
  8802. "description": "Bad request",
  8803. "content": {
  8804. "application/json": {
  8805. "schema": {
  8806. "$ref": "#/components/schemas/BadRequestError"
  8807. }
  8808. }
  8809. }
  8810. }
  8811. },
  8812. "description": "Open the model dialog.",
  8813. "summary": "Open models dialog",
  8814. "x-codeSamples": [
  8815. {
  8816. "lang": "js",
  8817. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8818. }
  8819. ]
  8820. }
  8821. },
  8822. "/tui/submit-prompt": {
  8823. "post": {
  8824. "tags": ["tui"],
  8825. "operationId": "tui.submitPrompt",
  8826. "parameters": [
  8827. {
  8828. "name": "directory",
  8829. "in": "query",
  8830. "schema": {
  8831. "type": "string"
  8832. },
  8833. "required": false
  8834. },
  8835. {
  8836. "name": "workspace",
  8837. "in": "query",
  8838. "schema": {
  8839. "type": "string"
  8840. },
  8841. "required": false
  8842. }
  8843. ],
  8844. "responses": {
  8845. "200": {
  8846. "description": "Prompt submitted successfully",
  8847. "content": {
  8848. "application/json": {
  8849. "schema": {
  8850. "type": "boolean",
  8851. "description": "Prompt submitted successfully"
  8852. }
  8853. }
  8854. }
  8855. },
  8856. "400": {
  8857. "description": "Bad request",
  8858. "content": {
  8859. "application/json": {
  8860. "schema": {
  8861. "$ref": "#/components/schemas/BadRequestError"
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "description": "Submit the prompt.",
  8868. "summary": "Submit TUI prompt",
  8869. "x-codeSamples": [
  8870. {
  8871. "lang": "js",
  8872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8873. }
  8874. ]
  8875. }
  8876. },
  8877. "/tui/clear-prompt": {
  8878. "post": {
  8879. "tags": ["tui"],
  8880. "operationId": "tui.clearPrompt",
  8881. "parameters": [
  8882. {
  8883. "name": "directory",
  8884. "in": "query",
  8885. "schema": {
  8886. "type": "string"
  8887. },
  8888. "required": false
  8889. },
  8890. {
  8891. "name": "workspace",
  8892. "in": "query",
  8893. "schema": {
  8894. "type": "string"
  8895. },
  8896. "required": false
  8897. }
  8898. ],
  8899. "responses": {
  8900. "200": {
  8901. "description": "Prompt cleared successfully",
  8902. "content": {
  8903. "application/json": {
  8904. "schema": {
  8905. "type": "boolean",
  8906. "description": "Prompt cleared successfully"
  8907. }
  8908. }
  8909. }
  8910. },
  8911. "400": {
  8912. "description": "Bad request",
  8913. "content": {
  8914. "application/json": {
  8915. "schema": {
  8916. "$ref": "#/components/schemas/BadRequestError"
  8917. }
  8918. }
  8919. }
  8920. }
  8921. },
  8922. "description": "Clear the prompt.",
  8923. "summary": "Clear TUI prompt",
  8924. "x-codeSamples": [
  8925. {
  8926. "lang": "js",
  8927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8928. }
  8929. ]
  8930. }
  8931. },
  8932. "/tui/execute-command": {
  8933. "post": {
  8934. "tags": ["tui"],
  8935. "operationId": "tui.executeCommand",
  8936. "parameters": [
  8937. {
  8938. "name": "directory",
  8939. "in": "query",
  8940. "schema": {
  8941. "type": "string"
  8942. },
  8943. "required": false
  8944. },
  8945. {
  8946. "name": "workspace",
  8947. "in": "query",
  8948. "schema": {
  8949. "type": "string"
  8950. },
  8951. "required": false
  8952. }
  8953. ],
  8954. "responses": {
  8955. "200": {
  8956. "description": "Command executed successfully",
  8957. "content": {
  8958. "application/json": {
  8959. "schema": {
  8960. "type": "boolean",
  8961. "description": "Command executed successfully"
  8962. }
  8963. }
  8964. }
  8965. },
  8966. "400": {
  8967. "description": "BadRequest | InvalidRequestError",
  8968. "content": {
  8969. "application/json": {
  8970. "schema": {
  8971. "anyOf": [
  8972. {
  8973. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8974. },
  8975. {
  8976. "$ref": "#/components/schemas/InvalidRequestError"
  8977. }
  8978. ]
  8979. }
  8980. }
  8981. }
  8982. }
  8983. },
  8984. "description": "Execute a TUI command.",
  8985. "summary": "Execute TUI command",
  8986. "requestBody": {
  8987. "content": {
  8988. "application/json": {
  8989. "schema": {
  8990. "type": "object",
  8991. "properties": {
  8992. "command": {
  8993. "type": "string"
  8994. }
  8995. },
  8996. "required": ["command"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/show-toast": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.showToast",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Toast notification shown successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Toast notification shown successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "Bad request",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "$ref": "#/components/schemas/BadRequestError"
  9050. }
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "description": "Show a toast notification in the TUI.",
  9056. "summary": "Show TUI toast",
  9057. "requestBody": {
  9058. "content": {
  9059. "application/json": {
  9060. "schema": {
  9061. "type": "object",
  9062. "properties": {
  9063. "title": {
  9064. "type": "string"
  9065. },
  9066. "message": {
  9067. "type": "string"
  9068. },
  9069. "variant": {
  9070. "type": "string",
  9071. "enum": ["info", "success", "warning", "error"]
  9072. },
  9073. "duration": {
  9074. "type": "integer",
  9075. "exclusiveMinimum": 0
  9076. }
  9077. },
  9078. "required": ["message", "variant"],
  9079. "additionalProperties": false
  9080. }
  9081. }
  9082. }
  9083. },
  9084. "x-codeSamples": [
  9085. {
  9086. "lang": "js",
  9087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9088. }
  9089. ]
  9090. }
  9091. },
  9092. "/tui/publish": {
  9093. "post": {
  9094. "tags": ["tui"],
  9095. "operationId": "tui.publish",
  9096. "parameters": [
  9097. {
  9098. "name": "directory",
  9099. "in": "query",
  9100. "schema": {
  9101. "type": "string"
  9102. },
  9103. "required": false
  9104. },
  9105. {
  9106. "name": "workspace",
  9107. "in": "query",
  9108. "schema": {
  9109. "type": "string"
  9110. },
  9111. "required": false
  9112. }
  9113. ],
  9114. "responses": {
  9115. "200": {
  9116. "description": "Event published successfully",
  9117. "content": {
  9118. "application/json": {
  9119. "schema": {
  9120. "type": "boolean",
  9121. "description": "Event published successfully"
  9122. }
  9123. }
  9124. }
  9125. },
  9126. "400": {
  9127. "description": "BadRequest | InvalidRequestError",
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "anyOf": [
  9132. {
  9133. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9134. },
  9135. {
  9136. "$ref": "#/components/schemas/InvalidRequestError"
  9137. }
  9138. ]
  9139. }
  9140. }
  9141. }
  9142. }
  9143. },
  9144. "description": "Publish a TUI event.",
  9145. "summary": "Publish TUI event",
  9146. "requestBody": {
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "anyOf": [
  9151. {
  9152. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9153. },
  9154. {
  9155. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9156. },
  9157. {
  9158. "$ref": "#/components/schemas/EventTuiToastShow"
  9159. },
  9160. {
  9161. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9162. }
  9163. ]
  9164. }
  9165. }
  9166. }
  9167. },
  9168. "x-codeSamples": [
  9169. {
  9170. "lang": "js",
  9171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9172. }
  9173. ]
  9174. }
  9175. },
  9176. "/tui/select-session": {
  9177. "post": {
  9178. "tags": ["tui"],
  9179. "operationId": "tui.selectSession",
  9180. "parameters": [
  9181. {
  9182. "name": "directory",
  9183. "in": "query",
  9184. "schema": {
  9185. "type": "string"
  9186. },
  9187. "required": false
  9188. },
  9189. {
  9190. "name": "workspace",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. }
  9197. ],
  9198. "responses": {
  9199. "200": {
  9200. "description": "Session selected successfully",
  9201. "content": {
  9202. "application/json": {
  9203. "schema": {
  9204. "type": "boolean",
  9205. "description": "Session selected successfully"
  9206. }
  9207. }
  9208. }
  9209. },
  9210. "400": {
  9211. "description": "BadRequest | InvalidRequestError",
  9212. "content": {
  9213. "application/json": {
  9214. "schema": {
  9215. "anyOf": [
  9216. {
  9217. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9218. },
  9219. {
  9220. "$ref": "#/components/schemas/InvalidRequestError"
  9221. }
  9222. ]
  9223. }
  9224. }
  9225. }
  9226. },
  9227. "404": {
  9228. "description": "NotFoundError",
  9229. "content": {
  9230. "application/json": {
  9231. "schema": {
  9232. "$ref": "#/components/schemas/NotFoundError"
  9233. }
  9234. }
  9235. }
  9236. }
  9237. },
  9238. "description": "Navigate the TUI to display the specified session.",
  9239. "summary": "Select session",
  9240. "requestBody": {
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "object",
  9245. "properties": {
  9246. "sessionID": {
  9247. "type": "string",
  9248. "pattern": "^ses",
  9249. "description": "Session ID to navigate to"
  9250. }
  9251. },
  9252. "required": ["sessionID"],
  9253. "additionalProperties": false
  9254. }
  9255. }
  9256. }
  9257. },
  9258. "x-codeSamples": [
  9259. {
  9260. "lang": "js",
  9261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9262. }
  9263. ]
  9264. }
  9265. },
  9266. "/tui/control/next": {
  9267. "get": {
  9268. "tags": ["tui"],
  9269. "operationId": "tui.control.next",
  9270. "parameters": [
  9271. {
  9272. "name": "directory",
  9273. "in": "query",
  9274. "schema": {
  9275. "type": "string"
  9276. },
  9277. "required": false
  9278. },
  9279. {
  9280. "name": "workspace",
  9281. "in": "query",
  9282. "schema": {
  9283. "type": "string"
  9284. },
  9285. "required": false
  9286. }
  9287. ],
  9288. "responses": {
  9289. "200": {
  9290. "description": "Next TUI request",
  9291. "content": {
  9292. "application/json": {
  9293. "schema": {
  9294. "type": "object",
  9295. "properties": {
  9296. "path": {
  9297. "type": "string"
  9298. },
  9299. "body": {}
  9300. },
  9301. "required": ["path", "body"],
  9302. "additionalProperties": false,
  9303. "description": "Next TUI request"
  9304. }
  9305. }
  9306. }
  9307. },
  9308. "400": {
  9309. "description": "Bad request",
  9310. "content": {
  9311. "application/json": {
  9312. "schema": {
  9313. "$ref": "#/components/schemas/BadRequestError"
  9314. }
  9315. }
  9316. }
  9317. }
  9318. },
  9319. "description": "Retrieve the next TUI request from the queue for processing.",
  9320. "summary": "Get next TUI request",
  9321. "x-codeSamples": [
  9322. {
  9323. "lang": "js",
  9324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9325. }
  9326. ]
  9327. }
  9328. },
  9329. "/tui/control/response": {
  9330. "post": {
  9331. "tags": ["tui"],
  9332. "operationId": "tui.control.response",
  9333. "parameters": [
  9334. {
  9335. "name": "directory",
  9336. "in": "query",
  9337. "schema": {
  9338. "type": "string"
  9339. },
  9340. "required": false
  9341. },
  9342. {
  9343. "name": "workspace",
  9344. "in": "query",
  9345. "schema": {
  9346. "type": "string"
  9347. },
  9348. "required": false
  9349. }
  9350. ],
  9351. "responses": {
  9352. "200": {
  9353. "description": "Response submitted successfully",
  9354. "content": {
  9355. "application/json": {
  9356. "schema": {
  9357. "type": "boolean",
  9358. "description": "Response submitted successfully"
  9359. }
  9360. }
  9361. }
  9362. },
  9363. "400": {
  9364. "description": "Bad request",
  9365. "content": {
  9366. "application/json": {
  9367. "schema": {
  9368. "$ref": "#/components/schemas/BadRequestError"
  9369. }
  9370. }
  9371. }
  9372. }
  9373. },
  9374. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9375. "summary": "Submit TUI response",
  9376. "requestBody": {
  9377. "content": {
  9378. "application/json": {
  9379. "schema": {}
  9380. }
  9381. }
  9382. },
  9383. "x-codeSamples": [
  9384. {
  9385. "lang": "js",
  9386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9387. }
  9388. ]
  9389. }
  9390. },
  9391. "/experimental/workspace/adapter": {
  9392. "get": {
  9393. "tags": ["workspace"],
  9394. "operationId": "experimental.workspace.adapter.list",
  9395. "parameters": [
  9396. {
  9397. "name": "directory",
  9398. "in": "query",
  9399. "schema": {
  9400. "type": "string"
  9401. },
  9402. "required": false
  9403. },
  9404. {
  9405. "name": "workspace",
  9406. "in": "query",
  9407. "schema": {
  9408. "type": "string"
  9409. },
  9410. "required": false
  9411. }
  9412. ],
  9413. "responses": {
  9414. "200": {
  9415. "description": "Workspace adapters",
  9416. "content": {
  9417. "application/json": {
  9418. "schema": {
  9419. "type": "array",
  9420. "items": {
  9421. "type": "object",
  9422. "properties": {
  9423. "type": {
  9424. "type": "string"
  9425. },
  9426. "name": {
  9427. "type": "string"
  9428. },
  9429. "description": {
  9430. "type": "string"
  9431. }
  9432. },
  9433. "required": ["type", "name", "description"],
  9434. "additionalProperties": false
  9435. },
  9436. "description": "Workspace adapters"
  9437. }
  9438. }
  9439. }
  9440. },
  9441. "400": {
  9442. "description": "Bad request",
  9443. "content": {
  9444. "application/json": {
  9445. "schema": {
  9446. "$ref": "#/components/schemas/BadRequestError"
  9447. }
  9448. }
  9449. }
  9450. }
  9451. },
  9452. "description": "List all available workspace adapters for the current project.",
  9453. "summary": "List workspace adapters",
  9454. "x-codeSamples": [
  9455. {
  9456. "lang": "js",
  9457. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9458. }
  9459. ]
  9460. }
  9461. },
  9462. "/experimental/workspace": {
  9463. "get": {
  9464. "tags": ["workspace"],
  9465. "operationId": "experimental.workspace.list",
  9466. "parameters": [
  9467. {
  9468. "name": "directory",
  9469. "in": "query",
  9470. "schema": {
  9471. "type": "string"
  9472. },
  9473. "required": false
  9474. },
  9475. {
  9476. "name": "workspace",
  9477. "in": "query",
  9478. "schema": {
  9479. "type": "string"
  9480. },
  9481. "required": false
  9482. }
  9483. ],
  9484. "responses": {
  9485. "200": {
  9486. "description": "Workspaces",
  9487. "content": {
  9488. "application/json": {
  9489. "schema": {
  9490. "type": "array",
  9491. "items": {
  9492. "$ref": "#/components/schemas/Workspace"
  9493. },
  9494. "description": "Workspaces"
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "400": {
  9500. "description": "Bad request",
  9501. "content": {
  9502. "application/json": {
  9503. "schema": {
  9504. "$ref": "#/components/schemas/BadRequestError"
  9505. }
  9506. }
  9507. }
  9508. }
  9509. },
  9510. "description": "List all workspaces.",
  9511. "summary": "List workspaces",
  9512. "x-codeSamples": [
  9513. {
  9514. "lang": "js",
  9515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9516. }
  9517. ]
  9518. },
  9519. "post": {
  9520. "tags": ["workspace"],
  9521. "operationId": "experimental.workspace.create",
  9522. "parameters": [
  9523. {
  9524. "name": "directory",
  9525. "in": "query",
  9526. "schema": {
  9527. "type": "string"
  9528. },
  9529. "required": false
  9530. },
  9531. {
  9532. "name": "workspace",
  9533. "in": "query",
  9534. "schema": {
  9535. "type": "string"
  9536. },
  9537. "required": false
  9538. }
  9539. ],
  9540. "responses": {
  9541. "200": {
  9542. "description": "Workspace created",
  9543. "content": {
  9544. "application/json": {
  9545. "schema": {
  9546. "$ref": "#/components/schemas/Workspace"
  9547. }
  9548. }
  9549. }
  9550. },
  9551. "400": {
  9552. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9553. "content": {
  9554. "application/json": {
  9555. "schema": {
  9556. "anyOf": [
  9557. {
  9558. "$ref": "#/components/schemas/WorkspaceCreateError"
  9559. },
  9560. {
  9561. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9562. },
  9563. {
  9564. "$ref": "#/components/schemas/InvalidRequestError"
  9565. }
  9566. ]
  9567. }
  9568. }
  9569. }
  9570. }
  9571. },
  9572. "description": "Create a workspace for the current project.",
  9573. "summary": "Create workspace",
  9574. "requestBody": {
  9575. "content": {
  9576. "application/json": {
  9577. "schema": {
  9578. "type": "object",
  9579. "properties": {
  9580. "id": {
  9581. "type": "string",
  9582. "pattern": "^wrk"
  9583. },
  9584. "type": {
  9585. "type": "string"
  9586. },
  9587. "branch": {
  9588. "anyOf": [
  9589. {
  9590. "type": "string"
  9591. },
  9592. {
  9593. "type": "null"
  9594. }
  9595. ]
  9596. },
  9597. "extra": {
  9598. "anyOf": [
  9599. {},
  9600. {
  9601. "type": "null"
  9602. }
  9603. ]
  9604. }
  9605. },
  9606. "required": ["type"],
  9607. "additionalProperties": false
  9608. }
  9609. }
  9610. }
  9611. },
  9612. "x-codeSamples": [
  9613. {
  9614. "lang": "js",
  9615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9616. }
  9617. ]
  9618. }
  9619. },
  9620. "/experimental/workspace/sync-list": {
  9621. "post": {
  9622. "tags": ["workspace"],
  9623. "operationId": "experimental.workspace.syncList",
  9624. "parameters": [
  9625. {
  9626. "name": "directory",
  9627. "in": "query",
  9628. "schema": {
  9629. "type": "string"
  9630. },
  9631. "required": false
  9632. },
  9633. {
  9634. "name": "workspace",
  9635. "in": "query",
  9636. "schema": {
  9637. "type": "string"
  9638. },
  9639. "required": false
  9640. }
  9641. ],
  9642. "responses": {
  9643. "204": {
  9644. "description": "Workspace list synced"
  9645. },
  9646. "400": {
  9647. "description": "Bad request",
  9648. "content": {
  9649. "application/json": {
  9650. "schema": {
  9651. "$ref": "#/components/schemas/BadRequestError"
  9652. }
  9653. }
  9654. }
  9655. }
  9656. },
  9657. "description": "Register missing workspaces returned by workspace adapters.",
  9658. "summary": "Sync workspace list",
  9659. "x-codeSamples": [
  9660. {
  9661. "lang": "js",
  9662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9663. }
  9664. ]
  9665. }
  9666. },
  9667. "/experimental/workspace/status": {
  9668. "get": {
  9669. "tags": ["workspace"],
  9670. "operationId": "experimental.workspace.status",
  9671. "parameters": [
  9672. {
  9673. "name": "directory",
  9674. "in": "query",
  9675. "schema": {
  9676. "type": "string"
  9677. },
  9678. "required": false
  9679. },
  9680. {
  9681. "name": "workspace",
  9682. "in": "query",
  9683. "schema": {
  9684. "type": "string"
  9685. },
  9686. "required": false
  9687. }
  9688. ],
  9689. "responses": {
  9690. "200": {
  9691. "description": "Workspace status",
  9692. "content": {
  9693. "application/json": {
  9694. "schema": {
  9695. "type": "array",
  9696. "items": {
  9697. "type": "object",
  9698. "properties": {
  9699. "workspaceID": {
  9700. "type": "string",
  9701. "pattern": "^wrk"
  9702. },
  9703. "status": {
  9704. "type": "string",
  9705. "enum": ["connected", "connecting", "disconnected", "error"]
  9706. }
  9707. },
  9708. "required": ["workspaceID", "status"],
  9709. "additionalProperties": false
  9710. },
  9711. "description": "Workspace status"
  9712. }
  9713. }
  9714. }
  9715. },
  9716. "400": {
  9717. "description": "Bad request",
  9718. "content": {
  9719. "application/json": {
  9720. "schema": {
  9721. "$ref": "#/components/schemas/BadRequestError"
  9722. }
  9723. }
  9724. }
  9725. }
  9726. },
  9727. "description": "Get connection status for workspaces in the current project.",
  9728. "summary": "Workspace status",
  9729. "x-codeSamples": [
  9730. {
  9731. "lang": "js",
  9732. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9733. }
  9734. ]
  9735. }
  9736. },
  9737. "/experimental/workspace/{id}": {
  9738. "delete": {
  9739. "tags": ["workspace"],
  9740. "operationId": "experimental.workspace.remove",
  9741. "parameters": [
  9742. {
  9743. "name": "id",
  9744. "in": "path",
  9745. "schema": {
  9746. "type": "string",
  9747. "pattern": "^wrk"
  9748. },
  9749. "required": true
  9750. },
  9751. {
  9752. "name": "directory",
  9753. "in": "query",
  9754. "schema": {
  9755. "type": "string"
  9756. },
  9757. "required": false
  9758. },
  9759. {
  9760. "name": "workspace",
  9761. "in": "query",
  9762. "schema": {
  9763. "type": "string"
  9764. },
  9765. "required": false
  9766. }
  9767. ],
  9768. "responses": {
  9769. "200": {
  9770. "description": "Workspace removed",
  9771. "content": {
  9772. "application/json": {
  9773. "schema": {
  9774. "$ref": "#/components/schemas/Workspace"
  9775. }
  9776. }
  9777. }
  9778. },
  9779. "400": {
  9780. "description": "BadRequest | InvalidRequestError",
  9781. "content": {
  9782. "application/json": {
  9783. "schema": {
  9784. "anyOf": [
  9785. {
  9786. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9787. },
  9788. {
  9789. "$ref": "#/components/schemas/InvalidRequestError"
  9790. }
  9791. ]
  9792. }
  9793. }
  9794. }
  9795. }
  9796. },
  9797. "description": "Remove an existing workspace.",
  9798. "summary": "Remove workspace",
  9799. "x-codeSamples": [
  9800. {
  9801. "lang": "js",
  9802. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9803. }
  9804. ]
  9805. }
  9806. },
  9807. "/experimental/workspace/warp": {
  9808. "post": {
  9809. "tags": ["workspace"],
  9810. "operationId": "experimental.workspace.warp",
  9811. "parameters": [
  9812. {
  9813. "name": "directory",
  9814. "in": "query",
  9815. "schema": {
  9816. "type": "string"
  9817. },
  9818. "required": false
  9819. },
  9820. {
  9821. "name": "workspace",
  9822. "in": "query",
  9823. "schema": {
  9824. "type": "string"
  9825. },
  9826. "required": false
  9827. }
  9828. ],
  9829. "responses": {
  9830. "204": {
  9831. "description": "Session warped"
  9832. },
  9833. "400": {
  9834. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9835. "content": {
  9836. "application/json": {
  9837. "schema": {
  9838. "anyOf": [
  9839. {
  9840. "$ref": "#/components/schemas/WorkspaceWarpError"
  9841. },
  9842. {
  9843. "$ref": "#/components/schemas/VcsApplyError"
  9844. },
  9845. {
  9846. "$ref": "#/components/schemas/InvalidRequestError"
  9847. }
  9848. ]
  9849. }
  9850. }
  9851. }
  9852. },
  9853. "404": {
  9854. "description": "NotFoundError",
  9855. "content": {
  9856. "application/json": {
  9857. "schema": {
  9858. "$ref": "#/components/schemas/NotFoundError"
  9859. }
  9860. }
  9861. }
  9862. }
  9863. },
  9864. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9865. "summary": "Warp session into workspace",
  9866. "requestBody": {
  9867. "content": {
  9868. "application/json": {
  9869. "schema": {
  9870. "type": "object",
  9871. "properties": {
  9872. "id": {
  9873. "anyOf": [
  9874. {
  9875. "type": "string",
  9876. "pattern": "^wrk"
  9877. },
  9878. {
  9879. "type": "null"
  9880. }
  9881. ]
  9882. },
  9883. "sessionID": {
  9884. "type": "string",
  9885. "pattern": "^ses"
  9886. },
  9887. "copyChanges": {
  9888. "type": "boolean"
  9889. }
  9890. },
  9891. "required": ["id", "sessionID"],
  9892. "additionalProperties": false
  9893. }
  9894. }
  9895. }
  9896. },
  9897. "x-codeSamples": [
  9898. {
  9899. "lang": "js",
  9900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9901. }
  9902. ]
  9903. }
  9904. },
  9905. "/api/health": {
  9906. "get": {
  9907. "tags": ["opencode HttpApi"],
  9908. "operationId": "v2.health.get",
  9909. "parameters": [],
  9910. "security": [],
  9911. "responses": {
  9912. "200": {
  9913. "description": "Success",
  9914. "content": {
  9915. "application/json": {
  9916. "schema": {
  9917. "type": "object",
  9918. "properties": {
  9919. "healthy": {
  9920. "type": "boolean",
  9921. "enum": [true]
  9922. }
  9923. },
  9924. "required": ["healthy"],
  9925. "additionalProperties": false
  9926. }
  9927. }
  9928. }
  9929. },
  9930. "400": {
  9931. "description": "InvalidRequestError",
  9932. "content": {
  9933. "application/json": {
  9934. "schema": {
  9935. "$ref": "#/components/schemas/InvalidRequestError"
  9936. }
  9937. }
  9938. }
  9939. },
  9940. "401": {
  9941. "description": "UnauthorizedError",
  9942. "content": {
  9943. "application/json": {
  9944. "schema": {
  9945. "$ref": "#/components/schemas/UnauthorizedError"
  9946. }
  9947. }
  9948. }
  9949. }
  9950. },
  9951. "description": "Check whether the API server is ready to accept requests.",
  9952. "summary": "Check server health",
  9953. "x-codeSamples": [
  9954. {
  9955. "lang": "js",
  9956. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9957. }
  9958. ]
  9959. }
  9960. },
  9961. "/api/location": {
  9962. "get": {
  9963. "tags": ["opencode HttpApi"],
  9964. "operationId": "v2.location.get",
  9965. "parameters": [
  9966. {
  9967. "name": "location",
  9968. "in": "query",
  9969. "schema": {
  9970. "type": "object",
  9971. "properties": {
  9972. "directory": {
  9973. "type": "string"
  9974. },
  9975. "workspace": {
  9976. "type": "string"
  9977. }
  9978. },
  9979. "additionalProperties": false
  9980. },
  9981. "required": false,
  9982. "style": "deepObject",
  9983. "explode": true
  9984. }
  9985. ],
  9986. "security": [],
  9987. "responses": {
  9988. "200": {
  9989. "description": "Location.Info",
  9990. "content": {
  9991. "application/json": {
  9992. "schema": {
  9993. "$ref": "#/components/schemas/LocationInfo"
  9994. }
  9995. }
  9996. }
  9997. },
  9998. "400": {
  9999. "description": "InvalidRequestError",
  10000. "content": {
  10001. "application/json": {
  10002. "schema": {
  10003. "$ref": "#/components/schemas/InvalidRequestError"
  10004. }
  10005. }
  10006. }
  10007. },
  10008. "401": {
  10009. "description": "UnauthorizedError",
  10010. "content": {
  10011. "application/json": {
  10012. "schema": {
  10013. "$ref": "#/components/schemas/UnauthorizedError"
  10014. }
  10015. }
  10016. }
  10017. }
  10018. },
  10019. "description": "Resolve the requested location or the server default location.",
  10020. "summary": "Get location",
  10021. "x-codeSamples": [
  10022. {
  10023. "lang": "js",
  10024. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  10025. }
  10026. ]
  10027. }
  10028. },
  10029. "/api/agent": {
  10030. "get": {
  10031. "tags": ["opencode HttpApi"],
  10032. "operationId": "v2.agent.list",
  10033. "parameters": [
  10034. {
  10035. "name": "location",
  10036. "in": "query",
  10037. "schema": {
  10038. "type": "object",
  10039. "properties": {
  10040. "directory": {
  10041. "type": "string"
  10042. },
  10043. "workspace": {
  10044. "type": "string"
  10045. }
  10046. },
  10047. "additionalProperties": false
  10048. },
  10049. "required": false,
  10050. "style": "deepObject",
  10051. "explode": true
  10052. }
  10053. ],
  10054. "security": [],
  10055. "responses": {
  10056. "200": {
  10057. "description": "Success",
  10058. "content": {
  10059. "application/json": {
  10060. "schema": {
  10061. "type": "object",
  10062. "properties": {
  10063. "location": {
  10064. "$ref": "#/components/schemas/LocationInfo"
  10065. },
  10066. "data": {
  10067. "type": "array",
  10068. "items": {
  10069. "$ref": "#/components/schemas/AgentV2Info"
  10070. }
  10071. }
  10072. },
  10073. "required": ["location", "data"],
  10074. "additionalProperties": false
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "400": {
  10080. "description": "InvalidRequestError",
  10081. "content": {
  10082. "application/json": {
  10083. "schema": {
  10084. "$ref": "#/components/schemas/InvalidRequestError"
  10085. }
  10086. }
  10087. }
  10088. },
  10089. "401": {
  10090. "description": "UnauthorizedError",
  10091. "content": {
  10092. "application/json": {
  10093. "schema": {
  10094. "$ref": "#/components/schemas/UnauthorizedError"
  10095. }
  10096. }
  10097. }
  10098. }
  10099. },
  10100. "description": "Retrieve currently registered agents.",
  10101. "summary": "List agents",
  10102. "x-codeSamples": [
  10103. {
  10104. "lang": "js",
  10105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10106. }
  10107. ]
  10108. }
  10109. },
  10110. "/api/session": {
  10111. "get": {
  10112. "tags": ["sessions"],
  10113. "operationId": "v2.session.list",
  10114. "parameters": [
  10115. {
  10116. "name": "workspace",
  10117. "in": "query",
  10118. "schema": {
  10119. "type": "string",
  10120. "pattern": "^wrk"
  10121. },
  10122. "required": false
  10123. },
  10124. {
  10125. "name": "limit",
  10126. "in": "query",
  10127. "schema": {
  10128. "type": "number"
  10129. },
  10130. "required": false
  10131. },
  10132. {
  10133. "name": "order",
  10134. "in": "query",
  10135. "schema": {
  10136. "type": "string",
  10137. "enum": ["asc", "desc"]
  10138. },
  10139. "required": false
  10140. },
  10141. {
  10142. "name": "search",
  10143. "in": "query",
  10144. "schema": {
  10145. "type": "string"
  10146. },
  10147. "required": false
  10148. },
  10149. {
  10150. "name": "directory",
  10151. "in": "query",
  10152. "schema": {
  10153. "type": "string"
  10154. },
  10155. "required": false
  10156. },
  10157. {
  10158. "name": "project",
  10159. "in": "query",
  10160. "schema": {
  10161. "type": "string"
  10162. },
  10163. "required": false
  10164. },
  10165. {
  10166. "name": "subpath",
  10167. "in": "query",
  10168. "schema": {
  10169. "type": "string"
  10170. },
  10171. "required": false
  10172. },
  10173. {
  10174. "name": "cursor",
  10175. "in": "query",
  10176. "schema": {
  10177. "type": "string",
  10178. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10179. },
  10180. "required": false
  10181. }
  10182. ],
  10183. "security": [],
  10184. "responses": {
  10185. "200": {
  10186. "description": "SessionsResponse",
  10187. "content": {
  10188. "application/json": {
  10189. "schema": {
  10190. "$ref": "#/components/schemas/SessionsResponse"
  10191. }
  10192. }
  10193. }
  10194. },
  10195. "400": {
  10196. "description": "InvalidCursorError | InvalidRequestError",
  10197. "content": {
  10198. "application/json": {
  10199. "schema": {
  10200. "anyOf": [
  10201. {
  10202. "$ref": "#/components/schemas/InvalidCursorError"
  10203. },
  10204. {
  10205. "$ref": "#/components/schemas/InvalidRequestError"
  10206. },
  10207. {
  10208. "$ref": "#/components/schemas/InvalidRequestError"
  10209. }
  10210. ]
  10211. }
  10212. }
  10213. }
  10214. },
  10215. "401": {
  10216. "description": "UnauthorizedError",
  10217. "content": {
  10218. "application/json": {
  10219. "schema": {
  10220. "$ref": "#/components/schemas/UnauthorizedError"
  10221. }
  10222. }
  10223. }
  10224. }
  10225. },
  10226. "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.",
  10227. "summary": "List sessions",
  10228. "x-codeSamples": [
  10229. {
  10230. "lang": "js",
  10231. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10232. }
  10233. ]
  10234. },
  10235. "post": {
  10236. "tags": ["sessions"],
  10237. "operationId": "v2.session.create",
  10238. "parameters": [],
  10239. "security": [],
  10240. "responses": {
  10241. "200": {
  10242. "description": "Success",
  10243. "content": {
  10244. "application/json": {
  10245. "schema": {
  10246. "type": "object",
  10247. "properties": {
  10248. "data": {
  10249. "$ref": "#/components/schemas/SessionV2Info"
  10250. }
  10251. },
  10252. "required": ["data"],
  10253. "additionalProperties": false
  10254. }
  10255. }
  10256. }
  10257. },
  10258. "400": {
  10259. "description": "InvalidRequestError",
  10260. "content": {
  10261. "application/json": {
  10262. "schema": {
  10263. "$ref": "#/components/schemas/InvalidRequestError"
  10264. }
  10265. }
  10266. }
  10267. },
  10268. "401": {
  10269. "description": "UnauthorizedError",
  10270. "content": {
  10271. "application/json": {
  10272. "schema": {
  10273. "$ref": "#/components/schemas/UnauthorizedError"
  10274. }
  10275. }
  10276. }
  10277. }
  10278. },
  10279. "description": "Create a session at the requested location.",
  10280. "summary": "Create session",
  10281. "requestBody": {
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "type": "object",
  10286. "properties": {
  10287. "id": {
  10288. "type": "string",
  10289. "pattern": "^ses"
  10290. },
  10291. "agent": {
  10292. "type": "string"
  10293. },
  10294. "model": {
  10295. "type": "object",
  10296. "properties": {
  10297. "id": {
  10298. "type": "string"
  10299. },
  10300. "providerID": {
  10301. "type": "string"
  10302. },
  10303. "variant": {
  10304. "type": "string"
  10305. }
  10306. },
  10307. "required": ["id", "providerID"],
  10308. "additionalProperties": false
  10309. },
  10310. "location": {
  10311. "$ref": "#/components/schemas/LocationRef"
  10312. }
  10313. },
  10314. "additionalProperties": false
  10315. }
  10316. }
  10317. },
  10318. "required": true
  10319. },
  10320. "x-codeSamples": [
  10321. {
  10322. "lang": "js",
  10323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10324. }
  10325. ]
  10326. }
  10327. },
  10328. "/api/session/{sessionID}": {
  10329. "get": {
  10330. "tags": ["sessions"],
  10331. "operationId": "v2.session.get",
  10332. "parameters": [
  10333. {
  10334. "name": "sessionID",
  10335. "in": "path",
  10336. "schema": {
  10337. "type": "string",
  10338. "pattern": "^ses"
  10339. },
  10340. "required": true
  10341. }
  10342. ],
  10343. "security": [],
  10344. "responses": {
  10345. "200": {
  10346. "description": "Success",
  10347. "content": {
  10348. "application/json": {
  10349. "schema": {
  10350. "type": "object",
  10351. "properties": {
  10352. "data": {
  10353. "$ref": "#/components/schemas/SessionV2Info"
  10354. }
  10355. },
  10356. "required": ["data"],
  10357. "additionalProperties": false
  10358. }
  10359. }
  10360. }
  10361. },
  10362. "400": {
  10363. "description": "InvalidRequestError",
  10364. "content": {
  10365. "application/json": {
  10366. "schema": {
  10367. "$ref": "#/components/schemas/InvalidRequestError"
  10368. }
  10369. }
  10370. }
  10371. },
  10372. "401": {
  10373. "description": "UnauthorizedError",
  10374. "content": {
  10375. "application/json": {
  10376. "schema": {
  10377. "$ref": "#/components/schemas/UnauthorizedError"
  10378. }
  10379. }
  10380. }
  10381. },
  10382. "404": {
  10383. "description": "SessionNotFoundError",
  10384. "content": {
  10385. "application/json": {
  10386. "schema": {
  10387. "anyOf": [
  10388. {
  10389. "$ref": "#/components/schemas/SessionNotFoundError"
  10390. },
  10391. {
  10392. "$ref": "#/components/schemas/SessionNotFoundError"
  10393. }
  10394. ]
  10395. }
  10396. }
  10397. }
  10398. }
  10399. },
  10400. "description": "Retrieve a session by ID.",
  10401. "summary": "Get session",
  10402. "x-codeSamples": [
  10403. {
  10404. "lang": "js",
  10405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10406. }
  10407. ]
  10408. }
  10409. },
  10410. "/api/session/{sessionID}/prompt": {
  10411. "post": {
  10412. "tags": ["sessions"],
  10413. "operationId": "v2.session.prompt",
  10414. "parameters": [
  10415. {
  10416. "name": "sessionID",
  10417. "in": "path",
  10418. "schema": {
  10419. "type": "string",
  10420. "pattern": "^ses"
  10421. },
  10422. "required": true
  10423. }
  10424. ],
  10425. "security": [],
  10426. "responses": {
  10427. "200": {
  10428. "description": "Success",
  10429. "content": {
  10430. "application/json": {
  10431. "schema": {
  10432. "type": "object",
  10433. "properties": {
  10434. "data": {
  10435. "$ref": "#/components/schemas/SessionInputAdmitted"
  10436. }
  10437. },
  10438. "required": ["data"],
  10439. "additionalProperties": false
  10440. }
  10441. }
  10442. }
  10443. },
  10444. "400": {
  10445. "description": "InvalidRequestError",
  10446. "content": {
  10447. "application/json": {
  10448. "schema": {
  10449. "$ref": "#/components/schemas/InvalidRequestError"
  10450. }
  10451. }
  10452. }
  10453. },
  10454. "401": {
  10455. "description": "UnauthorizedError",
  10456. "content": {
  10457. "application/json": {
  10458. "schema": {
  10459. "$ref": "#/components/schemas/UnauthorizedError"
  10460. }
  10461. }
  10462. }
  10463. },
  10464. "404": {
  10465. "description": "SessionNotFoundError",
  10466. "content": {
  10467. "application/json": {
  10468. "schema": {
  10469. "anyOf": [
  10470. {
  10471. "$ref": "#/components/schemas/SessionNotFoundError"
  10472. },
  10473. {
  10474. "$ref": "#/components/schemas/SessionNotFoundError"
  10475. }
  10476. ]
  10477. }
  10478. }
  10479. }
  10480. },
  10481. "409": {
  10482. "description": "ConflictError",
  10483. "content": {
  10484. "application/json": {
  10485. "schema": {
  10486. "$ref": "#/components/schemas/ConflictError"
  10487. }
  10488. }
  10489. }
  10490. }
  10491. },
  10492. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10493. "summary": "Send message",
  10494. "requestBody": {
  10495. "content": {
  10496. "application/json": {
  10497. "schema": {
  10498. "type": "object",
  10499. "properties": {
  10500. "id": {
  10501. "type": "string",
  10502. "pattern": "^msg_"
  10503. },
  10504. "prompt": {
  10505. "$ref": "#/components/schemas/Prompt"
  10506. },
  10507. "delivery": {
  10508. "type": "string",
  10509. "enum": ["steer", "queue"]
  10510. },
  10511. "resume": {
  10512. "type": "boolean"
  10513. }
  10514. },
  10515. "required": ["prompt"],
  10516. "additionalProperties": false
  10517. }
  10518. }
  10519. },
  10520. "required": true
  10521. },
  10522. "x-codeSamples": [
  10523. {
  10524. "lang": "js",
  10525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10526. }
  10527. ]
  10528. }
  10529. },
  10530. "/api/session/{sessionID}/compact": {
  10531. "post": {
  10532. "tags": ["sessions"],
  10533. "operationId": "v2.session.compact",
  10534. "parameters": [
  10535. {
  10536. "name": "sessionID",
  10537. "in": "path",
  10538. "schema": {
  10539. "type": "string",
  10540. "pattern": "^ses"
  10541. },
  10542. "required": true
  10543. }
  10544. ],
  10545. "security": [],
  10546. "responses": {
  10547. "204": {
  10548. "description": "<No Content>"
  10549. },
  10550. "400": {
  10551. "description": "InvalidRequestError",
  10552. "content": {
  10553. "application/json": {
  10554. "schema": {
  10555. "$ref": "#/components/schemas/InvalidRequestError"
  10556. }
  10557. }
  10558. }
  10559. },
  10560. "401": {
  10561. "description": "UnauthorizedError",
  10562. "content": {
  10563. "application/json": {
  10564. "schema": {
  10565. "$ref": "#/components/schemas/UnauthorizedError"
  10566. }
  10567. }
  10568. }
  10569. },
  10570. "404": {
  10571. "description": "SessionNotFoundError",
  10572. "content": {
  10573. "application/json": {
  10574. "schema": {
  10575. "anyOf": [
  10576. {
  10577. "$ref": "#/components/schemas/SessionNotFoundError"
  10578. },
  10579. {
  10580. "$ref": "#/components/schemas/SessionNotFoundError"
  10581. }
  10582. ]
  10583. }
  10584. }
  10585. }
  10586. },
  10587. "503": {
  10588. "description": "ServiceUnavailableError",
  10589. "content": {
  10590. "application/json": {
  10591. "schema": {
  10592. "$ref": "#/components/schemas/ServiceUnavailableError"
  10593. }
  10594. }
  10595. }
  10596. }
  10597. },
  10598. "description": "Compact a session conversation.",
  10599. "summary": "Compact session",
  10600. "x-codeSamples": [
  10601. {
  10602. "lang": "js",
  10603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10604. }
  10605. ]
  10606. }
  10607. },
  10608. "/api/session/{sessionID}/wait": {
  10609. "post": {
  10610. "tags": ["sessions"],
  10611. "operationId": "v2.session.wait",
  10612. "parameters": [
  10613. {
  10614. "name": "sessionID",
  10615. "in": "path",
  10616. "schema": {
  10617. "type": "string",
  10618. "pattern": "^ses"
  10619. },
  10620. "required": true
  10621. }
  10622. ],
  10623. "security": [],
  10624. "responses": {
  10625. "204": {
  10626. "description": "<No Content>"
  10627. },
  10628. "400": {
  10629. "description": "InvalidRequestError",
  10630. "content": {
  10631. "application/json": {
  10632. "schema": {
  10633. "$ref": "#/components/schemas/InvalidRequestError"
  10634. }
  10635. }
  10636. }
  10637. },
  10638. "401": {
  10639. "description": "UnauthorizedError",
  10640. "content": {
  10641. "application/json": {
  10642. "schema": {
  10643. "$ref": "#/components/schemas/UnauthorizedError"
  10644. }
  10645. }
  10646. }
  10647. },
  10648. "404": {
  10649. "description": "SessionNotFoundError",
  10650. "content": {
  10651. "application/json": {
  10652. "schema": {
  10653. "anyOf": [
  10654. {
  10655. "$ref": "#/components/schemas/SessionNotFoundError"
  10656. },
  10657. {
  10658. "$ref": "#/components/schemas/SessionNotFoundError"
  10659. }
  10660. ]
  10661. }
  10662. }
  10663. }
  10664. },
  10665. "503": {
  10666. "description": "ServiceUnavailableError",
  10667. "content": {
  10668. "application/json": {
  10669. "schema": {
  10670. "$ref": "#/components/schemas/ServiceUnavailableError"
  10671. }
  10672. }
  10673. }
  10674. }
  10675. },
  10676. "description": "Wait for a session agent loop to become idle.",
  10677. "summary": "Wait for session",
  10678. "x-codeSamples": [
  10679. {
  10680. "lang": "js",
  10681. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10682. }
  10683. ]
  10684. }
  10685. },
  10686. "/api/session/{sessionID}/context": {
  10687. "get": {
  10688. "tags": ["sessions"],
  10689. "operationId": "v2.session.context",
  10690. "parameters": [
  10691. {
  10692. "name": "sessionID",
  10693. "in": "path",
  10694. "schema": {
  10695. "type": "string",
  10696. "pattern": "^ses"
  10697. },
  10698. "required": true
  10699. }
  10700. ],
  10701. "security": [],
  10702. "responses": {
  10703. "200": {
  10704. "description": "Success",
  10705. "content": {
  10706. "application/json": {
  10707. "schema": {
  10708. "type": "object",
  10709. "properties": {
  10710. "data": {
  10711. "type": "array",
  10712. "items": {
  10713. "$ref": "#/components/schemas/SessionMessage"
  10714. }
  10715. }
  10716. },
  10717. "required": ["data"],
  10718. "additionalProperties": false
  10719. }
  10720. }
  10721. }
  10722. },
  10723. "400": {
  10724. "description": "InvalidRequestError",
  10725. "content": {
  10726. "application/json": {
  10727. "schema": {
  10728. "$ref": "#/components/schemas/InvalidRequestError"
  10729. }
  10730. }
  10731. }
  10732. },
  10733. "401": {
  10734. "description": "UnauthorizedError",
  10735. "content": {
  10736. "application/json": {
  10737. "schema": {
  10738. "$ref": "#/components/schemas/UnauthorizedError"
  10739. }
  10740. }
  10741. }
  10742. },
  10743. "404": {
  10744. "description": "SessionNotFoundError",
  10745. "content": {
  10746. "application/json": {
  10747. "schema": {
  10748. "anyOf": [
  10749. {
  10750. "$ref": "#/components/schemas/SessionNotFoundError"
  10751. },
  10752. {
  10753. "$ref": "#/components/schemas/SessionNotFoundError"
  10754. }
  10755. ]
  10756. }
  10757. }
  10758. }
  10759. },
  10760. "500": {
  10761. "description": "UnknownError",
  10762. "content": {
  10763. "application/json": {
  10764. "schema": {
  10765. "$ref": "#/components/schemas/UnknownError1"
  10766. }
  10767. }
  10768. }
  10769. }
  10770. },
  10771. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10772. "summary": "Get session context",
  10773. "x-codeSamples": [
  10774. {
  10775. "lang": "js",
  10776. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10777. }
  10778. ]
  10779. }
  10780. },
  10781. "/api/session/{sessionID}/message": {
  10782. "get": {
  10783. "tags": ["messages"],
  10784. "operationId": "v2.session.messages",
  10785. "parameters": [
  10786. {
  10787. "name": "sessionID",
  10788. "in": "path",
  10789. "schema": {
  10790. "type": "string",
  10791. "pattern": "^ses"
  10792. },
  10793. "required": true
  10794. },
  10795. {
  10796. "name": "limit",
  10797. "in": "query",
  10798. "schema": {
  10799. "type": "number"
  10800. },
  10801. "required": false
  10802. },
  10803. {
  10804. "name": "order",
  10805. "in": "query",
  10806. "schema": {
  10807. "type": "string",
  10808. "enum": ["asc", "desc"]
  10809. },
  10810. "required": false
  10811. },
  10812. {
  10813. "name": "cursor",
  10814. "in": "query",
  10815. "schema": {
  10816. "type": "string",
  10817. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10818. },
  10819. "required": false
  10820. }
  10821. ],
  10822. "security": [],
  10823. "responses": {
  10824. "200": {
  10825. "description": "SessionMessagesResponse",
  10826. "content": {
  10827. "application/json": {
  10828. "schema": {
  10829. "$ref": "#/components/schemas/SessionMessagesResponse"
  10830. }
  10831. }
  10832. }
  10833. },
  10834. "400": {
  10835. "description": "InvalidCursorError | InvalidRequestError",
  10836. "content": {
  10837. "application/json": {
  10838. "schema": {
  10839. "anyOf": [
  10840. {
  10841. "$ref": "#/components/schemas/InvalidCursorError"
  10842. },
  10843. {
  10844. "$ref": "#/components/schemas/InvalidRequestError"
  10845. }
  10846. ]
  10847. }
  10848. }
  10849. }
  10850. },
  10851. "401": {
  10852. "description": "UnauthorizedError",
  10853. "content": {
  10854. "application/json": {
  10855. "schema": {
  10856. "$ref": "#/components/schemas/UnauthorizedError"
  10857. }
  10858. }
  10859. }
  10860. },
  10861. "404": {
  10862. "description": "SessionNotFoundError",
  10863. "content": {
  10864. "application/json": {
  10865. "schema": {
  10866. "anyOf": [
  10867. {
  10868. "$ref": "#/components/schemas/SessionNotFoundError"
  10869. },
  10870. {
  10871. "$ref": "#/components/schemas/SessionNotFoundError"
  10872. }
  10873. ]
  10874. }
  10875. }
  10876. }
  10877. },
  10878. "500": {
  10879. "description": "UnknownError",
  10880. "content": {
  10881. "application/json": {
  10882. "schema": {
  10883. "$ref": "#/components/schemas/UnknownError1"
  10884. }
  10885. }
  10886. }
  10887. }
  10888. },
  10889. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10890. "summary": "Get session messages",
  10891. "x-codeSamples": [
  10892. {
  10893. "lang": "js",
  10894. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10895. }
  10896. ]
  10897. }
  10898. },
  10899. "/api/model": {
  10900. "get": {
  10901. "tags": ["models"],
  10902. "operationId": "v2.model.list",
  10903. "parameters": [
  10904. {
  10905. "name": "location",
  10906. "in": "query",
  10907. "schema": {
  10908. "type": "object",
  10909. "properties": {
  10910. "directory": {
  10911. "type": "string"
  10912. },
  10913. "workspace": {
  10914. "type": "string"
  10915. }
  10916. },
  10917. "additionalProperties": false
  10918. },
  10919. "required": false,
  10920. "style": "deepObject",
  10921. "explode": true
  10922. }
  10923. ],
  10924. "security": [],
  10925. "responses": {
  10926. "200": {
  10927. "description": "Success",
  10928. "content": {
  10929. "application/json": {
  10930. "schema": {
  10931. "type": "object",
  10932. "properties": {
  10933. "location": {
  10934. "$ref": "#/components/schemas/LocationInfo"
  10935. },
  10936. "data": {
  10937. "type": "array",
  10938. "items": {
  10939. "$ref": "#/components/schemas/ModelV2Info"
  10940. }
  10941. }
  10942. },
  10943. "required": ["location", "data"],
  10944. "additionalProperties": false
  10945. }
  10946. }
  10947. }
  10948. },
  10949. "400": {
  10950. "description": "InvalidRequestError",
  10951. "content": {
  10952. "application/json": {
  10953. "schema": {
  10954. "$ref": "#/components/schemas/InvalidRequestError"
  10955. }
  10956. }
  10957. }
  10958. },
  10959. "401": {
  10960. "description": "UnauthorizedError",
  10961. "content": {
  10962. "application/json": {
  10963. "schema": {
  10964. "$ref": "#/components/schemas/UnauthorizedError"
  10965. }
  10966. }
  10967. }
  10968. },
  10969. "503": {
  10970. "description": "ServiceUnavailableError",
  10971. "content": {
  10972. "application/json": {
  10973. "schema": {
  10974. "$ref": "#/components/schemas/ServiceUnavailableError"
  10975. }
  10976. }
  10977. }
  10978. }
  10979. },
  10980. "description": "Retrieve available models ordered by release date.",
  10981. "summary": "List models",
  10982. "x-codeSamples": [
  10983. {
  10984. "lang": "js",
  10985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10986. }
  10987. ]
  10988. }
  10989. },
  10990. "/api/provider": {
  10991. "get": {
  10992. "tags": ["providers"],
  10993. "operationId": "v2.provider.list",
  10994. "parameters": [
  10995. {
  10996. "name": "location",
  10997. "in": "query",
  10998. "schema": {
  10999. "type": "object",
  11000. "properties": {
  11001. "directory": {
  11002. "type": "string"
  11003. },
  11004. "workspace": {
  11005. "type": "string"
  11006. }
  11007. },
  11008. "additionalProperties": false
  11009. },
  11010. "required": false,
  11011. "style": "deepObject",
  11012. "explode": true
  11013. }
  11014. ],
  11015. "security": [],
  11016. "responses": {
  11017. "200": {
  11018. "description": "Success",
  11019. "content": {
  11020. "application/json": {
  11021. "schema": {
  11022. "type": "object",
  11023. "properties": {
  11024. "location": {
  11025. "$ref": "#/components/schemas/LocationInfo"
  11026. },
  11027. "data": {
  11028. "type": "array",
  11029. "items": {
  11030. "$ref": "#/components/schemas/ProviderV2Info"
  11031. }
  11032. }
  11033. },
  11034. "required": ["location", "data"],
  11035. "additionalProperties": false
  11036. }
  11037. }
  11038. }
  11039. },
  11040. "400": {
  11041. "description": "InvalidRequestError",
  11042. "content": {
  11043. "application/json": {
  11044. "schema": {
  11045. "$ref": "#/components/schemas/InvalidRequestError"
  11046. }
  11047. }
  11048. }
  11049. },
  11050. "401": {
  11051. "description": "UnauthorizedError",
  11052. "content": {
  11053. "application/json": {
  11054. "schema": {
  11055. "$ref": "#/components/schemas/UnauthorizedError"
  11056. }
  11057. }
  11058. }
  11059. },
  11060. "503": {
  11061. "description": "ServiceUnavailableError",
  11062. "content": {
  11063. "application/json": {
  11064. "schema": {
  11065. "$ref": "#/components/schemas/ServiceUnavailableError"
  11066. }
  11067. }
  11068. }
  11069. }
  11070. },
  11071. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11072. "summary": "List providers",
  11073. "x-codeSamples": [
  11074. {
  11075. "lang": "js",
  11076. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11077. }
  11078. ]
  11079. }
  11080. },
  11081. "/api/provider/{providerID}": {
  11082. "get": {
  11083. "tags": ["providers"],
  11084. "operationId": "v2.provider.get",
  11085. "parameters": [
  11086. {
  11087. "name": "providerID",
  11088. "in": "path",
  11089. "schema": {
  11090. "type": "string"
  11091. },
  11092. "required": true
  11093. },
  11094. {
  11095. "name": "location",
  11096. "in": "query",
  11097. "schema": {
  11098. "type": "object",
  11099. "properties": {
  11100. "directory": {
  11101. "type": "string"
  11102. },
  11103. "workspace": {
  11104. "type": "string"
  11105. }
  11106. },
  11107. "additionalProperties": false
  11108. },
  11109. "required": false,
  11110. "style": "deepObject",
  11111. "explode": true
  11112. }
  11113. ],
  11114. "security": [],
  11115. "responses": {
  11116. "200": {
  11117. "description": "Success",
  11118. "content": {
  11119. "application/json": {
  11120. "schema": {
  11121. "type": "object",
  11122. "properties": {
  11123. "location": {
  11124. "$ref": "#/components/schemas/LocationInfo"
  11125. },
  11126. "data": {
  11127. "$ref": "#/components/schemas/ProviderV2Info"
  11128. }
  11129. },
  11130. "required": ["location", "data"],
  11131. "additionalProperties": false
  11132. }
  11133. }
  11134. }
  11135. },
  11136. "400": {
  11137. "description": "InvalidRequestError",
  11138. "content": {
  11139. "application/json": {
  11140. "schema": {
  11141. "$ref": "#/components/schemas/InvalidRequestError"
  11142. }
  11143. }
  11144. }
  11145. },
  11146. "401": {
  11147. "description": "UnauthorizedError",
  11148. "content": {
  11149. "application/json": {
  11150. "schema": {
  11151. "$ref": "#/components/schemas/UnauthorizedError"
  11152. }
  11153. }
  11154. }
  11155. },
  11156. "404": {
  11157. "description": "ProviderNotFoundError",
  11158. "content": {
  11159. "application/json": {
  11160. "schema": {
  11161. "$ref": "#/components/schemas/ProviderNotFoundError"
  11162. }
  11163. }
  11164. }
  11165. },
  11166. "503": {
  11167. "description": "ServiceUnavailableError",
  11168. "content": {
  11169. "application/json": {
  11170. "schema": {
  11171. "$ref": "#/components/schemas/ServiceUnavailableError"
  11172. }
  11173. }
  11174. }
  11175. }
  11176. },
  11177. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11178. "summary": "Get provider",
  11179. "x-codeSamples": [
  11180. {
  11181. "lang": "js",
  11182. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11183. }
  11184. ]
  11185. }
  11186. },
  11187. "/api/permission/request": {
  11188. "get": {
  11189. "tags": ["permissions"],
  11190. "operationId": "v2.permission.request.list",
  11191. "parameters": [
  11192. {
  11193. "name": "location",
  11194. "in": "query",
  11195. "schema": {
  11196. "type": "object",
  11197. "properties": {
  11198. "directory": {
  11199. "type": "string"
  11200. },
  11201. "workspace": {
  11202. "type": "string"
  11203. }
  11204. },
  11205. "additionalProperties": false
  11206. },
  11207. "required": false,
  11208. "style": "deepObject",
  11209. "explode": true
  11210. }
  11211. ],
  11212. "security": [],
  11213. "responses": {
  11214. "200": {
  11215. "description": "Success",
  11216. "content": {
  11217. "application/json": {
  11218. "schema": {
  11219. "type": "object",
  11220. "properties": {
  11221. "location": {
  11222. "$ref": "#/components/schemas/LocationInfo"
  11223. },
  11224. "data": {
  11225. "type": "array",
  11226. "items": {
  11227. "$ref": "#/components/schemas/PermissionV2Request"
  11228. }
  11229. }
  11230. },
  11231. "required": ["location", "data"],
  11232. "additionalProperties": false
  11233. }
  11234. }
  11235. }
  11236. },
  11237. "400": {
  11238. "description": "InvalidRequestError",
  11239. "content": {
  11240. "application/json": {
  11241. "schema": {
  11242. "$ref": "#/components/schemas/InvalidRequestError"
  11243. }
  11244. }
  11245. }
  11246. },
  11247. "401": {
  11248. "description": "UnauthorizedError",
  11249. "content": {
  11250. "application/json": {
  11251. "schema": {
  11252. "$ref": "#/components/schemas/UnauthorizedError"
  11253. }
  11254. }
  11255. }
  11256. }
  11257. },
  11258. "description": "Retrieve pending permission requests for a location.",
  11259. "summary": "List pending permission requests",
  11260. "x-codeSamples": [
  11261. {
  11262. "lang": "js",
  11263. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  11264. }
  11265. ]
  11266. }
  11267. },
  11268. "/api/permission/saved": {
  11269. "get": {
  11270. "tags": ["permissions"],
  11271. "operationId": "v2.permission.saved.list",
  11272. "parameters": [
  11273. {
  11274. "name": "projectID",
  11275. "in": "query",
  11276. "schema": {
  11277. "type": "string"
  11278. },
  11279. "required": false
  11280. }
  11281. ],
  11282. "security": [],
  11283. "responses": {
  11284. "200": {
  11285. "description": "Success",
  11286. "content": {
  11287. "application/json": {
  11288. "schema": {
  11289. "type": "object",
  11290. "properties": {
  11291. "data": {
  11292. "type": "array",
  11293. "items": {
  11294. "$ref": "#/components/schemas/PermissionSavedInfo"
  11295. }
  11296. }
  11297. },
  11298. "required": ["data"],
  11299. "additionalProperties": false
  11300. }
  11301. }
  11302. }
  11303. },
  11304. "400": {
  11305. "description": "InvalidRequestError",
  11306. "content": {
  11307. "application/json": {
  11308. "schema": {
  11309. "$ref": "#/components/schemas/InvalidRequestError"
  11310. }
  11311. }
  11312. }
  11313. },
  11314. "401": {
  11315. "description": "UnauthorizedError",
  11316. "content": {
  11317. "application/json": {
  11318. "schema": {
  11319. "$ref": "#/components/schemas/UnauthorizedError"
  11320. }
  11321. }
  11322. }
  11323. }
  11324. },
  11325. "description": "Retrieve saved permissions, optionally filtered by project.",
  11326. "summary": "List saved permissions",
  11327. "x-codeSamples": [
  11328. {
  11329. "lang": "js",
  11330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  11331. }
  11332. ]
  11333. }
  11334. },
  11335. "/api/permission/saved/{id}": {
  11336. "delete": {
  11337. "tags": ["permissions"],
  11338. "operationId": "v2.permission.saved.remove",
  11339. "parameters": [
  11340. {
  11341. "name": "id",
  11342. "in": "path",
  11343. "schema": {
  11344. "type": "string"
  11345. },
  11346. "required": true
  11347. }
  11348. ],
  11349. "security": [],
  11350. "responses": {
  11351. "204": {
  11352. "description": "<No Content>"
  11353. },
  11354. "400": {
  11355. "description": "InvalidRequestError",
  11356. "content": {
  11357. "application/json": {
  11358. "schema": {
  11359. "$ref": "#/components/schemas/InvalidRequestError"
  11360. }
  11361. }
  11362. }
  11363. },
  11364. "401": {
  11365. "description": "UnauthorizedError",
  11366. "content": {
  11367. "application/json": {
  11368. "schema": {
  11369. "$ref": "#/components/schemas/UnauthorizedError"
  11370. }
  11371. }
  11372. }
  11373. }
  11374. },
  11375. "description": "Remove a saved permission by ID.",
  11376. "summary": "Remove saved permission",
  11377. "x-codeSamples": [
  11378. {
  11379. "lang": "js",
  11380. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  11381. }
  11382. ]
  11383. }
  11384. },
  11385. "/api/session/{sessionID}/permission": {
  11386. "get": {
  11387. "tags": ["permissions"],
  11388. "operationId": "v2.session.permission.list",
  11389. "parameters": [
  11390. {
  11391. "name": "sessionID",
  11392. "in": "path",
  11393. "schema": {
  11394. "type": "string",
  11395. "pattern": "^ses"
  11396. },
  11397. "required": true
  11398. }
  11399. ],
  11400. "security": [],
  11401. "responses": {
  11402. "200": {
  11403. "description": "Success",
  11404. "content": {
  11405. "application/json": {
  11406. "schema": {
  11407. "type": "object",
  11408. "properties": {
  11409. "data": {
  11410. "type": "array",
  11411. "items": {
  11412. "$ref": "#/components/schemas/PermissionV2Request"
  11413. }
  11414. }
  11415. },
  11416. "required": ["data"],
  11417. "additionalProperties": false
  11418. }
  11419. }
  11420. }
  11421. },
  11422. "400": {
  11423. "description": "InvalidRequestError",
  11424. "content": {
  11425. "application/json": {
  11426. "schema": {
  11427. "$ref": "#/components/schemas/InvalidRequestError"
  11428. }
  11429. }
  11430. }
  11431. },
  11432. "401": {
  11433. "description": "UnauthorizedError",
  11434. "content": {
  11435. "application/json": {
  11436. "schema": {
  11437. "$ref": "#/components/schemas/UnauthorizedError"
  11438. }
  11439. }
  11440. }
  11441. },
  11442. "404": {
  11443. "description": "SessionNotFoundError",
  11444. "content": {
  11445. "application/json": {
  11446. "schema": {
  11447. "anyOf": [
  11448. {
  11449. "$ref": "#/components/schemas/SessionNotFoundError"
  11450. },
  11451. {
  11452. "$ref": "#/components/schemas/SessionNotFoundError"
  11453. }
  11454. ]
  11455. }
  11456. }
  11457. }
  11458. }
  11459. },
  11460. "description": "Retrieve pending permission requests owned by a session.",
  11461. "summary": "List session permission requests",
  11462. "x-codeSamples": [
  11463. {
  11464. "lang": "js",
  11465. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  11466. }
  11467. ]
  11468. }
  11469. },
  11470. "/api/session/{sessionID}/permission/{requestID}/reply": {
  11471. "post": {
  11472. "tags": ["permissions"],
  11473. "operationId": "v2.session.permission.reply",
  11474. "parameters": [
  11475. {
  11476. "name": "sessionID",
  11477. "in": "path",
  11478. "schema": {
  11479. "type": "string",
  11480. "pattern": "^ses"
  11481. },
  11482. "required": true
  11483. },
  11484. {
  11485. "name": "requestID",
  11486. "in": "path",
  11487. "schema": {
  11488. "type": "string",
  11489. "pattern": "^per"
  11490. },
  11491. "required": true
  11492. }
  11493. ],
  11494. "security": [],
  11495. "responses": {
  11496. "204": {
  11497. "description": "<No Content>"
  11498. },
  11499. "400": {
  11500. "description": "InvalidRequestError",
  11501. "content": {
  11502. "application/json": {
  11503. "schema": {
  11504. "$ref": "#/components/schemas/InvalidRequestError"
  11505. }
  11506. }
  11507. }
  11508. },
  11509. "401": {
  11510. "description": "UnauthorizedError",
  11511. "content": {
  11512. "application/json": {
  11513. "schema": {
  11514. "$ref": "#/components/schemas/UnauthorizedError"
  11515. }
  11516. }
  11517. }
  11518. },
  11519. "404": {
  11520. "description": "SessionNotFoundError | PermissionNotFoundError",
  11521. "content": {
  11522. "application/json": {
  11523. "schema": {
  11524. "anyOf": [
  11525. {
  11526. "$ref": "#/components/schemas/PermissionNotFoundError"
  11527. },
  11528. {
  11529. "$ref": "#/components/schemas/SessionNotFoundError"
  11530. },
  11531. {
  11532. "$ref": "#/components/schemas/SessionNotFoundError"
  11533. }
  11534. ]
  11535. }
  11536. }
  11537. }
  11538. }
  11539. },
  11540. "description": "Respond to a pending permission request owned by a session.",
  11541. "summary": "Reply to pending permission request",
  11542. "requestBody": {
  11543. "content": {
  11544. "application/json": {
  11545. "schema": {
  11546. "type": "object",
  11547. "properties": {
  11548. "reply": {
  11549. "$ref": "#/components/schemas/PermissionV2Reply"
  11550. },
  11551. "message": {
  11552. "type": "string"
  11553. }
  11554. },
  11555. "required": ["reply"],
  11556. "additionalProperties": false
  11557. }
  11558. }
  11559. },
  11560. "required": true
  11561. },
  11562. "x-codeSamples": [
  11563. {
  11564. "lang": "js",
  11565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  11566. }
  11567. ]
  11568. }
  11569. },
  11570. "/api/fs/read": {
  11571. "get": {
  11572. "tags": ["filesystem"],
  11573. "operationId": "v2.fs.read",
  11574. "parameters": [
  11575. {
  11576. "name": "location",
  11577. "in": "query",
  11578. "schema": {
  11579. "type": "object",
  11580. "properties": {
  11581. "directory": {
  11582. "type": "string"
  11583. },
  11584. "workspace": {
  11585. "type": "string"
  11586. }
  11587. },
  11588. "additionalProperties": false
  11589. },
  11590. "required": false,
  11591. "style": "deepObject",
  11592. "explode": true
  11593. },
  11594. {
  11595. "name": "path",
  11596. "in": "query",
  11597. "schema": {
  11598. "type": "string"
  11599. },
  11600. "required": true
  11601. }
  11602. ],
  11603. "security": [],
  11604. "responses": {
  11605. "200": {
  11606. "description": "Success",
  11607. "content": {
  11608. "application/json": {
  11609. "schema": {
  11610. "type": "object",
  11611. "properties": {
  11612. "location": {
  11613. "$ref": "#/components/schemas/LocationInfo"
  11614. },
  11615. "data": {
  11616. "$ref": "#/components/schemas/FileSystemContent"
  11617. }
  11618. },
  11619. "required": ["location", "data"],
  11620. "additionalProperties": false
  11621. }
  11622. }
  11623. }
  11624. },
  11625. "400": {
  11626. "description": "InvalidRequestError",
  11627. "content": {
  11628. "application/json": {
  11629. "schema": {
  11630. "$ref": "#/components/schemas/InvalidRequestError"
  11631. }
  11632. }
  11633. }
  11634. },
  11635. "401": {
  11636. "description": "UnauthorizedError",
  11637. "content": {
  11638. "application/json": {
  11639. "schema": {
  11640. "$ref": "#/components/schemas/UnauthorizedError"
  11641. }
  11642. }
  11643. }
  11644. }
  11645. },
  11646. "description": "Read one file relative to the requested location.",
  11647. "summary": "Read file",
  11648. "x-codeSamples": [
  11649. {
  11650. "lang": "js",
  11651. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  11652. }
  11653. ]
  11654. }
  11655. },
  11656. "/api/fs/list": {
  11657. "get": {
  11658. "tags": ["filesystem"],
  11659. "operationId": "v2.fs.list",
  11660. "parameters": [
  11661. {
  11662. "name": "location",
  11663. "in": "query",
  11664. "schema": {
  11665. "type": "object",
  11666. "properties": {
  11667. "directory": {
  11668. "type": "string"
  11669. },
  11670. "workspace": {
  11671. "type": "string"
  11672. }
  11673. },
  11674. "additionalProperties": false
  11675. },
  11676. "required": false,
  11677. "style": "deepObject",
  11678. "explode": true
  11679. },
  11680. {
  11681. "name": "path",
  11682. "in": "query",
  11683. "schema": {
  11684. "type": "string"
  11685. },
  11686. "required": false
  11687. }
  11688. ],
  11689. "security": [],
  11690. "responses": {
  11691. "200": {
  11692. "description": "Success",
  11693. "content": {
  11694. "application/json": {
  11695. "schema": {
  11696. "type": "object",
  11697. "properties": {
  11698. "location": {
  11699. "$ref": "#/components/schemas/LocationInfo"
  11700. },
  11701. "data": {
  11702. "type": "array",
  11703. "items": {
  11704. "$ref": "#/components/schemas/FileSystemEntry"
  11705. }
  11706. }
  11707. },
  11708. "required": ["location", "data"],
  11709. "additionalProperties": false
  11710. }
  11711. }
  11712. }
  11713. },
  11714. "400": {
  11715. "description": "InvalidRequestError",
  11716. "content": {
  11717. "application/json": {
  11718. "schema": {
  11719. "$ref": "#/components/schemas/InvalidRequestError"
  11720. }
  11721. }
  11722. }
  11723. },
  11724. "401": {
  11725. "description": "UnauthorizedError",
  11726. "content": {
  11727. "application/json": {
  11728. "schema": {
  11729. "$ref": "#/components/schemas/UnauthorizedError"
  11730. }
  11731. }
  11732. }
  11733. }
  11734. },
  11735. "description": "List direct children of one directory relative to the requested location.",
  11736. "summary": "List directory",
  11737. "x-codeSamples": [
  11738. {
  11739. "lang": "js",
  11740. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  11741. }
  11742. ]
  11743. }
  11744. },
  11745. "/api/fs/find": {
  11746. "get": {
  11747. "tags": ["filesystem"],
  11748. "operationId": "v2.fs.find",
  11749. "parameters": [
  11750. {
  11751. "name": "location",
  11752. "in": "query",
  11753. "schema": {
  11754. "type": "object",
  11755. "properties": {
  11756. "directory": {
  11757. "type": "string"
  11758. },
  11759. "workspace": {
  11760. "type": "string"
  11761. }
  11762. },
  11763. "additionalProperties": false
  11764. },
  11765. "required": false,
  11766. "style": "deepObject",
  11767. "explode": true
  11768. },
  11769. {
  11770. "name": "query",
  11771. "in": "query",
  11772. "schema": {
  11773. "type": "string"
  11774. },
  11775. "required": true
  11776. },
  11777. {
  11778. "name": "type",
  11779. "in": "query",
  11780. "schema": {
  11781. "type": "string",
  11782. "enum": ["file", "directory"]
  11783. },
  11784. "required": false
  11785. },
  11786. {
  11787. "name": "limit",
  11788. "in": "query",
  11789. "schema": {
  11790. "type": "string"
  11791. },
  11792. "required": false
  11793. }
  11794. ],
  11795. "security": [],
  11796. "responses": {
  11797. "200": {
  11798. "description": "Success",
  11799. "content": {
  11800. "application/json": {
  11801. "schema": {
  11802. "type": "object",
  11803. "properties": {
  11804. "location": {
  11805. "$ref": "#/components/schemas/LocationInfo"
  11806. },
  11807. "data": {
  11808. "type": "array",
  11809. "items": {
  11810. "$ref": "#/components/schemas/FileSystemEntry"
  11811. }
  11812. }
  11813. },
  11814. "required": ["location", "data"],
  11815. "additionalProperties": false
  11816. }
  11817. }
  11818. }
  11819. },
  11820. "400": {
  11821. "description": "InvalidRequestError",
  11822. "content": {
  11823. "application/json": {
  11824. "schema": {
  11825. "$ref": "#/components/schemas/InvalidRequestError"
  11826. }
  11827. }
  11828. }
  11829. },
  11830. "401": {
  11831. "description": "UnauthorizedError",
  11832. "content": {
  11833. "application/json": {
  11834. "schema": {
  11835. "$ref": "#/components/schemas/UnauthorizedError"
  11836. }
  11837. }
  11838. }
  11839. }
  11840. },
  11841. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  11842. "summary": "Find files",
  11843. "x-codeSamples": [
  11844. {
  11845. "lang": "js",
  11846. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  11847. }
  11848. ]
  11849. }
  11850. },
  11851. "/api/command": {
  11852. "get": {
  11853. "tags": ["commands"],
  11854. "operationId": "v2.command.list",
  11855. "parameters": [
  11856. {
  11857. "name": "location",
  11858. "in": "query",
  11859. "schema": {
  11860. "type": "object",
  11861. "properties": {
  11862. "directory": {
  11863. "type": "string"
  11864. },
  11865. "workspace": {
  11866. "type": "string"
  11867. }
  11868. },
  11869. "additionalProperties": false
  11870. },
  11871. "required": false,
  11872. "style": "deepObject",
  11873. "explode": true
  11874. }
  11875. ],
  11876. "security": [],
  11877. "responses": {
  11878. "200": {
  11879. "description": "Success",
  11880. "content": {
  11881. "application/json": {
  11882. "schema": {
  11883. "type": "object",
  11884. "properties": {
  11885. "location": {
  11886. "$ref": "#/components/schemas/LocationInfo"
  11887. },
  11888. "data": {
  11889. "type": "array",
  11890. "items": {
  11891. "$ref": "#/components/schemas/CommandV2Info"
  11892. }
  11893. }
  11894. },
  11895. "required": ["location", "data"],
  11896. "additionalProperties": false
  11897. }
  11898. }
  11899. }
  11900. },
  11901. "400": {
  11902. "description": "InvalidRequestError",
  11903. "content": {
  11904. "application/json": {
  11905. "schema": {
  11906. "$ref": "#/components/schemas/InvalidRequestError"
  11907. }
  11908. }
  11909. }
  11910. },
  11911. "401": {
  11912. "description": "UnauthorizedError",
  11913. "content": {
  11914. "application/json": {
  11915. "schema": {
  11916. "$ref": "#/components/schemas/UnauthorizedError"
  11917. }
  11918. }
  11919. }
  11920. }
  11921. },
  11922. "description": "Retrieve currently registered commands.",
  11923. "summary": "List commands",
  11924. "x-codeSamples": [
  11925. {
  11926. "lang": "js",
  11927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  11928. }
  11929. ]
  11930. }
  11931. },
  11932. "/api/skill": {
  11933. "get": {
  11934. "tags": ["skills"],
  11935. "operationId": "v2.skill.list",
  11936. "parameters": [
  11937. {
  11938. "name": "location",
  11939. "in": "query",
  11940. "schema": {
  11941. "type": "object",
  11942. "properties": {
  11943. "directory": {
  11944. "type": "string"
  11945. },
  11946. "workspace": {
  11947. "type": "string"
  11948. }
  11949. },
  11950. "additionalProperties": false
  11951. },
  11952. "required": false,
  11953. "style": "deepObject",
  11954. "explode": true
  11955. }
  11956. ],
  11957. "security": [],
  11958. "responses": {
  11959. "200": {
  11960. "description": "Success",
  11961. "content": {
  11962. "application/json": {
  11963. "schema": {
  11964. "type": "object",
  11965. "properties": {
  11966. "location": {
  11967. "$ref": "#/components/schemas/LocationInfo"
  11968. },
  11969. "data": {
  11970. "type": "array",
  11971. "items": {
  11972. "$ref": "#/components/schemas/SkillV2Info"
  11973. }
  11974. }
  11975. },
  11976. "required": ["location", "data"],
  11977. "additionalProperties": false
  11978. }
  11979. }
  11980. }
  11981. },
  11982. "400": {
  11983. "description": "InvalidRequestError",
  11984. "content": {
  11985. "application/json": {
  11986. "schema": {
  11987. "$ref": "#/components/schemas/InvalidRequestError"
  11988. }
  11989. }
  11990. }
  11991. },
  11992. "401": {
  11993. "description": "UnauthorizedError",
  11994. "content": {
  11995. "application/json": {
  11996. "schema": {
  11997. "$ref": "#/components/schemas/UnauthorizedError"
  11998. }
  11999. }
  12000. }
  12001. }
  12002. },
  12003. "description": "Retrieve currently registered skills.",
  12004. "summary": "List skills",
  12005. "x-codeSamples": [
  12006. {
  12007. "lang": "js",
  12008. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  12009. }
  12010. ]
  12011. }
  12012. },
  12013. "/api/event": {
  12014. "get": {
  12015. "tags": ["events"],
  12016. "operationId": "v2.event.subscribe",
  12017. "parameters": [
  12018. {
  12019. "name": "location",
  12020. "in": "query",
  12021. "schema": {
  12022. "type": "object",
  12023. "properties": {
  12024. "directory": {
  12025. "type": "string"
  12026. },
  12027. "workspace": {
  12028. "type": "string"
  12029. }
  12030. },
  12031. "additionalProperties": false
  12032. },
  12033. "required": false,
  12034. "style": "deepObject",
  12035. "explode": true
  12036. }
  12037. ],
  12038. "security": [],
  12039. "responses": {
  12040. "200": {
  12041. "description": "Success",
  12042. "content": {
  12043. "text/event-stream": {
  12044. "schema": {
  12045. "type": "string"
  12046. }
  12047. }
  12048. }
  12049. },
  12050. "400": {
  12051. "description": "InvalidRequestError",
  12052. "content": {
  12053. "application/json": {
  12054. "schema": {
  12055. "$ref": "#/components/schemas/InvalidRequestError"
  12056. }
  12057. }
  12058. }
  12059. },
  12060. "401": {
  12061. "description": "UnauthorizedError",
  12062. "content": {
  12063. "application/json": {
  12064. "schema": {
  12065. "$ref": "#/components/schemas/UnauthorizedError"
  12066. }
  12067. }
  12068. }
  12069. }
  12070. },
  12071. "description": "Subscribe to native event payloads for a location.",
  12072. "summary": "Subscribe to events",
  12073. "x-codeSamples": [
  12074. {
  12075. "lang": "js",
  12076. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  12077. }
  12078. ]
  12079. }
  12080. },
  12081. "/api/question/request": {
  12082. "get": {
  12083. "tags": ["session questions"],
  12084. "operationId": "v2.question.request.list",
  12085. "parameters": [
  12086. {
  12087. "name": "location",
  12088. "in": "query",
  12089. "schema": {
  12090. "type": "object",
  12091. "properties": {
  12092. "directory": {
  12093. "type": "string"
  12094. },
  12095. "workspace": {
  12096. "type": "string"
  12097. }
  12098. },
  12099. "additionalProperties": false
  12100. },
  12101. "required": false,
  12102. "style": "deepObject",
  12103. "explode": true
  12104. }
  12105. ],
  12106. "security": [],
  12107. "responses": {
  12108. "200": {
  12109. "description": "Success",
  12110. "content": {
  12111. "application/json": {
  12112. "schema": {
  12113. "type": "object",
  12114. "properties": {
  12115. "location": {
  12116. "$ref": "#/components/schemas/LocationInfo"
  12117. },
  12118. "data": {
  12119. "type": "array",
  12120. "items": {
  12121. "$ref": "#/components/schemas/QuestionV2Request"
  12122. }
  12123. }
  12124. },
  12125. "required": ["location", "data"],
  12126. "additionalProperties": false
  12127. }
  12128. }
  12129. }
  12130. },
  12131. "400": {
  12132. "description": "InvalidRequestError",
  12133. "content": {
  12134. "application/json": {
  12135. "schema": {
  12136. "$ref": "#/components/schemas/InvalidRequestError"
  12137. }
  12138. }
  12139. }
  12140. },
  12141. "401": {
  12142. "description": "UnauthorizedError",
  12143. "content": {
  12144. "application/json": {
  12145. "schema": {
  12146. "$ref": "#/components/schemas/UnauthorizedError"
  12147. }
  12148. }
  12149. }
  12150. }
  12151. },
  12152. "description": "Retrieve pending question requests for a location.",
  12153. "summary": "List pending question requests",
  12154. "x-codeSamples": [
  12155. {
  12156. "lang": "js",
  12157. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  12158. }
  12159. ]
  12160. }
  12161. },
  12162. "/api/session/{sessionID}/question": {
  12163. "get": {
  12164. "tags": ["session questions"],
  12165. "operationId": "v2.session.question.list",
  12166. "parameters": [
  12167. {
  12168. "name": "sessionID",
  12169. "in": "path",
  12170. "schema": {
  12171. "type": "string",
  12172. "pattern": "^ses"
  12173. },
  12174. "required": true
  12175. }
  12176. ],
  12177. "security": [],
  12178. "responses": {
  12179. "200": {
  12180. "description": "Success",
  12181. "content": {
  12182. "application/json": {
  12183. "schema": {
  12184. "type": "object",
  12185. "properties": {
  12186. "data": {
  12187. "type": "array",
  12188. "items": {
  12189. "$ref": "#/components/schemas/QuestionV2Request"
  12190. }
  12191. }
  12192. },
  12193. "required": ["data"],
  12194. "additionalProperties": false
  12195. }
  12196. }
  12197. }
  12198. },
  12199. "400": {
  12200. "description": "InvalidRequestError",
  12201. "content": {
  12202. "application/json": {
  12203. "schema": {
  12204. "$ref": "#/components/schemas/InvalidRequestError"
  12205. }
  12206. }
  12207. }
  12208. },
  12209. "401": {
  12210. "description": "UnauthorizedError",
  12211. "content": {
  12212. "application/json": {
  12213. "schema": {
  12214. "$ref": "#/components/schemas/UnauthorizedError"
  12215. }
  12216. }
  12217. }
  12218. },
  12219. "404": {
  12220. "description": "SessionNotFoundError",
  12221. "content": {
  12222. "application/json": {
  12223. "schema": {
  12224. "anyOf": [
  12225. {
  12226. "$ref": "#/components/schemas/SessionNotFoundError"
  12227. },
  12228. {
  12229. "$ref": "#/components/schemas/SessionNotFoundError"
  12230. }
  12231. ]
  12232. }
  12233. }
  12234. }
  12235. }
  12236. },
  12237. "description": "Retrieve pending question requests owned by a session.",
  12238. "summary": "List session question requests",
  12239. "x-codeSamples": [
  12240. {
  12241. "lang": "js",
  12242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  12243. }
  12244. ]
  12245. }
  12246. },
  12247. "/api/session/{sessionID}/question/{requestID}/reply": {
  12248. "post": {
  12249. "tags": ["session questions"],
  12250. "operationId": "v2.session.question.reply",
  12251. "parameters": [
  12252. {
  12253. "name": "sessionID",
  12254. "in": "path",
  12255. "schema": {
  12256. "type": "string",
  12257. "pattern": "^ses"
  12258. },
  12259. "required": true
  12260. },
  12261. {
  12262. "name": "requestID",
  12263. "in": "path",
  12264. "schema": {
  12265. "type": "string",
  12266. "pattern": "^que"
  12267. },
  12268. "required": true
  12269. }
  12270. ],
  12271. "security": [],
  12272. "responses": {
  12273. "204": {
  12274. "description": "<No Content>"
  12275. },
  12276. "400": {
  12277. "description": "InvalidRequestError",
  12278. "content": {
  12279. "application/json": {
  12280. "schema": {
  12281. "$ref": "#/components/schemas/InvalidRequestError"
  12282. }
  12283. }
  12284. }
  12285. },
  12286. "401": {
  12287. "description": "UnauthorizedError",
  12288. "content": {
  12289. "application/json": {
  12290. "schema": {
  12291. "$ref": "#/components/schemas/UnauthorizedError"
  12292. }
  12293. }
  12294. }
  12295. },
  12296. "404": {
  12297. "description": "SessionNotFoundError | QuestionNotFoundError",
  12298. "content": {
  12299. "application/json": {
  12300. "schema": {
  12301. "anyOf": [
  12302. {
  12303. "$ref": "#/components/schemas/QuestionNotFoundError"
  12304. },
  12305. {
  12306. "$ref": "#/components/schemas/SessionNotFoundError"
  12307. },
  12308. {
  12309. "$ref": "#/components/schemas/SessionNotFoundError"
  12310. }
  12311. ]
  12312. }
  12313. }
  12314. }
  12315. }
  12316. },
  12317. "description": "Answer a pending question request owned by a session.",
  12318. "summary": "Reply to pending question request",
  12319. "requestBody": {
  12320. "content": {
  12321. "application/json": {
  12322. "schema": {
  12323. "$ref": "#/components/schemas/QuestionV2Reply"
  12324. }
  12325. }
  12326. },
  12327. "required": true
  12328. },
  12329. "x-codeSamples": [
  12330. {
  12331. "lang": "js",
  12332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  12333. }
  12334. ]
  12335. }
  12336. },
  12337. "/api/session/{sessionID}/question/{requestID}/reject": {
  12338. "post": {
  12339. "tags": ["session questions"],
  12340. "operationId": "v2.session.question.reject",
  12341. "parameters": [
  12342. {
  12343. "name": "sessionID",
  12344. "in": "path",
  12345. "schema": {
  12346. "type": "string",
  12347. "pattern": "^ses"
  12348. },
  12349. "required": true
  12350. },
  12351. {
  12352. "name": "requestID",
  12353. "in": "path",
  12354. "schema": {
  12355. "type": "string",
  12356. "pattern": "^que"
  12357. },
  12358. "required": true
  12359. }
  12360. ],
  12361. "security": [],
  12362. "responses": {
  12363. "204": {
  12364. "description": "<No Content>"
  12365. },
  12366. "400": {
  12367. "description": "InvalidRequestError",
  12368. "content": {
  12369. "application/json": {
  12370. "schema": {
  12371. "$ref": "#/components/schemas/InvalidRequestError"
  12372. }
  12373. }
  12374. }
  12375. },
  12376. "401": {
  12377. "description": "UnauthorizedError",
  12378. "content": {
  12379. "application/json": {
  12380. "schema": {
  12381. "$ref": "#/components/schemas/UnauthorizedError"
  12382. }
  12383. }
  12384. }
  12385. },
  12386. "404": {
  12387. "description": "SessionNotFoundError | QuestionNotFoundError",
  12388. "content": {
  12389. "application/json": {
  12390. "schema": {
  12391. "anyOf": [
  12392. {
  12393. "$ref": "#/components/schemas/QuestionNotFoundError"
  12394. },
  12395. {
  12396. "$ref": "#/components/schemas/SessionNotFoundError"
  12397. },
  12398. {
  12399. "$ref": "#/components/schemas/SessionNotFoundError"
  12400. }
  12401. ]
  12402. }
  12403. }
  12404. }
  12405. }
  12406. },
  12407. "description": "Reject a pending question request owned by a session.",
  12408. "summary": "Reject pending question request",
  12409. "x-codeSamples": [
  12410. {
  12411. "lang": "js",
  12412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  12413. }
  12414. ]
  12415. }
  12416. },
  12417. "/api/reference": {
  12418. "get": {
  12419. "tags": ["reference"],
  12420. "operationId": "v2.reference.list",
  12421. "parameters": [
  12422. {
  12423. "name": "location",
  12424. "in": "query",
  12425. "schema": {
  12426. "type": "object",
  12427. "properties": {
  12428. "directory": {
  12429. "type": "string"
  12430. },
  12431. "workspace": {
  12432. "type": "string"
  12433. }
  12434. },
  12435. "additionalProperties": false
  12436. },
  12437. "required": false,
  12438. "style": "deepObject",
  12439. "explode": true
  12440. }
  12441. ],
  12442. "security": [],
  12443. "responses": {
  12444. "200": {
  12445. "description": "Success",
  12446. "content": {
  12447. "application/json": {
  12448. "schema": {
  12449. "type": "object",
  12450. "properties": {
  12451. "location": {
  12452. "$ref": "#/components/schemas/LocationInfo"
  12453. },
  12454. "data": {
  12455. "type": "array",
  12456. "items": {
  12457. "$ref": "#/components/schemas/ReferenceInfo"
  12458. }
  12459. }
  12460. },
  12461. "required": ["location", "data"],
  12462. "additionalProperties": false
  12463. }
  12464. }
  12465. }
  12466. },
  12467. "400": {
  12468. "description": "InvalidRequestError",
  12469. "content": {
  12470. "application/json": {
  12471. "schema": {
  12472. "$ref": "#/components/schemas/InvalidRequestError"
  12473. }
  12474. }
  12475. }
  12476. },
  12477. "401": {
  12478. "description": "UnauthorizedError",
  12479. "content": {
  12480. "application/json": {
  12481. "schema": {
  12482. "$ref": "#/components/schemas/UnauthorizedError"
  12483. }
  12484. }
  12485. }
  12486. }
  12487. },
  12488. "description": "List references available in the requested location.",
  12489. "summary": "List references",
  12490. "x-codeSamples": [
  12491. {
  12492. "lang": "js",
  12493. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  12494. }
  12495. ]
  12496. }
  12497. },
  12498. "/pty/{ptyID}/connect": {
  12499. "get": {
  12500. "tags": ["pty"],
  12501. "operationId": "pty.connect",
  12502. "parameters": [
  12503. {
  12504. "name": "ptyID",
  12505. "in": "path",
  12506. "schema": {
  12507. "type": "string",
  12508. "pattern": "^pty"
  12509. },
  12510. "required": true
  12511. },
  12512. {
  12513. "in": "query",
  12514. "name": "directory",
  12515. "schema": {
  12516. "type": "string"
  12517. }
  12518. },
  12519. {
  12520. "in": "query",
  12521. "name": "workspace",
  12522. "schema": {
  12523. "type": "string"
  12524. }
  12525. },
  12526. {
  12527. "in": "query",
  12528. "name": "cursor",
  12529. "schema": {
  12530. "type": "string"
  12531. }
  12532. },
  12533. {
  12534. "in": "query",
  12535. "name": "ticket",
  12536. "schema": {
  12537. "type": "string"
  12538. }
  12539. }
  12540. ],
  12541. "responses": {
  12542. "200": {
  12543. "description": "Connected session",
  12544. "content": {
  12545. "application/json": {
  12546. "schema": {
  12547. "type": "boolean",
  12548. "description": "Connected session"
  12549. }
  12550. }
  12551. }
  12552. },
  12553. "403": {
  12554. "description": "Forbidden",
  12555. "content": {
  12556. "application/json": {
  12557. "schema": {
  12558. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  12559. }
  12560. }
  12561. }
  12562. },
  12563. "404": {
  12564. "description": "Not found",
  12565. "content": {
  12566. "application/json": {
  12567. "schema": {
  12568. "$ref": "#/components/schemas/NotFoundError"
  12569. }
  12570. }
  12571. }
  12572. }
  12573. },
  12574. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  12575. "summary": "Connect to PTY session",
  12576. "x-codeSamples": [
  12577. {
  12578. "lang": "js",
  12579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  12580. }
  12581. ]
  12582. }
  12583. }
  12584. },
  12585. "components": {
  12586. "schemas": {
  12587. "Event": {
  12588. "anyOf": [
  12589. {
  12590. "$ref": "#/components/schemas/EventModels-devRefreshed"
  12591. },
  12592. {
  12593. "$ref": "#/components/schemas/EventPluginAdded"
  12594. },
  12595. {
  12596. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  12597. },
  12598. {
  12599. "$ref": "#/components/schemas/EventSessionCreated"
  12600. },
  12601. {
  12602. "$ref": "#/components/schemas/EventSessionUpdated"
  12603. },
  12604. {
  12605. "$ref": "#/components/schemas/EventSessionDeleted"
  12606. },
  12607. {
  12608. "$ref": "#/components/schemas/EventMessageUpdated"
  12609. },
  12610. {
  12611. "$ref": "#/components/schemas/EventMessageRemoved"
  12612. },
  12613. {
  12614. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12615. },
  12616. {
  12617. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12618. },
  12619. {
  12620. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12621. },
  12622. {
  12623. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12624. },
  12625. {
  12626. "$ref": "#/components/schemas/EventSessionNextMoved"
  12627. },
  12628. {
  12629. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12630. },
  12631. {
  12632. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  12633. },
  12634. {
  12635. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  12636. },
  12637. {
  12638. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  12639. },
  12640. {
  12641. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  12642. },
  12643. {
  12644. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12645. },
  12646. {
  12647. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12648. },
  12649. {
  12650. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12651. },
  12652. {
  12653. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12654. },
  12655. {
  12656. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12657. },
  12658. {
  12659. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12660. },
  12661. {
  12662. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12663. },
  12664. {
  12665. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12666. },
  12667. {
  12668. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12669. },
  12670. {
  12671. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12672. },
  12673. {
  12674. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12675. },
  12676. {
  12677. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12678. },
  12679. {
  12680. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12681. },
  12682. {
  12683. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12684. },
  12685. {
  12686. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12687. },
  12688. {
  12689. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12690. },
  12691. {
  12692. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12693. },
  12694. {
  12695. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12696. },
  12697. {
  12698. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12699. },
  12700. {
  12701. "$ref": "#/components/schemas/EventSessionNextRetried"
  12702. },
  12703. {
  12704. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12705. },
  12706. {
  12707. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12708. },
  12709. {
  12710. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12711. },
  12712. {
  12713. "$ref": "#/components/schemas/EventMessagePartDelta"
  12714. },
  12715. {
  12716. "$ref": "#/components/schemas/EventSessionDiff"
  12717. },
  12718. {
  12719. "$ref": "#/components/schemas/EventSessionError"
  12720. },
  12721. {
  12722. "$ref": "#/components/schemas/EventInstallationUpdated"
  12723. },
  12724. {
  12725. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12726. },
  12727. {
  12728. "$ref": "#/components/schemas/EventFileEdited"
  12729. },
  12730. {
  12731. "$ref": "#/components/schemas/EventAccountAdded"
  12732. },
  12733. {
  12734. "$ref": "#/components/schemas/EventAccountRemoved"
  12735. },
  12736. {
  12737. "$ref": "#/components/schemas/EventAccountSwitched"
  12738. },
  12739. {
  12740. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12741. },
  12742. {
  12743. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12744. },
  12745. {
  12746. "$ref": "#/components/schemas/EventReferenceUpdated"
  12747. },
  12748. {
  12749. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12750. },
  12751. {
  12752. "$ref": "#/components/schemas/EventPtyCreated"
  12753. },
  12754. {
  12755. "$ref": "#/components/schemas/EventPtyUpdated"
  12756. },
  12757. {
  12758. "$ref": "#/components/schemas/EventPtyExited"
  12759. },
  12760. {
  12761. "$ref": "#/components/schemas/EventPtyDeleted"
  12762. },
  12763. {
  12764. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12765. },
  12766. {
  12767. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12768. },
  12769. {
  12770. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12771. },
  12772. {
  12773. "$ref": "#/components/schemas/EventTodoUpdated"
  12774. },
  12775. {
  12776. "$ref": "#/components/schemas/EventLspUpdated"
  12777. },
  12778. {
  12779. "$ref": "#/components/schemas/EventPermissionAsked"
  12780. },
  12781. {
  12782. "$ref": "#/components/schemas/EventPermissionReplied"
  12783. },
  12784. {
  12785. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12786. },
  12787. {
  12788. "$ref": "#/components/schemas/Event.tui.command.execute"
  12789. },
  12790. {
  12791. "$ref": "#/components/schemas/Event.tui.toast.show"
  12792. },
  12793. {
  12794. "$ref": "#/components/schemas/Event.tui.session.select"
  12795. },
  12796. {
  12797. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12798. },
  12799. {
  12800. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12801. },
  12802. {
  12803. "$ref": "#/components/schemas/EventCommandExecuted"
  12804. },
  12805. {
  12806. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12807. },
  12808. {
  12809. "$ref": "#/components/schemas/EventProjectUpdated"
  12810. },
  12811. {
  12812. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12813. },
  12814. {
  12815. "$ref": "#/components/schemas/EventQuestionAsked"
  12816. },
  12817. {
  12818. "$ref": "#/components/schemas/EventQuestionReplied"
  12819. },
  12820. {
  12821. "$ref": "#/components/schemas/EventQuestionRejected"
  12822. },
  12823. {
  12824. "$ref": "#/components/schemas/EventSessionStatus"
  12825. },
  12826. {
  12827. "$ref": "#/components/schemas/EventSessionIdle"
  12828. },
  12829. {
  12830. "$ref": "#/components/schemas/EventSessionCompacted"
  12831. },
  12832. {
  12833. "$ref": "#/components/schemas/EventWorktreeReady"
  12834. },
  12835. {
  12836. "$ref": "#/components/schemas/EventWorktreeFailed"
  12837. },
  12838. {
  12839. "$ref": "#/components/schemas/EventWorkspaceReady"
  12840. },
  12841. {
  12842. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12843. },
  12844. {
  12845. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12846. },
  12847. {
  12848. "$ref": "#/components/schemas/EventServerConnected"
  12849. },
  12850. {
  12851. "$ref": "#/components/schemas/EventGlobalDisposed"
  12852. },
  12853. {
  12854. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12855. }
  12856. ]
  12857. },
  12858. "QuestionReplied": {
  12859. "type": "object",
  12860. "properties": {
  12861. "sessionID": {
  12862. "type": "string",
  12863. "pattern": "^ses"
  12864. },
  12865. "requestID": {
  12866. "type": "string",
  12867. "pattern": "^que"
  12868. },
  12869. "answers": {
  12870. "type": "array",
  12871. "items": {
  12872. "$ref": "#/components/schemas/QuestionAnswer"
  12873. }
  12874. }
  12875. },
  12876. "required": ["sessionID", "requestID", "answers"],
  12877. "additionalProperties": false
  12878. },
  12879. "QuestionRejected": {
  12880. "type": "object",
  12881. "properties": {
  12882. "sessionID": {
  12883. "type": "string",
  12884. "pattern": "^ses"
  12885. },
  12886. "requestID": {
  12887. "type": "string",
  12888. "pattern": "^que"
  12889. }
  12890. },
  12891. "required": ["sessionID", "requestID"],
  12892. "additionalProperties": false
  12893. },
  12894. "OAuth": {
  12895. "type": "object",
  12896. "properties": {
  12897. "type": {
  12898. "type": "string",
  12899. "enum": ["oauth"]
  12900. },
  12901. "refresh": {
  12902. "type": "string"
  12903. },
  12904. "access": {
  12905. "type": "string"
  12906. },
  12907. "expires": {
  12908. "type": "integer",
  12909. "minimum": 0
  12910. },
  12911. "accountId": {
  12912. "type": "string"
  12913. },
  12914. "enterpriseUrl": {
  12915. "type": "string"
  12916. }
  12917. },
  12918. "required": ["type", "refresh", "access", "expires"],
  12919. "additionalProperties": false
  12920. },
  12921. "ApiAuth": {
  12922. "type": "object",
  12923. "properties": {
  12924. "type": {
  12925. "type": "string",
  12926. "enum": ["api"]
  12927. },
  12928. "key": {
  12929. "type": "string"
  12930. },
  12931. "metadata": {
  12932. "type": "object",
  12933. "additionalProperties": {
  12934. "type": "string"
  12935. }
  12936. }
  12937. },
  12938. "required": ["type", "key"],
  12939. "additionalProperties": false
  12940. },
  12941. "WellKnownAuth": {
  12942. "type": "object",
  12943. "properties": {
  12944. "type": {
  12945. "type": "string",
  12946. "enum": ["wellknown"]
  12947. },
  12948. "key": {
  12949. "type": "string"
  12950. },
  12951. "token": {
  12952. "type": "string"
  12953. }
  12954. },
  12955. "required": ["type", "key", "token"],
  12956. "additionalProperties": false
  12957. },
  12958. "Auth": {
  12959. "anyOf": [
  12960. {
  12961. "$ref": "#/components/schemas/OAuth"
  12962. },
  12963. {
  12964. "$ref": "#/components/schemas/ApiAuth"
  12965. },
  12966. {
  12967. "$ref": "#/components/schemas/WellKnownAuth"
  12968. }
  12969. ]
  12970. },
  12971. "effect_HttpApiError_BadRequest": {
  12972. "type": "object",
  12973. "properties": {
  12974. "_tag": {
  12975. "type": "string",
  12976. "enum": ["BadRequest"]
  12977. }
  12978. },
  12979. "required": ["_tag"],
  12980. "additionalProperties": false
  12981. },
  12982. "InvalidRequestError": {
  12983. "type": "object",
  12984. "properties": {
  12985. "_tag": {
  12986. "type": "string",
  12987. "enum": ["InvalidRequestError"]
  12988. },
  12989. "message": {
  12990. "type": "string"
  12991. },
  12992. "kind": {
  12993. "type": "string"
  12994. },
  12995. "field": {
  12996. "type": "string"
  12997. }
  12998. },
  12999. "required": ["_tag", "message"],
  13000. "additionalProperties": false
  13001. },
  13002. "MoveSessionError": {
  13003. "type": "object",
  13004. "properties": {
  13005. "name": {
  13006. "type": "string",
  13007. "enum": ["MoveSessionError"]
  13008. },
  13009. "data": {
  13010. "type": "object",
  13011. "properties": {
  13012. "message": {
  13013. "type": "string"
  13014. }
  13015. },
  13016. "required": ["message"],
  13017. "additionalProperties": false
  13018. }
  13019. },
  13020. "required": ["name", "data"],
  13021. "additionalProperties": false
  13022. },
  13023. "SnapshotFileDiff": {
  13024. "type": "object",
  13025. "properties": {
  13026. "file": {
  13027. "type": "string"
  13028. },
  13029. "patch": {
  13030. "type": "string"
  13031. },
  13032. "additions": {
  13033. "type": "number"
  13034. },
  13035. "deletions": {
  13036. "type": "number"
  13037. },
  13038. "status": {
  13039. "type": "string",
  13040. "enum": ["added", "deleted", "modified"]
  13041. }
  13042. },
  13043. "required": ["additions", "deletions"],
  13044. "additionalProperties": false
  13045. },
  13046. "PermissionAction": {
  13047. "type": "string",
  13048. "enum": ["allow", "deny", "ask"]
  13049. },
  13050. "PermissionRule": {
  13051. "type": "object",
  13052. "properties": {
  13053. "permission": {
  13054. "type": "string"
  13055. },
  13056. "pattern": {
  13057. "type": "string"
  13058. },
  13059. "action": {
  13060. "$ref": "#/components/schemas/PermissionAction"
  13061. }
  13062. },
  13063. "required": ["permission", "pattern", "action"],
  13064. "additionalProperties": false
  13065. },
  13066. "PermissionRuleset": {
  13067. "type": "array",
  13068. "items": {
  13069. "$ref": "#/components/schemas/PermissionRule"
  13070. }
  13071. },
  13072. "Session": {
  13073. "type": "object",
  13074. "properties": {
  13075. "id": {
  13076. "type": "string",
  13077. "pattern": "^ses"
  13078. },
  13079. "slug": {
  13080. "type": "string"
  13081. },
  13082. "projectID": {
  13083. "type": "string"
  13084. },
  13085. "workspaceID": {
  13086. "type": "string",
  13087. "pattern": "^wrk"
  13088. },
  13089. "directory": {
  13090. "type": "string"
  13091. },
  13092. "path": {
  13093. "type": "string"
  13094. },
  13095. "parentID": {
  13096. "type": "string",
  13097. "pattern": "^ses"
  13098. },
  13099. "summary": {
  13100. "type": "object",
  13101. "properties": {
  13102. "additions": {
  13103. "type": "number"
  13104. },
  13105. "deletions": {
  13106. "type": "number"
  13107. },
  13108. "files": {
  13109. "type": "number"
  13110. },
  13111. "diffs": {
  13112. "type": "array",
  13113. "items": {
  13114. "$ref": "#/components/schemas/SnapshotFileDiff"
  13115. }
  13116. }
  13117. },
  13118. "required": ["additions", "deletions", "files"],
  13119. "additionalProperties": false
  13120. },
  13121. "cost": {
  13122. "type": "number"
  13123. },
  13124. "tokens": {
  13125. "type": "object",
  13126. "properties": {
  13127. "input": {
  13128. "type": "number"
  13129. },
  13130. "output": {
  13131. "type": "number"
  13132. },
  13133. "reasoning": {
  13134. "type": "number"
  13135. },
  13136. "cache": {
  13137. "type": "object",
  13138. "properties": {
  13139. "read": {
  13140. "type": "number"
  13141. },
  13142. "write": {
  13143. "type": "number"
  13144. }
  13145. },
  13146. "required": ["read", "write"],
  13147. "additionalProperties": false
  13148. }
  13149. },
  13150. "required": ["input", "output", "reasoning", "cache"],
  13151. "additionalProperties": false
  13152. },
  13153. "share": {
  13154. "type": "object",
  13155. "properties": {
  13156. "url": {
  13157. "type": "string"
  13158. }
  13159. },
  13160. "required": ["url"],
  13161. "additionalProperties": false
  13162. },
  13163. "title": {
  13164. "type": "string"
  13165. },
  13166. "agent": {
  13167. "type": "string"
  13168. },
  13169. "model": {
  13170. "type": "object",
  13171. "properties": {
  13172. "id": {
  13173. "type": "string"
  13174. },
  13175. "providerID": {
  13176. "type": "string"
  13177. },
  13178. "variant": {
  13179. "type": "string"
  13180. }
  13181. },
  13182. "required": ["id", "providerID"],
  13183. "additionalProperties": false
  13184. },
  13185. "version": {
  13186. "type": "string"
  13187. },
  13188. "metadata": {
  13189. "type": "object"
  13190. },
  13191. "time": {
  13192. "type": "object",
  13193. "properties": {
  13194. "created": {
  13195. "type": "integer",
  13196. "minimum": 0
  13197. },
  13198. "updated": {
  13199. "type": "integer",
  13200. "minimum": 0
  13201. },
  13202. "compacting": {
  13203. "type": "integer",
  13204. "minimum": 0
  13205. },
  13206. "archived": {
  13207. "type": "number"
  13208. }
  13209. },
  13210. "required": ["created", "updated"],
  13211. "additionalProperties": false
  13212. },
  13213. "permission": {
  13214. "$ref": "#/components/schemas/PermissionRuleset"
  13215. },
  13216. "revert": {
  13217. "type": "object",
  13218. "properties": {
  13219. "messageID": {
  13220. "type": "string",
  13221. "pattern": "^msg"
  13222. },
  13223. "partID": {
  13224. "type": "string",
  13225. "pattern": "^prt"
  13226. },
  13227. "snapshot": {
  13228. "type": "string"
  13229. },
  13230. "diff": {
  13231. "type": "string"
  13232. }
  13233. },
  13234. "required": ["messageID"],
  13235. "additionalProperties": false
  13236. }
  13237. },
  13238. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  13239. "additionalProperties": false
  13240. },
  13241. "OutputFormatText": {
  13242. "type": "object",
  13243. "properties": {
  13244. "type": {
  13245. "type": "string",
  13246. "enum": ["text"]
  13247. }
  13248. },
  13249. "required": ["type"],
  13250. "additionalProperties": false
  13251. },
  13252. "JSONSchema": {
  13253. "type": "object"
  13254. },
  13255. "OutputFormatJsonSchema": {
  13256. "type": "object",
  13257. "properties": {
  13258. "type": {
  13259. "type": "string",
  13260. "enum": ["json_schema"]
  13261. },
  13262. "schema": {
  13263. "$ref": "#/components/schemas/JSONSchema"
  13264. },
  13265. "retryCount": {
  13266. "type": "integer",
  13267. "minimum": 0
  13268. }
  13269. },
  13270. "required": ["type", "schema"],
  13271. "additionalProperties": false
  13272. },
  13273. "OutputFormat": {
  13274. "anyOf": [
  13275. {
  13276. "$ref": "#/components/schemas/OutputFormatText"
  13277. },
  13278. {
  13279. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  13280. }
  13281. ]
  13282. },
  13283. "UserMessage": {
  13284. "type": "object",
  13285. "properties": {
  13286. "id": {
  13287. "type": "string",
  13288. "pattern": "^msg"
  13289. },
  13290. "sessionID": {
  13291. "type": "string",
  13292. "pattern": "^ses"
  13293. },
  13294. "role": {
  13295. "type": "string",
  13296. "enum": ["user"]
  13297. },
  13298. "time": {
  13299. "type": "object",
  13300. "properties": {
  13301. "created": {
  13302. "type": "number",
  13303. "minimum": 0
  13304. }
  13305. },
  13306. "required": ["created"],
  13307. "additionalProperties": false
  13308. },
  13309. "format": {
  13310. "$ref": "#/components/schemas/OutputFormat"
  13311. },
  13312. "summary": {
  13313. "type": "object",
  13314. "properties": {
  13315. "title": {
  13316. "type": "string"
  13317. },
  13318. "body": {
  13319. "type": "string"
  13320. },
  13321. "diffs": {
  13322. "type": "array",
  13323. "items": {
  13324. "$ref": "#/components/schemas/SnapshotFileDiff"
  13325. }
  13326. }
  13327. },
  13328. "required": ["diffs"],
  13329. "additionalProperties": false
  13330. },
  13331. "agent": {
  13332. "type": "string"
  13333. },
  13334. "model": {
  13335. "type": "object",
  13336. "properties": {
  13337. "providerID": {
  13338. "type": "string"
  13339. },
  13340. "modelID": {
  13341. "type": "string"
  13342. },
  13343. "variant": {
  13344. "type": "string"
  13345. }
  13346. },
  13347. "required": ["providerID", "modelID"],
  13348. "additionalProperties": false
  13349. },
  13350. "system": {
  13351. "type": "string"
  13352. },
  13353. "tools": {
  13354. "type": "object",
  13355. "additionalProperties": {
  13356. "type": "boolean"
  13357. }
  13358. }
  13359. },
  13360. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  13361. "additionalProperties": false
  13362. },
  13363. "ProviderAuthError": {
  13364. "type": "object",
  13365. "properties": {
  13366. "name": {
  13367. "type": "string",
  13368. "enum": ["ProviderAuthError"]
  13369. },
  13370. "data": {
  13371. "type": "object",
  13372. "properties": {
  13373. "providerID": {
  13374. "type": "string"
  13375. },
  13376. "message": {
  13377. "type": "string"
  13378. }
  13379. },
  13380. "required": ["providerID", "message"],
  13381. "additionalProperties": false
  13382. }
  13383. },
  13384. "required": ["name", "data"],
  13385. "additionalProperties": false
  13386. },
  13387. "UnknownError": {
  13388. "type": "object",
  13389. "properties": {
  13390. "name": {
  13391. "type": "string",
  13392. "enum": ["UnknownError"]
  13393. },
  13394. "data": {
  13395. "type": "object",
  13396. "properties": {
  13397. "message": {
  13398. "type": "string"
  13399. },
  13400. "ref": {
  13401. "type": "string"
  13402. }
  13403. },
  13404. "required": ["message"],
  13405. "additionalProperties": false
  13406. }
  13407. },
  13408. "required": ["name", "data"],
  13409. "additionalProperties": false
  13410. },
  13411. "MessageOutputLengthError": {
  13412. "type": "object",
  13413. "properties": {
  13414. "name": {
  13415. "type": "string",
  13416. "enum": ["MessageOutputLengthError"]
  13417. },
  13418. "data": {
  13419. "type": "object",
  13420. "properties": {}
  13421. }
  13422. },
  13423. "required": ["name", "data"],
  13424. "additionalProperties": false
  13425. },
  13426. "MessageAbortedError": {
  13427. "type": "object",
  13428. "properties": {
  13429. "name": {
  13430. "type": "string",
  13431. "enum": ["MessageAbortedError"]
  13432. },
  13433. "data": {
  13434. "type": "object",
  13435. "properties": {
  13436. "message": {
  13437. "type": "string"
  13438. }
  13439. },
  13440. "required": ["message"],
  13441. "additionalProperties": false
  13442. }
  13443. },
  13444. "required": ["name", "data"],
  13445. "additionalProperties": false
  13446. },
  13447. "StructuredOutputError": {
  13448. "type": "object",
  13449. "properties": {
  13450. "name": {
  13451. "type": "string",
  13452. "enum": ["StructuredOutputError"]
  13453. },
  13454. "data": {
  13455. "type": "object",
  13456. "properties": {
  13457. "message": {
  13458. "type": "string"
  13459. },
  13460. "retries": {
  13461. "type": "integer",
  13462. "minimum": 0
  13463. }
  13464. },
  13465. "required": ["message", "retries"],
  13466. "additionalProperties": false
  13467. }
  13468. },
  13469. "required": ["name", "data"],
  13470. "additionalProperties": false
  13471. },
  13472. "ContextOverflowError": {
  13473. "type": "object",
  13474. "properties": {
  13475. "name": {
  13476. "type": "string",
  13477. "enum": ["ContextOverflowError"]
  13478. },
  13479. "data": {
  13480. "type": "object",
  13481. "properties": {
  13482. "message": {
  13483. "type": "string"
  13484. },
  13485. "responseBody": {
  13486. "type": "string"
  13487. }
  13488. },
  13489. "required": ["message"],
  13490. "additionalProperties": false
  13491. }
  13492. },
  13493. "required": ["name", "data"],
  13494. "additionalProperties": false
  13495. },
  13496. "APIError": {
  13497. "type": "object",
  13498. "properties": {
  13499. "name": {
  13500. "type": "string",
  13501. "enum": ["APIError"]
  13502. },
  13503. "data": {
  13504. "type": "object",
  13505. "properties": {
  13506. "message": {
  13507. "type": "string"
  13508. },
  13509. "statusCode": {
  13510. "type": "integer",
  13511. "minimum": 0
  13512. },
  13513. "isRetryable": {
  13514. "type": "boolean"
  13515. },
  13516. "responseHeaders": {
  13517. "type": "object",
  13518. "additionalProperties": {
  13519. "type": "string"
  13520. }
  13521. },
  13522. "responseBody": {
  13523. "type": "string"
  13524. },
  13525. "metadata": {
  13526. "type": "object",
  13527. "additionalProperties": {
  13528. "type": "string"
  13529. }
  13530. }
  13531. },
  13532. "required": ["message", "isRetryable"],
  13533. "additionalProperties": false
  13534. }
  13535. },
  13536. "required": ["name", "data"],
  13537. "additionalProperties": false
  13538. },
  13539. "AssistantMessage": {
  13540. "type": "object",
  13541. "properties": {
  13542. "id": {
  13543. "type": "string",
  13544. "pattern": "^msg"
  13545. },
  13546. "sessionID": {
  13547. "type": "string",
  13548. "pattern": "^ses"
  13549. },
  13550. "role": {
  13551. "type": "string",
  13552. "enum": ["assistant"]
  13553. },
  13554. "time": {
  13555. "type": "object",
  13556. "properties": {
  13557. "created": {
  13558. "type": "integer",
  13559. "minimum": 0
  13560. },
  13561. "completed": {
  13562. "type": "integer",
  13563. "minimum": 0
  13564. }
  13565. },
  13566. "required": ["created"],
  13567. "additionalProperties": false
  13568. },
  13569. "error": {
  13570. "anyOf": [
  13571. {
  13572. "$ref": "#/components/schemas/ProviderAuthError"
  13573. },
  13574. {
  13575. "$ref": "#/components/schemas/UnknownError"
  13576. },
  13577. {
  13578. "$ref": "#/components/schemas/MessageOutputLengthError"
  13579. },
  13580. {
  13581. "$ref": "#/components/schemas/MessageAbortedError"
  13582. },
  13583. {
  13584. "$ref": "#/components/schemas/StructuredOutputError"
  13585. },
  13586. {
  13587. "$ref": "#/components/schemas/ContextOverflowError"
  13588. },
  13589. {
  13590. "$ref": "#/components/schemas/APIError"
  13591. }
  13592. ]
  13593. },
  13594. "parentID": {
  13595. "type": "string",
  13596. "pattern": "^msg"
  13597. },
  13598. "modelID": {
  13599. "type": "string"
  13600. },
  13601. "providerID": {
  13602. "type": "string"
  13603. },
  13604. "mode": {
  13605. "type": "string"
  13606. },
  13607. "agent": {
  13608. "type": "string"
  13609. },
  13610. "path": {
  13611. "type": "object",
  13612. "properties": {
  13613. "cwd": {
  13614. "type": "string"
  13615. },
  13616. "root": {
  13617. "type": "string"
  13618. }
  13619. },
  13620. "required": ["cwd", "root"],
  13621. "additionalProperties": false
  13622. },
  13623. "summary": {
  13624. "type": "boolean"
  13625. },
  13626. "cost": {
  13627. "type": "number"
  13628. },
  13629. "tokens": {
  13630. "type": "object",
  13631. "properties": {
  13632. "total": {
  13633. "type": "number"
  13634. },
  13635. "input": {
  13636. "type": "number"
  13637. },
  13638. "output": {
  13639. "type": "number"
  13640. },
  13641. "reasoning": {
  13642. "type": "number"
  13643. },
  13644. "cache": {
  13645. "type": "object",
  13646. "properties": {
  13647. "read": {
  13648. "type": "number"
  13649. },
  13650. "write": {
  13651. "type": "number"
  13652. }
  13653. },
  13654. "required": ["read", "write"],
  13655. "additionalProperties": false
  13656. }
  13657. },
  13658. "required": ["input", "output", "reasoning", "cache"],
  13659. "additionalProperties": false
  13660. },
  13661. "structured": {},
  13662. "variant": {
  13663. "type": "string"
  13664. },
  13665. "finish": {
  13666. "type": "string"
  13667. }
  13668. },
  13669. "required": [
  13670. "id",
  13671. "sessionID",
  13672. "role",
  13673. "time",
  13674. "parentID",
  13675. "modelID",
  13676. "providerID",
  13677. "mode",
  13678. "agent",
  13679. "path",
  13680. "cost",
  13681. "tokens"
  13682. ],
  13683. "additionalProperties": false
  13684. },
  13685. "Message": {
  13686. "anyOf": [
  13687. {
  13688. "$ref": "#/components/schemas/UserMessage"
  13689. },
  13690. {
  13691. "$ref": "#/components/schemas/AssistantMessage"
  13692. }
  13693. ]
  13694. },
  13695. "TextPart": {
  13696. "type": "object",
  13697. "properties": {
  13698. "id": {
  13699. "type": "string",
  13700. "pattern": "^prt"
  13701. },
  13702. "sessionID": {
  13703. "type": "string",
  13704. "pattern": "^ses"
  13705. },
  13706. "messageID": {
  13707. "type": "string",
  13708. "pattern": "^msg"
  13709. },
  13710. "type": {
  13711. "type": "string",
  13712. "enum": ["text"]
  13713. },
  13714. "text": {
  13715. "type": "string"
  13716. },
  13717. "synthetic": {
  13718. "type": "boolean"
  13719. },
  13720. "ignored": {
  13721. "type": "boolean"
  13722. },
  13723. "time": {
  13724. "type": "object",
  13725. "properties": {
  13726. "start": {
  13727. "type": "integer",
  13728. "minimum": 0
  13729. },
  13730. "end": {
  13731. "type": "integer",
  13732. "minimum": 0
  13733. }
  13734. },
  13735. "required": ["start"],
  13736. "additionalProperties": false
  13737. },
  13738. "metadata": {
  13739. "type": "object"
  13740. }
  13741. },
  13742. "required": ["id", "sessionID", "messageID", "type", "text"],
  13743. "additionalProperties": false
  13744. },
  13745. "SubtaskPart": {
  13746. "type": "object",
  13747. "properties": {
  13748. "id": {
  13749. "type": "string",
  13750. "pattern": "^prt"
  13751. },
  13752. "sessionID": {
  13753. "type": "string",
  13754. "pattern": "^ses"
  13755. },
  13756. "messageID": {
  13757. "type": "string",
  13758. "pattern": "^msg"
  13759. },
  13760. "type": {
  13761. "type": "string",
  13762. "enum": ["subtask"]
  13763. },
  13764. "prompt": {
  13765. "type": "string"
  13766. },
  13767. "description": {
  13768. "type": "string"
  13769. },
  13770. "agent": {
  13771. "type": "string"
  13772. },
  13773. "model": {
  13774. "type": "object",
  13775. "properties": {
  13776. "providerID": {
  13777. "type": "string"
  13778. },
  13779. "modelID": {
  13780. "type": "string"
  13781. }
  13782. },
  13783. "required": ["providerID", "modelID"],
  13784. "additionalProperties": false
  13785. },
  13786. "command": {
  13787. "type": "string"
  13788. }
  13789. },
  13790. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13791. "additionalProperties": false
  13792. },
  13793. "ReasoningPart": {
  13794. "type": "object",
  13795. "properties": {
  13796. "id": {
  13797. "type": "string",
  13798. "pattern": "^prt"
  13799. },
  13800. "sessionID": {
  13801. "type": "string",
  13802. "pattern": "^ses"
  13803. },
  13804. "messageID": {
  13805. "type": "string",
  13806. "pattern": "^msg"
  13807. },
  13808. "type": {
  13809. "type": "string",
  13810. "enum": ["reasoning"]
  13811. },
  13812. "text": {
  13813. "type": "string"
  13814. },
  13815. "metadata": {
  13816. "type": "object"
  13817. },
  13818. "time": {
  13819. "type": "object",
  13820. "properties": {
  13821. "start": {
  13822. "type": "integer",
  13823. "minimum": 0
  13824. },
  13825. "end": {
  13826. "type": "integer",
  13827. "minimum": 0
  13828. }
  13829. },
  13830. "required": ["start"],
  13831. "additionalProperties": false
  13832. }
  13833. },
  13834. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13835. "additionalProperties": false
  13836. },
  13837. "FilePartSourceText": {
  13838. "type": "object",
  13839. "properties": {
  13840. "value": {
  13841. "type": "string"
  13842. },
  13843. "start": {
  13844. "type": "number"
  13845. },
  13846. "end": {
  13847. "type": "number"
  13848. }
  13849. },
  13850. "required": ["value", "start", "end"],
  13851. "additionalProperties": false
  13852. },
  13853. "FileSource": {
  13854. "type": "object",
  13855. "properties": {
  13856. "text": {
  13857. "$ref": "#/components/schemas/FilePartSourceText"
  13858. },
  13859. "type": {
  13860. "type": "string",
  13861. "enum": ["file"]
  13862. },
  13863. "path": {
  13864. "type": "string"
  13865. }
  13866. },
  13867. "required": ["text", "type", "path"],
  13868. "additionalProperties": false
  13869. },
  13870. "Range": {
  13871. "type": "object",
  13872. "properties": {
  13873. "start": {
  13874. "type": "object",
  13875. "properties": {
  13876. "line": {
  13877. "type": "integer",
  13878. "minimum": 0
  13879. },
  13880. "character": {
  13881. "type": "integer",
  13882. "minimum": 0
  13883. }
  13884. },
  13885. "required": ["line", "character"],
  13886. "additionalProperties": false
  13887. },
  13888. "end": {
  13889. "type": "object",
  13890. "properties": {
  13891. "line": {
  13892. "type": "integer",
  13893. "minimum": 0
  13894. },
  13895. "character": {
  13896. "type": "integer",
  13897. "minimum": 0
  13898. }
  13899. },
  13900. "required": ["line", "character"],
  13901. "additionalProperties": false
  13902. }
  13903. },
  13904. "required": ["start", "end"],
  13905. "additionalProperties": false
  13906. },
  13907. "SymbolSource": {
  13908. "type": "object",
  13909. "properties": {
  13910. "text": {
  13911. "$ref": "#/components/schemas/FilePartSourceText"
  13912. },
  13913. "type": {
  13914. "type": "string",
  13915. "enum": ["symbol"]
  13916. },
  13917. "path": {
  13918. "type": "string"
  13919. },
  13920. "range": {
  13921. "$ref": "#/components/schemas/Range"
  13922. },
  13923. "name": {
  13924. "type": "string"
  13925. },
  13926. "kind": {
  13927. "type": "integer",
  13928. "minimum": 0
  13929. }
  13930. },
  13931. "required": ["text", "type", "path", "range", "name", "kind"],
  13932. "additionalProperties": false
  13933. },
  13934. "ResourceSource": {
  13935. "type": "object",
  13936. "properties": {
  13937. "text": {
  13938. "$ref": "#/components/schemas/FilePartSourceText"
  13939. },
  13940. "type": {
  13941. "type": "string",
  13942. "enum": ["resource"]
  13943. },
  13944. "clientName": {
  13945. "type": "string"
  13946. },
  13947. "uri": {
  13948. "type": "string"
  13949. }
  13950. },
  13951. "required": ["text", "type", "clientName", "uri"],
  13952. "additionalProperties": false
  13953. },
  13954. "FilePartSource": {
  13955. "anyOf": [
  13956. {
  13957. "$ref": "#/components/schemas/FileSource"
  13958. },
  13959. {
  13960. "$ref": "#/components/schemas/SymbolSource"
  13961. },
  13962. {
  13963. "$ref": "#/components/schemas/ResourceSource"
  13964. }
  13965. ]
  13966. },
  13967. "FilePart": {
  13968. "type": "object",
  13969. "properties": {
  13970. "id": {
  13971. "type": "string",
  13972. "pattern": "^prt"
  13973. },
  13974. "sessionID": {
  13975. "type": "string",
  13976. "pattern": "^ses"
  13977. },
  13978. "messageID": {
  13979. "type": "string",
  13980. "pattern": "^msg"
  13981. },
  13982. "type": {
  13983. "type": "string",
  13984. "enum": ["file"]
  13985. },
  13986. "mime": {
  13987. "type": "string"
  13988. },
  13989. "filename": {
  13990. "type": "string"
  13991. },
  13992. "url": {
  13993. "type": "string"
  13994. },
  13995. "source": {
  13996. "$ref": "#/components/schemas/FilePartSource"
  13997. }
  13998. },
  13999. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  14000. "additionalProperties": false
  14001. },
  14002. "ToolStatePending": {
  14003. "type": "object",
  14004. "properties": {
  14005. "status": {
  14006. "type": "string",
  14007. "enum": ["pending"]
  14008. },
  14009. "input": {
  14010. "type": "object"
  14011. },
  14012. "raw": {
  14013. "type": "string"
  14014. }
  14015. },
  14016. "required": ["status", "input", "raw"],
  14017. "additionalProperties": false
  14018. },
  14019. "ToolStateRunning": {
  14020. "type": "object",
  14021. "properties": {
  14022. "status": {
  14023. "type": "string",
  14024. "enum": ["running"]
  14025. },
  14026. "input": {
  14027. "type": "object"
  14028. },
  14029. "title": {
  14030. "type": "string"
  14031. },
  14032. "metadata": {
  14033. "type": "object"
  14034. },
  14035. "time": {
  14036. "type": "object",
  14037. "properties": {
  14038. "start": {
  14039. "type": "integer",
  14040. "minimum": 0
  14041. }
  14042. },
  14043. "required": ["start"],
  14044. "additionalProperties": false
  14045. }
  14046. },
  14047. "required": ["status", "input", "time"],
  14048. "additionalProperties": false
  14049. },
  14050. "ToolStateCompleted": {
  14051. "type": "object",
  14052. "properties": {
  14053. "status": {
  14054. "type": "string",
  14055. "enum": ["completed"]
  14056. },
  14057. "input": {
  14058. "type": "object"
  14059. },
  14060. "output": {
  14061. "type": "string"
  14062. },
  14063. "title": {
  14064. "type": "string"
  14065. },
  14066. "metadata": {
  14067. "type": "object"
  14068. },
  14069. "time": {
  14070. "type": "object",
  14071. "properties": {
  14072. "start": {
  14073. "type": "integer",
  14074. "minimum": 0
  14075. },
  14076. "end": {
  14077. "type": "integer",
  14078. "minimum": 0
  14079. },
  14080. "compacted": {
  14081. "type": "integer",
  14082. "minimum": 0
  14083. }
  14084. },
  14085. "required": ["start", "end"],
  14086. "additionalProperties": false
  14087. },
  14088. "attachments": {
  14089. "type": "array",
  14090. "items": {
  14091. "$ref": "#/components/schemas/FilePart"
  14092. }
  14093. }
  14094. },
  14095. "required": ["status", "input", "output", "title", "metadata", "time"],
  14096. "additionalProperties": false
  14097. },
  14098. "ToolStateError": {
  14099. "type": "object",
  14100. "properties": {
  14101. "status": {
  14102. "type": "string",
  14103. "enum": ["error"]
  14104. },
  14105. "input": {
  14106. "type": "object"
  14107. },
  14108. "error": {
  14109. "type": "string"
  14110. },
  14111. "metadata": {
  14112. "type": "object"
  14113. },
  14114. "time": {
  14115. "type": "object",
  14116. "properties": {
  14117. "start": {
  14118. "type": "integer",
  14119. "minimum": 0
  14120. },
  14121. "end": {
  14122. "type": "integer",
  14123. "minimum": 0
  14124. }
  14125. },
  14126. "required": ["start", "end"],
  14127. "additionalProperties": false
  14128. }
  14129. },
  14130. "required": ["status", "input", "error", "time"],
  14131. "additionalProperties": false
  14132. },
  14133. "ToolState": {
  14134. "anyOf": [
  14135. {
  14136. "$ref": "#/components/schemas/ToolStatePending"
  14137. },
  14138. {
  14139. "$ref": "#/components/schemas/ToolStateRunning"
  14140. },
  14141. {
  14142. "$ref": "#/components/schemas/ToolStateCompleted"
  14143. },
  14144. {
  14145. "$ref": "#/components/schemas/ToolStateError"
  14146. }
  14147. ]
  14148. },
  14149. "ToolPart": {
  14150. "type": "object",
  14151. "properties": {
  14152. "id": {
  14153. "type": "string",
  14154. "pattern": "^prt"
  14155. },
  14156. "sessionID": {
  14157. "type": "string",
  14158. "pattern": "^ses"
  14159. },
  14160. "messageID": {
  14161. "type": "string",
  14162. "pattern": "^msg"
  14163. },
  14164. "type": {
  14165. "type": "string",
  14166. "enum": ["tool"]
  14167. },
  14168. "callID": {
  14169. "type": "string"
  14170. },
  14171. "tool": {
  14172. "type": "string"
  14173. },
  14174. "state": {
  14175. "$ref": "#/components/schemas/ToolState"
  14176. },
  14177. "metadata": {
  14178. "type": "object"
  14179. }
  14180. },
  14181. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  14182. "additionalProperties": false
  14183. },
  14184. "StepStartPart": {
  14185. "type": "object",
  14186. "properties": {
  14187. "id": {
  14188. "type": "string",
  14189. "pattern": "^prt"
  14190. },
  14191. "sessionID": {
  14192. "type": "string",
  14193. "pattern": "^ses"
  14194. },
  14195. "messageID": {
  14196. "type": "string",
  14197. "pattern": "^msg"
  14198. },
  14199. "type": {
  14200. "type": "string",
  14201. "enum": ["step-start"]
  14202. },
  14203. "snapshot": {
  14204. "type": "string"
  14205. }
  14206. },
  14207. "required": ["id", "sessionID", "messageID", "type"],
  14208. "additionalProperties": false
  14209. },
  14210. "StepFinishPart": {
  14211. "type": "object",
  14212. "properties": {
  14213. "id": {
  14214. "type": "string",
  14215. "pattern": "^prt"
  14216. },
  14217. "sessionID": {
  14218. "type": "string",
  14219. "pattern": "^ses"
  14220. },
  14221. "messageID": {
  14222. "type": "string",
  14223. "pattern": "^msg"
  14224. },
  14225. "type": {
  14226. "type": "string",
  14227. "enum": ["step-finish"]
  14228. },
  14229. "reason": {
  14230. "type": "string"
  14231. },
  14232. "snapshot": {
  14233. "type": "string"
  14234. },
  14235. "cost": {
  14236. "type": "number"
  14237. },
  14238. "tokens": {
  14239. "type": "object",
  14240. "properties": {
  14241. "total": {
  14242. "type": "number"
  14243. },
  14244. "input": {
  14245. "type": "number"
  14246. },
  14247. "output": {
  14248. "type": "number"
  14249. },
  14250. "reasoning": {
  14251. "type": "number"
  14252. },
  14253. "cache": {
  14254. "type": "object",
  14255. "properties": {
  14256. "read": {
  14257. "type": "number"
  14258. },
  14259. "write": {
  14260. "type": "number"
  14261. }
  14262. },
  14263. "required": ["read", "write"],
  14264. "additionalProperties": false
  14265. }
  14266. },
  14267. "required": ["input", "output", "reasoning", "cache"],
  14268. "additionalProperties": false
  14269. }
  14270. },
  14271. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  14272. "additionalProperties": false
  14273. },
  14274. "SnapshotPart": {
  14275. "type": "object",
  14276. "properties": {
  14277. "id": {
  14278. "type": "string",
  14279. "pattern": "^prt"
  14280. },
  14281. "sessionID": {
  14282. "type": "string",
  14283. "pattern": "^ses"
  14284. },
  14285. "messageID": {
  14286. "type": "string",
  14287. "pattern": "^msg"
  14288. },
  14289. "type": {
  14290. "type": "string",
  14291. "enum": ["snapshot"]
  14292. },
  14293. "snapshot": {
  14294. "type": "string"
  14295. }
  14296. },
  14297. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  14298. "additionalProperties": false
  14299. },
  14300. "PatchPart": {
  14301. "type": "object",
  14302. "properties": {
  14303. "id": {
  14304. "type": "string",
  14305. "pattern": "^prt"
  14306. },
  14307. "sessionID": {
  14308. "type": "string",
  14309. "pattern": "^ses"
  14310. },
  14311. "messageID": {
  14312. "type": "string",
  14313. "pattern": "^msg"
  14314. },
  14315. "type": {
  14316. "type": "string",
  14317. "enum": ["patch"]
  14318. },
  14319. "hash": {
  14320. "type": "string"
  14321. },
  14322. "files": {
  14323. "type": "array",
  14324. "items": {
  14325. "type": "string"
  14326. }
  14327. }
  14328. },
  14329. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  14330. "additionalProperties": false
  14331. },
  14332. "AgentPart": {
  14333. "type": "object",
  14334. "properties": {
  14335. "id": {
  14336. "type": "string",
  14337. "pattern": "^prt"
  14338. },
  14339. "sessionID": {
  14340. "type": "string",
  14341. "pattern": "^ses"
  14342. },
  14343. "messageID": {
  14344. "type": "string",
  14345. "pattern": "^msg"
  14346. },
  14347. "type": {
  14348. "type": "string",
  14349. "enum": ["agent"]
  14350. },
  14351. "name": {
  14352. "type": "string"
  14353. },
  14354. "source": {
  14355. "type": "object",
  14356. "properties": {
  14357. "value": {
  14358. "type": "string"
  14359. },
  14360. "start": {
  14361. "type": "integer",
  14362. "minimum": 0
  14363. },
  14364. "end": {
  14365. "type": "integer",
  14366. "minimum": 0
  14367. }
  14368. },
  14369. "required": ["value", "start", "end"],
  14370. "additionalProperties": false
  14371. }
  14372. },
  14373. "required": ["id", "sessionID", "messageID", "type", "name"],
  14374. "additionalProperties": false
  14375. },
  14376. "RetryPart": {
  14377. "type": "object",
  14378. "properties": {
  14379. "id": {
  14380. "type": "string",
  14381. "pattern": "^prt"
  14382. },
  14383. "sessionID": {
  14384. "type": "string",
  14385. "pattern": "^ses"
  14386. },
  14387. "messageID": {
  14388. "type": "string",
  14389. "pattern": "^msg"
  14390. },
  14391. "type": {
  14392. "type": "string",
  14393. "enum": ["retry"]
  14394. },
  14395. "attempt": {
  14396. "type": "integer",
  14397. "minimum": 0
  14398. },
  14399. "error": {
  14400. "$ref": "#/components/schemas/APIError"
  14401. },
  14402. "time": {
  14403. "type": "object",
  14404. "properties": {
  14405. "created": {
  14406. "type": "integer",
  14407. "minimum": 0
  14408. }
  14409. },
  14410. "required": ["created"],
  14411. "additionalProperties": false
  14412. }
  14413. },
  14414. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  14415. "additionalProperties": false
  14416. },
  14417. "CompactionPart": {
  14418. "type": "object",
  14419. "properties": {
  14420. "id": {
  14421. "type": "string",
  14422. "pattern": "^prt"
  14423. },
  14424. "sessionID": {
  14425. "type": "string",
  14426. "pattern": "^ses"
  14427. },
  14428. "messageID": {
  14429. "type": "string",
  14430. "pattern": "^msg"
  14431. },
  14432. "type": {
  14433. "type": "string",
  14434. "enum": ["compaction"]
  14435. },
  14436. "auto": {
  14437. "type": "boolean"
  14438. },
  14439. "overflow": {
  14440. "type": "boolean"
  14441. },
  14442. "tail_start_id": {
  14443. "type": "string",
  14444. "pattern": "^msg"
  14445. }
  14446. },
  14447. "required": ["id", "sessionID", "messageID", "type", "auto"],
  14448. "additionalProperties": false
  14449. },
  14450. "Part": {
  14451. "anyOf": [
  14452. {
  14453. "$ref": "#/components/schemas/TextPart"
  14454. },
  14455. {
  14456. "$ref": "#/components/schemas/SubtaskPart"
  14457. },
  14458. {
  14459. "$ref": "#/components/schemas/ReasoningPart"
  14460. },
  14461. {
  14462. "$ref": "#/components/schemas/FilePart"
  14463. },
  14464. {
  14465. "$ref": "#/components/schemas/ToolPart"
  14466. },
  14467. {
  14468. "$ref": "#/components/schemas/StepStartPart"
  14469. },
  14470. {
  14471. "$ref": "#/components/schemas/StepFinishPart"
  14472. },
  14473. {
  14474. "$ref": "#/components/schemas/SnapshotPart"
  14475. },
  14476. {
  14477. "$ref": "#/components/schemas/PatchPart"
  14478. },
  14479. {
  14480. "$ref": "#/components/schemas/AgentPart"
  14481. },
  14482. {
  14483. "$ref": "#/components/schemas/RetryPart"
  14484. },
  14485. {
  14486. "$ref": "#/components/schemas/CompactionPart"
  14487. }
  14488. ]
  14489. },
  14490. "Prompt": {
  14491. "type": "object",
  14492. "properties": {
  14493. "text": {
  14494. "type": "string"
  14495. },
  14496. "files": {
  14497. "type": "array",
  14498. "items": {
  14499. "$ref": "#/components/schemas/PromptFileAttachment"
  14500. }
  14501. },
  14502. "agents": {
  14503. "type": "array",
  14504. "items": {
  14505. "$ref": "#/components/schemas/PromptAgentAttachment"
  14506. }
  14507. }
  14508. },
  14509. "required": ["text"],
  14510. "additionalProperties": false
  14511. },
  14512. "Pty": {
  14513. "type": "object",
  14514. "properties": {
  14515. "id": {
  14516. "type": "string",
  14517. "pattern": "^pty"
  14518. },
  14519. "title": {
  14520. "type": "string"
  14521. },
  14522. "command": {
  14523. "type": "string"
  14524. },
  14525. "args": {
  14526. "type": "array",
  14527. "items": {
  14528. "type": "string"
  14529. }
  14530. },
  14531. "cwd": {
  14532. "type": "string"
  14533. },
  14534. "status": {
  14535. "type": "string",
  14536. "enum": ["running", "exited"]
  14537. },
  14538. "pid": {
  14539. "type": "integer",
  14540. "minimum": 0
  14541. }
  14542. },
  14543. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  14544. "additionalProperties": false
  14545. },
  14546. "Todo": {
  14547. "type": "object",
  14548. "properties": {
  14549. "content": {
  14550. "type": "string",
  14551. "description": "Brief description of the task"
  14552. },
  14553. "status": {
  14554. "type": "string",
  14555. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  14556. },
  14557. "priority": {
  14558. "type": "string",
  14559. "description": "Priority level of the task: high, medium, low"
  14560. }
  14561. },
  14562. "required": ["content", "status", "priority"],
  14563. "additionalProperties": false
  14564. },
  14565. "QuestionOption": {
  14566. "type": "object",
  14567. "properties": {
  14568. "label": {
  14569. "type": "string",
  14570. "description": "Display text (1-5 words, concise)"
  14571. },
  14572. "description": {
  14573. "type": "string",
  14574. "description": "Explanation of choice"
  14575. }
  14576. },
  14577. "required": ["label", "description"],
  14578. "additionalProperties": false
  14579. },
  14580. "QuestionInfo": {
  14581. "type": "object",
  14582. "properties": {
  14583. "question": {
  14584. "type": "string",
  14585. "description": "Complete question"
  14586. },
  14587. "header": {
  14588. "type": "string",
  14589. "description": "Very short label (max 30 chars)"
  14590. },
  14591. "options": {
  14592. "type": "array",
  14593. "items": {
  14594. "$ref": "#/components/schemas/QuestionOption"
  14595. },
  14596. "description": "Available choices"
  14597. },
  14598. "multiple": {
  14599. "type": "boolean"
  14600. },
  14601. "custom": {
  14602. "type": "boolean"
  14603. }
  14604. },
  14605. "required": ["question", "header", "options"],
  14606. "additionalProperties": false
  14607. },
  14608. "QuestionTool": {
  14609. "type": "object",
  14610. "properties": {
  14611. "messageID": {
  14612. "type": "string",
  14613. "pattern": "^msg"
  14614. },
  14615. "callID": {
  14616. "type": "string"
  14617. }
  14618. },
  14619. "required": ["messageID", "callID"],
  14620. "additionalProperties": false
  14621. },
  14622. "QuestionAnswer": {
  14623. "type": "array",
  14624. "items": {
  14625. "type": "string"
  14626. }
  14627. },
  14628. "SessionStatus": {
  14629. "anyOf": [
  14630. {
  14631. "type": "object",
  14632. "properties": {
  14633. "type": {
  14634. "type": "string",
  14635. "enum": ["idle"]
  14636. }
  14637. },
  14638. "required": ["type"],
  14639. "additionalProperties": false
  14640. },
  14641. {
  14642. "type": "object",
  14643. "properties": {
  14644. "type": {
  14645. "type": "string",
  14646. "enum": ["retry"]
  14647. },
  14648. "attempt": {
  14649. "type": "integer",
  14650. "minimum": 0
  14651. },
  14652. "message": {
  14653. "type": "string"
  14654. },
  14655. "action": {
  14656. "type": "object",
  14657. "properties": {
  14658. "reason": {
  14659. "type": "string"
  14660. },
  14661. "provider": {
  14662. "type": "string"
  14663. },
  14664. "title": {
  14665. "type": "string"
  14666. },
  14667. "message": {
  14668. "type": "string"
  14669. },
  14670. "label": {
  14671. "type": "string"
  14672. },
  14673. "link": {
  14674. "type": "string"
  14675. }
  14676. },
  14677. "required": ["reason", "provider", "title", "message", "label"],
  14678. "additionalProperties": false
  14679. },
  14680. "next": {
  14681. "type": "integer",
  14682. "minimum": 0
  14683. }
  14684. },
  14685. "required": ["type", "attempt", "message", "next"],
  14686. "additionalProperties": false
  14687. },
  14688. {
  14689. "type": "object",
  14690. "properties": {
  14691. "type": {
  14692. "type": "string",
  14693. "enum": ["busy"]
  14694. }
  14695. },
  14696. "required": ["type"],
  14697. "additionalProperties": false
  14698. }
  14699. ]
  14700. },
  14701. "GlobalEvent": {
  14702. "type": "object",
  14703. "properties": {
  14704. "directory": {
  14705. "type": "string"
  14706. },
  14707. "project": {
  14708. "type": "string"
  14709. },
  14710. "workspace": {
  14711. "type": "string"
  14712. },
  14713. "payload": {
  14714. "anyOf": [
  14715. {
  14716. "type": "object",
  14717. "properties": {
  14718. "id": {
  14719. "type": "string",
  14720. "pattern": "^evt_"
  14721. },
  14722. "type": {
  14723. "type": "string",
  14724. "enum": ["models-dev.refreshed"]
  14725. },
  14726. "properties": {
  14727. "type": "object",
  14728. "properties": {}
  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": ["plugin.added"]
  14744. },
  14745. "properties": {
  14746. "type": "object",
  14747. "properties": {
  14748. "id": {
  14749. "type": "string"
  14750. }
  14751. },
  14752. "required": ["id"],
  14753. "additionalProperties": false
  14754. }
  14755. },
  14756. "required": ["id", "type", "properties"],
  14757. "additionalProperties": false
  14758. },
  14759. {
  14760. "type": "object",
  14761. "properties": {
  14762. "id": {
  14763. "type": "string",
  14764. "pattern": "^evt_"
  14765. },
  14766. "type": {
  14767. "type": "string",
  14768. "enum": ["catalog.model.updated"]
  14769. },
  14770. "properties": {
  14771. "type": "object",
  14772. "properties": {
  14773. "model": {
  14774. "$ref": "#/components/schemas/ModelV2Info"
  14775. }
  14776. },
  14777. "required": ["model"],
  14778. "additionalProperties": false
  14779. }
  14780. },
  14781. "required": ["id", "type", "properties"],
  14782. "additionalProperties": false
  14783. },
  14784. {
  14785. "type": "object",
  14786. "properties": {
  14787. "id": {
  14788. "type": "string",
  14789. "pattern": "^evt_"
  14790. },
  14791. "type": {
  14792. "type": "string",
  14793. "enum": ["session.created"]
  14794. },
  14795. "properties": {
  14796. "type": "object",
  14797. "properties": {
  14798. "sessionID": {
  14799. "type": "string",
  14800. "pattern": "^ses"
  14801. },
  14802. "info": {
  14803. "$ref": "#/components/schemas/Session"
  14804. }
  14805. },
  14806. "required": ["sessionID", "info"],
  14807. "additionalProperties": false
  14808. }
  14809. },
  14810. "required": ["id", "type", "properties"],
  14811. "additionalProperties": false
  14812. },
  14813. {
  14814. "type": "object",
  14815. "properties": {
  14816. "id": {
  14817. "type": "string",
  14818. "pattern": "^evt_"
  14819. },
  14820. "type": {
  14821. "type": "string",
  14822. "enum": ["session.updated"]
  14823. },
  14824. "properties": {
  14825. "type": "object",
  14826. "properties": {
  14827. "sessionID": {
  14828. "type": "string",
  14829. "pattern": "^ses"
  14830. },
  14831. "info": {
  14832. "$ref": "#/components/schemas/Session"
  14833. }
  14834. },
  14835. "required": ["sessionID", "info"],
  14836. "additionalProperties": false
  14837. }
  14838. },
  14839. "required": ["id", "type", "properties"],
  14840. "additionalProperties": false
  14841. },
  14842. {
  14843. "type": "object",
  14844. "properties": {
  14845. "id": {
  14846. "type": "string",
  14847. "pattern": "^evt_"
  14848. },
  14849. "type": {
  14850. "type": "string",
  14851. "enum": ["session.deleted"]
  14852. },
  14853. "properties": {
  14854. "type": "object",
  14855. "properties": {
  14856. "sessionID": {
  14857. "type": "string",
  14858. "pattern": "^ses"
  14859. },
  14860. "info": {
  14861. "$ref": "#/components/schemas/Session"
  14862. }
  14863. },
  14864. "required": ["sessionID", "info"],
  14865. "additionalProperties": false
  14866. }
  14867. },
  14868. "required": ["id", "type", "properties"],
  14869. "additionalProperties": false
  14870. },
  14871. {
  14872. "type": "object",
  14873. "properties": {
  14874. "id": {
  14875. "type": "string",
  14876. "pattern": "^evt_"
  14877. },
  14878. "type": {
  14879. "type": "string",
  14880. "enum": ["message.updated"]
  14881. },
  14882. "properties": {
  14883. "type": "object",
  14884. "properties": {
  14885. "sessionID": {
  14886. "type": "string",
  14887. "pattern": "^ses"
  14888. },
  14889. "info": {
  14890. "$ref": "#/components/schemas/Message"
  14891. }
  14892. },
  14893. "required": ["sessionID", "info"],
  14894. "additionalProperties": false
  14895. }
  14896. },
  14897. "required": ["id", "type", "properties"],
  14898. "additionalProperties": false
  14899. },
  14900. {
  14901. "type": "object",
  14902. "properties": {
  14903. "id": {
  14904. "type": "string",
  14905. "pattern": "^evt_"
  14906. },
  14907. "type": {
  14908. "type": "string",
  14909. "enum": ["message.removed"]
  14910. },
  14911. "properties": {
  14912. "type": "object",
  14913. "properties": {
  14914. "sessionID": {
  14915. "type": "string",
  14916. "pattern": "^ses"
  14917. },
  14918. "messageID": {
  14919. "type": "string",
  14920. "pattern": "^msg"
  14921. }
  14922. },
  14923. "required": ["sessionID", "messageID"],
  14924. "additionalProperties": false
  14925. }
  14926. },
  14927. "required": ["id", "type", "properties"],
  14928. "additionalProperties": false
  14929. },
  14930. {
  14931. "type": "object",
  14932. "properties": {
  14933. "id": {
  14934. "type": "string",
  14935. "pattern": "^evt_"
  14936. },
  14937. "type": {
  14938. "type": "string",
  14939. "enum": ["message.part.updated"]
  14940. },
  14941. "properties": {
  14942. "type": "object",
  14943. "properties": {
  14944. "sessionID": {
  14945. "type": "string",
  14946. "pattern": "^ses"
  14947. },
  14948. "part": {
  14949. "$ref": "#/components/schemas/Part"
  14950. },
  14951. "time": {
  14952. "type": "number"
  14953. }
  14954. },
  14955. "required": ["sessionID", "part", "time"],
  14956. "additionalProperties": false
  14957. }
  14958. },
  14959. "required": ["id", "type", "properties"],
  14960. "additionalProperties": false
  14961. },
  14962. {
  14963. "type": "object",
  14964. "properties": {
  14965. "id": {
  14966. "type": "string",
  14967. "pattern": "^evt_"
  14968. },
  14969. "type": {
  14970. "type": "string",
  14971. "enum": ["message.part.removed"]
  14972. },
  14973. "properties": {
  14974. "type": "object",
  14975. "properties": {
  14976. "sessionID": {
  14977. "type": "string",
  14978. "pattern": "^ses"
  14979. },
  14980. "messageID": {
  14981. "type": "string",
  14982. "pattern": "^msg"
  14983. },
  14984. "partID": {
  14985. "type": "string",
  14986. "pattern": "^prt"
  14987. }
  14988. },
  14989. "required": ["sessionID", "messageID", "partID"],
  14990. "additionalProperties": false
  14991. }
  14992. },
  14993. "required": ["id", "type", "properties"],
  14994. "additionalProperties": false
  14995. },
  14996. {
  14997. "type": "object",
  14998. "properties": {
  14999. "id": {
  15000. "type": "string",
  15001. "pattern": "^evt_"
  15002. },
  15003. "type": {
  15004. "type": "string",
  15005. "enum": ["session.next.agent.switched"]
  15006. },
  15007. "properties": {
  15008. "type": "object",
  15009. "properties": {
  15010. "timestamp": {
  15011. "type": "number"
  15012. },
  15013. "sessionID": {
  15014. "type": "string",
  15015. "pattern": "^ses"
  15016. },
  15017. "messageID": {
  15018. "type": "string",
  15019. "pattern": "^msg_"
  15020. },
  15021. "agent": {
  15022. "type": "string"
  15023. }
  15024. },
  15025. "required": ["timestamp", "sessionID", "messageID", "agent"],
  15026. "additionalProperties": false
  15027. }
  15028. },
  15029. "required": ["id", "type", "properties"],
  15030. "additionalProperties": false
  15031. },
  15032. {
  15033. "type": "object",
  15034. "properties": {
  15035. "id": {
  15036. "type": "string",
  15037. "pattern": "^evt_"
  15038. },
  15039. "type": {
  15040. "type": "string",
  15041. "enum": ["session.next.model.switched"]
  15042. },
  15043. "properties": {
  15044. "type": "object",
  15045. "properties": {
  15046. "timestamp": {
  15047. "type": "number"
  15048. },
  15049. "sessionID": {
  15050. "type": "string",
  15051. "pattern": "^ses"
  15052. },
  15053. "messageID": {
  15054. "type": "string",
  15055. "pattern": "^msg_"
  15056. },
  15057. "model": {
  15058. "type": "object",
  15059. "properties": {
  15060. "id": {
  15061. "type": "string"
  15062. },
  15063. "providerID": {
  15064. "type": "string"
  15065. },
  15066. "variant": {
  15067. "type": "string"
  15068. }
  15069. },
  15070. "required": ["id", "providerID"],
  15071. "additionalProperties": false
  15072. }
  15073. },
  15074. "required": ["timestamp", "sessionID", "messageID", "model"],
  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.moved"]
  15091. },
  15092. "properties": {
  15093. "type": "object",
  15094. "properties": {
  15095. "timestamp": {
  15096. "type": "number"
  15097. },
  15098. "sessionID": {
  15099. "type": "string",
  15100. "pattern": "^ses"
  15101. },
  15102. "location": {
  15103. "$ref": "#/components/schemas/LocationRef"
  15104. },
  15105. "subdirectory": {
  15106. "type": "string"
  15107. }
  15108. },
  15109. "required": ["timestamp", "sessionID", "location"],
  15110. "additionalProperties": false
  15111. }
  15112. },
  15113. "required": ["id", "type", "properties"],
  15114. "additionalProperties": false
  15115. },
  15116. {
  15117. "type": "object",
  15118. "properties": {
  15119. "id": {
  15120. "type": "string",
  15121. "pattern": "^evt_"
  15122. },
  15123. "type": {
  15124. "type": "string",
  15125. "enum": ["session.next.prompted"]
  15126. },
  15127. "properties": {
  15128. "type": "object",
  15129. "properties": {
  15130. "timestamp": {
  15131. "type": "number"
  15132. },
  15133. "sessionID": {
  15134. "type": "string",
  15135. "pattern": "^ses"
  15136. },
  15137. "messageID": {
  15138. "type": "string",
  15139. "pattern": "^msg_"
  15140. },
  15141. "prompt": {
  15142. "$ref": "#/components/schemas/Prompt"
  15143. },
  15144. "delivery": {
  15145. "type": "string",
  15146. "enum": ["steer", "queue"]
  15147. }
  15148. },
  15149. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  15150. "additionalProperties": false
  15151. }
  15152. },
  15153. "required": ["id", "type", "properties"],
  15154. "additionalProperties": false
  15155. },
  15156. {
  15157. "type": "object",
  15158. "properties": {
  15159. "id": {
  15160. "type": "string",
  15161. "pattern": "^evt_"
  15162. },
  15163. "type": {
  15164. "type": "string",
  15165. "enum": ["session.next.prompt.admitted"]
  15166. },
  15167. "properties": {
  15168. "type": "object",
  15169. "properties": {
  15170. "timestamp": {
  15171. "type": "number"
  15172. },
  15173. "sessionID": {
  15174. "type": "string",
  15175. "pattern": "^ses"
  15176. },
  15177. "messageID": {
  15178. "type": "string",
  15179. "pattern": "^msg_"
  15180. },
  15181. "prompt": {
  15182. "$ref": "#/components/schemas/Prompt"
  15183. },
  15184. "delivery": {
  15185. "type": "string",
  15186. "enum": ["steer", "queue"]
  15187. }
  15188. },
  15189. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  15190. "additionalProperties": false
  15191. }
  15192. },
  15193. "required": ["id", "type", "properties"],
  15194. "additionalProperties": false
  15195. },
  15196. {
  15197. "type": "object",
  15198. "properties": {
  15199. "id": {
  15200. "type": "string",
  15201. "pattern": "^evt_"
  15202. },
  15203. "type": {
  15204. "type": "string",
  15205. "enum": ["session.next.prompt.promoted"]
  15206. },
  15207. "properties": {
  15208. "type": "object",
  15209. "properties": {
  15210. "timestamp": {
  15211. "type": "number"
  15212. },
  15213. "sessionID": {
  15214. "type": "string",
  15215. "pattern": "^ses"
  15216. },
  15217. "messageID": {
  15218. "type": "string",
  15219. "pattern": "^msg_"
  15220. },
  15221. "prompt": {
  15222. "$ref": "#/components/schemas/Prompt"
  15223. },
  15224. "timeCreated": {
  15225. "type": "number"
  15226. }
  15227. },
  15228. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  15229. "additionalProperties": false
  15230. }
  15231. },
  15232. "required": ["id", "type", "properties"],
  15233. "additionalProperties": false
  15234. },
  15235. {
  15236. "type": "object",
  15237. "properties": {
  15238. "id": {
  15239. "type": "string",
  15240. "pattern": "^evt_"
  15241. },
  15242. "type": {
  15243. "type": "string",
  15244. "enum": ["session.next.interrupt.requested"]
  15245. },
  15246. "properties": {
  15247. "type": "object",
  15248. "properties": {
  15249. "timestamp": {
  15250. "type": "number"
  15251. },
  15252. "sessionID": {
  15253. "type": "string",
  15254. "pattern": "^ses"
  15255. }
  15256. },
  15257. "required": ["timestamp", "sessionID"],
  15258. "additionalProperties": false
  15259. }
  15260. },
  15261. "required": ["id", "type", "properties"],
  15262. "additionalProperties": false
  15263. },
  15264. {
  15265. "type": "object",
  15266. "properties": {
  15267. "id": {
  15268. "type": "string",
  15269. "pattern": "^evt_"
  15270. },
  15271. "type": {
  15272. "type": "string",
  15273. "enum": ["session.next.context.updated"]
  15274. },
  15275. "properties": {
  15276. "type": "object",
  15277. "properties": {
  15278. "timestamp": {
  15279. "type": "number"
  15280. },
  15281. "sessionID": {
  15282. "type": "string",
  15283. "pattern": "^ses"
  15284. },
  15285. "messageID": {
  15286. "type": "string",
  15287. "pattern": "^msg_"
  15288. },
  15289. "text": {
  15290. "type": "string"
  15291. }
  15292. },
  15293. "required": ["timestamp", "sessionID", "messageID", "text"],
  15294. "additionalProperties": false
  15295. }
  15296. },
  15297. "required": ["id", "type", "properties"],
  15298. "additionalProperties": false
  15299. },
  15300. {
  15301. "type": "object",
  15302. "properties": {
  15303. "id": {
  15304. "type": "string",
  15305. "pattern": "^evt_"
  15306. },
  15307. "type": {
  15308. "type": "string",
  15309. "enum": ["session.next.synthetic"]
  15310. },
  15311. "properties": {
  15312. "type": "object",
  15313. "properties": {
  15314. "timestamp": {
  15315. "type": "number"
  15316. },
  15317. "sessionID": {
  15318. "type": "string",
  15319. "pattern": "^ses"
  15320. },
  15321. "messageID": {
  15322. "type": "string",
  15323. "pattern": "^msg_"
  15324. },
  15325. "text": {
  15326. "type": "string"
  15327. }
  15328. },
  15329. "required": ["timestamp", "sessionID", "messageID", "text"],
  15330. "additionalProperties": false
  15331. }
  15332. },
  15333. "required": ["id", "type", "properties"],
  15334. "additionalProperties": false
  15335. },
  15336. {
  15337. "type": "object",
  15338. "properties": {
  15339. "id": {
  15340. "type": "string",
  15341. "pattern": "^evt_"
  15342. },
  15343. "type": {
  15344. "type": "string",
  15345. "enum": ["session.next.shell.started"]
  15346. },
  15347. "properties": {
  15348. "type": "object",
  15349. "properties": {
  15350. "timestamp": {
  15351. "type": "number"
  15352. },
  15353. "sessionID": {
  15354. "type": "string",
  15355. "pattern": "^ses"
  15356. },
  15357. "messageID": {
  15358. "type": "string",
  15359. "pattern": "^msg_"
  15360. },
  15361. "callID": {
  15362. "type": "string"
  15363. },
  15364. "command": {
  15365. "type": "string"
  15366. }
  15367. },
  15368. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  15369. "additionalProperties": false
  15370. }
  15371. },
  15372. "required": ["id", "type", "properties"],
  15373. "additionalProperties": false
  15374. },
  15375. {
  15376. "type": "object",
  15377. "properties": {
  15378. "id": {
  15379. "type": "string",
  15380. "pattern": "^evt_"
  15381. },
  15382. "type": {
  15383. "type": "string",
  15384. "enum": ["session.next.shell.ended"]
  15385. },
  15386. "properties": {
  15387. "type": "object",
  15388. "properties": {
  15389. "timestamp": {
  15390. "type": "number"
  15391. },
  15392. "sessionID": {
  15393. "type": "string",
  15394. "pattern": "^ses"
  15395. },
  15396. "callID": {
  15397. "type": "string"
  15398. },
  15399. "output": {
  15400. "type": "string"
  15401. }
  15402. },
  15403. "required": ["timestamp", "sessionID", "callID", "output"],
  15404. "additionalProperties": false
  15405. }
  15406. },
  15407. "required": ["id", "type", "properties"],
  15408. "additionalProperties": false
  15409. },
  15410. {
  15411. "type": "object",
  15412. "properties": {
  15413. "id": {
  15414. "type": "string",
  15415. "pattern": "^evt_"
  15416. },
  15417. "type": {
  15418. "type": "string",
  15419. "enum": ["session.next.step.started"]
  15420. },
  15421. "properties": {
  15422. "type": "object",
  15423. "properties": {
  15424. "timestamp": {
  15425. "type": "number"
  15426. },
  15427. "sessionID": {
  15428. "type": "string",
  15429. "pattern": "^ses"
  15430. },
  15431. "assistantMessageID": {
  15432. "type": "string",
  15433. "pattern": "^msg_"
  15434. },
  15435. "agent": {
  15436. "type": "string"
  15437. },
  15438. "model": {
  15439. "type": "object",
  15440. "properties": {
  15441. "id": {
  15442. "type": "string"
  15443. },
  15444. "providerID": {
  15445. "type": "string"
  15446. },
  15447. "variant": {
  15448. "type": "string"
  15449. }
  15450. },
  15451. "required": ["id", "providerID"],
  15452. "additionalProperties": false
  15453. },
  15454. "snapshot": {
  15455. "type": "string"
  15456. }
  15457. },
  15458. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  15459. "additionalProperties": false
  15460. }
  15461. },
  15462. "required": ["id", "type", "properties"],
  15463. "additionalProperties": false
  15464. },
  15465. {
  15466. "type": "object",
  15467. "properties": {
  15468. "id": {
  15469. "type": "string",
  15470. "pattern": "^evt_"
  15471. },
  15472. "type": {
  15473. "type": "string",
  15474. "enum": ["session.next.step.ended"]
  15475. },
  15476. "properties": {
  15477. "type": "object",
  15478. "properties": {
  15479. "timestamp": {
  15480. "type": "number"
  15481. },
  15482. "sessionID": {
  15483. "type": "string",
  15484. "pattern": "^ses"
  15485. },
  15486. "assistantMessageID": {
  15487. "type": "string",
  15488. "pattern": "^msg_"
  15489. },
  15490. "finish": {
  15491. "type": "string"
  15492. },
  15493. "cost": {
  15494. "type": "number"
  15495. },
  15496. "tokens": {
  15497. "type": "object",
  15498. "properties": {
  15499. "input": {
  15500. "type": "number"
  15501. },
  15502. "output": {
  15503. "type": "number"
  15504. },
  15505. "reasoning": {
  15506. "type": "number"
  15507. },
  15508. "cache": {
  15509. "type": "object",
  15510. "properties": {
  15511. "read": {
  15512. "type": "number"
  15513. },
  15514. "write": {
  15515. "type": "number"
  15516. }
  15517. },
  15518. "required": ["read", "write"],
  15519. "additionalProperties": false
  15520. }
  15521. },
  15522. "required": ["input", "output", "reasoning", "cache"],
  15523. "additionalProperties": false
  15524. },
  15525. "snapshot": {
  15526. "type": "string"
  15527. }
  15528. },
  15529. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  15530. "additionalProperties": false
  15531. }
  15532. },
  15533. "required": ["id", "type", "properties"],
  15534. "additionalProperties": false
  15535. },
  15536. {
  15537. "type": "object",
  15538. "properties": {
  15539. "id": {
  15540. "type": "string",
  15541. "pattern": "^evt_"
  15542. },
  15543. "type": {
  15544. "type": "string",
  15545. "enum": ["session.next.step.failed"]
  15546. },
  15547. "properties": {
  15548. "type": "object",
  15549. "properties": {
  15550. "timestamp": {
  15551. "type": "number"
  15552. },
  15553. "sessionID": {
  15554. "type": "string",
  15555. "pattern": "^ses"
  15556. },
  15557. "assistantMessageID": {
  15558. "type": "string",
  15559. "pattern": "^msg_"
  15560. },
  15561. "error": {
  15562. "$ref": "#/components/schemas/SessionErrorUnknown"
  15563. }
  15564. },
  15565. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  15566. "additionalProperties": false
  15567. }
  15568. },
  15569. "required": ["id", "type", "properties"],
  15570. "additionalProperties": false
  15571. },
  15572. {
  15573. "type": "object",
  15574. "properties": {
  15575. "id": {
  15576. "type": "string",
  15577. "pattern": "^evt_"
  15578. },
  15579. "type": {
  15580. "type": "string",
  15581. "enum": ["session.next.text.started"]
  15582. },
  15583. "properties": {
  15584. "type": "object",
  15585. "properties": {
  15586. "timestamp": {
  15587. "type": "number"
  15588. },
  15589. "sessionID": {
  15590. "type": "string",
  15591. "pattern": "^ses"
  15592. },
  15593. "assistantMessageID": {
  15594. "type": "string",
  15595. "pattern": "^msg_"
  15596. },
  15597. "textID": {
  15598. "type": "string"
  15599. }
  15600. },
  15601. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  15602. "additionalProperties": false
  15603. }
  15604. },
  15605. "required": ["id", "type", "properties"],
  15606. "additionalProperties": false
  15607. },
  15608. {
  15609. "type": "object",
  15610. "properties": {
  15611. "id": {
  15612. "type": "string",
  15613. "pattern": "^evt_"
  15614. },
  15615. "type": {
  15616. "type": "string",
  15617. "enum": ["session.next.text.delta"]
  15618. },
  15619. "properties": {
  15620. "type": "object",
  15621. "properties": {
  15622. "timestamp": {
  15623. "type": "number"
  15624. },
  15625. "sessionID": {
  15626. "type": "string",
  15627. "pattern": "^ses"
  15628. },
  15629. "assistantMessageID": {
  15630. "type": "string",
  15631. "pattern": "^msg_"
  15632. },
  15633. "textID": {
  15634. "type": "string"
  15635. },
  15636. "delta": {
  15637. "type": "string"
  15638. }
  15639. },
  15640. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  15641. "additionalProperties": false
  15642. }
  15643. },
  15644. "required": ["id", "type", "properties"],
  15645. "additionalProperties": false
  15646. },
  15647. {
  15648. "type": "object",
  15649. "properties": {
  15650. "id": {
  15651. "type": "string",
  15652. "pattern": "^evt_"
  15653. },
  15654. "type": {
  15655. "type": "string",
  15656. "enum": ["session.next.text.ended"]
  15657. },
  15658. "properties": {
  15659. "type": "object",
  15660. "properties": {
  15661. "timestamp": {
  15662. "type": "number"
  15663. },
  15664. "sessionID": {
  15665. "type": "string",
  15666. "pattern": "^ses"
  15667. },
  15668. "assistantMessageID": {
  15669. "type": "string",
  15670. "pattern": "^msg_"
  15671. },
  15672. "textID": {
  15673. "type": "string"
  15674. },
  15675. "text": {
  15676. "type": "string"
  15677. }
  15678. },
  15679. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  15680. "additionalProperties": false
  15681. }
  15682. },
  15683. "required": ["id", "type", "properties"],
  15684. "additionalProperties": false
  15685. },
  15686. {
  15687. "type": "object",
  15688. "properties": {
  15689. "id": {
  15690. "type": "string",
  15691. "pattern": "^evt_"
  15692. },
  15693. "type": {
  15694. "type": "string",
  15695. "enum": ["session.next.reasoning.started"]
  15696. },
  15697. "properties": {
  15698. "type": "object",
  15699. "properties": {
  15700. "timestamp": {
  15701. "type": "number"
  15702. },
  15703. "sessionID": {
  15704. "type": "string",
  15705. "pattern": "^ses"
  15706. },
  15707. "assistantMessageID": {
  15708. "type": "string",
  15709. "pattern": "^msg_"
  15710. },
  15711. "reasoningID": {
  15712. "type": "string"
  15713. },
  15714. "providerMetadata": {
  15715. "type": "object",
  15716. "additionalProperties": {
  15717. "type": "object"
  15718. }
  15719. }
  15720. },
  15721. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  15722. "additionalProperties": false
  15723. }
  15724. },
  15725. "required": ["id", "type", "properties"],
  15726. "additionalProperties": false
  15727. },
  15728. {
  15729. "type": "object",
  15730. "properties": {
  15731. "id": {
  15732. "type": "string",
  15733. "pattern": "^evt_"
  15734. },
  15735. "type": {
  15736. "type": "string",
  15737. "enum": ["session.next.reasoning.delta"]
  15738. },
  15739. "properties": {
  15740. "type": "object",
  15741. "properties": {
  15742. "timestamp": {
  15743. "type": "number"
  15744. },
  15745. "sessionID": {
  15746. "type": "string",
  15747. "pattern": "^ses"
  15748. },
  15749. "assistantMessageID": {
  15750. "type": "string",
  15751. "pattern": "^msg_"
  15752. },
  15753. "reasoningID": {
  15754. "type": "string"
  15755. },
  15756. "delta": {
  15757. "type": "string"
  15758. }
  15759. },
  15760. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  15761. "additionalProperties": false
  15762. }
  15763. },
  15764. "required": ["id", "type", "properties"],
  15765. "additionalProperties": false
  15766. },
  15767. {
  15768. "type": "object",
  15769. "properties": {
  15770. "id": {
  15771. "type": "string",
  15772. "pattern": "^evt_"
  15773. },
  15774. "type": {
  15775. "type": "string",
  15776. "enum": ["session.next.reasoning.ended"]
  15777. },
  15778. "properties": {
  15779. "type": "object",
  15780. "properties": {
  15781. "timestamp": {
  15782. "type": "number"
  15783. },
  15784. "sessionID": {
  15785. "type": "string",
  15786. "pattern": "^ses"
  15787. },
  15788. "assistantMessageID": {
  15789. "type": "string",
  15790. "pattern": "^msg_"
  15791. },
  15792. "reasoningID": {
  15793. "type": "string"
  15794. },
  15795. "text": {
  15796. "type": "string"
  15797. },
  15798. "providerMetadata": {
  15799. "type": "object",
  15800. "additionalProperties": {
  15801. "type": "object"
  15802. }
  15803. }
  15804. },
  15805. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  15806. "additionalProperties": false
  15807. }
  15808. },
  15809. "required": ["id", "type", "properties"],
  15810. "additionalProperties": false
  15811. },
  15812. {
  15813. "type": "object",
  15814. "properties": {
  15815. "id": {
  15816. "type": "string",
  15817. "pattern": "^evt_"
  15818. },
  15819. "type": {
  15820. "type": "string",
  15821. "enum": ["session.next.tool.input.started"]
  15822. },
  15823. "properties": {
  15824. "type": "object",
  15825. "properties": {
  15826. "timestamp": {
  15827. "type": "number"
  15828. },
  15829. "sessionID": {
  15830. "type": "string",
  15831. "pattern": "^ses"
  15832. },
  15833. "assistantMessageID": {
  15834. "type": "string",
  15835. "pattern": "^msg_"
  15836. },
  15837. "callID": {
  15838. "type": "string"
  15839. },
  15840. "name": {
  15841. "type": "string"
  15842. }
  15843. },
  15844. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  15845. "additionalProperties": false
  15846. }
  15847. },
  15848. "required": ["id", "type", "properties"],
  15849. "additionalProperties": false
  15850. },
  15851. {
  15852. "type": "object",
  15853. "properties": {
  15854. "id": {
  15855. "type": "string",
  15856. "pattern": "^evt_"
  15857. },
  15858. "type": {
  15859. "type": "string",
  15860. "enum": ["session.next.tool.input.delta"]
  15861. },
  15862. "properties": {
  15863. "type": "object",
  15864. "properties": {
  15865. "timestamp": {
  15866. "type": "number"
  15867. },
  15868. "sessionID": {
  15869. "type": "string",
  15870. "pattern": "^ses"
  15871. },
  15872. "assistantMessageID": {
  15873. "type": "string",
  15874. "pattern": "^msg_"
  15875. },
  15876. "callID": {
  15877. "type": "string"
  15878. },
  15879. "delta": {
  15880. "type": "string"
  15881. }
  15882. },
  15883. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  15884. "additionalProperties": false
  15885. }
  15886. },
  15887. "required": ["id", "type", "properties"],
  15888. "additionalProperties": false
  15889. },
  15890. {
  15891. "type": "object",
  15892. "properties": {
  15893. "id": {
  15894. "type": "string",
  15895. "pattern": "^evt_"
  15896. },
  15897. "type": {
  15898. "type": "string",
  15899. "enum": ["session.next.tool.input.ended"]
  15900. },
  15901. "properties": {
  15902. "type": "object",
  15903. "properties": {
  15904. "timestamp": {
  15905. "type": "number"
  15906. },
  15907. "sessionID": {
  15908. "type": "string",
  15909. "pattern": "^ses"
  15910. },
  15911. "assistantMessageID": {
  15912. "type": "string",
  15913. "pattern": "^msg_"
  15914. },
  15915. "callID": {
  15916. "type": "string"
  15917. },
  15918. "text": {
  15919. "type": "string"
  15920. }
  15921. },
  15922. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  15923. "additionalProperties": false
  15924. }
  15925. },
  15926. "required": ["id", "type", "properties"],
  15927. "additionalProperties": false
  15928. },
  15929. {
  15930. "type": "object",
  15931. "properties": {
  15932. "id": {
  15933. "type": "string",
  15934. "pattern": "^evt_"
  15935. },
  15936. "type": {
  15937. "type": "string",
  15938. "enum": ["session.next.tool.called"]
  15939. },
  15940. "properties": {
  15941. "type": "object",
  15942. "properties": {
  15943. "timestamp": {
  15944. "type": "number"
  15945. },
  15946. "sessionID": {
  15947. "type": "string",
  15948. "pattern": "^ses"
  15949. },
  15950. "assistantMessageID": {
  15951. "type": "string",
  15952. "pattern": "^msg_"
  15953. },
  15954. "callID": {
  15955. "type": "string"
  15956. },
  15957. "tool": {
  15958. "type": "string"
  15959. },
  15960. "input": {
  15961. "type": "object"
  15962. },
  15963. "provider": {
  15964. "type": "object",
  15965. "properties": {
  15966. "executed": {
  15967. "type": "boolean"
  15968. },
  15969. "metadata": {
  15970. "type": "object",
  15971. "additionalProperties": {
  15972. "type": "object"
  15973. }
  15974. }
  15975. },
  15976. "required": ["executed"],
  15977. "additionalProperties": false
  15978. }
  15979. },
  15980. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15981. "additionalProperties": false
  15982. }
  15983. },
  15984. "required": ["id", "type", "properties"],
  15985. "additionalProperties": false
  15986. },
  15987. {
  15988. "type": "object",
  15989. "properties": {
  15990. "id": {
  15991. "type": "string",
  15992. "pattern": "^evt_"
  15993. },
  15994. "type": {
  15995. "type": "string",
  15996. "enum": ["session.next.tool.progress"]
  15997. },
  15998. "properties": {
  15999. "type": "object",
  16000. "properties": {
  16001. "timestamp": {
  16002. "type": "number"
  16003. },
  16004. "sessionID": {
  16005. "type": "string",
  16006. "pattern": "^ses"
  16007. },
  16008. "assistantMessageID": {
  16009. "type": "string",
  16010. "pattern": "^msg_"
  16011. },
  16012. "callID": {
  16013. "type": "string"
  16014. },
  16015. "structured": {
  16016. "type": "object"
  16017. },
  16018. "content": {
  16019. "type": "array",
  16020. "items": {
  16021. "anyOf": [
  16022. {
  16023. "$ref": "#/components/schemas/ToolTextContent"
  16024. },
  16025. {
  16026. "$ref": "#/components/schemas/ToolFileContent"
  16027. }
  16028. ]
  16029. }
  16030. }
  16031. },
  16032. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  16033. "additionalProperties": false
  16034. }
  16035. },
  16036. "required": ["id", "type", "properties"],
  16037. "additionalProperties": false
  16038. },
  16039. {
  16040. "type": "object",
  16041. "properties": {
  16042. "id": {
  16043. "type": "string",
  16044. "pattern": "^evt_"
  16045. },
  16046. "type": {
  16047. "type": "string",
  16048. "enum": ["session.next.tool.success"]
  16049. },
  16050. "properties": {
  16051. "type": "object",
  16052. "properties": {
  16053. "timestamp": {
  16054. "type": "number"
  16055. },
  16056. "sessionID": {
  16057. "type": "string",
  16058. "pattern": "^ses"
  16059. },
  16060. "assistantMessageID": {
  16061. "type": "string",
  16062. "pattern": "^msg_"
  16063. },
  16064. "callID": {
  16065. "type": "string"
  16066. },
  16067. "structured": {
  16068. "type": "object"
  16069. },
  16070. "content": {
  16071. "type": "array",
  16072. "items": {
  16073. "anyOf": [
  16074. {
  16075. "$ref": "#/components/schemas/ToolTextContent"
  16076. },
  16077. {
  16078. "$ref": "#/components/schemas/ToolFileContent"
  16079. }
  16080. ]
  16081. }
  16082. },
  16083. "outputPaths": {
  16084. "type": "array",
  16085. "items": {
  16086. "type": "string"
  16087. }
  16088. },
  16089. "result": {},
  16090. "provider": {
  16091. "type": "object",
  16092. "properties": {
  16093. "executed": {
  16094. "type": "boolean"
  16095. },
  16096. "metadata": {
  16097. "type": "object",
  16098. "additionalProperties": {
  16099. "type": "object"
  16100. }
  16101. }
  16102. },
  16103. "required": ["executed"],
  16104. "additionalProperties": false
  16105. }
  16106. },
  16107. "required": [
  16108. "timestamp",
  16109. "sessionID",
  16110. "assistantMessageID",
  16111. "callID",
  16112. "structured",
  16113. "content",
  16114. "provider"
  16115. ],
  16116. "additionalProperties": false
  16117. }
  16118. },
  16119. "required": ["id", "type", "properties"],
  16120. "additionalProperties": false
  16121. },
  16122. {
  16123. "type": "object",
  16124. "properties": {
  16125. "id": {
  16126. "type": "string",
  16127. "pattern": "^evt_"
  16128. },
  16129. "type": {
  16130. "type": "string",
  16131. "enum": ["session.next.tool.failed"]
  16132. },
  16133. "properties": {
  16134. "type": "object",
  16135. "properties": {
  16136. "timestamp": {
  16137. "type": "number"
  16138. },
  16139. "sessionID": {
  16140. "type": "string",
  16141. "pattern": "^ses"
  16142. },
  16143. "assistantMessageID": {
  16144. "type": "string",
  16145. "pattern": "^msg_"
  16146. },
  16147. "callID": {
  16148. "type": "string"
  16149. },
  16150. "error": {
  16151. "$ref": "#/components/schemas/SessionErrorUnknown"
  16152. },
  16153. "result": {},
  16154. "provider": {
  16155. "type": "object",
  16156. "properties": {
  16157. "executed": {
  16158. "type": "boolean"
  16159. },
  16160. "metadata": {
  16161. "type": "object",
  16162. "additionalProperties": {
  16163. "type": "object"
  16164. }
  16165. }
  16166. },
  16167. "required": ["executed"],
  16168. "additionalProperties": false
  16169. }
  16170. },
  16171. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  16172. "additionalProperties": false
  16173. }
  16174. },
  16175. "required": ["id", "type", "properties"],
  16176. "additionalProperties": false
  16177. },
  16178. {
  16179. "type": "object",
  16180. "properties": {
  16181. "id": {
  16182. "type": "string",
  16183. "pattern": "^evt_"
  16184. },
  16185. "type": {
  16186. "type": "string",
  16187. "enum": ["session.next.retried"]
  16188. },
  16189. "properties": {
  16190. "type": "object",
  16191. "properties": {
  16192. "timestamp": {
  16193. "type": "number"
  16194. },
  16195. "sessionID": {
  16196. "type": "string",
  16197. "pattern": "^ses"
  16198. },
  16199. "attempt": {
  16200. "type": "number"
  16201. },
  16202. "error": {
  16203. "$ref": "#/components/schemas/SessionNextRetry_error"
  16204. }
  16205. },
  16206. "required": ["timestamp", "sessionID", "attempt", "error"],
  16207. "additionalProperties": false
  16208. }
  16209. },
  16210. "required": ["id", "type", "properties"],
  16211. "additionalProperties": false
  16212. },
  16213. {
  16214. "type": "object",
  16215. "properties": {
  16216. "id": {
  16217. "type": "string",
  16218. "pattern": "^evt_"
  16219. },
  16220. "type": {
  16221. "type": "string",
  16222. "enum": ["session.next.compaction.started"]
  16223. },
  16224. "properties": {
  16225. "type": "object",
  16226. "properties": {
  16227. "timestamp": {
  16228. "type": "number"
  16229. },
  16230. "sessionID": {
  16231. "type": "string",
  16232. "pattern": "^ses"
  16233. },
  16234. "messageID": {
  16235. "type": "string",
  16236. "pattern": "^msg_"
  16237. },
  16238. "reason": {
  16239. "type": "string",
  16240. "enum": ["auto", "manual"]
  16241. }
  16242. },
  16243. "required": ["timestamp", "sessionID", "messageID", "reason"],
  16244. "additionalProperties": false
  16245. }
  16246. },
  16247. "required": ["id", "type", "properties"],
  16248. "additionalProperties": false
  16249. },
  16250. {
  16251. "type": "object",
  16252. "properties": {
  16253. "id": {
  16254. "type": "string",
  16255. "pattern": "^evt_"
  16256. },
  16257. "type": {
  16258. "type": "string",
  16259. "enum": ["session.next.compaction.delta"]
  16260. },
  16261. "properties": {
  16262. "type": "object",
  16263. "properties": {
  16264. "timestamp": {
  16265. "type": "number"
  16266. },
  16267. "sessionID": {
  16268. "type": "string",
  16269. "pattern": "^ses"
  16270. },
  16271. "messageID": {
  16272. "type": "string",
  16273. "pattern": "^msg_"
  16274. },
  16275. "text": {
  16276. "type": "string"
  16277. }
  16278. },
  16279. "required": ["timestamp", "sessionID", "messageID", "text"],
  16280. "additionalProperties": false
  16281. }
  16282. },
  16283. "required": ["id", "type", "properties"],
  16284. "additionalProperties": false
  16285. },
  16286. {
  16287. "type": "object",
  16288. "properties": {
  16289. "id": {
  16290. "type": "string",
  16291. "pattern": "^evt_"
  16292. },
  16293. "type": {
  16294. "type": "string",
  16295. "enum": ["session.next.compaction.ended"]
  16296. },
  16297. "properties": {
  16298. "type": "object",
  16299. "properties": {
  16300. "timestamp": {
  16301. "type": "number"
  16302. },
  16303. "sessionID": {
  16304. "type": "string",
  16305. "pattern": "^ses"
  16306. },
  16307. "messageID": {
  16308. "type": "string",
  16309. "pattern": "^msg_"
  16310. },
  16311. "reason": {
  16312. "type": "string",
  16313. "enum": ["auto", "manual"]
  16314. },
  16315. "text": {
  16316. "type": "string"
  16317. },
  16318. "recent": {
  16319. "type": "string"
  16320. }
  16321. },
  16322. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  16323. "additionalProperties": false
  16324. }
  16325. },
  16326. "required": ["id", "type", "properties"],
  16327. "additionalProperties": false
  16328. },
  16329. {
  16330. "type": "object",
  16331. "properties": {
  16332. "id": {
  16333. "type": "string",
  16334. "pattern": "^evt_"
  16335. },
  16336. "type": {
  16337. "type": "string",
  16338. "enum": ["message.part.delta"]
  16339. },
  16340. "properties": {
  16341. "type": "object",
  16342. "properties": {
  16343. "sessionID": {
  16344. "type": "string",
  16345. "pattern": "^ses"
  16346. },
  16347. "messageID": {
  16348. "type": "string",
  16349. "pattern": "^msg"
  16350. },
  16351. "partID": {
  16352. "type": "string",
  16353. "pattern": "^prt"
  16354. },
  16355. "field": {
  16356. "type": "string"
  16357. },
  16358. "delta": {
  16359. "type": "string"
  16360. }
  16361. },
  16362. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16363. "additionalProperties": false
  16364. }
  16365. },
  16366. "required": ["id", "type", "properties"],
  16367. "additionalProperties": false
  16368. },
  16369. {
  16370. "type": "object",
  16371. "properties": {
  16372. "id": {
  16373. "type": "string",
  16374. "pattern": "^evt_"
  16375. },
  16376. "type": {
  16377. "type": "string",
  16378. "enum": ["session.diff"]
  16379. },
  16380. "properties": {
  16381. "type": "object",
  16382. "properties": {
  16383. "sessionID": {
  16384. "type": "string",
  16385. "pattern": "^ses"
  16386. },
  16387. "diff": {
  16388. "type": "array",
  16389. "items": {
  16390. "$ref": "#/components/schemas/SnapshotFileDiff"
  16391. }
  16392. }
  16393. },
  16394. "required": ["sessionID", "diff"],
  16395. "additionalProperties": false
  16396. }
  16397. },
  16398. "required": ["id", "type", "properties"],
  16399. "additionalProperties": false
  16400. },
  16401. {
  16402. "type": "object",
  16403. "properties": {
  16404. "id": {
  16405. "type": "string",
  16406. "pattern": "^evt_"
  16407. },
  16408. "type": {
  16409. "type": "string",
  16410. "enum": ["session.error"]
  16411. },
  16412. "properties": {
  16413. "type": "object",
  16414. "properties": {
  16415. "sessionID": {
  16416. "type": "string",
  16417. "pattern": "^ses"
  16418. },
  16419. "error": {
  16420. "anyOf": [
  16421. {
  16422. "$ref": "#/components/schemas/ProviderAuthError"
  16423. },
  16424. {
  16425. "$ref": "#/components/schemas/UnknownError"
  16426. },
  16427. {
  16428. "$ref": "#/components/schemas/MessageOutputLengthError"
  16429. },
  16430. {
  16431. "$ref": "#/components/schemas/MessageAbortedError"
  16432. },
  16433. {
  16434. "$ref": "#/components/schemas/StructuredOutputError"
  16435. },
  16436. {
  16437. "$ref": "#/components/schemas/ContextOverflowError"
  16438. },
  16439. {
  16440. "$ref": "#/components/schemas/APIError"
  16441. }
  16442. ]
  16443. }
  16444. },
  16445. "additionalProperties": false
  16446. }
  16447. },
  16448. "required": ["id", "type", "properties"],
  16449. "additionalProperties": false
  16450. },
  16451. {
  16452. "type": "object",
  16453. "properties": {
  16454. "id": {
  16455. "type": "string",
  16456. "pattern": "^evt_"
  16457. },
  16458. "type": {
  16459. "type": "string",
  16460. "enum": ["installation.updated"]
  16461. },
  16462. "properties": {
  16463. "type": "object",
  16464. "properties": {
  16465. "version": {
  16466. "type": "string"
  16467. }
  16468. },
  16469. "required": ["version"],
  16470. "additionalProperties": false
  16471. }
  16472. },
  16473. "required": ["id", "type", "properties"],
  16474. "additionalProperties": false
  16475. },
  16476. {
  16477. "type": "object",
  16478. "properties": {
  16479. "id": {
  16480. "type": "string",
  16481. "pattern": "^evt_"
  16482. },
  16483. "type": {
  16484. "type": "string",
  16485. "enum": ["installation.update-available"]
  16486. },
  16487. "properties": {
  16488. "type": "object",
  16489. "properties": {
  16490. "version": {
  16491. "type": "string"
  16492. }
  16493. },
  16494. "required": ["version"],
  16495. "additionalProperties": false
  16496. }
  16497. },
  16498. "required": ["id", "type", "properties"],
  16499. "additionalProperties": false
  16500. },
  16501. {
  16502. "type": "object",
  16503. "properties": {
  16504. "id": {
  16505. "type": "string",
  16506. "pattern": "^evt_"
  16507. },
  16508. "type": {
  16509. "type": "string",
  16510. "enum": ["file.edited"]
  16511. },
  16512. "properties": {
  16513. "type": "object",
  16514. "properties": {
  16515. "file": {
  16516. "type": "string"
  16517. }
  16518. },
  16519. "required": ["file"],
  16520. "additionalProperties": false
  16521. }
  16522. },
  16523. "required": ["id", "type", "properties"],
  16524. "additionalProperties": false
  16525. },
  16526. {
  16527. "type": "object",
  16528. "properties": {
  16529. "id": {
  16530. "type": "string",
  16531. "pattern": "^evt_"
  16532. },
  16533. "type": {
  16534. "type": "string",
  16535. "enum": ["account.added"]
  16536. },
  16537. "properties": {
  16538. "type": "object",
  16539. "properties": {
  16540. "account": {
  16541. "$ref": "#/components/schemas/AuthInfo"
  16542. }
  16543. },
  16544. "required": ["account"],
  16545. "additionalProperties": false
  16546. }
  16547. },
  16548. "required": ["id", "type", "properties"],
  16549. "additionalProperties": false
  16550. },
  16551. {
  16552. "type": "object",
  16553. "properties": {
  16554. "id": {
  16555. "type": "string",
  16556. "pattern": "^evt_"
  16557. },
  16558. "type": {
  16559. "type": "string",
  16560. "enum": ["account.removed"]
  16561. },
  16562. "properties": {
  16563. "type": "object",
  16564. "properties": {
  16565. "account": {
  16566. "$ref": "#/components/schemas/AuthInfo"
  16567. }
  16568. },
  16569. "required": ["account"],
  16570. "additionalProperties": false
  16571. }
  16572. },
  16573. "required": ["id", "type", "properties"],
  16574. "additionalProperties": false
  16575. },
  16576. {
  16577. "type": "object",
  16578. "properties": {
  16579. "id": {
  16580. "type": "string",
  16581. "pattern": "^evt_"
  16582. },
  16583. "type": {
  16584. "type": "string",
  16585. "enum": ["account.switched"]
  16586. },
  16587. "properties": {
  16588. "type": "object",
  16589. "properties": {
  16590. "serviceID": {
  16591. "type": "string"
  16592. },
  16593. "from": {
  16594. "type": "string"
  16595. },
  16596. "to": {
  16597. "type": "string"
  16598. }
  16599. },
  16600. "required": ["serviceID"],
  16601. "additionalProperties": false
  16602. }
  16603. },
  16604. "required": ["id", "type", "properties"],
  16605. "additionalProperties": false
  16606. },
  16607. {
  16608. "type": "object",
  16609. "properties": {
  16610. "id": {
  16611. "type": "string",
  16612. "pattern": "^evt_"
  16613. },
  16614. "type": {
  16615. "type": "string",
  16616. "enum": ["permission.v2.asked"]
  16617. },
  16618. "properties": {
  16619. "type": "object",
  16620. "properties": {
  16621. "id": {
  16622. "type": "string",
  16623. "pattern": "^per"
  16624. },
  16625. "sessionID": {
  16626. "type": "string",
  16627. "pattern": "^ses"
  16628. },
  16629. "action": {
  16630. "type": "string"
  16631. },
  16632. "resources": {
  16633. "type": "array",
  16634. "items": {
  16635. "type": "string"
  16636. }
  16637. },
  16638. "save": {
  16639. "type": "array",
  16640. "items": {
  16641. "type": "string"
  16642. }
  16643. },
  16644. "metadata": {
  16645. "type": "object"
  16646. },
  16647. "source": {
  16648. "$ref": "#/components/schemas/PermissionV2Source"
  16649. }
  16650. },
  16651. "required": ["id", "sessionID", "action", "resources"],
  16652. "additionalProperties": false
  16653. }
  16654. },
  16655. "required": ["id", "type", "properties"],
  16656. "additionalProperties": false
  16657. },
  16658. {
  16659. "type": "object",
  16660. "properties": {
  16661. "id": {
  16662. "type": "string",
  16663. "pattern": "^evt_"
  16664. },
  16665. "type": {
  16666. "type": "string",
  16667. "enum": ["permission.v2.replied"]
  16668. },
  16669. "properties": {
  16670. "type": "object",
  16671. "properties": {
  16672. "sessionID": {
  16673. "type": "string",
  16674. "pattern": "^ses"
  16675. },
  16676. "requestID": {
  16677. "type": "string",
  16678. "pattern": "^per"
  16679. },
  16680. "reply": {
  16681. "$ref": "#/components/schemas/PermissionV2Reply"
  16682. }
  16683. },
  16684. "required": ["sessionID", "requestID", "reply"],
  16685. "additionalProperties": false
  16686. }
  16687. },
  16688. "required": ["id", "type", "properties"],
  16689. "additionalProperties": false
  16690. },
  16691. {
  16692. "type": "object",
  16693. "properties": {
  16694. "id": {
  16695. "type": "string",
  16696. "pattern": "^evt_"
  16697. },
  16698. "type": {
  16699. "type": "string",
  16700. "enum": ["reference.updated"]
  16701. },
  16702. "properties": {
  16703. "type": "object",
  16704. "properties": {}
  16705. }
  16706. },
  16707. "required": ["id", "type", "properties"],
  16708. "additionalProperties": false
  16709. },
  16710. {
  16711. "type": "object",
  16712. "properties": {
  16713. "id": {
  16714. "type": "string",
  16715. "pattern": "^evt_"
  16716. },
  16717. "type": {
  16718. "type": "string",
  16719. "enum": ["file.watcher.updated"]
  16720. },
  16721. "properties": {
  16722. "type": "object",
  16723. "properties": {
  16724. "file": {
  16725. "type": "string"
  16726. },
  16727. "event": {
  16728. "type": "string",
  16729. "enum": ["add", "change", "unlink"]
  16730. }
  16731. },
  16732. "required": ["file", "event"],
  16733. "additionalProperties": false
  16734. }
  16735. },
  16736. "required": ["id", "type", "properties"],
  16737. "additionalProperties": false
  16738. },
  16739. {
  16740. "type": "object",
  16741. "properties": {
  16742. "id": {
  16743. "type": "string",
  16744. "pattern": "^evt_"
  16745. },
  16746. "type": {
  16747. "type": "string",
  16748. "enum": ["pty.created"]
  16749. },
  16750. "properties": {
  16751. "type": "object",
  16752. "properties": {
  16753. "info": {
  16754. "$ref": "#/components/schemas/Pty"
  16755. }
  16756. },
  16757. "required": ["info"],
  16758. "additionalProperties": false
  16759. }
  16760. },
  16761. "required": ["id", "type", "properties"],
  16762. "additionalProperties": false
  16763. },
  16764. {
  16765. "type": "object",
  16766. "properties": {
  16767. "id": {
  16768. "type": "string",
  16769. "pattern": "^evt_"
  16770. },
  16771. "type": {
  16772. "type": "string",
  16773. "enum": ["pty.updated"]
  16774. },
  16775. "properties": {
  16776. "type": "object",
  16777. "properties": {
  16778. "info": {
  16779. "$ref": "#/components/schemas/Pty"
  16780. }
  16781. },
  16782. "required": ["info"],
  16783. "additionalProperties": false
  16784. }
  16785. },
  16786. "required": ["id", "type", "properties"],
  16787. "additionalProperties": false
  16788. },
  16789. {
  16790. "type": "object",
  16791. "properties": {
  16792. "id": {
  16793. "type": "string",
  16794. "pattern": "^evt_"
  16795. },
  16796. "type": {
  16797. "type": "string",
  16798. "enum": ["pty.exited"]
  16799. },
  16800. "properties": {
  16801. "type": "object",
  16802. "properties": {
  16803. "id": {
  16804. "type": "string",
  16805. "pattern": "^pty"
  16806. },
  16807. "exitCode": {
  16808. "type": "integer",
  16809. "minimum": 0
  16810. }
  16811. },
  16812. "required": ["id", "exitCode"],
  16813. "additionalProperties": false
  16814. }
  16815. },
  16816. "required": ["id", "type", "properties"],
  16817. "additionalProperties": false
  16818. },
  16819. {
  16820. "type": "object",
  16821. "properties": {
  16822. "id": {
  16823. "type": "string",
  16824. "pattern": "^evt_"
  16825. },
  16826. "type": {
  16827. "type": "string",
  16828. "enum": ["pty.deleted"]
  16829. },
  16830. "properties": {
  16831. "type": "object",
  16832. "properties": {
  16833. "id": {
  16834. "type": "string",
  16835. "pattern": "^pty"
  16836. }
  16837. },
  16838. "required": ["id"],
  16839. "additionalProperties": false
  16840. }
  16841. },
  16842. "required": ["id", "type", "properties"],
  16843. "additionalProperties": false
  16844. },
  16845. {
  16846. "type": "object",
  16847. "properties": {
  16848. "id": {
  16849. "type": "string",
  16850. "pattern": "^evt_"
  16851. },
  16852. "type": {
  16853. "type": "string",
  16854. "enum": ["question.v2.asked"]
  16855. },
  16856. "properties": {
  16857. "type": "object",
  16858. "properties": {
  16859. "id": {
  16860. "type": "string",
  16861. "pattern": "^que"
  16862. },
  16863. "sessionID": {
  16864. "type": "string",
  16865. "pattern": "^ses"
  16866. },
  16867. "questions": {
  16868. "type": "array",
  16869. "items": {
  16870. "$ref": "#/components/schemas/QuestionV2Info"
  16871. },
  16872. "description": "Questions to ask"
  16873. },
  16874. "tool": {
  16875. "$ref": "#/components/schemas/QuestionV2Tool"
  16876. }
  16877. },
  16878. "required": ["id", "sessionID", "questions"],
  16879. "additionalProperties": false
  16880. }
  16881. },
  16882. "required": ["id", "type", "properties"],
  16883. "additionalProperties": false
  16884. },
  16885. {
  16886. "type": "object",
  16887. "properties": {
  16888. "id": {
  16889. "type": "string",
  16890. "pattern": "^evt_"
  16891. },
  16892. "type": {
  16893. "type": "string",
  16894. "enum": ["question.v2.replied"]
  16895. },
  16896. "properties": {
  16897. "type": "object",
  16898. "properties": {
  16899. "sessionID": {
  16900. "type": "string",
  16901. "pattern": "^ses"
  16902. },
  16903. "requestID": {
  16904. "type": "string",
  16905. "pattern": "^que"
  16906. },
  16907. "answers": {
  16908. "type": "array",
  16909. "items": {
  16910. "$ref": "#/components/schemas/QuestionV2Answer"
  16911. }
  16912. }
  16913. },
  16914. "required": ["sessionID", "requestID", "answers"],
  16915. "additionalProperties": false
  16916. }
  16917. },
  16918. "required": ["id", "type", "properties"],
  16919. "additionalProperties": false
  16920. },
  16921. {
  16922. "type": "object",
  16923. "properties": {
  16924. "id": {
  16925. "type": "string",
  16926. "pattern": "^evt_"
  16927. },
  16928. "type": {
  16929. "type": "string",
  16930. "enum": ["question.v2.rejected"]
  16931. },
  16932. "properties": {
  16933. "type": "object",
  16934. "properties": {
  16935. "sessionID": {
  16936. "type": "string",
  16937. "pattern": "^ses"
  16938. },
  16939. "requestID": {
  16940. "type": "string",
  16941. "pattern": "^que"
  16942. }
  16943. },
  16944. "required": ["sessionID", "requestID"],
  16945. "additionalProperties": false
  16946. }
  16947. },
  16948. "required": ["id", "type", "properties"],
  16949. "additionalProperties": false
  16950. },
  16951. {
  16952. "type": "object",
  16953. "properties": {
  16954. "id": {
  16955. "type": "string",
  16956. "pattern": "^evt_"
  16957. },
  16958. "type": {
  16959. "type": "string",
  16960. "enum": ["todo.updated"]
  16961. },
  16962. "properties": {
  16963. "type": "object",
  16964. "properties": {
  16965. "sessionID": {
  16966. "type": "string",
  16967. "pattern": "^ses"
  16968. },
  16969. "todos": {
  16970. "type": "array",
  16971. "items": {
  16972. "$ref": "#/components/schemas/Todo"
  16973. }
  16974. }
  16975. },
  16976. "required": ["sessionID", "todos"],
  16977. "additionalProperties": false
  16978. }
  16979. },
  16980. "required": ["id", "type", "properties"],
  16981. "additionalProperties": false
  16982. },
  16983. {
  16984. "type": "object",
  16985. "properties": {
  16986. "id": {
  16987. "type": "string",
  16988. "pattern": "^evt_"
  16989. },
  16990. "type": {
  16991. "type": "string",
  16992. "enum": ["lsp.updated"]
  16993. },
  16994. "properties": {
  16995. "type": "object",
  16996. "properties": {}
  16997. }
  16998. },
  16999. "required": ["id", "type", "properties"],
  17000. "additionalProperties": false
  17001. },
  17002. {
  17003. "type": "object",
  17004. "properties": {
  17005. "id": {
  17006. "type": "string",
  17007. "pattern": "^evt_"
  17008. },
  17009. "type": {
  17010. "type": "string",
  17011. "enum": ["permission.asked"]
  17012. },
  17013. "properties": {
  17014. "type": "object",
  17015. "properties": {
  17016. "id": {
  17017. "type": "string",
  17018. "pattern": "^per"
  17019. },
  17020. "sessionID": {
  17021. "type": "string",
  17022. "pattern": "^ses"
  17023. },
  17024. "permission": {
  17025. "type": "string"
  17026. },
  17027. "patterns": {
  17028. "type": "array",
  17029. "items": {
  17030. "type": "string"
  17031. }
  17032. },
  17033. "metadata": {
  17034. "type": "object"
  17035. },
  17036. "always": {
  17037. "type": "array",
  17038. "items": {
  17039. "type": "string"
  17040. }
  17041. },
  17042. "tool": {
  17043. "type": "object",
  17044. "properties": {
  17045. "messageID": {
  17046. "type": "string"
  17047. },
  17048. "callID": {
  17049. "type": "string"
  17050. }
  17051. },
  17052. "required": ["messageID", "callID"],
  17053. "additionalProperties": false
  17054. }
  17055. },
  17056. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  17057. "additionalProperties": false
  17058. }
  17059. },
  17060. "required": ["id", "type", "properties"],
  17061. "additionalProperties": false
  17062. },
  17063. {
  17064. "type": "object",
  17065. "properties": {
  17066. "id": {
  17067. "type": "string",
  17068. "pattern": "^evt_"
  17069. },
  17070. "type": {
  17071. "type": "string",
  17072. "enum": ["permission.replied"]
  17073. },
  17074. "properties": {
  17075. "type": "object",
  17076. "properties": {
  17077. "sessionID": {
  17078. "type": "string",
  17079. "pattern": "^ses"
  17080. },
  17081. "requestID": {
  17082. "type": "string",
  17083. "pattern": "^per"
  17084. },
  17085. "reply": {
  17086. "type": "string",
  17087. "enum": ["once", "always", "reject"]
  17088. }
  17089. },
  17090. "required": ["sessionID", "requestID", "reply"],
  17091. "additionalProperties": false
  17092. }
  17093. },
  17094. "required": ["id", "type", "properties"],
  17095. "additionalProperties": false
  17096. },
  17097. {
  17098. "type": "object",
  17099. "properties": {
  17100. "id": {
  17101. "type": "string",
  17102. "pattern": "^evt_"
  17103. },
  17104. "type": {
  17105. "type": "string",
  17106. "enum": ["tui.prompt.append"]
  17107. },
  17108. "properties": {
  17109. "type": "object",
  17110. "properties": {
  17111. "text": {
  17112. "type": "string"
  17113. }
  17114. },
  17115. "required": ["text"],
  17116. "additionalProperties": false
  17117. }
  17118. },
  17119. "required": ["id", "type", "properties"],
  17120. "additionalProperties": false
  17121. },
  17122. {
  17123. "type": "object",
  17124. "properties": {
  17125. "id": {
  17126. "type": "string",
  17127. "pattern": "^evt_"
  17128. },
  17129. "type": {
  17130. "type": "string",
  17131. "enum": ["tui.command.execute"]
  17132. },
  17133. "properties": {
  17134. "type": "object",
  17135. "properties": {
  17136. "command": {
  17137. "anyOf": [
  17138. {
  17139. "type": "string",
  17140. "enum": [
  17141. "session.list",
  17142. "session.new",
  17143. "session.share",
  17144. "session.interrupt",
  17145. "session.compact",
  17146. "session.page.up",
  17147. "session.page.down",
  17148. "session.line.up",
  17149. "session.line.down",
  17150. "session.half.page.up",
  17151. "session.half.page.down",
  17152. "session.first",
  17153. "session.last",
  17154. "prompt.clear",
  17155. "prompt.submit",
  17156. "agent.cycle"
  17157. ]
  17158. },
  17159. {
  17160. "type": "string"
  17161. }
  17162. ]
  17163. }
  17164. },
  17165. "required": ["command"],
  17166. "additionalProperties": false
  17167. }
  17168. },
  17169. "required": ["id", "type", "properties"],
  17170. "additionalProperties": false
  17171. },
  17172. {
  17173. "type": "object",
  17174. "properties": {
  17175. "id": {
  17176. "type": "string",
  17177. "pattern": "^evt_"
  17178. },
  17179. "type": {
  17180. "type": "string",
  17181. "enum": ["tui.toast.show"]
  17182. },
  17183. "properties": {
  17184. "type": "object",
  17185. "properties": {
  17186. "title": {
  17187. "type": "string"
  17188. },
  17189. "message": {
  17190. "type": "string"
  17191. },
  17192. "variant": {
  17193. "type": "string",
  17194. "enum": ["info", "success", "warning", "error"]
  17195. },
  17196. "duration": {
  17197. "type": "integer",
  17198. "exclusiveMinimum": 0
  17199. }
  17200. },
  17201. "required": ["message", "variant"],
  17202. "additionalProperties": false
  17203. }
  17204. },
  17205. "required": ["id", "type", "properties"],
  17206. "additionalProperties": false
  17207. },
  17208. {
  17209. "type": "object",
  17210. "properties": {
  17211. "id": {
  17212. "type": "string",
  17213. "pattern": "^evt_"
  17214. },
  17215. "type": {
  17216. "type": "string",
  17217. "enum": ["tui.session.select"]
  17218. },
  17219. "properties": {
  17220. "type": "object",
  17221. "properties": {
  17222. "sessionID": {
  17223. "type": "string",
  17224. "pattern": "^ses",
  17225. "description": "Session ID to navigate to"
  17226. }
  17227. },
  17228. "required": ["sessionID"],
  17229. "additionalProperties": false
  17230. }
  17231. },
  17232. "required": ["id", "type", "properties"],
  17233. "additionalProperties": false
  17234. },
  17235. {
  17236. "type": "object",
  17237. "properties": {
  17238. "id": {
  17239. "type": "string",
  17240. "pattern": "^evt_"
  17241. },
  17242. "type": {
  17243. "type": "string",
  17244. "enum": ["mcp.tools.changed"]
  17245. },
  17246. "properties": {
  17247. "type": "object",
  17248. "properties": {
  17249. "server": {
  17250. "type": "string"
  17251. }
  17252. },
  17253. "required": ["server"],
  17254. "additionalProperties": false
  17255. }
  17256. },
  17257. "required": ["id", "type", "properties"],
  17258. "additionalProperties": false
  17259. },
  17260. {
  17261. "type": "object",
  17262. "properties": {
  17263. "id": {
  17264. "type": "string",
  17265. "pattern": "^evt_"
  17266. },
  17267. "type": {
  17268. "type": "string",
  17269. "enum": ["mcp.browser.open.failed"]
  17270. },
  17271. "properties": {
  17272. "type": "object",
  17273. "properties": {
  17274. "mcpName": {
  17275. "type": "string"
  17276. },
  17277. "url": {
  17278. "type": "string"
  17279. }
  17280. },
  17281. "required": ["mcpName", "url"],
  17282. "additionalProperties": false
  17283. }
  17284. },
  17285. "required": ["id", "type", "properties"],
  17286. "additionalProperties": false
  17287. },
  17288. {
  17289. "type": "object",
  17290. "properties": {
  17291. "id": {
  17292. "type": "string",
  17293. "pattern": "^evt_"
  17294. },
  17295. "type": {
  17296. "type": "string",
  17297. "enum": ["command.executed"]
  17298. },
  17299. "properties": {
  17300. "type": "object",
  17301. "properties": {
  17302. "name": {
  17303. "type": "string"
  17304. },
  17305. "sessionID": {
  17306. "type": "string",
  17307. "pattern": "^ses"
  17308. },
  17309. "arguments": {
  17310. "type": "string"
  17311. },
  17312. "messageID": {
  17313. "type": "string",
  17314. "pattern": "^msg"
  17315. }
  17316. },
  17317. "required": ["name", "sessionID", "arguments", "messageID"],
  17318. "additionalProperties": false
  17319. }
  17320. },
  17321. "required": ["id", "type", "properties"],
  17322. "additionalProperties": false
  17323. },
  17324. {
  17325. "type": "object",
  17326. "properties": {
  17327. "id": {
  17328. "type": "string",
  17329. "pattern": "^evt_"
  17330. },
  17331. "type": {
  17332. "type": "string",
  17333. "enum": ["project.directories.updated"]
  17334. },
  17335. "properties": {
  17336. "type": "object",
  17337. "properties": {
  17338. "projectID": {
  17339. "type": "string"
  17340. }
  17341. },
  17342. "required": ["projectID"],
  17343. "additionalProperties": false
  17344. }
  17345. },
  17346. "required": ["id", "type", "properties"],
  17347. "additionalProperties": false
  17348. },
  17349. {
  17350. "type": "object",
  17351. "properties": {
  17352. "id": {
  17353. "type": "string",
  17354. "pattern": "^evt_"
  17355. },
  17356. "type": {
  17357. "type": "string",
  17358. "enum": ["project.updated"]
  17359. },
  17360. "properties": {
  17361. "type": "object",
  17362. "properties": {
  17363. "id": {
  17364. "type": "string"
  17365. },
  17366. "worktree": {
  17367. "type": "string"
  17368. },
  17369. "vcs": {
  17370. "type": "string",
  17371. "enum": ["git"]
  17372. },
  17373. "name": {
  17374. "type": "string"
  17375. },
  17376. "icon": {
  17377. "type": "object",
  17378. "properties": {
  17379. "url": {
  17380. "type": "string"
  17381. },
  17382. "override": {
  17383. "type": "string"
  17384. },
  17385. "color": {
  17386. "type": "string"
  17387. }
  17388. },
  17389. "additionalProperties": false
  17390. },
  17391. "commands": {
  17392. "type": "object",
  17393. "properties": {
  17394. "start": {
  17395. "type": "string",
  17396. "description": "Startup script to run when creating a new workspace (worktree)"
  17397. }
  17398. },
  17399. "additionalProperties": false
  17400. },
  17401. "time": {
  17402. "type": "object",
  17403. "properties": {
  17404. "created": {
  17405. "type": "integer",
  17406. "minimum": 0
  17407. },
  17408. "updated": {
  17409. "type": "integer",
  17410. "minimum": 0
  17411. },
  17412. "initialized": {
  17413. "type": "integer",
  17414. "minimum": 0
  17415. }
  17416. },
  17417. "required": ["created", "updated"],
  17418. "additionalProperties": false
  17419. },
  17420. "sandboxes": {
  17421. "type": "array",
  17422. "items": {
  17423. "type": "string"
  17424. }
  17425. }
  17426. },
  17427. "required": ["id", "worktree", "time", "sandboxes"],
  17428. "additionalProperties": false
  17429. }
  17430. },
  17431. "required": ["id", "type", "properties"],
  17432. "additionalProperties": false
  17433. },
  17434. {
  17435. "type": "object",
  17436. "properties": {
  17437. "id": {
  17438. "type": "string",
  17439. "pattern": "^evt_"
  17440. },
  17441. "type": {
  17442. "type": "string",
  17443. "enum": ["vcs.branch.updated"]
  17444. },
  17445. "properties": {
  17446. "type": "object",
  17447. "properties": {
  17448. "branch": {
  17449. "type": "string"
  17450. }
  17451. },
  17452. "additionalProperties": false
  17453. }
  17454. },
  17455. "required": ["id", "type", "properties"],
  17456. "additionalProperties": false
  17457. },
  17458. {
  17459. "type": "object",
  17460. "properties": {
  17461. "id": {
  17462. "type": "string",
  17463. "pattern": "^evt_"
  17464. },
  17465. "type": {
  17466. "type": "string",
  17467. "enum": ["question.asked"]
  17468. },
  17469. "properties": {
  17470. "type": "object",
  17471. "properties": {
  17472. "id": {
  17473. "type": "string",
  17474. "pattern": "^que"
  17475. },
  17476. "sessionID": {
  17477. "type": "string",
  17478. "pattern": "^ses"
  17479. },
  17480. "questions": {
  17481. "type": "array",
  17482. "items": {
  17483. "$ref": "#/components/schemas/QuestionInfo"
  17484. },
  17485. "description": "Questions to ask"
  17486. },
  17487. "tool": {
  17488. "$ref": "#/components/schemas/QuestionTool"
  17489. }
  17490. },
  17491. "required": ["id", "sessionID", "questions"],
  17492. "additionalProperties": false
  17493. }
  17494. },
  17495. "required": ["id", "type", "properties"],
  17496. "additionalProperties": false
  17497. },
  17498. {
  17499. "type": "object",
  17500. "properties": {
  17501. "id": {
  17502. "type": "string",
  17503. "pattern": "^evt_"
  17504. },
  17505. "type": {
  17506. "type": "string",
  17507. "enum": ["question.replied"]
  17508. },
  17509. "properties": {
  17510. "type": "object",
  17511. "properties": {
  17512. "sessionID": {
  17513. "type": "string",
  17514. "pattern": "^ses"
  17515. },
  17516. "requestID": {
  17517. "type": "string",
  17518. "pattern": "^que"
  17519. },
  17520. "answers": {
  17521. "type": "array",
  17522. "items": {
  17523. "$ref": "#/components/schemas/QuestionAnswer"
  17524. }
  17525. }
  17526. },
  17527. "required": ["sessionID", "requestID", "answers"],
  17528. "additionalProperties": false
  17529. }
  17530. },
  17531. "required": ["id", "type", "properties"],
  17532. "additionalProperties": false
  17533. },
  17534. {
  17535. "type": "object",
  17536. "properties": {
  17537. "id": {
  17538. "type": "string",
  17539. "pattern": "^evt_"
  17540. },
  17541. "type": {
  17542. "type": "string",
  17543. "enum": ["question.rejected"]
  17544. },
  17545. "properties": {
  17546. "type": "object",
  17547. "properties": {
  17548. "sessionID": {
  17549. "type": "string",
  17550. "pattern": "^ses"
  17551. },
  17552. "requestID": {
  17553. "type": "string",
  17554. "pattern": "^que"
  17555. }
  17556. },
  17557. "required": ["sessionID", "requestID"],
  17558. "additionalProperties": false
  17559. }
  17560. },
  17561. "required": ["id", "type", "properties"],
  17562. "additionalProperties": false
  17563. },
  17564. {
  17565. "type": "object",
  17566. "properties": {
  17567. "id": {
  17568. "type": "string",
  17569. "pattern": "^evt_"
  17570. },
  17571. "type": {
  17572. "type": "string",
  17573. "enum": ["session.status"]
  17574. },
  17575. "properties": {
  17576. "type": "object",
  17577. "properties": {
  17578. "sessionID": {
  17579. "type": "string",
  17580. "pattern": "^ses"
  17581. },
  17582. "status": {
  17583. "$ref": "#/components/schemas/SessionStatus"
  17584. }
  17585. },
  17586. "required": ["sessionID", "status"],
  17587. "additionalProperties": false
  17588. }
  17589. },
  17590. "required": ["id", "type", "properties"],
  17591. "additionalProperties": false
  17592. },
  17593. {
  17594. "type": "object",
  17595. "properties": {
  17596. "id": {
  17597. "type": "string",
  17598. "pattern": "^evt_"
  17599. },
  17600. "type": {
  17601. "type": "string",
  17602. "enum": ["session.idle"]
  17603. },
  17604. "properties": {
  17605. "type": "object",
  17606. "properties": {
  17607. "sessionID": {
  17608. "type": "string",
  17609. "pattern": "^ses"
  17610. }
  17611. },
  17612. "required": ["sessionID"],
  17613. "additionalProperties": false
  17614. }
  17615. },
  17616. "required": ["id", "type", "properties"],
  17617. "additionalProperties": false
  17618. },
  17619. {
  17620. "type": "object",
  17621. "properties": {
  17622. "id": {
  17623. "type": "string",
  17624. "pattern": "^evt_"
  17625. },
  17626. "type": {
  17627. "type": "string",
  17628. "enum": ["session.compacted"]
  17629. },
  17630. "properties": {
  17631. "type": "object",
  17632. "properties": {
  17633. "sessionID": {
  17634. "type": "string",
  17635. "pattern": "^ses"
  17636. }
  17637. },
  17638. "required": ["sessionID"],
  17639. "additionalProperties": false
  17640. }
  17641. },
  17642. "required": ["id", "type", "properties"],
  17643. "additionalProperties": false
  17644. },
  17645. {
  17646. "type": "object",
  17647. "properties": {
  17648. "id": {
  17649. "type": "string",
  17650. "pattern": "^evt_"
  17651. },
  17652. "type": {
  17653. "type": "string",
  17654. "enum": ["worktree.ready"]
  17655. },
  17656. "properties": {
  17657. "type": "object",
  17658. "properties": {
  17659. "name": {
  17660. "type": "string"
  17661. },
  17662. "branch": {
  17663. "type": "string"
  17664. }
  17665. },
  17666. "required": ["name"],
  17667. "additionalProperties": false
  17668. }
  17669. },
  17670. "required": ["id", "type", "properties"],
  17671. "additionalProperties": false
  17672. },
  17673. {
  17674. "type": "object",
  17675. "properties": {
  17676. "id": {
  17677. "type": "string",
  17678. "pattern": "^evt_"
  17679. },
  17680. "type": {
  17681. "type": "string",
  17682. "enum": ["worktree.failed"]
  17683. },
  17684. "properties": {
  17685. "type": "object",
  17686. "properties": {
  17687. "message": {
  17688. "type": "string"
  17689. }
  17690. },
  17691. "required": ["message"],
  17692. "additionalProperties": false
  17693. }
  17694. },
  17695. "required": ["id", "type", "properties"],
  17696. "additionalProperties": false
  17697. },
  17698. {
  17699. "type": "object",
  17700. "properties": {
  17701. "id": {
  17702. "type": "string",
  17703. "pattern": "^evt_"
  17704. },
  17705. "type": {
  17706. "type": "string",
  17707. "enum": ["workspace.ready"]
  17708. },
  17709. "properties": {
  17710. "type": "object",
  17711. "properties": {
  17712. "name": {
  17713. "type": "string"
  17714. }
  17715. },
  17716. "required": ["name"],
  17717. "additionalProperties": false
  17718. }
  17719. },
  17720. "required": ["id", "type", "properties"],
  17721. "additionalProperties": false
  17722. },
  17723. {
  17724. "type": "object",
  17725. "properties": {
  17726. "id": {
  17727. "type": "string",
  17728. "pattern": "^evt_"
  17729. },
  17730. "type": {
  17731. "type": "string",
  17732. "enum": ["workspace.failed"]
  17733. },
  17734. "properties": {
  17735. "type": "object",
  17736. "properties": {
  17737. "message": {
  17738. "type": "string"
  17739. }
  17740. },
  17741. "required": ["message"],
  17742. "additionalProperties": false
  17743. }
  17744. },
  17745. "required": ["id", "type", "properties"],
  17746. "additionalProperties": false
  17747. },
  17748. {
  17749. "type": "object",
  17750. "properties": {
  17751. "id": {
  17752. "type": "string",
  17753. "pattern": "^evt_"
  17754. },
  17755. "type": {
  17756. "type": "string",
  17757. "enum": ["workspace.status"]
  17758. },
  17759. "properties": {
  17760. "type": "object",
  17761. "properties": {
  17762. "workspaceID": {
  17763. "type": "string",
  17764. "pattern": "^wrk"
  17765. },
  17766. "status": {
  17767. "type": "string",
  17768. "enum": ["connected", "connecting", "disconnected", "error"]
  17769. }
  17770. },
  17771. "required": ["workspaceID", "status"],
  17772. "additionalProperties": false
  17773. }
  17774. },
  17775. "required": ["id", "type", "properties"],
  17776. "additionalProperties": false
  17777. },
  17778. {
  17779. "type": "object",
  17780. "properties": {
  17781. "id": {
  17782. "type": "string",
  17783. "pattern": "^evt_"
  17784. },
  17785. "type": {
  17786. "type": "string",
  17787. "enum": ["server.connected"]
  17788. },
  17789. "properties": {
  17790. "type": "object",
  17791. "properties": {}
  17792. }
  17793. },
  17794. "required": ["id", "type", "properties"],
  17795. "additionalProperties": false
  17796. },
  17797. {
  17798. "type": "object",
  17799. "properties": {
  17800. "id": {
  17801. "type": "string",
  17802. "pattern": "^evt_"
  17803. },
  17804. "type": {
  17805. "type": "string",
  17806. "enum": ["global.disposed"]
  17807. },
  17808. "properties": {
  17809. "type": "object",
  17810. "properties": {}
  17811. }
  17812. },
  17813. "required": ["id", "type", "properties"],
  17814. "additionalProperties": false
  17815. },
  17816. {
  17817. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  17818. },
  17819. {
  17820. "$ref": "#/components/schemas/SyncEventSessionCreated"
  17821. },
  17822. {
  17823. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  17824. },
  17825. {
  17826. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  17827. },
  17828. {
  17829. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  17830. },
  17831. {
  17832. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  17833. },
  17834. {
  17835. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  17836. },
  17837. {
  17838. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  17839. },
  17840. {
  17841. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  17842. },
  17843. {
  17844. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  17845. },
  17846. {
  17847. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  17848. },
  17849. {
  17850. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  17851. },
  17852. {
  17853. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  17854. },
  17855. {
  17856. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  17857. },
  17858. {
  17859. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  17860. },
  17861. {
  17862. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  17863. },
  17864. {
  17865. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  17866. },
  17867. {
  17868. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  17869. },
  17870. {
  17871. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  17872. },
  17873. {
  17874. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  17875. },
  17876. {
  17877. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  17878. },
  17879. {
  17880. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  17881. },
  17882. {
  17883. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  17884. },
  17885. {
  17886. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  17887. },
  17888. {
  17889. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  17890. },
  17891. {
  17892. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  17893. },
  17894. {
  17895. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  17896. },
  17897. {
  17898. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  17899. },
  17900. {
  17901. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  17902. },
  17903. {
  17904. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  17905. },
  17906. {
  17907. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  17908. },
  17909. {
  17910. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  17911. },
  17912. {
  17913. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  17914. },
  17915. {
  17916. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  17917. },
  17918. {
  17919. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  17920. }
  17921. ]
  17922. }
  17923. },
  17924. "required": ["directory", "payload"],
  17925. "additionalProperties": false
  17926. },
  17927. "LogLevel": {
  17928. "type": "string",
  17929. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  17930. "description": "Log level"
  17931. },
  17932. "ServerConfig": {
  17933. "type": "object",
  17934. "properties": {
  17935. "port": {
  17936. "type": "integer",
  17937. "exclusiveMinimum": 0
  17938. },
  17939. "hostname": {
  17940. "type": "string"
  17941. },
  17942. "mdns": {
  17943. "type": "boolean"
  17944. },
  17945. "mdnsDomain": {
  17946. "type": "string"
  17947. },
  17948. "cors": {
  17949. "type": "array",
  17950. "items": {
  17951. "type": "string"
  17952. }
  17953. }
  17954. },
  17955. "additionalProperties": false,
  17956. "description": "Server configuration for opencode serve and web commands"
  17957. },
  17958. "PermissionActionConfig": {
  17959. "type": "string",
  17960. "enum": ["ask", "allow", "deny"]
  17961. },
  17962. "PermissionObjectConfig": {
  17963. "type": "object",
  17964. "additionalProperties": {
  17965. "$ref": "#/components/schemas/PermissionActionConfig"
  17966. }
  17967. },
  17968. "PermissionRuleConfig": {
  17969. "anyOf": [
  17970. {
  17971. "$ref": "#/components/schemas/PermissionActionConfig"
  17972. },
  17973. {
  17974. "$ref": "#/components/schemas/PermissionObjectConfig"
  17975. }
  17976. ]
  17977. },
  17978. "PermissionConfig": {
  17979. "anyOf": [
  17980. {
  17981. "$ref": "#/components/schemas/PermissionActionConfig"
  17982. },
  17983. {
  17984. "type": "object",
  17985. "properties": {
  17986. "read": {
  17987. "$ref": "#/components/schemas/PermissionRuleConfig"
  17988. },
  17989. "edit": {
  17990. "$ref": "#/components/schemas/PermissionRuleConfig"
  17991. },
  17992. "glob": {
  17993. "$ref": "#/components/schemas/PermissionRuleConfig"
  17994. },
  17995. "grep": {
  17996. "$ref": "#/components/schemas/PermissionRuleConfig"
  17997. },
  17998. "list": {
  17999. "$ref": "#/components/schemas/PermissionRuleConfig"
  18000. },
  18001. "bash": {
  18002. "$ref": "#/components/schemas/PermissionRuleConfig"
  18003. },
  18004. "task": {
  18005. "$ref": "#/components/schemas/PermissionRuleConfig"
  18006. },
  18007. "external_directory": {
  18008. "$ref": "#/components/schemas/PermissionRuleConfig"
  18009. },
  18010. "todowrite": {
  18011. "$ref": "#/components/schemas/PermissionActionConfig"
  18012. },
  18013. "question": {
  18014. "$ref": "#/components/schemas/PermissionActionConfig"
  18015. },
  18016. "webfetch": {
  18017. "$ref": "#/components/schemas/PermissionActionConfig"
  18018. },
  18019. "websearch": {
  18020. "$ref": "#/components/schemas/PermissionActionConfig"
  18021. },
  18022. "lsp": {
  18023. "$ref": "#/components/schemas/PermissionRuleConfig"
  18024. },
  18025. "doom_loop": {
  18026. "$ref": "#/components/schemas/PermissionActionConfig"
  18027. },
  18028. "skill": {
  18029. "$ref": "#/components/schemas/PermissionRuleConfig"
  18030. }
  18031. },
  18032. "additionalProperties": {
  18033. "$ref": "#/components/schemas/PermissionRuleConfig"
  18034. }
  18035. }
  18036. ]
  18037. },
  18038. "AgentConfig": {
  18039. "type": "object",
  18040. "properties": {
  18041. "model": {
  18042. "type": "string"
  18043. },
  18044. "variant": {
  18045. "type": "string"
  18046. },
  18047. "temperature": {
  18048. "type": "number"
  18049. },
  18050. "top_p": {
  18051. "type": "number"
  18052. },
  18053. "prompt": {
  18054. "type": "string"
  18055. },
  18056. "tools": {
  18057. "type": "object",
  18058. "additionalProperties": {
  18059. "type": "boolean"
  18060. }
  18061. },
  18062. "disable": {
  18063. "type": "boolean"
  18064. },
  18065. "description": {
  18066. "type": "string"
  18067. },
  18068. "mode": {
  18069. "type": "string",
  18070. "enum": ["subagent", "primary", "all"]
  18071. },
  18072. "hidden": {
  18073. "type": "boolean"
  18074. },
  18075. "options": {
  18076. "type": "object"
  18077. },
  18078. "color": {
  18079. "anyOf": [
  18080. {
  18081. "type": "string",
  18082. "pattern": "^#[0-9a-fA-F]{6}$"
  18083. },
  18084. {
  18085. "type": "string",
  18086. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  18087. }
  18088. ],
  18089. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  18090. },
  18091. "steps": {
  18092. "type": "integer",
  18093. "exclusiveMinimum": 0
  18094. },
  18095. "maxSteps": {
  18096. "type": "integer",
  18097. "exclusiveMinimum": 0
  18098. },
  18099. "permission": {
  18100. "$ref": "#/components/schemas/PermissionConfig"
  18101. }
  18102. },
  18103. "additionalProperties": {}
  18104. },
  18105. "ProviderConfig": {
  18106. "type": "object",
  18107. "properties": {
  18108. "api": {
  18109. "type": "string"
  18110. },
  18111. "name": {
  18112. "type": "string"
  18113. },
  18114. "env": {
  18115. "type": "array",
  18116. "items": {
  18117. "type": "string"
  18118. }
  18119. },
  18120. "id": {
  18121. "type": "string"
  18122. },
  18123. "npm": {
  18124. "type": "string"
  18125. },
  18126. "whitelist": {
  18127. "type": "array",
  18128. "items": {
  18129. "type": "string"
  18130. }
  18131. },
  18132. "blacklist": {
  18133. "type": "array",
  18134. "items": {
  18135. "type": "string"
  18136. }
  18137. },
  18138. "options": {
  18139. "type": "object",
  18140. "properties": {
  18141. "apiKey": {
  18142. "type": "string"
  18143. },
  18144. "baseURL": {
  18145. "type": "string"
  18146. },
  18147. "enterpriseUrl": {
  18148. "type": "string"
  18149. },
  18150. "setCacheKey": {
  18151. "type": "boolean"
  18152. },
  18153. "timeout": {
  18154. "anyOf": [
  18155. {
  18156. "type": "integer",
  18157. "exclusiveMinimum": 0
  18158. },
  18159. {
  18160. "type": "boolean",
  18161. "enum": [false]
  18162. }
  18163. ],
  18164. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  18165. },
  18166. "headerTimeout": {
  18167. "anyOf": [
  18168. {
  18169. "type": "integer",
  18170. "exclusiveMinimum": 0
  18171. },
  18172. {
  18173. "type": "boolean",
  18174. "enum": [false]
  18175. }
  18176. ],
  18177. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  18178. },
  18179. "chunkTimeout": {
  18180. "type": "integer",
  18181. "exclusiveMinimum": 0
  18182. }
  18183. },
  18184. "additionalProperties": {}
  18185. },
  18186. "models": {
  18187. "type": "object",
  18188. "additionalProperties": {
  18189. "type": "object",
  18190. "properties": {
  18191. "id": {
  18192. "type": "string"
  18193. },
  18194. "name": {
  18195. "type": "string"
  18196. },
  18197. "family": {
  18198. "type": "string"
  18199. },
  18200. "release_date": {
  18201. "type": "string"
  18202. },
  18203. "attachment": {
  18204. "type": "boolean"
  18205. },
  18206. "reasoning": {
  18207. "type": "boolean"
  18208. },
  18209. "temperature": {
  18210. "type": "boolean"
  18211. },
  18212. "tool_call": {
  18213. "type": "boolean"
  18214. },
  18215. "interleaved": {
  18216. "anyOf": [
  18217. {
  18218. "type": "boolean",
  18219. "enum": [true]
  18220. },
  18221. {
  18222. "type": "object",
  18223. "properties": {
  18224. "field": {
  18225. "type": "string",
  18226. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  18227. }
  18228. },
  18229. "required": ["field"],
  18230. "additionalProperties": false
  18231. }
  18232. ]
  18233. },
  18234. "cost": {
  18235. "type": "object",
  18236. "properties": {
  18237. "input": {
  18238. "type": "number"
  18239. },
  18240. "output": {
  18241. "type": "number"
  18242. },
  18243. "cache_read": {
  18244. "type": "number"
  18245. },
  18246. "cache_write": {
  18247. "type": "number"
  18248. },
  18249. "context_over_200k": {
  18250. "type": "object",
  18251. "properties": {
  18252. "input": {
  18253. "type": "number"
  18254. },
  18255. "output": {
  18256. "type": "number"
  18257. },
  18258. "cache_read": {
  18259. "type": "number"
  18260. },
  18261. "cache_write": {
  18262. "type": "number"
  18263. }
  18264. },
  18265. "required": ["input", "output"],
  18266. "additionalProperties": false
  18267. }
  18268. },
  18269. "required": ["input", "output"],
  18270. "additionalProperties": false
  18271. },
  18272. "limit": {
  18273. "type": "object",
  18274. "properties": {
  18275. "context": {
  18276. "type": "number"
  18277. },
  18278. "input": {
  18279. "type": "number"
  18280. },
  18281. "output": {
  18282. "type": "number"
  18283. }
  18284. },
  18285. "required": ["context", "output"],
  18286. "additionalProperties": false
  18287. },
  18288. "modalities": {
  18289. "type": "object",
  18290. "properties": {
  18291. "input": {
  18292. "type": "array",
  18293. "items": {
  18294. "type": "string",
  18295. "enum": ["text", "audio", "image", "video", "pdf"]
  18296. }
  18297. },
  18298. "output": {
  18299. "type": "array",
  18300. "items": {
  18301. "type": "string",
  18302. "enum": ["text", "audio", "image", "video", "pdf"]
  18303. }
  18304. }
  18305. },
  18306. "additionalProperties": false
  18307. },
  18308. "experimental": {
  18309. "type": "boolean"
  18310. },
  18311. "status": {
  18312. "type": "string",
  18313. "enum": ["alpha", "beta", "deprecated", "active"]
  18314. },
  18315. "provider": {
  18316. "type": "object",
  18317. "properties": {
  18318. "npm": {
  18319. "type": "string"
  18320. },
  18321. "api": {
  18322. "type": "string"
  18323. }
  18324. },
  18325. "additionalProperties": false
  18326. },
  18327. "options": {
  18328. "type": "object"
  18329. },
  18330. "headers": {
  18331. "type": "object",
  18332. "additionalProperties": {
  18333. "type": "string"
  18334. }
  18335. },
  18336. "variants": {
  18337. "type": "object",
  18338. "additionalProperties": {
  18339. "type": "object",
  18340. "properties": {
  18341. "disabled": {
  18342. "type": "boolean"
  18343. }
  18344. },
  18345. "additionalProperties": {}
  18346. },
  18347. "description": "Variant-specific configuration"
  18348. }
  18349. },
  18350. "additionalProperties": false
  18351. }
  18352. }
  18353. },
  18354. "additionalProperties": false
  18355. },
  18356. "McpLocalConfig": {
  18357. "type": "object",
  18358. "properties": {
  18359. "type": {
  18360. "type": "string",
  18361. "enum": ["local"],
  18362. "description": "Type of MCP server connection"
  18363. },
  18364. "command": {
  18365. "type": "array",
  18366. "items": {
  18367. "type": "string"
  18368. },
  18369. "description": "Command and arguments to run the MCP server"
  18370. },
  18371. "environment": {
  18372. "type": "object",
  18373. "additionalProperties": {
  18374. "type": "string"
  18375. }
  18376. },
  18377. "enabled": {
  18378. "type": "boolean"
  18379. },
  18380. "timeout": {
  18381. "type": "integer",
  18382. "exclusiveMinimum": 0
  18383. }
  18384. },
  18385. "required": ["type", "command"],
  18386. "additionalProperties": false
  18387. },
  18388. "McpOAuthConfig": {
  18389. "type": "object",
  18390. "properties": {
  18391. "clientId": {
  18392. "type": "string"
  18393. },
  18394. "clientSecret": {
  18395. "type": "string"
  18396. },
  18397. "scope": {
  18398. "type": "string"
  18399. },
  18400. "callbackPort": {
  18401. "type": "integer",
  18402. "minimum": 1,
  18403. "maximum": 65535
  18404. },
  18405. "redirectUri": {
  18406. "type": "string"
  18407. }
  18408. },
  18409. "additionalProperties": false
  18410. },
  18411. "McpRemoteConfig": {
  18412. "type": "object",
  18413. "properties": {
  18414. "type": {
  18415. "type": "string",
  18416. "enum": ["remote"],
  18417. "description": "Type of MCP server connection"
  18418. },
  18419. "url": {
  18420. "type": "string",
  18421. "description": "URL of the remote MCP server"
  18422. },
  18423. "enabled": {
  18424. "type": "boolean"
  18425. },
  18426. "headers": {
  18427. "type": "object",
  18428. "additionalProperties": {
  18429. "type": "string"
  18430. }
  18431. },
  18432. "oauth": {
  18433. "anyOf": [
  18434. {
  18435. "$ref": "#/components/schemas/McpOAuthConfig"
  18436. },
  18437. {
  18438. "type": "boolean",
  18439. "enum": [false]
  18440. }
  18441. ],
  18442. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  18443. },
  18444. "timeout": {
  18445. "type": "integer",
  18446. "exclusiveMinimum": 0
  18447. }
  18448. },
  18449. "required": ["type", "url"],
  18450. "additionalProperties": false
  18451. },
  18452. "LayoutConfig": {
  18453. "type": "string",
  18454. "enum": ["auto", "stretch"],
  18455. "description": "@deprecated Always uses stretch layout."
  18456. },
  18457. "ImageAttachmentConfig": {
  18458. "type": "object",
  18459. "properties": {
  18460. "auto_resize": {
  18461. "type": "boolean"
  18462. },
  18463. "max_width": {
  18464. "type": "integer",
  18465. "exclusiveMinimum": 0
  18466. },
  18467. "max_height": {
  18468. "type": "integer",
  18469. "exclusiveMinimum": 0
  18470. },
  18471. "max_base64_bytes": {
  18472. "type": "integer",
  18473. "exclusiveMinimum": 0
  18474. }
  18475. },
  18476. "additionalProperties": false
  18477. },
  18478. "AttachmentConfig": {
  18479. "type": "object",
  18480. "properties": {
  18481. "image": {
  18482. "$ref": "#/components/schemas/ImageAttachmentConfig"
  18483. }
  18484. },
  18485. "additionalProperties": false
  18486. },
  18487. "Config": {
  18488. "type": "object",
  18489. "properties": {
  18490. "$schema": {
  18491. "type": "string"
  18492. },
  18493. "shell": {
  18494. "type": "string"
  18495. },
  18496. "logLevel": {
  18497. "$ref": "#/components/schemas/LogLevel"
  18498. },
  18499. "server": {
  18500. "$ref": "#/components/schemas/ServerConfig"
  18501. },
  18502. "command": {
  18503. "type": "object",
  18504. "additionalProperties": {
  18505. "type": "object",
  18506. "properties": {
  18507. "template": {
  18508. "type": "string"
  18509. },
  18510. "description": {
  18511. "type": "string"
  18512. },
  18513. "agent": {
  18514. "type": "string"
  18515. },
  18516. "model": {
  18517. "type": "string"
  18518. },
  18519. "variant": {
  18520. "type": "string"
  18521. },
  18522. "subtask": {
  18523. "type": "boolean"
  18524. }
  18525. },
  18526. "required": ["template"],
  18527. "additionalProperties": false
  18528. }
  18529. },
  18530. "skills": {
  18531. "type": "object",
  18532. "properties": {
  18533. "paths": {
  18534. "type": "array",
  18535. "items": {
  18536. "type": "string"
  18537. }
  18538. },
  18539. "urls": {
  18540. "type": "array",
  18541. "items": {
  18542. "type": "string"
  18543. }
  18544. }
  18545. },
  18546. "additionalProperties": false
  18547. },
  18548. "references": {
  18549. "type": "object",
  18550. "additionalProperties": {
  18551. "anyOf": [
  18552. {
  18553. "type": "string"
  18554. },
  18555. {
  18556. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  18557. },
  18558. {
  18559. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  18560. }
  18561. ]
  18562. }
  18563. },
  18564. "reference": {
  18565. "type": "object",
  18566. "additionalProperties": {
  18567. "anyOf": [
  18568. {
  18569. "type": "string"
  18570. },
  18571. {
  18572. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  18573. },
  18574. {
  18575. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  18576. }
  18577. ]
  18578. }
  18579. },
  18580. "watcher": {
  18581. "type": "object",
  18582. "properties": {
  18583. "ignore": {
  18584. "type": "array",
  18585. "items": {
  18586. "type": "string"
  18587. }
  18588. }
  18589. },
  18590. "additionalProperties": false
  18591. },
  18592. "snapshot": {
  18593. "type": "boolean"
  18594. },
  18595. "plugin": {
  18596. "type": "array",
  18597. "items": {
  18598. "anyOf": [
  18599. {
  18600. "type": "string"
  18601. },
  18602. {
  18603. "type": "array",
  18604. "prefixItems": [
  18605. {
  18606. "type": "string"
  18607. },
  18608. {
  18609. "type": "object"
  18610. }
  18611. ],
  18612. "maxItems": 2,
  18613. "minItems": 2
  18614. }
  18615. ]
  18616. }
  18617. },
  18618. "share": {
  18619. "type": "string",
  18620. "enum": ["manual", "auto", "disabled"]
  18621. },
  18622. "autoshare": {
  18623. "type": "boolean"
  18624. },
  18625. "autoupdate": {
  18626. "anyOf": [
  18627. {
  18628. "type": "boolean"
  18629. },
  18630. {
  18631. "type": "string",
  18632. "enum": ["notify"]
  18633. }
  18634. ],
  18635. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  18636. },
  18637. "disabled_providers": {
  18638. "type": "array",
  18639. "items": {
  18640. "type": "string"
  18641. }
  18642. },
  18643. "enabled_providers": {
  18644. "type": "array",
  18645. "items": {
  18646. "type": "string"
  18647. }
  18648. },
  18649. "model": {
  18650. "type": "string"
  18651. },
  18652. "small_model": {
  18653. "type": "string"
  18654. },
  18655. "default_agent": {
  18656. "type": "string"
  18657. },
  18658. "username": {
  18659. "type": "string"
  18660. },
  18661. "mode": {
  18662. "type": "object",
  18663. "properties": {
  18664. "build": {
  18665. "$ref": "#/components/schemas/AgentConfig"
  18666. },
  18667. "plan": {
  18668. "$ref": "#/components/schemas/AgentConfig"
  18669. }
  18670. },
  18671. "additionalProperties": {
  18672. "$ref": "#/components/schemas/AgentConfig"
  18673. }
  18674. },
  18675. "agent": {
  18676. "type": "object",
  18677. "properties": {
  18678. "plan": {
  18679. "$ref": "#/components/schemas/AgentConfig"
  18680. },
  18681. "build": {
  18682. "$ref": "#/components/schemas/AgentConfig"
  18683. },
  18684. "general": {
  18685. "$ref": "#/components/schemas/AgentConfig"
  18686. },
  18687. "explore": {
  18688. "$ref": "#/components/schemas/AgentConfig"
  18689. },
  18690. "title": {
  18691. "$ref": "#/components/schemas/AgentConfig"
  18692. },
  18693. "summary": {
  18694. "$ref": "#/components/schemas/AgentConfig"
  18695. },
  18696. "compaction": {
  18697. "$ref": "#/components/schemas/AgentConfig"
  18698. }
  18699. },
  18700. "additionalProperties": {
  18701. "$ref": "#/components/schemas/AgentConfig"
  18702. }
  18703. },
  18704. "provider": {
  18705. "type": "object",
  18706. "additionalProperties": {
  18707. "$ref": "#/components/schemas/ProviderConfig"
  18708. }
  18709. },
  18710. "mcp": {
  18711. "type": "object",
  18712. "additionalProperties": {
  18713. "anyOf": [
  18714. {
  18715. "$ref": "#/components/schemas/McpLocalConfig"
  18716. },
  18717. {
  18718. "$ref": "#/components/schemas/McpRemoteConfig"
  18719. },
  18720. {
  18721. "type": "object",
  18722. "properties": {
  18723. "enabled": {
  18724. "type": "boolean"
  18725. }
  18726. },
  18727. "required": ["enabled"],
  18728. "additionalProperties": false
  18729. }
  18730. ]
  18731. }
  18732. },
  18733. "formatter": {
  18734. "anyOf": [
  18735. {
  18736. "type": "boolean"
  18737. },
  18738. {
  18739. "type": "object",
  18740. "additionalProperties": {
  18741. "type": "object",
  18742. "properties": {
  18743. "disabled": {
  18744. "type": "boolean"
  18745. },
  18746. "command": {
  18747. "type": "array",
  18748. "items": {
  18749. "type": "string"
  18750. }
  18751. },
  18752. "environment": {
  18753. "type": "object",
  18754. "additionalProperties": {
  18755. "type": "string"
  18756. }
  18757. },
  18758. "extensions": {
  18759. "type": "array",
  18760. "items": {
  18761. "type": "string"
  18762. }
  18763. }
  18764. },
  18765. "additionalProperties": false
  18766. }
  18767. }
  18768. ],
  18769. "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."
  18770. },
  18771. "lsp": {
  18772. "anyOf": [
  18773. {
  18774. "type": "boolean"
  18775. },
  18776. {
  18777. "type": "object",
  18778. "additionalProperties": {
  18779. "anyOf": [
  18780. {
  18781. "type": "object",
  18782. "properties": {
  18783. "disabled": {
  18784. "type": "boolean",
  18785. "enum": [true]
  18786. }
  18787. },
  18788. "required": ["disabled"],
  18789. "additionalProperties": false
  18790. },
  18791. {
  18792. "type": "object",
  18793. "properties": {
  18794. "command": {
  18795. "type": "array",
  18796. "items": {
  18797. "type": "string"
  18798. }
  18799. },
  18800. "extensions": {
  18801. "type": "array",
  18802. "items": {
  18803. "type": "string"
  18804. }
  18805. },
  18806. "disabled": {
  18807. "type": "boolean"
  18808. },
  18809. "env": {
  18810. "type": "object",
  18811. "additionalProperties": {
  18812. "type": "string"
  18813. }
  18814. },
  18815. "initialization": {
  18816. "type": "object"
  18817. }
  18818. },
  18819. "required": ["command"],
  18820. "additionalProperties": false
  18821. }
  18822. ]
  18823. }
  18824. }
  18825. ],
  18826. "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."
  18827. },
  18828. "instructions": {
  18829. "type": "array",
  18830. "items": {
  18831. "type": "string"
  18832. }
  18833. },
  18834. "layout": {
  18835. "$ref": "#/components/schemas/LayoutConfig"
  18836. },
  18837. "permission": {
  18838. "$ref": "#/components/schemas/PermissionConfig"
  18839. },
  18840. "tools": {
  18841. "type": "object",
  18842. "additionalProperties": {
  18843. "type": "boolean"
  18844. }
  18845. },
  18846. "attachment": {
  18847. "$ref": "#/components/schemas/AttachmentConfig"
  18848. },
  18849. "enterprise": {
  18850. "type": "object",
  18851. "properties": {
  18852. "url": {
  18853. "type": "string"
  18854. }
  18855. },
  18856. "additionalProperties": false
  18857. },
  18858. "tool_output": {
  18859. "type": "object",
  18860. "properties": {
  18861. "max_lines": {
  18862. "type": "integer",
  18863. "exclusiveMinimum": 0
  18864. },
  18865. "max_bytes": {
  18866. "type": "integer",
  18867. "exclusiveMinimum": 0
  18868. }
  18869. },
  18870. "additionalProperties": false
  18871. },
  18872. "compaction": {
  18873. "type": "object",
  18874. "properties": {
  18875. "auto": {
  18876. "type": "boolean"
  18877. },
  18878. "prune": {
  18879. "type": "boolean"
  18880. },
  18881. "tail_turns": {
  18882. "type": "integer",
  18883. "minimum": 0
  18884. },
  18885. "preserve_recent_tokens": {
  18886. "type": "integer",
  18887. "minimum": 0
  18888. },
  18889. "reserved": {
  18890. "type": "integer",
  18891. "minimum": 0
  18892. }
  18893. },
  18894. "additionalProperties": false
  18895. },
  18896. "experimental": {
  18897. "type": "object",
  18898. "properties": {
  18899. "disable_paste_summary": {
  18900. "type": "boolean"
  18901. },
  18902. "batch_tool": {
  18903. "type": "boolean"
  18904. },
  18905. "openTelemetry": {
  18906. "type": "boolean"
  18907. },
  18908. "primary_tools": {
  18909. "type": "array",
  18910. "items": {
  18911. "type": "string"
  18912. }
  18913. },
  18914. "continue_loop_on_deny": {
  18915. "type": "boolean"
  18916. },
  18917. "mcp_timeout": {
  18918. "type": "integer",
  18919. "exclusiveMinimum": 0
  18920. },
  18921. "policies": {
  18922. "type": "array",
  18923. "items": {
  18924. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  18925. }
  18926. }
  18927. },
  18928. "additionalProperties": false
  18929. }
  18930. },
  18931. "additionalProperties": false
  18932. },
  18933. "Model": {
  18934. "type": "object",
  18935. "properties": {
  18936. "id": {
  18937. "type": "string"
  18938. },
  18939. "providerID": {
  18940. "type": "string"
  18941. },
  18942. "api": {
  18943. "type": "object",
  18944. "properties": {
  18945. "id": {
  18946. "type": "string"
  18947. },
  18948. "url": {
  18949. "type": "string"
  18950. },
  18951. "npm": {
  18952. "type": "string"
  18953. }
  18954. },
  18955. "required": ["id", "url", "npm"],
  18956. "additionalProperties": false
  18957. },
  18958. "name": {
  18959. "type": "string"
  18960. },
  18961. "family": {
  18962. "type": "string"
  18963. },
  18964. "capabilities": {
  18965. "type": "object",
  18966. "properties": {
  18967. "temperature": {
  18968. "type": "boolean"
  18969. },
  18970. "reasoning": {
  18971. "type": "boolean"
  18972. },
  18973. "attachment": {
  18974. "type": "boolean"
  18975. },
  18976. "toolcall": {
  18977. "type": "boolean"
  18978. },
  18979. "input": {
  18980. "type": "object",
  18981. "properties": {
  18982. "text": {
  18983. "type": "boolean"
  18984. },
  18985. "audio": {
  18986. "type": "boolean"
  18987. },
  18988. "image": {
  18989. "type": "boolean"
  18990. },
  18991. "video": {
  18992. "type": "boolean"
  18993. },
  18994. "pdf": {
  18995. "type": "boolean"
  18996. }
  18997. },
  18998. "required": ["text", "audio", "image", "video", "pdf"],
  18999. "additionalProperties": false
  19000. },
  19001. "output": {
  19002. "type": "object",
  19003. "properties": {
  19004. "text": {
  19005. "type": "boolean"
  19006. },
  19007. "audio": {
  19008. "type": "boolean"
  19009. },
  19010. "image": {
  19011. "type": "boolean"
  19012. },
  19013. "video": {
  19014. "type": "boolean"
  19015. },
  19016. "pdf": {
  19017. "type": "boolean"
  19018. }
  19019. },
  19020. "required": ["text", "audio", "image", "video", "pdf"],
  19021. "additionalProperties": false
  19022. },
  19023. "interleaved": {
  19024. "anyOf": [
  19025. {
  19026. "type": "boolean"
  19027. },
  19028. {
  19029. "type": "object",
  19030. "properties": {
  19031. "field": {
  19032. "type": "string",
  19033. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  19034. }
  19035. },
  19036. "required": ["field"],
  19037. "additionalProperties": false
  19038. }
  19039. ]
  19040. }
  19041. },
  19042. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  19043. "additionalProperties": false
  19044. },
  19045. "cost": {
  19046. "type": "object",
  19047. "properties": {
  19048. "input": {
  19049. "type": "number"
  19050. },
  19051. "output": {
  19052. "type": "number"
  19053. },
  19054. "cache": {
  19055. "type": "object",
  19056. "properties": {
  19057. "read": {
  19058. "type": "number"
  19059. },
  19060. "write": {
  19061. "type": "number"
  19062. }
  19063. },
  19064. "required": ["read", "write"],
  19065. "additionalProperties": false
  19066. },
  19067. "tiers": {
  19068. "type": "array",
  19069. "items": {
  19070. "type": "object",
  19071. "properties": {
  19072. "input": {
  19073. "type": "number"
  19074. },
  19075. "output": {
  19076. "type": "number"
  19077. },
  19078. "cache": {
  19079. "type": "object",
  19080. "properties": {
  19081. "read": {
  19082. "type": "number"
  19083. },
  19084. "write": {
  19085. "type": "number"
  19086. }
  19087. },
  19088. "required": ["read", "write"],
  19089. "additionalProperties": false
  19090. },
  19091. "tier": {
  19092. "type": "object",
  19093. "properties": {
  19094. "type": {
  19095. "type": "string",
  19096. "enum": ["context"]
  19097. },
  19098. "size": {
  19099. "type": "number"
  19100. }
  19101. },
  19102. "required": ["type", "size"],
  19103. "additionalProperties": false
  19104. }
  19105. },
  19106. "required": ["input", "output", "cache", "tier"],
  19107. "additionalProperties": false
  19108. }
  19109. },
  19110. "experimentalOver200K": {
  19111. "type": "object",
  19112. "properties": {
  19113. "input": {
  19114. "type": "number"
  19115. },
  19116. "output": {
  19117. "type": "number"
  19118. },
  19119. "cache": {
  19120. "type": "object",
  19121. "properties": {
  19122. "read": {
  19123. "type": "number"
  19124. },
  19125. "write": {
  19126. "type": "number"
  19127. }
  19128. },
  19129. "required": ["read", "write"],
  19130. "additionalProperties": false
  19131. }
  19132. },
  19133. "required": ["input", "output", "cache"],
  19134. "additionalProperties": false
  19135. }
  19136. },
  19137. "required": ["input", "output", "cache"],
  19138. "additionalProperties": false
  19139. },
  19140. "limit": {
  19141. "type": "object",
  19142. "properties": {
  19143. "context": {
  19144. "type": "number"
  19145. },
  19146. "input": {
  19147. "type": "number"
  19148. },
  19149. "output": {
  19150. "type": "number"
  19151. }
  19152. },
  19153. "required": ["context", "output"],
  19154. "additionalProperties": false
  19155. },
  19156. "status": {
  19157. "type": "string",
  19158. "enum": ["alpha", "beta", "deprecated", "active"]
  19159. },
  19160. "options": {
  19161. "type": "object"
  19162. },
  19163. "headers": {
  19164. "type": "object",
  19165. "additionalProperties": {
  19166. "type": "string"
  19167. }
  19168. },
  19169. "release_date": {
  19170. "type": "string"
  19171. },
  19172. "variants": {
  19173. "type": "object",
  19174. "additionalProperties": {
  19175. "type": "object"
  19176. }
  19177. }
  19178. },
  19179. "required": [
  19180. "id",
  19181. "providerID",
  19182. "api",
  19183. "name",
  19184. "capabilities",
  19185. "cost",
  19186. "limit",
  19187. "status",
  19188. "options",
  19189. "headers",
  19190. "release_date"
  19191. ],
  19192. "additionalProperties": false
  19193. },
  19194. "Provider": {
  19195. "type": "object",
  19196. "properties": {
  19197. "id": {
  19198. "type": "string"
  19199. },
  19200. "name": {
  19201. "type": "string"
  19202. },
  19203. "source": {
  19204. "type": "string",
  19205. "enum": ["env", "config", "custom", "api"]
  19206. },
  19207. "env": {
  19208. "type": "array",
  19209. "items": {
  19210. "type": "string"
  19211. }
  19212. },
  19213. "key": {
  19214. "type": "string"
  19215. },
  19216. "options": {
  19217. "type": "object"
  19218. },
  19219. "models": {
  19220. "type": "object",
  19221. "additionalProperties": {
  19222. "$ref": "#/components/schemas/Model"
  19223. }
  19224. }
  19225. },
  19226. "required": ["id", "name", "source", "env", "options", "models"],
  19227. "additionalProperties": false
  19228. },
  19229. "ConsoleState": {
  19230. "type": "object",
  19231. "properties": {
  19232. "consoleManagedProviders": {
  19233. "type": "array",
  19234. "items": {
  19235. "type": "string"
  19236. }
  19237. },
  19238. "activeOrgName": {
  19239. "type": "string"
  19240. },
  19241. "switchableOrgCount": {
  19242. "type": "integer",
  19243. "minimum": 0
  19244. }
  19245. },
  19246. "required": ["consoleManagedProviders", "switchableOrgCount"],
  19247. "additionalProperties": false
  19248. },
  19249. "effect_HttpApiError_InternalServerError": {
  19250. "type": "object",
  19251. "properties": {
  19252. "_tag": {
  19253. "type": "string",
  19254. "enum": ["InternalServerError"]
  19255. }
  19256. },
  19257. "required": ["_tag"],
  19258. "additionalProperties": false
  19259. },
  19260. "ToolListItem": {
  19261. "type": "object",
  19262. "properties": {
  19263. "id": {
  19264. "type": "string"
  19265. },
  19266. "description": {
  19267. "type": "string"
  19268. },
  19269. "parameters": {}
  19270. },
  19271. "required": ["id", "description", "parameters"],
  19272. "additionalProperties": false
  19273. },
  19274. "ToolList": {
  19275. "type": "array",
  19276. "items": {
  19277. "$ref": "#/components/schemas/ToolListItem"
  19278. }
  19279. },
  19280. "ToolIDs": {
  19281. "type": "array",
  19282. "items": {
  19283. "type": "string"
  19284. }
  19285. },
  19286. "WorktreeError": {
  19287. "type": "object",
  19288. "properties": {
  19289. "name": {
  19290. "type": "string",
  19291. "enum": [
  19292. "WorktreeNotGitError",
  19293. "WorktreeNameGenerationFailedError",
  19294. "WorktreeCreateFailedError",
  19295. "WorktreeStartCommandFailedError",
  19296. "WorktreeRemoveFailedError",
  19297. "WorktreeResetFailedError",
  19298. "WorktreeListFailedError"
  19299. ]
  19300. },
  19301. "data": {
  19302. "type": "object",
  19303. "properties": {
  19304. "message": {
  19305. "type": "string"
  19306. }
  19307. },
  19308. "required": ["message"],
  19309. "additionalProperties": false
  19310. }
  19311. },
  19312. "required": ["name", "data"],
  19313. "additionalProperties": false
  19314. },
  19315. "WorktreeCreateInput": {
  19316. "type": "object",
  19317. "properties": {
  19318. "name": {
  19319. "type": "string"
  19320. },
  19321. "startCommand": {
  19322. "type": "string",
  19323. "description": "Additional startup script to run after the project's start command"
  19324. }
  19325. },
  19326. "additionalProperties": false
  19327. },
  19328. "Worktree": {
  19329. "type": "object",
  19330. "properties": {
  19331. "name": {
  19332. "type": "string"
  19333. },
  19334. "branch": {
  19335. "type": "string"
  19336. },
  19337. "directory": {
  19338. "type": "string"
  19339. }
  19340. },
  19341. "required": ["name", "directory"],
  19342. "additionalProperties": false
  19343. },
  19344. "WorktreeRemoveInput": {
  19345. "type": "object",
  19346. "properties": {
  19347. "directory": {
  19348. "type": "string"
  19349. }
  19350. },
  19351. "required": ["directory"],
  19352. "additionalProperties": false
  19353. },
  19354. "WorktreeResetInput": {
  19355. "type": "object",
  19356. "properties": {
  19357. "directory": {
  19358. "type": "string"
  19359. }
  19360. },
  19361. "required": ["directory"],
  19362. "additionalProperties": false
  19363. },
  19364. "ProjectSummary": {
  19365. "type": "object",
  19366. "properties": {
  19367. "id": {
  19368. "type": "string"
  19369. },
  19370. "name": {
  19371. "type": "string"
  19372. },
  19373. "worktree": {
  19374. "type": "string"
  19375. }
  19376. },
  19377. "required": ["id", "worktree"],
  19378. "additionalProperties": false
  19379. },
  19380. "GlobalSession": {
  19381. "type": "object",
  19382. "properties": {
  19383. "id": {
  19384. "type": "string",
  19385. "pattern": "^ses"
  19386. },
  19387. "slug": {
  19388. "type": "string"
  19389. },
  19390. "projectID": {
  19391. "type": "string"
  19392. },
  19393. "workspaceID": {
  19394. "type": "string",
  19395. "pattern": "^wrk"
  19396. },
  19397. "directory": {
  19398. "type": "string"
  19399. },
  19400. "path": {
  19401. "type": "string"
  19402. },
  19403. "parentID": {
  19404. "type": "string",
  19405. "pattern": "^ses"
  19406. },
  19407. "summary": {
  19408. "type": "object",
  19409. "properties": {
  19410. "additions": {
  19411. "type": "number"
  19412. },
  19413. "deletions": {
  19414. "type": "number"
  19415. },
  19416. "files": {
  19417. "type": "number"
  19418. },
  19419. "diffs": {
  19420. "type": "array",
  19421. "items": {
  19422. "$ref": "#/components/schemas/SnapshotFileDiff"
  19423. }
  19424. }
  19425. },
  19426. "required": ["additions", "deletions", "files"],
  19427. "additionalProperties": false
  19428. },
  19429. "cost": {
  19430. "type": "number"
  19431. },
  19432. "tokens": {
  19433. "type": "object",
  19434. "properties": {
  19435. "input": {
  19436. "type": "number"
  19437. },
  19438. "output": {
  19439. "type": "number"
  19440. },
  19441. "reasoning": {
  19442. "type": "number"
  19443. },
  19444. "cache": {
  19445. "type": "object",
  19446. "properties": {
  19447. "read": {
  19448. "type": "number"
  19449. },
  19450. "write": {
  19451. "type": "number"
  19452. }
  19453. },
  19454. "required": ["read", "write"],
  19455. "additionalProperties": false
  19456. }
  19457. },
  19458. "required": ["input", "output", "reasoning", "cache"],
  19459. "additionalProperties": false
  19460. },
  19461. "share": {
  19462. "type": "object",
  19463. "properties": {
  19464. "url": {
  19465. "type": "string"
  19466. }
  19467. },
  19468. "required": ["url"],
  19469. "additionalProperties": false
  19470. },
  19471. "title": {
  19472. "type": "string"
  19473. },
  19474. "agent": {
  19475. "type": "string"
  19476. },
  19477. "model": {
  19478. "type": "object",
  19479. "properties": {
  19480. "id": {
  19481. "type": "string"
  19482. },
  19483. "providerID": {
  19484. "type": "string"
  19485. },
  19486. "variant": {
  19487. "type": "string"
  19488. }
  19489. },
  19490. "required": ["id", "providerID"],
  19491. "additionalProperties": false
  19492. },
  19493. "version": {
  19494. "type": "string"
  19495. },
  19496. "metadata": {
  19497. "type": "object"
  19498. },
  19499. "time": {
  19500. "type": "object",
  19501. "properties": {
  19502. "created": {
  19503. "type": "integer",
  19504. "minimum": 0
  19505. },
  19506. "updated": {
  19507. "type": "integer",
  19508. "minimum": 0
  19509. },
  19510. "compacting": {
  19511. "type": "integer",
  19512. "minimum": 0
  19513. },
  19514. "archived": {
  19515. "type": "number"
  19516. }
  19517. },
  19518. "required": ["created", "updated"],
  19519. "additionalProperties": false
  19520. },
  19521. "permission": {
  19522. "$ref": "#/components/schemas/PermissionRuleset"
  19523. },
  19524. "revert": {
  19525. "type": "object",
  19526. "properties": {
  19527. "messageID": {
  19528. "type": "string",
  19529. "pattern": "^msg"
  19530. },
  19531. "partID": {
  19532. "type": "string",
  19533. "pattern": "^prt"
  19534. },
  19535. "snapshot": {
  19536. "type": "string"
  19537. },
  19538. "diff": {
  19539. "type": "string"
  19540. }
  19541. },
  19542. "required": ["messageID"],
  19543. "additionalProperties": false
  19544. },
  19545. "project": {
  19546. "anyOf": [
  19547. {
  19548. "$ref": "#/components/schemas/ProjectSummary"
  19549. },
  19550. {
  19551. "type": "null"
  19552. }
  19553. ]
  19554. }
  19555. },
  19556. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  19557. "additionalProperties": false
  19558. },
  19559. "McpResource": {
  19560. "type": "object",
  19561. "properties": {
  19562. "name": {
  19563. "type": "string"
  19564. },
  19565. "uri": {
  19566. "type": "string"
  19567. },
  19568. "description": {
  19569. "type": "string"
  19570. },
  19571. "mimeType": {
  19572. "type": "string"
  19573. },
  19574. "client": {
  19575. "type": "string"
  19576. }
  19577. },
  19578. "required": ["name", "uri", "client"],
  19579. "additionalProperties": false
  19580. },
  19581. "Symbol": {
  19582. "type": "object",
  19583. "properties": {
  19584. "name": {
  19585. "type": "string"
  19586. },
  19587. "kind": {
  19588. "type": "integer",
  19589. "minimum": 0
  19590. },
  19591. "location": {
  19592. "type": "object",
  19593. "properties": {
  19594. "uri": {
  19595. "type": "string"
  19596. },
  19597. "range": {
  19598. "$ref": "#/components/schemas/Range"
  19599. }
  19600. },
  19601. "required": ["uri", "range"],
  19602. "additionalProperties": false
  19603. }
  19604. },
  19605. "required": ["name", "kind", "location"],
  19606. "additionalProperties": false
  19607. },
  19608. "FileNode": {
  19609. "type": "object",
  19610. "properties": {
  19611. "name": {
  19612. "type": "string"
  19613. },
  19614. "path": {
  19615. "type": "string"
  19616. },
  19617. "absolute": {
  19618. "type": "string"
  19619. },
  19620. "type": {
  19621. "type": "string",
  19622. "enum": ["file", "directory"]
  19623. },
  19624. "ignored": {
  19625. "type": "boolean"
  19626. }
  19627. },
  19628. "required": ["name", "path", "absolute", "type", "ignored"],
  19629. "additionalProperties": false
  19630. },
  19631. "FileContent": {
  19632. "type": "object",
  19633. "properties": {
  19634. "type": {
  19635. "type": "string",
  19636. "enum": ["text", "binary"]
  19637. },
  19638. "content": {
  19639. "type": "string"
  19640. },
  19641. "diff": {
  19642. "type": "string"
  19643. },
  19644. "patch": {
  19645. "type": "object",
  19646. "properties": {
  19647. "oldFileName": {
  19648. "type": "string"
  19649. },
  19650. "newFileName": {
  19651. "type": "string"
  19652. },
  19653. "oldHeader": {
  19654. "type": "string"
  19655. },
  19656. "newHeader": {
  19657. "type": "string"
  19658. },
  19659. "hunks": {
  19660. "type": "array",
  19661. "items": {
  19662. "type": "object",
  19663. "properties": {
  19664. "oldStart": {
  19665. "type": "integer",
  19666. "minimum": 0
  19667. },
  19668. "oldLines": {
  19669. "type": "integer",
  19670. "minimum": 0
  19671. },
  19672. "newStart": {
  19673. "type": "integer",
  19674. "minimum": 0
  19675. },
  19676. "newLines": {
  19677. "type": "integer",
  19678. "minimum": 0
  19679. },
  19680. "lines": {
  19681. "type": "array",
  19682. "items": {
  19683. "type": "string"
  19684. }
  19685. }
  19686. },
  19687. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  19688. "additionalProperties": false
  19689. }
  19690. },
  19691. "index": {
  19692. "type": "string"
  19693. }
  19694. },
  19695. "required": ["oldFileName", "newFileName", "hunks"],
  19696. "additionalProperties": false
  19697. },
  19698. "encoding": {
  19699. "type": "string",
  19700. "enum": ["base64"]
  19701. },
  19702. "mimeType": {
  19703. "type": "string"
  19704. }
  19705. },
  19706. "required": ["type", "content"],
  19707. "additionalProperties": false
  19708. },
  19709. "File": {
  19710. "type": "object",
  19711. "properties": {
  19712. "path": {
  19713. "type": "string"
  19714. },
  19715. "added": {
  19716. "type": "integer",
  19717. "minimum": 0
  19718. },
  19719. "removed": {
  19720. "type": "integer",
  19721. "minimum": 0
  19722. },
  19723. "status": {
  19724. "type": "string",
  19725. "enum": ["added", "deleted", "modified"]
  19726. }
  19727. },
  19728. "required": ["path", "added", "removed", "status"],
  19729. "additionalProperties": false
  19730. },
  19731. "Path": {
  19732. "type": "object",
  19733. "properties": {
  19734. "home": {
  19735. "type": "string"
  19736. },
  19737. "state": {
  19738. "type": "string"
  19739. },
  19740. "config": {
  19741. "type": "string"
  19742. },
  19743. "worktree": {
  19744. "type": "string"
  19745. },
  19746. "directory": {
  19747. "type": "string"
  19748. }
  19749. },
  19750. "required": ["home", "state", "config", "worktree", "directory"],
  19751. "additionalProperties": false
  19752. },
  19753. "VcsInfo": {
  19754. "type": "object",
  19755. "properties": {
  19756. "branch": {
  19757. "type": "string"
  19758. },
  19759. "default_branch": {
  19760. "type": "string"
  19761. }
  19762. },
  19763. "additionalProperties": false
  19764. },
  19765. "VcsFileStatus": {
  19766. "type": "object",
  19767. "properties": {
  19768. "file": {
  19769. "type": "string"
  19770. },
  19771. "additions": {
  19772. "type": "number"
  19773. },
  19774. "deletions": {
  19775. "type": "number"
  19776. },
  19777. "status": {
  19778. "type": "string",
  19779. "enum": ["added", "deleted", "modified"]
  19780. }
  19781. },
  19782. "required": ["file", "additions", "deletions", "status"],
  19783. "additionalProperties": false
  19784. },
  19785. "VcsFileDiff": {
  19786. "type": "object",
  19787. "properties": {
  19788. "file": {
  19789. "type": "string"
  19790. },
  19791. "patch": {
  19792. "type": "string"
  19793. },
  19794. "additions": {
  19795. "type": "number"
  19796. },
  19797. "deletions": {
  19798. "type": "number"
  19799. },
  19800. "status": {
  19801. "type": "string",
  19802. "enum": ["added", "deleted", "modified"]
  19803. }
  19804. },
  19805. "required": ["file", "additions", "deletions"],
  19806. "additionalProperties": false
  19807. },
  19808. "VcsApplyError": {
  19809. "type": "object",
  19810. "properties": {
  19811. "name": {
  19812. "type": "string",
  19813. "enum": ["VcsApplyError"]
  19814. },
  19815. "data": {
  19816. "type": "object",
  19817. "properties": {
  19818. "message": {
  19819. "type": "string"
  19820. },
  19821. "reason": {
  19822. "type": "string",
  19823. "enum": ["non-git", "not-clean"]
  19824. }
  19825. },
  19826. "required": ["message", "reason"],
  19827. "additionalProperties": false
  19828. }
  19829. },
  19830. "required": ["name", "data"],
  19831. "additionalProperties": false
  19832. },
  19833. "Command": {
  19834. "type": "object",
  19835. "properties": {
  19836. "name": {
  19837. "type": "string"
  19838. },
  19839. "description": {
  19840. "type": "string"
  19841. },
  19842. "agent": {
  19843. "type": "string"
  19844. },
  19845. "model": {
  19846. "type": "string"
  19847. },
  19848. "source": {
  19849. "type": "string",
  19850. "enum": ["command", "mcp", "skill"]
  19851. },
  19852. "template": {
  19853. "type": "string"
  19854. },
  19855. "subtask": {
  19856. "type": "boolean"
  19857. },
  19858. "hints": {
  19859. "type": "array",
  19860. "items": {
  19861. "type": "string"
  19862. }
  19863. }
  19864. },
  19865. "required": ["name", "template", "hints"],
  19866. "additionalProperties": false
  19867. },
  19868. "Agent": {
  19869. "type": "object",
  19870. "properties": {
  19871. "name": {
  19872. "type": "string"
  19873. },
  19874. "description": {
  19875. "type": "string"
  19876. },
  19877. "mode": {
  19878. "type": "string",
  19879. "enum": ["subagent", "primary", "all"]
  19880. },
  19881. "native": {
  19882. "type": "boolean"
  19883. },
  19884. "hidden": {
  19885. "type": "boolean"
  19886. },
  19887. "topP": {
  19888. "type": "number"
  19889. },
  19890. "temperature": {
  19891. "type": "number"
  19892. },
  19893. "color": {
  19894. "type": "string"
  19895. },
  19896. "permission": {
  19897. "$ref": "#/components/schemas/PermissionRuleset"
  19898. },
  19899. "model": {
  19900. "type": "object",
  19901. "properties": {
  19902. "modelID": {
  19903. "type": "string"
  19904. },
  19905. "providerID": {
  19906. "type": "string"
  19907. }
  19908. },
  19909. "required": ["modelID", "providerID"],
  19910. "additionalProperties": false
  19911. },
  19912. "variant": {
  19913. "type": "string"
  19914. },
  19915. "prompt": {
  19916. "type": "string"
  19917. },
  19918. "options": {
  19919. "type": "object"
  19920. },
  19921. "steps": {
  19922. "type": "number"
  19923. }
  19924. },
  19925. "required": ["name", "mode", "permission", "options"],
  19926. "additionalProperties": false
  19927. },
  19928. "LSPStatus": {
  19929. "type": "object",
  19930. "properties": {
  19931. "id": {
  19932. "type": "string"
  19933. },
  19934. "name": {
  19935. "type": "string"
  19936. },
  19937. "root": {
  19938. "type": "string"
  19939. },
  19940. "status": {
  19941. "type": "string",
  19942. "enum": ["connected", "error"]
  19943. }
  19944. },
  19945. "required": ["id", "name", "root", "status"],
  19946. "additionalProperties": false
  19947. },
  19948. "FormatterStatus": {
  19949. "type": "object",
  19950. "properties": {
  19951. "name": {
  19952. "type": "string"
  19953. },
  19954. "extensions": {
  19955. "type": "array",
  19956. "items": {
  19957. "type": "string"
  19958. }
  19959. },
  19960. "enabled": {
  19961. "type": "boolean"
  19962. }
  19963. },
  19964. "required": ["name", "extensions", "enabled"],
  19965. "additionalProperties": false
  19966. },
  19967. "MCPStatusConnected": {
  19968. "type": "object",
  19969. "properties": {
  19970. "status": {
  19971. "type": "string",
  19972. "enum": ["connected"]
  19973. }
  19974. },
  19975. "required": ["status"],
  19976. "additionalProperties": false
  19977. },
  19978. "MCPStatusDisabled": {
  19979. "type": "object",
  19980. "properties": {
  19981. "status": {
  19982. "type": "string",
  19983. "enum": ["disabled"]
  19984. }
  19985. },
  19986. "required": ["status"],
  19987. "additionalProperties": false
  19988. },
  19989. "MCPStatusFailed": {
  19990. "type": "object",
  19991. "properties": {
  19992. "status": {
  19993. "type": "string",
  19994. "enum": ["failed"]
  19995. },
  19996. "error": {
  19997. "type": "string"
  19998. }
  19999. },
  20000. "required": ["status", "error"],
  20001. "additionalProperties": false
  20002. },
  20003. "MCPStatusNeedsAuth": {
  20004. "type": "object",
  20005. "properties": {
  20006. "status": {
  20007. "type": "string",
  20008. "enum": ["needs_auth"]
  20009. }
  20010. },
  20011. "required": ["status"],
  20012. "additionalProperties": false
  20013. },
  20014. "MCPStatusNeedsClientRegistration": {
  20015. "type": "object",
  20016. "properties": {
  20017. "status": {
  20018. "type": "string",
  20019. "enum": ["needs_client_registration"]
  20020. },
  20021. "error": {
  20022. "type": "string"
  20023. }
  20024. },
  20025. "required": ["status", "error"],
  20026. "additionalProperties": false
  20027. },
  20028. "MCPStatus": {
  20029. "anyOf": [
  20030. {
  20031. "$ref": "#/components/schemas/MCPStatusConnected"
  20032. },
  20033. {
  20034. "$ref": "#/components/schemas/MCPStatusDisabled"
  20035. },
  20036. {
  20037. "$ref": "#/components/schemas/MCPStatusFailed"
  20038. },
  20039. {
  20040. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  20041. },
  20042. {
  20043. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  20044. }
  20045. ]
  20046. },
  20047. "McpUnsupportedOAuthError": {
  20048. "type": "object",
  20049. "properties": {
  20050. "error": {
  20051. "type": "string"
  20052. }
  20053. },
  20054. "required": ["error"],
  20055. "additionalProperties": false
  20056. },
  20057. "McpServerNotFoundError": {
  20058. "type": "object",
  20059. "properties": {
  20060. "_tag": {
  20061. "type": "string",
  20062. "enum": ["McpServerNotFoundError"]
  20063. },
  20064. "name": {
  20065. "type": "string"
  20066. },
  20067. "message": {
  20068. "type": "string"
  20069. }
  20070. },
  20071. "required": ["_tag", "name", "message"],
  20072. "additionalProperties": false
  20073. },
  20074. "Project": {
  20075. "type": "object",
  20076. "properties": {
  20077. "id": {
  20078. "type": "string"
  20079. },
  20080. "worktree": {
  20081. "type": "string"
  20082. },
  20083. "vcs": {
  20084. "type": "string",
  20085. "enum": ["git"]
  20086. },
  20087. "name": {
  20088. "type": "string"
  20089. },
  20090. "icon": {
  20091. "type": "object",
  20092. "properties": {
  20093. "url": {
  20094. "type": "string"
  20095. },
  20096. "override": {
  20097. "type": "string"
  20098. },
  20099. "color": {
  20100. "type": "string"
  20101. }
  20102. },
  20103. "additionalProperties": false
  20104. },
  20105. "commands": {
  20106. "type": "object",
  20107. "properties": {
  20108. "start": {
  20109. "type": "string",
  20110. "description": "Startup script to run when creating a new workspace (worktree)"
  20111. }
  20112. },
  20113. "additionalProperties": false
  20114. },
  20115. "time": {
  20116. "type": "object",
  20117. "properties": {
  20118. "created": {
  20119. "type": "integer",
  20120. "minimum": 0
  20121. },
  20122. "updated": {
  20123. "type": "integer",
  20124. "minimum": 0
  20125. },
  20126. "initialized": {
  20127. "type": "integer",
  20128. "minimum": 0
  20129. }
  20130. },
  20131. "required": ["created", "updated"],
  20132. "additionalProperties": false
  20133. },
  20134. "sandboxes": {
  20135. "type": "array",
  20136. "items": {
  20137. "type": "string"
  20138. }
  20139. }
  20140. },
  20141. "required": ["id", "worktree", "time", "sandboxes"],
  20142. "additionalProperties": false
  20143. },
  20144. "ProjectNotFoundError": {
  20145. "type": "object",
  20146. "properties": {
  20147. "_tag": {
  20148. "type": "string",
  20149. "enum": ["ProjectNotFoundError"]
  20150. },
  20151. "projectID": {
  20152. "type": "string"
  20153. },
  20154. "message": {
  20155. "type": "string"
  20156. }
  20157. },
  20158. "required": ["_tag", "projectID", "message"],
  20159. "additionalProperties": false
  20160. },
  20161. "ProjectCopyError": {
  20162. "type": "object",
  20163. "properties": {
  20164. "name": {
  20165. "type": "string",
  20166. "enum": ["ProjectCopyError"]
  20167. },
  20168. "data": {
  20169. "type": "object",
  20170. "properties": {
  20171. "message": {
  20172. "type": "string"
  20173. },
  20174. "forceRequired": {
  20175. "type": "boolean"
  20176. }
  20177. },
  20178. "required": ["message"],
  20179. "additionalProperties": false
  20180. }
  20181. },
  20182. "required": ["name", "data"],
  20183. "additionalProperties": false
  20184. },
  20185. "PtyNotFoundError": {
  20186. "type": "object",
  20187. "properties": {
  20188. "_tag": {
  20189. "type": "string",
  20190. "enum": ["PtyNotFoundError"]
  20191. },
  20192. "ptyID": {
  20193. "type": "string"
  20194. },
  20195. "message": {
  20196. "type": "string"
  20197. }
  20198. },
  20199. "required": ["_tag", "ptyID", "message"],
  20200. "additionalProperties": false
  20201. },
  20202. "PtyForbiddenError": {
  20203. "type": "object",
  20204. "properties": {
  20205. "_tag": {
  20206. "type": "string",
  20207. "enum": ["PtyForbiddenError"]
  20208. },
  20209. "message": {
  20210. "type": "string"
  20211. }
  20212. },
  20213. "required": ["_tag", "message"],
  20214. "additionalProperties": false
  20215. },
  20216. "QuestionRequest": {
  20217. "type": "object",
  20218. "properties": {
  20219. "id": {
  20220. "type": "string",
  20221. "pattern": "^que"
  20222. },
  20223. "sessionID": {
  20224. "type": "string",
  20225. "pattern": "^ses"
  20226. },
  20227. "questions": {
  20228. "type": "array",
  20229. "items": {
  20230. "$ref": "#/components/schemas/QuestionInfo"
  20231. },
  20232. "description": "Questions to ask"
  20233. },
  20234. "tool": {
  20235. "$ref": "#/components/schemas/QuestionTool"
  20236. }
  20237. },
  20238. "required": ["id", "sessionID", "questions"],
  20239. "additionalProperties": false
  20240. },
  20241. "QuestionNotFoundError": {
  20242. "type": "object",
  20243. "properties": {
  20244. "_tag": {
  20245. "type": "string",
  20246. "enum": ["QuestionNotFoundError"]
  20247. },
  20248. "requestID": {
  20249. "type": "string"
  20250. },
  20251. "message": {
  20252. "type": "string"
  20253. }
  20254. },
  20255. "required": ["_tag", "requestID", "message"],
  20256. "additionalProperties": false
  20257. },
  20258. "PermissionRequest": {
  20259. "type": "object",
  20260. "properties": {
  20261. "id": {
  20262. "type": "string",
  20263. "pattern": "^per"
  20264. },
  20265. "sessionID": {
  20266. "type": "string",
  20267. "pattern": "^ses"
  20268. },
  20269. "permission": {
  20270. "type": "string"
  20271. },
  20272. "patterns": {
  20273. "type": "array",
  20274. "items": {
  20275. "type": "string"
  20276. }
  20277. },
  20278. "metadata": {
  20279. "type": "object"
  20280. },
  20281. "always": {
  20282. "type": "array",
  20283. "items": {
  20284. "type": "string"
  20285. }
  20286. },
  20287. "tool": {
  20288. "type": "object",
  20289. "properties": {
  20290. "messageID": {
  20291. "type": "string"
  20292. },
  20293. "callID": {
  20294. "type": "string"
  20295. }
  20296. },
  20297. "required": ["messageID", "callID"],
  20298. "additionalProperties": false
  20299. }
  20300. },
  20301. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  20302. "additionalProperties": false
  20303. },
  20304. "PermissionNotFoundError": {
  20305. "type": "object",
  20306. "properties": {
  20307. "_tag": {
  20308. "type": "string",
  20309. "enum": ["PermissionNotFoundError"]
  20310. },
  20311. "requestID": {
  20312. "type": "string"
  20313. },
  20314. "message": {
  20315. "type": "string"
  20316. }
  20317. },
  20318. "required": ["_tag", "requestID", "message"],
  20319. "additionalProperties": false
  20320. },
  20321. "ProviderAuthMethod": {
  20322. "type": "object",
  20323. "properties": {
  20324. "type": {
  20325. "type": "string",
  20326. "enum": ["oauth", "api"]
  20327. },
  20328. "label": {
  20329. "type": "string"
  20330. },
  20331. "prompts": {
  20332. "type": "array",
  20333. "items": {
  20334. "anyOf": [
  20335. {
  20336. "type": "object",
  20337. "properties": {
  20338. "type": {
  20339. "type": "string",
  20340. "enum": ["text"]
  20341. },
  20342. "key": {
  20343. "type": "string"
  20344. },
  20345. "message": {
  20346. "type": "string"
  20347. },
  20348. "placeholder": {
  20349. "type": "string"
  20350. },
  20351. "when": {
  20352. "type": "object",
  20353. "properties": {
  20354. "key": {
  20355. "type": "string"
  20356. },
  20357. "op": {
  20358. "type": "string",
  20359. "enum": ["eq", "neq"]
  20360. },
  20361. "value": {
  20362. "type": "string"
  20363. }
  20364. },
  20365. "required": ["key", "op", "value"],
  20366. "additionalProperties": false
  20367. }
  20368. },
  20369. "required": ["type", "key", "message"],
  20370. "additionalProperties": false
  20371. },
  20372. {
  20373. "type": "object",
  20374. "properties": {
  20375. "type": {
  20376. "type": "string",
  20377. "enum": ["select"]
  20378. },
  20379. "key": {
  20380. "type": "string"
  20381. },
  20382. "message": {
  20383. "type": "string"
  20384. },
  20385. "options": {
  20386. "type": "array",
  20387. "items": {
  20388. "type": "object",
  20389. "properties": {
  20390. "label": {
  20391. "type": "string"
  20392. },
  20393. "value": {
  20394. "type": "string"
  20395. },
  20396. "hint": {
  20397. "type": "string"
  20398. }
  20399. },
  20400. "required": ["label", "value"],
  20401. "additionalProperties": false
  20402. }
  20403. },
  20404. "when": {
  20405. "type": "object",
  20406. "properties": {
  20407. "key": {
  20408. "type": "string"
  20409. },
  20410. "op": {
  20411. "type": "string",
  20412. "enum": ["eq", "neq"]
  20413. },
  20414. "value": {
  20415. "type": "string"
  20416. }
  20417. },
  20418. "required": ["key", "op", "value"],
  20419. "additionalProperties": false
  20420. }
  20421. },
  20422. "required": ["type", "key", "message", "options"],
  20423. "additionalProperties": false
  20424. }
  20425. ]
  20426. }
  20427. }
  20428. },
  20429. "required": ["type", "label"],
  20430. "additionalProperties": false
  20431. },
  20432. "ProviderAuthAuthorization": {
  20433. "type": "object",
  20434. "properties": {
  20435. "url": {
  20436. "type": "string"
  20437. },
  20438. "method": {
  20439. "type": "string",
  20440. "enum": ["auto", "code"]
  20441. },
  20442. "instructions": {
  20443. "type": "string"
  20444. }
  20445. },
  20446. "required": ["url", "method", "instructions"],
  20447. "additionalProperties": false
  20448. },
  20449. "ProviderAuthError1": {
  20450. "type": "object",
  20451. "properties": {
  20452. "name": {
  20453. "type": "string",
  20454. "enum": [
  20455. "BadRequest",
  20456. "ProviderAuthOauthMissing",
  20457. "ProviderAuthOauthCodeMissing",
  20458. "ProviderAuthOauthCallbackFailed",
  20459. "ProviderAuthValidationFailed"
  20460. ]
  20461. },
  20462. "data": {
  20463. "type": "object",
  20464. "properties": {
  20465. "providerID": {
  20466. "type": "string"
  20467. },
  20468. "field": {
  20469. "type": "string"
  20470. },
  20471. "message": {
  20472. "type": "string"
  20473. },
  20474. "kind": {
  20475. "type": "string"
  20476. }
  20477. },
  20478. "additionalProperties": false
  20479. }
  20480. },
  20481. "required": ["name", "data"],
  20482. "additionalProperties": false
  20483. },
  20484. "NotFoundError": {
  20485. "type": "object",
  20486. "required": ["name", "data"],
  20487. "properties": {
  20488. "name": {
  20489. "type": "string",
  20490. "enum": ["NotFoundError"]
  20491. },
  20492. "data": {
  20493. "type": "object",
  20494. "required": ["message"],
  20495. "properties": {
  20496. "message": {
  20497. "type": "string"
  20498. }
  20499. }
  20500. }
  20501. }
  20502. },
  20503. "TextPartInput": {
  20504. "type": "object",
  20505. "properties": {
  20506. "id": {
  20507. "type": "string",
  20508. "pattern": "^prt"
  20509. },
  20510. "type": {
  20511. "type": "string",
  20512. "enum": ["text"]
  20513. },
  20514. "text": {
  20515. "type": "string"
  20516. },
  20517. "synthetic": {
  20518. "type": "boolean"
  20519. },
  20520. "ignored": {
  20521. "type": "boolean"
  20522. },
  20523. "time": {
  20524. "type": "object",
  20525. "properties": {
  20526. "start": {
  20527. "type": "integer",
  20528. "minimum": 0
  20529. },
  20530. "end": {
  20531. "type": "integer",
  20532. "minimum": 0
  20533. }
  20534. },
  20535. "required": ["start"],
  20536. "additionalProperties": false
  20537. },
  20538. "metadata": {
  20539. "type": "object"
  20540. }
  20541. },
  20542. "required": ["type", "text"],
  20543. "additionalProperties": false
  20544. },
  20545. "FilePartInput": {
  20546. "type": "object",
  20547. "properties": {
  20548. "id": {
  20549. "type": "string",
  20550. "pattern": "^prt"
  20551. },
  20552. "type": {
  20553. "type": "string",
  20554. "enum": ["file"]
  20555. },
  20556. "mime": {
  20557. "type": "string"
  20558. },
  20559. "filename": {
  20560. "type": "string"
  20561. },
  20562. "url": {
  20563. "type": "string"
  20564. },
  20565. "source": {
  20566. "$ref": "#/components/schemas/FilePartSource"
  20567. }
  20568. },
  20569. "required": ["type", "mime", "url"],
  20570. "additionalProperties": false
  20571. },
  20572. "AgentPartInput": {
  20573. "type": "object",
  20574. "properties": {
  20575. "id": {
  20576. "type": "string",
  20577. "pattern": "^prt"
  20578. },
  20579. "type": {
  20580. "type": "string",
  20581. "enum": ["agent"]
  20582. },
  20583. "name": {
  20584. "type": "string"
  20585. },
  20586. "source": {
  20587. "type": "object",
  20588. "properties": {
  20589. "value": {
  20590. "type": "string"
  20591. },
  20592. "start": {
  20593. "type": "integer",
  20594. "minimum": 0
  20595. },
  20596. "end": {
  20597. "type": "integer",
  20598. "minimum": 0
  20599. }
  20600. },
  20601. "required": ["value", "start", "end"],
  20602. "additionalProperties": false
  20603. }
  20604. },
  20605. "required": ["type", "name"],
  20606. "additionalProperties": false
  20607. },
  20608. "SubtaskPartInput": {
  20609. "type": "object",
  20610. "properties": {
  20611. "id": {
  20612. "type": "string",
  20613. "pattern": "^prt"
  20614. },
  20615. "type": {
  20616. "type": "string",
  20617. "enum": ["subtask"]
  20618. },
  20619. "prompt": {
  20620. "type": "string"
  20621. },
  20622. "description": {
  20623. "type": "string"
  20624. },
  20625. "agent": {
  20626. "type": "string"
  20627. },
  20628. "model": {
  20629. "type": "object",
  20630. "properties": {
  20631. "providerID": {
  20632. "type": "string"
  20633. },
  20634. "modelID": {
  20635. "type": "string"
  20636. }
  20637. },
  20638. "required": ["providerID", "modelID"],
  20639. "additionalProperties": false
  20640. },
  20641. "command": {
  20642. "type": "string"
  20643. }
  20644. },
  20645. "required": ["type", "prompt", "description", "agent"],
  20646. "additionalProperties": false
  20647. },
  20648. "SessionBusyError": {
  20649. "type": "object",
  20650. "properties": {
  20651. "_tag": {
  20652. "type": "string",
  20653. "enum": ["SessionBusyError"]
  20654. },
  20655. "sessionID": {
  20656. "type": "string"
  20657. },
  20658. "message": {
  20659. "type": "string"
  20660. }
  20661. },
  20662. "required": ["_tag", "sessionID", "message"],
  20663. "additionalProperties": false
  20664. },
  20665. "EventTuiPromptAppend": {
  20666. "type": "object",
  20667. "properties": {
  20668. "type": {
  20669. "type": "string",
  20670. "enum": ["tui.prompt.append"]
  20671. },
  20672. "properties": {
  20673. "type": "object",
  20674. "properties": {
  20675. "text": {
  20676. "type": "string"
  20677. }
  20678. },
  20679. "required": ["text"],
  20680. "additionalProperties": false
  20681. }
  20682. },
  20683. "required": ["type", "properties"],
  20684. "additionalProperties": false
  20685. },
  20686. "EventTuiCommandExecute": {
  20687. "type": "object",
  20688. "properties": {
  20689. "type": {
  20690. "type": "string",
  20691. "enum": ["tui.command.execute"]
  20692. },
  20693. "properties": {
  20694. "type": "object",
  20695. "properties": {
  20696. "command": {
  20697. "anyOf": [
  20698. {
  20699. "type": "string",
  20700. "enum": [
  20701. "session.list",
  20702. "session.new",
  20703. "session.share",
  20704. "session.interrupt",
  20705. "session.compact",
  20706. "session.page.up",
  20707. "session.page.down",
  20708. "session.line.up",
  20709. "session.line.down",
  20710. "session.half.page.up",
  20711. "session.half.page.down",
  20712. "session.first",
  20713. "session.last",
  20714. "prompt.clear",
  20715. "prompt.submit",
  20716. "agent.cycle"
  20717. ]
  20718. },
  20719. {
  20720. "type": "string"
  20721. }
  20722. ]
  20723. }
  20724. },
  20725. "required": ["command"],
  20726. "additionalProperties": false
  20727. }
  20728. },
  20729. "required": ["type", "properties"],
  20730. "additionalProperties": false
  20731. },
  20732. "EventTuiToastShow": {
  20733. "type": "object",
  20734. "properties": {
  20735. "type": {
  20736. "type": "string",
  20737. "enum": ["tui.toast.show"]
  20738. },
  20739. "properties": {
  20740. "type": "object",
  20741. "properties": {
  20742. "title": {
  20743. "type": "string"
  20744. },
  20745. "message": {
  20746. "type": "string"
  20747. },
  20748. "variant": {
  20749. "type": "string",
  20750. "enum": ["info", "success", "warning", "error"]
  20751. },
  20752. "duration": {
  20753. "type": "integer",
  20754. "exclusiveMinimum": 0
  20755. }
  20756. },
  20757. "required": ["message", "variant"],
  20758. "additionalProperties": false
  20759. }
  20760. },
  20761. "required": ["type", "properties"],
  20762. "additionalProperties": false
  20763. },
  20764. "EventTuiSessionSelect": {
  20765. "type": "object",
  20766. "properties": {
  20767. "type": {
  20768. "type": "string",
  20769. "enum": ["tui.session.select"]
  20770. },
  20771. "properties": {
  20772. "type": "object",
  20773. "properties": {
  20774. "sessionID": {
  20775. "type": "string",
  20776. "pattern": "^ses",
  20777. "description": "Session ID to navigate to"
  20778. }
  20779. },
  20780. "required": ["sessionID"],
  20781. "additionalProperties": false
  20782. }
  20783. },
  20784. "required": ["type", "properties"],
  20785. "additionalProperties": false
  20786. },
  20787. "Workspace": {
  20788. "type": "object",
  20789. "properties": {
  20790. "id": {
  20791. "type": "string",
  20792. "pattern": "^wrk"
  20793. },
  20794. "type": {
  20795. "type": "string"
  20796. },
  20797. "name": {
  20798. "type": "string"
  20799. },
  20800. "branch": {
  20801. "anyOf": [
  20802. {
  20803. "type": "string"
  20804. },
  20805. {
  20806. "type": "null"
  20807. }
  20808. ]
  20809. },
  20810. "directory": {
  20811. "anyOf": [
  20812. {
  20813. "type": "string"
  20814. },
  20815. {
  20816. "type": "null"
  20817. }
  20818. ]
  20819. },
  20820. "extra": {
  20821. "anyOf": [
  20822. {},
  20823. {
  20824. "type": "null"
  20825. }
  20826. ]
  20827. },
  20828. "projectID": {
  20829. "type": "string"
  20830. },
  20831. "timeUsed": {
  20832. "anyOf": [
  20833. {
  20834. "type": "number"
  20835. },
  20836. {
  20837. "type": "string",
  20838. "enum": ["NaN"]
  20839. },
  20840. {
  20841. "type": "string",
  20842. "enum": ["Infinity"]
  20843. },
  20844. {
  20845. "type": "string",
  20846. "enum": ["-Infinity"]
  20847. },
  20848. {
  20849. "type": "string",
  20850. "enum": ["Infinity", "-Infinity", "NaN"]
  20851. }
  20852. ]
  20853. }
  20854. },
  20855. "required": ["id", "type", "name", "projectID", "timeUsed"],
  20856. "additionalProperties": false
  20857. },
  20858. "WorkspaceCreateError": {
  20859. "type": "object",
  20860. "properties": {
  20861. "name": {
  20862. "type": "string",
  20863. "enum": ["WorkspaceCreateError"]
  20864. },
  20865. "data": {
  20866. "type": "object",
  20867. "properties": {
  20868. "message": {
  20869. "type": "string"
  20870. }
  20871. },
  20872. "required": ["message"],
  20873. "additionalProperties": false
  20874. }
  20875. },
  20876. "required": ["name", "data"],
  20877. "additionalProperties": false
  20878. },
  20879. "WorkspaceWarpError": {
  20880. "type": "object",
  20881. "properties": {
  20882. "name": {
  20883. "type": "string",
  20884. "enum": ["WorkspaceWarpError"]
  20885. },
  20886. "data": {
  20887. "type": "object",
  20888. "properties": {
  20889. "message": {
  20890. "type": "string"
  20891. }
  20892. },
  20893. "required": ["message"],
  20894. "additionalProperties": false
  20895. }
  20896. },
  20897. "required": ["name", "data"],
  20898. "additionalProperties": false
  20899. },
  20900. "UnauthorizedError": {
  20901. "type": "object",
  20902. "properties": {
  20903. "_tag": {
  20904. "type": "string",
  20905. "enum": ["UnauthorizedError"]
  20906. },
  20907. "message": {
  20908. "type": "string"
  20909. }
  20910. },
  20911. "required": ["_tag", "message"],
  20912. "additionalProperties": false
  20913. },
  20914. "SessionsResponse": {
  20915. "type": "object",
  20916. "properties": {
  20917. "data": {
  20918. "type": "array",
  20919. "items": {
  20920. "$ref": "#/components/schemas/SessionV2Info"
  20921. }
  20922. },
  20923. "cursor": {
  20924. "type": "object",
  20925. "properties": {
  20926. "previous": {
  20927. "type": "string"
  20928. },
  20929. "next": {
  20930. "type": "string"
  20931. }
  20932. },
  20933. "additionalProperties": false
  20934. }
  20935. },
  20936. "required": ["data", "cursor"],
  20937. "additionalProperties": false
  20938. },
  20939. "InvalidCursorError": {
  20940. "type": "object",
  20941. "properties": {
  20942. "_tag": {
  20943. "type": "string",
  20944. "enum": ["InvalidCursorError"]
  20945. },
  20946. "message": {
  20947. "type": "string"
  20948. }
  20949. },
  20950. "required": ["_tag", "message"],
  20951. "additionalProperties": false
  20952. },
  20953. "SessionNotFoundError": {
  20954. "type": "object",
  20955. "properties": {
  20956. "_tag": {
  20957. "type": "string",
  20958. "enum": ["SessionNotFoundError"]
  20959. },
  20960. "sessionID": {
  20961. "type": "string"
  20962. },
  20963. "message": {
  20964. "type": "string"
  20965. }
  20966. },
  20967. "required": ["_tag", "sessionID", "message"],
  20968. "additionalProperties": false
  20969. },
  20970. "ConflictError": {
  20971. "type": "object",
  20972. "properties": {
  20973. "_tag": {
  20974. "type": "string",
  20975. "enum": ["ConflictError"]
  20976. },
  20977. "message": {
  20978. "type": "string"
  20979. },
  20980. "resource": {
  20981. "type": "string"
  20982. }
  20983. },
  20984. "required": ["_tag", "message"],
  20985. "additionalProperties": false
  20986. },
  20987. "ServiceUnavailableError": {
  20988. "type": "object",
  20989. "properties": {
  20990. "_tag": {
  20991. "type": "string",
  20992. "enum": ["ServiceUnavailableError"]
  20993. },
  20994. "message": {
  20995. "type": "string"
  20996. },
  20997. "service": {
  20998. "type": "string"
  20999. }
  21000. },
  21001. "required": ["_tag", "message"],
  21002. "additionalProperties": false
  21003. },
  21004. "UnknownError1": {
  21005. "type": "object",
  21006. "properties": {
  21007. "_tag": {
  21008. "type": "string",
  21009. "enum": ["UnknownError"]
  21010. },
  21011. "message": {
  21012. "type": "string"
  21013. },
  21014. "ref": {
  21015. "type": "string"
  21016. }
  21017. },
  21018. "required": ["_tag", "message"],
  21019. "additionalProperties": false
  21020. },
  21021. "SessionMessagesResponse": {
  21022. "type": "object",
  21023. "properties": {
  21024. "data": {
  21025. "type": "array",
  21026. "items": {
  21027. "$ref": "#/components/schemas/SessionMessage"
  21028. }
  21029. },
  21030. "cursor": {
  21031. "type": "object",
  21032. "properties": {
  21033. "previous": {
  21034. "type": "string"
  21035. },
  21036. "next": {
  21037. "type": "string"
  21038. }
  21039. },
  21040. "additionalProperties": false
  21041. }
  21042. },
  21043. "required": ["data", "cursor"],
  21044. "additionalProperties": false
  21045. },
  21046. "ProviderNotFoundError": {
  21047. "type": "object",
  21048. "properties": {
  21049. "_tag": {
  21050. "type": "string",
  21051. "enum": ["ProviderNotFoundError"]
  21052. },
  21053. "providerID": {
  21054. "type": "string"
  21055. },
  21056. "message": {
  21057. "type": "string"
  21058. }
  21059. },
  21060. "required": ["_tag", "providerID", "message"],
  21061. "additionalProperties": false
  21062. },
  21063. "effect_HttpApiError_Forbidden": {
  21064. "type": "object",
  21065. "properties": {
  21066. "_tag": {
  21067. "type": "string",
  21068. "enum": ["Forbidden"]
  21069. }
  21070. },
  21071. "required": ["_tag"],
  21072. "additionalProperties": false
  21073. },
  21074. "Event.tui.prompt.append": {
  21075. "type": "object",
  21076. "properties": {
  21077. "id": {
  21078. "type": "string",
  21079. "pattern": "^evt_"
  21080. },
  21081. "type": {
  21082. "type": "string",
  21083. "enum": ["tui.prompt.append"]
  21084. },
  21085. "properties": {
  21086. "type": "object",
  21087. "properties": {
  21088. "text": {
  21089. "type": "string"
  21090. }
  21091. },
  21092. "required": ["text"],
  21093. "additionalProperties": false
  21094. }
  21095. },
  21096. "required": ["id", "type", "properties"],
  21097. "additionalProperties": false
  21098. },
  21099. "Event.tui.command.execute": {
  21100. "type": "object",
  21101. "properties": {
  21102. "id": {
  21103. "type": "string",
  21104. "pattern": "^evt_"
  21105. },
  21106. "type": {
  21107. "type": "string",
  21108. "enum": ["tui.command.execute"]
  21109. },
  21110. "properties": {
  21111. "type": "object",
  21112. "properties": {
  21113. "command": {
  21114. "anyOf": [
  21115. {
  21116. "type": "string",
  21117. "enum": [
  21118. "session.list",
  21119. "session.new",
  21120. "session.share",
  21121. "session.interrupt",
  21122. "session.compact",
  21123. "session.page.up",
  21124. "session.page.down",
  21125. "session.line.up",
  21126. "session.line.down",
  21127. "session.half.page.up",
  21128. "session.half.page.down",
  21129. "session.first",
  21130. "session.last",
  21131. "prompt.clear",
  21132. "prompt.submit",
  21133. "agent.cycle"
  21134. ]
  21135. },
  21136. {
  21137. "type": "string"
  21138. }
  21139. ]
  21140. }
  21141. },
  21142. "required": ["command"],
  21143. "additionalProperties": false
  21144. }
  21145. },
  21146. "required": ["id", "type", "properties"],
  21147. "additionalProperties": false
  21148. },
  21149. "Event.tui.toast.show": {
  21150. "type": "object",
  21151. "properties": {
  21152. "id": {
  21153. "type": "string",
  21154. "pattern": "^evt_"
  21155. },
  21156. "type": {
  21157. "type": "string",
  21158. "enum": ["tui.toast.show"]
  21159. },
  21160. "properties": {
  21161. "type": "object",
  21162. "properties": {
  21163. "title": {
  21164. "type": "string"
  21165. },
  21166. "message": {
  21167. "type": "string"
  21168. },
  21169. "variant": {
  21170. "type": "string",
  21171. "enum": ["info", "success", "warning", "error"]
  21172. },
  21173. "duration": {
  21174. "type": "integer",
  21175. "exclusiveMinimum": 0
  21176. }
  21177. },
  21178. "required": ["message", "variant"],
  21179. "additionalProperties": false
  21180. }
  21181. },
  21182. "required": ["id", "type", "properties"],
  21183. "additionalProperties": false
  21184. },
  21185. "Event.tui.session.select": {
  21186. "type": "object",
  21187. "properties": {
  21188. "id": {
  21189. "type": "string",
  21190. "pattern": "^evt_"
  21191. },
  21192. "type": {
  21193. "type": "string",
  21194. "enum": ["tui.session.select"]
  21195. },
  21196. "properties": {
  21197. "type": "object",
  21198. "properties": {
  21199. "sessionID": {
  21200. "type": "string",
  21201. "pattern": "^ses",
  21202. "description": "Session ID to navigate to"
  21203. }
  21204. },
  21205. "required": ["sessionID"],
  21206. "additionalProperties": false
  21207. }
  21208. },
  21209. "required": ["id", "type", "properties"],
  21210. "additionalProperties": false
  21211. },
  21212. "MoveSessionDestination": {
  21213. "type": "object",
  21214. "properties": {
  21215. "directory": {
  21216. "type": "string"
  21217. }
  21218. },
  21219. "required": ["directory"],
  21220. "additionalProperties": false
  21221. },
  21222. "ModelV2Info": {
  21223. "type": "object",
  21224. "properties": {
  21225. "id": {
  21226. "type": "string"
  21227. },
  21228. "providerID": {
  21229. "type": "string"
  21230. },
  21231. "family": {
  21232. "type": "string"
  21233. },
  21234. "name": {
  21235. "type": "string"
  21236. },
  21237. "api": {
  21238. "anyOf": [
  21239. {
  21240. "type": "object",
  21241. "properties": {
  21242. "id": {
  21243. "type": "string"
  21244. },
  21245. "type": {
  21246. "type": "string",
  21247. "enum": ["aisdk"]
  21248. },
  21249. "package": {
  21250. "type": "string"
  21251. },
  21252. "url": {
  21253. "type": "string"
  21254. },
  21255. "settings": {
  21256. "type": "object"
  21257. }
  21258. },
  21259. "required": ["id", "type", "package"],
  21260. "additionalProperties": false
  21261. },
  21262. {
  21263. "type": "object",
  21264. "properties": {
  21265. "id": {
  21266. "type": "string"
  21267. },
  21268. "type": {
  21269. "type": "string",
  21270. "enum": ["native"]
  21271. },
  21272. "url": {
  21273. "type": "string"
  21274. },
  21275. "settings": {
  21276. "type": "object"
  21277. }
  21278. },
  21279. "required": ["id", "type", "settings"],
  21280. "additionalProperties": false
  21281. }
  21282. ]
  21283. },
  21284. "capabilities": {
  21285. "type": "object",
  21286. "properties": {
  21287. "tools": {
  21288. "type": "boolean"
  21289. },
  21290. "input": {
  21291. "type": "array",
  21292. "items": {
  21293. "type": "string"
  21294. }
  21295. },
  21296. "output": {
  21297. "type": "array",
  21298. "items": {
  21299. "type": "string"
  21300. }
  21301. }
  21302. },
  21303. "required": ["tools", "input", "output"],
  21304. "additionalProperties": false
  21305. },
  21306. "request": {
  21307. "type": "object",
  21308. "properties": {
  21309. "headers": {
  21310. "type": "object",
  21311. "additionalProperties": {
  21312. "type": "string"
  21313. }
  21314. },
  21315. "body": {
  21316. "type": "object"
  21317. },
  21318. "generation": {
  21319. "type": "object",
  21320. "properties": {
  21321. "maxTokens": {
  21322. "anyOf": [
  21323. {
  21324. "type": "number"
  21325. },
  21326. {
  21327. "type": "string",
  21328. "enum": ["NaN"]
  21329. },
  21330. {
  21331. "type": "string",
  21332. "enum": ["Infinity"]
  21333. },
  21334. {
  21335. "type": "string",
  21336. "enum": ["-Infinity"]
  21337. },
  21338. {
  21339. "type": "string",
  21340. "enum": ["Infinity", "-Infinity", "NaN"]
  21341. }
  21342. ]
  21343. },
  21344. "temperature": {
  21345. "anyOf": [
  21346. {
  21347. "type": "number"
  21348. },
  21349. {
  21350. "type": "string",
  21351. "enum": ["NaN"]
  21352. },
  21353. {
  21354. "type": "string",
  21355. "enum": ["Infinity"]
  21356. },
  21357. {
  21358. "type": "string",
  21359. "enum": ["-Infinity"]
  21360. },
  21361. {
  21362. "type": "string",
  21363. "enum": ["Infinity", "-Infinity", "NaN"]
  21364. }
  21365. ]
  21366. },
  21367. "topP": {
  21368. "anyOf": [
  21369. {
  21370. "type": "number"
  21371. },
  21372. {
  21373. "type": "string",
  21374. "enum": ["NaN"]
  21375. },
  21376. {
  21377. "type": "string",
  21378. "enum": ["Infinity"]
  21379. },
  21380. {
  21381. "type": "string",
  21382. "enum": ["-Infinity"]
  21383. },
  21384. {
  21385. "type": "string",
  21386. "enum": ["Infinity", "-Infinity", "NaN"]
  21387. }
  21388. ]
  21389. },
  21390. "topK": {
  21391. "anyOf": [
  21392. {
  21393. "type": "number"
  21394. },
  21395. {
  21396. "type": "string",
  21397. "enum": ["NaN"]
  21398. },
  21399. {
  21400. "type": "string",
  21401. "enum": ["Infinity"]
  21402. },
  21403. {
  21404. "type": "string",
  21405. "enum": ["-Infinity"]
  21406. },
  21407. {
  21408. "type": "string",
  21409. "enum": ["Infinity", "-Infinity", "NaN"]
  21410. }
  21411. ]
  21412. },
  21413. "frequencyPenalty": {
  21414. "anyOf": [
  21415. {
  21416. "type": "number"
  21417. },
  21418. {
  21419. "type": "string",
  21420. "enum": ["NaN"]
  21421. },
  21422. {
  21423. "type": "string",
  21424. "enum": ["Infinity"]
  21425. },
  21426. {
  21427. "type": "string",
  21428. "enum": ["-Infinity"]
  21429. },
  21430. {
  21431. "type": "string",
  21432. "enum": ["Infinity", "-Infinity", "NaN"]
  21433. }
  21434. ]
  21435. },
  21436. "presencePenalty": {
  21437. "anyOf": [
  21438. {
  21439. "type": "number"
  21440. },
  21441. {
  21442. "type": "string",
  21443. "enum": ["NaN"]
  21444. },
  21445. {
  21446. "type": "string",
  21447. "enum": ["Infinity"]
  21448. },
  21449. {
  21450. "type": "string",
  21451. "enum": ["-Infinity"]
  21452. },
  21453. {
  21454. "type": "string",
  21455. "enum": ["Infinity", "-Infinity", "NaN"]
  21456. }
  21457. ]
  21458. },
  21459. "seed": {
  21460. "anyOf": [
  21461. {
  21462. "type": "number"
  21463. },
  21464. {
  21465. "type": "string",
  21466. "enum": ["NaN"]
  21467. },
  21468. {
  21469. "type": "string",
  21470. "enum": ["Infinity"]
  21471. },
  21472. {
  21473. "type": "string",
  21474. "enum": ["-Infinity"]
  21475. },
  21476. {
  21477. "type": "string",
  21478. "enum": ["Infinity", "-Infinity", "NaN"]
  21479. }
  21480. ]
  21481. },
  21482. "stop": {
  21483. "type": "array",
  21484. "items": {
  21485. "type": "string"
  21486. }
  21487. }
  21488. },
  21489. "additionalProperties": false
  21490. },
  21491. "options": {
  21492. "type": "object"
  21493. },
  21494. "variant": {
  21495. "type": "string"
  21496. }
  21497. },
  21498. "required": ["headers", "body"],
  21499. "additionalProperties": false
  21500. },
  21501. "variants": {
  21502. "type": "array",
  21503. "items": {
  21504. "type": "object",
  21505. "properties": {
  21506. "id": {
  21507. "type": "string"
  21508. },
  21509. "headers": {
  21510. "type": "object",
  21511. "additionalProperties": {
  21512. "type": "string"
  21513. }
  21514. },
  21515. "body": {
  21516. "type": "object"
  21517. },
  21518. "generation": {
  21519. "type": "object",
  21520. "properties": {
  21521. "maxTokens": {
  21522. "anyOf": [
  21523. {
  21524. "type": "number"
  21525. },
  21526. {
  21527. "type": "string",
  21528. "enum": ["NaN"]
  21529. },
  21530. {
  21531. "type": "string",
  21532. "enum": ["Infinity"]
  21533. },
  21534. {
  21535. "type": "string",
  21536. "enum": ["-Infinity"]
  21537. },
  21538. {
  21539. "type": "string",
  21540. "enum": ["Infinity", "-Infinity", "NaN"]
  21541. }
  21542. ]
  21543. },
  21544. "temperature": {
  21545. "anyOf": [
  21546. {
  21547. "type": "number"
  21548. },
  21549. {
  21550. "type": "string",
  21551. "enum": ["NaN"]
  21552. },
  21553. {
  21554. "type": "string",
  21555. "enum": ["Infinity"]
  21556. },
  21557. {
  21558. "type": "string",
  21559. "enum": ["-Infinity"]
  21560. },
  21561. {
  21562. "type": "string",
  21563. "enum": ["Infinity", "-Infinity", "NaN"]
  21564. }
  21565. ]
  21566. },
  21567. "topP": {
  21568. "anyOf": [
  21569. {
  21570. "type": "number"
  21571. },
  21572. {
  21573. "type": "string",
  21574. "enum": ["NaN"]
  21575. },
  21576. {
  21577. "type": "string",
  21578. "enum": ["Infinity"]
  21579. },
  21580. {
  21581. "type": "string",
  21582. "enum": ["-Infinity"]
  21583. },
  21584. {
  21585. "type": "string",
  21586. "enum": ["Infinity", "-Infinity", "NaN"]
  21587. }
  21588. ]
  21589. },
  21590. "topK": {
  21591. "anyOf": [
  21592. {
  21593. "type": "number"
  21594. },
  21595. {
  21596. "type": "string",
  21597. "enum": ["NaN"]
  21598. },
  21599. {
  21600. "type": "string",
  21601. "enum": ["Infinity"]
  21602. },
  21603. {
  21604. "type": "string",
  21605. "enum": ["-Infinity"]
  21606. },
  21607. {
  21608. "type": "string",
  21609. "enum": ["Infinity", "-Infinity", "NaN"]
  21610. }
  21611. ]
  21612. },
  21613. "frequencyPenalty": {
  21614. "anyOf": [
  21615. {
  21616. "type": "number"
  21617. },
  21618. {
  21619. "type": "string",
  21620. "enum": ["NaN"]
  21621. },
  21622. {
  21623. "type": "string",
  21624. "enum": ["Infinity"]
  21625. },
  21626. {
  21627. "type": "string",
  21628. "enum": ["-Infinity"]
  21629. },
  21630. {
  21631. "type": "string",
  21632. "enum": ["Infinity", "-Infinity", "NaN"]
  21633. }
  21634. ]
  21635. },
  21636. "presencePenalty": {
  21637. "anyOf": [
  21638. {
  21639. "type": "number"
  21640. },
  21641. {
  21642. "type": "string",
  21643. "enum": ["NaN"]
  21644. },
  21645. {
  21646. "type": "string",
  21647. "enum": ["Infinity"]
  21648. },
  21649. {
  21650. "type": "string",
  21651. "enum": ["-Infinity"]
  21652. },
  21653. {
  21654. "type": "string",
  21655. "enum": ["Infinity", "-Infinity", "NaN"]
  21656. }
  21657. ]
  21658. },
  21659. "seed": {
  21660. "anyOf": [
  21661. {
  21662. "type": "number"
  21663. },
  21664. {
  21665. "type": "string",
  21666. "enum": ["NaN"]
  21667. },
  21668. {
  21669. "type": "string",
  21670. "enum": ["Infinity"]
  21671. },
  21672. {
  21673. "type": "string",
  21674. "enum": ["-Infinity"]
  21675. },
  21676. {
  21677. "type": "string",
  21678. "enum": ["Infinity", "-Infinity", "NaN"]
  21679. }
  21680. ]
  21681. },
  21682. "stop": {
  21683. "type": "array",
  21684. "items": {
  21685. "type": "string"
  21686. }
  21687. }
  21688. },
  21689. "additionalProperties": false
  21690. },
  21691. "options": {
  21692. "type": "object"
  21693. }
  21694. },
  21695. "required": ["id", "headers", "body"],
  21696. "additionalProperties": false
  21697. }
  21698. },
  21699. "time": {
  21700. "type": "object",
  21701. "properties": {
  21702. "released": {
  21703. "anyOf": [
  21704. {
  21705. "type": "number"
  21706. },
  21707. {
  21708. "type": "string",
  21709. "enum": ["NaN"]
  21710. },
  21711. {
  21712. "type": "string",
  21713. "enum": ["Infinity"]
  21714. },
  21715. {
  21716. "type": "string",
  21717. "enum": ["-Infinity"]
  21718. },
  21719. {
  21720. "type": "string",
  21721. "enum": ["Infinity", "-Infinity", "NaN"]
  21722. }
  21723. ]
  21724. }
  21725. },
  21726. "required": ["released"],
  21727. "additionalProperties": false
  21728. },
  21729. "cost": {
  21730. "type": "array",
  21731. "items": {
  21732. "type": "object",
  21733. "properties": {
  21734. "tier": {
  21735. "type": "object",
  21736. "properties": {
  21737. "type": {
  21738. "type": "string",
  21739. "enum": ["context"]
  21740. },
  21741. "size": {
  21742. "type": "integer"
  21743. }
  21744. },
  21745. "required": ["type", "size"],
  21746. "additionalProperties": false
  21747. },
  21748. "input": {
  21749. "type": "number"
  21750. },
  21751. "output": {
  21752. "type": "number"
  21753. },
  21754. "cache": {
  21755. "type": "object",
  21756. "properties": {
  21757. "read": {
  21758. "type": "number"
  21759. },
  21760. "write": {
  21761. "type": "number"
  21762. }
  21763. },
  21764. "required": ["read", "write"],
  21765. "additionalProperties": false
  21766. }
  21767. },
  21768. "required": ["input", "output", "cache"],
  21769. "additionalProperties": false
  21770. }
  21771. },
  21772. "status": {
  21773. "type": "string",
  21774. "enum": ["alpha", "beta", "deprecated", "active"]
  21775. },
  21776. "enabled": {
  21777. "type": "boolean"
  21778. },
  21779. "limit": {
  21780. "type": "object",
  21781. "properties": {
  21782. "context": {
  21783. "type": "integer"
  21784. },
  21785. "input": {
  21786. "type": "integer"
  21787. },
  21788. "output": {
  21789. "type": "integer"
  21790. }
  21791. },
  21792. "required": ["context", "output"],
  21793. "additionalProperties": false
  21794. }
  21795. },
  21796. "required": [
  21797. "id",
  21798. "providerID",
  21799. "name",
  21800. "api",
  21801. "capabilities",
  21802. "request",
  21803. "variants",
  21804. "time",
  21805. "cost",
  21806. "status",
  21807. "enabled",
  21808. "limit"
  21809. ],
  21810. "additionalProperties": false
  21811. },
  21812. "LocationRef": {
  21813. "type": "object",
  21814. "properties": {
  21815. "directory": {
  21816. "type": "string"
  21817. },
  21818. "workspaceID": {
  21819. "type": "string",
  21820. "pattern": "^wrk"
  21821. }
  21822. },
  21823. "required": ["directory"],
  21824. "additionalProperties": false
  21825. },
  21826. "PromptSource": {
  21827. "type": "object",
  21828. "properties": {
  21829. "start": {
  21830. "type": "number"
  21831. },
  21832. "end": {
  21833. "type": "number"
  21834. },
  21835. "text": {
  21836. "type": "string"
  21837. }
  21838. },
  21839. "required": ["start", "end", "text"],
  21840. "additionalProperties": false
  21841. },
  21842. "PromptFileAttachment": {
  21843. "type": "object",
  21844. "properties": {
  21845. "uri": {
  21846. "type": "string"
  21847. },
  21848. "mime": {
  21849. "type": "string"
  21850. },
  21851. "name": {
  21852. "type": "string"
  21853. },
  21854. "description": {
  21855. "type": "string"
  21856. },
  21857. "source": {
  21858. "$ref": "#/components/schemas/PromptSource"
  21859. }
  21860. },
  21861. "required": ["uri", "mime"],
  21862. "additionalProperties": false
  21863. },
  21864. "PromptAgentAttachment": {
  21865. "type": "object",
  21866. "properties": {
  21867. "name": {
  21868. "type": "string"
  21869. },
  21870. "source": {
  21871. "$ref": "#/components/schemas/PromptSource"
  21872. }
  21873. },
  21874. "required": ["name"],
  21875. "additionalProperties": false
  21876. },
  21877. "SessionErrorUnknown": {
  21878. "type": "object",
  21879. "properties": {
  21880. "type": {
  21881. "type": "string",
  21882. "enum": ["unknown"]
  21883. },
  21884. "message": {
  21885. "type": "string"
  21886. }
  21887. },
  21888. "required": ["type", "message"],
  21889. "additionalProperties": false
  21890. },
  21891. "ToolTextContent": {
  21892. "type": "object",
  21893. "properties": {
  21894. "type": {
  21895. "type": "string",
  21896. "enum": ["text"]
  21897. },
  21898. "text": {
  21899. "type": "string"
  21900. }
  21901. },
  21902. "required": ["type", "text"],
  21903. "additionalProperties": false
  21904. },
  21905. "ToolFileContent": {
  21906. "type": "object",
  21907. "properties": {
  21908. "type": {
  21909. "type": "string",
  21910. "enum": ["file"]
  21911. },
  21912. "uri": {
  21913. "type": "string"
  21914. },
  21915. "mime": {
  21916. "type": "string"
  21917. },
  21918. "name": {
  21919. "type": "string"
  21920. }
  21921. },
  21922. "required": ["type", "uri", "mime"],
  21923. "additionalProperties": false
  21924. },
  21925. "SessionNextRetry_error": {
  21926. "type": "object",
  21927. "properties": {
  21928. "message": {
  21929. "type": "string"
  21930. },
  21931. "statusCode": {
  21932. "type": "number"
  21933. },
  21934. "isRetryable": {
  21935. "type": "boolean"
  21936. },
  21937. "responseHeaders": {
  21938. "type": "object",
  21939. "additionalProperties": {
  21940. "type": "string"
  21941. }
  21942. },
  21943. "responseBody": {
  21944. "type": "string"
  21945. },
  21946. "metadata": {
  21947. "type": "object",
  21948. "additionalProperties": {
  21949. "type": "string"
  21950. }
  21951. }
  21952. },
  21953. "required": ["message", "isRetryable"],
  21954. "additionalProperties": false
  21955. },
  21956. "AuthOAuthCredential": {
  21957. "type": "object",
  21958. "properties": {
  21959. "type": {
  21960. "type": "string",
  21961. "enum": ["oauth"]
  21962. },
  21963. "refresh": {
  21964. "type": "string"
  21965. },
  21966. "access": {
  21967. "type": "string"
  21968. },
  21969. "expires": {
  21970. "type": "integer",
  21971. "minimum": 0
  21972. }
  21973. },
  21974. "required": ["type", "refresh", "access", "expires"],
  21975. "additionalProperties": false
  21976. },
  21977. "AuthApiKeyCredential": {
  21978. "type": "object",
  21979. "properties": {
  21980. "type": {
  21981. "type": "string",
  21982. "enum": ["api"]
  21983. },
  21984. "key": {
  21985. "type": "string"
  21986. },
  21987. "metadata": {
  21988. "type": "object",
  21989. "additionalProperties": {
  21990. "type": "string"
  21991. }
  21992. }
  21993. },
  21994. "required": ["type", "key"],
  21995. "additionalProperties": false
  21996. },
  21997. "AuthCredential": {
  21998. "anyOf": [
  21999. {
  22000. "$ref": "#/components/schemas/AuthOAuthCredential"
  22001. },
  22002. {
  22003. "$ref": "#/components/schemas/AuthApiKeyCredential"
  22004. }
  22005. ]
  22006. },
  22007. "AuthInfo": {
  22008. "type": "object",
  22009. "properties": {
  22010. "id": {
  22011. "type": "string"
  22012. },
  22013. "serviceID": {
  22014. "type": "string"
  22015. },
  22016. "description": {
  22017. "type": "string"
  22018. },
  22019. "credential": {
  22020. "$ref": "#/components/schemas/AuthCredential"
  22021. }
  22022. },
  22023. "required": ["id", "serviceID", "description", "credential"],
  22024. "additionalProperties": false
  22025. },
  22026. "PermissionV2Source": {
  22027. "type": "object",
  22028. "properties": {
  22029. "type": {
  22030. "type": "string",
  22031. "enum": ["tool"]
  22032. },
  22033. "messageID": {
  22034. "type": "string"
  22035. },
  22036. "callID": {
  22037. "type": "string"
  22038. }
  22039. },
  22040. "required": ["type", "messageID", "callID"],
  22041. "additionalProperties": false
  22042. },
  22043. "PermissionV2Reply": {
  22044. "type": "string",
  22045. "enum": ["once", "always", "reject"]
  22046. },
  22047. "QuestionV2Option": {
  22048. "type": "object",
  22049. "properties": {
  22050. "label": {
  22051. "type": "string",
  22052. "description": "Display text (1-5 words, concise)"
  22053. },
  22054. "description": {
  22055. "type": "string",
  22056. "description": "Explanation of choice"
  22057. }
  22058. },
  22059. "required": ["label", "description"],
  22060. "additionalProperties": false
  22061. },
  22062. "QuestionV2Info": {
  22063. "type": "object",
  22064. "properties": {
  22065. "question": {
  22066. "type": "string",
  22067. "description": "Complete question"
  22068. },
  22069. "header": {
  22070. "type": "string",
  22071. "description": "Very short label (max 30 chars)"
  22072. },
  22073. "options": {
  22074. "type": "array",
  22075. "items": {
  22076. "$ref": "#/components/schemas/QuestionV2Option"
  22077. },
  22078. "description": "Available choices"
  22079. },
  22080. "multiple": {
  22081. "type": "boolean"
  22082. },
  22083. "custom": {
  22084. "type": "boolean"
  22085. }
  22086. },
  22087. "required": ["question", "header", "options"],
  22088. "additionalProperties": false
  22089. },
  22090. "QuestionV2Tool": {
  22091. "type": "object",
  22092. "properties": {
  22093. "messageID": {
  22094. "type": "string"
  22095. },
  22096. "callID": {
  22097. "type": "string"
  22098. }
  22099. },
  22100. "required": ["messageID", "callID"],
  22101. "additionalProperties": false
  22102. },
  22103. "QuestionV2Answer": {
  22104. "type": "array",
  22105. "items": {
  22106. "type": "string"
  22107. }
  22108. },
  22109. "EventServerInstanceDisposed": {
  22110. "type": "object",
  22111. "properties": {
  22112. "id": {
  22113. "type": "string"
  22114. },
  22115. "type": {
  22116. "type": "string",
  22117. "enum": ["server.instance.disposed"]
  22118. },
  22119. "properties": {
  22120. "type": "object",
  22121. "properties": {
  22122. "directory": {
  22123. "type": "string"
  22124. }
  22125. },
  22126. "required": ["directory"],
  22127. "additionalProperties": false
  22128. }
  22129. },
  22130. "required": ["id", "type", "properties"],
  22131. "additionalProperties": false
  22132. },
  22133. "SyncEventSessionCreated": {
  22134. "type": "object",
  22135. "properties": {
  22136. "type": {
  22137. "type": "string",
  22138. "enum": ["sync"]
  22139. },
  22140. "id": {
  22141. "type": "string",
  22142. "pattern": "^evt_"
  22143. },
  22144. "syncEvent": {
  22145. "type": "object",
  22146. "properties": {
  22147. "type": {
  22148. "type": "string",
  22149. "enum": ["session.created.1"]
  22150. },
  22151. "id": {
  22152. "type": "string",
  22153. "pattern": "^evt_"
  22154. },
  22155. "seq": {
  22156. "type": "number"
  22157. },
  22158. "aggregateID": {
  22159. "type": "string"
  22160. },
  22161. "data": {
  22162. "type": "object",
  22163. "properties": {
  22164. "sessionID": {
  22165. "type": "string",
  22166. "pattern": "^ses"
  22167. },
  22168. "info": {
  22169. "$ref": "#/components/schemas/Session"
  22170. }
  22171. },
  22172. "required": ["sessionID", "info"],
  22173. "additionalProperties": false
  22174. }
  22175. },
  22176. "required": ["type", "id", "seq", "aggregateID", "data"],
  22177. "additionalProperties": false
  22178. }
  22179. },
  22180. "required": ["type", "id", "syncEvent"],
  22181. "additionalProperties": false
  22182. },
  22183. "SyncEventSessionUpdated": {
  22184. "type": "object",
  22185. "properties": {
  22186. "type": {
  22187. "type": "string",
  22188. "enum": ["sync"]
  22189. },
  22190. "id": {
  22191. "type": "string",
  22192. "pattern": "^evt_"
  22193. },
  22194. "syncEvent": {
  22195. "type": "object",
  22196. "properties": {
  22197. "type": {
  22198. "type": "string",
  22199. "enum": ["session.updated.1"]
  22200. },
  22201. "id": {
  22202. "type": "string",
  22203. "pattern": "^evt_"
  22204. },
  22205. "seq": {
  22206. "type": "number"
  22207. },
  22208. "aggregateID": {
  22209. "type": "string"
  22210. },
  22211. "data": {
  22212. "type": "object",
  22213. "properties": {
  22214. "sessionID": {
  22215. "type": "string",
  22216. "pattern": "^ses"
  22217. },
  22218. "info": {
  22219. "$ref": "#/components/schemas/Session"
  22220. }
  22221. },
  22222. "required": ["sessionID", "info"],
  22223. "additionalProperties": false
  22224. }
  22225. },
  22226. "required": ["type", "id", "seq", "aggregateID", "data"],
  22227. "additionalProperties": false
  22228. }
  22229. },
  22230. "required": ["type", "id", "syncEvent"],
  22231. "additionalProperties": false
  22232. },
  22233. "SyncEventSessionDeleted": {
  22234. "type": "object",
  22235. "properties": {
  22236. "type": {
  22237. "type": "string",
  22238. "enum": ["sync"]
  22239. },
  22240. "id": {
  22241. "type": "string",
  22242. "pattern": "^evt_"
  22243. },
  22244. "syncEvent": {
  22245. "type": "object",
  22246. "properties": {
  22247. "type": {
  22248. "type": "string",
  22249. "enum": ["session.deleted.1"]
  22250. },
  22251. "id": {
  22252. "type": "string",
  22253. "pattern": "^evt_"
  22254. },
  22255. "seq": {
  22256. "type": "number"
  22257. },
  22258. "aggregateID": {
  22259. "type": "string"
  22260. },
  22261. "data": {
  22262. "type": "object",
  22263. "properties": {
  22264. "sessionID": {
  22265. "type": "string",
  22266. "pattern": "^ses"
  22267. },
  22268. "info": {
  22269. "$ref": "#/components/schemas/Session"
  22270. }
  22271. },
  22272. "required": ["sessionID", "info"],
  22273. "additionalProperties": false
  22274. }
  22275. },
  22276. "required": ["type", "id", "seq", "aggregateID", "data"],
  22277. "additionalProperties": false
  22278. }
  22279. },
  22280. "required": ["type", "id", "syncEvent"],
  22281. "additionalProperties": false
  22282. },
  22283. "SyncEventMessageUpdated": {
  22284. "type": "object",
  22285. "properties": {
  22286. "type": {
  22287. "type": "string",
  22288. "enum": ["sync"]
  22289. },
  22290. "id": {
  22291. "type": "string",
  22292. "pattern": "^evt_"
  22293. },
  22294. "syncEvent": {
  22295. "type": "object",
  22296. "properties": {
  22297. "type": {
  22298. "type": "string",
  22299. "enum": ["message.updated.1"]
  22300. },
  22301. "id": {
  22302. "type": "string",
  22303. "pattern": "^evt_"
  22304. },
  22305. "seq": {
  22306. "type": "number"
  22307. },
  22308. "aggregateID": {
  22309. "type": "string"
  22310. },
  22311. "data": {
  22312. "type": "object",
  22313. "properties": {
  22314. "sessionID": {
  22315. "type": "string",
  22316. "pattern": "^ses"
  22317. },
  22318. "info": {
  22319. "$ref": "#/components/schemas/Message"
  22320. }
  22321. },
  22322. "required": ["sessionID", "info"],
  22323. "additionalProperties": false
  22324. }
  22325. },
  22326. "required": ["type", "id", "seq", "aggregateID", "data"],
  22327. "additionalProperties": false
  22328. }
  22329. },
  22330. "required": ["type", "id", "syncEvent"],
  22331. "additionalProperties": false
  22332. },
  22333. "SyncEventMessageRemoved": {
  22334. "type": "object",
  22335. "properties": {
  22336. "type": {
  22337. "type": "string",
  22338. "enum": ["sync"]
  22339. },
  22340. "id": {
  22341. "type": "string",
  22342. "pattern": "^evt_"
  22343. },
  22344. "syncEvent": {
  22345. "type": "object",
  22346. "properties": {
  22347. "type": {
  22348. "type": "string",
  22349. "enum": ["message.removed.1"]
  22350. },
  22351. "id": {
  22352. "type": "string",
  22353. "pattern": "^evt_"
  22354. },
  22355. "seq": {
  22356. "type": "number"
  22357. },
  22358. "aggregateID": {
  22359. "type": "string"
  22360. },
  22361. "data": {
  22362. "type": "object",
  22363. "properties": {
  22364. "sessionID": {
  22365. "type": "string",
  22366. "pattern": "^ses"
  22367. },
  22368. "messageID": {
  22369. "type": "string",
  22370. "pattern": "^msg"
  22371. }
  22372. },
  22373. "required": ["sessionID", "messageID"],
  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. "SyncEventMessagePartUpdated": {
  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": ["message.part.updated.1"]
  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. "sessionID": {
  22416. "type": "string",
  22417. "pattern": "^ses"
  22418. },
  22419. "part": {
  22420. "$ref": "#/components/schemas/Part"
  22421. },
  22422. "time": {
  22423. "type": "number"
  22424. }
  22425. },
  22426. "required": ["sessionID", "part", "time"],
  22427. "additionalProperties": false
  22428. }
  22429. },
  22430. "required": ["type", "id", "seq", "aggregateID", "data"],
  22431. "additionalProperties": false
  22432. }
  22433. },
  22434. "required": ["type", "id", "syncEvent"],
  22435. "additionalProperties": false
  22436. },
  22437. "SyncEventMessagePartRemoved": {
  22438. "type": "object",
  22439. "properties": {
  22440. "type": {
  22441. "type": "string",
  22442. "enum": ["sync"]
  22443. },
  22444. "id": {
  22445. "type": "string",
  22446. "pattern": "^evt_"
  22447. },
  22448. "syncEvent": {
  22449. "type": "object",
  22450. "properties": {
  22451. "type": {
  22452. "type": "string",
  22453. "enum": ["message.part.removed.1"]
  22454. },
  22455. "id": {
  22456. "type": "string",
  22457. "pattern": "^evt_"
  22458. },
  22459. "seq": {
  22460. "type": "number"
  22461. },
  22462. "aggregateID": {
  22463. "type": "string"
  22464. },
  22465. "data": {
  22466. "type": "object",
  22467. "properties": {
  22468. "sessionID": {
  22469. "type": "string",
  22470. "pattern": "^ses"
  22471. },
  22472. "messageID": {
  22473. "type": "string",
  22474. "pattern": "^msg"
  22475. },
  22476. "partID": {
  22477. "type": "string",
  22478. "pattern": "^prt"
  22479. }
  22480. },
  22481. "required": ["sessionID", "messageID", "partID"],
  22482. "additionalProperties": false
  22483. }
  22484. },
  22485. "required": ["type", "id", "seq", "aggregateID", "data"],
  22486. "additionalProperties": false
  22487. }
  22488. },
  22489. "required": ["type", "id", "syncEvent"],
  22490. "additionalProperties": false
  22491. },
  22492. "SyncEventSessionNextAgentSwitched": {
  22493. "type": "object",
  22494. "properties": {
  22495. "type": {
  22496. "type": "string",
  22497. "enum": ["sync"]
  22498. },
  22499. "id": {
  22500. "type": "string",
  22501. "pattern": "^evt_"
  22502. },
  22503. "syncEvent": {
  22504. "type": "object",
  22505. "properties": {
  22506. "type": {
  22507. "type": "string",
  22508. "enum": ["session.next.agent.switched.1"]
  22509. },
  22510. "id": {
  22511. "type": "string",
  22512. "pattern": "^evt_"
  22513. },
  22514. "seq": {
  22515. "type": "number"
  22516. },
  22517. "aggregateID": {
  22518. "type": "string"
  22519. },
  22520. "data": {
  22521. "type": "object",
  22522. "properties": {
  22523. "timestamp": {
  22524. "type": "number"
  22525. },
  22526. "sessionID": {
  22527. "type": "string",
  22528. "pattern": "^ses"
  22529. },
  22530. "messageID": {
  22531. "type": "string",
  22532. "pattern": "^msg_"
  22533. },
  22534. "agent": {
  22535. "type": "string"
  22536. }
  22537. },
  22538. "required": ["timestamp", "sessionID", "messageID", "agent"],
  22539. "additionalProperties": false
  22540. }
  22541. },
  22542. "required": ["type", "id", "seq", "aggregateID", "data"],
  22543. "additionalProperties": false
  22544. }
  22545. },
  22546. "required": ["type", "id", "syncEvent"],
  22547. "additionalProperties": false
  22548. },
  22549. "SyncEventSessionNextModelSwitched": {
  22550. "type": "object",
  22551. "properties": {
  22552. "type": {
  22553. "type": "string",
  22554. "enum": ["sync"]
  22555. },
  22556. "id": {
  22557. "type": "string",
  22558. "pattern": "^evt_"
  22559. },
  22560. "syncEvent": {
  22561. "type": "object",
  22562. "properties": {
  22563. "type": {
  22564. "type": "string",
  22565. "enum": ["session.next.model.switched.1"]
  22566. },
  22567. "id": {
  22568. "type": "string",
  22569. "pattern": "^evt_"
  22570. },
  22571. "seq": {
  22572. "type": "number"
  22573. },
  22574. "aggregateID": {
  22575. "type": "string"
  22576. },
  22577. "data": {
  22578. "type": "object",
  22579. "properties": {
  22580. "timestamp": {
  22581. "type": "number"
  22582. },
  22583. "sessionID": {
  22584. "type": "string",
  22585. "pattern": "^ses"
  22586. },
  22587. "messageID": {
  22588. "type": "string",
  22589. "pattern": "^msg_"
  22590. },
  22591. "model": {
  22592. "type": "object",
  22593. "properties": {
  22594. "id": {
  22595. "type": "string"
  22596. },
  22597. "providerID": {
  22598. "type": "string"
  22599. },
  22600. "variant": {
  22601. "type": "string"
  22602. }
  22603. },
  22604. "required": ["id", "providerID"],
  22605. "additionalProperties": false
  22606. }
  22607. },
  22608. "required": ["timestamp", "sessionID", "messageID", "model"],
  22609. "additionalProperties": false
  22610. }
  22611. },
  22612. "required": ["type", "id", "seq", "aggregateID", "data"],
  22613. "additionalProperties": false
  22614. }
  22615. },
  22616. "required": ["type", "id", "syncEvent"],
  22617. "additionalProperties": false
  22618. },
  22619. "SyncEventSessionNextMoved": {
  22620. "type": "object",
  22621. "properties": {
  22622. "type": {
  22623. "type": "string",
  22624. "enum": ["sync"]
  22625. },
  22626. "id": {
  22627. "type": "string",
  22628. "pattern": "^evt_"
  22629. },
  22630. "syncEvent": {
  22631. "type": "object",
  22632. "properties": {
  22633. "type": {
  22634. "type": "string",
  22635. "enum": ["session.next.moved.1"]
  22636. },
  22637. "id": {
  22638. "type": "string",
  22639. "pattern": "^evt_"
  22640. },
  22641. "seq": {
  22642. "type": "number"
  22643. },
  22644. "aggregateID": {
  22645. "type": "string"
  22646. },
  22647. "data": {
  22648. "type": "object",
  22649. "properties": {
  22650. "timestamp": {
  22651. "type": "number"
  22652. },
  22653. "sessionID": {
  22654. "type": "string",
  22655. "pattern": "^ses"
  22656. },
  22657. "location": {
  22658. "$ref": "#/components/schemas/LocationRef"
  22659. },
  22660. "subdirectory": {
  22661. "type": "string"
  22662. }
  22663. },
  22664. "required": ["timestamp", "sessionID", "location"],
  22665. "additionalProperties": false
  22666. }
  22667. },
  22668. "required": ["type", "id", "seq", "aggregateID", "data"],
  22669. "additionalProperties": false
  22670. }
  22671. },
  22672. "required": ["type", "id", "syncEvent"],
  22673. "additionalProperties": false
  22674. },
  22675. "SyncEventSessionNextPrompted": {
  22676. "type": "object",
  22677. "properties": {
  22678. "type": {
  22679. "type": "string",
  22680. "enum": ["sync"]
  22681. },
  22682. "id": {
  22683. "type": "string",
  22684. "pattern": "^evt_"
  22685. },
  22686. "syncEvent": {
  22687. "type": "object",
  22688. "properties": {
  22689. "type": {
  22690. "type": "string",
  22691. "enum": ["session.next.prompted.1"]
  22692. },
  22693. "id": {
  22694. "type": "string",
  22695. "pattern": "^evt_"
  22696. },
  22697. "seq": {
  22698. "type": "number"
  22699. },
  22700. "aggregateID": {
  22701. "type": "string"
  22702. },
  22703. "data": {
  22704. "type": "object",
  22705. "properties": {
  22706. "timestamp": {
  22707. "type": "number"
  22708. },
  22709. "sessionID": {
  22710. "type": "string",
  22711. "pattern": "^ses"
  22712. },
  22713. "messageID": {
  22714. "type": "string",
  22715. "pattern": "^msg_"
  22716. },
  22717. "prompt": {
  22718. "$ref": "#/components/schemas/Prompt"
  22719. },
  22720. "delivery": {
  22721. "type": "string",
  22722. "enum": ["steer", "queue"]
  22723. }
  22724. },
  22725. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22726. "additionalProperties": false
  22727. }
  22728. },
  22729. "required": ["type", "id", "seq", "aggregateID", "data"],
  22730. "additionalProperties": false
  22731. }
  22732. },
  22733. "required": ["type", "id", "syncEvent"],
  22734. "additionalProperties": false
  22735. },
  22736. "SyncEventSessionNextPromptAdmitted": {
  22737. "type": "object",
  22738. "properties": {
  22739. "type": {
  22740. "type": "string",
  22741. "enum": ["sync"]
  22742. },
  22743. "id": {
  22744. "type": "string",
  22745. "pattern": "^evt_"
  22746. },
  22747. "syncEvent": {
  22748. "type": "object",
  22749. "properties": {
  22750. "type": {
  22751. "type": "string",
  22752. "enum": ["session.next.prompt.admitted.1"]
  22753. },
  22754. "id": {
  22755. "type": "string",
  22756. "pattern": "^evt_"
  22757. },
  22758. "seq": {
  22759. "type": "number"
  22760. },
  22761. "aggregateID": {
  22762. "type": "string"
  22763. },
  22764. "data": {
  22765. "type": "object",
  22766. "properties": {
  22767. "timestamp": {
  22768. "type": "number"
  22769. },
  22770. "sessionID": {
  22771. "type": "string",
  22772. "pattern": "^ses"
  22773. },
  22774. "messageID": {
  22775. "type": "string",
  22776. "pattern": "^msg_"
  22777. },
  22778. "prompt": {
  22779. "$ref": "#/components/schemas/Prompt"
  22780. },
  22781. "delivery": {
  22782. "type": "string",
  22783. "enum": ["steer", "queue"]
  22784. }
  22785. },
  22786. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22787. "additionalProperties": false
  22788. }
  22789. },
  22790. "required": ["type", "id", "seq", "aggregateID", "data"],
  22791. "additionalProperties": false
  22792. }
  22793. },
  22794. "required": ["type", "id", "syncEvent"],
  22795. "additionalProperties": false
  22796. },
  22797. "SyncEventSessionNextPromptPromoted": {
  22798. "type": "object",
  22799. "properties": {
  22800. "type": {
  22801. "type": "string",
  22802. "enum": ["sync"]
  22803. },
  22804. "id": {
  22805. "type": "string",
  22806. "pattern": "^evt_"
  22807. },
  22808. "syncEvent": {
  22809. "type": "object",
  22810. "properties": {
  22811. "type": {
  22812. "type": "string",
  22813. "enum": ["session.next.prompt.promoted.1"]
  22814. },
  22815. "id": {
  22816. "type": "string",
  22817. "pattern": "^evt_"
  22818. },
  22819. "seq": {
  22820. "type": "number"
  22821. },
  22822. "aggregateID": {
  22823. "type": "string"
  22824. },
  22825. "data": {
  22826. "type": "object",
  22827. "properties": {
  22828. "timestamp": {
  22829. "type": "number"
  22830. },
  22831. "sessionID": {
  22832. "type": "string",
  22833. "pattern": "^ses"
  22834. },
  22835. "messageID": {
  22836. "type": "string",
  22837. "pattern": "^msg_"
  22838. },
  22839. "prompt": {
  22840. "$ref": "#/components/schemas/Prompt"
  22841. },
  22842. "timeCreated": {
  22843. "type": "number"
  22844. }
  22845. },
  22846. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  22847. "additionalProperties": false
  22848. }
  22849. },
  22850. "required": ["type", "id", "seq", "aggregateID", "data"],
  22851. "additionalProperties": false
  22852. }
  22853. },
  22854. "required": ["type", "id", "syncEvent"],
  22855. "additionalProperties": false
  22856. },
  22857. "SyncEventSessionNextInterruptRequested": {
  22858. "type": "object",
  22859. "properties": {
  22860. "type": {
  22861. "type": "string",
  22862. "enum": ["sync"]
  22863. },
  22864. "id": {
  22865. "type": "string",
  22866. "pattern": "^evt_"
  22867. },
  22868. "syncEvent": {
  22869. "type": "object",
  22870. "properties": {
  22871. "type": {
  22872. "type": "string",
  22873. "enum": ["session.next.interrupt.requested.1"]
  22874. },
  22875. "id": {
  22876. "type": "string",
  22877. "pattern": "^evt_"
  22878. },
  22879. "seq": {
  22880. "type": "number"
  22881. },
  22882. "aggregateID": {
  22883. "type": "string"
  22884. },
  22885. "data": {
  22886. "type": "object",
  22887. "properties": {
  22888. "timestamp": {
  22889. "type": "number"
  22890. },
  22891. "sessionID": {
  22892. "type": "string",
  22893. "pattern": "^ses"
  22894. }
  22895. },
  22896. "required": ["timestamp", "sessionID"],
  22897. "additionalProperties": false
  22898. }
  22899. },
  22900. "required": ["type", "id", "seq", "aggregateID", "data"],
  22901. "additionalProperties": false
  22902. }
  22903. },
  22904. "required": ["type", "id", "syncEvent"],
  22905. "additionalProperties": false
  22906. },
  22907. "SyncEventSessionNextContextUpdated": {
  22908. "type": "object",
  22909. "properties": {
  22910. "type": {
  22911. "type": "string",
  22912. "enum": ["sync"]
  22913. },
  22914. "id": {
  22915. "type": "string",
  22916. "pattern": "^evt_"
  22917. },
  22918. "syncEvent": {
  22919. "type": "object",
  22920. "properties": {
  22921. "type": {
  22922. "type": "string",
  22923. "enum": ["session.next.context.updated.1"]
  22924. },
  22925. "id": {
  22926. "type": "string",
  22927. "pattern": "^evt_"
  22928. },
  22929. "seq": {
  22930. "type": "number"
  22931. },
  22932. "aggregateID": {
  22933. "type": "string"
  22934. },
  22935. "data": {
  22936. "type": "object",
  22937. "properties": {
  22938. "timestamp": {
  22939. "type": "number"
  22940. },
  22941. "sessionID": {
  22942. "type": "string",
  22943. "pattern": "^ses"
  22944. },
  22945. "messageID": {
  22946. "type": "string",
  22947. "pattern": "^msg_"
  22948. },
  22949. "text": {
  22950. "type": "string"
  22951. }
  22952. },
  22953. "required": ["timestamp", "sessionID", "messageID", "text"],
  22954. "additionalProperties": false
  22955. }
  22956. },
  22957. "required": ["type", "id", "seq", "aggregateID", "data"],
  22958. "additionalProperties": false
  22959. }
  22960. },
  22961. "required": ["type", "id", "syncEvent"],
  22962. "additionalProperties": false
  22963. },
  22964. "SyncEventSessionNextSynthetic": {
  22965. "type": "object",
  22966. "properties": {
  22967. "type": {
  22968. "type": "string",
  22969. "enum": ["sync"]
  22970. },
  22971. "id": {
  22972. "type": "string",
  22973. "pattern": "^evt_"
  22974. },
  22975. "syncEvent": {
  22976. "type": "object",
  22977. "properties": {
  22978. "type": {
  22979. "type": "string",
  22980. "enum": ["session.next.synthetic.1"]
  22981. },
  22982. "id": {
  22983. "type": "string",
  22984. "pattern": "^evt_"
  22985. },
  22986. "seq": {
  22987. "type": "number"
  22988. },
  22989. "aggregateID": {
  22990. "type": "string"
  22991. },
  22992. "data": {
  22993. "type": "object",
  22994. "properties": {
  22995. "timestamp": {
  22996. "type": "number"
  22997. },
  22998. "sessionID": {
  22999. "type": "string",
  23000. "pattern": "^ses"
  23001. },
  23002. "messageID": {
  23003. "type": "string",
  23004. "pattern": "^msg_"
  23005. },
  23006. "text": {
  23007. "type": "string"
  23008. }
  23009. },
  23010. "required": ["timestamp", "sessionID", "messageID", "text"],
  23011. "additionalProperties": false
  23012. }
  23013. },
  23014. "required": ["type", "id", "seq", "aggregateID", "data"],
  23015. "additionalProperties": false
  23016. }
  23017. },
  23018. "required": ["type", "id", "syncEvent"],
  23019. "additionalProperties": false
  23020. },
  23021. "SyncEventSessionNextShellStarted": {
  23022. "type": "object",
  23023. "properties": {
  23024. "type": {
  23025. "type": "string",
  23026. "enum": ["sync"]
  23027. },
  23028. "id": {
  23029. "type": "string",
  23030. "pattern": "^evt_"
  23031. },
  23032. "syncEvent": {
  23033. "type": "object",
  23034. "properties": {
  23035. "type": {
  23036. "type": "string",
  23037. "enum": ["session.next.shell.started.1"]
  23038. },
  23039. "id": {
  23040. "type": "string",
  23041. "pattern": "^evt_"
  23042. },
  23043. "seq": {
  23044. "type": "number"
  23045. },
  23046. "aggregateID": {
  23047. "type": "string"
  23048. },
  23049. "data": {
  23050. "type": "object",
  23051. "properties": {
  23052. "timestamp": {
  23053. "type": "number"
  23054. },
  23055. "sessionID": {
  23056. "type": "string",
  23057. "pattern": "^ses"
  23058. },
  23059. "messageID": {
  23060. "type": "string",
  23061. "pattern": "^msg_"
  23062. },
  23063. "callID": {
  23064. "type": "string"
  23065. },
  23066. "command": {
  23067. "type": "string"
  23068. }
  23069. },
  23070. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  23071. "additionalProperties": false
  23072. }
  23073. },
  23074. "required": ["type", "id", "seq", "aggregateID", "data"],
  23075. "additionalProperties": false
  23076. }
  23077. },
  23078. "required": ["type", "id", "syncEvent"],
  23079. "additionalProperties": false
  23080. },
  23081. "SyncEventSessionNextShellEnded": {
  23082. "type": "object",
  23083. "properties": {
  23084. "type": {
  23085. "type": "string",
  23086. "enum": ["sync"]
  23087. },
  23088. "id": {
  23089. "type": "string",
  23090. "pattern": "^evt_"
  23091. },
  23092. "syncEvent": {
  23093. "type": "object",
  23094. "properties": {
  23095. "type": {
  23096. "type": "string",
  23097. "enum": ["session.next.shell.ended.1"]
  23098. },
  23099. "id": {
  23100. "type": "string",
  23101. "pattern": "^evt_"
  23102. },
  23103. "seq": {
  23104. "type": "number"
  23105. },
  23106. "aggregateID": {
  23107. "type": "string"
  23108. },
  23109. "data": {
  23110. "type": "object",
  23111. "properties": {
  23112. "timestamp": {
  23113. "type": "number"
  23114. },
  23115. "sessionID": {
  23116. "type": "string",
  23117. "pattern": "^ses"
  23118. },
  23119. "callID": {
  23120. "type": "string"
  23121. },
  23122. "output": {
  23123. "type": "string"
  23124. }
  23125. },
  23126. "required": ["timestamp", "sessionID", "callID", "output"],
  23127. "additionalProperties": false
  23128. }
  23129. },
  23130. "required": ["type", "id", "seq", "aggregateID", "data"],
  23131. "additionalProperties": false
  23132. }
  23133. },
  23134. "required": ["type", "id", "syncEvent"],
  23135. "additionalProperties": false
  23136. },
  23137. "SyncEventSessionNextStepStarted": {
  23138. "type": "object",
  23139. "properties": {
  23140. "type": {
  23141. "type": "string",
  23142. "enum": ["sync"]
  23143. },
  23144. "id": {
  23145. "type": "string",
  23146. "pattern": "^evt_"
  23147. },
  23148. "syncEvent": {
  23149. "type": "object",
  23150. "properties": {
  23151. "type": {
  23152. "type": "string",
  23153. "enum": ["session.next.step.started.1"]
  23154. },
  23155. "id": {
  23156. "type": "string",
  23157. "pattern": "^evt_"
  23158. },
  23159. "seq": {
  23160. "type": "number"
  23161. },
  23162. "aggregateID": {
  23163. "type": "string"
  23164. },
  23165. "data": {
  23166. "type": "object",
  23167. "properties": {
  23168. "timestamp": {
  23169. "type": "number"
  23170. },
  23171. "sessionID": {
  23172. "type": "string",
  23173. "pattern": "^ses"
  23174. },
  23175. "assistantMessageID": {
  23176. "type": "string",
  23177. "pattern": "^msg_"
  23178. },
  23179. "agent": {
  23180. "type": "string"
  23181. },
  23182. "model": {
  23183. "type": "object",
  23184. "properties": {
  23185. "id": {
  23186. "type": "string"
  23187. },
  23188. "providerID": {
  23189. "type": "string"
  23190. },
  23191. "variant": {
  23192. "type": "string"
  23193. }
  23194. },
  23195. "required": ["id", "providerID"],
  23196. "additionalProperties": false
  23197. },
  23198. "snapshot": {
  23199. "type": "string"
  23200. }
  23201. },
  23202. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  23203. "additionalProperties": false
  23204. }
  23205. },
  23206. "required": ["type", "id", "seq", "aggregateID", "data"],
  23207. "additionalProperties": false
  23208. }
  23209. },
  23210. "required": ["type", "id", "syncEvent"],
  23211. "additionalProperties": false
  23212. },
  23213. "SyncEventSessionNextStepEnded": {
  23214. "type": "object",
  23215. "properties": {
  23216. "type": {
  23217. "type": "string",
  23218. "enum": ["sync"]
  23219. },
  23220. "id": {
  23221. "type": "string",
  23222. "pattern": "^evt_"
  23223. },
  23224. "syncEvent": {
  23225. "type": "object",
  23226. "properties": {
  23227. "type": {
  23228. "type": "string",
  23229. "enum": ["session.next.step.ended.2"]
  23230. },
  23231. "id": {
  23232. "type": "string",
  23233. "pattern": "^evt_"
  23234. },
  23235. "seq": {
  23236. "type": "number"
  23237. },
  23238. "aggregateID": {
  23239. "type": "string"
  23240. },
  23241. "data": {
  23242. "type": "object",
  23243. "properties": {
  23244. "timestamp": {
  23245. "type": "number"
  23246. },
  23247. "sessionID": {
  23248. "type": "string",
  23249. "pattern": "^ses"
  23250. },
  23251. "assistantMessageID": {
  23252. "type": "string",
  23253. "pattern": "^msg_"
  23254. },
  23255. "finish": {
  23256. "type": "string"
  23257. },
  23258. "cost": {
  23259. "type": "number"
  23260. },
  23261. "tokens": {
  23262. "type": "object",
  23263. "properties": {
  23264. "input": {
  23265. "type": "number"
  23266. },
  23267. "output": {
  23268. "type": "number"
  23269. },
  23270. "reasoning": {
  23271. "type": "number"
  23272. },
  23273. "cache": {
  23274. "type": "object",
  23275. "properties": {
  23276. "read": {
  23277. "type": "number"
  23278. },
  23279. "write": {
  23280. "type": "number"
  23281. }
  23282. },
  23283. "required": ["read", "write"],
  23284. "additionalProperties": false
  23285. }
  23286. },
  23287. "required": ["input", "output", "reasoning", "cache"],
  23288. "additionalProperties": false
  23289. },
  23290. "snapshot": {
  23291. "type": "string"
  23292. }
  23293. },
  23294. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  23295. "additionalProperties": false
  23296. }
  23297. },
  23298. "required": ["type", "id", "seq", "aggregateID", "data"],
  23299. "additionalProperties": false
  23300. }
  23301. },
  23302. "required": ["type", "id", "syncEvent"],
  23303. "additionalProperties": false
  23304. },
  23305. "SyncEventSessionNextStepFailed": {
  23306. "type": "object",
  23307. "properties": {
  23308. "type": {
  23309. "type": "string",
  23310. "enum": ["sync"]
  23311. },
  23312. "id": {
  23313. "type": "string",
  23314. "pattern": "^evt_"
  23315. },
  23316. "syncEvent": {
  23317. "type": "object",
  23318. "properties": {
  23319. "type": {
  23320. "type": "string",
  23321. "enum": ["session.next.step.failed.2"]
  23322. },
  23323. "id": {
  23324. "type": "string",
  23325. "pattern": "^evt_"
  23326. },
  23327. "seq": {
  23328. "type": "number"
  23329. },
  23330. "aggregateID": {
  23331. "type": "string"
  23332. },
  23333. "data": {
  23334. "type": "object",
  23335. "properties": {
  23336. "timestamp": {
  23337. "type": "number"
  23338. },
  23339. "sessionID": {
  23340. "type": "string",
  23341. "pattern": "^ses"
  23342. },
  23343. "assistantMessageID": {
  23344. "type": "string",
  23345. "pattern": "^msg_"
  23346. },
  23347. "error": {
  23348. "$ref": "#/components/schemas/SessionErrorUnknown"
  23349. }
  23350. },
  23351. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  23352. "additionalProperties": false
  23353. }
  23354. },
  23355. "required": ["type", "id", "seq", "aggregateID", "data"],
  23356. "additionalProperties": false
  23357. }
  23358. },
  23359. "required": ["type", "id", "syncEvent"],
  23360. "additionalProperties": false
  23361. },
  23362. "SyncEventSessionNextTextStarted": {
  23363. "type": "object",
  23364. "properties": {
  23365. "type": {
  23366. "type": "string",
  23367. "enum": ["sync"]
  23368. },
  23369. "id": {
  23370. "type": "string",
  23371. "pattern": "^evt_"
  23372. },
  23373. "syncEvent": {
  23374. "type": "object",
  23375. "properties": {
  23376. "type": {
  23377. "type": "string",
  23378. "enum": ["session.next.text.started.1"]
  23379. },
  23380. "id": {
  23381. "type": "string",
  23382. "pattern": "^evt_"
  23383. },
  23384. "seq": {
  23385. "type": "number"
  23386. },
  23387. "aggregateID": {
  23388. "type": "string"
  23389. },
  23390. "data": {
  23391. "type": "object",
  23392. "properties": {
  23393. "timestamp": {
  23394. "type": "number"
  23395. },
  23396. "sessionID": {
  23397. "type": "string",
  23398. "pattern": "^ses"
  23399. },
  23400. "assistantMessageID": {
  23401. "type": "string",
  23402. "pattern": "^msg_"
  23403. },
  23404. "textID": {
  23405. "type": "string"
  23406. }
  23407. },
  23408. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  23409. "additionalProperties": false
  23410. }
  23411. },
  23412. "required": ["type", "id", "seq", "aggregateID", "data"],
  23413. "additionalProperties": false
  23414. }
  23415. },
  23416. "required": ["type", "id", "syncEvent"],
  23417. "additionalProperties": false
  23418. },
  23419. "SyncEventSessionNextTextEnded": {
  23420. "type": "object",
  23421. "properties": {
  23422. "type": {
  23423. "type": "string",
  23424. "enum": ["sync"]
  23425. },
  23426. "id": {
  23427. "type": "string",
  23428. "pattern": "^evt_"
  23429. },
  23430. "syncEvent": {
  23431. "type": "object",
  23432. "properties": {
  23433. "type": {
  23434. "type": "string",
  23435. "enum": ["session.next.text.ended.1"]
  23436. },
  23437. "id": {
  23438. "type": "string",
  23439. "pattern": "^evt_"
  23440. },
  23441. "seq": {
  23442. "type": "number"
  23443. },
  23444. "aggregateID": {
  23445. "type": "string"
  23446. },
  23447. "data": {
  23448. "type": "object",
  23449. "properties": {
  23450. "timestamp": {
  23451. "type": "number"
  23452. },
  23453. "sessionID": {
  23454. "type": "string",
  23455. "pattern": "^ses"
  23456. },
  23457. "assistantMessageID": {
  23458. "type": "string",
  23459. "pattern": "^msg_"
  23460. },
  23461. "textID": {
  23462. "type": "string"
  23463. },
  23464. "text": {
  23465. "type": "string"
  23466. }
  23467. },
  23468. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  23469. "additionalProperties": false
  23470. }
  23471. },
  23472. "required": ["type", "id", "seq", "aggregateID", "data"],
  23473. "additionalProperties": false
  23474. }
  23475. },
  23476. "required": ["type", "id", "syncEvent"],
  23477. "additionalProperties": false
  23478. },
  23479. "SyncEventSessionNextReasoningStarted": {
  23480. "type": "object",
  23481. "properties": {
  23482. "type": {
  23483. "type": "string",
  23484. "enum": ["sync"]
  23485. },
  23486. "id": {
  23487. "type": "string",
  23488. "pattern": "^evt_"
  23489. },
  23490. "syncEvent": {
  23491. "type": "object",
  23492. "properties": {
  23493. "type": {
  23494. "type": "string",
  23495. "enum": ["session.next.reasoning.started.1"]
  23496. },
  23497. "id": {
  23498. "type": "string",
  23499. "pattern": "^evt_"
  23500. },
  23501. "seq": {
  23502. "type": "number"
  23503. },
  23504. "aggregateID": {
  23505. "type": "string"
  23506. },
  23507. "data": {
  23508. "type": "object",
  23509. "properties": {
  23510. "timestamp": {
  23511. "type": "number"
  23512. },
  23513. "sessionID": {
  23514. "type": "string",
  23515. "pattern": "^ses"
  23516. },
  23517. "assistantMessageID": {
  23518. "type": "string",
  23519. "pattern": "^msg_"
  23520. },
  23521. "reasoningID": {
  23522. "type": "string"
  23523. },
  23524. "providerMetadata": {
  23525. "type": "object",
  23526. "additionalProperties": {
  23527. "type": "object"
  23528. }
  23529. }
  23530. },
  23531. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  23532. "additionalProperties": false
  23533. }
  23534. },
  23535. "required": ["type", "id", "seq", "aggregateID", "data"],
  23536. "additionalProperties": false
  23537. }
  23538. },
  23539. "required": ["type", "id", "syncEvent"],
  23540. "additionalProperties": false
  23541. },
  23542. "SyncEventSessionNextReasoningEnded": {
  23543. "type": "object",
  23544. "properties": {
  23545. "type": {
  23546. "type": "string",
  23547. "enum": ["sync"]
  23548. },
  23549. "id": {
  23550. "type": "string",
  23551. "pattern": "^evt_"
  23552. },
  23553. "syncEvent": {
  23554. "type": "object",
  23555. "properties": {
  23556. "type": {
  23557. "type": "string",
  23558. "enum": ["session.next.reasoning.ended.1"]
  23559. },
  23560. "id": {
  23561. "type": "string",
  23562. "pattern": "^evt_"
  23563. },
  23564. "seq": {
  23565. "type": "number"
  23566. },
  23567. "aggregateID": {
  23568. "type": "string"
  23569. },
  23570. "data": {
  23571. "type": "object",
  23572. "properties": {
  23573. "timestamp": {
  23574. "type": "number"
  23575. },
  23576. "sessionID": {
  23577. "type": "string",
  23578. "pattern": "^ses"
  23579. },
  23580. "assistantMessageID": {
  23581. "type": "string",
  23582. "pattern": "^msg_"
  23583. },
  23584. "reasoningID": {
  23585. "type": "string"
  23586. },
  23587. "text": {
  23588. "type": "string"
  23589. },
  23590. "providerMetadata": {
  23591. "type": "object",
  23592. "additionalProperties": {
  23593. "type": "object"
  23594. }
  23595. }
  23596. },
  23597. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  23598. "additionalProperties": false
  23599. }
  23600. },
  23601. "required": ["type", "id", "seq", "aggregateID", "data"],
  23602. "additionalProperties": false
  23603. }
  23604. },
  23605. "required": ["type", "id", "syncEvent"],
  23606. "additionalProperties": false
  23607. },
  23608. "SyncEventSessionNextToolInputStarted": {
  23609. "type": "object",
  23610. "properties": {
  23611. "type": {
  23612. "type": "string",
  23613. "enum": ["sync"]
  23614. },
  23615. "id": {
  23616. "type": "string",
  23617. "pattern": "^evt_"
  23618. },
  23619. "syncEvent": {
  23620. "type": "object",
  23621. "properties": {
  23622. "type": {
  23623. "type": "string",
  23624. "enum": ["session.next.tool.input.started.1"]
  23625. },
  23626. "id": {
  23627. "type": "string",
  23628. "pattern": "^evt_"
  23629. },
  23630. "seq": {
  23631. "type": "number"
  23632. },
  23633. "aggregateID": {
  23634. "type": "string"
  23635. },
  23636. "data": {
  23637. "type": "object",
  23638. "properties": {
  23639. "timestamp": {
  23640. "type": "number"
  23641. },
  23642. "sessionID": {
  23643. "type": "string",
  23644. "pattern": "^ses"
  23645. },
  23646. "assistantMessageID": {
  23647. "type": "string",
  23648. "pattern": "^msg_"
  23649. },
  23650. "callID": {
  23651. "type": "string"
  23652. },
  23653. "name": {
  23654. "type": "string"
  23655. }
  23656. },
  23657. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  23658. "additionalProperties": false
  23659. }
  23660. },
  23661. "required": ["type", "id", "seq", "aggregateID", "data"],
  23662. "additionalProperties": false
  23663. }
  23664. },
  23665. "required": ["type", "id", "syncEvent"],
  23666. "additionalProperties": false
  23667. },
  23668. "SyncEventSessionNextToolInputEnded": {
  23669. "type": "object",
  23670. "properties": {
  23671. "type": {
  23672. "type": "string",
  23673. "enum": ["sync"]
  23674. },
  23675. "id": {
  23676. "type": "string",
  23677. "pattern": "^evt_"
  23678. },
  23679. "syncEvent": {
  23680. "type": "object",
  23681. "properties": {
  23682. "type": {
  23683. "type": "string",
  23684. "enum": ["session.next.tool.input.ended.1"]
  23685. },
  23686. "id": {
  23687. "type": "string",
  23688. "pattern": "^evt_"
  23689. },
  23690. "seq": {
  23691. "type": "number"
  23692. },
  23693. "aggregateID": {
  23694. "type": "string"
  23695. },
  23696. "data": {
  23697. "type": "object",
  23698. "properties": {
  23699. "timestamp": {
  23700. "type": "number"
  23701. },
  23702. "sessionID": {
  23703. "type": "string",
  23704. "pattern": "^ses"
  23705. },
  23706. "assistantMessageID": {
  23707. "type": "string",
  23708. "pattern": "^msg_"
  23709. },
  23710. "callID": {
  23711. "type": "string"
  23712. },
  23713. "text": {
  23714. "type": "string"
  23715. }
  23716. },
  23717. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  23718. "additionalProperties": false
  23719. }
  23720. },
  23721. "required": ["type", "id", "seq", "aggregateID", "data"],
  23722. "additionalProperties": false
  23723. }
  23724. },
  23725. "required": ["type", "id", "syncEvent"],
  23726. "additionalProperties": false
  23727. },
  23728. "SyncEventSessionNextToolCalled": {
  23729. "type": "object",
  23730. "properties": {
  23731. "type": {
  23732. "type": "string",
  23733. "enum": ["sync"]
  23734. },
  23735. "id": {
  23736. "type": "string",
  23737. "pattern": "^evt_"
  23738. },
  23739. "syncEvent": {
  23740. "type": "object",
  23741. "properties": {
  23742. "type": {
  23743. "type": "string",
  23744. "enum": ["session.next.tool.called.1"]
  23745. },
  23746. "id": {
  23747. "type": "string",
  23748. "pattern": "^evt_"
  23749. },
  23750. "seq": {
  23751. "type": "number"
  23752. },
  23753. "aggregateID": {
  23754. "type": "string"
  23755. },
  23756. "data": {
  23757. "type": "object",
  23758. "properties": {
  23759. "timestamp": {
  23760. "type": "number"
  23761. },
  23762. "sessionID": {
  23763. "type": "string",
  23764. "pattern": "^ses"
  23765. },
  23766. "assistantMessageID": {
  23767. "type": "string",
  23768. "pattern": "^msg_"
  23769. },
  23770. "callID": {
  23771. "type": "string"
  23772. },
  23773. "tool": {
  23774. "type": "string"
  23775. },
  23776. "input": {
  23777. "type": "object"
  23778. },
  23779. "provider": {
  23780. "type": "object",
  23781. "properties": {
  23782. "executed": {
  23783. "type": "boolean"
  23784. },
  23785. "metadata": {
  23786. "type": "object",
  23787. "additionalProperties": {
  23788. "type": "object"
  23789. }
  23790. }
  23791. },
  23792. "required": ["executed"],
  23793. "additionalProperties": false
  23794. }
  23795. },
  23796. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  23797. "additionalProperties": false
  23798. }
  23799. },
  23800. "required": ["type", "id", "seq", "aggregateID", "data"],
  23801. "additionalProperties": false
  23802. }
  23803. },
  23804. "required": ["type", "id", "syncEvent"],
  23805. "additionalProperties": false
  23806. },
  23807. "SyncEventSessionNextToolProgress": {
  23808. "type": "object",
  23809. "properties": {
  23810. "type": {
  23811. "type": "string",
  23812. "enum": ["sync"]
  23813. },
  23814. "id": {
  23815. "type": "string",
  23816. "pattern": "^evt_"
  23817. },
  23818. "syncEvent": {
  23819. "type": "object",
  23820. "properties": {
  23821. "type": {
  23822. "type": "string",
  23823. "enum": ["session.next.tool.progress.1"]
  23824. },
  23825. "id": {
  23826. "type": "string",
  23827. "pattern": "^evt_"
  23828. },
  23829. "seq": {
  23830. "type": "number"
  23831. },
  23832. "aggregateID": {
  23833. "type": "string"
  23834. },
  23835. "data": {
  23836. "type": "object",
  23837. "properties": {
  23838. "timestamp": {
  23839. "type": "number"
  23840. },
  23841. "sessionID": {
  23842. "type": "string",
  23843. "pattern": "^ses"
  23844. },
  23845. "assistantMessageID": {
  23846. "type": "string",
  23847. "pattern": "^msg_"
  23848. },
  23849. "callID": {
  23850. "type": "string"
  23851. },
  23852. "structured": {
  23853. "type": "object"
  23854. },
  23855. "content": {
  23856. "type": "array",
  23857. "items": {
  23858. "anyOf": [
  23859. {
  23860. "$ref": "#/components/schemas/ToolTextContent"
  23861. },
  23862. {
  23863. "$ref": "#/components/schemas/ToolFileContent"
  23864. }
  23865. ]
  23866. }
  23867. }
  23868. },
  23869. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  23870. "additionalProperties": false
  23871. }
  23872. },
  23873. "required": ["type", "id", "seq", "aggregateID", "data"],
  23874. "additionalProperties": false
  23875. }
  23876. },
  23877. "required": ["type", "id", "syncEvent"],
  23878. "additionalProperties": false
  23879. },
  23880. "SyncEventSessionNextToolSuccess": {
  23881. "type": "object",
  23882. "properties": {
  23883. "type": {
  23884. "type": "string",
  23885. "enum": ["sync"]
  23886. },
  23887. "id": {
  23888. "type": "string",
  23889. "pattern": "^evt_"
  23890. },
  23891. "syncEvent": {
  23892. "type": "object",
  23893. "properties": {
  23894. "type": {
  23895. "type": "string",
  23896. "enum": ["session.next.tool.success.1"]
  23897. },
  23898. "id": {
  23899. "type": "string",
  23900. "pattern": "^evt_"
  23901. },
  23902. "seq": {
  23903. "type": "number"
  23904. },
  23905. "aggregateID": {
  23906. "type": "string"
  23907. },
  23908. "data": {
  23909. "type": "object",
  23910. "properties": {
  23911. "timestamp": {
  23912. "type": "number"
  23913. },
  23914. "sessionID": {
  23915. "type": "string",
  23916. "pattern": "^ses"
  23917. },
  23918. "assistantMessageID": {
  23919. "type": "string",
  23920. "pattern": "^msg_"
  23921. },
  23922. "callID": {
  23923. "type": "string"
  23924. },
  23925. "structured": {
  23926. "type": "object"
  23927. },
  23928. "content": {
  23929. "type": "array",
  23930. "items": {
  23931. "anyOf": [
  23932. {
  23933. "$ref": "#/components/schemas/ToolTextContent"
  23934. },
  23935. {
  23936. "$ref": "#/components/schemas/ToolFileContent"
  23937. }
  23938. ]
  23939. }
  23940. },
  23941. "outputPaths": {
  23942. "type": "array",
  23943. "items": {
  23944. "type": "string"
  23945. }
  23946. },
  23947. "result": {},
  23948. "provider": {
  23949. "type": "object",
  23950. "properties": {
  23951. "executed": {
  23952. "type": "boolean"
  23953. },
  23954. "metadata": {
  23955. "type": "object",
  23956. "additionalProperties": {
  23957. "type": "object"
  23958. }
  23959. }
  23960. },
  23961. "required": ["executed"],
  23962. "additionalProperties": false
  23963. }
  23964. },
  23965. "required": [
  23966. "timestamp",
  23967. "sessionID",
  23968. "assistantMessageID",
  23969. "callID",
  23970. "structured",
  23971. "content",
  23972. "provider"
  23973. ],
  23974. "additionalProperties": false
  23975. }
  23976. },
  23977. "required": ["type", "id", "seq", "aggregateID", "data"],
  23978. "additionalProperties": false
  23979. }
  23980. },
  23981. "required": ["type", "id", "syncEvent"],
  23982. "additionalProperties": false
  23983. },
  23984. "SyncEventSessionNextToolFailed": {
  23985. "type": "object",
  23986. "properties": {
  23987. "type": {
  23988. "type": "string",
  23989. "enum": ["sync"]
  23990. },
  23991. "id": {
  23992. "type": "string",
  23993. "pattern": "^evt_"
  23994. },
  23995. "syncEvent": {
  23996. "type": "object",
  23997. "properties": {
  23998. "type": {
  23999. "type": "string",
  24000. "enum": ["session.next.tool.failed.1"]
  24001. },
  24002. "id": {
  24003. "type": "string",
  24004. "pattern": "^evt_"
  24005. },
  24006. "seq": {
  24007. "type": "number"
  24008. },
  24009. "aggregateID": {
  24010. "type": "string"
  24011. },
  24012. "data": {
  24013. "type": "object",
  24014. "properties": {
  24015. "timestamp": {
  24016. "type": "number"
  24017. },
  24018. "sessionID": {
  24019. "type": "string",
  24020. "pattern": "^ses"
  24021. },
  24022. "assistantMessageID": {
  24023. "type": "string",
  24024. "pattern": "^msg_"
  24025. },
  24026. "callID": {
  24027. "type": "string"
  24028. },
  24029. "error": {
  24030. "$ref": "#/components/schemas/SessionErrorUnknown"
  24031. },
  24032. "result": {},
  24033. "provider": {
  24034. "type": "object",
  24035. "properties": {
  24036. "executed": {
  24037. "type": "boolean"
  24038. },
  24039. "metadata": {
  24040. "type": "object",
  24041. "additionalProperties": {
  24042. "type": "object"
  24043. }
  24044. }
  24045. },
  24046. "required": ["executed"],
  24047. "additionalProperties": false
  24048. }
  24049. },
  24050. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  24051. "additionalProperties": false
  24052. }
  24053. },
  24054. "required": ["type", "id", "seq", "aggregateID", "data"],
  24055. "additionalProperties": false
  24056. }
  24057. },
  24058. "required": ["type", "id", "syncEvent"],
  24059. "additionalProperties": false
  24060. },
  24061. "SyncEventSessionNextRetried": {
  24062. "type": "object",
  24063. "properties": {
  24064. "type": {
  24065. "type": "string",
  24066. "enum": ["sync"]
  24067. },
  24068. "id": {
  24069. "type": "string",
  24070. "pattern": "^evt_"
  24071. },
  24072. "syncEvent": {
  24073. "type": "object",
  24074. "properties": {
  24075. "type": {
  24076. "type": "string",
  24077. "enum": ["session.next.retried.1"]
  24078. },
  24079. "id": {
  24080. "type": "string",
  24081. "pattern": "^evt_"
  24082. },
  24083. "seq": {
  24084. "type": "number"
  24085. },
  24086. "aggregateID": {
  24087. "type": "string"
  24088. },
  24089. "data": {
  24090. "type": "object",
  24091. "properties": {
  24092. "timestamp": {
  24093. "type": "number"
  24094. },
  24095. "sessionID": {
  24096. "type": "string",
  24097. "pattern": "^ses"
  24098. },
  24099. "attempt": {
  24100. "type": "number"
  24101. },
  24102. "error": {
  24103. "$ref": "#/components/schemas/SessionNextRetry_error"
  24104. }
  24105. },
  24106. "required": ["timestamp", "sessionID", "attempt", "error"],
  24107. "additionalProperties": false
  24108. }
  24109. },
  24110. "required": ["type", "id", "seq", "aggregateID", "data"],
  24111. "additionalProperties": false
  24112. }
  24113. },
  24114. "required": ["type", "id", "syncEvent"],
  24115. "additionalProperties": false
  24116. },
  24117. "SyncEventSessionNextCompactionStarted": {
  24118. "type": "object",
  24119. "properties": {
  24120. "type": {
  24121. "type": "string",
  24122. "enum": ["sync"]
  24123. },
  24124. "id": {
  24125. "type": "string",
  24126. "pattern": "^evt_"
  24127. },
  24128. "syncEvent": {
  24129. "type": "object",
  24130. "properties": {
  24131. "type": {
  24132. "type": "string",
  24133. "enum": ["session.next.compaction.started.1"]
  24134. },
  24135. "id": {
  24136. "type": "string",
  24137. "pattern": "^evt_"
  24138. },
  24139. "seq": {
  24140. "type": "number"
  24141. },
  24142. "aggregateID": {
  24143. "type": "string"
  24144. },
  24145. "data": {
  24146. "type": "object",
  24147. "properties": {
  24148. "timestamp": {
  24149. "type": "number"
  24150. },
  24151. "sessionID": {
  24152. "type": "string",
  24153. "pattern": "^ses"
  24154. },
  24155. "messageID": {
  24156. "type": "string",
  24157. "pattern": "^msg_"
  24158. },
  24159. "reason": {
  24160. "type": "string",
  24161. "enum": ["auto", "manual"]
  24162. }
  24163. },
  24164. "required": ["timestamp", "sessionID", "messageID", "reason"],
  24165. "additionalProperties": false
  24166. }
  24167. },
  24168. "required": ["type", "id", "seq", "aggregateID", "data"],
  24169. "additionalProperties": false
  24170. }
  24171. },
  24172. "required": ["type", "id", "syncEvent"],
  24173. "additionalProperties": false
  24174. },
  24175. "SyncEventSessionNextCompactionEnded": {
  24176. "type": "object",
  24177. "properties": {
  24178. "type": {
  24179. "type": "string",
  24180. "enum": ["sync"]
  24181. },
  24182. "id": {
  24183. "type": "string",
  24184. "pattern": "^evt_"
  24185. },
  24186. "syncEvent": {
  24187. "type": "object",
  24188. "properties": {
  24189. "type": {
  24190. "type": "string",
  24191. "enum": ["session.next.compaction.ended.2"]
  24192. },
  24193. "id": {
  24194. "type": "string",
  24195. "pattern": "^evt_"
  24196. },
  24197. "seq": {
  24198. "type": "number"
  24199. },
  24200. "aggregateID": {
  24201. "type": "string"
  24202. },
  24203. "data": {
  24204. "type": "object",
  24205. "properties": {
  24206. "timestamp": {
  24207. "type": "number"
  24208. },
  24209. "sessionID": {
  24210. "type": "string",
  24211. "pattern": "^ses"
  24212. },
  24213. "messageID": {
  24214. "type": "string",
  24215. "pattern": "^msg_"
  24216. },
  24217. "reason": {
  24218. "type": "string",
  24219. "enum": ["auto", "manual"]
  24220. },
  24221. "text": {
  24222. "type": "string"
  24223. },
  24224. "recent": {
  24225. "type": "string"
  24226. }
  24227. },
  24228. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  24229. "additionalProperties": false
  24230. }
  24231. },
  24232. "required": ["type", "id", "seq", "aggregateID", "data"],
  24233. "additionalProperties": false
  24234. }
  24235. },
  24236. "required": ["type", "id", "syncEvent"],
  24237. "additionalProperties": false
  24238. },
  24239. "ConfigV2ReferenceGit": {
  24240. "type": "object",
  24241. "properties": {
  24242. "repository": {
  24243. "type": "string"
  24244. },
  24245. "branch": {
  24246. "type": "string"
  24247. },
  24248. "description": {
  24249. "type": "string"
  24250. },
  24251. "hidden": {
  24252. "type": "boolean"
  24253. }
  24254. },
  24255. "required": ["repository"],
  24256. "additionalProperties": false
  24257. },
  24258. "ConfigV2ReferenceLocal": {
  24259. "type": "object",
  24260. "properties": {
  24261. "path": {
  24262. "type": "string"
  24263. },
  24264. "description": {
  24265. "type": "string"
  24266. },
  24267. "hidden": {
  24268. "type": "boolean"
  24269. }
  24270. },
  24271. "required": ["path"],
  24272. "additionalProperties": false
  24273. },
  24274. "PolicyEffect": {
  24275. "type": "string",
  24276. "enum": ["allow", "deny"]
  24277. },
  24278. "ConfigV2ExperimentalPolicy": {
  24279. "type": "object",
  24280. "properties": {
  24281. "action": {
  24282. "type": "string",
  24283. "enum": ["provider.use"]
  24284. },
  24285. "effect": {
  24286. "$ref": "#/components/schemas/PolicyEffect"
  24287. },
  24288. "resource": {
  24289. "type": "string"
  24290. }
  24291. },
  24292. "required": ["action", "effect", "resource"],
  24293. "additionalProperties": false
  24294. },
  24295. "ProjectDirectories": {
  24296. "type": "array",
  24297. "items": {
  24298. "type": "object",
  24299. "properties": {
  24300. "directory": {
  24301. "type": "string"
  24302. },
  24303. "type": {
  24304. "type": "string",
  24305. "enum": ["main", "root", "git_worktree"]
  24306. }
  24307. },
  24308. "required": ["directory", "type"],
  24309. "additionalProperties": false
  24310. }
  24311. },
  24312. "ProjectCopyCopy": {
  24313. "type": "object",
  24314. "properties": {
  24315. "directory": {
  24316. "type": "string"
  24317. }
  24318. },
  24319. "required": ["directory"],
  24320. "additionalProperties": false
  24321. },
  24322. "LocationInfo": {
  24323. "type": "object",
  24324. "properties": {
  24325. "directory": {
  24326. "type": "string"
  24327. },
  24328. "workspaceID": {
  24329. "type": "string",
  24330. "pattern": "^wrk"
  24331. },
  24332. "project": {
  24333. "type": "object",
  24334. "properties": {
  24335. "id": {
  24336. "type": "string"
  24337. },
  24338. "directory": {
  24339. "type": "string"
  24340. }
  24341. },
  24342. "required": ["id", "directory"],
  24343. "additionalProperties": false
  24344. }
  24345. },
  24346. "required": ["directory", "project"],
  24347. "additionalProperties": false
  24348. },
  24349. "PermissionV2Effect": {
  24350. "type": "string",
  24351. "enum": ["allow", "deny", "ask"]
  24352. },
  24353. "PermissionV2Rule": {
  24354. "type": "object",
  24355. "properties": {
  24356. "action": {
  24357. "type": "string"
  24358. },
  24359. "resource": {
  24360. "type": "string"
  24361. },
  24362. "effect": {
  24363. "$ref": "#/components/schemas/PermissionV2Effect"
  24364. }
  24365. },
  24366. "required": ["action", "resource", "effect"],
  24367. "additionalProperties": false
  24368. },
  24369. "PermissionV2Ruleset": {
  24370. "type": "array",
  24371. "items": {
  24372. "$ref": "#/components/schemas/PermissionV2Rule"
  24373. }
  24374. },
  24375. "AgentV2Info": {
  24376. "type": "object",
  24377. "properties": {
  24378. "id": {
  24379. "type": "string"
  24380. },
  24381. "model": {
  24382. "type": "object",
  24383. "properties": {
  24384. "id": {
  24385. "type": "string"
  24386. },
  24387. "providerID": {
  24388. "type": "string"
  24389. },
  24390. "variant": {
  24391. "type": "string"
  24392. }
  24393. },
  24394. "required": ["id", "providerID"],
  24395. "additionalProperties": false
  24396. },
  24397. "request": {
  24398. "type": "object",
  24399. "properties": {
  24400. "headers": {
  24401. "type": "object",
  24402. "additionalProperties": {
  24403. "type": "string"
  24404. }
  24405. },
  24406. "body": {
  24407. "type": "object"
  24408. }
  24409. },
  24410. "required": ["headers", "body"],
  24411. "additionalProperties": false
  24412. },
  24413. "system": {
  24414. "type": "string"
  24415. },
  24416. "description": {
  24417. "type": "string"
  24418. },
  24419. "mode": {
  24420. "type": "string",
  24421. "enum": ["subagent", "primary", "all"]
  24422. },
  24423. "hidden": {
  24424. "type": "boolean"
  24425. },
  24426. "color": {
  24427. "anyOf": [
  24428. {
  24429. "type": "string",
  24430. "pattern": "^#[0-9a-fA-F]{6}$"
  24431. },
  24432. {
  24433. "type": "string",
  24434. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  24435. }
  24436. ]
  24437. },
  24438. "steps": {
  24439. "type": "integer",
  24440. "exclusiveMinimum": 0
  24441. },
  24442. "permissions": {
  24443. "$ref": "#/components/schemas/PermissionV2Ruleset"
  24444. }
  24445. },
  24446. "required": ["id", "request", "mode", "hidden", "permissions"],
  24447. "additionalProperties": false
  24448. },
  24449. "SessionV2Info": {
  24450. "type": "object",
  24451. "properties": {
  24452. "id": {
  24453. "type": "string",
  24454. "pattern": "^ses"
  24455. },
  24456. "parentID": {
  24457. "type": "string",
  24458. "pattern": "^ses"
  24459. },
  24460. "projectID": {
  24461. "type": "string"
  24462. },
  24463. "agent": {
  24464. "type": "string"
  24465. },
  24466. "model": {
  24467. "type": "object",
  24468. "properties": {
  24469. "id": {
  24470. "type": "string"
  24471. },
  24472. "providerID": {
  24473. "type": "string"
  24474. },
  24475. "variant": {
  24476. "type": "string"
  24477. }
  24478. },
  24479. "required": ["id", "providerID"],
  24480. "additionalProperties": false
  24481. },
  24482. "cost": {
  24483. "type": "number"
  24484. },
  24485. "tokens": {
  24486. "type": "object",
  24487. "properties": {
  24488. "input": {
  24489. "type": "number"
  24490. },
  24491. "output": {
  24492. "type": "number"
  24493. },
  24494. "reasoning": {
  24495. "type": "number"
  24496. },
  24497. "cache": {
  24498. "type": "object",
  24499. "properties": {
  24500. "read": {
  24501. "type": "number"
  24502. },
  24503. "write": {
  24504. "type": "number"
  24505. }
  24506. },
  24507. "required": ["read", "write"],
  24508. "additionalProperties": false
  24509. }
  24510. },
  24511. "required": ["input", "output", "reasoning", "cache"],
  24512. "additionalProperties": false
  24513. },
  24514. "time": {
  24515. "type": "object",
  24516. "properties": {
  24517. "created": {
  24518. "type": "number"
  24519. },
  24520. "updated": {
  24521. "type": "number"
  24522. },
  24523. "archived": {
  24524. "type": "number"
  24525. }
  24526. },
  24527. "required": ["created", "updated"],
  24528. "additionalProperties": false
  24529. },
  24530. "title": {
  24531. "type": "string"
  24532. },
  24533. "location": {
  24534. "$ref": "#/components/schemas/LocationRef"
  24535. },
  24536. "subpath": {
  24537. "type": "string"
  24538. }
  24539. },
  24540. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  24541. "additionalProperties": false
  24542. },
  24543. "SessionInputAdmitted": {
  24544. "type": "object",
  24545. "properties": {
  24546. "admittedSeq": {
  24547. "type": "integer",
  24548. "minimum": 0
  24549. },
  24550. "id": {
  24551. "type": "string",
  24552. "pattern": "^msg_"
  24553. },
  24554. "sessionID": {
  24555. "type": "string",
  24556. "pattern": "^ses"
  24557. },
  24558. "prompt": {
  24559. "$ref": "#/components/schemas/Prompt"
  24560. },
  24561. "delivery": {
  24562. "type": "string",
  24563. "enum": ["steer", "queue"]
  24564. },
  24565. "timeCreated": {
  24566. "type": "number"
  24567. },
  24568. "promotedSeq": {
  24569. "type": "integer",
  24570. "minimum": 0
  24571. }
  24572. },
  24573. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  24574. "additionalProperties": false
  24575. },
  24576. "SessionMessageAgentSwitched": {
  24577. "type": "object",
  24578. "properties": {
  24579. "id": {
  24580. "type": "string",
  24581. "pattern": "^msg_"
  24582. },
  24583. "metadata": {
  24584. "type": "object"
  24585. },
  24586. "time": {
  24587. "type": "object",
  24588. "properties": {
  24589. "created": {
  24590. "type": "number"
  24591. }
  24592. },
  24593. "required": ["created"],
  24594. "additionalProperties": false
  24595. },
  24596. "type": {
  24597. "type": "string",
  24598. "enum": ["agent-switched"]
  24599. },
  24600. "agent": {
  24601. "type": "string"
  24602. }
  24603. },
  24604. "required": ["id", "time", "type", "agent"],
  24605. "additionalProperties": false
  24606. },
  24607. "SessionMessageModelSwitched": {
  24608. "type": "object",
  24609. "properties": {
  24610. "id": {
  24611. "type": "string",
  24612. "pattern": "^msg_"
  24613. },
  24614. "metadata": {
  24615. "type": "object"
  24616. },
  24617. "time": {
  24618. "type": "object",
  24619. "properties": {
  24620. "created": {
  24621. "type": "number"
  24622. }
  24623. },
  24624. "required": ["created"],
  24625. "additionalProperties": false
  24626. },
  24627. "type": {
  24628. "type": "string",
  24629. "enum": ["model-switched"]
  24630. },
  24631. "model": {
  24632. "type": "object",
  24633. "properties": {
  24634. "id": {
  24635. "type": "string"
  24636. },
  24637. "providerID": {
  24638. "type": "string"
  24639. },
  24640. "variant": {
  24641. "type": "string"
  24642. }
  24643. },
  24644. "required": ["id", "providerID"],
  24645. "additionalProperties": false
  24646. }
  24647. },
  24648. "required": ["id", "time", "type", "model"],
  24649. "additionalProperties": false
  24650. },
  24651. "SessionMessageUser": {
  24652. "type": "object",
  24653. "properties": {
  24654. "id": {
  24655. "type": "string",
  24656. "pattern": "^msg_"
  24657. },
  24658. "metadata": {
  24659. "type": "object"
  24660. },
  24661. "time": {
  24662. "type": "object",
  24663. "properties": {
  24664. "created": {
  24665. "type": "number"
  24666. }
  24667. },
  24668. "required": ["created"],
  24669. "additionalProperties": false
  24670. },
  24671. "text": {
  24672. "type": "string"
  24673. },
  24674. "files": {
  24675. "type": "array",
  24676. "items": {
  24677. "$ref": "#/components/schemas/PromptFileAttachment"
  24678. }
  24679. },
  24680. "agents": {
  24681. "type": "array",
  24682. "items": {
  24683. "$ref": "#/components/schemas/PromptAgentAttachment"
  24684. }
  24685. },
  24686. "type": {
  24687. "type": "string",
  24688. "enum": ["user"]
  24689. }
  24690. },
  24691. "required": ["id", "time", "text", "type"],
  24692. "additionalProperties": false
  24693. },
  24694. "SessionMessageSynthetic": {
  24695. "type": "object",
  24696. "properties": {
  24697. "id": {
  24698. "type": "string",
  24699. "pattern": "^msg_"
  24700. },
  24701. "metadata": {
  24702. "type": "object"
  24703. },
  24704. "time": {
  24705. "type": "object",
  24706. "properties": {
  24707. "created": {
  24708. "type": "number"
  24709. }
  24710. },
  24711. "required": ["created"],
  24712. "additionalProperties": false
  24713. },
  24714. "sessionID": {
  24715. "type": "string",
  24716. "pattern": "^ses"
  24717. },
  24718. "text": {
  24719. "type": "string"
  24720. },
  24721. "type": {
  24722. "type": "string",
  24723. "enum": ["synthetic"]
  24724. }
  24725. },
  24726. "required": ["id", "time", "sessionID", "text", "type"],
  24727. "additionalProperties": false
  24728. },
  24729. "SessionMessageSystem": {
  24730. "type": "object",
  24731. "properties": {
  24732. "id": {
  24733. "type": "string",
  24734. "pattern": "^msg_"
  24735. },
  24736. "metadata": {
  24737. "type": "object"
  24738. },
  24739. "time": {
  24740. "type": "object",
  24741. "properties": {
  24742. "created": {
  24743. "type": "number"
  24744. }
  24745. },
  24746. "required": ["created"],
  24747. "additionalProperties": false
  24748. },
  24749. "type": {
  24750. "type": "string",
  24751. "enum": ["system"]
  24752. },
  24753. "text": {
  24754. "type": "string"
  24755. }
  24756. },
  24757. "required": ["id", "time", "type", "text"],
  24758. "additionalProperties": false
  24759. },
  24760. "SessionMessageShell": {
  24761. "type": "object",
  24762. "properties": {
  24763. "id": {
  24764. "type": "string",
  24765. "pattern": "^msg_"
  24766. },
  24767. "metadata": {
  24768. "type": "object"
  24769. },
  24770. "time": {
  24771. "type": "object",
  24772. "properties": {
  24773. "created": {
  24774. "type": "number"
  24775. },
  24776. "completed": {
  24777. "type": "number"
  24778. }
  24779. },
  24780. "required": ["created"],
  24781. "additionalProperties": false
  24782. },
  24783. "type": {
  24784. "type": "string",
  24785. "enum": ["shell"]
  24786. },
  24787. "callID": {
  24788. "type": "string"
  24789. },
  24790. "command": {
  24791. "type": "string"
  24792. },
  24793. "output": {
  24794. "type": "string"
  24795. }
  24796. },
  24797. "required": ["id", "time", "type", "callID", "command", "output"],
  24798. "additionalProperties": false
  24799. },
  24800. "SessionMessageAssistantText": {
  24801. "type": "object",
  24802. "properties": {
  24803. "type": {
  24804. "type": "string",
  24805. "enum": ["text"]
  24806. },
  24807. "id": {
  24808. "type": "string"
  24809. },
  24810. "text": {
  24811. "type": "string"
  24812. }
  24813. },
  24814. "required": ["type", "id", "text"],
  24815. "additionalProperties": false
  24816. },
  24817. "SessionMessageAssistantReasoning": {
  24818. "type": "object",
  24819. "properties": {
  24820. "type": {
  24821. "type": "string",
  24822. "enum": ["reasoning"]
  24823. },
  24824. "id": {
  24825. "type": "string"
  24826. },
  24827. "text": {
  24828. "type": "string"
  24829. },
  24830. "providerMetadata": {
  24831. "type": "object",
  24832. "additionalProperties": {
  24833. "type": "object"
  24834. }
  24835. }
  24836. },
  24837. "required": ["type", "id", "text"],
  24838. "additionalProperties": false
  24839. },
  24840. "SessionMessageToolStatePending": {
  24841. "type": "object",
  24842. "properties": {
  24843. "status": {
  24844. "type": "string",
  24845. "enum": ["pending"]
  24846. },
  24847. "input": {
  24848. "type": "string"
  24849. }
  24850. },
  24851. "required": ["status", "input"],
  24852. "additionalProperties": false
  24853. },
  24854. "SessionMessageToolStateRunning": {
  24855. "type": "object",
  24856. "properties": {
  24857. "status": {
  24858. "type": "string",
  24859. "enum": ["running"]
  24860. },
  24861. "input": {
  24862. "type": "object"
  24863. },
  24864. "structured": {
  24865. "type": "object"
  24866. },
  24867. "content": {
  24868. "type": "array",
  24869. "items": {
  24870. "anyOf": [
  24871. {
  24872. "$ref": "#/components/schemas/ToolTextContent"
  24873. },
  24874. {
  24875. "$ref": "#/components/schemas/ToolFileContent"
  24876. }
  24877. ]
  24878. }
  24879. }
  24880. },
  24881. "required": ["status", "input", "structured", "content"],
  24882. "additionalProperties": false
  24883. },
  24884. "SessionMessageToolStateCompleted": {
  24885. "type": "object",
  24886. "properties": {
  24887. "status": {
  24888. "type": "string",
  24889. "enum": ["completed"]
  24890. },
  24891. "input": {
  24892. "type": "object"
  24893. },
  24894. "attachments": {
  24895. "type": "array",
  24896. "items": {
  24897. "$ref": "#/components/schemas/PromptFileAttachment"
  24898. }
  24899. },
  24900. "content": {
  24901. "type": "array",
  24902. "items": {
  24903. "anyOf": [
  24904. {
  24905. "$ref": "#/components/schemas/ToolTextContent"
  24906. },
  24907. {
  24908. "$ref": "#/components/schemas/ToolFileContent"
  24909. }
  24910. ]
  24911. }
  24912. },
  24913. "outputPaths": {
  24914. "type": "array",
  24915. "items": {
  24916. "type": "string"
  24917. }
  24918. },
  24919. "structured": {
  24920. "type": "object"
  24921. },
  24922. "result": {}
  24923. },
  24924. "required": ["status", "input", "content", "structured"],
  24925. "additionalProperties": false
  24926. },
  24927. "SessionMessageToolStateError": {
  24928. "type": "object",
  24929. "properties": {
  24930. "status": {
  24931. "type": "string",
  24932. "enum": ["error"]
  24933. },
  24934. "input": {
  24935. "type": "object"
  24936. },
  24937. "content": {
  24938. "type": "array",
  24939. "items": {
  24940. "anyOf": [
  24941. {
  24942. "$ref": "#/components/schemas/ToolTextContent"
  24943. },
  24944. {
  24945. "$ref": "#/components/schemas/ToolFileContent"
  24946. }
  24947. ]
  24948. }
  24949. },
  24950. "structured": {
  24951. "type": "object"
  24952. },
  24953. "error": {
  24954. "$ref": "#/components/schemas/SessionErrorUnknown"
  24955. },
  24956. "result": {}
  24957. },
  24958. "required": ["status", "input", "content", "structured", "error"],
  24959. "additionalProperties": false
  24960. },
  24961. "SessionMessageAssistantTool": {
  24962. "type": "object",
  24963. "properties": {
  24964. "type": {
  24965. "type": "string",
  24966. "enum": ["tool"]
  24967. },
  24968. "id": {
  24969. "type": "string"
  24970. },
  24971. "name": {
  24972. "type": "string"
  24973. },
  24974. "provider": {
  24975. "type": "object",
  24976. "properties": {
  24977. "executed": {
  24978. "type": "boolean"
  24979. },
  24980. "metadata": {
  24981. "type": "object",
  24982. "additionalProperties": {
  24983. "type": "object"
  24984. }
  24985. },
  24986. "resultMetadata": {
  24987. "type": "object",
  24988. "additionalProperties": {
  24989. "type": "object"
  24990. }
  24991. }
  24992. },
  24993. "required": ["executed"],
  24994. "additionalProperties": false
  24995. },
  24996. "state": {
  24997. "anyOf": [
  24998. {
  24999. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  25000. },
  25001. {
  25002. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  25003. },
  25004. {
  25005. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  25006. },
  25007. {
  25008. "$ref": "#/components/schemas/SessionMessageToolStateError"
  25009. }
  25010. ]
  25011. },
  25012. "time": {
  25013. "type": "object",
  25014. "properties": {
  25015. "created": {
  25016. "type": "number"
  25017. },
  25018. "ran": {
  25019. "type": "number"
  25020. },
  25021. "completed": {
  25022. "type": "number"
  25023. },
  25024. "pruned": {
  25025. "type": "number"
  25026. }
  25027. },
  25028. "required": ["created"],
  25029. "additionalProperties": false
  25030. }
  25031. },
  25032. "required": ["type", "id", "name", "state", "time"],
  25033. "additionalProperties": false
  25034. },
  25035. "SessionMessageAssistant": {
  25036. "type": "object",
  25037. "properties": {
  25038. "id": {
  25039. "type": "string",
  25040. "pattern": "^msg_"
  25041. },
  25042. "metadata": {
  25043. "type": "object"
  25044. },
  25045. "time": {
  25046. "type": "object",
  25047. "properties": {
  25048. "created": {
  25049. "type": "number"
  25050. },
  25051. "completed": {
  25052. "type": "number"
  25053. }
  25054. },
  25055. "required": ["created"],
  25056. "additionalProperties": false
  25057. },
  25058. "type": {
  25059. "type": "string",
  25060. "enum": ["assistant"]
  25061. },
  25062. "agent": {
  25063. "type": "string"
  25064. },
  25065. "model": {
  25066. "type": "object",
  25067. "properties": {
  25068. "id": {
  25069. "type": "string"
  25070. },
  25071. "providerID": {
  25072. "type": "string"
  25073. },
  25074. "variant": {
  25075. "type": "string"
  25076. }
  25077. },
  25078. "required": ["id", "providerID"],
  25079. "additionalProperties": false
  25080. },
  25081. "content": {
  25082. "type": "array",
  25083. "items": {
  25084. "anyOf": [
  25085. {
  25086. "$ref": "#/components/schemas/SessionMessageAssistantText"
  25087. },
  25088. {
  25089. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  25090. },
  25091. {
  25092. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  25093. }
  25094. ]
  25095. }
  25096. },
  25097. "snapshot": {
  25098. "type": "object",
  25099. "properties": {
  25100. "start": {
  25101. "type": "string"
  25102. },
  25103. "end": {
  25104. "type": "string"
  25105. }
  25106. },
  25107. "additionalProperties": false
  25108. },
  25109. "finish": {
  25110. "type": "string"
  25111. },
  25112. "cost": {
  25113. "type": "number"
  25114. },
  25115. "tokens": {
  25116. "type": "object",
  25117. "properties": {
  25118. "input": {
  25119. "type": "number"
  25120. },
  25121. "output": {
  25122. "type": "number"
  25123. },
  25124. "reasoning": {
  25125. "type": "number"
  25126. },
  25127. "cache": {
  25128. "type": "object",
  25129. "properties": {
  25130. "read": {
  25131. "type": "number"
  25132. },
  25133. "write": {
  25134. "type": "number"
  25135. }
  25136. },
  25137. "required": ["read", "write"],
  25138. "additionalProperties": false
  25139. }
  25140. },
  25141. "required": ["input", "output", "reasoning", "cache"],
  25142. "additionalProperties": false
  25143. },
  25144. "error": {
  25145. "$ref": "#/components/schemas/SessionErrorUnknown"
  25146. }
  25147. },
  25148. "required": ["id", "time", "type", "agent", "model", "content"],
  25149. "additionalProperties": false
  25150. },
  25151. "SessionMessageCompaction": {
  25152. "type": "object",
  25153. "properties": {
  25154. "type": {
  25155. "type": "string",
  25156. "enum": ["compaction"]
  25157. },
  25158. "reason": {
  25159. "type": "string",
  25160. "enum": ["auto", "manual"]
  25161. },
  25162. "summary": {
  25163. "type": "string"
  25164. },
  25165. "recent": {
  25166. "type": "string"
  25167. },
  25168. "id": {
  25169. "type": "string",
  25170. "pattern": "^msg_"
  25171. },
  25172. "metadata": {
  25173. "type": "object"
  25174. },
  25175. "time": {
  25176. "type": "object",
  25177. "properties": {
  25178. "created": {
  25179. "type": "number"
  25180. }
  25181. },
  25182. "required": ["created"],
  25183. "additionalProperties": false
  25184. }
  25185. },
  25186. "required": ["type", "reason", "summary", "recent", "id", "time"],
  25187. "additionalProperties": false
  25188. },
  25189. "SessionMessage": {
  25190. "anyOf": [
  25191. {
  25192. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  25193. },
  25194. {
  25195. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  25196. },
  25197. {
  25198. "$ref": "#/components/schemas/SessionMessageUser"
  25199. },
  25200. {
  25201. "$ref": "#/components/schemas/SessionMessageSynthetic"
  25202. },
  25203. {
  25204. "$ref": "#/components/schemas/SessionMessageSystem"
  25205. },
  25206. {
  25207. "$ref": "#/components/schemas/SessionMessageShell"
  25208. },
  25209. {
  25210. "$ref": "#/components/schemas/SessionMessageAssistant"
  25211. },
  25212. {
  25213. "$ref": "#/components/schemas/SessionMessageCompaction"
  25214. }
  25215. ]
  25216. },
  25217. "ProviderV2Info": {
  25218. "type": "object",
  25219. "properties": {
  25220. "id": {
  25221. "type": "string"
  25222. },
  25223. "name": {
  25224. "type": "string"
  25225. },
  25226. "enabled": {
  25227. "anyOf": [
  25228. {
  25229. "type": "boolean",
  25230. "enum": [false]
  25231. },
  25232. {
  25233. "type": "object",
  25234. "properties": {
  25235. "via": {
  25236. "type": "string",
  25237. "enum": ["env"]
  25238. },
  25239. "name": {
  25240. "type": "string"
  25241. }
  25242. },
  25243. "required": ["via", "name"],
  25244. "additionalProperties": false
  25245. },
  25246. {
  25247. "type": "object",
  25248. "properties": {
  25249. "via": {
  25250. "type": "string",
  25251. "enum": ["account"]
  25252. },
  25253. "service": {
  25254. "type": "string"
  25255. }
  25256. },
  25257. "required": ["via", "service"],
  25258. "additionalProperties": false
  25259. },
  25260. {
  25261. "type": "object",
  25262. "properties": {
  25263. "via": {
  25264. "type": "string",
  25265. "enum": ["custom"]
  25266. },
  25267. "data": {
  25268. "type": "object"
  25269. }
  25270. },
  25271. "required": ["via", "data"],
  25272. "additionalProperties": false
  25273. }
  25274. ]
  25275. },
  25276. "env": {
  25277. "type": "array",
  25278. "items": {
  25279. "type": "string"
  25280. }
  25281. },
  25282. "api": {
  25283. "anyOf": [
  25284. {
  25285. "type": "object",
  25286. "properties": {
  25287. "type": {
  25288. "type": "string",
  25289. "enum": ["aisdk"]
  25290. },
  25291. "package": {
  25292. "type": "string"
  25293. },
  25294. "url": {
  25295. "type": "string"
  25296. },
  25297. "settings": {
  25298. "type": "object"
  25299. }
  25300. },
  25301. "required": ["type", "package"],
  25302. "additionalProperties": false
  25303. },
  25304. {
  25305. "type": "object",
  25306. "properties": {
  25307. "type": {
  25308. "type": "string",
  25309. "enum": ["native"]
  25310. },
  25311. "url": {
  25312. "type": "string"
  25313. },
  25314. "settings": {
  25315. "type": "object"
  25316. }
  25317. },
  25318. "required": ["type", "settings"],
  25319. "additionalProperties": false
  25320. }
  25321. ]
  25322. },
  25323. "request": {
  25324. "type": "object",
  25325. "properties": {
  25326. "headers": {
  25327. "type": "object",
  25328. "additionalProperties": {
  25329. "type": "string"
  25330. }
  25331. },
  25332. "body": {
  25333. "type": "object"
  25334. }
  25335. },
  25336. "required": ["headers", "body"],
  25337. "additionalProperties": false
  25338. }
  25339. },
  25340. "required": ["id", "name", "enabled", "env", "api", "request"],
  25341. "additionalProperties": false
  25342. },
  25343. "PermissionV2Request": {
  25344. "type": "object",
  25345. "properties": {
  25346. "id": {
  25347. "type": "string",
  25348. "pattern": "^per"
  25349. },
  25350. "sessionID": {
  25351. "type": "string",
  25352. "pattern": "^ses"
  25353. },
  25354. "action": {
  25355. "type": "string"
  25356. },
  25357. "resources": {
  25358. "type": "array",
  25359. "items": {
  25360. "type": "string"
  25361. }
  25362. },
  25363. "save": {
  25364. "type": "array",
  25365. "items": {
  25366. "type": "string"
  25367. }
  25368. },
  25369. "metadata": {
  25370. "type": "object"
  25371. },
  25372. "source": {
  25373. "$ref": "#/components/schemas/PermissionV2Source"
  25374. }
  25375. },
  25376. "required": ["id", "sessionID", "action", "resources"],
  25377. "additionalProperties": false
  25378. },
  25379. "PermissionSavedInfo": {
  25380. "type": "object",
  25381. "properties": {
  25382. "id": {
  25383. "type": "string"
  25384. },
  25385. "projectID": {
  25386. "type": "string"
  25387. },
  25388. "action": {
  25389. "type": "string"
  25390. },
  25391. "resource": {
  25392. "type": "string"
  25393. }
  25394. },
  25395. "required": ["id", "projectID", "action", "resource"],
  25396. "additionalProperties": false
  25397. },
  25398. "FileSystemContent": {
  25399. "type": "object",
  25400. "properties": {
  25401. "uri": {
  25402. "type": "string"
  25403. },
  25404. "name": {
  25405. "type": "string"
  25406. },
  25407. "content": {
  25408. "type": "string"
  25409. },
  25410. "encoding": {
  25411. "type": "string",
  25412. "enum": ["utf8", "base64"]
  25413. },
  25414. "mime": {
  25415. "type": "string"
  25416. }
  25417. },
  25418. "required": ["uri", "content", "encoding", "mime"],
  25419. "additionalProperties": false
  25420. },
  25421. "FileSystemEntry": {
  25422. "type": "object",
  25423. "properties": {
  25424. "path": {
  25425. "type": "string"
  25426. },
  25427. "type": {
  25428. "type": "string",
  25429. "enum": ["file", "directory"]
  25430. },
  25431. "mime": {
  25432. "type": "string"
  25433. }
  25434. },
  25435. "required": ["path", "type", "mime"],
  25436. "additionalProperties": false
  25437. },
  25438. "CommandV2Info": {
  25439. "type": "object",
  25440. "properties": {
  25441. "name": {
  25442. "type": "string"
  25443. },
  25444. "template": {
  25445. "type": "string"
  25446. },
  25447. "description": {
  25448. "type": "string"
  25449. },
  25450. "agent": {
  25451. "type": "string"
  25452. },
  25453. "model": {
  25454. "type": "object",
  25455. "properties": {
  25456. "id": {
  25457. "type": "string"
  25458. },
  25459. "providerID": {
  25460. "type": "string"
  25461. },
  25462. "variant": {
  25463. "type": "string"
  25464. }
  25465. },
  25466. "required": ["id", "providerID"],
  25467. "additionalProperties": false
  25468. },
  25469. "subtask": {
  25470. "type": "boolean"
  25471. }
  25472. },
  25473. "required": ["name", "template"],
  25474. "additionalProperties": false
  25475. },
  25476. "SkillV2Info": {
  25477. "type": "object",
  25478. "properties": {
  25479. "name": {
  25480. "type": "string"
  25481. },
  25482. "description": {
  25483. "type": "string"
  25484. },
  25485. "slash": {
  25486. "type": "boolean"
  25487. },
  25488. "location": {
  25489. "type": "string"
  25490. },
  25491. "content": {
  25492. "type": "string"
  25493. }
  25494. },
  25495. "required": ["name", "location", "content"],
  25496. "additionalProperties": false
  25497. },
  25498. "QuestionV2Request": {
  25499. "type": "object",
  25500. "properties": {
  25501. "id": {
  25502. "type": "string",
  25503. "pattern": "^que"
  25504. },
  25505. "sessionID": {
  25506. "type": "string",
  25507. "pattern": "^ses"
  25508. },
  25509. "questions": {
  25510. "type": "array",
  25511. "items": {
  25512. "$ref": "#/components/schemas/QuestionV2Info"
  25513. },
  25514. "description": "Questions to ask"
  25515. },
  25516. "tool": {
  25517. "$ref": "#/components/schemas/QuestionV2Tool"
  25518. }
  25519. },
  25520. "required": ["id", "sessionID", "questions"],
  25521. "additionalProperties": false
  25522. },
  25523. "QuestionV2Reply": {
  25524. "type": "object",
  25525. "properties": {
  25526. "answers": {
  25527. "type": "array",
  25528. "items": {
  25529. "$ref": "#/components/schemas/QuestionV2Answer"
  25530. },
  25531. "description": "User answers in order of questions (each answer is an array of selected labels)"
  25532. }
  25533. },
  25534. "required": ["answers"],
  25535. "additionalProperties": false
  25536. },
  25537. "ReferenceLocalSource": {
  25538. "type": "object",
  25539. "properties": {
  25540. "type": {
  25541. "type": "string",
  25542. "enum": ["local"]
  25543. },
  25544. "path": {
  25545. "type": "string"
  25546. },
  25547. "description": {
  25548. "type": "string"
  25549. },
  25550. "hidden": {
  25551. "type": "boolean"
  25552. }
  25553. },
  25554. "required": ["type", "path"],
  25555. "additionalProperties": false
  25556. },
  25557. "ReferenceGitSource": {
  25558. "type": "object",
  25559. "properties": {
  25560. "type": {
  25561. "type": "string",
  25562. "enum": ["git"]
  25563. },
  25564. "repository": {
  25565. "type": "string"
  25566. },
  25567. "branch": {
  25568. "type": "string"
  25569. },
  25570. "description": {
  25571. "type": "string"
  25572. },
  25573. "hidden": {
  25574. "type": "boolean"
  25575. }
  25576. },
  25577. "required": ["type", "repository"],
  25578. "additionalProperties": false
  25579. },
  25580. "ReferenceInfo": {
  25581. "type": "object",
  25582. "properties": {
  25583. "name": {
  25584. "type": "string"
  25585. },
  25586. "path": {
  25587. "type": "string"
  25588. },
  25589. "description": {
  25590. "type": "string"
  25591. },
  25592. "hidden": {
  25593. "type": "boolean"
  25594. },
  25595. "source": {
  25596. "anyOf": [
  25597. {
  25598. "$ref": "#/components/schemas/ReferenceLocalSource"
  25599. },
  25600. {
  25601. "$ref": "#/components/schemas/ReferenceGitSource"
  25602. }
  25603. ]
  25604. }
  25605. },
  25606. "required": ["name", "path", "source"],
  25607. "additionalProperties": false
  25608. },
  25609. "EventModels-devRefreshed": {
  25610. "type": "object",
  25611. "properties": {
  25612. "id": {
  25613. "type": "string",
  25614. "pattern": "^evt_"
  25615. },
  25616. "type": {
  25617. "type": "string",
  25618. "enum": ["models-dev.refreshed"]
  25619. },
  25620. "properties": {
  25621. "type": "object",
  25622. "properties": {}
  25623. }
  25624. },
  25625. "required": ["id", "type", "properties"],
  25626. "additionalProperties": false
  25627. },
  25628. "EventPluginAdded": {
  25629. "type": "object",
  25630. "properties": {
  25631. "id": {
  25632. "type": "string",
  25633. "pattern": "^evt_"
  25634. },
  25635. "type": {
  25636. "type": "string",
  25637. "enum": ["plugin.added"]
  25638. },
  25639. "properties": {
  25640. "type": "object",
  25641. "properties": {
  25642. "id": {
  25643. "type": "string"
  25644. }
  25645. },
  25646. "required": ["id"],
  25647. "additionalProperties": false
  25648. }
  25649. },
  25650. "required": ["id", "type", "properties"],
  25651. "additionalProperties": false
  25652. },
  25653. "ModelV2Info1": {
  25654. "type": "object",
  25655. "properties": {
  25656. "id": {
  25657. "type": "string"
  25658. },
  25659. "providerID": {
  25660. "type": "string"
  25661. },
  25662. "family": {
  25663. "type": "string"
  25664. },
  25665. "name": {
  25666. "type": "string"
  25667. },
  25668. "api": {
  25669. "anyOf": [
  25670. {
  25671. "type": "object",
  25672. "properties": {
  25673. "id": {
  25674. "type": "string"
  25675. },
  25676. "type": {
  25677. "type": "string",
  25678. "enum": ["aisdk"]
  25679. },
  25680. "package": {
  25681. "type": "string"
  25682. },
  25683. "url": {
  25684. "type": "string"
  25685. },
  25686. "settings": {
  25687. "type": "object"
  25688. }
  25689. },
  25690. "required": ["id", "type", "package"],
  25691. "additionalProperties": false
  25692. },
  25693. {
  25694. "type": "object",
  25695. "properties": {
  25696. "id": {
  25697. "type": "string"
  25698. },
  25699. "type": {
  25700. "type": "string",
  25701. "enum": ["native"]
  25702. },
  25703. "url": {
  25704. "type": "string"
  25705. },
  25706. "settings": {
  25707. "type": "object"
  25708. }
  25709. },
  25710. "required": ["id", "type", "settings"],
  25711. "additionalProperties": false
  25712. }
  25713. ]
  25714. },
  25715. "capabilities": {
  25716. "type": "object",
  25717. "properties": {
  25718. "tools": {
  25719. "type": "boolean"
  25720. },
  25721. "input": {
  25722. "type": "array",
  25723. "items": {
  25724. "type": "string"
  25725. }
  25726. },
  25727. "output": {
  25728. "type": "array",
  25729. "items": {
  25730. "type": "string"
  25731. }
  25732. }
  25733. },
  25734. "required": ["tools", "input", "output"],
  25735. "additionalProperties": false
  25736. },
  25737. "request": {
  25738. "type": "object",
  25739. "properties": {
  25740. "headers": {
  25741. "type": "object",
  25742. "additionalProperties": {
  25743. "type": "string"
  25744. }
  25745. },
  25746. "body": {
  25747. "type": "object"
  25748. },
  25749. "generation": {
  25750. "type": "object",
  25751. "properties": {
  25752. "maxTokens": {
  25753. "anyOf": [
  25754. {
  25755. "type": "number"
  25756. },
  25757. {
  25758. "type": "string",
  25759. "enum": ["NaN"]
  25760. },
  25761. {
  25762. "type": "string",
  25763. "enum": ["Infinity"]
  25764. },
  25765. {
  25766. "type": "string",
  25767. "enum": ["-Infinity"]
  25768. }
  25769. ]
  25770. },
  25771. "temperature": {
  25772. "anyOf": [
  25773. {
  25774. "type": "number"
  25775. },
  25776. {
  25777. "type": "string",
  25778. "enum": ["NaN"]
  25779. },
  25780. {
  25781. "type": "string",
  25782. "enum": ["Infinity"]
  25783. },
  25784. {
  25785. "type": "string",
  25786. "enum": ["-Infinity"]
  25787. }
  25788. ]
  25789. },
  25790. "topP": {
  25791. "anyOf": [
  25792. {
  25793. "type": "number"
  25794. },
  25795. {
  25796. "type": "string",
  25797. "enum": ["NaN"]
  25798. },
  25799. {
  25800. "type": "string",
  25801. "enum": ["Infinity"]
  25802. },
  25803. {
  25804. "type": "string",
  25805. "enum": ["-Infinity"]
  25806. }
  25807. ]
  25808. },
  25809. "topK": {
  25810. "anyOf": [
  25811. {
  25812. "type": "number"
  25813. },
  25814. {
  25815. "type": "string",
  25816. "enum": ["NaN"]
  25817. },
  25818. {
  25819. "type": "string",
  25820. "enum": ["Infinity"]
  25821. },
  25822. {
  25823. "type": "string",
  25824. "enum": ["-Infinity"]
  25825. }
  25826. ]
  25827. },
  25828. "frequencyPenalty": {
  25829. "anyOf": [
  25830. {
  25831. "type": "number"
  25832. },
  25833. {
  25834. "type": "string",
  25835. "enum": ["NaN"]
  25836. },
  25837. {
  25838. "type": "string",
  25839. "enum": ["Infinity"]
  25840. },
  25841. {
  25842. "type": "string",
  25843. "enum": ["-Infinity"]
  25844. }
  25845. ]
  25846. },
  25847. "presencePenalty": {
  25848. "anyOf": [
  25849. {
  25850. "type": "number"
  25851. },
  25852. {
  25853. "type": "string",
  25854. "enum": ["NaN"]
  25855. },
  25856. {
  25857. "type": "string",
  25858. "enum": ["Infinity"]
  25859. },
  25860. {
  25861. "type": "string",
  25862. "enum": ["-Infinity"]
  25863. }
  25864. ]
  25865. },
  25866. "seed": {
  25867. "anyOf": [
  25868. {
  25869. "type": "number"
  25870. },
  25871. {
  25872. "type": "string",
  25873. "enum": ["NaN"]
  25874. },
  25875. {
  25876. "type": "string",
  25877. "enum": ["Infinity"]
  25878. },
  25879. {
  25880. "type": "string",
  25881. "enum": ["-Infinity"]
  25882. }
  25883. ]
  25884. },
  25885. "stop": {
  25886. "type": "array",
  25887. "items": {
  25888. "type": "string"
  25889. }
  25890. }
  25891. },
  25892. "additionalProperties": false
  25893. },
  25894. "options": {
  25895. "type": "object"
  25896. },
  25897. "variant": {
  25898. "type": "string"
  25899. }
  25900. },
  25901. "required": ["headers", "body"],
  25902. "additionalProperties": false
  25903. },
  25904. "variants": {
  25905. "type": "array",
  25906. "items": {
  25907. "type": "object",
  25908. "properties": {
  25909. "id": {
  25910. "type": "string"
  25911. },
  25912. "headers": {
  25913. "type": "object",
  25914. "additionalProperties": {
  25915. "type": "string"
  25916. }
  25917. },
  25918. "body": {
  25919. "type": "object"
  25920. },
  25921. "generation": {
  25922. "type": "object",
  25923. "properties": {
  25924. "maxTokens": {
  25925. "anyOf": [
  25926. {
  25927. "type": "number"
  25928. },
  25929. {
  25930. "type": "string",
  25931. "enum": ["NaN"]
  25932. },
  25933. {
  25934. "type": "string",
  25935. "enum": ["Infinity"]
  25936. },
  25937. {
  25938. "type": "string",
  25939. "enum": ["-Infinity"]
  25940. }
  25941. ]
  25942. },
  25943. "temperature": {
  25944. "anyOf": [
  25945. {
  25946. "type": "number"
  25947. },
  25948. {
  25949. "type": "string",
  25950. "enum": ["NaN"]
  25951. },
  25952. {
  25953. "type": "string",
  25954. "enum": ["Infinity"]
  25955. },
  25956. {
  25957. "type": "string",
  25958. "enum": ["-Infinity"]
  25959. }
  25960. ]
  25961. },
  25962. "topP": {
  25963. "anyOf": [
  25964. {
  25965. "type": "number"
  25966. },
  25967. {
  25968. "type": "string",
  25969. "enum": ["NaN"]
  25970. },
  25971. {
  25972. "type": "string",
  25973. "enum": ["Infinity"]
  25974. },
  25975. {
  25976. "type": "string",
  25977. "enum": ["-Infinity"]
  25978. }
  25979. ]
  25980. },
  25981. "topK": {
  25982. "anyOf": [
  25983. {
  25984. "type": "number"
  25985. },
  25986. {
  25987. "type": "string",
  25988. "enum": ["NaN"]
  25989. },
  25990. {
  25991. "type": "string",
  25992. "enum": ["Infinity"]
  25993. },
  25994. {
  25995. "type": "string",
  25996. "enum": ["-Infinity"]
  25997. }
  25998. ]
  25999. },
  26000. "frequencyPenalty": {
  26001. "anyOf": [
  26002. {
  26003. "type": "number"
  26004. },
  26005. {
  26006. "type": "string",
  26007. "enum": ["NaN"]
  26008. },
  26009. {
  26010. "type": "string",
  26011. "enum": ["Infinity"]
  26012. },
  26013. {
  26014. "type": "string",
  26015. "enum": ["-Infinity"]
  26016. }
  26017. ]
  26018. },
  26019. "presencePenalty": {
  26020. "anyOf": [
  26021. {
  26022. "type": "number"
  26023. },
  26024. {
  26025. "type": "string",
  26026. "enum": ["NaN"]
  26027. },
  26028. {
  26029. "type": "string",
  26030. "enum": ["Infinity"]
  26031. },
  26032. {
  26033. "type": "string",
  26034. "enum": ["-Infinity"]
  26035. }
  26036. ]
  26037. },
  26038. "seed": {
  26039. "anyOf": [
  26040. {
  26041. "type": "number"
  26042. },
  26043. {
  26044. "type": "string",
  26045. "enum": ["NaN"]
  26046. },
  26047. {
  26048. "type": "string",
  26049. "enum": ["Infinity"]
  26050. },
  26051. {
  26052. "type": "string",
  26053. "enum": ["-Infinity"]
  26054. }
  26055. ]
  26056. },
  26057. "stop": {
  26058. "type": "array",
  26059. "items": {
  26060. "type": "string"
  26061. }
  26062. }
  26063. },
  26064. "additionalProperties": false
  26065. },
  26066. "options": {
  26067. "type": "object"
  26068. }
  26069. },
  26070. "required": ["id", "headers", "body"],
  26071. "additionalProperties": false
  26072. }
  26073. },
  26074. "time": {
  26075. "type": "object",
  26076. "properties": {
  26077. "released": {
  26078. "anyOf": [
  26079. {
  26080. "type": "number"
  26081. },
  26082. {
  26083. "type": "string",
  26084. "enum": ["NaN"]
  26085. },
  26086. {
  26087. "type": "string",
  26088. "enum": ["Infinity"]
  26089. },
  26090. {
  26091. "type": "string",
  26092. "enum": ["-Infinity"]
  26093. }
  26094. ]
  26095. }
  26096. },
  26097. "required": ["released"],
  26098. "additionalProperties": false
  26099. },
  26100. "cost": {
  26101. "type": "array",
  26102. "items": {
  26103. "type": "object",
  26104. "properties": {
  26105. "tier": {
  26106. "type": "object",
  26107. "properties": {
  26108. "type": {
  26109. "type": "string",
  26110. "enum": ["context"]
  26111. },
  26112. "size": {
  26113. "type": "integer"
  26114. }
  26115. },
  26116. "required": ["type", "size"],
  26117. "additionalProperties": false
  26118. },
  26119. "input": {
  26120. "type": "number"
  26121. },
  26122. "output": {
  26123. "type": "number"
  26124. },
  26125. "cache": {
  26126. "type": "object",
  26127. "properties": {
  26128. "read": {
  26129. "type": "number"
  26130. },
  26131. "write": {
  26132. "type": "number"
  26133. }
  26134. },
  26135. "required": ["read", "write"],
  26136. "additionalProperties": false
  26137. }
  26138. },
  26139. "required": ["input", "output", "cache"],
  26140. "additionalProperties": false
  26141. }
  26142. },
  26143. "status": {
  26144. "type": "string",
  26145. "enum": ["alpha", "beta", "deprecated", "active"]
  26146. },
  26147. "enabled": {
  26148. "type": "boolean"
  26149. },
  26150. "limit": {
  26151. "type": "object",
  26152. "properties": {
  26153. "context": {
  26154. "type": "integer"
  26155. },
  26156. "input": {
  26157. "type": "integer"
  26158. },
  26159. "output": {
  26160. "type": "integer"
  26161. }
  26162. },
  26163. "required": ["context", "output"],
  26164. "additionalProperties": false
  26165. }
  26166. },
  26167. "required": [
  26168. "id",
  26169. "providerID",
  26170. "name",
  26171. "api",
  26172. "capabilities",
  26173. "request",
  26174. "variants",
  26175. "time",
  26176. "cost",
  26177. "status",
  26178. "enabled",
  26179. "limit"
  26180. ],
  26181. "additionalProperties": false
  26182. },
  26183. "EventCatalogModelUpdated": {
  26184. "type": "object",
  26185. "properties": {
  26186. "id": {
  26187. "type": "string",
  26188. "pattern": "^evt_"
  26189. },
  26190. "type": {
  26191. "type": "string",
  26192. "enum": ["catalog.model.updated"]
  26193. },
  26194. "properties": {
  26195. "type": "object",
  26196. "properties": {
  26197. "model": {
  26198. "$ref": "#/components/schemas/ModelV2Info1"
  26199. }
  26200. },
  26201. "required": ["model"],
  26202. "additionalProperties": false
  26203. }
  26204. },
  26205. "required": ["id", "type", "properties"],
  26206. "additionalProperties": false
  26207. },
  26208. "EventSessionCreated": {
  26209. "type": "object",
  26210. "properties": {
  26211. "id": {
  26212. "type": "string",
  26213. "pattern": "^evt_"
  26214. },
  26215. "type": {
  26216. "type": "string",
  26217. "enum": ["session.created"]
  26218. },
  26219. "properties": {
  26220. "type": "object",
  26221. "properties": {
  26222. "sessionID": {
  26223. "type": "string",
  26224. "pattern": "^ses"
  26225. },
  26226. "info": {
  26227. "$ref": "#/components/schemas/Session"
  26228. }
  26229. },
  26230. "required": ["sessionID", "info"],
  26231. "additionalProperties": false
  26232. }
  26233. },
  26234. "required": ["id", "type", "properties"],
  26235. "additionalProperties": false
  26236. },
  26237. "EventSessionUpdated": {
  26238. "type": "object",
  26239. "properties": {
  26240. "id": {
  26241. "type": "string",
  26242. "pattern": "^evt_"
  26243. },
  26244. "type": {
  26245. "type": "string",
  26246. "enum": ["session.updated"]
  26247. },
  26248. "properties": {
  26249. "type": "object",
  26250. "properties": {
  26251. "sessionID": {
  26252. "type": "string",
  26253. "pattern": "^ses"
  26254. },
  26255. "info": {
  26256. "$ref": "#/components/schemas/Session"
  26257. }
  26258. },
  26259. "required": ["sessionID", "info"],
  26260. "additionalProperties": false
  26261. }
  26262. },
  26263. "required": ["id", "type", "properties"],
  26264. "additionalProperties": false
  26265. },
  26266. "EventSessionDeleted": {
  26267. "type": "object",
  26268. "properties": {
  26269. "id": {
  26270. "type": "string",
  26271. "pattern": "^evt_"
  26272. },
  26273. "type": {
  26274. "type": "string",
  26275. "enum": ["session.deleted"]
  26276. },
  26277. "properties": {
  26278. "type": "object",
  26279. "properties": {
  26280. "sessionID": {
  26281. "type": "string",
  26282. "pattern": "^ses"
  26283. },
  26284. "info": {
  26285. "$ref": "#/components/schemas/Session"
  26286. }
  26287. },
  26288. "required": ["sessionID", "info"],
  26289. "additionalProperties": false
  26290. }
  26291. },
  26292. "required": ["id", "type", "properties"],
  26293. "additionalProperties": false
  26294. },
  26295. "EventMessageUpdated": {
  26296. "type": "object",
  26297. "properties": {
  26298. "id": {
  26299. "type": "string",
  26300. "pattern": "^evt_"
  26301. },
  26302. "type": {
  26303. "type": "string",
  26304. "enum": ["message.updated"]
  26305. },
  26306. "properties": {
  26307. "type": "object",
  26308. "properties": {
  26309. "sessionID": {
  26310. "type": "string",
  26311. "pattern": "^ses"
  26312. },
  26313. "info": {
  26314. "$ref": "#/components/schemas/Message"
  26315. }
  26316. },
  26317. "required": ["sessionID", "info"],
  26318. "additionalProperties": false
  26319. }
  26320. },
  26321. "required": ["id", "type", "properties"],
  26322. "additionalProperties": false
  26323. },
  26324. "EventMessageRemoved": {
  26325. "type": "object",
  26326. "properties": {
  26327. "id": {
  26328. "type": "string",
  26329. "pattern": "^evt_"
  26330. },
  26331. "type": {
  26332. "type": "string",
  26333. "enum": ["message.removed"]
  26334. },
  26335. "properties": {
  26336. "type": "object",
  26337. "properties": {
  26338. "sessionID": {
  26339. "type": "string",
  26340. "pattern": "^ses"
  26341. },
  26342. "messageID": {
  26343. "type": "string",
  26344. "pattern": "^msg"
  26345. }
  26346. },
  26347. "required": ["sessionID", "messageID"],
  26348. "additionalProperties": false
  26349. }
  26350. },
  26351. "required": ["id", "type", "properties"],
  26352. "additionalProperties": false
  26353. },
  26354. "EventMessagePartUpdated": {
  26355. "type": "object",
  26356. "properties": {
  26357. "id": {
  26358. "type": "string",
  26359. "pattern": "^evt_"
  26360. },
  26361. "type": {
  26362. "type": "string",
  26363. "enum": ["message.part.updated"]
  26364. },
  26365. "properties": {
  26366. "type": "object",
  26367. "properties": {
  26368. "sessionID": {
  26369. "type": "string",
  26370. "pattern": "^ses"
  26371. },
  26372. "part": {
  26373. "$ref": "#/components/schemas/Part"
  26374. },
  26375. "time": {
  26376. "type": "number"
  26377. }
  26378. },
  26379. "required": ["sessionID", "part", "time"],
  26380. "additionalProperties": false
  26381. }
  26382. },
  26383. "required": ["id", "type", "properties"],
  26384. "additionalProperties": false
  26385. },
  26386. "EventMessagePartRemoved": {
  26387. "type": "object",
  26388. "properties": {
  26389. "id": {
  26390. "type": "string",
  26391. "pattern": "^evt_"
  26392. },
  26393. "type": {
  26394. "type": "string",
  26395. "enum": ["message.part.removed"]
  26396. },
  26397. "properties": {
  26398. "type": "object",
  26399. "properties": {
  26400. "sessionID": {
  26401. "type": "string",
  26402. "pattern": "^ses"
  26403. },
  26404. "messageID": {
  26405. "type": "string",
  26406. "pattern": "^msg"
  26407. },
  26408. "partID": {
  26409. "type": "string",
  26410. "pattern": "^prt"
  26411. }
  26412. },
  26413. "required": ["sessionID", "messageID", "partID"],
  26414. "additionalProperties": false
  26415. }
  26416. },
  26417. "required": ["id", "type", "properties"],
  26418. "additionalProperties": false
  26419. },
  26420. "EventSessionNextAgentSwitched": {
  26421. "type": "object",
  26422. "properties": {
  26423. "id": {
  26424. "type": "string",
  26425. "pattern": "^evt_"
  26426. },
  26427. "type": {
  26428. "type": "string",
  26429. "enum": ["session.next.agent.switched"]
  26430. },
  26431. "properties": {
  26432. "type": "object",
  26433. "properties": {
  26434. "timestamp": {
  26435. "type": "number"
  26436. },
  26437. "sessionID": {
  26438. "type": "string",
  26439. "pattern": "^ses"
  26440. },
  26441. "messageID": {
  26442. "type": "string",
  26443. "pattern": "^msg_"
  26444. },
  26445. "agent": {
  26446. "type": "string"
  26447. }
  26448. },
  26449. "required": ["timestamp", "sessionID", "messageID", "agent"],
  26450. "additionalProperties": false
  26451. }
  26452. },
  26453. "required": ["id", "type", "properties"],
  26454. "additionalProperties": false
  26455. },
  26456. "EventSessionNextModelSwitched": {
  26457. "type": "object",
  26458. "properties": {
  26459. "id": {
  26460. "type": "string",
  26461. "pattern": "^evt_"
  26462. },
  26463. "type": {
  26464. "type": "string",
  26465. "enum": ["session.next.model.switched"]
  26466. },
  26467. "properties": {
  26468. "type": "object",
  26469. "properties": {
  26470. "timestamp": {
  26471. "type": "number"
  26472. },
  26473. "sessionID": {
  26474. "type": "string",
  26475. "pattern": "^ses"
  26476. },
  26477. "messageID": {
  26478. "type": "string",
  26479. "pattern": "^msg_"
  26480. },
  26481. "model": {
  26482. "type": "object",
  26483. "properties": {
  26484. "id": {
  26485. "type": "string"
  26486. },
  26487. "providerID": {
  26488. "type": "string"
  26489. },
  26490. "variant": {
  26491. "type": "string"
  26492. }
  26493. },
  26494. "required": ["id", "providerID"],
  26495. "additionalProperties": false
  26496. }
  26497. },
  26498. "required": ["timestamp", "sessionID", "messageID", "model"],
  26499. "additionalProperties": false
  26500. }
  26501. },
  26502. "required": ["id", "type", "properties"],
  26503. "additionalProperties": false
  26504. },
  26505. "EventSessionNextMoved": {
  26506. "type": "object",
  26507. "properties": {
  26508. "id": {
  26509. "type": "string",
  26510. "pattern": "^evt_"
  26511. },
  26512. "type": {
  26513. "type": "string",
  26514. "enum": ["session.next.moved"]
  26515. },
  26516. "properties": {
  26517. "type": "object",
  26518. "properties": {
  26519. "timestamp": {
  26520. "type": "number"
  26521. },
  26522. "sessionID": {
  26523. "type": "string",
  26524. "pattern": "^ses"
  26525. },
  26526. "location": {
  26527. "$ref": "#/components/schemas/LocationRef"
  26528. },
  26529. "subdirectory": {
  26530. "type": "string"
  26531. }
  26532. },
  26533. "required": ["timestamp", "sessionID", "location"],
  26534. "additionalProperties": false
  26535. }
  26536. },
  26537. "required": ["id", "type", "properties"],
  26538. "additionalProperties": false
  26539. },
  26540. "EventSessionNextPrompted": {
  26541. "type": "object",
  26542. "properties": {
  26543. "id": {
  26544. "type": "string",
  26545. "pattern": "^evt_"
  26546. },
  26547. "type": {
  26548. "type": "string",
  26549. "enum": ["session.next.prompted"]
  26550. },
  26551. "properties": {
  26552. "type": "object",
  26553. "properties": {
  26554. "timestamp": {
  26555. "type": "number"
  26556. },
  26557. "sessionID": {
  26558. "type": "string",
  26559. "pattern": "^ses"
  26560. },
  26561. "messageID": {
  26562. "type": "string",
  26563. "pattern": "^msg_"
  26564. },
  26565. "prompt": {
  26566. "$ref": "#/components/schemas/Prompt"
  26567. },
  26568. "delivery": {
  26569. "type": "string",
  26570. "enum": ["steer", "queue"]
  26571. }
  26572. },
  26573. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26574. "additionalProperties": false
  26575. }
  26576. },
  26577. "required": ["id", "type", "properties"],
  26578. "additionalProperties": false
  26579. },
  26580. "EventSessionNextPromptAdmitted": {
  26581. "type": "object",
  26582. "properties": {
  26583. "id": {
  26584. "type": "string",
  26585. "pattern": "^evt_"
  26586. },
  26587. "type": {
  26588. "type": "string",
  26589. "enum": ["session.next.prompt.admitted"]
  26590. },
  26591. "properties": {
  26592. "type": "object",
  26593. "properties": {
  26594. "timestamp": {
  26595. "type": "number"
  26596. },
  26597. "sessionID": {
  26598. "type": "string",
  26599. "pattern": "^ses"
  26600. },
  26601. "messageID": {
  26602. "type": "string",
  26603. "pattern": "^msg_"
  26604. },
  26605. "prompt": {
  26606. "$ref": "#/components/schemas/Prompt"
  26607. },
  26608. "delivery": {
  26609. "type": "string",
  26610. "enum": ["steer", "queue"]
  26611. }
  26612. },
  26613. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26614. "additionalProperties": false
  26615. }
  26616. },
  26617. "required": ["id", "type", "properties"],
  26618. "additionalProperties": false
  26619. },
  26620. "EventSessionNextPromptPromoted": {
  26621. "type": "object",
  26622. "properties": {
  26623. "id": {
  26624. "type": "string",
  26625. "pattern": "^evt_"
  26626. },
  26627. "type": {
  26628. "type": "string",
  26629. "enum": ["session.next.prompt.promoted"]
  26630. },
  26631. "properties": {
  26632. "type": "object",
  26633. "properties": {
  26634. "timestamp": {
  26635. "type": "number"
  26636. },
  26637. "sessionID": {
  26638. "type": "string",
  26639. "pattern": "^ses"
  26640. },
  26641. "messageID": {
  26642. "type": "string",
  26643. "pattern": "^msg_"
  26644. },
  26645. "prompt": {
  26646. "$ref": "#/components/schemas/Prompt"
  26647. },
  26648. "timeCreated": {
  26649. "type": "number"
  26650. }
  26651. },
  26652. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  26653. "additionalProperties": false
  26654. }
  26655. },
  26656. "required": ["id", "type", "properties"],
  26657. "additionalProperties": false
  26658. },
  26659. "EventSessionNextInterruptRequested": {
  26660. "type": "object",
  26661. "properties": {
  26662. "id": {
  26663. "type": "string",
  26664. "pattern": "^evt_"
  26665. },
  26666. "type": {
  26667. "type": "string",
  26668. "enum": ["session.next.interrupt.requested"]
  26669. },
  26670. "properties": {
  26671. "type": "object",
  26672. "properties": {
  26673. "timestamp": {
  26674. "type": "number"
  26675. },
  26676. "sessionID": {
  26677. "type": "string",
  26678. "pattern": "^ses"
  26679. }
  26680. },
  26681. "required": ["timestamp", "sessionID"],
  26682. "additionalProperties": false
  26683. }
  26684. },
  26685. "required": ["id", "type", "properties"],
  26686. "additionalProperties": false
  26687. },
  26688. "EventSessionNextContextUpdated": {
  26689. "type": "object",
  26690. "properties": {
  26691. "id": {
  26692. "type": "string",
  26693. "pattern": "^evt_"
  26694. },
  26695. "type": {
  26696. "type": "string",
  26697. "enum": ["session.next.context.updated"]
  26698. },
  26699. "properties": {
  26700. "type": "object",
  26701. "properties": {
  26702. "timestamp": {
  26703. "type": "number"
  26704. },
  26705. "sessionID": {
  26706. "type": "string",
  26707. "pattern": "^ses"
  26708. },
  26709. "messageID": {
  26710. "type": "string",
  26711. "pattern": "^msg_"
  26712. },
  26713. "text": {
  26714. "type": "string"
  26715. }
  26716. },
  26717. "required": ["timestamp", "sessionID", "messageID", "text"],
  26718. "additionalProperties": false
  26719. }
  26720. },
  26721. "required": ["id", "type", "properties"],
  26722. "additionalProperties": false
  26723. },
  26724. "EventSessionNextSynthetic": {
  26725. "type": "object",
  26726. "properties": {
  26727. "id": {
  26728. "type": "string",
  26729. "pattern": "^evt_"
  26730. },
  26731. "type": {
  26732. "type": "string",
  26733. "enum": ["session.next.synthetic"]
  26734. },
  26735. "properties": {
  26736. "type": "object",
  26737. "properties": {
  26738. "timestamp": {
  26739. "type": "number"
  26740. },
  26741. "sessionID": {
  26742. "type": "string",
  26743. "pattern": "^ses"
  26744. },
  26745. "messageID": {
  26746. "type": "string",
  26747. "pattern": "^msg_"
  26748. },
  26749. "text": {
  26750. "type": "string"
  26751. }
  26752. },
  26753. "required": ["timestamp", "sessionID", "messageID", "text"],
  26754. "additionalProperties": false
  26755. }
  26756. },
  26757. "required": ["id", "type", "properties"],
  26758. "additionalProperties": false
  26759. },
  26760. "EventSessionNextShellStarted": {
  26761. "type": "object",
  26762. "properties": {
  26763. "id": {
  26764. "type": "string",
  26765. "pattern": "^evt_"
  26766. },
  26767. "type": {
  26768. "type": "string",
  26769. "enum": ["session.next.shell.started"]
  26770. },
  26771. "properties": {
  26772. "type": "object",
  26773. "properties": {
  26774. "timestamp": {
  26775. "type": "number"
  26776. },
  26777. "sessionID": {
  26778. "type": "string",
  26779. "pattern": "^ses"
  26780. },
  26781. "messageID": {
  26782. "type": "string",
  26783. "pattern": "^msg_"
  26784. },
  26785. "callID": {
  26786. "type": "string"
  26787. },
  26788. "command": {
  26789. "type": "string"
  26790. }
  26791. },
  26792. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  26793. "additionalProperties": false
  26794. }
  26795. },
  26796. "required": ["id", "type", "properties"],
  26797. "additionalProperties": false
  26798. },
  26799. "EventSessionNextShellEnded": {
  26800. "type": "object",
  26801. "properties": {
  26802. "id": {
  26803. "type": "string",
  26804. "pattern": "^evt_"
  26805. },
  26806. "type": {
  26807. "type": "string",
  26808. "enum": ["session.next.shell.ended"]
  26809. },
  26810. "properties": {
  26811. "type": "object",
  26812. "properties": {
  26813. "timestamp": {
  26814. "type": "number"
  26815. },
  26816. "sessionID": {
  26817. "type": "string",
  26818. "pattern": "^ses"
  26819. },
  26820. "callID": {
  26821. "type": "string"
  26822. },
  26823. "output": {
  26824. "type": "string"
  26825. }
  26826. },
  26827. "required": ["timestamp", "sessionID", "callID", "output"],
  26828. "additionalProperties": false
  26829. }
  26830. },
  26831. "required": ["id", "type", "properties"],
  26832. "additionalProperties": false
  26833. },
  26834. "EventSessionNextStepStarted": {
  26835. "type": "object",
  26836. "properties": {
  26837. "id": {
  26838. "type": "string",
  26839. "pattern": "^evt_"
  26840. },
  26841. "type": {
  26842. "type": "string",
  26843. "enum": ["session.next.step.started"]
  26844. },
  26845. "properties": {
  26846. "type": "object",
  26847. "properties": {
  26848. "timestamp": {
  26849. "type": "number"
  26850. },
  26851. "sessionID": {
  26852. "type": "string",
  26853. "pattern": "^ses"
  26854. },
  26855. "assistantMessageID": {
  26856. "type": "string",
  26857. "pattern": "^msg_"
  26858. },
  26859. "agent": {
  26860. "type": "string"
  26861. },
  26862. "model": {
  26863. "type": "object",
  26864. "properties": {
  26865. "id": {
  26866. "type": "string"
  26867. },
  26868. "providerID": {
  26869. "type": "string"
  26870. },
  26871. "variant": {
  26872. "type": "string"
  26873. }
  26874. },
  26875. "required": ["id", "providerID"],
  26876. "additionalProperties": false
  26877. },
  26878. "snapshot": {
  26879. "type": "string"
  26880. }
  26881. },
  26882. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  26883. "additionalProperties": false
  26884. }
  26885. },
  26886. "required": ["id", "type", "properties"],
  26887. "additionalProperties": false
  26888. },
  26889. "EventSessionNextStepEnded": {
  26890. "type": "object",
  26891. "properties": {
  26892. "id": {
  26893. "type": "string",
  26894. "pattern": "^evt_"
  26895. },
  26896. "type": {
  26897. "type": "string",
  26898. "enum": ["session.next.step.ended"]
  26899. },
  26900. "properties": {
  26901. "type": "object",
  26902. "properties": {
  26903. "timestamp": {
  26904. "type": "number"
  26905. },
  26906. "sessionID": {
  26907. "type": "string",
  26908. "pattern": "^ses"
  26909. },
  26910. "assistantMessageID": {
  26911. "type": "string",
  26912. "pattern": "^msg_"
  26913. },
  26914. "finish": {
  26915. "type": "string"
  26916. },
  26917. "cost": {
  26918. "type": "number"
  26919. },
  26920. "tokens": {
  26921. "type": "object",
  26922. "properties": {
  26923. "input": {
  26924. "type": "number"
  26925. },
  26926. "output": {
  26927. "type": "number"
  26928. },
  26929. "reasoning": {
  26930. "type": "number"
  26931. },
  26932. "cache": {
  26933. "type": "object",
  26934. "properties": {
  26935. "read": {
  26936. "type": "number"
  26937. },
  26938. "write": {
  26939. "type": "number"
  26940. }
  26941. },
  26942. "required": ["read", "write"],
  26943. "additionalProperties": false
  26944. }
  26945. },
  26946. "required": ["input", "output", "reasoning", "cache"],
  26947. "additionalProperties": false
  26948. },
  26949. "snapshot": {
  26950. "type": "string"
  26951. }
  26952. },
  26953. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  26954. "additionalProperties": false
  26955. }
  26956. },
  26957. "required": ["id", "type", "properties"],
  26958. "additionalProperties": false
  26959. },
  26960. "EventSessionNextStepFailed": {
  26961. "type": "object",
  26962. "properties": {
  26963. "id": {
  26964. "type": "string",
  26965. "pattern": "^evt_"
  26966. },
  26967. "type": {
  26968. "type": "string",
  26969. "enum": ["session.next.step.failed"]
  26970. },
  26971. "properties": {
  26972. "type": "object",
  26973. "properties": {
  26974. "timestamp": {
  26975. "type": "number"
  26976. },
  26977. "sessionID": {
  26978. "type": "string",
  26979. "pattern": "^ses"
  26980. },
  26981. "assistantMessageID": {
  26982. "type": "string",
  26983. "pattern": "^msg_"
  26984. },
  26985. "error": {
  26986. "$ref": "#/components/schemas/SessionErrorUnknown"
  26987. }
  26988. },
  26989. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  26990. "additionalProperties": false
  26991. }
  26992. },
  26993. "required": ["id", "type", "properties"],
  26994. "additionalProperties": false
  26995. },
  26996. "EventSessionNextTextStarted": {
  26997. "type": "object",
  26998. "properties": {
  26999. "id": {
  27000. "type": "string",
  27001. "pattern": "^evt_"
  27002. },
  27003. "type": {
  27004. "type": "string",
  27005. "enum": ["session.next.text.started"]
  27006. },
  27007. "properties": {
  27008. "type": "object",
  27009. "properties": {
  27010. "timestamp": {
  27011. "type": "number"
  27012. },
  27013. "sessionID": {
  27014. "type": "string",
  27015. "pattern": "^ses"
  27016. },
  27017. "assistantMessageID": {
  27018. "type": "string",
  27019. "pattern": "^msg_"
  27020. },
  27021. "textID": {
  27022. "type": "string"
  27023. }
  27024. },
  27025. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  27026. "additionalProperties": false
  27027. }
  27028. },
  27029. "required": ["id", "type", "properties"],
  27030. "additionalProperties": false
  27031. },
  27032. "EventSessionNextTextDelta": {
  27033. "type": "object",
  27034. "properties": {
  27035. "id": {
  27036. "type": "string",
  27037. "pattern": "^evt_"
  27038. },
  27039. "type": {
  27040. "type": "string",
  27041. "enum": ["session.next.text.delta"]
  27042. },
  27043. "properties": {
  27044. "type": "object",
  27045. "properties": {
  27046. "timestamp": {
  27047. "type": "number"
  27048. },
  27049. "sessionID": {
  27050. "type": "string",
  27051. "pattern": "^ses"
  27052. },
  27053. "assistantMessageID": {
  27054. "type": "string",
  27055. "pattern": "^msg_"
  27056. },
  27057. "textID": {
  27058. "type": "string"
  27059. },
  27060. "delta": {
  27061. "type": "string"
  27062. }
  27063. },
  27064. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  27065. "additionalProperties": false
  27066. }
  27067. },
  27068. "required": ["id", "type", "properties"],
  27069. "additionalProperties": false
  27070. },
  27071. "EventSessionNextTextEnded": {
  27072. "type": "object",
  27073. "properties": {
  27074. "id": {
  27075. "type": "string",
  27076. "pattern": "^evt_"
  27077. },
  27078. "type": {
  27079. "type": "string",
  27080. "enum": ["session.next.text.ended"]
  27081. },
  27082. "properties": {
  27083. "type": "object",
  27084. "properties": {
  27085. "timestamp": {
  27086. "type": "number"
  27087. },
  27088. "sessionID": {
  27089. "type": "string",
  27090. "pattern": "^ses"
  27091. },
  27092. "assistantMessageID": {
  27093. "type": "string",
  27094. "pattern": "^msg_"
  27095. },
  27096. "textID": {
  27097. "type": "string"
  27098. },
  27099. "text": {
  27100. "type": "string"
  27101. }
  27102. },
  27103. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  27104. "additionalProperties": false
  27105. }
  27106. },
  27107. "required": ["id", "type", "properties"],
  27108. "additionalProperties": false
  27109. },
  27110. "EventSessionNextReasoningStarted": {
  27111. "type": "object",
  27112. "properties": {
  27113. "id": {
  27114. "type": "string",
  27115. "pattern": "^evt_"
  27116. },
  27117. "type": {
  27118. "type": "string",
  27119. "enum": ["session.next.reasoning.started"]
  27120. },
  27121. "properties": {
  27122. "type": "object",
  27123. "properties": {
  27124. "timestamp": {
  27125. "type": "number"
  27126. },
  27127. "sessionID": {
  27128. "type": "string",
  27129. "pattern": "^ses"
  27130. },
  27131. "assistantMessageID": {
  27132. "type": "string",
  27133. "pattern": "^msg_"
  27134. },
  27135. "reasoningID": {
  27136. "type": "string"
  27137. },
  27138. "providerMetadata": {
  27139. "type": "object",
  27140. "additionalProperties": {
  27141. "type": "object"
  27142. }
  27143. }
  27144. },
  27145. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  27146. "additionalProperties": false
  27147. }
  27148. },
  27149. "required": ["id", "type", "properties"],
  27150. "additionalProperties": false
  27151. },
  27152. "EventSessionNextReasoningDelta": {
  27153. "type": "object",
  27154. "properties": {
  27155. "id": {
  27156. "type": "string",
  27157. "pattern": "^evt_"
  27158. },
  27159. "type": {
  27160. "type": "string",
  27161. "enum": ["session.next.reasoning.delta"]
  27162. },
  27163. "properties": {
  27164. "type": "object",
  27165. "properties": {
  27166. "timestamp": {
  27167. "type": "number"
  27168. },
  27169. "sessionID": {
  27170. "type": "string",
  27171. "pattern": "^ses"
  27172. },
  27173. "assistantMessageID": {
  27174. "type": "string",
  27175. "pattern": "^msg_"
  27176. },
  27177. "reasoningID": {
  27178. "type": "string"
  27179. },
  27180. "delta": {
  27181. "type": "string"
  27182. }
  27183. },
  27184. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  27185. "additionalProperties": false
  27186. }
  27187. },
  27188. "required": ["id", "type", "properties"],
  27189. "additionalProperties": false
  27190. },
  27191. "EventSessionNextReasoningEnded": {
  27192. "type": "object",
  27193. "properties": {
  27194. "id": {
  27195. "type": "string",
  27196. "pattern": "^evt_"
  27197. },
  27198. "type": {
  27199. "type": "string",
  27200. "enum": ["session.next.reasoning.ended"]
  27201. },
  27202. "properties": {
  27203. "type": "object",
  27204. "properties": {
  27205. "timestamp": {
  27206. "type": "number"
  27207. },
  27208. "sessionID": {
  27209. "type": "string",
  27210. "pattern": "^ses"
  27211. },
  27212. "assistantMessageID": {
  27213. "type": "string",
  27214. "pattern": "^msg_"
  27215. },
  27216. "reasoningID": {
  27217. "type": "string"
  27218. },
  27219. "text": {
  27220. "type": "string"
  27221. },
  27222. "providerMetadata": {
  27223. "type": "object",
  27224. "additionalProperties": {
  27225. "type": "object"
  27226. }
  27227. }
  27228. },
  27229. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  27230. "additionalProperties": false
  27231. }
  27232. },
  27233. "required": ["id", "type", "properties"],
  27234. "additionalProperties": false
  27235. },
  27236. "EventSessionNextToolInputStarted": {
  27237. "type": "object",
  27238. "properties": {
  27239. "id": {
  27240. "type": "string",
  27241. "pattern": "^evt_"
  27242. },
  27243. "type": {
  27244. "type": "string",
  27245. "enum": ["session.next.tool.input.started"]
  27246. },
  27247. "properties": {
  27248. "type": "object",
  27249. "properties": {
  27250. "timestamp": {
  27251. "type": "number"
  27252. },
  27253. "sessionID": {
  27254. "type": "string",
  27255. "pattern": "^ses"
  27256. },
  27257. "assistantMessageID": {
  27258. "type": "string",
  27259. "pattern": "^msg_"
  27260. },
  27261. "callID": {
  27262. "type": "string"
  27263. },
  27264. "name": {
  27265. "type": "string"
  27266. }
  27267. },
  27268. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  27269. "additionalProperties": false
  27270. }
  27271. },
  27272. "required": ["id", "type", "properties"],
  27273. "additionalProperties": false
  27274. },
  27275. "EventSessionNextToolInputDelta": {
  27276. "type": "object",
  27277. "properties": {
  27278. "id": {
  27279. "type": "string",
  27280. "pattern": "^evt_"
  27281. },
  27282. "type": {
  27283. "type": "string",
  27284. "enum": ["session.next.tool.input.delta"]
  27285. },
  27286. "properties": {
  27287. "type": "object",
  27288. "properties": {
  27289. "timestamp": {
  27290. "type": "number"
  27291. },
  27292. "sessionID": {
  27293. "type": "string",
  27294. "pattern": "^ses"
  27295. },
  27296. "assistantMessageID": {
  27297. "type": "string",
  27298. "pattern": "^msg_"
  27299. },
  27300. "callID": {
  27301. "type": "string"
  27302. },
  27303. "delta": {
  27304. "type": "string"
  27305. }
  27306. },
  27307. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  27308. "additionalProperties": false
  27309. }
  27310. },
  27311. "required": ["id", "type", "properties"],
  27312. "additionalProperties": false
  27313. },
  27314. "EventSessionNextToolInputEnded": {
  27315. "type": "object",
  27316. "properties": {
  27317. "id": {
  27318. "type": "string",
  27319. "pattern": "^evt_"
  27320. },
  27321. "type": {
  27322. "type": "string",
  27323. "enum": ["session.next.tool.input.ended"]
  27324. },
  27325. "properties": {
  27326. "type": "object",
  27327. "properties": {
  27328. "timestamp": {
  27329. "type": "number"
  27330. },
  27331. "sessionID": {
  27332. "type": "string",
  27333. "pattern": "^ses"
  27334. },
  27335. "assistantMessageID": {
  27336. "type": "string",
  27337. "pattern": "^msg_"
  27338. },
  27339. "callID": {
  27340. "type": "string"
  27341. },
  27342. "text": {
  27343. "type": "string"
  27344. }
  27345. },
  27346. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  27347. "additionalProperties": false
  27348. }
  27349. },
  27350. "required": ["id", "type", "properties"],
  27351. "additionalProperties": false
  27352. },
  27353. "EventSessionNextToolCalled": {
  27354. "type": "object",
  27355. "properties": {
  27356. "id": {
  27357. "type": "string",
  27358. "pattern": "^evt_"
  27359. },
  27360. "type": {
  27361. "type": "string",
  27362. "enum": ["session.next.tool.called"]
  27363. },
  27364. "properties": {
  27365. "type": "object",
  27366. "properties": {
  27367. "timestamp": {
  27368. "type": "number"
  27369. },
  27370. "sessionID": {
  27371. "type": "string",
  27372. "pattern": "^ses"
  27373. },
  27374. "assistantMessageID": {
  27375. "type": "string",
  27376. "pattern": "^msg_"
  27377. },
  27378. "callID": {
  27379. "type": "string"
  27380. },
  27381. "tool": {
  27382. "type": "string"
  27383. },
  27384. "input": {
  27385. "type": "object"
  27386. },
  27387. "provider": {
  27388. "type": "object",
  27389. "properties": {
  27390. "executed": {
  27391. "type": "boolean"
  27392. },
  27393. "metadata": {
  27394. "type": "object",
  27395. "additionalProperties": {
  27396. "type": "object"
  27397. }
  27398. }
  27399. },
  27400. "required": ["executed"],
  27401. "additionalProperties": false
  27402. }
  27403. },
  27404. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  27405. "additionalProperties": false
  27406. }
  27407. },
  27408. "required": ["id", "type", "properties"],
  27409. "additionalProperties": false
  27410. },
  27411. "EventSessionNextToolProgress": {
  27412. "type": "object",
  27413. "properties": {
  27414. "id": {
  27415. "type": "string",
  27416. "pattern": "^evt_"
  27417. },
  27418. "type": {
  27419. "type": "string",
  27420. "enum": ["session.next.tool.progress"]
  27421. },
  27422. "properties": {
  27423. "type": "object",
  27424. "properties": {
  27425. "timestamp": {
  27426. "type": "number"
  27427. },
  27428. "sessionID": {
  27429. "type": "string",
  27430. "pattern": "^ses"
  27431. },
  27432. "assistantMessageID": {
  27433. "type": "string",
  27434. "pattern": "^msg_"
  27435. },
  27436. "callID": {
  27437. "type": "string"
  27438. },
  27439. "structured": {
  27440. "type": "object"
  27441. },
  27442. "content": {
  27443. "type": "array",
  27444. "items": {
  27445. "anyOf": [
  27446. {
  27447. "$ref": "#/components/schemas/ToolTextContent"
  27448. },
  27449. {
  27450. "$ref": "#/components/schemas/ToolFileContent"
  27451. }
  27452. ]
  27453. }
  27454. }
  27455. },
  27456. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  27457. "additionalProperties": false
  27458. }
  27459. },
  27460. "required": ["id", "type", "properties"],
  27461. "additionalProperties": false
  27462. },
  27463. "EventSessionNextToolSuccess": {
  27464. "type": "object",
  27465. "properties": {
  27466. "id": {
  27467. "type": "string",
  27468. "pattern": "^evt_"
  27469. },
  27470. "type": {
  27471. "type": "string",
  27472. "enum": ["session.next.tool.success"]
  27473. },
  27474. "properties": {
  27475. "type": "object",
  27476. "properties": {
  27477. "timestamp": {
  27478. "type": "number"
  27479. },
  27480. "sessionID": {
  27481. "type": "string",
  27482. "pattern": "^ses"
  27483. },
  27484. "assistantMessageID": {
  27485. "type": "string",
  27486. "pattern": "^msg_"
  27487. },
  27488. "callID": {
  27489. "type": "string"
  27490. },
  27491. "structured": {
  27492. "type": "object"
  27493. },
  27494. "content": {
  27495. "type": "array",
  27496. "items": {
  27497. "anyOf": [
  27498. {
  27499. "$ref": "#/components/schemas/ToolTextContent"
  27500. },
  27501. {
  27502. "$ref": "#/components/schemas/ToolFileContent"
  27503. }
  27504. ]
  27505. }
  27506. },
  27507. "outputPaths": {
  27508. "type": "array",
  27509. "items": {
  27510. "type": "string"
  27511. }
  27512. },
  27513. "result": {},
  27514. "provider": {
  27515. "type": "object",
  27516. "properties": {
  27517. "executed": {
  27518. "type": "boolean"
  27519. },
  27520. "metadata": {
  27521. "type": "object",
  27522. "additionalProperties": {
  27523. "type": "object"
  27524. }
  27525. }
  27526. },
  27527. "required": ["executed"],
  27528. "additionalProperties": false
  27529. }
  27530. },
  27531. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  27532. "additionalProperties": false
  27533. }
  27534. },
  27535. "required": ["id", "type", "properties"],
  27536. "additionalProperties": false
  27537. },
  27538. "EventSessionNextToolFailed": {
  27539. "type": "object",
  27540. "properties": {
  27541. "id": {
  27542. "type": "string",
  27543. "pattern": "^evt_"
  27544. },
  27545. "type": {
  27546. "type": "string",
  27547. "enum": ["session.next.tool.failed"]
  27548. },
  27549. "properties": {
  27550. "type": "object",
  27551. "properties": {
  27552. "timestamp": {
  27553. "type": "number"
  27554. },
  27555. "sessionID": {
  27556. "type": "string",
  27557. "pattern": "^ses"
  27558. },
  27559. "assistantMessageID": {
  27560. "type": "string",
  27561. "pattern": "^msg_"
  27562. },
  27563. "callID": {
  27564. "type": "string"
  27565. },
  27566. "error": {
  27567. "$ref": "#/components/schemas/SessionErrorUnknown"
  27568. },
  27569. "result": {},
  27570. "provider": {
  27571. "type": "object",
  27572. "properties": {
  27573. "executed": {
  27574. "type": "boolean"
  27575. },
  27576. "metadata": {
  27577. "type": "object",
  27578. "additionalProperties": {
  27579. "type": "object"
  27580. }
  27581. }
  27582. },
  27583. "required": ["executed"],
  27584. "additionalProperties": false
  27585. }
  27586. },
  27587. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  27588. "additionalProperties": false
  27589. }
  27590. },
  27591. "required": ["id", "type", "properties"],
  27592. "additionalProperties": false
  27593. },
  27594. "EventSessionNextRetried": {
  27595. "type": "object",
  27596. "properties": {
  27597. "id": {
  27598. "type": "string",
  27599. "pattern": "^evt_"
  27600. },
  27601. "type": {
  27602. "type": "string",
  27603. "enum": ["session.next.retried"]
  27604. },
  27605. "properties": {
  27606. "type": "object",
  27607. "properties": {
  27608. "timestamp": {
  27609. "type": "number"
  27610. },
  27611. "sessionID": {
  27612. "type": "string",
  27613. "pattern": "^ses"
  27614. },
  27615. "attempt": {
  27616. "type": "number"
  27617. },
  27618. "error": {
  27619. "$ref": "#/components/schemas/SessionNextRetry_error"
  27620. }
  27621. },
  27622. "required": ["timestamp", "sessionID", "attempt", "error"],
  27623. "additionalProperties": false
  27624. }
  27625. },
  27626. "required": ["id", "type", "properties"],
  27627. "additionalProperties": false
  27628. },
  27629. "EventSessionNextCompactionStarted": {
  27630. "type": "object",
  27631. "properties": {
  27632. "id": {
  27633. "type": "string",
  27634. "pattern": "^evt_"
  27635. },
  27636. "type": {
  27637. "type": "string",
  27638. "enum": ["session.next.compaction.started"]
  27639. },
  27640. "properties": {
  27641. "type": "object",
  27642. "properties": {
  27643. "timestamp": {
  27644. "type": "number"
  27645. },
  27646. "sessionID": {
  27647. "type": "string",
  27648. "pattern": "^ses"
  27649. },
  27650. "messageID": {
  27651. "type": "string",
  27652. "pattern": "^msg_"
  27653. },
  27654. "reason": {
  27655. "type": "string",
  27656. "enum": ["auto", "manual"]
  27657. }
  27658. },
  27659. "required": ["timestamp", "sessionID", "messageID", "reason"],
  27660. "additionalProperties": false
  27661. }
  27662. },
  27663. "required": ["id", "type", "properties"],
  27664. "additionalProperties": false
  27665. },
  27666. "EventSessionNextCompactionDelta": {
  27667. "type": "object",
  27668. "properties": {
  27669. "id": {
  27670. "type": "string",
  27671. "pattern": "^evt_"
  27672. },
  27673. "type": {
  27674. "type": "string",
  27675. "enum": ["session.next.compaction.delta"]
  27676. },
  27677. "properties": {
  27678. "type": "object",
  27679. "properties": {
  27680. "timestamp": {
  27681. "type": "number"
  27682. },
  27683. "sessionID": {
  27684. "type": "string",
  27685. "pattern": "^ses"
  27686. },
  27687. "messageID": {
  27688. "type": "string",
  27689. "pattern": "^msg_"
  27690. },
  27691. "text": {
  27692. "type": "string"
  27693. }
  27694. },
  27695. "required": ["timestamp", "sessionID", "messageID", "text"],
  27696. "additionalProperties": false
  27697. }
  27698. },
  27699. "required": ["id", "type", "properties"],
  27700. "additionalProperties": false
  27701. },
  27702. "EventSessionNextCompactionEnded": {
  27703. "type": "object",
  27704. "properties": {
  27705. "id": {
  27706. "type": "string",
  27707. "pattern": "^evt_"
  27708. },
  27709. "type": {
  27710. "type": "string",
  27711. "enum": ["session.next.compaction.ended"]
  27712. },
  27713. "properties": {
  27714. "type": "object",
  27715. "properties": {
  27716. "timestamp": {
  27717. "type": "number"
  27718. },
  27719. "sessionID": {
  27720. "type": "string",
  27721. "pattern": "^ses"
  27722. },
  27723. "messageID": {
  27724. "type": "string",
  27725. "pattern": "^msg_"
  27726. },
  27727. "reason": {
  27728. "type": "string",
  27729. "enum": ["auto", "manual"]
  27730. },
  27731. "text": {
  27732. "type": "string"
  27733. },
  27734. "recent": {
  27735. "type": "string"
  27736. }
  27737. },
  27738. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  27739. "additionalProperties": false
  27740. }
  27741. },
  27742. "required": ["id", "type", "properties"],
  27743. "additionalProperties": false
  27744. },
  27745. "EventMessagePartDelta": {
  27746. "type": "object",
  27747. "properties": {
  27748. "id": {
  27749. "type": "string",
  27750. "pattern": "^evt_"
  27751. },
  27752. "type": {
  27753. "type": "string",
  27754. "enum": ["message.part.delta"]
  27755. },
  27756. "properties": {
  27757. "type": "object",
  27758. "properties": {
  27759. "sessionID": {
  27760. "type": "string",
  27761. "pattern": "^ses"
  27762. },
  27763. "messageID": {
  27764. "type": "string",
  27765. "pattern": "^msg"
  27766. },
  27767. "partID": {
  27768. "type": "string",
  27769. "pattern": "^prt"
  27770. },
  27771. "field": {
  27772. "type": "string"
  27773. },
  27774. "delta": {
  27775. "type": "string"
  27776. }
  27777. },
  27778. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  27779. "additionalProperties": false
  27780. }
  27781. },
  27782. "required": ["id", "type", "properties"],
  27783. "additionalProperties": false
  27784. },
  27785. "EventSessionDiff": {
  27786. "type": "object",
  27787. "properties": {
  27788. "id": {
  27789. "type": "string",
  27790. "pattern": "^evt_"
  27791. },
  27792. "type": {
  27793. "type": "string",
  27794. "enum": ["session.diff"]
  27795. },
  27796. "properties": {
  27797. "type": "object",
  27798. "properties": {
  27799. "sessionID": {
  27800. "type": "string",
  27801. "pattern": "^ses"
  27802. },
  27803. "diff": {
  27804. "type": "array",
  27805. "items": {
  27806. "$ref": "#/components/schemas/SnapshotFileDiff"
  27807. }
  27808. }
  27809. },
  27810. "required": ["sessionID", "diff"],
  27811. "additionalProperties": false
  27812. }
  27813. },
  27814. "required": ["id", "type", "properties"],
  27815. "additionalProperties": false
  27816. },
  27817. "EventSessionError": {
  27818. "type": "object",
  27819. "properties": {
  27820. "id": {
  27821. "type": "string",
  27822. "pattern": "^evt_"
  27823. },
  27824. "type": {
  27825. "type": "string",
  27826. "enum": ["session.error"]
  27827. },
  27828. "properties": {
  27829. "type": "object",
  27830. "properties": {
  27831. "sessionID": {
  27832. "type": "string",
  27833. "pattern": "^ses"
  27834. },
  27835. "error": {
  27836. "anyOf": [
  27837. {
  27838. "$ref": "#/components/schemas/ProviderAuthError"
  27839. },
  27840. {
  27841. "$ref": "#/components/schemas/UnknownError"
  27842. },
  27843. {
  27844. "$ref": "#/components/schemas/MessageOutputLengthError"
  27845. },
  27846. {
  27847. "$ref": "#/components/schemas/MessageAbortedError"
  27848. },
  27849. {
  27850. "$ref": "#/components/schemas/StructuredOutputError"
  27851. },
  27852. {
  27853. "$ref": "#/components/schemas/ContextOverflowError"
  27854. },
  27855. {
  27856. "$ref": "#/components/schemas/APIError"
  27857. }
  27858. ]
  27859. }
  27860. },
  27861. "additionalProperties": false
  27862. }
  27863. },
  27864. "required": ["id", "type", "properties"],
  27865. "additionalProperties": false
  27866. },
  27867. "EventInstallationUpdated": {
  27868. "type": "object",
  27869. "properties": {
  27870. "id": {
  27871. "type": "string",
  27872. "pattern": "^evt_"
  27873. },
  27874. "type": {
  27875. "type": "string",
  27876. "enum": ["installation.updated"]
  27877. },
  27878. "properties": {
  27879. "type": "object",
  27880. "properties": {
  27881. "version": {
  27882. "type": "string"
  27883. }
  27884. },
  27885. "required": ["version"],
  27886. "additionalProperties": false
  27887. }
  27888. },
  27889. "required": ["id", "type", "properties"],
  27890. "additionalProperties": false
  27891. },
  27892. "EventInstallationUpdate-available": {
  27893. "type": "object",
  27894. "properties": {
  27895. "id": {
  27896. "type": "string",
  27897. "pattern": "^evt_"
  27898. },
  27899. "type": {
  27900. "type": "string",
  27901. "enum": ["installation.update-available"]
  27902. },
  27903. "properties": {
  27904. "type": "object",
  27905. "properties": {
  27906. "version": {
  27907. "type": "string"
  27908. }
  27909. },
  27910. "required": ["version"],
  27911. "additionalProperties": false
  27912. }
  27913. },
  27914. "required": ["id", "type", "properties"],
  27915. "additionalProperties": false
  27916. },
  27917. "EventFileEdited": {
  27918. "type": "object",
  27919. "properties": {
  27920. "id": {
  27921. "type": "string",
  27922. "pattern": "^evt_"
  27923. },
  27924. "type": {
  27925. "type": "string",
  27926. "enum": ["file.edited"]
  27927. },
  27928. "properties": {
  27929. "type": "object",
  27930. "properties": {
  27931. "file": {
  27932. "type": "string"
  27933. }
  27934. },
  27935. "required": ["file"],
  27936. "additionalProperties": false
  27937. }
  27938. },
  27939. "required": ["id", "type", "properties"],
  27940. "additionalProperties": false
  27941. },
  27942. "EventAccountAdded": {
  27943. "type": "object",
  27944. "properties": {
  27945. "id": {
  27946. "type": "string",
  27947. "pattern": "^evt_"
  27948. },
  27949. "type": {
  27950. "type": "string",
  27951. "enum": ["account.added"]
  27952. },
  27953. "properties": {
  27954. "type": "object",
  27955. "properties": {
  27956. "account": {
  27957. "$ref": "#/components/schemas/AuthInfo"
  27958. }
  27959. },
  27960. "required": ["account"],
  27961. "additionalProperties": false
  27962. }
  27963. },
  27964. "required": ["id", "type", "properties"],
  27965. "additionalProperties": false
  27966. },
  27967. "EventAccountRemoved": {
  27968. "type": "object",
  27969. "properties": {
  27970. "id": {
  27971. "type": "string",
  27972. "pattern": "^evt_"
  27973. },
  27974. "type": {
  27975. "type": "string",
  27976. "enum": ["account.removed"]
  27977. },
  27978. "properties": {
  27979. "type": "object",
  27980. "properties": {
  27981. "account": {
  27982. "$ref": "#/components/schemas/AuthInfo"
  27983. }
  27984. },
  27985. "required": ["account"],
  27986. "additionalProperties": false
  27987. }
  27988. },
  27989. "required": ["id", "type", "properties"],
  27990. "additionalProperties": false
  27991. },
  27992. "EventAccountSwitched": {
  27993. "type": "object",
  27994. "properties": {
  27995. "id": {
  27996. "type": "string",
  27997. "pattern": "^evt_"
  27998. },
  27999. "type": {
  28000. "type": "string",
  28001. "enum": ["account.switched"]
  28002. },
  28003. "properties": {
  28004. "type": "object",
  28005. "properties": {
  28006. "serviceID": {
  28007. "type": "string"
  28008. },
  28009. "from": {
  28010. "type": "string"
  28011. },
  28012. "to": {
  28013. "type": "string"
  28014. }
  28015. },
  28016. "required": ["serviceID"],
  28017. "additionalProperties": false
  28018. }
  28019. },
  28020. "required": ["id", "type", "properties"],
  28021. "additionalProperties": false
  28022. },
  28023. "EventPermissionV2Asked": {
  28024. "type": "object",
  28025. "properties": {
  28026. "id": {
  28027. "type": "string",
  28028. "pattern": "^evt_"
  28029. },
  28030. "type": {
  28031. "type": "string",
  28032. "enum": ["permission.v2.asked"]
  28033. },
  28034. "properties": {
  28035. "type": "object",
  28036. "properties": {
  28037. "id": {
  28038. "type": "string",
  28039. "pattern": "^per"
  28040. },
  28041. "sessionID": {
  28042. "type": "string",
  28043. "pattern": "^ses"
  28044. },
  28045. "action": {
  28046. "type": "string"
  28047. },
  28048. "resources": {
  28049. "type": "array",
  28050. "items": {
  28051. "type": "string"
  28052. }
  28053. },
  28054. "save": {
  28055. "type": "array",
  28056. "items": {
  28057. "type": "string"
  28058. }
  28059. },
  28060. "metadata": {
  28061. "type": "object"
  28062. },
  28063. "source": {
  28064. "$ref": "#/components/schemas/PermissionV2Source"
  28065. }
  28066. },
  28067. "required": ["id", "sessionID", "action", "resources"],
  28068. "additionalProperties": false
  28069. }
  28070. },
  28071. "required": ["id", "type", "properties"],
  28072. "additionalProperties": false
  28073. },
  28074. "EventPermissionV2Replied": {
  28075. "type": "object",
  28076. "properties": {
  28077. "id": {
  28078. "type": "string",
  28079. "pattern": "^evt_"
  28080. },
  28081. "type": {
  28082. "type": "string",
  28083. "enum": ["permission.v2.replied"]
  28084. },
  28085. "properties": {
  28086. "type": "object",
  28087. "properties": {
  28088. "sessionID": {
  28089. "type": "string",
  28090. "pattern": "^ses"
  28091. },
  28092. "requestID": {
  28093. "type": "string",
  28094. "pattern": "^per"
  28095. },
  28096. "reply": {
  28097. "$ref": "#/components/schemas/PermissionV2Reply"
  28098. }
  28099. },
  28100. "required": ["sessionID", "requestID", "reply"],
  28101. "additionalProperties": false
  28102. }
  28103. },
  28104. "required": ["id", "type", "properties"],
  28105. "additionalProperties": false
  28106. },
  28107. "EventReferenceUpdated": {
  28108. "type": "object",
  28109. "properties": {
  28110. "id": {
  28111. "type": "string",
  28112. "pattern": "^evt_"
  28113. },
  28114. "type": {
  28115. "type": "string",
  28116. "enum": ["reference.updated"]
  28117. },
  28118. "properties": {
  28119. "type": "object",
  28120. "properties": {}
  28121. }
  28122. },
  28123. "required": ["id", "type", "properties"],
  28124. "additionalProperties": false
  28125. },
  28126. "EventFileWatcherUpdated": {
  28127. "type": "object",
  28128. "properties": {
  28129. "id": {
  28130. "type": "string",
  28131. "pattern": "^evt_"
  28132. },
  28133. "type": {
  28134. "type": "string",
  28135. "enum": ["file.watcher.updated"]
  28136. },
  28137. "properties": {
  28138. "type": "object",
  28139. "properties": {
  28140. "file": {
  28141. "type": "string"
  28142. },
  28143. "event": {
  28144. "type": "string",
  28145. "enum": ["add", "change", "unlink"]
  28146. }
  28147. },
  28148. "required": ["file", "event"],
  28149. "additionalProperties": false
  28150. }
  28151. },
  28152. "required": ["id", "type", "properties"],
  28153. "additionalProperties": false
  28154. },
  28155. "EventPtyCreated": {
  28156. "type": "object",
  28157. "properties": {
  28158. "id": {
  28159. "type": "string",
  28160. "pattern": "^evt_"
  28161. },
  28162. "type": {
  28163. "type": "string",
  28164. "enum": ["pty.created"]
  28165. },
  28166. "properties": {
  28167. "type": "object",
  28168. "properties": {
  28169. "info": {
  28170. "$ref": "#/components/schemas/Pty"
  28171. }
  28172. },
  28173. "required": ["info"],
  28174. "additionalProperties": false
  28175. }
  28176. },
  28177. "required": ["id", "type", "properties"],
  28178. "additionalProperties": false
  28179. },
  28180. "EventPtyUpdated": {
  28181. "type": "object",
  28182. "properties": {
  28183. "id": {
  28184. "type": "string",
  28185. "pattern": "^evt_"
  28186. },
  28187. "type": {
  28188. "type": "string",
  28189. "enum": ["pty.updated"]
  28190. },
  28191. "properties": {
  28192. "type": "object",
  28193. "properties": {
  28194. "info": {
  28195. "$ref": "#/components/schemas/Pty"
  28196. }
  28197. },
  28198. "required": ["info"],
  28199. "additionalProperties": false
  28200. }
  28201. },
  28202. "required": ["id", "type", "properties"],
  28203. "additionalProperties": false
  28204. },
  28205. "EventPtyExited": {
  28206. "type": "object",
  28207. "properties": {
  28208. "id": {
  28209. "type": "string",
  28210. "pattern": "^evt_"
  28211. },
  28212. "type": {
  28213. "type": "string",
  28214. "enum": ["pty.exited"]
  28215. },
  28216. "properties": {
  28217. "type": "object",
  28218. "properties": {
  28219. "id": {
  28220. "type": "string",
  28221. "pattern": "^pty"
  28222. },
  28223. "exitCode": {
  28224. "type": "integer",
  28225. "minimum": 0
  28226. }
  28227. },
  28228. "required": ["id", "exitCode"],
  28229. "additionalProperties": false
  28230. }
  28231. },
  28232. "required": ["id", "type", "properties"],
  28233. "additionalProperties": false
  28234. },
  28235. "EventPtyDeleted": {
  28236. "type": "object",
  28237. "properties": {
  28238. "id": {
  28239. "type": "string",
  28240. "pattern": "^evt_"
  28241. },
  28242. "type": {
  28243. "type": "string",
  28244. "enum": ["pty.deleted"]
  28245. },
  28246. "properties": {
  28247. "type": "object",
  28248. "properties": {
  28249. "id": {
  28250. "type": "string",
  28251. "pattern": "^pty"
  28252. }
  28253. },
  28254. "required": ["id"],
  28255. "additionalProperties": false
  28256. }
  28257. },
  28258. "required": ["id", "type", "properties"],
  28259. "additionalProperties": false
  28260. },
  28261. "EventQuestionV2Asked": {
  28262. "type": "object",
  28263. "properties": {
  28264. "id": {
  28265. "type": "string",
  28266. "pattern": "^evt_"
  28267. },
  28268. "type": {
  28269. "type": "string",
  28270. "enum": ["question.v2.asked"]
  28271. },
  28272. "properties": {
  28273. "type": "object",
  28274. "properties": {
  28275. "id": {
  28276. "type": "string",
  28277. "pattern": "^que"
  28278. },
  28279. "sessionID": {
  28280. "type": "string",
  28281. "pattern": "^ses"
  28282. },
  28283. "questions": {
  28284. "type": "array",
  28285. "items": {
  28286. "$ref": "#/components/schemas/QuestionV2Info"
  28287. },
  28288. "description": "Questions to ask"
  28289. },
  28290. "tool": {
  28291. "$ref": "#/components/schemas/QuestionV2Tool"
  28292. }
  28293. },
  28294. "required": ["id", "sessionID", "questions"],
  28295. "additionalProperties": false
  28296. }
  28297. },
  28298. "required": ["id", "type", "properties"],
  28299. "additionalProperties": false
  28300. },
  28301. "EventQuestionV2Replied": {
  28302. "type": "object",
  28303. "properties": {
  28304. "id": {
  28305. "type": "string",
  28306. "pattern": "^evt_"
  28307. },
  28308. "type": {
  28309. "type": "string",
  28310. "enum": ["question.v2.replied"]
  28311. },
  28312. "properties": {
  28313. "type": "object",
  28314. "properties": {
  28315. "sessionID": {
  28316. "type": "string",
  28317. "pattern": "^ses"
  28318. },
  28319. "requestID": {
  28320. "type": "string",
  28321. "pattern": "^que"
  28322. },
  28323. "answers": {
  28324. "type": "array",
  28325. "items": {
  28326. "$ref": "#/components/schemas/QuestionV2Answer"
  28327. }
  28328. }
  28329. },
  28330. "required": ["sessionID", "requestID", "answers"],
  28331. "additionalProperties": false
  28332. }
  28333. },
  28334. "required": ["id", "type", "properties"],
  28335. "additionalProperties": false
  28336. },
  28337. "EventQuestionV2Rejected": {
  28338. "type": "object",
  28339. "properties": {
  28340. "id": {
  28341. "type": "string",
  28342. "pattern": "^evt_"
  28343. },
  28344. "type": {
  28345. "type": "string",
  28346. "enum": ["question.v2.rejected"]
  28347. },
  28348. "properties": {
  28349. "type": "object",
  28350. "properties": {
  28351. "sessionID": {
  28352. "type": "string",
  28353. "pattern": "^ses"
  28354. },
  28355. "requestID": {
  28356. "type": "string",
  28357. "pattern": "^que"
  28358. }
  28359. },
  28360. "required": ["sessionID", "requestID"],
  28361. "additionalProperties": false
  28362. }
  28363. },
  28364. "required": ["id", "type", "properties"],
  28365. "additionalProperties": false
  28366. },
  28367. "EventTodoUpdated": {
  28368. "type": "object",
  28369. "properties": {
  28370. "id": {
  28371. "type": "string",
  28372. "pattern": "^evt_"
  28373. },
  28374. "type": {
  28375. "type": "string",
  28376. "enum": ["todo.updated"]
  28377. },
  28378. "properties": {
  28379. "type": "object",
  28380. "properties": {
  28381. "sessionID": {
  28382. "type": "string",
  28383. "pattern": "^ses"
  28384. },
  28385. "todos": {
  28386. "type": "array",
  28387. "items": {
  28388. "$ref": "#/components/schemas/Todo"
  28389. }
  28390. }
  28391. },
  28392. "required": ["sessionID", "todos"],
  28393. "additionalProperties": false
  28394. }
  28395. },
  28396. "required": ["id", "type", "properties"],
  28397. "additionalProperties": false
  28398. },
  28399. "EventLspUpdated": {
  28400. "type": "object",
  28401. "properties": {
  28402. "id": {
  28403. "type": "string",
  28404. "pattern": "^evt_"
  28405. },
  28406. "type": {
  28407. "type": "string",
  28408. "enum": ["lsp.updated"]
  28409. },
  28410. "properties": {
  28411. "type": "object",
  28412. "properties": {}
  28413. }
  28414. },
  28415. "required": ["id", "type", "properties"],
  28416. "additionalProperties": false
  28417. },
  28418. "EventPermissionAsked": {
  28419. "type": "object",
  28420. "properties": {
  28421. "id": {
  28422. "type": "string",
  28423. "pattern": "^evt_"
  28424. },
  28425. "type": {
  28426. "type": "string",
  28427. "enum": ["permission.asked"]
  28428. },
  28429. "properties": {
  28430. "type": "object",
  28431. "properties": {
  28432. "id": {
  28433. "type": "string",
  28434. "pattern": "^per"
  28435. },
  28436. "sessionID": {
  28437. "type": "string",
  28438. "pattern": "^ses"
  28439. },
  28440. "permission": {
  28441. "type": "string"
  28442. },
  28443. "patterns": {
  28444. "type": "array",
  28445. "items": {
  28446. "type": "string"
  28447. }
  28448. },
  28449. "metadata": {
  28450. "type": "object"
  28451. },
  28452. "always": {
  28453. "type": "array",
  28454. "items": {
  28455. "type": "string"
  28456. }
  28457. },
  28458. "tool": {
  28459. "type": "object",
  28460. "properties": {
  28461. "messageID": {
  28462. "type": "string"
  28463. },
  28464. "callID": {
  28465. "type": "string"
  28466. }
  28467. },
  28468. "required": ["messageID", "callID"],
  28469. "additionalProperties": false
  28470. }
  28471. },
  28472. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  28473. "additionalProperties": false
  28474. }
  28475. },
  28476. "required": ["id", "type", "properties"],
  28477. "additionalProperties": false
  28478. },
  28479. "EventPermissionReplied": {
  28480. "type": "object",
  28481. "properties": {
  28482. "id": {
  28483. "type": "string",
  28484. "pattern": "^evt_"
  28485. },
  28486. "type": {
  28487. "type": "string",
  28488. "enum": ["permission.replied"]
  28489. },
  28490. "properties": {
  28491. "type": "object",
  28492. "properties": {
  28493. "sessionID": {
  28494. "type": "string",
  28495. "pattern": "^ses"
  28496. },
  28497. "requestID": {
  28498. "type": "string",
  28499. "pattern": "^per"
  28500. },
  28501. "reply": {
  28502. "type": "string",
  28503. "enum": ["once", "always", "reject"]
  28504. }
  28505. },
  28506. "required": ["sessionID", "requestID", "reply"],
  28507. "additionalProperties": false
  28508. }
  28509. },
  28510. "required": ["id", "type", "properties"],
  28511. "additionalProperties": false
  28512. },
  28513. "EventMcpToolsChanged": {
  28514. "type": "object",
  28515. "properties": {
  28516. "id": {
  28517. "type": "string",
  28518. "pattern": "^evt_"
  28519. },
  28520. "type": {
  28521. "type": "string",
  28522. "enum": ["mcp.tools.changed"]
  28523. },
  28524. "properties": {
  28525. "type": "object",
  28526. "properties": {
  28527. "server": {
  28528. "type": "string"
  28529. }
  28530. },
  28531. "required": ["server"],
  28532. "additionalProperties": false
  28533. }
  28534. },
  28535. "required": ["id", "type", "properties"],
  28536. "additionalProperties": false
  28537. },
  28538. "EventMcpBrowserOpenFailed": {
  28539. "type": "object",
  28540. "properties": {
  28541. "id": {
  28542. "type": "string",
  28543. "pattern": "^evt_"
  28544. },
  28545. "type": {
  28546. "type": "string",
  28547. "enum": ["mcp.browser.open.failed"]
  28548. },
  28549. "properties": {
  28550. "type": "object",
  28551. "properties": {
  28552. "mcpName": {
  28553. "type": "string"
  28554. },
  28555. "url": {
  28556. "type": "string"
  28557. }
  28558. },
  28559. "required": ["mcpName", "url"],
  28560. "additionalProperties": false
  28561. }
  28562. },
  28563. "required": ["id", "type", "properties"],
  28564. "additionalProperties": false
  28565. },
  28566. "EventCommandExecuted": {
  28567. "type": "object",
  28568. "properties": {
  28569. "id": {
  28570. "type": "string",
  28571. "pattern": "^evt_"
  28572. },
  28573. "type": {
  28574. "type": "string",
  28575. "enum": ["command.executed"]
  28576. },
  28577. "properties": {
  28578. "type": "object",
  28579. "properties": {
  28580. "name": {
  28581. "type": "string"
  28582. },
  28583. "sessionID": {
  28584. "type": "string",
  28585. "pattern": "^ses"
  28586. },
  28587. "arguments": {
  28588. "type": "string"
  28589. },
  28590. "messageID": {
  28591. "type": "string",
  28592. "pattern": "^msg"
  28593. }
  28594. },
  28595. "required": ["name", "sessionID", "arguments", "messageID"],
  28596. "additionalProperties": false
  28597. }
  28598. },
  28599. "required": ["id", "type", "properties"],
  28600. "additionalProperties": false
  28601. },
  28602. "EventProjectDirectoriesUpdated": {
  28603. "type": "object",
  28604. "properties": {
  28605. "id": {
  28606. "type": "string",
  28607. "pattern": "^evt_"
  28608. },
  28609. "type": {
  28610. "type": "string",
  28611. "enum": ["project.directories.updated"]
  28612. },
  28613. "properties": {
  28614. "type": "object",
  28615. "properties": {
  28616. "projectID": {
  28617. "type": "string"
  28618. }
  28619. },
  28620. "required": ["projectID"],
  28621. "additionalProperties": false
  28622. }
  28623. },
  28624. "required": ["id", "type", "properties"],
  28625. "additionalProperties": false
  28626. },
  28627. "EventProjectUpdated": {
  28628. "type": "object",
  28629. "properties": {
  28630. "id": {
  28631. "type": "string",
  28632. "pattern": "^evt_"
  28633. },
  28634. "type": {
  28635. "type": "string",
  28636. "enum": ["project.updated"]
  28637. },
  28638. "properties": {
  28639. "type": "object",
  28640. "properties": {
  28641. "id": {
  28642. "type": "string"
  28643. },
  28644. "worktree": {
  28645. "type": "string"
  28646. },
  28647. "vcs": {
  28648. "type": "string",
  28649. "enum": ["git"]
  28650. },
  28651. "name": {
  28652. "type": "string"
  28653. },
  28654. "icon": {
  28655. "type": "object",
  28656. "properties": {
  28657. "url": {
  28658. "type": "string"
  28659. },
  28660. "override": {
  28661. "type": "string"
  28662. },
  28663. "color": {
  28664. "type": "string"
  28665. }
  28666. },
  28667. "additionalProperties": false
  28668. },
  28669. "commands": {
  28670. "type": "object",
  28671. "properties": {
  28672. "start": {
  28673. "type": "string",
  28674. "description": "Startup script to run when creating a new workspace (worktree)"
  28675. }
  28676. },
  28677. "additionalProperties": false
  28678. },
  28679. "time": {
  28680. "type": "object",
  28681. "properties": {
  28682. "created": {
  28683. "type": "integer",
  28684. "minimum": 0
  28685. },
  28686. "updated": {
  28687. "type": "integer",
  28688. "minimum": 0
  28689. },
  28690. "initialized": {
  28691. "type": "integer",
  28692. "minimum": 0
  28693. }
  28694. },
  28695. "required": ["created", "updated"],
  28696. "additionalProperties": false
  28697. },
  28698. "sandboxes": {
  28699. "type": "array",
  28700. "items": {
  28701. "type": "string"
  28702. }
  28703. }
  28704. },
  28705. "required": ["id", "worktree", "time", "sandboxes"],
  28706. "additionalProperties": false
  28707. }
  28708. },
  28709. "required": ["id", "type", "properties"],
  28710. "additionalProperties": false
  28711. },
  28712. "EventVcsBranchUpdated": {
  28713. "type": "object",
  28714. "properties": {
  28715. "id": {
  28716. "type": "string",
  28717. "pattern": "^evt_"
  28718. },
  28719. "type": {
  28720. "type": "string",
  28721. "enum": ["vcs.branch.updated"]
  28722. },
  28723. "properties": {
  28724. "type": "object",
  28725. "properties": {
  28726. "branch": {
  28727. "type": "string"
  28728. }
  28729. },
  28730. "additionalProperties": false
  28731. }
  28732. },
  28733. "required": ["id", "type", "properties"],
  28734. "additionalProperties": false
  28735. },
  28736. "EventQuestionAsked": {
  28737. "type": "object",
  28738. "properties": {
  28739. "id": {
  28740. "type": "string",
  28741. "pattern": "^evt_"
  28742. },
  28743. "type": {
  28744. "type": "string",
  28745. "enum": ["question.asked"]
  28746. },
  28747. "properties": {
  28748. "type": "object",
  28749. "properties": {
  28750. "id": {
  28751. "type": "string",
  28752. "pattern": "^que"
  28753. },
  28754. "sessionID": {
  28755. "type": "string",
  28756. "pattern": "^ses"
  28757. },
  28758. "questions": {
  28759. "type": "array",
  28760. "items": {
  28761. "$ref": "#/components/schemas/QuestionInfo"
  28762. },
  28763. "description": "Questions to ask"
  28764. },
  28765. "tool": {
  28766. "$ref": "#/components/schemas/QuestionTool"
  28767. }
  28768. },
  28769. "required": ["id", "sessionID", "questions"],
  28770. "additionalProperties": false
  28771. }
  28772. },
  28773. "required": ["id", "type", "properties"],
  28774. "additionalProperties": false
  28775. },
  28776. "EventQuestionReplied": {
  28777. "type": "object",
  28778. "properties": {
  28779. "id": {
  28780. "type": "string",
  28781. "pattern": "^evt_"
  28782. },
  28783. "type": {
  28784. "type": "string",
  28785. "enum": ["question.replied"]
  28786. },
  28787. "properties": {
  28788. "type": "object",
  28789. "properties": {
  28790. "sessionID": {
  28791. "type": "string",
  28792. "pattern": "^ses"
  28793. },
  28794. "requestID": {
  28795. "type": "string",
  28796. "pattern": "^que"
  28797. },
  28798. "answers": {
  28799. "type": "array",
  28800. "items": {
  28801. "$ref": "#/components/schemas/QuestionAnswer"
  28802. }
  28803. }
  28804. },
  28805. "required": ["sessionID", "requestID", "answers"],
  28806. "additionalProperties": false
  28807. }
  28808. },
  28809. "required": ["id", "type", "properties"],
  28810. "additionalProperties": false
  28811. },
  28812. "EventQuestionRejected": {
  28813. "type": "object",
  28814. "properties": {
  28815. "id": {
  28816. "type": "string",
  28817. "pattern": "^evt_"
  28818. },
  28819. "type": {
  28820. "type": "string",
  28821. "enum": ["question.rejected"]
  28822. },
  28823. "properties": {
  28824. "type": "object",
  28825. "properties": {
  28826. "sessionID": {
  28827. "type": "string",
  28828. "pattern": "^ses"
  28829. },
  28830. "requestID": {
  28831. "type": "string",
  28832. "pattern": "^que"
  28833. }
  28834. },
  28835. "required": ["sessionID", "requestID"],
  28836. "additionalProperties": false
  28837. }
  28838. },
  28839. "required": ["id", "type", "properties"],
  28840. "additionalProperties": false
  28841. },
  28842. "EventSessionStatus": {
  28843. "type": "object",
  28844. "properties": {
  28845. "id": {
  28846. "type": "string",
  28847. "pattern": "^evt_"
  28848. },
  28849. "type": {
  28850. "type": "string",
  28851. "enum": ["session.status"]
  28852. },
  28853. "properties": {
  28854. "type": "object",
  28855. "properties": {
  28856. "sessionID": {
  28857. "type": "string",
  28858. "pattern": "^ses"
  28859. },
  28860. "status": {
  28861. "$ref": "#/components/schemas/SessionStatus"
  28862. }
  28863. },
  28864. "required": ["sessionID", "status"],
  28865. "additionalProperties": false
  28866. }
  28867. },
  28868. "required": ["id", "type", "properties"],
  28869. "additionalProperties": false
  28870. },
  28871. "EventSessionIdle": {
  28872. "type": "object",
  28873. "properties": {
  28874. "id": {
  28875. "type": "string",
  28876. "pattern": "^evt_"
  28877. },
  28878. "type": {
  28879. "type": "string",
  28880. "enum": ["session.idle"]
  28881. },
  28882. "properties": {
  28883. "type": "object",
  28884. "properties": {
  28885. "sessionID": {
  28886. "type": "string",
  28887. "pattern": "^ses"
  28888. }
  28889. },
  28890. "required": ["sessionID"],
  28891. "additionalProperties": false
  28892. }
  28893. },
  28894. "required": ["id", "type", "properties"],
  28895. "additionalProperties": false
  28896. },
  28897. "EventSessionCompacted": {
  28898. "type": "object",
  28899. "properties": {
  28900. "id": {
  28901. "type": "string",
  28902. "pattern": "^evt_"
  28903. },
  28904. "type": {
  28905. "type": "string",
  28906. "enum": ["session.compacted"]
  28907. },
  28908. "properties": {
  28909. "type": "object",
  28910. "properties": {
  28911. "sessionID": {
  28912. "type": "string",
  28913. "pattern": "^ses"
  28914. }
  28915. },
  28916. "required": ["sessionID"],
  28917. "additionalProperties": false
  28918. }
  28919. },
  28920. "required": ["id", "type", "properties"],
  28921. "additionalProperties": false
  28922. },
  28923. "EventWorktreeReady": {
  28924. "type": "object",
  28925. "properties": {
  28926. "id": {
  28927. "type": "string",
  28928. "pattern": "^evt_"
  28929. },
  28930. "type": {
  28931. "type": "string",
  28932. "enum": ["worktree.ready"]
  28933. },
  28934. "properties": {
  28935. "type": "object",
  28936. "properties": {
  28937. "name": {
  28938. "type": "string"
  28939. },
  28940. "branch": {
  28941. "type": "string"
  28942. }
  28943. },
  28944. "required": ["name"],
  28945. "additionalProperties": false
  28946. }
  28947. },
  28948. "required": ["id", "type", "properties"],
  28949. "additionalProperties": false
  28950. },
  28951. "EventWorktreeFailed": {
  28952. "type": "object",
  28953. "properties": {
  28954. "id": {
  28955. "type": "string",
  28956. "pattern": "^evt_"
  28957. },
  28958. "type": {
  28959. "type": "string",
  28960. "enum": ["worktree.failed"]
  28961. },
  28962. "properties": {
  28963. "type": "object",
  28964. "properties": {
  28965. "message": {
  28966. "type": "string"
  28967. }
  28968. },
  28969. "required": ["message"],
  28970. "additionalProperties": false
  28971. }
  28972. },
  28973. "required": ["id", "type", "properties"],
  28974. "additionalProperties": false
  28975. },
  28976. "EventWorkspaceReady": {
  28977. "type": "object",
  28978. "properties": {
  28979. "id": {
  28980. "type": "string",
  28981. "pattern": "^evt_"
  28982. },
  28983. "type": {
  28984. "type": "string",
  28985. "enum": ["workspace.ready"]
  28986. },
  28987. "properties": {
  28988. "type": "object",
  28989. "properties": {
  28990. "name": {
  28991. "type": "string"
  28992. }
  28993. },
  28994. "required": ["name"],
  28995. "additionalProperties": false
  28996. }
  28997. },
  28998. "required": ["id", "type", "properties"],
  28999. "additionalProperties": false
  29000. },
  29001. "EventWorkspaceFailed": {
  29002. "type": "object",
  29003. "properties": {
  29004. "id": {
  29005. "type": "string",
  29006. "pattern": "^evt_"
  29007. },
  29008. "type": {
  29009. "type": "string",
  29010. "enum": ["workspace.failed"]
  29011. },
  29012. "properties": {
  29013. "type": "object",
  29014. "properties": {
  29015. "message": {
  29016. "type": "string"
  29017. }
  29018. },
  29019. "required": ["message"],
  29020. "additionalProperties": false
  29021. }
  29022. },
  29023. "required": ["id", "type", "properties"],
  29024. "additionalProperties": false
  29025. },
  29026. "EventWorkspaceStatus": {
  29027. "type": "object",
  29028. "properties": {
  29029. "id": {
  29030. "type": "string",
  29031. "pattern": "^evt_"
  29032. },
  29033. "type": {
  29034. "type": "string",
  29035. "enum": ["workspace.status"]
  29036. },
  29037. "properties": {
  29038. "type": "object",
  29039. "properties": {
  29040. "workspaceID": {
  29041. "type": "string",
  29042. "pattern": "^wrk"
  29043. },
  29044. "status": {
  29045. "type": "string",
  29046. "enum": ["connected", "connecting", "disconnected", "error"]
  29047. }
  29048. },
  29049. "required": ["workspaceID", "status"],
  29050. "additionalProperties": false
  29051. }
  29052. },
  29053. "required": ["id", "type", "properties"],
  29054. "additionalProperties": false
  29055. },
  29056. "EventServerConnected": {
  29057. "type": "object",
  29058. "properties": {
  29059. "id": {
  29060. "type": "string",
  29061. "pattern": "^evt_"
  29062. },
  29063. "type": {
  29064. "type": "string",
  29065. "enum": ["server.connected"]
  29066. },
  29067. "properties": {
  29068. "type": "object",
  29069. "properties": {}
  29070. }
  29071. },
  29072. "required": ["id", "type", "properties"],
  29073. "additionalProperties": false
  29074. },
  29075. "EventGlobalDisposed": {
  29076. "type": "object",
  29077. "properties": {
  29078. "id": {
  29079. "type": "string",
  29080. "pattern": "^evt_"
  29081. },
  29082. "type": {
  29083. "type": "string",
  29084. "enum": ["global.disposed"]
  29085. },
  29086. "properties": {
  29087. "type": "object",
  29088. "properties": {}
  29089. }
  29090. },
  29091. "required": ["id", "type", "properties"],
  29092. "additionalProperties": false
  29093. },
  29094. "BadRequestError": {
  29095. "type": "object",
  29096. "required": ["name", "data"],
  29097. "properties": {
  29098. "name": {
  29099. "type": "string",
  29100. "enum": ["BadRequest"]
  29101. },
  29102. "data": {
  29103. "type": "object",
  29104. "required": ["message"],
  29105. "properties": {
  29106. "message": {
  29107. "type": "string"
  29108. },
  29109. "kind": {
  29110. "type": "string",
  29111. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  29112. }
  29113. }
  29114. }
  29115. }
  29116. }
  29117. }
  29118. },
  29119. "security": [],
  29120. "tags": [
  29121. {
  29122. "name": "control",
  29123. "description": "Control plane routes."
  29124. },
  29125. {
  29126. "name": "controlPlane",
  29127. "description": "Control-plane orchestration routes."
  29128. },
  29129. {
  29130. "name": "global",
  29131. "description": "Global server routes."
  29132. },
  29133. {
  29134. "name": "event",
  29135. "description": "Instance event stream route."
  29136. },
  29137. {
  29138. "name": "config",
  29139. "description": "Experimental HttpApi config routes."
  29140. },
  29141. {
  29142. "name": "experimental",
  29143. "description": "Experimental HttpApi read-only routes."
  29144. },
  29145. {
  29146. "name": "file",
  29147. "description": "Experimental HttpApi file routes."
  29148. },
  29149. {
  29150. "name": "instance",
  29151. "description": "Experimental HttpApi instance read routes."
  29152. },
  29153. {
  29154. "name": "mcp",
  29155. "description": "Experimental HttpApi MCP routes."
  29156. },
  29157. {
  29158. "name": "project",
  29159. "description": "Experimental HttpApi project routes."
  29160. },
  29161. {
  29162. "name": "projectCopy",
  29163. "description": "Project copy management routes."
  29164. },
  29165. {
  29166. "name": "pty",
  29167. "description": "Experimental HttpApi PTY routes."
  29168. },
  29169. {
  29170. "name": "question",
  29171. "description": "Question routes."
  29172. },
  29173. {
  29174. "name": "permission",
  29175. "description": "Experimental HttpApi permission routes."
  29176. },
  29177. {
  29178. "name": "provider",
  29179. "description": "Experimental HttpApi provider routes."
  29180. },
  29181. {
  29182. "name": "session",
  29183. "description": "Experimental HttpApi session routes."
  29184. },
  29185. {
  29186. "name": "sync",
  29187. "description": "Experimental HttpApi sync routes."
  29188. },
  29189. {
  29190. "name": "tui",
  29191. "description": "Experimental HttpApi TUI routes."
  29192. },
  29193. {
  29194. "name": "workspace",
  29195. "description": "Experimental HttpApi workspace routes."
  29196. },
  29197. {
  29198. "name": "opencode HttpApi",
  29199. "description": "Experimental HttpApi surface for selected instance routes."
  29200. },
  29201. {
  29202. "name": "opencode HttpApi",
  29203. "description": "Experimental HttpApi surface for selected instance routes."
  29204. },
  29205. {
  29206. "name": "opencode HttpApi",
  29207. "description": "Experimental HttpApi surface for selected instance routes."
  29208. },
  29209. {
  29210. "name": "sessions",
  29211. "description": "Experimental session routes."
  29212. },
  29213. {
  29214. "name": "messages",
  29215. "description": "Experimental message routes."
  29216. },
  29217. {
  29218. "name": "models",
  29219. "description": "Experimental model routes."
  29220. },
  29221. {
  29222. "name": "providers",
  29223. "description": "Experimental provider routes."
  29224. },
  29225. {
  29226. "name": "permissions",
  29227. "description": "Experimental permission routes."
  29228. },
  29229. {
  29230. "name": "filesystem",
  29231. "description": "Experimental location-scoped filesystem routes."
  29232. },
  29233. {
  29234. "name": "commands",
  29235. "description": "Experimental command routes."
  29236. },
  29237. {
  29238. "name": "skills",
  29239. "description": "Experimental skill routes."
  29240. },
  29241. {
  29242. "name": "events",
  29243. "description": "Experimental event stream route."
  29244. },
  29245. {
  29246. "name": "session questions",
  29247. "description": "Experimental session question routes."
  29248. },
  29249. {
  29250. "name": "reference",
  29251. "description": "Location-scoped project references."
  29252. },
  29253. {
  29254. "name": "pty",
  29255. "description": "PTY websocket route."
  29256. }
  29257. ]
  29258. }